[bugfix] 変数名の被りを修正
This commit is contained in:
14
main.py
14
main.py
@@ -260,13 +260,13 @@ view.initializer(
|
||||
# 辞書型で関数を渡しても上手く行かず、仕方なくタプルで渡してる。
|
||||
# 本当はコメントアウト(以下とview.py内33,34行目)しているようにできたらいいけど、
|
||||
# _tkinter.TclError: unknown option "-bind_Any_KeyPress"みたいにエラーがでる。
|
||||
entry_message_box=None,
|
||||
# entry_message_box={
|
||||
# "bind_Return": messageBoxPressKeyEnter,
|
||||
# "bind_Any_KeyPress": messageBoxPressKeyAny,
|
||||
# },
|
||||
entry_message_box_bind_Return=messageBoxPressKeyEnter,
|
||||
entry_message_box_bind_Any_KeyPress=messageBoxPressKeyAny,
|
||||
# entry_message_box=None,
|
||||
entry_message_box_commands={
|
||||
"bind_Return": messageBoxPressKeyEnter,
|
||||
"bind_Any_KeyPress": messageBoxPressKeyAny,
|
||||
},
|
||||
# entry_message_box_bind_Return=messageBoxPressKeyEnter,
|
||||
# entry_message_box_bind_Any_KeyPress=messageBoxPressKeyAny,
|
||||
|
||||
config_window={
|
||||
"callback_disable_config_window_compact_mode": callbackEnableConfigWindowCompactMode,
|
||||
|
||||
8
view.py
8
view.py
@@ -15,7 +15,7 @@ class View():
|
||||
pass
|
||||
|
||||
|
||||
def initializer(self, sidebar_features, language_presets, entry_message_box, entry_message_box_bind_Return, entry_message_box_bind_Any_KeyPress, config_window):
|
||||
def initializer(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_TRANSCRIPTION_SEND = sidebar_features["callback_toggle_transcription_send"]
|
||||
@@ -37,10 +37,8 @@ class View():
|
||||
|
||||
|
||||
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("<Any-KeyPress>", lambda e: entry_message_box["bind_Any_KeyPress"](e))
|
||||
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("<Return>", entry_message_box_commands["bind_Return"])
|
||||
entry_message_box.bind("<Any-KeyPress>", entry_message_box_commands["bind_Any_KeyPress"])
|
||||
|
||||
entry_message_box.bind("<FocusIn>", self._foregroundOffForcefully)
|
||||
entry_message_box.bind("<FocusOut>", self._foregroundOnForcefully)
|
||||
|
||||
Reference in New Issue
Block a user