diff --git a/py/LunaTranslator/gui/dialog_savedgame_setting.py b/py/LunaTranslator/gui/dialog_savedgame_setting.py index cddd59a3..9330abc2 100644 --- a/py/LunaTranslator/gui/dialog_savedgame_setting.py +++ b/py/LunaTranslator/gui/dialog_savedgame_setting.py @@ -814,9 +814,7 @@ class dialog_setting_game_internal(QWidget): table.horizontalHeader().setSectionResizeMode( 1, QHeaderView.ResizeMode.ResizeToContents ) - table.horizontalHeader().setSectionResizeMode( - 0, QHeaderView.ResizeMode.Stretch - ) + table.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeMode.Stretch) table.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers) table.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows) table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection)) @@ -1020,22 +1018,17 @@ class dialog_setting_game_internal(QWidget): box.setLayout(settinglayout) formLayout.addRow(box) settinglayout.addRow( - "Win32文字绘制函数钩子", - getsimpleswitch( - savehook_new_data[gameuid], - "insertpchooks_GdiGdiplusD3dx", - callback=lambda _: ( - gobject.baseobject.textsource.InsertPCHooks(0) if _ else None - ), - ), - ) - settinglayout.addRow( - "Win32字符串函数钩子", + "Win32通用钩子", getsimpleswitch( savehook_new_data[gameuid], "insertpchooks_string", callback=lambda _: ( - gobject.baseobject.textsource.InsertPCHooks(1) if _ else None + ( + gobject.baseobject.textsource.InsertPCHooks(0), + gobject.baseobject.textsource.InsertPCHooks(1), + ) + if _ + else None ), ), ) diff --git a/py/LunaTranslator/myutils/config.py b/py/LunaTranslator/myutils/config.py index 81743e79..731034ab 100644 --- a/py/LunaTranslator/myutils/config.py +++ b/py/LunaTranslator/myutils/config.py @@ -150,7 +150,6 @@ def getdefaultsavehook(title=None): # "leuse": True, 废弃 "hook": [], "inserthooktimeout": 500, - "insertpchooks_GdiGdiplusD3dx": False, "insertpchooks_string": False, "needinserthookcode": [], # "allow_tts_auto_names": "",#->v4 diff --git a/py/LunaTranslator/textsource/texthook.py b/py/LunaTranslator/textsource/texthook.py index 19759bdb..4945fb93 100644 --- a/py/LunaTranslator/textsource/texthook.py +++ b/py/LunaTranslator/textsource/texthook.py @@ -443,9 +443,8 @@ class texthook(basetext): pass for hookcode in self.needinserthookcode: self.Luna_InsertHookCode(pid, hookcode) - if savehook_new_data[self.gameuid]["insertpchooks_GdiGdiplusD3dx"]: - self.Luna_InsertPCHooks(pid, 0) if savehook_new_data[self.gameuid]["insertpchooks_string"]: + self.Luna_InsertPCHooks(pid, 0) self.Luna_InsertPCHooks(pid, 1) gobject.baseobject.displayinfomessage( savehook_new_data[self.gameuid]["title"], "" diff --git a/py/files/lang/ar.json b/py/files/lang/ar.json index 0e968d0e..ae10b5c8 100644 --- a/py/files/lang/ar.json +++ b/py/files/lang/ar.json @@ -745,8 +745,6 @@ "开始": "بداية .", "最长等待时间": "أقصى وقت الانتظار", "截取行数": "اعتراض عدد الصفوف", - "Win32文字绘制函数钩子": "win32 وظيفة رسم النص هوك", - "Win32字符串函数钩子": "win32 سلسلة هوك", "额外的钩子": "خطاف إضافية", "自动前进": "التلقائي إلى الأمام", "在新窗口中查词": "البحث عن الكلمات في نافذة جديدة", @@ -755,5 +753,6 @@ "截取末尾": "اعتراض نهاية", "更新记录": "تحديث السجلات", "打开选择文本窗口": "فتح نافذة اختيار النص", - "成功": "النجاح ." + "成功": "النجاح .", + "Win32通用钩子": "win32 هوك العالمي" } \ No newline at end of file diff --git a/py/files/lang/cht.json b/py/files/lang/cht.json index 28a68879..7576791a 100644 --- a/py/files/lang/cht.json +++ b/py/files/lang/cht.json @@ -745,8 +745,6 @@ "开始": "開始", "最长等待时间": "最長等待時間", "截取行数": "截取行數", - "Win32文字绘制函数钩子": "Win32文字繪製函數鉤子", - "Win32字符串函数钩子": "Win32字串函數鉤子", "额外的钩子": "額外的鉤子", "自动前进": "自動前進", "在新窗口中查词": "在新窗口中查詞", @@ -755,5 +753,6 @@ "截取末尾": "截取末尾", "更新记录": "更新記錄", "打开选择文本窗口": "打開選擇文字視窗", - "成功": "成功" + "成功": "成功", + "Win32通用钩子": "Win32通用鉤子" } \ No newline at end of file diff --git a/py/files/lang/cs.json b/py/files/lang/cs.json index 03430de4..93d0d8e7 100644 --- a/py/files/lang/cs.json +++ b/py/files/lang/cs.json @@ -745,8 +745,6 @@ "开始": "start", "最长等待时间": "Maximální čekací doba", "截取行数": "Snížit počet řádků", - "Win32文字绘制函数钩子": "Win32 funkce kreslení textu", - "Win32字符串函数钩子": "Win32 řetězcový funkční hák", "额外的钩子": "Extra háčky", "自动前进": "Automaticky dopředu", "在新窗口中查词": "Vyhledávání slov v novém okně", @@ -755,5 +753,6 @@ "截取末尾": "Střih do konce", "更新记录": "Aktualizovat záznam", "打开选择文本窗口": "Otevřít textové okno výběru", - "成功": "úspěch" + "成功": "úspěch", + "Win32通用钩子": "Univerzální hák Win32" } \ No newline at end of file diff --git a/py/files/lang/de.json b/py/files/lang/de.json index e6441ed6..a80c2957 100644 --- a/py/files/lang/de.json +++ b/py/files/lang/de.json @@ -745,8 +745,6 @@ "开始": "Start", "最长等待时间": "Maximale Wartezeit", "截取行数": "Anzahl der Zeilen abschneiden", - "Win32文字绘制函数钩子": "Win32 Text Zeichenfunktion Hook", - "Win32字符串函数钩子": "Win32 String Function Hook", "额外的钩子": "Zusätzliche Haken", "自动前进": "Automatisch vorwärts", "在新窗口中查词": "Suche nach Wörtern in einem neuen Fenster", @@ -755,5 +753,6 @@ "截取末尾": "Bis zum Ende geschnitten", "更新记录": "Datensatz aktualisieren", "打开选择文本窗口": "Öffnen des Auswahltextfensters", - "成功": "Erfolg" + "成功": "Erfolg", + "Win32通用钩子": "Win32 Universal Hook" } \ No newline at end of file diff --git a/py/files/lang/en.json b/py/files/lang/en.json index b7868f18..02b7ce66 100644 --- a/py/files/lang/en.json +++ b/py/files/lang/en.json @@ -745,8 +745,6 @@ "开始": "start", "最长等待时间": "Maximum waiting time", "截取行数": "Cut the number of lines", - "Win32文字绘制函数钩子": "Win32 text drawing function hook", - "Win32字符串函数钩子": "Win32 string function hook", "额外的钩子": "Extra hooks", "自动前进": "Automatic Forward", "在新窗口中查词": "Search for words in a new window", @@ -755,5 +753,6 @@ "截取末尾": "Cut to the end", "更新记录": "Update Record", "打开选择文本窗口": "Open the selection text window", - "成功": "success" + "成功": "success", + "Win32通用钩子": "Win32 Universal Hook" } \ No newline at end of file diff --git a/py/files/lang/es.json b/py/files/lang/es.json index 9f6d290c..20d3cc10 100644 --- a/py/files/lang/es.json +++ b/py/files/lang/es.json @@ -745,8 +745,6 @@ "开始": "Empezar", "最长等待时间": "Tiempo máximo de espera", "截取行数": "Número de líneas interceptadas", - "Win32文字绘制函数钩子": "Gancho de función de dibujo de texto Win32", - "Win32字符串函数钩子": "Gancho de función de cadena Win32", "额外的钩子": "Ganchos adicionales", "自动前进": "Avance automático", "在新窗口中查词": "Buscar palabras en una nueva ventana", @@ -755,5 +753,6 @@ "截取末尾": "Fin de la interceptación", "更新记录": "Actualización de registros", "打开选择文本窗口": "Abrir la ventana de texto de selección", - "成功": "éxito" + "成功": "éxito", + "Win32通用钩子": "Gancho universal Win32" } \ No newline at end of file diff --git a/py/files/lang/fr.json b/py/files/lang/fr.json index b5a278cc..4b344cba 100644 --- a/py/files/lang/fr.json +++ b/py/files/lang/fr.json @@ -745,8 +745,6 @@ "开始": "Commencer", "最长等待时间": "Temps d'attente maximum", "截取行数": "Nombre de lignes interceptées", - "Win32文字绘制函数钩子": "Win32 crochet de fonction de dessin de texte", - "Win32字符串函数钩子": "Crochet de fonction de chaîne Win32", "额外的钩子": "Crochets supplémentaires", "自动前进": "Avance automatique", "在新窗口中查词": "Rechercher des mots dans une nouvelle fenêtre", @@ -755,5 +753,6 @@ "截取末尾": "Fin de l'interception", "更新记录": "Mettre à jour les enregistrements", "打开选择文本窗口": "Ouvrir la fenêtre sélectionner le texte", - "成功": "Succès" + "成功": "Succès", + "Win32通用钩子": "Win32 crochet universel" } \ No newline at end of file diff --git a/py/files/lang/it.json b/py/files/lang/it.json index 4edc7754..a0709c54 100644 --- a/py/files/lang/it.json +++ b/py/files/lang/it.json @@ -745,8 +745,6 @@ "开始": "inizio", "最长等待时间": "Tempo massimo di attesa", "截取行数": "Taglia il numero di righe", - "Win32文字绘制函数钩子": "Gancio della funzione di disegno del testo Win32", - "Win32字符串函数钩子": "Aggancio della funzione stringa Win32", "额外的钩子": "Ganci supplementari", "自动前进": "Avanti automatico", "在新窗口中查词": "Cerca parole in una nuova finestra", @@ -755,5 +753,6 @@ "截取末尾": "Taglia fino alla fine", "更新记录": "Aggiorna record", "打开选择文本窗口": "Apri la finestra del testo di selezione", - "成功": "successo" + "成功": "successo", + "Win32通用钩子": "Win32 Universal Hook" } \ No newline at end of file diff --git a/py/files/lang/ja.json b/py/files/lang/ja.json index 318cc6d5..975d5e45 100644 --- a/py/files/lang/ja.json +++ b/py/files/lang/ja.json @@ -745,8 +745,6 @@ "开始": "スタート", "最长等待时间": "最長待ち時間", "截取行数": "切り取り行数", - "Win32文字绘制函数钩子": "Win 32文字描画関数フック", - "Win32字符串函数钩子": "Win 32文字列関数フック", "额外的钩子": "エクストラフック", "自动前进": "自動前進", "在新窗口中查词": "新しいウィンドウで単語を調べる", @@ -755,5 +753,6 @@ "截取末尾": "末尾を切り取る", "更新记录": "レコードの更新", "打开选择文本窗口": "テキストの選択ウィンドウを開く", - "成功": "成功" + "成功": "成功", + "Win32通用钩子": "Win 32汎用フック" } \ No newline at end of file diff --git a/py/files/lang/ko.json b/py/files/lang/ko.json index 18e233ee..5459fea9 100644 --- a/py/files/lang/ko.json +++ b/py/files/lang/ko.json @@ -745,8 +745,6 @@ "开始": "시작", "最长等待时间": "최대 대기 시간", "截取行数": "행 수 캡처", - "Win32文字绘制函数钩子": "Win32 텍스트 그리기 함수 갈고리", - "Win32字符串函数钩子": "Win32 문자열 함수 후크", "额外的钩子": "추가 갈고리", "自动前进": "자동 전진", "在新窗口中查词": "새 창에서 단어 찾기", @@ -755,5 +753,6 @@ "截取末尾": "끝을 가로채다", "更新记录": "레코드 업데이트", "打开选择文本窗口": "텍스트 선택 창 열기", - "成功": "성공" + "成功": "성공", + "Win32通用钩子": "Win32 범용 갈고리" } \ No newline at end of file diff --git a/py/files/lang/nl.json b/py/files/lang/nl.json index b00e0ea8..55da03d9 100644 --- a/py/files/lang/nl.json +++ b/py/files/lang/nl.json @@ -745,8 +745,6 @@ "开始": "start", "最长等待时间": "Maximale wachttijd", "截取行数": "Aantal regels snijden", - "Win32文字绘制函数钩子": "Win32 teksttekenfunctiehook", - "Win32字符串函数钩子": "Win32 tekenfunctiehook", "额外的钩子": "Extra haken", "自动前进": "Automatisch voorwaarts", "在新窗口中查词": "Zoeken naar woorden in een nieuw venster", @@ -755,5 +753,6 @@ "截取末尾": "Snijd tot het einde", "更新记录": "Record bijwerken", "打开选择文本窗口": "Het selectietekstvenster openen", - "成功": "succes" + "成功": "succes", + "Win32通用钩子": "Win32 universele haak" } \ No newline at end of file diff --git a/py/files/lang/pl.json b/py/files/lang/pl.json index 15aee9ae..572db4df 100644 --- a/py/files/lang/pl.json +++ b/py/files/lang/pl.json @@ -745,8 +745,6 @@ "开始": "uruchomić", "最长等待时间": "Maksymalny czas oczekiwania", "截取行数": "Wyciąć liczbę linii", - "Win32文字绘制函数钩子": "Hook funkcji rysowania tekstu Win32", - "Win32字符串函数钩子": "Hook funkcji ciągów Win32", "额外的钩子": "Dodatkowe haki", "自动前进": "Automatyczne naprzód", "在新窗口中查词": "Wyszukiwanie słów w nowym oknie", @@ -755,5 +753,6 @@ "截取末尾": "Cięcie do końca", "更新记录": "Aktualizuj rekord", "打开选择文本窗口": "Otwórz okno tekstowe zaznaczenia", - "成功": "sukces" + "成功": "sukces", + "Win32通用钩子": "Uniwersalny hak Win32" } \ No newline at end of file diff --git a/py/files/lang/pt.json b/py/files/lang/pt.json index 415d76eb..73bd2daf 100644 --- a/py/files/lang/pt.json +++ b/py/files/lang/pt.json @@ -745,8 +745,6 @@ "开始": "iniciar", "最长等待时间": "Tempo máximo de espera", "截取行数": "Cortar o número de linhas", - "Win32文字绘制函数钩子": "Gancho de função de desenho de texto Win32", - "Win32字符串函数钩子": "Gancho de função de cadeia Win32", "额外的钩子": "Ganchos extra", "自动前进": "Avançar Automático", "在新窗口中查词": "Procurar palavras numa nova janela", @@ -755,5 +753,6 @@ "截取末尾": "Cortar até ao fim", "更新记录": "Actualizar o Registo", "打开选择文本窗口": "Abrir a janela de texto da selecção", - "成功": "sucesso" + "成功": "sucesso", + "Win32通用钩子": "Gancho Universal Win32" } \ No newline at end of file diff --git a/py/files/lang/ru.json b/py/files/lang/ru.json index 9038075e..f033c147 100644 --- a/py/files/lang/ru.json +++ b/py/files/lang/ru.json @@ -745,8 +745,6 @@ "开始": "Начинаем.", "最长等待时间": "Максимальное время ожидания", "截取行数": "Количество перехваченных строк", - "Win32文字绘制函数钩子": "Win32 Графический крюк", - "Win32字符串函数钩子": "Win32 Строчный крюк", "额外的钩子": "Дополнительный крюк", "自动前进": "Автоматическое продвижение вперед", "在新窗口中查词": "Проверка слов в новом окне", @@ -755,5 +753,6 @@ "截取末尾": "Отрезать конец", "更新记录": "Обновить запись", "打开选择文本窗口": "Открыть окно выбора текста", - "成功": "Успех" + "成功": "Успех", + "Win32通用钩子": "Win32 Универсальный крюк" } \ No newline at end of file diff --git a/py/files/lang/sv.json b/py/files/lang/sv.json index 8bd8371f..de99b6d5 100644 --- a/py/files/lang/sv.json +++ b/py/files/lang/sv.json @@ -745,8 +745,6 @@ "开始": "start", "最长等待时间": "Maximal väntetid", "截取行数": "Klipp av antalet rader", - "Win32文字绘制函数钩子": "Win32 textritfunktionskrok", - "Win32字符串函数钩子": "Win32 strängfunktionskrok", "额外的钩子": "Extra krokar", "自动前进": "Automatisk framåt", "在新窗口中查词": "Sök efter ord i ett nytt fönster", @@ -755,5 +753,6 @@ "截取末尾": "Klipp till slutet", "更新记录": "Uppdatera post", "打开选择文本窗口": "Öppna markeringstextfönstret", - "成功": "framgång" + "成功": "framgång", + "Win32通用钩子": "Win32 universalkrok" } \ No newline at end of file diff --git a/py/files/lang/th.json b/py/files/lang/th.json index 5334e952..b5f334d9 100644 --- a/py/files/lang/th.json +++ b/py/files/lang/th.json @@ -745,8 +745,6 @@ "开始": "เริ่มต้นใช้งาน", "最长等待时间": "ระยะเวลารอคอยนานที่สุด", "截取行数": "จำนวนแถวที่ถูกสกัดกั้น", - "Win32文字绘制函数钩子": "Win32 วาดคำฟังก์ชันตะขอ", - "Win32字符串函数钩子": "Win32 ฟังก์ชั่นสตริงตะขอ", "额外的钩子": "ตะขอเพิ่มเติม", "自动前进": "เดินหน้าอัตโนมัติ", "在新窗口中查词": "ค้นหาคำในหน้าต่างใหม่", @@ -755,5 +753,6 @@ "截取末尾": "ตัดตอนท้าย", "更新记录": "บันทึกการปรับปรุง", "打开选择文本窗口": "เปิดหน้าต่างเลือกข้อความ", - "成功": "ความสำเร็จ" + "成功": "ความสำเร็จ", + "Win32通用钩子": "ตะขอสากล Win32" } \ No newline at end of file diff --git a/py/files/lang/tr.json b/py/files/lang/tr.json index decab8df..da2eb659 100644 --- a/py/files/lang/tr.json +++ b/py/files/lang/tr.json @@ -745,8 +745,6 @@ "开始": "başlat", "最长等待时间": "Maksimum bekleme zamanı", "截取行数": "Çizgi sayısını kesin", - "Win32文字绘制函数钩子": "Win32 metin çizim fonksiyonu çubuğu", - "Win32字符串函数钩子": "Win32 string fonksiyonu", "额外的钩子": "Ekstra hücreler", "自动前进": "Otomatik İleri", "在新窗口中查词": "Yeni pencerede kelimeler arayın", @@ -755,5 +753,6 @@ "截取末尾": "Sonuna kesin.", "更新记录": "Kayıt Güncelle", "打开选择文本窗口": "Seçim metin penceresini aç", - "成功": "başarılı" + "成功": "başarılı", + "Win32通用钩子": "Win32 Universal Hook" } \ No newline at end of file diff --git a/py/files/lang/uk.json b/py/files/lang/uk.json index 69664736..c6442887 100644 --- a/py/files/lang/uk.json +++ b/py/files/lang/uk.json @@ -745,8 +745,6 @@ "开始": "початок", "最长等待时间": "Максимальний час чекання", "截取行数": "Вирізати кількість рядків", - "Win32文字绘制函数钩子": "Хук функції малювання тексту Win32", - "Win32字符串函数钩子": "Хук функції рядка Win32", "额外的钩子": "Додаткові хаки", "自动前进": "Автоматично вперед", "在新窗口中查词": "Пошук слів у новому вікні", @@ -755,5 +753,6 @@ "截取末尾": "Вирізати до кінця", "更新记录": "Оновити запис", "打开选择文本窗口": "Відкрити текстове вікно вибору", - "成功": "успіх" + "成功": "успіх", + "Win32通用钩子": "Win32 Universal Hook" } \ No newline at end of file diff --git a/py/files/lang/vi.json b/py/files/lang/vi.json index 245ad8da..a5302455 100644 --- a/py/files/lang/vi.json +++ b/py/files/lang/vi.json @@ -745,8 +745,6 @@ "开始": "Bắt đầu", "最长等待时间": "Thời gian chờ tối đa", "截取行数": "Số dòng bị chặn", - "Win32文字绘制函数钩子": "Win32 Chức năng vẽ văn bản Hook", - "Win32字符串函数钩子": "Win32 Chuỗi chức năng Hook", "额外的钩子": "Thêm móc", "自动前进": "Tự động chuyển tiếp", "在新窗口中查词": "Tra từ trong cửa sổ mới", @@ -755,5 +753,6 @@ "截取末尾": "Kết thúc cắt", "更新记录": "Cập nhật hồ sơ", "打开选择文本窗口": "Mở cửa sổ Select Text", - "成功": "Thành công" + "成功": "Thành công", + "Win32通用钩子": "Win32 phổ Hook" } \ No newline at end of file diff --git a/py/files/lang/zh.json b/py/files/lang/zh.json index 254e64d4..73db625b 100644 --- a/py/files/lang/zh.json +++ b/py/files/lang/zh.json @@ -745,8 +745,6 @@ "开始": "", "截取行数": "", "最长等待时间": "", - "Win32文字绘制函数钩子": "", - "Win32字符串函数钩子": "", "额外的钩子": "", "自动前进": "", "在新窗口中查词": "", @@ -755,5 +753,6 @@ "截取末尾": "", "更新记录": "", "打开选择文本窗口": "", - "成功": "" + "成功": "", + "Win32通用钩子": "" } \ No newline at end of file