diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp
index 7f6bfa05a2..5a9c810e79 100644
--- a/src/frontends/qt4/GuiPrefs.cpp
+++ b/src/frontends/qt4/GuiPrefs.cpp
@@ -2491,39 +2491,12 @@ PrefUserInterface::PrefUserInterface(GuiPreferences * form)
{
setupUi(this);
- connect(autoSaveCB, SIGNAL(toggled(bool)),
- autoSaveSB, SLOT(setEnabled(bool)));
- connect(autoSaveCB, SIGNAL(toggled(bool)),
- TextLabel1, SLOT(setEnabled(bool)));
- connect(openDocumentsInTabsCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(singleInstanceCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
-#if QT_VERSION < 0x040500
- singleCloseTabButtonCB->setEnabled(false);
-#endif
- connect(singleCloseTabButtonCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
connect(uiFilePB, SIGNAL(clicked()),
this, SLOT(selectUi()));
connect(uiFileED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
connect(iconSetCO, SIGNAL(activated(int)),
this, SIGNAL(changed()));
- connect(restoreCursorCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(loadSessionCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(allowGeometrySessionCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(autoSaveSB, SIGNAL(valueChanged(int)),
- this, SIGNAL(changed()));
- connect(autoSaveCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(backupCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
- connect(saveCompressedCB, SIGNAL(clicked()),
- this, SIGNAL(changed()));
connect(lastfilesSB, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
connect(tooltipCB, SIGNAL(toggled(bool)),
@@ -2542,20 +2515,8 @@ void PrefUserInterface::apply(LyXRC & rc) const
iconSetCO->currentIndex()).toString());
rc.ui_file = internal_path(fromqstr(uiFileED->text()));
- rc.use_lastfilepos = restoreCursorCB->isChecked();
- rc.load_session = loadSessionCB->isChecked();
- rc.allow_geometry_session = allowGeometrySessionCB->isChecked();
- rc.autosave = autoSaveCB->isChecked() ? autoSaveSB->value() * 60 : 0;
- rc.make_backup = backupCB->isChecked();
- rc.save_compressed = saveCompressedCB->isChecked();
rc.num_lastfiles = lastfilesSB->value();
rc.use_tooltip = tooltipCB->isChecked();
- rc.open_buffers_in_tabs = openDocumentsInTabsCB->isChecked();
- rc.single_instance = singleInstanceCB->isChecked();
- rc.single_close_tab_button = singleCloseTabButtonCB->isChecked();
-#if QT_VERSION < 0x040500
- rc.single_close_tab_button = true;
-#endif
}
@@ -2566,6 +2527,79 @@ void PrefUserInterface::update(LyXRC const & rc)
iconset = 0;
iconSetCO->setCurrentIndex(iconset);
uiFileED->setText(toqstr(external_path(rc.ui_file)));
+ lastfilesSB->setValue(rc.num_lastfiles);
+ tooltipCB->setChecked(rc.use_tooltip);
+}
+
+
+void PrefUserInterface::selectUi()
+{
+ QString file = form_->browseUI(internalPath(uiFileED->text()));
+ if (!file.isEmpty())
+ uiFileED->setText(file);
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// PrefDocumentHandling
+//
+/////////////////////////////////////////////////////////////////////
+
+PrefDocHandling::PrefDocHandling(GuiPreferences * form)
+ : PrefModule(qt_(catLookAndFeel), qt_("Document Handling"), form)
+{
+ setupUi(this);
+
+ connect(autoSaveCB, SIGNAL(toggled(bool)),
+ autoSaveSB, SLOT(setEnabled(bool)));
+ connect(autoSaveCB, SIGNAL(toggled(bool)),
+ TextLabel1, SLOT(setEnabled(bool)));
+ connect(openDocumentsInTabsCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(singleInstanceCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+#if QT_VERSION < 0x040500
+ singleCloseTabButtonCB->setEnabled(false);
+#endif
+ connect(singleCloseTabButtonCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(restoreCursorCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(loadSessionCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(allowGeometrySessionCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(autoSaveSB, SIGNAL(valueChanged(int)),
+ this, SIGNAL(changed()));
+ connect(autoSaveCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(backupCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(saveCompressedCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+}
+
+
+void PrefDocHandling::apply(LyXRC & rc) const
+{
+ rc.use_lastfilepos = restoreCursorCB->isChecked();
+ rc.load_session = loadSessionCB->isChecked();
+ rc.allow_geometry_session = allowGeometrySessionCB->isChecked();
+ rc.autosave = autoSaveCB->isChecked() ? autoSaveSB->value() * 60 : 0;
+ rc.make_backup = backupCB->isChecked();
+ rc.save_compressed = saveCompressedCB->isChecked();
+ rc.open_buffers_in_tabs = openDocumentsInTabsCB->isChecked();
+ rc.single_instance = singleInstanceCB->isChecked();
+ rc.single_close_tab_button = singleCloseTabButtonCB->isChecked();
+#if QT_VERSION < 0x040500
+ rc.single_close_tab_button = true;
+#endif
+}
+
+
+void PrefDocHandling::update(LyXRC const & rc)
+{
restoreCursorCB->setChecked(rc.use_lastfilepos);
loadSessionCB->setChecked(rc.load_session);
allowGeometrySessionCB->setChecked(rc.allow_geometry_session);
@@ -2579,8 +2613,6 @@ void PrefUserInterface::update(LyXRC const & rc)
autoSaveSB->setEnabled(autosave);
backupCB->setChecked(rc.make_backup);
saveCompressedCB->setChecked(rc.save_compressed);
- lastfilesSB->setValue(rc.num_lastfiles);
- tooltipCB->setChecked(rc.use_tooltip);
openDocumentsInTabsCB->setChecked(rc.open_buffers_in_tabs);
singleInstanceCB->setChecked(rc.single_instance && !rc.lyxpipes.empty());
singleInstanceCB->setEnabled(!rc.lyxpipes.empty());
@@ -2588,15 +2620,7 @@ void PrefUserInterface::update(LyXRC const & rc)
}
-void PrefUserInterface::selectUi()
-{
- QString file = form_->browseUI(internalPath(uiFileED->text()));
- if (!file.isEmpty())
- uiFileED->setText(file);
-}
-
-
-void PrefUserInterface::on_clearSessionPB_clicked()
+void PrefDocHandling::on_clearSessionPB_clicked()
{
guiApp->clearSession();
}
@@ -3209,6 +3233,7 @@ GuiPreferences::GuiPreferences(GuiView & lv)
connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
addModule(new PrefUserInterface(this));
+ addModule(new PrefDocHandling(this));
addModule(new PrefEdit(this));
addModule(new PrefShortcuts(this));
PrefScreenFonts * screenfonts = new PrefScreenFonts(this);
diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h
index 57b9a32cfc..bfb042ace1 100644
--- a/src/frontends/qt4/GuiPrefs.h
+++ b/src/frontends/qt4/GuiPrefs.h
@@ -33,6 +33,7 @@
#include "ui_PrefCompletionUi.h"
#include "ui_PrefColorsUi.h"
#include "ui_PrefDisplayUi.h"
+#include "ui_PrefDocHandlingUi.h"
#include "ui_PrefEditUi.h"
#include "ui_PrefPathsUi.h"
#include "ui_PrefShortcutsUi.h"
@@ -424,10 +425,24 @@ public:
public Q_SLOTS:
void selectUi();
+};
+
+
+class PrefDocHandling : public PrefModule, public Ui::PrefDocHandlingUi
+{
+ Q_OBJECT
+public:
+ PrefDocHandling(GuiPreferences * form);
+
+ void apply(LyXRC & rc) const;
+ void update(LyXRC const & rc);
+
+public Q_SLOTS:
void on_clearSessionPB_clicked();
};
+
class PrefEdit : public PrefModule, public Ui::PrefEditUi
{
Q_OBJECT
diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am
index caa41159ae..6bacb7bb83 100644
--- a/src/frontends/qt4/Makefile.am
+++ b/src/frontends/qt4/Makefile.am
@@ -309,6 +309,7 @@ UIFILES = \
PrefColorsUi.ui \
PrefCompletionUi.ui \
PrefConvertersUi.ui \
+ PrefDocHandlingUi.ui \
PrefOutputUi.ui \
PrefDisplayUi.ui \
PrefEditUi.ui \
diff --git a/src/frontends/qt4/ui/PrefDocHandlingUi.ui b/src/frontends/qt4/ui/PrefDocHandlingUi.ui
new file mode 100644
index 0000000000..5a5631d34e
--- /dev/null
+++ b/src/frontends/qt4/ui/PrefDocHandlingUi.ui
@@ -0,0 +1,256 @@
+
+ PrefDocHandlingUi
+
+
+
+ 0
+ 0
+ 524
+ 417
+
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ -
+
+
+ Session handling
+
+
+ true
+
+
+
-
+
+
+ true
+
+
+ Restore window layouts and &geometries
+
+
+
+ -
+
+
+ Restore to the cursor position when the file was last closed
+
+
+ Restore cursor &positions
+
+
+
+ -
+
+
+ &Load opened files from last session
+
+
+
+ -
+
+
+ &Clear all session information
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 225
+ 20
+
+
+
+
+
+
+
+ -
+
+
+ Backup && saving
+
+
+ true
+
+
+
-
+
+
+ Backup &original documents when saving
+
+
+
+ -
+
+
-
+
+
+ &Backup documents, every
+
+
+
+ -
+
+
+ 1
+
+
+ 300
+
+
+
+ -
+
+
+ &minutes
+
+
+ autoSaveSB
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 61
+ 21
+
+
+
+
+
+
+ -
+
+
+ &Save documents compressed by default
+
+
+
+ -
+
+
-
+
+
+ Ma&ximum last files:
+
+
+ lastfilesSB
+
+
+
+ -
+
+
+ 9
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 48
+ 20
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Windows && work area
+
+
+ true
+
+
+
-
+
+
+ Open documents in &tabs
+
+
+
+ -
+
+
+ Whether to open documents in an already running instance of LyX.
+(Set the LyXServer pipe path and restart LyX to enable this feature)
+
+
+ Use s&ingle instance
+
+
+
+ -
+
+
+ Whether to place close button on each tab or only one in the top left.
+
+
+ Displa&y single close-tab button
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 395
+ 16
+
+
+
+
+
+
+
+
+ restoreCursorCB
+ loadSessionCB
+ clearSessionPB
+ backupCB
+ autoSaveCB
+ autoSaveSB
+ saveCompressedCB
+ lastfilesSB
+
+
+ qt_i18n.h
+
+
+
+
diff --git a/src/frontends/qt4/ui/PrefUi.ui b/src/frontends/qt4/ui/PrefUi.ui
index fe50bcf0c6..e5f54e2ebd 100644
--- a/src/frontends/qt4/ui/PrefUi.ui
+++ b/src/frontends/qt4/ui/PrefUi.ui
@@ -20,59 +20,93 @@
-
-
-
- &User interface file:
+
+
+ General Look && Feel
-
- uiFileED
+
+ true
+
+
-
+
+
-
+
+
+ &User interface file:
+
+
+ uiFileED
+
+
+
+ -
+
+
+ -
+
+
+ Bro&wse...
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 77
+ 20
+
+
+
+
+
+
+ -
+
+
-
+
+
+ &Icon Set:
+
+
+ iconSetCO
+
+
+
+ -
+
+
+ The icon set to use. Warning: normal size of icons may be
+wrong until you save the preferences and restart LyX.
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
- -
-
-
- -
-
-
- Bro&wse...
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 77
- 20
-
-
-
-
- -
-
-
- &Icon Set:
-
-
- iconSetCO
-
-
-
- -
-
-
- The icon set to use. Warning: normal size of icons may be
wrong until you save the preferences and restart LyX.
-
-
-
- -
+
-
- Automatic help
+ Context help
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
@@ -100,126 +134,16 @@
- -
-
-
- Session
-
-
- true
-
-
-
-
-
-
- true
-
-
- Restore window layouts and &geometries
-
-
-
- -
-
-
- Restore to the cursor position when the file was last closed
-
-
- Restore cursor &positions
-
-
-
- -
-
-
- &Load opened files from last session
-
-
-
- -
-
-
- &Clear all session information
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 225
- 20
-
-
-
-
-
-
-
- -
+
-
- Documents
+ Menus
true
-
-
-
-
- Backup original documents when saving
-
-
-
- -
-
-
- &Backup documents, every
-
-
-
- -
-
-
- 1
-
-
- 300
-
-
-
- -
-
-
- minutes
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 61
- 21
-
-
-
-
- -
-
-
- &Save documents compressed by default
-
-
-
- -
+
-
&Maximum last files:
@@ -229,14 +153,7 @@
- -
-
-
- 9
-
-
-
- -
+
-
Qt::Horizontal
@@ -249,37 +166,17 @@
- -
-
-
- &Open documents in tabs
-
-
-
- -
-
-
- Whether to open documents in an already running instance of LyX.
(Set the LyXServer pipe path and restart LyX to enable this feature)
-
-
- S&ingle instance
-
-
-
- -
-
-
- Whether to place close button on each tab or only one in the top left.
-
-
- &Single close-tab button
+
-
+
+
+ 9
- -
+
-
Qt::Vertical
@@ -300,16 +197,6 @@
uiFilePB
iconSetCO
tooltipCB
- allowGeometrySessionCB
- restoreCursorCB
- loadSessionCB
- clearSessionPB
- backupCB
- autoSaveCB
- autoSaveSB
- saveCompressedCB
- lastfilesSB
- openDocumentsInTabsCB
qt_i18n.h
diff --git a/status.20x b/status.20x
index ef779bd781..fc99d80893 100644
--- a/status.20x
+++ b/status.20x
@@ -156,6 +156,9 @@ What's new
- Do not try to process included files when viewing source (bug 8557).
+- Reorder Look & Feel section in Preferences in order to fit the dialog
+ into netbook screens (bug 7524).
+
* DOCUMENTATION AND LOCALIZATION