attached patch moves the "use windows-style latex paths" to the latex
tab in the preferences dialog.
affects windows and cygwin (i.e. linux wannabes such as enrico)
comments/opinions?
Index: src/frontends/qt4/Makefile.am
===================================================================
--- src/frontends/qt4/Makefile.am (revision 19919)
+++ src/frontends/qt4/Makefile.am (working copy)
@@ -250,7 +250,6 @@
PrefColorsUi.ui \
PrefConvertersUi.ui \
PrefCopiersUi.ui \
- PrefCygwinPathUi.ui \
PrefDateUi.ui \
PrefDisplayUi.ui \
PrefFileformatsUi.ui \
Index: src/frontends/qt4/QPrefs.cpp
===================================================================
--- src/frontends/qt4/QPrefs.cpp (revision 19919)
+++ src/frontends/qt4/QPrefs.cpp (working copy)
@@ -312,6 +312,14 @@
this, SIGNAL(changed()));
connect(latexPaperSizeCO, SIGNAL(activated(int)),
this, SIGNAL(changed()));
+ connect(pathCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+
+#if defined(__CYGWIN__) || defined(_WIN32)
+ pathCB->setVisible(true);
+#else
+ pathCB->setVisible(false);
+#endif
}
@@ -325,6 +333,7 @@
rc.view_dvi_paper_option = fromqstr(latexDviPaperED->text());
rc.default_papersize =
form_->controller().toPaperSize(latexPaperSizeCO->currentIndex());
+ rc.windows_style_tex_paths = pathCB->isChecked();
}
@@ -338,6 +347,7 @@
latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
latexPaperSizeCO->setCurrentIndex(
form_->controller().fromPaperSize(rc.default_papersize));
+ pathCB->setChecked(rc.windows_style_tex_paths);
}
@@ -602,32 +612,6 @@
/////////////////////////////////////////////////////////////////////
//
-// PrefCygwinPath
-//
-/////////////////////////////////////////////////////////////////////
-
-PrefCygwinPath::PrefCygwinPath(QWidget * parent)
- : PrefModule(_("Paths"), 0, parent)
-{
- setupUi(this);
- connect(pathCB, SIGNAL(clicked()), this, SIGNAL(changed()));
-}
-
-
-void PrefCygwinPath::apply(LyXRC & rc) const
-{
- rc.windows_style_tex_paths = pathCB->isChecked();
-}
-
-
-void PrefCygwinPath::update(LyXRC const & rc)
-{
- pathCB->setChecked(rc.windows_style_tex_paths);
-}
-
-
-/////////////////////////////////////////////////////////////////////
-//
// PrefDisplay
//
/////////////////////////////////////////////////////////////////////
@@ -1940,11 +1924,6 @@
add(new PrefPlaintext);
add(new PrefLatex(form_));
-#if defined(__CYGWIN__) || defined(_WIN32)
- add(new PrefCygwinPath);
-#endif
-
-
PrefConverters * converters = new PrefConverters(form_);
PrefFileformats * formats = new PrefFileformats(form_);
connect(formats, SIGNAL(formatsChanged()),
Index: src/frontends/qt4/QPrefs.h
===================================================================
--- src/frontends/qt4/QPrefs.h (revision 19919)
+++ src/frontends/qt4/QPrefs.h (working copy)
@@ -30,7 +30,6 @@
#include "ui_PrefLatexUi.h"
#include "ui_PrefScreenFontsUi.h"
#include "ui_PrefColorsUi.h"
-#include "ui_PrefCygwinPathUi.h"
#include "ui_PrefDisplayUi.h"
#include "ui_PrefPathsUi.h"
#include "ui_PrefSpellcheckerUi.h"
@@ -167,17 +166,6 @@
};
-class PrefCygwinPath : public PrefModule, public Ui::QPrefCygwinPathUi
-{
- Q_OBJECT
-public:
- PrefCygwinPath(QWidget * parent = 0);
-
- void apply(LyXRC & rc) const;
- void update(LyXRC const & rc);
-};
-
-
class PrefDisplay : public PrefModule, public Ui::QPrefDisplayUi
{
Q_OBJECT
Index: src/frontends/qt4/ui/compile_uic.sh
===================================================================
--- src/frontends/qt4/ui/compile_uic.sh (revision 19919)
+++ src/frontends/qt4/ui/compile_uic.sh (working copy)
@@ -34,7 +34,6 @@
uic PrefColorsUi.ui -o PrefColorsUi.h
uic PrefConvertersUi.ui -o PrefConvertersUi.h
uic PrefCopiersUi.ui -o PrefCopiersUi.h
-uic PrefCygwinPathUi.ui -o PrefCygwinPathUi.h
uic PrefDateUi.ui -o PrefDateUi.h
uic PrefDisplayUi.ui -o PrefDisplayUi.h
uic PrefFileformatsUi.ui -o PrefFileformatsUi.h
Index: src/frontends/qt4/ui/PrefCygwinPathUi.ui
===================================================================
--- src/frontends/qt4/ui/PrefCygwinPathUi.ui (revision 19919)
+++ src/frontends/qt4/ui/PrefCygwinPathUi.ui (working copy)
@@ -1,58 +0,0 @@
-<ui version="4.0" >
- <class>QPrefCygwinPathUi</class>
- <widget class="QWidget" name="QPrefCygwinPathUi" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>275</width>
- <height>91</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string/>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="1" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="pathCB" >
- <property name="enabled" >
- <bool>true</bool>
- </property>
- <property name="toolTip" >
- <string/>
- </property>
- <property name="whatsThis" >
- <string>Select if LyX should output Windows-style paths rather than Posix-style paths to LaTeX files. Useful if you're using the native Windows MikTeX rather than the Cygwin teTeX.</string>
- </property>
- <property name="text" >
- <string>&Use Windows-style paths in LaTeX files</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <includes>
- <include location="local" >qt_helpers.h</include>
- </includes>
- <resources/>
- <connections/>
-</ui>
Index: src/frontends/qt4/ui/PrefLatexUi.ui
===================================================================
--- src/frontends/qt4/ui/PrefLatexUi.ui (revision 19919)
+++ src/frontends/qt4/ui/PrefLatexUi.ui (working copy)
@@ -1,7 +1,4 @@
<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
<class>QPrefLatexUi</class>
<widget class="QWidget" name="QPrefLatexUi" >
<property name="geometry" >
@@ -9,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>427</width>
- <height>285</height>
+ <height>298</height>
</rect>
</property>
<property name="windowTitle" >
@@ -22,7 +19,7 @@
<property name="spacing" >
<number>6</number>
</property>
- <item row="2" column="0" colspan="3" >
+ <item row="3" column="0" colspan="3" >
<widget class="QCheckBox" name="latexAutoresetCB" >
<property name="toolTip" >
<string>Set class options to default on class change</string>
@@ -32,7 +29,7 @@
</property>
</widget>
</item>
- <item row="4" column="0" colspan="3" >
+ <item row="5" column="0" colspan="3" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
@@ -48,90 +45,23 @@
</property>
</spacer>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="latexPaperSizeLA" >
- <property name="text" >
- <string>Default paper si&ze:</string>
+ <item row="4" column="0" colspan="3" >
+ <widget class="QCheckBox" name="pathCB" >
+ <property name="enabled" >
+ <bool>true</bool>
</property>
- <property name="buddy" >
- <cstring>latexPaperSizeCO</cstring>
+ <property name="toolTip" >
+ <string/>
</property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="latexEncodingLA" >
+ <property name="whatsThis" >
+ <string>Select if LyX should output Windows-style paths rather than Posix-style paths to LaTeX files. Useful if you're using the native Windows MikTeX rather than the Cygwin teTeX.</string>
+ </property>
<property name="text" >
- <string>Te&X encoding:</string>
+ <string>&Use Windows-style paths in LaTeX files</string>
</property>
- <property name="buddy" >
- <cstring>latexEncodingED</cstring>
- </property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="latexEncodingED" />
- </item>
- <item row="1" column="1" >
- <widget class="QComboBox" name="latexPaperSizeCO" >
- <item>
- <property name="text" >
- <string>Default</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>US letter</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>US legal</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>US executive</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>A3</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>A4</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>A5</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>B5</string>
- </property>
- </item>
- </widget>
- </item>
- <item rowspan="2" row="0" column="2" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>178</width>
- <height>54</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="0" colspan="3" >
+ <item row="2" column="0" colspan="3" >
<widget class="QGroupBox" name="GroupBox3" >
<property name="title" >
<string>External Applications</string>
@@ -150,20 +80,20 @@
</property>
</widget>
</item>
- <item row="0" column="0" >
- <widget class="QLabel" name="latexChecktexLA" >
+ <item row="2" column="0" >
+ <widget class="QLabel" name="latexIndexLA" >
<property name="text" >
- <string>Chec&kTeX command:</string>
+ <string>Index command:</string>
</property>
<property name="buddy" >
- <cstring>latexChecktexED</cstring>
+ <cstring>latexDviPaperED</cstring>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="latexBibtexED" >
+ <item row="3" column="1" >
+ <widget class="QLineEdit" name="latexDviPaperED" >
<property name="toolTip" >
- <string>BibTeX command and options</string>
+ <string>Optional paper size flag (-paper) for some DVI viewers</string>
</property>
</widget>
</item>
@@ -177,56 +107,141 @@
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="latexIndexED" >
- <property name="toolTip" >
- <string>Index command and options (makeindex, xindy)</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="latexIndexLA" >
+ <item row="3" column="0" >
+ <widget class="QLabel" name="latexDviPaperLA" >
<property name="text" >
- <string>Index command:</string>
+ <string>DVI viewer paper size options:</string>
</property>
<property name="buddy" >
<cstring>latexDviPaperED</cstring>
</property>
</widget>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="latexDviPaperLA" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="latexChecktexLA" >
<property name="text" >
- <string>DVI viewer paper size options:</string>
+ <string>Chec&kTeX command:</string>
</property>
<property name="buddy" >
- <cstring>latexDviPaperED</cstring>
+ <cstring>latexChecktexED</cstring>
</property>
</widget>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="latexDviPaperED" >
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="latexBibtexED" >
<property name="toolTip" >
- <string>Optional paper size flag (-paper) for some DVI viewers</string>
+ <string>BibTeX command and options</string>
</property>
</widget>
</item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="latexIndexED" >
+ <property name="toolTip" >
+ <string>Index command and options (makeindex, xindy)</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
+ <item rowspan="2" row="0" column="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>178</width>
+ <height>54</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QComboBox" name="latexPaperSizeCO" >
+ <item>
+ <property name="text" >
+ <string>Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>US letter</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>US legal</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>US executive</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>A3</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>A4</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>A5</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>B5</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="latexEncodingED" />
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="latexEncodingLA" >
+ <property name="text" >
+ <string>Te&X encoding:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>latexEncodingED</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="latexPaperSizeLA" >
+ <property name="text" >
+ <string>Default paper si&ze:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>latexPaperSizeCO</cstring>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
- <pixmapfunction></pixmapfunction>
- <includes>
- <include location="local" >qt_helpers.h</include>
- </includes>
<tabstops>
<tabstop>latexEncodingED</tabstop>
<tabstop>latexPaperSizeCO</tabstop>
- <tabstop>latexAutoresetCB</tabstop>
<tabstop>latexChecktexED</tabstop>
+ <tabstop>latexBibtexED</tabstop>
+ <tabstop>latexIndexED</tabstop>
<tabstop>latexDviPaperED</tabstop>
+ <tabstop>latexAutoresetCB</tabstop>
+ <tabstop>pathCB</tabstop>
</tabstops>
+ <includes>
+ <include location="local" >qt_helpers.h</include>
+ </includes>
<resources/>
<connections/>
</ui>