aboutsummaryrefslogtreecommitdiff
path: root/gui.py
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2023-03-21 23:49:42 +0100
committerLeonard Kugis <leonard@kug.is>2023-03-21 23:49:42 +0100
commit7c635fed24bba638f10a73fe39134519ecd675bf (patch)
tree52f1097c02e64ea95fda92766e89d0f9b313b2ba /gui.py
parent23ed1ff2254a3bf70aced1f10534e6dd1f2c3a3c (diff)
Split util and tmsu functions
Diffstat (limited to 'gui.py')
-rw-r--r--gui.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui.py b/gui.py
index d84aa0a..8ab062d 100644
--- a/gui.py
+++ b/gui.py
@@ -16,6 +16,7 @@ class GuiMain(object):
self.__predict_images_top = StringVar(self.__master, value=str(args["predict_images_top"]))
self.__gui_tag = BooleanVar(self.__master, value=args["gui_tag"])
self.__open_system = BooleanVar(self.__master, value=args["open_system"])
+ self.__skip_prompt = BooleanVar(self.__master, value=args["skip_prompt"])
self.__index = StringVar(self.__master, value=str(args["index"]))
validate_number = (self.__master.register(self.__validate_number))
@@ -31,9 +32,10 @@ class GuiMain(object):
Entry(self.__master, textvariable=self.__predict_images_top, validate='all', validatecommand=(validate_number, '%P')).grid(row=3, column=1, columnspan=1)
Checkbutton(self.__master, text="Show GUI for tagging", variable=self.__gui_tag).grid(row=4, column=0, columnspan=4, sticky=W)
Checkbutton(self.__master, text="Open all files with system default", variable=self.__open_system).grid(row=5, column=0, columnspan=4, sticky=W)
- Label(self.__master, text="Start at index:").grid(row=6, column=0)
- Entry(self.__master, textvariable=self.__index, validate='all', validatecommand=(validate_number, '%P')).grid(row=6, column=1, columnspan=1)
- Button(self.__master, text="Start", command=self.__master.destroy).grid(row=7, column=0, columnspan=4)
+ Checkbutton(self.__master, text="Skip prompt for file tags", variable=self.__skip_prompt).grid(row=6, column=0, columnspan=4, sticky=W)
+ Label(self.__master, text="Start at index:").grid(row=7, column=0)
+ Entry(self.__master, textvariable=self.__index, validate='all', validatecommand=(validate_number, '%P')).grid(row=7, column=1, columnspan=1)
+ Button(self.__master, text="Start", command=self.__master.destroy).grid(row=8, column=0, columnspan=4)
def loop(self):
self.__master.mainloop()
@@ -44,6 +46,7 @@ class GuiMain(object):
self.__args["predict_images_top"] = int(self.__predict_images_top.get())
self.__args["gui_tag"] = self.__gui_tag.get()
self.__args["open_system"] = self.__open_system.get()
+ self.__args["skip_prompt"] = self.__skip_prompt.get()
self.__args["index"] = int(self.__index.get())
return self.__args