diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp
index 48bc112a3e..3f7e3c6e0e 100644
--- a/src/frontends/qt4/GuiDocument.cpp
+++ b/src/frontends/qt4/GuiDocument.cpp
@@ -1253,7 +1253,9 @@ GuiDocument::GuiDocument(GuiView & lv)
numberingModule->tocTW->headerItem()->setText(1, qt_("Numbered"));
numberingModule->tocTW->headerItem()->setText(2, qt_("Appears in TOC"));
setSectionResizeMode(numberingModule->tocTW->header(), QHeaderView::ResizeToContents);
- connect(numberingModule->linenoGB, SIGNAL(clicked()),
+ connect(numberingModule->linenoCB, SIGNAL(toggled(bool)),
+ this, SLOT(linenoToggled()));
+ connect(numberingModule->linenoCB, SIGNAL(clicked()),
this, SLOT(change_adaptor()));
connect(numberingModule->linenoLE, SIGNAL(textChanged(QString)),
this, SLOT(change_adaptor()));
@@ -2302,7 +2304,6 @@ void GuiDocument::mathFontChanged(int)
updateFontOptions();
}
-
void GuiDocument::fontOsfToggled(bool state)
{
if (fontModule->osFontsCB->isChecked())
@@ -3287,7 +3288,7 @@ void GuiDocument::applyView()
bp_.tocdepth = numberingModule->tocSL->value();
bp_.secnumdepth = numberingModule->depthSL->value();
}
- bp_.use_lineno = numberingModule->linenoGB->isChecked();
+ bp_.use_lineno = numberingModule->linenoCB->isChecked();
bp_.lineno_opts = fromqstr(numberingModule->linenoLE->text());
// bullets
@@ -3813,7 +3814,8 @@ void GuiDocument::paramsToDialog()
numberingModule->tocTW->clear();
}
- numberingModule->linenoGB->setChecked(bp_.use_lineno);
+ numberingModule->linenoCB->setChecked(bp_.use_lineno);
+ numberingModule->linenoLE->setEnabled(bp_.use_lineno);
numberingModule->linenoLE->setText(toqstr(bp_.lineno_opts));
// bullets
@@ -4943,6 +4945,13 @@ void GuiDocument::allPackages(int col)
}
+void GuiDocument::linenoToggled()
+{
+ numberingModule->linenoLE->setEnabled(numberingModule->linenoCB->isChecked());
+}
+
+
+
Dialog * createGuiDocument(GuiView & lv) { return new GuiDocument(lv); }
diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h
index 86c1686ce9..01fb0de0ef 100644
--- a/src/frontends/qt4/GuiDocument.h
+++ b/src/frontends/qt4/GuiDocument.h
@@ -161,6 +161,7 @@ private Q_SLOTS:
void moduleFilterPressed();
void moduleFilterChanged(const QString & text);
void resetModuleFilter();
+ void linenoToggled();
private:
/// validate listings parameters and return an error message, if any
QString validateListingsParameters();
diff --git a/src/frontends/qt4/ui/NumberingUi.ui b/src/frontends/qt4/ui/NumberingUi.ui
index bd9b1532c5..12b9657283 100644
--- a/src/frontends/qt4/ui/NumberingUi.ui
+++ b/src/frontends/qt4/ui/NumberingUi.ui
@@ -29,13 +29,32 @@
6
- -
-
-
-
- 1
-
-
+
-
+
+
-
+
+
+ L&ine numbering
+
+
+
+ -
+
+
+ Line numbering (lineno package) options. Please refer to the lineno package manual for details.
+
+
+
+
+
+ -
+
+
+ &List in Table of Contents
+
+
+ tocSL
+
-
@@ -54,6 +73,25 @@
+ -
+
+
+ &Numbering
+
+
+ depthSL
+
+
+
+ -
+
+
+
+ 1
+
+
+
+
-
@@ -70,67 +108,6 @@
- -
-
-
- &List in Table of Contents
-
-
- tocSL
-
-
-
- -
-
-
- &Numbering
-
-
- depthSL
-
-
-
- -
-
-
- true
-
-
- Add line numbers to the document
-
-
- L&ine numbering
-
-
- true
-
-
- true
-
-
- false
-
-
-
-
-
-
- Additional o&ptions:
-
-
- linenoLE
-
-
-
- -
-
-
- Line numbering (lineno package) options. Please refer to the lineno package manual for details.
-
-
-
-
-
-