Merge pull request #274 from SNoiraud/9378
9378: Quick Backup: remember Media (include/exclude) setting
This commit is contained in:
commit
d8077a8169
@ -319,6 +319,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')
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user