#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
FL_FORM * FormTabularCreate::form() const
{
- if ( dialog_ ) return dialog_->form;
+ if (dialog_) return dialog_->form;
return 0;
}
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);
delete in;
}
}
+
+
+void FormTabularCreate::update()
+{
+ bc_.readOnly(lv_->buffer()->isReadonly());
+}