diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2008-06-12 09:53:24 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2008-06-12 09:53:24 +0000 |
| commit | 33c6e6fa672c388c540250d86c5c23f571338d11 (patch) | |
| tree | fe79929f27051662c64670630925b28254568133 /src/ui | |
| parent | Fixed uninitialized variables, including modified-since-save. (diff) | |
| download | inkscape-33c6e6fa672c388c540250d86c5c23f571338d11.tar.gz inkscape-33c6e6fa672c388c540250d86c5c23f571338d11.zip | |
Committing fixed patch for autosave. Fixes bug #171092.
(bzr r5898)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 24 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.h | 4 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index abea07641..82bde3834 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -986,6 +986,30 @@ void InkscapePreferences::initPageMisc() _misc_simpl.init("options.simplifythreshold", "value", 0.0001, 1.0, 0.0001, 0.0010, 0.0010, false, false); + // Autosave options + _misc_autosave_enable.init( _("Enable auto-save of document"), "options.autosave", "enable", false); + _page_misc.add_line(false, "", _misc_autosave_enable, "", _("Automatically saves the current document to disk at a given interval, thus minimizing loss at a crash"), false); + _misc_autosave_interval.init("options.autosave", "interval", 1.0, 10800.0, 1.0, 10.0, 10.0, true, false); + _page_misc.add_line(true, _("Interval (in minutes):"), _misc_autosave_interval, "", _("Sets the interval (in minutes) at which a workspace will be automatically saved to disk"), false); + _misc_autosave_path.init("options.autosave", "path", true); + _page_misc.add_line(true, _("Path:"), _misc_autosave_path, "", _("Sets the directory where autosaves will be written"), false); + _misc_autosave_max.init("options.autosave", "max", 1.0, 100.0, 1.0, 10.0, 10.0, true, false); + _page_misc.add_line(true, _("Maximum number of autosaves"), _misc_autosave_max, "", _("Allows for limiting the space used by autosaves, by setting a maximum number of allowed files"), false); + + /* When changing the interval or enabling/disabling the autosave function, + * update our running configuration + * + * FIXME! + * the inkscape_autosave_init should be called AFTER the values have been changed + * (which cannot be guaranteed from here) + * + * For now, autosave-settings will not change until restart + */ + /* + _misc_autosave_enable.signal_toggled().connect( sigc::ptr_fun(inkscape_autosave_init), TRUE ); + _misc_autosave_interval.signal_changed().connect( sigc::ptr_fun(inkscape_autosave_init), TRUE ); + */ + // ----------- _misc_bitmap_autoreload.init(_("Automatically reload bitmaps"), "options.bitmapautoreload", "value", true); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index ac378bf98..22944d42a 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -169,6 +169,10 @@ protected: PrefCombo _misc_overs_bitmap; PrefCombo _misc_bitmap_editor; PrefCheckButton _misc_bitmap_autoreload; + PrefCheckButton _misc_autosave_enable; + PrefSpinButton _misc_autosave_interval; + PrefEntry _misc_autosave_path; + PrefSpinButton _misc_autosave_max; Gtk::ComboBoxText _cms_display_profile; PrefCheckButton _cms_from_display; |
