]> git.lyx.org Git - features.git/commitdiff
fix some index/label issue
authorAndré Pönitz <poenitz@gmx.net>
Sat, 8 Sep 2007 22:08:46 +0000 (22:08 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sat, 8 Sep 2007 22:08:46 +0000 (22:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20162 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiIndex.cpp
src/frontends/qt4/GuiIndex.h

index 3382cfe712a0087286f01eb9c77a4a71b8b49016..5416079e6b32128737917fd647bd6acc81c5ac7d 100644 (file)
@@ -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);
 }
 
 
index 2fcbbe57110ecc839ac07637ed164aa4c4ddba76..0607c3e9174020d563d0dab7dd5dc42d7ed52de9 100644 (file)
@@ -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
 
index bbfb4ebbd55bd468abb08f2ccc483409df94d472..e6c8445f5a2ea0a764fb7acaf7b706da2ae7d3a5 100644 (file)
@@ -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