From 6675cce1f264d0fa3751bfe4c28d07432e68fc27 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Wed, 16 Nov 2016 12:32:01 +0100 Subject: [PATCH] 9378: Quick Backup: remember Media (include/exclude) setting --- gramps/gen/config.py | 1 + gramps/gui/viewmanager.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/gramps/gen/config.py b/gramps/gen/config.py index ee655d873..293e55ed3 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -317,6 +317,7 @@ register('paths.quick-backup-directory', USER_HOME) register('paths.quick-backup-filename', "%(filename)s_%(year)d-%(month)02d-%(day)02d.%(extension)s") +register('preferences.quick-backup-include-mode', False) register('preferences.date-format', 0) register('preferences.calendar-format-report', 0) register('preferences.cprefix', 'C%04d') diff --git a/gramps/gui/viewmanager.py b/gramps/gui/viewmanager.py index 5a5ea1941..accda53f7 100644 --- a/gramps/gui/viewmanager.py +++ b/gramps/gui/viewmanager.py @@ -1352,6 +1352,11 @@ class ViewManager(CLIManager): _("Exclude")) include.connect("toggled", lambda widget: self.media_toggle(widget, file_entry)) + include_mode = config.get('preferences.quick-backup-include-mode') + if include_mode: + include.set_active(True) + else: + exclude.set_active(True) hbox.pack_start(include, False, True, 0) hbox.pack_end(exclude, False, True, 0) vbox.pack_start(hbox, False, True, 0) @@ -1426,6 +1431,7 @@ class ViewManager(CLIManager): Toggles media include values in the quick backup dialog. """ include = widget.get_active() + config.set('preferences.quick-backup-include-mode', include) extension = "gpkg" if include else "gramps" filename = file_entry.get_text() if "." in filename: