[Update] add Information Modal. This is for displaying when reached translation limit that 429 too many requests.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
from customtkinter import CTkImage
|
||||
|
||||
def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, target_names):
|
||||
hold_state_list=[]
|
||||
def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, target_names:list, to_hold_state:bool=False):
|
||||
global hold_state_list
|
||||
if target_names == "All":
|
||||
target_names = ["translation_switch", "transcription_send_switch", "transcription_receive_switch", "foreground_switch", "quick_language_settings", "config_button", "minimize_sidebar_button", "entry_message_box"]
|
||||
|
||||
|
||||
for item in hold_state_list:
|
||||
if item in target_names:
|
||||
target_names.remove(item)
|
||||
|
||||
|
||||
def update_switch_status(
|
||||
@@ -146,5 +150,9 @@ def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, ta
|
||||
raise ValueError(f"No matching case for target_name: {target_name}")
|
||||
|
||||
|
||||
if to_hold_state is True:
|
||||
for item in target_names:
|
||||
if item not in hold_state_list:
|
||||
hold_state_list.append(item)
|
||||
|
||||
vrct_gui.update()
|
||||
Reference in New Issue
Block a user