}
-ControlRef & GuiRefDialog::controller() const
+ControlRef & GuiRefDialog::controller()
{
return static_cast<ControlRef &>(GuiDialog::controller());
}
void GuiRefDialog::selectionChanged()
{
- if (readOnly())
+ if (controller().isBufferReadonly())
return;
QList<QListWidgetItem *> selections = refsLW->selectedItems();
void GuiRefDialog::refHighlighted(QListWidgetItem * sel)
{
- if (readOnly())
+ if (controller().isBufferReadonly())
return;
/* int const cur_item = refsLW->currentRow();
void GuiRefDialog::refSelected(QListWidgetItem * sel)
{
- if (readOnly())
+ if (controller().isBufferReadonly())
return;
/* int const cur_item = refsLW->currentRow();
void GuiRefDialog::closeEvent(QCloseEvent * e)
{
- slotWMHide();
+ slotClose();
reset_dialog();
e->accept();
}
-void GuiRefDialog::update_contents()
+void GuiRefDialog::updateContents()
{
InsetCommandParams const & params = controller().params();
referenceED->setText(toqstr(params["reference"]));
nameED->setText(toqstr(params["name"]));
- nameED->setReadOnly(!nameAllowed() && !readOnly());
+ nameED->setReadOnly(!nameAllowed() && !controller().isBufferReadonly());
// restore type settings for new insets
if (params["reference"].empty())
typeCO->setCurrentIndex(orig_type);
else
typeCO->setCurrentIndex(InsetRef::getType(params.getCmdName()));
- typeCO->setEnabled(typeAllowed() && !readOnly());
+ typeCO->setEnabled(typeAllowed() && !controller().isBufferReadonly());
if (!typeAllowed())
typeCO->setCurrentIndex(0);