1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-22 15:57:34 +00:00

Add background settings to all non macos (#778)

This commit is contained in:
samuel-w 2021-02-01 19:18:16 -06:00 committed by GitHub
parent c99ac04b36
commit 227e06d228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@
from playhouse.migrate import SqliteMigrator, migrate
from vorta.i18n import trans_late
from vorta.utils import slugify, is_system_tray_available
from vorta.utils import slugify
SCHEMA_VERSION = 16
@ -196,6 +196,7 @@ def _apply_schema_update(current_schema, version_after, *operations):
def get_misc_settings():
''' Global settings that apply per platform '''
# Default settings for all platforms.
settings = [
{
@ -235,6 +236,7 @@ def get_misc_settings():
'key': 'previous_window_height', 'str_value': '600', 'type': 'internal',
'label': 'Previous window height'
},
]
if sys.platform == 'darwin':
settings += [
@ -249,16 +251,18 @@ def get_misc_settings():
'Include pre-release versions when checking for updates')
},
]
if not is_system_tray_available():
settings += [{
'key': 'enable_background_question', 'value': True, 'type': 'checkbox',
'label': trans_late('settings',
'Display background exit dialog')
},
else:
settings += [
{
'key': 'disable_background_state', 'value': False, 'type': 'internal',
'label': 'Previous background exit button state'
}]
'key': 'enable_background_question', 'value': True, 'type': 'checkbox',
'label': trans_late('settings',
'Display background exit dialog')
},
{
'key': 'disable_background_state', 'value': False, 'type': 'internal',
'label': 'Previous background exit button state'
}
]
return settings