]> git.lyx.org Git - features.git/commitdiff
get rid of (cyg)win path panel in prefs by moving it to the latex panel
authorEdwin Leuven <e.leuven@gmail.com>
Sun, 2 Sep 2007 20:17:36 +0000 (20:17 +0000)
committerEdwin Leuven <e.leuven@gmail.com>
Sun, 2 Sep 2007 20:17:36 +0000 (20:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20013 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiPrefs.cpp
src/frontends/qt4/GuiPrefs.h
src/frontends/qt4/Makefile.am
src/frontends/qt4/ui/PrefCygwinPathUi.ui [deleted file]
src/frontends/qt4/ui/PrefLatexUi.ui
src/frontends/qt4/ui/compile_uic.sh

index 78dc1c64af37f6da788b73e499c9accfd9560af7..8ba269eb3963ca1608c11dd1fecf562f122a99dc 100644 (file)
@@ -312,6 +312,15 @@ PrefLatex::PrefLatex(GuiPrefs * form, QWidget * parent)
                this, SIGNAL(changed()));
        connect(latexPaperSizeCO, SIGNAL(activated(int)),
                this, SIGNAL(changed()));
+
+#if defined(__CYGWIN__) || defined(_WIN32)
+       pathCB->setVisible(true);
+       connect(pathCB, SIGNAL(clicked()), 
+               this, SIGNAL(changed()));
+#else
+       pathCB->setVisible(false);
+#endif
+
 }
 
 
@@ -325,6 +334,9 @@ void PrefLatex::apply(LyXRC & rc) const
        rc.view_dvi_paper_option = fromqstr(latexDviPaperED->text());
        rc.default_papersize =
                form_->controller().toPaperSize(latexPaperSizeCO->currentIndex());
+#if defined(__CYGWIN__) || defined(_WIN32)
+       rc.windows_style_tex_paths = pathCB->isChecked();
+#endif
 }
 
 
@@ -338,6 +350,9 @@ void PrefLatex::update(LyXRC const & rc)
        latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
        latexPaperSizeCO->setCurrentIndex(
                form_->controller().fromPaperSize(rc.default_papersize));
+#if defined(__CYGWIN__) || defined(_WIN32)
+       pathCB->setChecked(rc.windows_style_tex_paths);
+#endif
 }
 
 
@@ -600,32 +615,6 @@ void PrefColors::change_lyxObjects_selection()
 }
 
 
-/////////////////////////////////////////////////////////////////////
-//
-// 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
@@ -948,7 +937,7 @@ PrefConverters::PrefConverters(GuiPrefs * form, QWidget * parent)
                this, SIGNAL(changed()));
 
        maxAgeLE->setValidator(new QDoubleValidator(maxAgeLE));
-       converterDefGB->setFocusProxy(convertersLW);
+       //converterDefGB->setFocusProxy(convertersLW);
 }
 
 
@@ -1940,11 +1929,6 @@ GuiPrefsDialog::GuiPrefsDialog(GuiPrefs * form)
        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 00dd244292e323831ff85f23e5cf34f0c5fa6c42..428c9287fe9c02357dcebd157e140d3766e07f77 100644 (file)
@@ -25,7 +25,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"
@@ -166,17 +165,6 @@ private:
 };
 
 
-class PrefCygwinPath :  public PrefModule, public Ui::PrefCygwinPathUi
-{
-       Q_OBJECT
-public:
-       PrefCygwinPath(QWidget * parent = 0);
-
-       void apply(LyXRC & rc) const;
-       void update(LyXRC const & rc);
-};
-
-
 class PrefDisplay :  public PrefModule, public Ui::PrefDisplayUi
 {
        Q_OBJECT
index 0c532fdd87a3c65783860cac382d0876e76343c7..ccf241fa05915a843ea62dce05a8ba48f116356b 100644 (file)
@@ -242,7 +242,6 @@ UIFILES = \
        PrefColorsUi.ui \
        PrefConvertersUi.ui \
        PrefCopiersUi.ui \
-       PrefCygwinPathUi.ui \
        PrefDateUi.ui \
        PrefDisplayUi.ui \
        PrefFileformatsUi.ui \
diff --git a/src/frontends/qt4/ui/PrefCygwinPathUi.ui b/src/frontends/qt4/ui/PrefCygwinPathUi.ui
deleted file mode 100644 (file)
index f0e807f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<ui version="4.0" >
- <class>PrefCygwinPathUi</class>
- <widget class="QWidget" name="PrefCygwinPathUi" >
-  <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>&amp;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 c3f81bfb3267fedf9f5a90d6bcaa4bf606996c8d..a70b74e445ac2b0326a7da3a1aadd058bea7164a 100644 (file)
@@ -6,7 +6,7 @@
     <x>0</x>
     <y>0</y>
     <width>427</width>
-    <height>285</height>
+    <height>308</height>
    </rect>
   </property>
   <property name="windowTitle" >
@@ -19,7 +19,7 @@
    <property name="spacing" >
     <number>6</number>
    </property>
-   <item row="2" column="0" colspan="3" >
+   <item row="7" column="0" colspan="3" >
     <widget class="QCheckBox" name="latexAutoresetCB" >
      <property name="toolTip" >
       <string>Set class options to default on class change</string>
@@ -29,7 +29,7 @@
      </property>
     </widget>
    </item>
-   <item row="4" column="0" colspan="3" >
+   <item row="8" column="0" colspan="3" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Vertical</enum>
      <property name="sizeHint" >
       <size>
        <width>409</width>
-       <height>75</height>
+       <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
+   <item row="6" column="0" colspan="3" >
+    <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="layoutDirection" >
+      <enum>Qt::LeftToRight</enum>
+     </property>
+     <property name="text" >
+      <string>&amp;Use Windows-style paths in LaTeX files</string>
+     </property>
+    </widget>
+   </item>
    <item row="1" column="0" >
     <widget class="QLabel" name="latexPaperSizeLA" >
      <property name="text" >
      </property>
     </widget>
    </item>
+   <item row="2" column="1" colspan="2" >
+    <widget class="QLineEdit" name="latexChecktexED" >
+     <property name="toolTip" >
+      <string>CheckTeX start options and flags</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0" >
+    <widget class="QLabel" name="latexIndexLA" >
+     <property name="text" >
+      <string>&amp;Index command:</string>
+     </property>
+     <property name="buddy" >
+      <cstring>latexIndexED</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" >
+    <widget class="QLabel" name="latexBibtexLA" >
+     <property name="text" >
+      <string>&amp;BibTeX command:</string>
+     </property>
+     <property name="buddy" >
+      <cstring>latexBibtexED</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0" >
+    <widget class="QLabel" name="latexDviPaperLA" >
+     <property name="text" >
+      <string>&amp;DVI viewer paper size options:</string>
+     </property>
+     <property name="buddy" >
+      <cstring>latexDviPaperED</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QLabel" name="latexChecktexLA" >
+     <property name="text" >
+      <string>Chec&amp;kTeX command:</string>
+     </property>
+     <property name="buddy" >
+      <cstring>latexChecktexED</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1" colspan="2" >
+    <widget class="QLineEdit" name="latexBibtexED" >
+     <property name="toolTip" >
+      <string>BibTeX command and options</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1" colspan="2" >
+    <widget class="QLineEdit" name="latexDviPaperED" >
+     <property name="toolTip" >
+      <string>Optional paper size flag (-paper) for some DVI viewers</string>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="1" colspan="2" >
+    <widget class="QLineEdit" name="latexIndexED" >
+     <property name="toolTip" >
+      <string>Index command and options (makeindex, xindy)</string>
+     </property>
+    </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>21</width>
+       <height>52</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
    <item row="0" column="1" >
     <widget class="QLineEdit" name="latexEncodingED" />
    </item>
      </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" >
-    <widget class="QGroupBox" name="GroupBox3" >
-     <property name="title" >
-      <string>External Applications</string>
-     </property>
-     <layout class="QGridLayout" >
-      <property name="margin" >
-       <number>11</number>
-      </property>
-      <property name="spacing" >
-       <number>6</number>
-      </property>
-      <item row="0" column="1" >
-       <widget class="QLineEdit" name="latexChecktexED" >
-        <property name="toolTip" >
-         <string>CheckTeX start options and flags</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="0" >
-       <widget class="QLabel" name="latexChecktexLA" >
-        <property name="text" >
-         <string>Chec&amp;kTeX command:</string>
-        </property>
-        <property name="buddy" >
-         <cstring>latexChecktexED</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1" >
-       <widget class="QLineEdit" name="latexBibtexED" >
-        <property name="toolTip" >
-         <string>BibTeX command and options</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0" >
-       <widget class="QLabel" name="latexBibtexLA" >
-        <property name="text" >
-         <string>&amp;BibTeX command:</string>
-        </property>
-        <property name="buddy" >
-         <cstring>latexChecktexED</cstring>
-        </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" >
-        <property name="text" >
-         <string>Index command:</string>
-        </property>
-        <property name="buddy" >
-         <cstring>latexDviPaperED</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="0" >
-       <widget class="QLabel" name="latexDviPaperLA" >
-        <property name="text" >
-         <string>DVI viewer paper size options:</string>
-        </property>
-        <property name="buddy" >
-         <cstring>latexDviPaperED</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="1" >
-       <widget class="QLineEdit" name="latexDviPaperED" >
-        <property name="toolTip" >
-         <string>Optional paper size flag (-paper) for some DVI viewers</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </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>pathCB</tabstop>
+  <tabstop>latexAutoresetCB</tabstop>
  </tabstops>
+ <includes>
+  <include location="local" >qt_helpers.h</include>
+ </includes>
  <resources/>
  <connections/>
 </ui>
index 45c5656396fc75ad984caad265a181f2a3004178..0806939a26db4333440a19e6ebb02826422f063c 100644 (file)
@@ -34,7 +34,6 @@ uic ParagraphUi.ui -o ParagraphUi.h
 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