From ac6fa9643f3ba2b48f4ef08cdcddfe1019bc851f Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Sat, 14 Mar 2020 22:17:32 -0400 Subject: [PATCH] UI: change default for --window to show --- docs/index.md | 3 ++- lib/solaar/gtk.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index e03fa75e..88a8eb3b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,8 @@ Solaar can be used as a GUI application or via its command-line interface. Both interfaces are able to list the devices paired to a receiver and show information about each device, including battery status for devices that support this feature. Solaar's GUI normally uses an icon in the system tray and starts with its main window hidden. -If Solaar is invoked with the `--window=show` option Solaar starts with its main window visible. +If Solaar is invoked with the `--window=show` option (the default) Solaar starts with its main window visible. +If Solaar is invoked with the `--window=hide` option Solaar starts with its main window hidden. If solaar is invoked with the `--window=only` option Solaar does not set up an icon in the system tray and also starts with its main window showing. For more information on Solaar's command-line interface use the help option, diff --git a/lib/solaar/gtk.py b/lib/solaar/gtk.py index 2aa713c4..614e9b15 100755 --- a/lib/solaar/gtk.py +++ b/lib/solaar/gtk.py @@ -48,7 +48,7 @@ def _parse_arguments(): help='unifying receiver to use; the first detected receiver if unspecified. Example: /dev/hidraw2') arg_parser.add_argument('--restart-on-wake-up', action='store_true', help='restart Solaar on sleep wake-up (experimental)') - arg_parser.add_argument('-w', '--window', choices=('hide','show','only'), help='start with window hidden / showing / only (no tray icon)') + arg_parser.add_argument('-w', '--window', choices=('show','hide','only'), help='start with window showing / hidden / only (no tray icon)') arg_parser.add_argument('-V', '--version', action='version', version='%(prog)s ' + __version__) arg_parser.add_argument('--help-actions', action='store_true', help='print help for the optional actions') @@ -62,7 +62,7 @@ def _parse_arguments(): return if args.window is None: - args.window = 'hide' + args.window = 'show' # default behaviour is to show main window import logging if args.debug > 0: