]> git.lyx.org Git - features.git/commitdiff
Hartmut's patch to make the indexing command (makeindex) configurable.
authorAngus Leeming <leeming@lyx.org>
Tue, 5 Oct 2004 08:34:41 +0000 (08:34 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 5 Oct 2004 08:34:41 +0000 (08:34 +0000)
Plus tweaks to get the UI working.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9043 a592a061-630c-0410-9148-cb99ea01b6c8

12 files changed:
src/ChangeLog
src/LaTeX.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QPrefs.C
src/frontends/qt2/QPrefsDialog.C
src/frontends/qt2/ui/QPrefLatexModule.ui
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/forms/form_preferences.fd
src/lastfiles.h
src/lyxrc.C
src/lyxrc.h

index c31f3fc607ced7837806ac9961b40dca1f59761f..8031b23dfcaf4f02ab8c5de55476d8faea937db4 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-05  Hartmut Haase  <hha4491@atomstromfrei.de>
+
+       * LaTeX.C (runMakeIndex):
+       * lyxrc.[Ch] (read, write, getDescription): make the indexing command
+       (usually 'makeindex') configurable.
+
+       * lastfiles.h (maxlastfiles): define the maximum number of 'lastfiles'
+       with a variable rather than with a number.
+
 2004-09-27  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * output_latex.C (TeXOnePar): make sure font setting is the first
index 845fdc322dae602e293dda71d843b1550b84fcf0..419cdcacd021b597f3150cde2c3d029f0dd38295 100644 (file)
@@ -398,12 +398,7 @@ bool LaTeX::runMakeIndex(string const & f)
        lyxerr[Debug::LATEX] << "idx file has been made,"
                " running makeindex on file "
                             <<  f << endl;
-
-       // It should be possible to set the switches for makeindex
-       // sorting style and such. It would also be very convenient
-       // to be able to make style files from within LyX. This has
-       // to come for a later time.
-       string tmp = "makeindex -c -q ";
+        string tmp = lyxrc.index_command + " ";
        tmp += QuoteName(f);
        Systemcall one;
        one.startscript(Systemcall::Wait, tmp);
index ec99cafd3054f75da39da63d7fe6066149e1ff5f..faffcd3a412c7a48bd94c0389b669adbc5e2b185 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-05  Angus Leeming  <leeming@lyx.org>
+
+       * QPrefs.C, QPRefsDialog.C, ui/QPrefLatexModule.ui: add code to
+       input/output the indexing command (usually 'makeindex').
+
 2004-09-09  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * qfont_loader.C (addFontPath): quote the name of the font dir in
index 9321c805399dd2f3652e1386f559fb525a8a1700..60fff09415626fd80af7856f557990e52b73fa3d 100644 (file)
@@ -32,6 +32,7 @@
 #include "ui/QPrefIdentityModule.h"
 
 #include "debug.h"
+#include "lastfiles.h"
 #include "LColor.h"
 #include "lyxfont.h"
 
@@ -101,6 +102,8 @@ void QPrefs::build_dialog()
        bcview().setCancel(dialog_->closePB);
        bcview().setRestore(dialog_->restorePB);
 
+       dialog_->uiModule->lastfilesSB->setMaxValue(maxlastfiles);
+       
        QPrefLanguageModule * langmod(dialog_->languageModule);
 
        langmod->defaultLanguageCO->clear();
@@ -183,6 +186,7 @@ void QPrefs::apply()
        rc.fontenc = fromqstr(latexmod->latexEncodingED->text());
        rc.chktex_command = fromqstr(latexmod->latexChecktexED->text());
        rc.bibtex_command = fromqstr(latexmod->latexBibtexED->text());
+       rc.index_command = fromqstr(latexmod->latexIndexED->text());
        rc.auto_reset_options = latexmod->latexAutoresetCB->isChecked();
        rc.view_dvi_paper_option = fromqstr(latexmod->latexDviPaperED->text());
        rc.default_papersize =
@@ -502,6 +506,7 @@ void QPrefs::update_contents()
        latexmod->latexEncodingED->setText(toqstr(rc.fontenc));
        latexmod->latexChecktexED->setText(toqstr(rc.chktex_command));
        latexmod->latexBibtexED->setText(toqstr(rc.bibtex_command));
+       latexmod->latexIndexED->setText(toqstr(rc.index_command));
        latexmod->latexAutoresetCB->setChecked(rc.auto_reset_options);
        latexmod->latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
        latexmod->latexPaperSizeCO->setCurrentItem(rc.default_papersize);
index 51a491ceb6c99a189f2284f7b6c78a61e3a64aa0..3444fd1938cf70b75ec1ea238c35dd98d1f99be4 100644 (file)
@@ -205,6 +205,7 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
        connect(latexModule->latexEncodingED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(latexModule->latexChecktexED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(latexModule->latexBibtexED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
+       connect(latexModule->latexIndexED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(latexModule->latexAutoresetCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
        connect(latexModule->latexDviPaperED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(latexModule->latexPaperSizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
index 982fe96e693d93000dda8baa42223bf7afb5f7e6..24ece98f4bf203f22c9a3c5f1573bd8fd7ab83f5 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>372</width>
-            <height>237</height>
+            <width>371</width>
+            <height>350</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
         <string>LaTeX settings</string>
     </property>
-    <grid>
+    <widget>
+        <class>QLayoutWidget</class>
         <property stdset="1">
-            <name>margin</name>
-            <number>11</number>
+            <name>name</name>
+            <cstring>Layout3</cstring>
         </property>
         <property stdset="1">
-            <name>spacing</name>
-            <number>6</number>
+            <name>geometry</name>
+            <rect>
+                <x>10</x>
+                <y>10</y>
+                <width>348</width>
+                <height>315</height>
+            </rect>
         </property>
-        <widget row="0"  column="0" >
-            <class>QLayoutWidget</class>
+        <grid>
             <property stdset="1">
-                <name>name</name>
-                <cstring>Layout4</cstring>
+                <name>margin</name>
+                <number>0</number>
             </property>
-            <hbox>
+            <property stdset="1">
+                <name>spacing</name>
+                <number>6</number>
+            </property>
+            <spacer row="3"  column="0" >
+                <property>
+                    <name>name</name>
+                    <cstring>Spacer3</cstring>
+                </property>
                 <property stdset="1">
-                    <name>margin</name>
-                    <number>0</number>
+                    <name>orientation</name>
+                    <enum>Vertical</enum>
                 </property>
                 <property stdset="1">
-                    <name>spacing</name>
-                    <number>6</number>
+                    <name>sizeType</name>
+                    <enum>Expanding</enum>
+                </property>
+                <property>
+                    <name>sizeHint</name>
+                    <size>
+                        <width>20</width>
+                        <height>20</height>
+                    </size>
+                </property>
+            </spacer>
+            <widget row="1"  column="0" >
+                <class>QCheckBox</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>latexAutoresetCB</cstring>
+                </property>
+                <property stdset="1">
+                    <name>text</name>
+                    <string>&amp;Reset class options when document class changes</string>
+                </property>
+                <property>
+                    <name>toolTip</name>
+                    <string>Set class options to default on class change</string>
                 </property>
-                <widget>
-                    <class>QLayoutWidget</class>
+            </widget>
+            <widget row="2"  column="0" >
+                <class>QGroupBox</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>GroupBox3</cstring>
+                </property>
+                <property stdset="1">
+                    <name>title</name>
+                    <string>External Applications</string>
+                </property>
+                <grid>
                     <property stdset="1">
-                        <name>name</name>
-                        <cstring>Layout3</cstring>
+                        <name>margin</name>
+                        <number>11</number>
                     </property>
-                    <grid>
+                    <property stdset="1">
+                        <name>spacing</name>
+                        <number>6</number>
+                    </property>
+                    <widget row="0"  column="1" >
+                        <class>QLineEdit</class>
                         <property stdset="1">
-                            <name>margin</name>
-                            <number>0</number>
+                            <name>name</name>
+                            <cstring>latexChecktexED</cstring>
                         </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>CheckTeX start options and flags</string>
+                        </property>
+                    </widget>
+                    <widget row="0"  column="0" >
+                        <class>QLabel</class>
                         <property stdset="1">
-                            <name>spacing</name>
-                            <number>6</number>
+                            <name>name</name>
+                            <cstring>latexChecktexLA</cstring>
                         </property>
-                        <widget row="1"  column="1" >
-                            <class>QComboBox</class>
-                            <item>
-                                <property>
-                                    <name>text</name>
-                                    <string>Default</string>
+                        <property stdset="1">
+                            <name>text</name>
+                            <string>Chec&amp;kTeX command:</string>
+                        </property>
+                        <property>
+                            <name>buddy</name>
+                            <cstring>latexChecktexED</cstring>
+                        </property>
+                    </widget>
+                    <widget row="1"  column="1" >
+                        <class>QLineEdit</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>latexBibtexED</cstring>
+                        </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>BibTeX command and options</string>
+                        </property>
+                    </widget>
+                    <widget row="1"  column="0" >
+                        <class>QLabel</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>latexBibtexLA</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>text</name>
+                            <string>&amp;BibTeX command:</string>
+                        </property>
+                        <property>
+                            <name>buddy</name>
+                            <cstring>latexChecktexED</cstring>
+                        </property>
+                    </widget>
+                    <widget row="2"  column="1" >
+                        <class>QLineEdit</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>latexIndexED</cstring>
+                        </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>Index command and options (makeindex, xindy)</string>
+                        </property>
+                    </widget>
+                    <widget row="2"  column="0" >
+                        <class>QLabel</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>latexIndexLA</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>text</name>
+                            <string>Index command:</string>
+                        </property>
+                        <property>
+                            <name>buddy</name>
+                            <cstring>latexDviPaperED</cstring>
+                        </property>
+                    </widget>
+                    <widget row="3"  column="0" >
+                        <class>QLabel</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>latexDviPaperLA</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>text</name>
+                            <string>DVI viewer paper size options:</string>
+                        </property>
+                        <property>
+                            <name>buddy</name>
+                            <cstring>latexDviPaperED</cstring>
+                        </property>
+                    </widget>
+                    <widget row="3"  column="1" >
+                        <class>QLineEdit</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>latexDviPaperED</cstring>
+                        </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>Optional paper size flag (-paper) for some DVI viewers</string>
+                        </property>
+                    </widget>
+                </grid>
+            </widget>
+            <widget row="0"  column="0" >
+                <class>QLayoutWidget</class>
+                <property stdset="1">
+                    <name>name</name>
+                    <cstring>Layout4</cstring>
+                </property>
+                <hbox>
+                    <property stdset="1">
+                        <name>margin</name>
+                        <number>0</number>
+                    </property>
+                    <property stdset="1">
+                        <name>spacing</name>
+                        <number>6</number>
+                    </property>
+                    <widget>
+                        <class>QLayoutWidget</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>Layout3</cstring>
+                        </property>
+                        <grid>
+                            <property stdset="1">
+                                <name>margin</name>
+                                <number>0</number>
+                            </property>
+                            <property stdset="1">
+                                <name>spacing</name>
+                                <number>6</number>
+                            </property>
+                            <widget row="1"  column="1" >
+                                <class>QComboBox</class>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Default</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>US Letter</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Legal</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>Executive</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>A3</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>A4</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>A5</string>
+                                    </property>
+                                </item>
+                                <item>
+                                    <property>
+                                        <name>text</name>
+                                        <string>B5</string>
+                                    </property>
+                                </item>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>latexPaperSizeCO</cstring>
                                 </property>
-                            </item>
-                            <item>
-                                <property>
-                                    <name>text</name>
-                                    <string>US Letter</string>
+                            </widget>
+                            <widget row="0"  column="1" >
+                                <class>QLineEdit</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>latexEncodingED</cstring>
                                 </property>
-                            </item>
-                            <item>
-                                <property>
-                                    <name>text</name>
-                                    <string>Legal</string>
+                            </widget>
+                            <widget row="0"  column="0" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>latexEncodingLA</cstring>
                                 </property>
-                            </item>
-                            <item>
-                                <property>
+                                <property stdset="1">
                                     <name>text</name>
-                                    <string>Executive</string>
+                                    <string>Te&amp;X encoding:</string>
                                 </property>
-                            </item>
-                            <item>
                                 <property>
-                                    <name>text</name>
-                                    <string>A3</string>
+                                    <name>buddy</name>
+                                    <cstring>latexEncodingED</cstring>
                                 </property>
-                            </item>
-                            <item>
-                                <property>
-                                    <name>text</name>
-                                    <string>A4</string>
+                            </widget>
+                            <widget row="1"  column="0" >
+                                <class>QLabel</class>
+                                <property stdset="1">
+                                    <name>name</name>
+                                    <cstring>latexPaperSizeLA</cstring>
                                 </property>
-                            </item>
-                            <item>
-                                <property>
+                                <property stdset="1">
                                     <name>text</name>
-                                    <string>A5</string>
+                                    <string>Default paper si&amp;ze:</string>
                                 </property>
-                            </item>
-                            <item>
                                 <property>
-                                    <name>text</name>
-                                    <string>B5</string>
+                                    <name>buddy</name>
+                                    <cstring>latexPaperSizeCO</cstring>
                                 </property>
-                            </item>
-                            <property stdset="1">
-                                <name>name</name>
-                                <cstring>latexPaperSizeCO</cstring>
-                            </property>
-                        </widget>
-                        <widget row="0"  column="1" >
-                            <class>QLineEdit</class>
-                            <property stdset="1">
-                                <name>name</name>
-                                <cstring>latexEncodingED</cstring>
-                            </property>
-                        </widget>
-                        <widget row="0"  column="0" >
-                            <class>QLabel</class>
-                            <property stdset="1">
-                                <name>name</name>
-                                <cstring>latexEncodingLA</cstring>
-                            </property>
-                            <property stdset="1">
-                                <name>text</name>
-                                <string>Te&amp;X encoding:</string>
-                            </property>
-                            <property>
-                                <name>buddy</name>
-                                <cstring>latexEncodingED</cstring>
-                            </property>
-                        </widget>
-                        <widget row="1"  column="0" >
-                            <class>QLabel</class>
-                            <property stdset="1">
-                                <name>name</name>
-                                <cstring>latexPaperSizeLA</cstring>
-                            </property>
-                            <property stdset="1">
-                                <name>text</name>
-                                <string>Default paper si&amp;ze:</string>
-                            </property>
-                            <property>
-                                <name>buddy</name>
-                                <cstring>latexPaperSizeCO</cstring>
-                            </property>
-                        </widget>
-                    </grid>
-                </widget>
-                <spacer>
-                    <property>
-                        <name>name</name>
-                        <cstring>Spacer4</cstring>
-                    </property>
-                    <property stdset="1">
-                        <name>orientation</name>
-                        <enum>Horizontal</enum>
-                    </property>
-                    <property stdset="1">
-                        <name>sizeType</name>
-                        <enum>Expanding</enum>
-                    </property>
-                    <property>
-                        <name>sizeHint</name>
-                        <size>
-                            <width>20</width>
-                            <height>20</height>
-                        </size>
-                    </property>
-                </spacer>
-            </hbox>
-        </widget>
-        <widget row="1"  column="0" >
-            <class>QCheckBox</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>latexAutoresetCB</cstring>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Reset class options when document class changes</string>
-            </property>
-            <property>
-                <name>toolTip</name>
-                <string>Set class options to default on class change</string>
-            </property>
-        </widget>
-        <spacer row="3"  column="0" >
-            <property>
-                <name>name</name>
-                <cstring>Spacer3</cstring>
-            </property>
-            <property stdset="1">
-                <name>orientation</name>
-                <enum>Vertical</enum>
-            </property>
-            <property stdset="1">
-                <name>sizeType</name>
-                <enum>Expanding</enum>
-            </property>
-            <property>
-                <name>sizeHint</name>
-                <size>
-                    <width>20</width>
-                    <height>20</height>
-                </size>
-            </property>
-        </spacer>
-        <widget row="2"  column="0" >
-            <class>QGroupBox</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>GroupBox3</cstring>
-            </property>
-            <property stdset="1">
-                <name>title</name>
-                <string>External Applications</string>
-            </property>
-            <grid>
-                <property stdset="1">
-                    <name>margin</name>
-                    <number>11</number>
-                </property>
-                <property stdset="1">
-                    <name>spacing</name>
-                    <number>6</number>
-                </property>
-                <widget row="2"  column="0" >
-                    <class>QLabel</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>latexDviPaperLA</cstring>
-                    </property>
-                    <property stdset="1">
-                        <name>text</name>
-                        <string>DVI viewer paper size options:</string>
-                    </property>
-                    <property>
-                        <name>buddy</name>
-                        <cstring>latexDviPaperED</cstring>
-                    </property>
-                </widget>
-                <widget row="2"  column="1" >
-                    <class>QLineEdit</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>latexDviPaperED</cstring>
-                    </property>
-                    <property>
-                        <name>toolTip</name>
-                        <string>Optional paper size flag (-paper) for some DVI viewers</string>
-                    </property>
-                </widget>
-                <widget row="0"  column="1" >
-                    <class>QLineEdit</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>latexChecktexED</cstring>
-                    </property>
-                    <property>
-                        <name>toolTip</name>
-                        <string>CheckTeX start options and flags</string>
-                    </property>
-                </widget>
-                <widget row="0"  column="0" >
-                    <class>QLabel</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>latexChecktexLA</cstring>
-                    </property>
-                    <property stdset="1">
-                        <name>text</name>
-                        <string>Chec&amp;kTeX command:</string>
-                    </property>
-                    <property>
-                        <name>buddy</name>
-                        <cstring>latexChecktexED</cstring>
-                    </property>
-                </widget>
-                <widget row="1"  column="1" >
-                    <class>QLineEdit</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>latexBibtexED</cstring>
-                    </property>
-                    <property>
-                        <name>toolTip</name>
-                        <string>BibTeX command and options</string>
-                    </property>
-                </widget>
-                <widget row="1"  column="0" >
-                    <class>QLabel</class>
-                    <property stdset="1">
-                        <name>name</name>
-                        <cstring>latexChecktexLA_2</cstring>
-                    </property>
-                    <property stdset="1">
-                        <name>text</name>
-                        <string>&amp;BibTeX command:</string>
-                    </property>
-                    <property>
-                        <name>buddy</name>
-                        <cstring>latexChecktexED</cstring>
-                    </property>
-                </widget>
-            </grid>
-        </widget>
-    </grid>
+                            </widget>
+                        </grid>
+                    </widget>
+                    <spacer>
+                        <property>
+                            <name>name</name>
+                            <cstring>Spacer4</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>orientation</name>
+                            <enum>Horizontal</enum>
+                        </property>
+                        <property stdset="1">
+                            <name>sizeType</name>
+                            <enum>Expanding</enum>
+                        </property>
+                        <property>
+                            <name>sizeHint</name>
+                            <size>
+                                <width>20</width>
+                                <height>20</height>
+                            </size>
+                        </property>
+                    </spacer>
+                </hbox>
+            </widget>
+        </grid>
+    </widget>
 </widget>
 <tabstops>
     <tabstop>latexEncodingED</tabstop>
index 3f26b24dc432b4711f40d384d7832d292ad04f38..4f307eebdf3e87b88ba7a10fb0f53bda51d1369c 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-05  Angus Leeming  <leeming@lyx.org>
+
+       * FormPreferences.C: add code to input/output the indexing command.
+
+2004-10-05  Hartmut Haase  <hha4491@atomstromfrei.de>
+
+       * forms/form_preferences.fd: add widgets to enable the indexing command
+       (usually 'makeindex') to be input.
+
 2004-09-26  Lars Gullik Bjonnes  <larsbj@gullik.net>
 
        * pch.h: use proper signal include
index a0761a28e25efaa6364f0a55f81c7a76d2c121fa..a4eaeea4e002ebdbf8e1e0a16a29be47aaecb3e6 100644 (file)
@@ -24,6 +24,7 @@
 #include "controllers/helper_funcs.h" // getSecond
 
 #include "buffer.h"
+#include "lastfiles.h"
 #include "LColor.h"
 #include "lyxfont.h"
 
@@ -1775,6 +1776,7 @@ void FormPreferences::OutputsMisc::apply(LyXRC & rc) const
        rc.ascii_roff_command = fl_get_input(dialog_->input_ascii_roff);
        rc.chktex_command = fl_get_input(dialog_->input_checktex);
        rc.bibtex_command = fl_get_input(dialog_->input_bibtex);
+       rc.index_command = fl_get_input(dialog_->input_index);
        rc.view_dvi_paper_option = fl_get_input(dialog_->input_paperoption);
        rc.auto_reset_options = fl_get_button(dialog_->check_autoreset_classopt);
 }
@@ -1789,7 +1791,9 @@ void FormPreferences::OutputsMisc::build()
        fl_set_counter_return(dialog_->counter_line_len, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_tex_encoding, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_ascii_roff,   FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->input_bibtex,       FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_checktex,     FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->input_index,        FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_paperoption,  FL_RETURN_CHANGED);
 
        fl_addto_choice(dialog_->choice_default_papersize,
@@ -1801,7 +1805,9 @@ void FormPreferences::OutputsMisc::build()
        setPrehandler(dialog_->input_tex_encoding);
        setPrehandler(dialog_->choice_default_papersize);
        setPrehandler(dialog_->input_ascii_roff);
+       setPrehandler(dialog_->input_bibtex);
        setPrehandler(dialog_->input_checktex);
+       setPrehandler(dialog_->input_index);
        setPrehandler(dialog_->input_paperoption);
        setPrehandler(dialog_->check_autoreset_classopt);
 }
@@ -1816,8 +1822,12 @@ FormPreferences::OutputsMisc::feedback(FL_OBJECT const * const ob) const
                return LyXRC::getDescription(LyXRC::RC_FONT_ENCODING);
        if (ob == dialog_->input_ascii_roff)
                return LyXRC::getDescription(LyXRC::RC_ASCIIROFF_COMMAND);
+       if (ob == dialog_->input_bibtex)
+               return LyXRC::getDescription(LyXRC::RC_BIBTEX_COMMAND);
        if (ob == dialog_->input_checktex)
                return LyXRC::getDescription(LyXRC::RC_CHKTEX_COMMAND);
+       if (ob == dialog_->input_index)
+               return LyXRC::getDescription(LyXRC::RC_INDEX_COMMAND);
        if (ob == dialog_->choice_default_papersize)
                return LyXRC::getDescription(LyXRC::RC_DEFAULT_PAPERSIZE);
        if (ob == dialog_->input_paperoption)
@@ -1842,6 +1852,8 @@ void FormPreferences::OutputsMisc::update(LyXRC const & rc)
                     rc.chktex_command.c_str());
        fl_set_input(dialog_->input_bibtex,
                     rc.bibtex_command.c_str());
+       fl_set_input(dialog_->input_index,
+                    rc.index_command.c_str());
        fl_set_input(dialog_->input_paperoption,
                     rc.view_dvi_paper_option.c_str());
        fl_set_button(dialog_->check_autoreset_classopt,
@@ -1900,6 +1912,7 @@ void FormPreferences::Paths::build()
        fl_set_input_return(dialog_->input_temp_dir, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_lastfiles, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_backup_path, FL_RETURN_CHANGED);
+       fl_set_counter_bounds(dialog_->counter_lastfiles, 0, maxlastfiles);
        fl_set_counter_return(dialog_->counter_lastfiles, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_serverpipe, FL_RETURN_CHANGED);
 
index fcb2f2f7d2c1c75158990a16012c618505a235c7..94855b4da08bfba72632cdc63d856df151aa39b0 100644 (file)
@@ -10,13 +10,13 @@ SnapGrid: 5
 =============== FORM ===============
 Name: form_preferences
 Width: 470
-Height: 500
+Height: 600
 Number of Objects: 8
 
 --------------------
 class: FL_BOX
 type: UP_BOX
-box: 0 0 470 500
+box: 0 0 470 600
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -34,7 +34,7 @@ argument:
 --------------------
 class: FL_TABFOLDER
 type: TOP_TABFOLDER
-box: 5 10 455 375
+box: 5 10 455 475
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
@@ -52,7 +52,7 @@ argument:
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 5 390 100 30
+box: 5 490 100 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -70,7 +70,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: RETURN_BUTTON
-box: 170 390 90 30
+box: 170 490 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -88,7 +88,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 270 390 90 30
+box: 270 490 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -106,7 +106,7 @@ argument: 0
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 370 390 90 30
+box: 370 490 90 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -124,7 +124,7 @@ argument: 0
 --------------------
 class: FL_FRAME
 type: ENGRAVED_FRAME
-box: 0 425 470 1
+box: 0 525 470 1
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -142,7 +142,7 @@ argument:
 --------------------
 class: FL_TEXT
 type: NORMAL_TEXT
-box: 5 430 460 70
+box: 5 530 460 70
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
@@ -160,13 +160,13 @@ argument:
 =============== FORM ===============
 Name: form_preferences_inner_tab
 Width: 455
-Height: 375
+Height: 475
 Number of Objects: 2
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 455 375
+box: 0 0 455 475
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -184,7 +184,7 @@ argument:
 --------------------
 class: FL_TABFOLDER
 type: TOP_TABFOLDER
-box: 0 0 455 375
+box: 0 0 455 475
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
@@ -2241,7 +2241,7 @@ gravity: FL_NoGravity FL_NoGravity
 name: counter_lastfiles
 callback: C_FormDialogView_InputCB
 argument: 0
-  bounds: 0 9
+  bounds: 0 20
   precision: 0
   value: 4
   sstep: 1
@@ -2766,13 +2766,13 @@ argument:
 =============== FORM ===============
 Name: form_preferences_outputs_misc
 Width: 455
-Height: 375
-Number of Objects: 11
+Height: 400
+Number of Objects: 12
 
 --------------------
 class: FL_BOX
 type: FLAT_BOX
-box: 0 0 455 375
+box: 0 0 455 400
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -2866,7 +2866,7 @@ argument: 0
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 10 190 435 165
+box: 10 190 435 200
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
@@ -2920,7 +2920,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 145 310 285 30
+box: 145 275 285 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -2956,7 +2956,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 145 275 285 30
+box: 145 310 285 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -2971,5 +2971,23 @@ name: input_bibtex
 callback: C_FormDialogView_InputCB
 argument: 0
 
+--------------------
+class: FL_INPUT
+type: NORMAL_INPUT
+box: 145 345 285 30
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Index:|#I
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: input_index
+callback: C_FormDialogView_InputCB
+argument: 0
+
 ==============================
 create_the_forms
index e053af70591fec723bb3157bf20fbbdcf7afced7..fe4f1c0dec539e80a237bd7a8903399a5faa57a0 100644 (file)
@@ -17,6 +17,7 @@
 #include <deque>
 #include <string>
 
+const long maxlastfiles = 20;
 
 /** The latest documents loaded.
     This class takes care of the last .lyx files used by the LyX user. It
index e78189949d8146c3be6e39c1c73c6d8751126fa4..71a5c8967bf8aaeae20752c5464de1340f81f2ab 100644 (file)
@@ -25,6 +25,7 @@
 #include "converter.h"
 #include "format.h"
 #include "gettext.h"
+#include "lastfiles.h"
 #include "LColor.h"
 #include "lyxlex.h"
 #include "lyxfont.h"
@@ -37,6 +38,7 @@
 #include "support/userinfo.h"
 
 using lyx::support::ascii_lowercase;
+using lyx::support::bformat;
 using lyx::support::ExpandPath;
 using lyx::support::GetEnv;
 using lyx::support::LibFileSearch;
@@ -81,6 +83,7 @@ keyword_item lyxrcTags[] = {
        { "\\escape_chars", LyXRC::RC_ESC_CHARS },
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
        { "\\format", LyXRC::RC_FORMAT },
+        { "\\index_command", LyXRC::RC_INDEX_COMMAND },
        { "\\input", LyXRC::RC_INPUT },
        { "\\kbmap", LyXRC::RC_KBMAP },
        { "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
@@ -204,6 +207,7 @@ void LyXRC::setDefaults() {
        chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
        bibtex_command = "bibtex";
        fontenc = "default";
+        index_command = "makeindex -c -q";
        dpi = 75;
        // Because a screen typically is wider than a piece of paper:
        zoom = 150;
@@ -232,7 +236,7 @@ void LyXRC::setDefaults() {
        auto_region_delete = true;
        auto_reset_options = false;
        ascii_linelen = 65;
-       num_lastfiles = 4;
+       num_lastfiles = maxlastfiles;
        check_lastfiles = true;
        make_backup = true;
        backupdir_path.erase();
@@ -584,6 +588,12 @@ int LyXRC::read(LyXLex & lexrc)
                        }
                        break;
 
+                case RC_INDEX_COMMAND:
+                        if (lexrc.next()) {
+                                index_command = lexrc.getString();
+                        }
+                        break;
+
                case RC_SCREEN_DPI:
                        if (lexrc.next()) {
                                dpi = lexrc.getInteger();
@@ -1244,6 +1254,11 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
                    bibtex_command != system_lyxrc.bibtex_command) {
                        os << "\\bibtex_command \"" << bibtex_command << "\"\n";
                }
+        case RC_INDEX_COMMAND:
+                if (ignore_system_lyxrc ||
+                    index_command != system_lyxrc.index_command) {
+                        os << "\\index_command \"" << index_command << "\"\n";
+                }
        case RC_KBMAP:
                if (ignore_system_lyxrc ||
                    use_kbmap != system_lyxrc.use_kbmap) {
@@ -2099,7 +2114,7 @@ string const LyXRC::getDescription(LyXRCTags tag)
                break;
 
        case RC_NUMLASTFILES:
-               str = _("Maximal number of lastfiles. Up to 9 can appear in the file menu.");
+               str = bformat(_("Maximal number of lastfiles. Up to %1$s can appear in the file menu."), tostr(maxlastfiles));
                break;
 
        case RC_CHECKLASTFILES:
@@ -2150,7 +2165,11 @@ string const LyXRC::getDescription(LyXRCTags tag)
                break;
 
        case RC_BIBTEX_COMMAND:
-               str = _("Define the options of bibtex (cf. man bibtex) or select and alternative compiler (e.g. mlbibtex or bibulus).");
+               str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
+               break;
+
+        case RC_INDEX_COMMAND:
+                str = _("Define the options of makeindex (cf. man makeindex) or select an alternative compiler (e.g. xindy).");
                break;
 
        case RC_CURSOR_FOLLOWS_SCROLLBAR:
index e948e6489fcf8ec6ae1b56988da30fe1b677f23b..1f1723e427ec2c323dffad674085db8255738e74 100644 (file)
@@ -131,6 +131,7 @@ enum LyXRCTags {
        RC_USE_SPELL_LIB,
        RC_USER_NAME,
        RC_USER_EMAIL,
+        RC_INDEX_COMMAND,
        RC_LAST
 };
 
@@ -209,6 +210,8 @@ public:
        std::string chktex_command;
        /// command to run bibtex incl. options
        std::string bibtex_command;
+        /// command to run makeindex incl. options or other index programs
+        std::string index_command;
        ///
        std::string document_path;
        ///