mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 05:12:40 +00:00
Add lyxrc.use_lastfilepos and load_session to the qt4 preference dialog.
* src/frontends/qt4/QPrefsDialog.C, connect checkboxes to lyxrc * src/frontends/qt4/ui/QPrefUi.ui, add two checkboxes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13766 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a19e4ae888
commit
7cff3d5d5e
@ -394,6 +394,8 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
|||||||
connect(uiModule->bindFilePB, SIGNAL(clicked()), this, SLOT(select_bind()));
|
connect(uiModule->bindFilePB, SIGNAL(clicked()), this, SLOT(select_bind()));
|
||||||
connect(uiModule->uiFileED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
|
connect(uiModule->uiFileED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
|
||||||
connect(uiModule->bindFileED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
|
connect(uiModule->bindFileED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
|
||||||
|
connect(uiModule->restoreCursorCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
|
connect(uiModule->loadSessionCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
connect(uiModule->cursorFollowsCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
connect(uiModule->cursorFollowsCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
connect(uiModule->autoSaveSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
|
connect(uiModule->autoSaveSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
|
||||||
connect(uiModule->autoSaveCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
connect(uiModule->autoSaveCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
@ -1127,6 +1129,8 @@ void QPrefsDialog::apply(LyXRC & rc) const
|
|||||||
|
|
||||||
rc.ui_file = internal_path(uiModule->uiFileED->text());
|
rc.ui_file = internal_path(uiModule->uiFileED->text());
|
||||||
rc.bind_file = internal_path(uiModule->bindFileED->text());
|
rc.bind_file = internal_path(uiModule->bindFileED->text());
|
||||||
|
rc.use_lastfilepos = uiModule->restoreCursorCB->isChecked();
|
||||||
|
rc.load_session = uiModule->loadSessionCB->isChecked();
|
||||||
rc.cursor_follows_scrollbar = uiModule->cursorFollowsCB->isChecked();
|
rc.cursor_follows_scrollbar = uiModule->cursorFollowsCB->isChecked();
|
||||||
rc.autosave = uiModule->autoSaveSB->value() * 60;
|
rc.autosave = uiModule->autoSaveSB->value() * 60;
|
||||||
rc.make_backup = uiModule->autoSaveCB->isChecked();
|
rc.make_backup = uiModule->autoSaveCB->isChecked();
|
||||||
@ -1421,6 +1425,8 @@ void QPrefsDialog::update(LyXRC const & rc)
|
|||||||
|
|
||||||
uiModule->uiFileED->setText(external_path(rc.ui_file));
|
uiModule->uiFileED->setText(external_path(rc.ui_file));
|
||||||
uiModule->bindFileED->setText(external_path(rc.bind_file));
|
uiModule->bindFileED->setText(external_path(rc.bind_file));
|
||||||
|
uiModule->restoreCursorCB->setChecked(rc.use_lastfilepos);
|
||||||
|
uiModule->loadSessionCB->setChecked(rc.load_session);
|
||||||
uiModule->cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
|
uiModule->cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
|
||||||
// convert to minutes
|
// convert to minutes
|
||||||
int mins(rc.autosave / 60);
|
int mins(rc.autosave / 60);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>416</width>
|
<width>416</width>
|
||||||
<height>441</height>
|
<height>513</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
@ -23,6 +23,57 @@
|
|||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<widget class="QGroupBox" name="sessionGB" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Session</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="restoreCursorCB" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Restore cursor positions</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="loadSessionCB" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Load opened files from last session</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" >
|
||||||
|
<widget class="QGroupBox" name="scrollGB" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Scrolling</string>
|
||||||
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>11</number>
|
<number>11</number>
|
||||||
@ -31,72 +82,16 @@
|
|||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<widget class="QCheckBox" name="cursorFollowsCB" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="2" >
|
|
||||||
<widget class="QPushButton" name="bindFilePB" >
|
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>B&rowse...</string>
|
<string>Cursor follows &scrollbar</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" >
|
</layout>
|
||||||
<widget class="QLabel" name="uiFileLA" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&User interface file:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>uiFileED</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QLabel" name="bindFileLA" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Bind file:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy" >
|
|
||||||
<cstring>bindFileED</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
|
||||||
<widget class="QLineEdit" name="uiFileED" />
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" >
|
|
||||||
<widget class="QPushButton" name="uiFilePB" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Bro&wse...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QLineEdit" name="bindFileED" />
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="documentsGB" >
|
<widget class="QGroupBox" name="documentsGB" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Documents</string>
|
<string>Documents</string>
|
||||||
@ -198,31 +193,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item rowspan="2" row="1" column="1" >
|
||||||
<widget class="QGroupBox" name="scrollGB" >
|
|
||||||
<property name="title" >
|
|
||||||
<string>Scrolling</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>11</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="cursorFollowsCB" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Cursor follows &scrollbar</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -232,15 +203,13 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>51</width>
|
||||||
<height>20</height>
|
<height>258</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="4" column="0" colspan="2" >
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -250,12 +219,62 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>394</width>
|
||||||
<height>20</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2" >
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="2" >
|
||||||
|
<widget class="QPushButton" name="bindFilePB" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>B&rowse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QLabel" name="uiFileLA" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&User interface file:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>uiFileED</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QLabel" name="bindFileLA" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&Bind file:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>bindFileED</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<widget class="QLineEdit" name="uiFileED" />
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" >
|
||||||
|
<widget class="QPushButton" name="uiFilePB" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Bro&wse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QLineEdit" name="bindFileED" />
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||||
|
Loading…
Reference in New Issue
Block a user