mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
It appears that somewhere along the way, backing up originals when saving
got conflated with autosaving, with the result that it became impossible to disable autosaving, as reported on the user list. This patch disentangles the two again. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31395 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f08faa143b
commit
0dc39929a4
@ -2152,6 +2152,8 @@ PrefUserInterface::PrefUserInterface(GuiPreferences * form)
|
||||
this, SIGNAL(changed()));
|
||||
connect(autoSaveCB, SIGNAL(clicked()),
|
||||
this, SIGNAL(changed()));
|
||||
connect(backupCB, SIGNAL(clicked()),
|
||||
this, SIGNAL(changed()));
|
||||
connect(lastfilesSB, SIGNAL(valueChanged(int)),
|
||||
this, SIGNAL(changed()));
|
||||
connect(tooltipCB, SIGNAL(toggled(bool)),
|
||||
@ -2166,8 +2168,8 @@ void PrefUserInterface::apply(LyXRC & rc) const
|
||||
rc.use_lastfilepos = restoreCursorCB->isChecked();
|
||||
rc.load_session = loadSessionCB->isChecked();
|
||||
rc.allow_geometry_session = allowGeometrySessionCB->isChecked();
|
||||
rc.autosave = autoSaveSB->value() * 60;
|
||||
rc.make_backup = autoSaveCB->isChecked();
|
||||
rc.autosave = autoSaveCB->isChecked()? autoSaveSB->value() * 60 : 0;
|
||||
rc.make_backup = backupCB->isChecked();
|
||||
rc.num_lastfiles = lastfilesSB->value();
|
||||
rc.use_tooltip = tooltipCB->isChecked();
|
||||
rc.open_buffers_in_tabs = openDocumentsInTabsCB->isChecked();
|
||||
@ -2181,11 +2183,14 @@ void PrefUserInterface::update(LyXRC const & rc)
|
||||
loadSessionCB->setChecked(rc.load_session);
|
||||
allowGeometrySessionCB->setChecked(rc.allow_geometry_session);
|
||||
// convert to minutes
|
||||
int mins(rc.autosave / 60);
|
||||
if (rc.autosave && !mins)
|
||||
mins = 1;
|
||||
bool autosave = rc.autosave > 0;
|
||||
int mins = rc.autosave / 60;
|
||||
if (!mins)
|
||||
mins = 5;
|
||||
autoSaveSB->setValue(mins);
|
||||
autoSaveCB->setChecked(rc.make_backup);
|
||||
autoSaveCB->setChecked(autosave);
|
||||
autoSaveSB->setEnabled(autosave);
|
||||
backupCB->setChecked(rc.make_backup);
|
||||
lastfilesSB->setValue(rc.num_lastfiles);
|
||||
tooltipCB->setChecked(rc.use_tooltip);
|
||||
openDocumentsInTabsCB->setChecked(rc.open_buffers_in_tabs);
|
||||
|
@ -94,7 +94,7 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" colspan="4" >
|
||||
<item row="2" column="0" colspan="4" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
@ -134,7 +134,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QCheckBox" name="backupCB">
|
||||
<property name="text">
|
||||
<string>Backup original documents when saving</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -147,14 +154,14 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="text" >
|
||||
<string>minutes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<item row="1" column="1" >
|
||||
<widget class="QSpinBox" name="autoSaveSB" >
|
||||
<property name="minimum" >
|
||||
<number>1</number>
|
||||
@ -164,14 +171,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<item row="1" column="0" >
|
||||
<widget class="QCheckBox" name="autoSaveCB" >
|
||||
<property name="text" >
|
||||
<string>&Backup documents, every</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4" >
|
||||
<item row="3" column="0" colspan="4" >
|
||||
<widget class="QCheckBox" name="openDocumentsInTabsCB" >
|
||||
<property name="text" >
|
||||
<string>&Open documents in tabs</string>
|
||||
|
Loading…
Reference in New Issue
Block a user