forked from josch/img2pdf
only run gui if requested with --gui even on windows (closes: #73)
This commit is contained in:
parent
0bbbc7a31a
commit
9449f96345
1 changed files with 2 additions and 13 deletions
|
@ -3084,23 +3084,12 @@ Report bugs at https://gitlab.mister-muffin.de/josch/img2pdf/issues
|
||||||
version="%(prog)s " + __version__,
|
version="%(prog)s " + __version__,
|
||||||
help="Prints version information and exits.",
|
help="Prints version information and exits.",
|
||||||
)
|
)
|
||||||
gui_group = parser.add_mutually_exclusive_group(required=False)
|
parser.add_argument(
|
||||||
gui_group.add_argument(
|
|
||||||
"--gui",
|
"--gui",
|
||||||
dest="gui",
|
dest="gui",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="run tkinter gui (default on Windows)",
|
help="run experimental tkinter gui",
|
||||||
)
|
)
|
||||||
gui_group.add_argument(
|
|
||||||
"--nogui",
|
|
||||||
dest="gui",
|
|
||||||
action="store_false",
|
|
||||||
help="don't run tkinter gui (default elsewhere)",
|
|
||||||
)
|
|
||||||
if platform.system() == "Windows":
|
|
||||||
parser.set_defaults(gui=True)
|
|
||||||
else:
|
|
||||||
parser.set_defaults(gui=False)
|
|
||||||
|
|
||||||
outargs = parser.add_argument_group(
|
outargs = parser.add_argument_group(
|
||||||
title="General output arguments",
|
title="General output arguments",
|
||||||
|
|
Loading…
Reference in a new issue