diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py index 6ca4b790..808a18ee 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py @@ -18,7 +18,7 @@ from myutils.config import ( from myutils.hwnd import getExeIcon from myutils.wrapper import Singleton_close, Singleton, threader, tryprint from myutils.utils import checkifnewgame, str2rgba, vidchangedtask, titlechangedtask -from gui.inputdialog import noundictconfigdialog1 +from gui.inputdialog import noundictconfigdialog1, autoinitdialog from gui.specialwidget import ( ScrollFlow, chartwidget, @@ -2166,6 +2166,7 @@ class dialog_savedgame_v3(QWidget): startgame = QAction(_TR("开始游戏")) delgame = QAction(_TR("删除游戏")) opendir = QAction(_TR("打开目录")) + addtolist = QAction(_TR("添加到列表")) exists = os.path.exists(self.currentfocuspath) if exists: @@ -2173,6 +2174,7 @@ class dialog_savedgame_v3(QWidget): menu.addAction(delgame) if exists: menu.addAction(opendir) + menu.addAction(addtolist) action = menu.exec(QCursor.pos()) if action == startgame: startgamecheck(self, self.currentfocuspath) @@ -2180,6 +2182,58 @@ class dialog_savedgame_v3(QWidget): self.clicked2() elif action == opendir: self.clicked4() + elif action == addtolist: + self.addtolist() + + def addtolistcallback(self, __d, __uid, path): + + if len(__uid) == 0: + return + + uid = __uid[__d["k"]] + __save = self.reftagid + self.reftagid = uid + + if path not in self.getreflist(): + self.getreflist().insert(0, path) + self.newline(path) + self.reftagid = __save + + def addtolist(self): + __d = {"k": 0} + + __vis = [] + __uid = [] + for _ in savegametaged: + if _ is None: + __vis.append("GLOBAL") + __uid.append(None) + else: + __vis.append(_["title"]) + __uid.append(_["uid"]) + if self.reftagid == __uid[-1]: + __uid.pop(-1) + __vis.pop(-1) + autoinitdialog( + self, + _TR("目标"), + 600, + [ + { + "type": "combo", + "name": _TR("目标"), + "d": __d, + "k": "k", + "list": __vis, + }, + { + "type": "okcancel", + "callback": functools.partial( + self.addtolistcallback, __d, __uid, self.currentfocuspath + ), + }, + ], + ) def directshow(self): self.stack.directshow() @@ -2220,7 +2274,7 @@ class dialog_savedgame_v3(QWidget): ) self.simplebutton("删除游戏", True, self.clicked2, False) self.simplebutton("打开目录", True, self.clicked4, True) - + self.simplebutton("添加到列表", False, self.addtolist, 1) if globalconfig["startgamenototop"]: self.simplebutton("上移", True, functools.partial(self.moverank, -1), False) self.simplebutton("下移", True, functools.partial(self.moverank, 1), False) diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index 15cfa5db..aad90731 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -819,5 +819,7 @@ "修改名称": "تعديل الاسم", "大": "كبير .", "权限不足,请以管理员权限运行!": "امتيازات غير كافية ، يرجى تشغيل مع امتيازات المسؤول !", - "标点": "علامات الترقيم" + "标点": "علامات الترقيم", + "添加到列表": "إضافة إلى قائمة", + "目标": "الهدف" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index 09861e4a..b4f4e25f 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -819,5 +819,7 @@ "修改名称": "修改名稱", "大": "大", "权限不足,请以管理员权限运行!": "許可權不足,請以管理員許可權運行!", - "标点": "標點" + "标点": "標點", + "添加到列表": "添加到清單", + "目标": "目標" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index f4a3e3f1..ad86e22e 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -819,5 +819,7 @@ "修改名称": "Change Name", "大": "large", "权限不足,请以管理员权限运行!": "Insufficient permissions, please run with administrator privileges!", - "标点": "punctuation" + "标点": "punctuation", + "添加到列表": "Add to list", + "目标": "target" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index fecbffac..377123d5 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -819,5 +819,7 @@ "修改名称": "Modificar nombre", "大": "Grande", "权限不足,请以管理员权限运行!": "¡Permisos insuficientes, ¡ por favor, ejecute con permisos de administrador!", - "标点": "Puntuación" + "标点": "Puntuación", + "添加到列表": "Añadir a la lista", + "目标": "Objetivo" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index 29150e51..84598cd9 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -819,5 +819,7 @@ "修改名称": "Modifier le nom", "大": "Grand", "权限不足,请以管理员权限运行!": "Autorisations insuffisantes, exécutez avec des privilèges d'administrateur!", - "标点": "Ponctuation" + "标点": "Ponctuation", + "添加到列表": "Ajouter à la Liste", + "目标": "Objectifs" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index 2ae0b14e..7a297b17 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -819,5 +819,7 @@ "修改名称": "Cambia nome", "大": "grande", "权限不足,请以管理员权限运行!": "Permessi insufficienti, si prega di eseguire con privilegi di amministratore!", - "标点": "punteggiatura" + "标点": "punteggiatura", + "添加到列表": "Aggiungi alla lista", + "目标": "obiettivo" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index dbf3edb8..1aaabe7d 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -819,5 +819,7 @@ "修改名称": "名前の変更", "大": "大きい", "权限不足,请以管理员权限运行!": "権限が不足しています。管理者権限で実行してください。", - "标点": "ひょうてん" + "标点": "ひょうてん", + "添加到列表": "リストに追加", + "目标": "ターゲット" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index efaeb946..26ad0b5c 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -819,5 +819,7 @@ "修改名称": "이름 수정", "大": "큰", "权限不足,请以管理员权限运行!": "권한이 부족합니다. 관리자 권한으로 실행하십시오!", - "标点": "구두점" + "标点": "구두점", + "添加到列表": "목록에 추가", + "目标": "목표" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index ba60e41d..244e131e 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -819,5 +819,7 @@ "修改名称": "Zmień nazwę", "大": "duże", "权限不足,请以管理员权限运行!": "Niewystarczające uprawnienia, proszę uruchomić z uprawnieniami administratora!", - "标点": "interpunkcja" + "标点": "interpunkcja", + "添加到列表": "Dodaj do listy", + "目标": "cel" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index af53d540..b105f494 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -819,5 +819,7 @@ "修改名称": "Изменить имя", "大": "Большой", "权限不足,请以管理员权限运行!": "Недостаточные права, пожалуйста, запустите с правами администратора!", - "标点": "Пунктуация" + "标点": "Пунктуация", + "添加到列表": "Добавить в список", + "目标": "Цель" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index 559f35c9..3bd2994d 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -819,5 +819,7 @@ "修改名称": "แก้ไขชื่อ", "大": "ใหญ่", "权限不足,请以管理员权限运行!": "สิทธิ์ไม่เพียงพอโปรดเรียกใช้ด้วยสิทธิ์ของผู้ดูแลระบบ!", - "标点": "เครื่องหมายวรรคตอน" + "标点": "เครื่องหมายวรรคตอน", + "添加到列表": "เพิ่มลงในรายการ", + "目标": "วัตถุประสงค์" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 08abce94..d9c48389 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -819,5 +819,7 @@ "修改名称": "İsmi Değiştir", "大": "büyükdictionary variant", "权限不足,请以管理员权限运行!": "Insufficient permissions, please run with administrator privileges!", - "标点": "noqtalama" + "标点": "noqtalama", + "添加到列表": "Listeye ekle", + "目标": "hedef" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index 713d6b91..08e2a16d 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -819,5 +819,7 @@ "修改名称": "Змінити назву", "大": "великий", "权限不足,请以管理员权限运行!": "Недостатньо прав доступу, будь ласка, запускайте привілеї адміністратора!", - "标点": "пунктуація" + "标点": "пунктуація", + "添加到列表": "Додати до списку", + "目标": "мета" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index 1b0892d3..3e3fd05d 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -819,5 +819,7 @@ "修改名称": "Thay đổi tên", "大": "Lớn", "权限不足,请以管理员权限运行!": "Không đủ quyền, hãy chạy với quyền quản trị viên!", - "标点": "Chấm câu" + "标点": "Chấm câu", + "添加到列表": "Thêm vào danh sách", + "目标": "Mục tiêu" } \ No newline at end of file diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 742c4906..7031859b 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -819,5 +819,7 @@ "修改名称": "", "大": "", "权限不足,请以管理员权限运行!": "", - "标点": "" + "标点": "", + "添加到列表": "", + "目标": "" } \ No newline at end of file