sortingCO->addItem(qt_("Alphabetically (Case-Insensitive)"), "nocase");
sortingCO->addItem(qt_("Alphabetically (Case-Sensitive)"), "case");
+ buttonBox->button(QDialogButtonBox::Reset)->setText(qt_("&Update"));
+ buttonBox->button(QDialogButtonBox::Reset)->setToolTip(qt_("Update the label list"));
+
refsTW->setColumnCount(1);
refsTW->header()->setVisible(false);
- connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
- connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
- connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
- connect(closePB, SIGNAL(clicked()), this, SLOT(resetDialog()));
connect(this, SIGNAL(rejected()), this, SLOT(dialogRejected()));
connect(typeCO, SIGNAL(activated(int)),
this, SLOT(groupToggled()));
connect(gotoPB, SIGNAL(clicked()),
this, SLOT(gotoClicked()));
- connect(updatePB, SIGNAL(clicked()),
- this, SLOT(updateClicked()));
connect(bufferCO, SIGNAL(activated(int)),
this, SLOT(updateClicked()));
connect(pluralCB, SIGNAL(clicked()),
enableBoxes();
bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
- bc().setOK(okPB);
- bc().setApply(applyPB);
- bc().setCancel(closePB);
+ bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+ bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+ bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
bc().addReadOnly(typeCO);
restored_buffer_ = -1;
}
+void GuiRef::on_buttonBox_clicked(QAbstractButton * button)
+{
+ switch (buttonBox->standardButton(button)) {
+ case QDialogButtonBox::Ok:
+ slotOK();
+ break;
+ case QDialogButtonBox::Apply:
+ slotApply();
+ break;
+ case QDialogButtonBox::Cancel:
+ slotClose();
+ resetDialog();
+ break;
+ case QDialogButtonBox::Reset:
+ updateClicked();
+ break;
+ default:
+ break;
+ }
+}
+
+
void GuiRef::updateClicked()
{
updateRefs();
typeCO->addItem(qt_("<page>"), "pageref");
typeCO->addItem(qt_("on page <page>"), "vpageref");
typeCO->addItem(qt_("<reference> on page <page>"), "vref");
+ typeCO->addItem(qt_("Textual reference"), "nameref");
if (bufferview()->cursor().inTexted()) {
typeCO->addItem(qt_("Formatted reference"), "formatted");
- typeCO->addItem(qt_("Textual reference"), "nameref");
typeCO->addItem(qt_("Label only"), "labelonly");
} else
typeCO->addItem(qt_("Formatted reference"), "prettyref");