mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix some index/label issue
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20162 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d21894949b
commit
022a231f3e
@ -838,7 +838,7 @@ void GuiDocumentDialog::updatePagestyle(string const & items, string const & sel
|
||||
toqstr(pagestyles[i].second));
|
||||
|
||||
if (nn > 0)
|
||||
pageLayoutModule->pagestyleCO->setCurrentIndex(n);
|
||||
pageLayoutModule->pagestyleCO->setCurrentIndex(nn);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,14 +28,20 @@ using std::string;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Base implementation
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiIndexDialogBase::GuiIndexDialogBase(LyXView & lv,
|
||||
docstring const & title, QString const & label)
|
||||
: GuiDialog(lv, "index")
|
||||
docstring const & title, QString const & label, std::string const & name)
|
||||
: GuiDialog(lv, name)
|
||||
{
|
||||
label_ = label;
|
||||
setupUi(this);
|
||||
setViewTitle(title);
|
||||
setController(new ControlCommand(*this, "index", "index"));
|
||||
setController(new ControlCommand(*this, name, name));
|
||||
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||
@ -113,6 +119,46 @@ bool GuiIndexDialogBase::isValid()
|
||||
return !keywordED->text().isEmpty();
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Index Dialog
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
GuiIndexDialog::GuiIndexDialog(LyXView & lv)
|
||||
: GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:"), "index")
|
||||
{
|
||||
keywordED->setWhatsThis( qt_(
|
||||
"The format of the entry in the index.\n"
|
||||
"\n"
|
||||
"An entry can be specified as a sub-entry of\n"
|
||||
"another with \"!\":\n"
|
||||
"\n"
|
||||
"cars!mileage\n"
|
||||
"\n"
|
||||
"You can cross-refer to another entry like so:\n"
|
||||
"\n"
|
||||
"cars!mileage|see{economy}\n"
|
||||
"\n"
|
||||
"For further details refer to the local LaTeX\n"
|
||||
"documentation.\n")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Label Dialog
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
GuiLabelDialog::GuiLabelDialog(LyXView & lv)
|
||||
: GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"), "label")
|
||||
{}
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -26,7 +26,7 @@ class GuiIndexDialogBase : public GuiDialog, public Ui::IndexUi
|
||||
|
||||
public:
|
||||
GuiIndexDialogBase(LyXView & lv, docstring const & title,
|
||||
QString const & label);
|
||||
QString const & label, std::string const & name);
|
||||
|
||||
private Q_SLOTS:
|
||||
void change_adaptor();
|
||||
@ -52,20 +52,17 @@ private:
|
||||
class GuiIndexDialog : public GuiIndexDialogBase
|
||||
{
|
||||
public:
|
||||
GuiIndexDialog(LyXView & lv)
|
||||
: GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:"))
|
||||
{}
|
||||
GuiIndexDialog(LyXView & lv);
|
||||
};
|
||||
|
||||
|
||||
class GuiLabelDialog : public GuiIndexDialogBase
|
||||
{
|
||||
public:
|
||||
GuiLabelDialog(LyXView & lv)
|
||||
: GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"))
|
||||
{}
|
||||
GuiLabelDialog(LyXView & lv);
|
||||
};
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user