Skip to content

Commit 739cbbd

Browse files
committed
Added --use-tk setup option
Relates to #471
1 parent 9a35897 commit 739cbbd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ def remove_previous_installation(extension_dir):
282282
help="Bypass minimal requirements check"
283283
)
284284

285+
parser.add_argument(
286+
"--use-tk",
287+
default=False,
288+
action='store_true',
289+
help="Use the Tk Interface (tkinter) for the user interface instead of the GTK3 UI"
290+
)
291+
285292
parser.add_argument(
286293
"--skip-extension-install",
287294
default=False,
@@ -498,6 +505,16 @@ def remove_previous_installation(extension_dir):
498505
dst=args.inkscape_extensions_path,
499506
if_already_exists="overwrite"
500507
)
508+
509+
if args.use_tk:
510+
logger.info("Force usage of Tk Interface (tkinter), setting 'gui_toolkit' to 'tk'")
511+
settings["gui"]["toolkit"] = "tk"
512+
else:
513+
try:
514+
del(settings["gui"]["toolkit"])
515+
except (KeyError, TypeError) as _:
516+
pass
517+
501518
settings.save()
502519

503520
logger.log(SUCCESS, "--> TexText has been SUCCESSFULLY installed on your system <--")

0 commit comments

Comments
 (0)