X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormTabularCreate.C;h=6fd5d1a7055302250dabd8aea5f3193065be1cf6;hb=eba67bc3120dc301bf193c3f3b570f51f00a4654;hp=80f189ad0f9b89af08a43563b971c8a1820efa84;hpb=99083f35dee96b6d31320d38326d4b887578f2e0;p=lyx.git diff --git a/src/frontends/xforms/FormTabularCreate.C b/src/frontends/xforms/FormTabularCreate.C index 80f189ad0f..6fd5d1a705 100644 --- a/src/frontends/xforms/FormTabularCreate.C +++ b/src/frontends/xforms/FormTabularCreate.C @@ -20,13 +20,15 @@ #include "FormTabularCreate.h" #include "form_tabular_create.h" +#include "buffer.h" #include "BufferView.h" #include "Dialogs.h" #include "LyXView.h" #include "insets/insettabular.h" FormTabularCreate::FormTabularCreate(LyXView * lv, Dialogs * d) - : FormBaseBD(lv, d, _("Insert Tabular")), + : FormBaseBD(lv, d, _("Insert Tabular"), + new OkApplyCancelReadOnlyPolicy), dialog_(0) { // let the dialog be shown @@ -44,7 +46,7 @@ FormTabularCreate::~FormTabularCreate() FL_FORM * FormTabularCreate::form() const { - if ( dialog_ ) return dialog_->form; + if (dialog_) return dialog_->form; return 0; } @@ -71,7 +73,7 @@ void FormTabularCreate::build() fl_set_slider_precision(dialog_->slider_rows, 0); fl_set_slider_precision(dialog_->slider_columns, 0); - // manage the ok, apply and cancel/close buttons + // Manage the ok, apply and cancel/close buttons bc_.setOK(dialog_->button_ok); bc_.setApply(dialog_->button_apply); bc_.setCancel(dialog_->button_cancel); @@ -89,3 +91,9 @@ void FormTabularCreate::apply() delete in; } } + + +void FormTabularCreate::update() +{ + bc_.readOnly(lv_->buffer()->isReadonly()); +}