Merge branch 'bugfix_messagebox' into UI_2.0

# Conflicts:
#	view.py
This commit is contained in:
misyaguziya
2023-08-31 23:28:32 +09:00
2 changed files with 10 additions and 12 deletions

14
main.py
View File

@@ -260,13 +260,13 @@ view.register(
# 辞書型で関数を渡しても上手く行かず、仕方なくタプルで渡してる。 # 辞書型で関数を渡しても上手く行かず、仕方なくタプルで渡してる。
# 本当はコメントアウト以下とview.py内33,34行目)しているようにできたらいいけど、 # 本当はコメントアウト以下とview.py内33,34行目)しているようにできたらいいけど、
# _tkinter.TclError: unknown option "-bind_Any_KeyPress"みたいにエラーがでる。 # _tkinter.TclError: unknown option "-bind_Any_KeyPress"みたいにエラーがでる。
entry_message_box=None, # entry_message_box=None,
# entry_message_box={ entry_message_box_commands={
# "bind_Return": messageBoxPressKeyEnter, "bind_Return": messageBoxPressKeyEnter,
# "bind_Any_KeyPress": messageBoxPressKeyAny, "bind_Any_KeyPress": messageBoxPressKeyAny,
# }, },
entry_message_box_bind_Return=messageBoxPressKeyEnter, # entry_message_box_bind_Return=messageBoxPressKeyEnter,
entry_message_box_bind_Any_KeyPress=messageBoxPressKeyAny, # entry_message_box_bind_Any_KeyPress=messageBoxPressKeyAny,
config_window={ config_window={
"callback_disable_config_window_compact_mode": callbackEnableConfigWindowCompactMode, "callback_disable_config_window_compact_mode": callbackEnableConfigWindowCompactMode,

View File

@@ -35,7 +35,7 @@ class View():
) )
def register(self, sidebar_features, language_presets, entry_message_box, entry_message_box_bind_Return, entry_message_box_bind_Any_KeyPress, config_window): def register(self, sidebar_features, language_presets, entry_message_box_commands, config_window):
vrct_gui.CALLBACK_TOGGLE_TRANSLATION = sidebar_features["callback_toggle_translation"] vrct_gui.CALLBACK_TOGGLE_TRANSLATION = sidebar_features["callback_toggle_translation"]
vrct_gui.CALLBACK_TOGGLE_TRANSCRIPTION_SEND = sidebar_features["callback_toggle_transcription_send"] vrct_gui.CALLBACK_TOGGLE_TRANSCRIPTION_SEND = sidebar_features["callback_toggle_transcription_send"]
@@ -57,10 +57,8 @@ class View():
entry_message_box = getattr(vrct_gui, "entry_message_box") entry_message_box = getattr(vrct_gui, "entry_message_box")
# entry_message_box.bind("<Return>", lambda e: entry_message_box["bind_Return"](e)) entry_message_box.bind("<Return>", entry_message_box_commands["bind_Return"])
# entry_message_box.bind("<Any-KeyPress>", lambda e: entry_message_box["bind_Any_KeyPress"](e)) entry_message_box.bind("<Any-KeyPress>", entry_message_box_commands["bind_Any_KeyPress"])
entry_message_box.bind("<Return>", entry_message_box_bind_Return)
entry_message_box.bind("<Any-KeyPress>", entry_message_box_bind_Any_KeyPress)
entry_message_box.bind("<FocusIn>", self._foregroundOffForcefully) entry_message_box.bind("<FocusIn>", self._foregroundOffForcefully)
entry_message_box.bind("<FocusOut>", self._foregroundOnForcefully) entry_message_box.bind("<FocusOut>", self._foregroundOnForcefully)