From: Bo Peng Date: Thu, 27 Apr 2006 18:19:14 +0000 (+0000) Subject: Add lyxrc.use_lastfilepos and load_session to the qt4 preference dialog. X-Git-Tag: 1.6.10~13280 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7cff3d5d5e9ce382dd81df838df3d205be5b5513;p=lyx.git 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 --- diff --git a/src/frontends/qt4/QPrefsDialog.C b/src/frontends/qt4/QPrefsDialog.C index 9dded4bef6..9f02b037e6 100644 --- a/src/frontends/qt4/QPrefsDialog.C +++ b/src/frontends/qt4/QPrefsDialog.C @@ -394,6 +394,8 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) connect(uiModule->bindFilePB, SIGNAL(clicked()), this, SLOT(select_bind())); connect(uiModule->uiFileED, 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->autoSaveSB, SIGNAL(valueChanged(int)), 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.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.autosave = uiModule->autoSaveSB->value() * 60; 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->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); // convert to minutes int mins(rc.autosave / 60); diff --git a/src/frontends/qt4/ui/QPrefUi.ui b/src/frontends/qt4/ui/QPrefUi.ui index 16ce3a9b87..e78e203589 100644 --- a/src/frontends/qt4/ui/QPrefUi.ui +++ b/src/frontends/qt4/ui/QPrefUi.ui @@ -9,7 +9,7 @@ 0 0 416 - 441 + 513 @@ -23,14 +23,209 @@ - + - 11 + 9 6 - + + + + Session + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + Restore cursor positions + + + + + + + Load opened files from last session + + + + + + + + + + + + Scrolling + + + + 11 + + + 6 + + + + + Cursor follows &scrollbar + + + + + + + + + + Documents + + + + 11 + + + 6 + + + + + B&ackup documents + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 21 + 20 + + + + + + + + every + + + autoSaveSB + + + + + + + 300 + + + 1 + + + + + + + minutes + + + + + + + + + 0 + + + 6 + + + + + &Maximum last files: + + + lastfilesSB + + + + + + + 9 + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 51 + 258 + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 394 + 21 + + + + + 0 @@ -80,182 +275,6 @@ - - - - 0 - - - 6 - - - - - 0 - - - 6 - - - - - Documents - - - - 11 - - - 6 - - - - - B&ackup documents - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 21 - 20 - - - - - - - - every - - - autoSaveSB - - - - - - - 300 - - - 1 - - - - - - - minutes - - - - - - - - - 0 - - - 6 - - - - - &Maximum last files: - - - lastfilesSB - - - - - - - 9 - - - - - - - - - - - - Scrolling - - - - 11 - - - 6 - - - - - Cursor follows &scrollbar - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - qPixmapFromMimeSource