mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 07:43:09 +00:00
Add background settings to all non macos (#778)
This commit is contained in:
parent
c99ac04b36
commit
227e06d228
1 changed files with 14 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue