Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit dcd2566

Browse files
committed
Status is working now
1 parent 3072a06 commit dcd2566

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Converter_UI.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# coding=utf-8
22

33
import vex_convert
4+
import time
45
import os
56
import configparser
67
import logging
8+
import threading
79
from tkinter import *
810
from tkinter.filedialog import *
911
from tkinter import messagebox
@@ -163,7 +165,7 @@ def vex_save_folder_ask():
163165
def safe_command():
164166
print("something is here")
165167

166-
safe_checkbox = Checkbutton(mainframe, text="replace old .vex file", command=safe_command, variable=safe)
168+
safe_checkbox = Checkbutton(mainframe, text="safe", command=safe_command, variable=safe)
167169
safe_checkbox.grid(column=3, row=8, sticky=W)
168170

169171
# ----------------------------------------------------------------------------------------------------------
@@ -222,12 +224,25 @@ def window_close():
222224

223225
root.protocol("WM_DELETE_WINDOW", window_close)
224226

227+
#Status Check
228+
def status_check():
229+
while True:
230+
if code_folder.get() != "" and temp_folder.get() != "" and vex_open.get() != "" and vex_save_folder.get() != "" and vex_save_name.get() != "":
231+
status_show_label["text"] = "Ready"
232+
else:
233+
status_show_label["text"] = "something is not right"
234+
time.sleep(0.5)
235+
status_checker = threading.Thread(target=status_check)
236+
225237
# Start the window
238+
226239
load_config()
227240
if replace.get() is True:
228241
vex_save_folder_button["state"] = "disabled"
229242
vex_save_folder_entry["state"] = "disabled"
230243
vex_save_name_entry["state"] = "disabled"
244+
245+
status_checker.start()
231246
root.mainloop()
232247

233248

0 commit comments

Comments
 (0)