[Update/Refactor] Main Window: 送信済メッセージのロールバック機能調整(ロールバック可能なメッセージに、マイクからの入力時を追加)
Redo Undoの履歴保存サイズを設定。理由は、上記の機能使用時もRedo Undoの保存タイミングになるので、使用の際膨大な数になる可能性があるため上限を設定。設定値は今後変更する可能性は全然ある。
This commit is contained in:
@@ -64,6 +64,7 @@ def changeToCTranslate2Process():
|
|||||||
# func transcription send message
|
# func transcription send message
|
||||||
def sendMicMessage(message):
|
def sendMicMessage(message):
|
||||||
if len(message) > 0:
|
if len(message) > 0:
|
||||||
|
addSentMessageLog(message)
|
||||||
translation = ""
|
translation = ""
|
||||||
if model.checkKeywords(message):
|
if model.checkKeywords(message):
|
||||||
view.printToTextbox_DetectedByWordFilter(detected_message=message)
|
view.printToTextbox_DetectedByWordFilter(detected_message=message)
|
||||||
@@ -200,8 +201,7 @@ def stopThreadingTranscriptionReceiveMessageOnOpenConfigWindow():
|
|||||||
# func message box
|
# func message box
|
||||||
def sendChatMessage(message):
|
def sendChatMessage(message):
|
||||||
if len(message) > 0:
|
if len(message) > 0:
|
||||||
config.SENT_MESSAGES_LOG.append(view.getTextFromMessageBox())
|
addSentMessageLog(message)
|
||||||
config.CURRENT_SENT_MESSAGES_LOG_INDEX = len(config.SENT_MESSAGES_LOG)
|
|
||||||
translation = ""
|
translation = ""
|
||||||
if config.ENABLE_TRANSLATION is False:
|
if config.ENABLE_TRANSLATION is False:
|
||||||
pass
|
pass
|
||||||
@@ -251,6 +251,10 @@ def messageBoxFocusOut(e):
|
|||||||
if config.ENABLE_SEND_MESSAGE_TO_VRC is True:
|
if config.ENABLE_SEND_MESSAGE_TO_VRC is True:
|
||||||
model.oscStopSendTyping()
|
model.oscStopSendTyping()
|
||||||
|
|
||||||
|
def addSentMessageLog(sent_message):
|
||||||
|
config.SENT_MESSAGES_LOG.append(sent_message)
|
||||||
|
config.CURRENT_SENT_MESSAGES_LOG_INDEX = len(config.SENT_MESSAGES_LOG)
|
||||||
|
|
||||||
def updateMessageBox(index_offset):
|
def updateMessageBox(index_offset):
|
||||||
if len(config.SENT_MESSAGES_LOG) == 0:
|
if len(config.SENT_MESSAGES_LOG) == 0:
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ def createEntryMessageBox(settings, main_window, view_variable):
|
|||||||
font=CTkFont(family=settings.FONT_FAMILY, size=settings.uism.TEXTBOX_ENTRY_FONT_SIZE, weight="normal"),
|
font=CTkFont(family=settings.FONT_FAMILY, size=settings.uism.TEXTBOX_ENTRY_FONT_SIZE, weight="normal"),
|
||||||
undo=True,
|
undo=True,
|
||||||
autoseparators=True,
|
autoseparators=True,
|
||||||
maxundo=0,
|
maxundo=64,
|
||||||
)
|
)
|
||||||
main_window.entry_message_box.grid(row=0, column=0, padx=settings.uism.TEXTBOX_ENTRY_PADX, pady=settings.uism.TEXTBOX_ENTRY_PADY, sticky="nsew")
|
main_window.entry_message_box.grid(row=0, column=0, padx=settings.uism.TEXTBOX_ENTRY_PADX, pady=settings.uism.TEXTBOX_ENTRY_PADY, sticky="nsew")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user