Merge branch 'UI' into develop
This commit is contained in:
79
VRCT.py
79
VRCT.py
@@ -152,11 +152,15 @@ class App(customtkinter.CTk):
|
|||||||
}
|
}
|
||||||
json.dump(config, fp, indent=4)
|
json.dump(config, fp, indent=4)
|
||||||
|
|
||||||
|
## set UI theme
|
||||||
|
customtkinter.set_appearance_mode(self.APPEARANCE_THEME)
|
||||||
|
customtkinter.set_default_color_theme("blue")
|
||||||
|
|
||||||
# init main window
|
# init main window
|
||||||
self.iconbitmap(os.path.join(os.path.dirname(__file__), "img", "app.ico"))
|
self.iconbitmap(os.path.join(os.path.dirname(__file__), "img", "app.ico"))
|
||||||
self.title("VRCT")
|
self.title("VRCT")
|
||||||
self.geometry(f"{400}x{170}")
|
self.geometry(f"{400}x{175}")
|
||||||
self.minsize(400, 170)
|
self.minsize(400, 175)
|
||||||
self.grid_columnconfigure(1, weight=1)
|
self.grid_columnconfigure(1, weight=1)
|
||||||
self.grid_rowconfigure(0, weight=1)
|
self.grid_rowconfigure(0, weight=1)
|
||||||
|
|
||||||
@@ -168,7 +172,7 @@ class App(customtkinter.CTk):
|
|||||||
# add checkbox translation
|
# add checkbox translation
|
||||||
self.checkbox_translation = customtkinter.CTkCheckBox(
|
self.checkbox_translation = customtkinter.CTkCheckBox(
|
||||||
self.sidebar_frame,
|
self.sidebar_frame,
|
||||||
text="Translation",
|
text="translation",
|
||||||
onvalue=True,
|
onvalue=True,
|
||||||
offvalue=False,
|
offvalue=False,
|
||||||
command=self.checkbox_translation_callback,
|
command=self.checkbox_translation_callback,
|
||||||
@@ -179,7 +183,7 @@ class App(customtkinter.CTk):
|
|||||||
# add checkbox transcription send
|
# add checkbox transcription send
|
||||||
self.checkbox_transcription_send = customtkinter.CTkCheckBox(
|
self.checkbox_transcription_send = customtkinter.CTkCheckBox(
|
||||||
self.sidebar_frame,
|
self.sidebar_frame,
|
||||||
text="TranscriptionSend",
|
text="voice2chatbox",
|
||||||
onvalue=True,
|
onvalue=True,
|
||||||
offvalue=False,
|
offvalue=False,
|
||||||
command=self.checkbox_transcription_send_callback,
|
command=self.checkbox_transcription_send_callback,
|
||||||
@@ -190,7 +194,7 @@ class App(customtkinter.CTk):
|
|||||||
# add checkbox transcription receive
|
# add checkbox transcription receive
|
||||||
self.checkbox_transcription_receive = customtkinter.CTkCheckBox(
|
self.checkbox_transcription_receive = customtkinter.CTkCheckBox(
|
||||||
self.sidebar_frame,
|
self.sidebar_frame,
|
||||||
text="TranscriptionReceive",
|
text="speaker2log",
|
||||||
onvalue=True,
|
onvalue=True,
|
||||||
offvalue=False,
|
offvalue=False,
|
||||||
command=self.checkbox_transcription_receive_callback,
|
command=self.checkbox_transcription_receive_callback,
|
||||||
@@ -201,7 +205,7 @@ class App(customtkinter.CTk):
|
|||||||
# add checkbox foreground
|
# add checkbox foreground
|
||||||
self.checkbox_foreground = customtkinter.CTkCheckBox(
|
self.checkbox_foreground = customtkinter.CTkCheckBox(
|
||||||
self.sidebar_frame,
|
self.sidebar_frame,
|
||||||
text="Foreground",
|
text="foreground",
|
||||||
onvalue=True,
|
onvalue=True,
|
||||||
offvalue=False,
|
offvalue=False,
|
||||||
command=self.checkbox_foreground_callback,
|
command=self.checkbox_foreground_callback,
|
||||||
@@ -233,17 +237,29 @@ class App(customtkinter.CTk):
|
|||||||
|
|
||||||
# add tabview textbox
|
# add tabview textbox
|
||||||
self.tabview_logs = customtkinter.CTkTabview(master=self)
|
self.tabview_logs = customtkinter.CTkTabview(master=self)
|
||||||
|
self.tabview_logs.add("log")
|
||||||
self.tabview_logs.add("send")
|
self.tabview_logs.add("send")
|
||||||
self.tabview_logs.add("receive")
|
self.tabview_logs.add("receive")
|
||||||
self.tabview_logs.add("system")
|
self.tabview_logs.add("system")
|
||||||
self.tabview_logs.grid(row=0, column=1, padx=5, pady=0, sticky="nsew")
|
self.tabview_logs.grid(row=0, column=1, padx=0, pady=0, sticky="nsew")
|
||||||
self.tabview_logs._segmented_button.grid(sticky="W")
|
self.tabview_logs._segmented_button.grid(sticky="W")
|
||||||
|
self.tabview_logs.tab("log").grid_rowconfigure(0, weight=1)
|
||||||
|
self.tabview_logs.tab("log").grid_columnconfigure(0, weight=1)
|
||||||
self.tabview_logs.tab("send").grid_rowconfigure(0, weight=1)
|
self.tabview_logs.tab("send").grid_rowconfigure(0, weight=1)
|
||||||
self.tabview_logs.tab("send").grid_columnconfigure(0, weight=1)
|
self.tabview_logs.tab("send").grid_columnconfigure(0, weight=1)
|
||||||
self.tabview_logs.tab("receive").grid_rowconfigure(0, weight=1)
|
self.tabview_logs.tab("receive").grid_rowconfigure(0, weight=1)
|
||||||
self.tabview_logs.tab("receive").grid_columnconfigure(0, weight=1)
|
self.tabview_logs.tab("receive").grid_columnconfigure(0, weight=1)
|
||||||
self.tabview_logs.tab("system").grid_rowconfigure(0, weight=1)
|
self.tabview_logs.tab("system").grid_rowconfigure(0, weight=1)
|
||||||
self.tabview_logs.tab("system").grid_columnconfigure(0, weight=1)
|
self.tabview_logs.tab("system").grid_columnconfigure(0, weight=1)
|
||||||
|
self.tabview_logs.configure(fg_color="transparent")
|
||||||
|
|
||||||
|
# add textbox message log
|
||||||
|
self.textbox_message_log = customtkinter.CTkTextbox(
|
||||||
|
self.tabview_logs.tab("log"),
|
||||||
|
font=customtkinter.CTkFont(family=self.FONT_FAMILY)
|
||||||
|
)
|
||||||
|
self.textbox_message_log.grid(row=0, column=0, padx=0, pady=0, sticky="nsew")
|
||||||
|
self.textbox_message_log.configure(state='disabled')
|
||||||
|
|
||||||
# add textbox message send log
|
# add textbox message send log
|
||||||
self.textbox_message_send_log = customtkinter.CTkTextbox(
|
self.textbox_message_send_log = customtkinter.CTkTextbox(
|
||||||
@@ -275,14 +291,15 @@ class App(customtkinter.CTk):
|
|||||||
placeholder_text="message",
|
placeholder_text="message",
|
||||||
font=customtkinter.CTkFont(family=self.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_message_box.grid(row=1, column=1, columnspan=2, padx=(10, 10), pady=(5, 10), sticky="nsew")
|
self.entry_message_box.grid(row=1, column=1, columnspan=2, padx=5, pady=(5, 10), sticky="nsew")
|
||||||
|
|
||||||
# set default values
|
# set default values
|
||||||
## set translator instance
|
## set translator instance
|
||||||
self.translator = translation.Translator()
|
self.translator = translation.Translator()
|
||||||
if self.translator.authentication(self.CHOICE_TRANSLATOR, self.AUTH_KEYS[self.CHOICE_TRANSLATOR]) is False:
|
if self.translator.authentication(self.CHOICE_TRANSLATOR, self.AUTH_KEYS[self.CHOICE_TRANSLATOR]) is False:
|
||||||
# error update Auth key
|
# error update Auth key
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[error] Auth Key or language setting is incorrect")
|
utils.print_textbox(self.textbox_message_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
|
||||||
## set transcription instance
|
## set transcription instance
|
||||||
self.vr = transcription.VoiceRecognizer()
|
self.vr = transcription.VoiceRecognizer()
|
||||||
@@ -333,10 +350,6 @@ class App(customtkinter.CTk):
|
|||||||
new_scaling_float = int(self.UI_SCALING.replace("%", "")) / 100
|
new_scaling_float = int(self.UI_SCALING.replace("%", "")) / 100
|
||||||
customtkinter.set_widget_scaling(new_scaling_float)
|
customtkinter.set_widget_scaling(new_scaling_float)
|
||||||
|
|
||||||
## set UI theme
|
|
||||||
customtkinter.set_appearance_mode(self.APPEARANCE_THEME)
|
|
||||||
customtkinter.set_default_color_theme("blue")
|
|
||||||
|
|
||||||
# delete window
|
# delete window
|
||||||
self.protocol("WM_DELETE_WINDOW", self.delete_window)
|
self.protocol("WM_DELETE_WINDOW", self.delete_window)
|
||||||
|
|
||||||
@@ -353,15 +366,18 @@ class App(customtkinter.CTk):
|
|||||||
def checkbox_translation_callback(self):
|
def checkbox_translation_callback(self):
|
||||||
self.ENABLE_TRANSLATION = self.checkbox_translation.get()
|
self.ENABLE_TRANSLATION = self.checkbox_translation.get()
|
||||||
if self.ENABLE_TRANSLATION:
|
if self.ENABLE_TRANSLATION:
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[info] Start translation")
|
utils.print_textbox(self.textbox_message_log, "Start translation", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Start translation", "INFO")
|
||||||
else:
|
else:
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[info] Stop translation")
|
utils.print_textbox(self.textbox_message_log, "Stop translation", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Stop translation", "INFO")
|
||||||
utils.save_json(self.PATH_CONFIG, "ENABLE_TRANSLATION", self.ENABLE_TRANSLATION)
|
utils.save_json(self.PATH_CONFIG, "ENABLE_TRANSLATION", self.ENABLE_TRANSLATION)
|
||||||
|
|
||||||
def checkbox_transcription_send_callback(self):
|
def checkbox_transcription_send_callback(self):
|
||||||
self.ENABLE_TRANSCRIPTION_SEND = self.checkbox_transcription_send.get()
|
self.ENABLE_TRANSCRIPTION_SEND = self.checkbox_transcription_send.get()
|
||||||
if self.ENABLE_TRANSCRIPTION_SEND is True:
|
if self.ENABLE_TRANSCRIPTION_SEND is True:
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[info] Start sending transcription from your voice")
|
utils.print_textbox(self.textbox_message_log, "Start voice2chatbox", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Start voice2chatbox", "INFO")
|
||||||
# start threading
|
# start threading
|
||||||
self.vr.set_mic(
|
self.vr.set_mic(
|
||||||
device_name=self.CHOICE_MIC_DEVICE,
|
device_name=self.CHOICE_MIC_DEVICE,
|
||||||
@@ -379,13 +395,15 @@ class App(customtkinter.CTk):
|
|||||||
if isinstance(self.th_vr_recognize_mic, utils.thread_fnc):
|
if isinstance(self.th_vr_recognize_mic, utils.thread_fnc):
|
||||||
self.th_vr_recognize_mic.stop()
|
self.th_vr_recognize_mic.stop()
|
||||||
|
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[info] Stop sending transcription from your voice")
|
utils.print_textbox(self.textbox_message_log, "Stop voice2chatbox", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Stop voice2chatbox", "INFO")
|
||||||
utils.save_json(self.PATH_CONFIG, "ENABLE_TRANSCRIPTION_SEND", self.ENABLE_TRANSCRIPTION_SEND)
|
utils.save_json(self.PATH_CONFIG, "ENABLE_TRANSCRIPTION_SEND", self.ENABLE_TRANSCRIPTION_SEND)
|
||||||
|
|
||||||
def checkbox_transcription_receive_callback(self):
|
def checkbox_transcription_receive_callback(self):
|
||||||
self.ENABLE_TRANSCRIPTION_RECEIVE = self.checkbox_transcription_receive.get()
|
self.ENABLE_TRANSCRIPTION_RECEIVE = self.checkbox_transcription_receive.get()
|
||||||
if self.ENABLE_TRANSCRIPTION_RECEIVE is True:
|
if self.ENABLE_TRANSCRIPTION_RECEIVE is True:
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[info] Start transcription of speaker's voice")
|
utils.print_textbox(self.textbox_message_log, "Start speaker2log", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Start speaker2log", "INFO")
|
||||||
# start threading
|
# start threading
|
||||||
self.vr.set_spk(
|
self.vr.set_spk(
|
||||||
device_name=self.CHOICE_SPEAKER_DEVICE,
|
device_name=self.CHOICE_SPEAKER_DEVICE,
|
||||||
@@ -404,7 +422,8 @@ class App(customtkinter.CTk):
|
|||||||
if isinstance(self.th_vr_recognize_spk, utils.thread_fnc):
|
if isinstance(self.th_vr_recognize_spk, utils.thread_fnc):
|
||||||
self.th_vr_recognize_spk.stop()
|
self.th_vr_recognize_spk.stop()
|
||||||
|
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[info] Stop transcription of speaker's voice")
|
utils.print_textbox(self.textbox_message_log, "Stop speaker2log", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Stop speaker2log", "INFO")
|
||||||
utils.save_json(self.PATH_CONFIG, "ENABLE_TRANSCRIPTION_RECEIVE", self.ENABLE_TRANSCRIPTION_RECEIVE)
|
utils.save_json(self.PATH_CONFIG, "ENABLE_TRANSCRIPTION_RECEIVE", self.ENABLE_TRANSCRIPTION_RECEIVE)
|
||||||
|
|
||||||
def vr_listen_mic(self):
|
def vr_listen_mic(self):
|
||||||
@@ -417,7 +436,8 @@ class App(customtkinter.CTk):
|
|||||||
if self.checkbox_translation.get() is False:
|
if self.checkbox_translation.get() is False:
|
||||||
voice_message = f"{message}"
|
voice_message = f"{message}"
|
||||||
elif self.translator.translator_status[self.CHOICE_TRANSLATOR] is False:
|
elif self.translator.translator_status[self.CHOICE_TRANSLATOR] is False:
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[error] Auth Key or language setting is incorrect")
|
utils.print_textbox(self.textbox_message_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
voice_message = f"{message}"
|
voice_message = f"{message}"
|
||||||
else:
|
else:
|
||||||
result = self.translator.translate(
|
result = self.translator.translate(
|
||||||
@@ -430,7 +450,8 @@ class App(customtkinter.CTk):
|
|||||||
# send OSC message
|
# send OSC message
|
||||||
osc_tools.send_message(voice_message, self.OSC_IP_ADDRESS, self.OSC_PORT)
|
osc_tools.send_message(voice_message, self.OSC_IP_ADDRESS, self.OSC_PORT)
|
||||||
# update textbox message log
|
# update textbox message log
|
||||||
utils.print_textbox(self.textbox_message_send_log, f"[voice] {voice_message}")
|
utils.print_textbox(self.textbox_message_log, f"{voice_message}", "SEND")
|
||||||
|
utils.print_textbox(self.textbox_message_send_log, f"{voice_message}", "SEND")
|
||||||
|
|
||||||
def vr_listen_spk(self):
|
def vr_listen_spk(self):
|
||||||
self.vr.listen_spk()
|
self.vr.listen_spk()
|
||||||
@@ -442,7 +463,8 @@ class App(customtkinter.CTk):
|
|||||||
if self.checkbox_translation.get() is False:
|
if self.checkbox_translation.get() is False:
|
||||||
voice_message = f"{message}"
|
voice_message = f"{message}"
|
||||||
elif self.translator.translator_status[self.CHOICE_TRANSLATOR] is False:
|
elif self.translator.translator_status[self.CHOICE_TRANSLATOR] is False:
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[error] Auth Key or language setting is incorrect")
|
utils.print_textbox(self.textbox_message_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
voice_message = f"{message}"
|
voice_message = f"{message}"
|
||||||
else:
|
else:
|
||||||
result = self.translator.translate(
|
result = self.translator.translate(
|
||||||
@@ -455,14 +477,19 @@ class App(customtkinter.CTk):
|
|||||||
# send OSC message
|
# send OSC message
|
||||||
# osc_tools.send_message(voice_message, self.OSC_IP_ADDRESS, self.OSC_PORT)
|
# osc_tools.send_message(voice_message, self.OSC_IP_ADDRESS, self.OSC_PORT)
|
||||||
# update textbox message receive log
|
# update textbox message receive log
|
||||||
utils.print_textbox(self.textbox_message_receive_log, f"[voice] {voice_message}")
|
utils.print_textbox(self.textbox_message_log, f"{voice_message}", "RECEIVE")
|
||||||
|
utils.print_textbox(self.textbox_message_receive_log, f"{voice_message}", "RECEIVE")
|
||||||
|
|
||||||
def checkbox_foreground_callback(self):
|
def checkbox_foreground_callback(self):
|
||||||
self.ENABLE_FOREGROUND = self.checkbox_foreground.get()
|
self.ENABLE_FOREGROUND = self.checkbox_foreground.get()
|
||||||
if self.ENABLE_FOREGROUND:
|
if self.ENABLE_FOREGROUND:
|
||||||
self.attributes("-topmost", True)
|
self.attributes("-topmost", True)
|
||||||
|
utils.print_textbox(self.textbox_message_log, "Start foreground", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Start foreground", "INFO")
|
||||||
else:
|
else:
|
||||||
self.attributes("-topmost", False)
|
self.attributes("-topmost", False)
|
||||||
|
utils.print_textbox(self.textbox_message_log, "Stop foreground", "INFO")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Stop foreground", "INFO")
|
||||||
utils.save_json(self.PATH_CONFIG, "ENABLE_FOREGROUND", self.ENABLE_FOREGROUND)
|
utils.save_json(self.PATH_CONFIG, "ENABLE_FOREGROUND", self.ENABLE_FOREGROUND)
|
||||||
|
|
||||||
def entry_message_box_press_key_enter(self, event):
|
def entry_message_box_press_key_enter(self, event):
|
||||||
@@ -478,7 +505,8 @@ class App(customtkinter.CTk):
|
|||||||
if self.checkbox_translation.get() is False:
|
if self.checkbox_translation.get() is False:
|
||||||
chat_message = f"{message}"
|
chat_message = f"{message}"
|
||||||
elif self.translator.translator_status[self.CHOICE_TRANSLATOR] is False:
|
elif self.translator.translator_status[self.CHOICE_TRANSLATOR] is False:
|
||||||
utils.print_textbox(self.textbox_message_system_log, "[error] Auth Key or language setting is incorrect")
|
utils.print_textbox(self.textbox_message_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
utils.print_textbox(self.textbox_message_system_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
chat_message = f"{message}"
|
chat_message = f"{message}"
|
||||||
else:
|
else:
|
||||||
result = self.translator.translate(
|
result = self.translator.translate(
|
||||||
@@ -493,7 +521,8 @@ class App(customtkinter.CTk):
|
|||||||
osc_tools.send_message(chat_message, self.OSC_IP_ADDRESS, self.OSC_PORT)
|
osc_tools.send_message(chat_message, self.OSC_IP_ADDRESS, self.OSC_PORT)
|
||||||
|
|
||||||
# update textbox message log
|
# update textbox message log
|
||||||
utils.print_textbox(self.textbox_message_send_log, f"[chat] {chat_message}")
|
utils.print_textbox(self.textbox_message_log, f"{chat_message}", "SEND")
|
||||||
|
utils.print_textbox(self.textbox_message_send_log, f"{chat_message}", "SEND")
|
||||||
|
|
||||||
# delete message in entry message box
|
# delete message in entry message box
|
||||||
# self.entry_message_box.delete(0, customtkinter.END)
|
# self.entry_message_box.delete(0, customtkinter.END)
|
||||||
|
|||||||
13
utils.py
13
utils.py
@@ -1,6 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import datetime
|
import datetime
|
||||||
import threading
|
import threading
|
||||||
|
import tkinter as tk
|
||||||
|
|
||||||
def save_json(path, key, value):
|
def save_json(path, key, value):
|
||||||
with open(path, "r") as fp:
|
with open(path, "r") as fp:
|
||||||
@@ -9,11 +10,19 @@ def save_json(path, key, value):
|
|||||||
with open(path, "w") as fp:
|
with open(path, "w") as fp:
|
||||||
json.dump(json_data, fp, indent=4)
|
json.dump(json_data, fp, indent=4)
|
||||||
|
|
||||||
def print_textbox(textbox, message):
|
def print_textbox(textbox, message, tags=None):
|
||||||
now = datetime.datetime.now()
|
now = datetime.datetime.now()
|
||||||
now = now.strftime('%H:%M:%S')
|
now = now.strftime('%H:%M:%S')
|
||||||
|
|
||||||
|
textbox.tag_config("ERROR", foreground="#FF0000")
|
||||||
|
textbox.tag_config("INFO", foreground="#1BFF00")
|
||||||
|
textbox.tag_config("SEND", foreground="#0378e2")
|
||||||
|
textbox.tag_config("RECEIVE", foreground="#ffa500")
|
||||||
|
|
||||||
textbox.configure(state='normal')
|
textbox.configure(state='normal')
|
||||||
textbox.insert("end", f"[{now}]{message}\n")
|
textbox.insert("end", f"[{now}][")
|
||||||
|
textbox.insert("end", f"{tags}", tags)
|
||||||
|
textbox.insert("end", f"]{message}\n")
|
||||||
textbox.configure(state='disabled')
|
textbox.configure(state='disabled')
|
||||||
textbox.see("end")
|
textbox.see("end")
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
command=self.slider_transparency_callback,
|
command=self.slider_transparency_callback,
|
||||||
variable=tk.DoubleVar(value=self.parent.TRANSPARENCY),
|
variable=tk.DoubleVar(value=self.parent.TRANSPARENCY),
|
||||||
)
|
)
|
||||||
self.slider_transparency.grid(row=0, column=1, columnspan=3, padx=5, pady=10, sticky="nsew")
|
self.slider_transparency.grid(row=0, column=1, columnspan=1, padx=5, pady=10, sticky="nsew")
|
||||||
|
|
||||||
## optionmenu theme
|
## optionmenu theme
|
||||||
self.label_appearance_theme = customtkinter.CTkLabel(
|
self.label_appearance_theme = customtkinter.CTkLabel(
|
||||||
@@ -62,7 +62,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
command=self.optionmenu_theme_callback,
|
command=self.optionmenu_theme_callback,
|
||||||
variable=customtkinter.StringVar(value=self.parent.APPEARANCE_THEME)
|
variable=customtkinter.StringVar(value=self.parent.APPEARANCE_THEME)
|
||||||
)
|
)
|
||||||
self.optionmenu_appearance_theme.grid(row=1, column=1, columnspan=3, padx=5, pady=5, sticky="nsew")
|
self.optionmenu_appearance_theme.grid(row=1, column=1, columnspan=1, padx=5, pady=5, sticky="nsew")
|
||||||
|
|
||||||
## optionmenu UI scaling
|
## optionmenu UI scaling
|
||||||
self.label_ui_scaling = customtkinter.CTkLabel(
|
self.label_ui_scaling = customtkinter.CTkLabel(
|
||||||
@@ -78,7 +78,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
command=self.optionmenu_ui_scaling_callback,
|
command=self.optionmenu_ui_scaling_callback,
|
||||||
variable=customtkinter.StringVar(value=self.parent.UI_SCALING)
|
variable=customtkinter.StringVar(value=self.parent.UI_SCALING)
|
||||||
)
|
)
|
||||||
self.optionmenu_ui_scaling.grid(row=2, column=1, columnspan=3, padx=5, pady=5, sticky="nsew")
|
self.optionmenu_ui_scaling.grid(row=2, column=1, columnspan=1, padx=5, pady=5, sticky="nsew")
|
||||||
|
|
||||||
## optionmenu font family
|
## optionmenu font family
|
||||||
self.label_font_family = customtkinter.CTkLabel(
|
self.label_font_family = customtkinter.CTkLabel(
|
||||||
@@ -95,7 +95,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
command=self.optionmenu_font_family_callback,
|
command=self.optionmenu_font_family_callback,
|
||||||
variable=customtkinter.StringVar(value=self.parent.FONT_FAMILY)
|
variable=customtkinter.StringVar(value=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.optionmenu_font_family.grid(row=3, column=1, columnspan=3, padx=5, pady=5, sticky="nsew")
|
self.optionmenu_font_family.grid(row=3, column=1, columnspan=1, padx=5, pady=5, sticky="nsew")
|
||||||
|
|
||||||
# tab Translation
|
# tab Translation
|
||||||
## optionmenu translation translator
|
## optionmenu translation translator
|
||||||
@@ -207,7 +207,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
||||||
variable=customtkinter.StringVar(value=self.parent.CHOICE_MIC_DEVICE)
|
variable=customtkinter.StringVar(value=self.parent.CHOICE_MIC_DEVICE)
|
||||||
)
|
)
|
||||||
self.optionmenu_input_mic_device.grid(row=0, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.optionmenu_input_mic_device.grid(row=0, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
|
|
||||||
## optionmenu input mic voice language
|
## optionmenu input mic voice language
|
||||||
self.label_input_mic_voice_language = customtkinter.CTkLabel(
|
self.label_input_mic_voice_language = customtkinter.CTkLabel(
|
||||||
@@ -224,7 +224,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
||||||
variable=customtkinter.StringVar(value=self.parent.INPUT_MIC_VOICE_LANGUAGE)
|
variable=customtkinter.StringVar(value=self.parent.INPUT_MIC_VOICE_LANGUAGE)
|
||||||
)
|
)
|
||||||
self.optionmenu_input_mic_voice_language.grid(row=1, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.optionmenu_input_mic_voice_language.grid(row=1, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
|
|
||||||
## checkbox input mic in dynamic
|
## checkbox input mic in dynamic
|
||||||
self.label_input_mic_is_dynamic = customtkinter.CTkLabel(
|
self.label_input_mic_is_dynamic = customtkinter.CTkLabel(
|
||||||
@@ -242,7 +242,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
command=self.checkbox_input_mic_is_dynamic_callback,
|
command=self.checkbox_input_mic_is_dynamic_callback,
|
||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.checkbox_input_mic_is_dynamic.grid(row=2, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.checkbox_input_mic_is_dynamic.grid(row=2, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
if self.parent.INPUT_MIC_IS_DYNAMIC is True:
|
if self.parent.INPUT_MIC_IS_DYNAMIC is True:
|
||||||
self.checkbox_input_mic_is_dynamic.select()
|
self.checkbox_input_mic_is_dynamic.select()
|
||||||
else:
|
else:
|
||||||
@@ -261,7 +261,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
textvariable=customtkinter.StringVar(value=self.parent.INPUT_MIC_THRESHOLD),
|
textvariable=customtkinter.StringVar(value=self.parent.INPUT_MIC_THRESHOLD),
|
||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_input_mic_threshold.grid(row=3, column=1, columnspan=3 ,padx=5, pady=10, sticky="nsew")
|
self.entry_input_mic_threshold.grid(row=3, column=1, columnspan=1 ,padx=5, pady=10, sticky="nsew")
|
||||||
self.entry_input_mic_threshold.bind("<Any-KeyRelease>", self.entry_input_mic_threshold_callback)
|
self.entry_input_mic_threshold.bind("<Any-KeyRelease>", self.entry_input_mic_threshold_callback)
|
||||||
|
|
||||||
## optionmenu input speaker device
|
## optionmenu input speaker device
|
||||||
@@ -279,7 +279,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
||||||
variable=customtkinter.StringVar(value=self.parent.CHOICE_SPEAKER_DEVICE),
|
variable=customtkinter.StringVar(value=self.parent.CHOICE_SPEAKER_DEVICE),
|
||||||
)
|
)
|
||||||
self.optionmenu_input_speaker_device.grid(row=4, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.optionmenu_input_speaker_device.grid(row=4, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
|
|
||||||
## optionmenu input speaker voice language
|
## optionmenu input speaker voice language
|
||||||
self.label_input_speaker_voice_language = customtkinter.CTkLabel(
|
self.label_input_speaker_voice_language = customtkinter.CTkLabel(
|
||||||
@@ -296,7 +296,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY),
|
||||||
variable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_VOICE_LANGUAGE),
|
variable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_VOICE_LANGUAGE),
|
||||||
)
|
)
|
||||||
self.optionmenu_input_speaker_voice_language.grid(row=5, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.optionmenu_input_speaker_voice_language.grid(row=5, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
|
|
||||||
## entry input speaker sampling rate
|
## entry input speaker sampling rate
|
||||||
self.label_input_speaker_sampling_rate = customtkinter.CTkLabel(
|
self.label_input_speaker_sampling_rate = customtkinter.CTkLabel(
|
||||||
@@ -311,7 +311,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
textvariable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_SAMPLING_RATE),
|
textvariable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_SAMPLING_RATE),
|
||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_input_speaker_sampling_rate.grid(row=6, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.entry_input_speaker_sampling_rate.grid(row=6, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
self.entry_input_speaker_sampling_rate.bind("<Any-KeyRelease>", self.entry_input_speaker_sampling_rate_callback)
|
self.entry_input_speaker_sampling_rate.bind("<Any-KeyRelease>", self.entry_input_speaker_sampling_rate_callback)
|
||||||
|
|
||||||
## entry input speaker interval
|
## entry input speaker interval
|
||||||
@@ -327,7 +327,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
textvariable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_INTERVAL),
|
textvariable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_INTERVAL),
|
||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_input_speaker_interval.grid(row=7, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.entry_input_speaker_interval.grid(row=7, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
self.entry_input_speaker_interval.bind("<Any-KeyRelease>", self.entry_input_speaker_interval_callback)
|
self.entry_input_speaker_interval.bind("<Any-KeyRelease>", self.entry_input_speaker_interval_callback)
|
||||||
|
|
||||||
## entry input speaker buffer size
|
## entry input speaker buffer size
|
||||||
@@ -343,7 +343,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
textvariable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_BUFFER_SIZE),
|
textvariable=customtkinter.StringVar(value=self.parent.INPUT_SPEAKER_BUFFER_SIZE),
|
||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_input_speaker_buffer_size.grid(row=8, column=1, columnspan=3 ,padx=5, pady=5, sticky="nsew")
|
self.entry_input_speaker_buffer_size.grid(row=8, column=1, columnspan=1 ,padx=5, pady=5, sticky="nsew")
|
||||||
self.entry_input_speaker_buffer_size.bind("<Any-KeyRelease>", self.entry_input_speaker_buffer_size_callback)
|
self.entry_input_speaker_buffer_size.bind("<Any-KeyRelease>", self.entry_input_speaker_buffer_size_callback)
|
||||||
|
|
||||||
# tab Parameter
|
# tab Parameter
|
||||||
@@ -361,14 +361,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_ip_address.grid(row=0, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
self.entry_ip_address.grid(row=0, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
||||||
self.button_ip_address = customtkinter.CTkButton(
|
self.entry_ip_address.bind("<Any-KeyRelease>", self.entry_ip_address_callback)
|
||||||
self.tabview_config.tab("Parameter"),
|
|
||||||
text="",
|
|
||||||
width=1,
|
|
||||||
command=self.update_ip_address,
|
|
||||||
image=customtkinter.CTkImage(Image.open(os.path.join(os.path.dirname(__file__), "img", "save-icon.png")))
|
|
||||||
)
|
|
||||||
self.button_ip_address.grid(row=0, column=2, columnspan=1, padx=5, pady=5, sticky="nsew")
|
|
||||||
|
|
||||||
## entry port
|
## entry port
|
||||||
self.label_port = customtkinter.CTkLabel(
|
self.label_port = customtkinter.CTkLabel(
|
||||||
@@ -384,14 +377,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_port.grid(row=1, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
self.entry_port.grid(row=1, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
||||||
self.button_port = customtkinter.CTkButton(
|
self.entry_port.bind("<Any-KeyRelease>", self.entry_port_callback)
|
||||||
self.tabview_config.tab("Parameter"),
|
|
||||||
text="",
|
|
||||||
width=1,
|
|
||||||
command=self.update_port,
|
|
||||||
image=customtkinter.CTkImage(Image.open(os.path.join(os.path.dirname(__file__), "img", "save-icon.png")))
|
|
||||||
)
|
|
||||||
self.button_port.grid(row=1, column=2, columnspan=1, padx=5, pady=5, sticky="nsew")
|
|
||||||
|
|
||||||
## entry authkey
|
## entry authkey
|
||||||
self.label_authkey = customtkinter.CTkLabel(
|
self.label_authkey = customtkinter.CTkLabel(
|
||||||
@@ -407,14 +393,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_authkey.grid(row=2, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
self.entry_authkey.grid(row=2, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
||||||
self.button_authkey = customtkinter.CTkButton(
|
self.entry_authkey.bind("<Any-KeyRelease>", self.entry_authkey_callback)
|
||||||
self.tabview_config.tab("Parameter"),
|
|
||||||
text="",
|
|
||||||
width=1,
|
|
||||||
command=self.update_authkey,
|
|
||||||
image=customtkinter.CTkImage(Image.open(os.path.join(os.path.dirname(__file__), "img", "save-icon.png")))
|
|
||||||
)
|
|
||||||
self.button_authkey.grid(row=2, column=2, columnspan=1, padx=5, pady=5, sticky="nsew")
|
|
||||||
|
|
||||||
## entry message format
|
## entry message format
|
||||||
self.label_message_format = customtkinter.CTkLabel(
|
self.label_message_format = customtkinter.CTkLabel(
|
||||||
@@ -430,14 +409,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
font=customtkinter.CTkFont(family=self.parent.FONT_FAMILY)
|
||||||
)
|
)
|
||||||
self.entry_message_format.grid(row=3, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
self.entry_message_format.grid(row=3, column=1, columnspan=1, padx=1, pady=5, sticky="nsew")
|
||||||
self.button_message_format = customtkinter.CTkButton(
|
self.entry_message_format.bind("<Any-KeyRelease>", self.entry_message_format_callback)
|
||||||
self.tabview_config.tab("Parameter"),
|
|
||||||
text="",
|
|
||||||
width=1,
|
|
||||||
command=self.update_message_format,
|
|
||||||
image=customtkinter.CTkImage(Image.open(os.path.join(os.path.dirname(__file__), "img", "save-icon.png")))
|
|
||||||
)
|
|
||||||
self.button_message_format.grid(row=3, column=2, columnspan=1, padx=5, pady=5, sticky="nsew")
|
|
||||||
|
|
||||||
def slider_transparency_callback(self, value):
|
def slider_transparency_callback(self, value):
|
||||||
self.parent.wm_attributes("-alpha", value/100)
|
self.parent.wm_attributes("-alpha", value/100)
|
||||||
@@ -514,6 +486,7 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
self.parent.checkbox_transcription_send.configure(font=customtkinter.CTkFont(family=choice))
|
self.parent.checkbox_transcription_send.configure(font=customtkinter.CTkFont(family=choice))
|
||||||
self.parent.checkbox_transcription_receive.configure(font=customtkinter.CTkFont(family=choice))
|
self.parent.checkbox_transcription_receive.configure(font=customtkinter.CTkFont(family=choice))
|
||||||
self.parent.checkbox_foreground.configure(font=customtkinter.CTkFont(family=choice))
|
self.parent.checkbox_foreground.configure(font=customtkinter.CTkFont(family=choice))
|
||||||
|
self.parent.textbox_message_log.configure(font=customtkinter.CTkFont(family=choice))
|
||||||
self.parent.textbox_message_send_log.configure(font=customtkinter.CTkFont(family=choice))
|
self.parent.textbox_message_send_log.configure(font=customtkinter.CTkFont(family=choice))
|
||||||
self.parent.textbox_message_receive_log.configure(font=customtkinter.CTkFont(family=choice))
|
self.parent.textbox_message_receive_log.configure(font=customtkinter.CTkFont(family=choice))
|
||||||
self.parent.textbox_message_system_log.configure(font=customtkinter.CTkFont(family=choice))
|
self.parent.textbox_message_system_log.configure(font=customtkinter.CTkFont(family=choice))
|
||||||
@@ -531,7 +504,8 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
|
|
||||||
def optionmenu_translation_translator_callback(self, choice):
|
def optionmenu_translation_translator_callback(self, choice):
|
||||||
if self.parent.translator.authentication(choice, self.parent.AUTH_KEYS[choice]) is False:
|
if self.parent.translator.authentication(choice, self.parent.AUTH_KEYS[choice]) is False:
|
||||||
utils.print_textbox(self.parent.textbox_message_system_log, f"[error] Auth Key or language setting is incorrect")
|
utils.print_textbox(self.parent.textbox_message_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
utils.print_textbox(self.parent.textbox_message_system_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
else:
|
else:
|
||||||
self.optionmenu_translation_input_source_language.configure(
|
self.optionmenu_translation_input_source_language.configure(
|
||||||
values=self.parent.translator.languages[choice],
|
values=self.parent.translator.languages[choice],
|
||||||
@@ -610,28 +584,27 @@ class ToplevelWindowConfig(customtkinter.CTkToplevel):
|
|||||||
self.parent.INPUT_SPEAKER_BUFFER_SIZE = int(self.entry_input_speaker_buffer_size.get())
|
self.parent.INPUT_SPEAKER_BUFFER_SIZE = int(self.entry_input_speaker_buffer_size.get())
|
||||||
utils.save_json(self.parent.PATH_CONFIG, "INPUT_SPEAKER_BUFFER_SIZE", self.parent.INPUT_SPEAKER_BUFFER_SIZE)
|
utils.save_json(self.parent.PATH_CONFIG, "INPUT_SPEAKER_BUFFER_SIZE", self.parent.INPUT_SPEAKER_BUFFER_SIZE)
|
||||||
|
|
||||||
def update_ip_address(self):
|
def entry_ip_address_callback(self, event):
|
||||||
value = self.entry_ip_address.get()
|
self.parent.OSC_IP_ADDRESS = self.entry_ip_address.get()
|
||||||
if len(value) > 0:
|
utils.save_json(self.parent.PATH_CONFIG, "OSC_IP_ADDRESS", self.parent.OSC_IP_ADDRESS)
|
||||||
self.parent.OSC_IP_ADDRESS = value
|
|
||||||
utils.save_json(self.parent.PATH_CONFIG, "OSC_IP_ADDRESS", self.parent.OSC_IP_ADDRESS)
|
|
||||||
|
|
||||||
def update_port(self):
|
def entry_port_callback(self, event):
|
||||||
value = self.entry_port.get()
|
self.parent.OSC_PORT = self.entry_port.get()
|
||||||
if len(value) > 0:
|
utils.save_json(self.parent.PATH_CONFIG, "OSC_PORT", self.parent.OSC_PORT)
|
||||||
self.parent.OSC_PORT = value
|
|
||||||
utils.save_json(self.parent.PATH_CONFIG, "OSC_PORT", self.parent.OSC_PORT)
|
|
||||||
|
|
||||||
def update_authkey(self):
|
def entry_authkey_callback(self, event):
|
||||||
value = self.entry_authkey.get()
|
value = self.entry_authkey.get()
|
||||||
if len(value) > 0:
|
if len(value) > 0:
|
||||||
if self.parent.translator.authentication(self.parent.CHOICE_TRANSLATOR, self.parent.AUTH_KEYS[self.parent.CHOICE_TRANSLATOR]) is True:
|
if self.parent.translator.authentication("DeepL(auth)", self.parent.AUTH_KEYS["DeepL(auth)"]) is True:
|
||||||
self.parent.AUTH_KEYS["DeepL(auth)"] = value
|
self.parent.AUTH_KEYS["DeepL(auth)"] = value
|
||||||
utils.save_json(self.parent.PATH_CONFIG, "AUTH_KEYS", self.parent.AUTH_KEYS)
|
utils.save_json(self.parent.PATH_CONFIG, "AUTH_KEYS", self.parent.AUTH_KEYS)
|
||||||
|
utils.print_textbox(self.parent.textbox_message_log, "Auth key update completed", "INFO")
|
||||||
|
utils.print_textbox(self.parent.textbox_message_system_log, "Auth key update completed", "INFO")
|
||||||
else:
|
else:
|
||||||
utils.print_textbox(self.parent.textbox_message_system_log, f"[error] Auth Key or language setting is incorrect")
|
utils.print_textbox(self.parent.textbox_message_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
utils.print_textbox(self.parent.textbox_message_system_log, "Auth Key or language setting is incorrect", "ERROR")
|
||||||
|
|
||||||
def update_message_format(self):
|
def entry_message_format_callback(self, event):
|
||||||
value = self.entry_message_format.get()
|
value = self.entry_message_format.get()
|
||||||
if len(value) > 0:
|
if len(value) > 0:
|
||||||
self.parent.MESSAGE_FORMAT = value
|
self.parent.MESSAGE_FORMAT = value
|
||||||
|
|||||||
Reference in New Issue
Block a user