Rename background-option to daemonize

This commit is contained in:
Julian Hofer 2019-07-15 09:45:00 +02:00 committed by Hofer-Julian
parent 815df602aa
commit dd9b97b1b8
4 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ def main():
frozen_binary = getattr(sys, 'frozen', False)
want_version = getattr(args, 'version', False)
want_foreground = getattr(args, 'foreground', False)
want_foreground = getattr(args, 'foreground', False) and not getattr(args, 'daemonize', False)
if want_version:
print(f"Vorta {__version__}")

View File

@ -54,7 +54,7 @@ class VortaApp(QtSingleApplication):
self.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
args = parse_args()
if not (hasattr(args, 'background') and args.background):
if not (hasattr(args, 'daemonize') and args.daemonize):
if (hasattr(args, 'foreground') and args.foreground) or SettingsModel.get(key='foreground').value:
self.open_main_window_action()

View File

@ -5,7 +5,7 @@ LINUX_STARTUP_FILE = """\
[Desktop Entry]
Name=Vorta
GenericName=Backup Software
Exec={} --background
Exec={} --daemonize
Terminal=false
Icon=com.borgbase.Vorta
Categories=Utility

View File

@ -182,9 +182,9 @@ def parse_args():
action='store_true',
help="Don't fork into background and open main window on startup.")
if sys.platform.startswith("linux"):
parser.add_argument('--background', '-b',
parser.add_argument('--daemonize', '-d',
action='store_true',
help="Fork into background. This option takes precedence over other settings.")
help="Daemonize and don't open window on startup.")
return parser.parse_known_args()[0]