mirror of https://github.com/borgbase/vorta
Add background settings to all non macos (#778)
This commit is contained in:
parent
c99ac04b36
commit
227e06d228
|
@ -14,7 +14,7 @@ import peewee as pw
|
||||||
from playhouse.migrate import SqliteMigrator, migrate
|
from playhouse.migrate import SqliteMigrator, migrate
|
||||||
|
|
||||||
from vorta.i18n import trans_late
|
from vorta.i18n import trans_late
|
||||||
from vorta.utils import slugify, is_system_tray_available
|
from vorta.utils import slugify
|
||||||
|
|
||||||
SCHEMA_VERSION = 16
|
SCHEMA_VERSION = 16
|
||||||
|
|
||||||
|
@ -196,6 +196,7 @@ def _apply_schema_update(current_schema, version_after, *operations):
|
||||||
|
|
||||||
|
|
||||||
def get_misc_settings():
|
def get_misc_settings():
|
||||||
|
''' Global settings that apply per platform '''
|
||||||
# Default settings for all platforms.
|
# Default settings for all platforms.
|
||||||
settings = [
|
settings = [
|
||||||
{
|
{
|
||||||
|
@ -235,6 +236,7 @@ def get_misc_settings():
|
||||||
'key': 'previous_window_height', 'str_value': '600', 'type': 'internal',
|
'key': 'previous_window_height', 'str_value': '600', 'type': 'internal',
|
||||||
'label': 'Previous window height'
|
'label': 'Previous window height'
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
settings += [
|
settings += [
|
||||||
|
@ -249,16 +251,18 @@ def get_misc_settings():
|
||||||
'Include pre-release versions when checking for updates')
|
'Include pre-release versions when checking for updates')
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
if not is_system_tray_available():
|
else:
|
||||||
settings += [{
|
settings += [
|
||||||
'key': 'enable_background_question', 'value': True, 'type': 'checkbox',
|
|
||||||
'label': trans_late('settings',
|
|
||||||
'Display background exit dialog')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'key': 'disable_background_state', 'value': False, 'type': 'internal',
|
'key': 'enable_background_question', 'value': True, 'type': 'checkbox',
|
||||||
'label': 'Previous background exit button state'
|
'label': trans_late('settings',
|
||||||
}]
|
'Display background exit dialog')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'key': 'disable_background_state', 'value': False, 'type': 'internal',
|
||||||
|
'label': 'Previous background exit button state'
|
||||||
|
}
|
||||||
|
]
|
||||||
return settings
|
return settings
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue