mirror of https://github.com/borgbase/vorta
Rename background-option to daemonize
This commit is contained in:
parent
815df602aa
commit
dd9b97b1b8
|
@ -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__}")
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue