From 80a05b1eb571e3f001a34feecaadf032f675a5de Mon Sep 17 00:00:00 2001 From: Edwin Leuven Date: Sun, 2 Sep 2007 20:17:36 +0000 Subject: [PATCH] get rid of (cyg)win path panel in prefs by moving it to the latex panel git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20013 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiPrefs.cpp | 48 ++--- src/frontends/qt4/GuiPrefs.h | 12 -- src/frontends/qt4/Makefile.am | 1 - src/frontends/qt4/ui/PrefCygwinPathUi.ui | 58 ------ src/frontends/qt4/ui/PrefLatexUi.ui | 222 ++++++++++++----------- src/frontends/qt4/ui/compile_uic.sh | 1 - 6 files changed, 130 insertions(+), 212 deletions(-) delete mode 100644 src/frontends/qt4/ui/PrefCygwinPathUi.ui diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 78dc1c64af..8ba269eb39 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -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()), diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h index 00dd244292..428c9287fe 100644 --- a/src/frontends/qt4/GuiPrefs.h +++ b/src/frontends/qt4/GuiPrefs.h @@ -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 diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am index 0c532fdd87..ccf241fa05 100644 --- a/src/frontends/qt4/Makefile.am +++ b/src/frontends/qt4/Makefile.am @@ -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 index f0e807f9ed..0000000000 --- a/src/frontends/qt4/ui/PrefCygwinPathUi.ui +++ /dev/null @@ -1,58 +0,0 @@ - - PrefCygwinPathUi - - - - 0 - 0 - 275 - 91 - - - - - - - - 9 - - - 6 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - true - - - - - - 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. - - - &Use Windows-style paths in LaTeX files - - - - - - - qt_helpers.h - - - - diff --git a/src/frontends/qt4/ui/PrefLatexUi.ui b/src/frontends/qt4/ui/PrefLatexUi.ui index c3f81bfb32..a70b74e445 100644 --- a/src/frontends/qt4/ui/PrefLatexUi.ui +++ b/src/frontends/qt4/ui/PrefLatexUi.ui @@ -6,7 +6,7 @@ 0 0 427 - 285 + 308 @@ -19,7 +19,7 @@ 6 - + Set class options to default on class change @@ -29,7 +29,7 @@ - + Qt::Vertical @@ -40,11 +40,30 @@ 409 - 75 + 20 + + + + true + + + + + + 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. + + + Qt::LeftToRight + + + &Use Windows-style paths in LaTeX files + + + @@ -65,6 +84,90 @@ + + + + CheckTeX start options and flags + + + + + + + &Index command: + + + latexIndexED + + + + + + + &BibTeX command: + + + latexBibtexED + + + + + + + &DVI viewer paper size options: + + + latexDviPaperED + + + + + + + Chec&kTeX command: + + + latexChecktexED + + + + + + + BibTeX command and options + + + + + + + Optional paper size flag (-paper) for some DVI viewers + + + + + + + Index command and options (makeindex, xindy) + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 21 + 52 + + + + @@ -112,118 +215,21 @@ - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 178 - 54 - - - - - - - - External Applications - - - - 11 - - - 6 - - - - - CheckTeX start options and flags - - - - - - - Chec&kTeX command: - - - latexChecktexED - - - - - - - BibTeX command and options - - - - - - - &BibTeX command: - - - latexChecktexED - - - - - - - Index command and options (makeindex, xindy) - - - - - - - Index command: - - - latexDviPaperED - - - - - - - DVI viewer paper size options: - - - latexDviPaperED - - - - - - - Optional paper size flag (-paper) for some DVI viewers - - - - - - - - - qt_helpers.h - latexEncodingED latexPaperSizeCO - latexAutoresetCB latexChecktexED + latexBibtexED + latexIndexED latexDviPaperED + pathCB + latexAutoresetCB + + qt_helpers.h + diff --git a/src/frontends/qt4/ui/compile_uic.sh b/src/frontends/qt4/ui/compile_uic.sh index 45c5656396..0806939a26 100644 --- a/src/frontends/qt4/ui/compile_uic.sh +++ b/src/frontends/qt4/ui/compile_uic.sh @@ -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