mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Add shorter invervals for the backup thread
This commit is contained in:
parent
d6f2bec3fe
commit
441b835192
@ -98,7 +98,7 @@
|
|||||||
<option id="rewind_on_stop" type="bool" default="false" />
|
<option id="rewind_on_stop" type="bool" default="false" />
|
||||||
<option id="expand_menubar_on_mouseover" type="bool" default="false" migrate="Options.ExpandMenuBarOnMouseover" />
|
<option id="expand_menubar_on_mouseover" type="bool" default="false" migrate="Options.ExpandMenuBarOnMouseover" />
|
||||||
<option id="data_recovery" type="bool" default="true" />
|
<option id="data_recovery" type="bool" default="true" />
|
||||||
<option id="data_recovery_period" type="int" default="2" />
|
<option id="data_recovery_period" type="double" default="2.0" />
|
||||||
<option id="show_full_path" type="bool" default="true" />
|
<option id="show_full_path" type="bool" default="true" />
|
||||||
<option id="timeline_position" type="TimelinePosition" default="TimelinePosition::BOTTOM" />
|
<option id="timeline_position" type="TimelinePosition" default="TimelinePosition::BOTTOM" />
|
||||||
</section>
|
</section>
|
||||||
|
@ -43,6 +43,9 @@
|
|||||||
<hbox>
|
<hbox>
|
||||||
<check text="Automatically save recovery data every" id="enable_data_recovery" tooltip="With this option you can recover your documents if the program finalizes unexpectedly." />
|
<check text="Automatically save recovery data every" id="enable_data_recovery" tooltip="With this option you can recover your documents if the program finalizes unexpectedly." />
|
||||||
<combobox id="data_recovery_period">
|
<combobox id="data_recovery_period">
|
||||||
|
<listitem text="10 seconds" value="0.33" />
|
||||||
|
<listitem text="30 seconds" value="0.5" />
|
||||||
|
<listitem text="1 Minutes" value="1" />
|
||||||
<listitem text="2 Minutes" value="2" />
|
<listitem text="2 Minutes" value="2" />
|
||||||
<listitem text="5 Minutes" value="5" />
|
<listitem text="5 Minutes" value="5" />
|
||||||
<listitem text="10 Minutes" value="10" />
|
<listitem text="10 Minutes" value="10" />
|
||||||
|
@ -252,7 +252,7 @@ public:
|
|||||||
|
|
||||||
std::string warnings;
|
std::string warnings;
|
||||||
|
|
||||||
int newPeriod = base::convert_to<int>(dataRecoveryPeriod()->getValue());
|
double newPeriod = base::convert_to<double>(dataRecoveryPeriod()->getValue());
|
||||||
if (enableDataRecovery()->isSelected() != m_pref.general.dataRecovery() ||
|
if (enableDataRecovery()->isSelected() != m_pref.general.dataRecovery() ||
|
||||||
newPeriod != m_pref.general.dataRecoveryPeriod()) {
|
newPeriod != m_pref.general.dataRecoveryPeriod()) {
|
||||||
m_pref.general.dataRecovery(enableDataRecovery()->isSelected());
|
m_pref.general.dataRecovery(enableDataRecovery()->isSelected());
|
||||||
|
@ -82,8 +82,8 @@ void BackupObserver::onRemoveDocument(doc::Document* document)
|
|||||||
|
|
||||||
void BackupObserver::backgroundThread()
|
void BackupObserver::backgroundThread()
|
||||||
{
|
{
|
||||||
int normalPeriod = 60*Preferences::instance().general.dataRecoveryPeriod();
|
int normalPeriod = int(60.0*Preferences::instance().general.dataRecoveryPeriod());
|
||||||
int lockedPeriod = 10;
|
int lockedPeriod = 5;
|
||||||
#if 0 // Just for testing purposes
|
#if 0 // Just for testing purposes
|
||||||
normalPeriod = 5;
|
normalPeriod = 5;
|
||||||
lockedPeriod = 5;
|
lockedPeriod = 5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user