From 5c4304ba440ed27aac354f29cd1e011d9a038d0d Mon Sep 17 00:00:00 2001 From: Joe R Date: Mon, 15 Jan 2024 22:17:09 -0500 Subject: [PATCH] Option to clear the recent games list. --- po/de_pysol.po | 11 ++++++++++- po/fr_pysol.po | 11 ++++++++++- po/pl_pysol.po | 11 ++++++++++- po/pt_BR_pysol.po | 11 ++++++++++- po/pysol.pot | 9 +++++++++ po/ru_pysol.po | 11 ++++++++++- pysollib/ui/tktile/menubar.py | 14 ++++++++++++++ 7 files changed, 73 insertions(+), 5 deletions(-) diff --git a/po/de_pysol.po b/po/de_pysol.po index f3843d33..41ca3edf 100644 --- a/po/de_pysol.po +++ b/po/de_pysol.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: PySol 0.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2023-12-30 09:38-0500\n" +"PO-Revision-Date: 2024-01-15 22:12-0500\n" "Last-Translator: H. Schaekel \n" "Language-Team: German\n" "Language: de\n" @@ -4925,6 +4925,15 @@ msgstr "&Datei" msgid "R&ecent games" msgstr "&Zuletzt gespielte" +msgid "&Clear recent games" +msgstr "" + +msgid "Clear recent games" +msgstr "" + +msgid "Clear the recent games list?" +msgstr "" + #: pysollib/ui/tktile/menubar.py:304 msgid "Select &random game" msgstr "Zu&fallsspiel auswählen" diff --git a/po/fr_pysol.po b/po/fr_pysol.po index 7ddcd67e..f9025352 100644 --- a/po/fr_pysol.po +++ b/po/fr_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 1.02\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2023-12-30 09:37-0500\n" +"PO-Revision-Date: 2024-01-15 22:13-0500\n" "Last-Translator: Eric Rausch \n" "Language-Team: French\n" "Language: fr\n" @@ -4975,6 +4975,15 @@ msgstr "Fichier" msgid "R&ecent games" msgstr "Jeux r&écents" +msgid "&Clear recent games" +msgstr "" + +msgid "Clear recent games" +msgstr "" + +msgid "Clear the recent games list?" +msgstr "" + #: pysollib/ui/tktile/menubar.py:304 msgid "Select &random game" msgstr "Jeu au hasa&rd" diff --git a/po/pl_pysol.po b/po/pl_pysol.po index 34201c93..1a643ab6 100644 --- a/po/pl_pysol.po +++ b/po/pl_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PySolFC\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2023-12-30 09:36-0500\n" +"PO-Revision-Date: 2024-01-15 22:13-0500\n" "Last-Translator: Jerzy Trzeciak \n" "Language-Team: Polish \n" "Language: pl\n" @@ -4995,6 +4995,15 @@ msgstr "Plik" msgid "R&ecent games" msgstr "Ostatni&e gry" +msgid "&Clear recent games" +msgstr "" + +msgid "Clear recent games" +msgstr "" + +msgid "Clear the recent games list?" +msgstr "" + #: pysollib/ui/tktile/menubar.py:304 msgid "Select &random game" msgstr "Wybie&rz grę losowo" diff --git a/po/pt_BR_pysol.po b/po/pt_BR_pysol.po index 4da8744f..014c18ce 100644 --- a/po/pt_BR_pysol.po +++ b/po/pt_BR_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2023-12-30 09:35-0500\n" +"PO-Revision-Date: 2024-01-15 22:14-0500\n" "Last-Translator: Matheus Knack \n" "Language-Team: \n" "Language: pt_BR\n" @@ -4997,6 +4997,15 @@ msgstr "&Arquivo" msgid "R&ecent games" msgstr "Jogos de Recentes" +msgid "&Clear recent games" +msgstr "" + +msgid "Clear recent games" +msgstr "" + +msgid "Clear the recent games list?" +msgstr "" + #: pysollib/ui/tktile/menubar.py:304 msgid "Select &random game" msgstr "Selecionar o jogo aleatório" diff --git a/po/pysol.pot b/po/pysol.pot index 3258a029..406a8540 100644 --- a/po/pysol.pot +++ b/po/pysol.pot @@ -4728,6 +4728,15 @@ msgstr "" msgid "R&ecent games" msgstr "" +msgid "&Clear recent games" +msgstr "" + +msgid "Clear recent games" +msgstr "" + +msgid "Clear the recent games list?" +msgstr "" + #: pysollib/ui/tktile/menubar.py:304 msgid "Select &random game" msgstr "" diff --git a/po/ru_pysol.po b/po/ru_pysol.po index 474c742b..114a7240 100644 --- a/po/ru_pysol.po +++ b/po/ru_pysol.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2023-12-30 09:34-0500\n" +"PO-Revision-Date: 2024-01-15 22:14-0500\n" "Last-Translator: Skomoroh \n" "Language-Team: Russian \n" "Language: ru\n" @@ -5064,6 +5064,15 @@ msgstr "&Файл" msgid "R&ecent games" msgstr "Выбрать н&едавнюю игру" +msgid "&Clear recent games" +msgstr "" + +msgid "Clear recent games" +msgstr "" + +msgid "Clear the recent games list?" +msgstr "" + #: pysollib/ui/tktile/menubar.py:304 msgid "Select &random game" msgstr "С&лучайная игра" diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index 69bdfc42..8f383e21 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -1294,6 +1294,9 @@ class PysolMenubarTkCommon: if gi: games.append(gi) self.updateGamesMenu(submenu, games) + submenu.add_separator() + submenu.add_command(label=n_("&Clear recent games"), + command=self.mClearRecent) def updateCustomGamesMenu(self): menu = self.menupath[".menubar.select.customgames"][2] @@ -1398,6 +1401,17 @@ class PysolMenubarTkCommon: self.app.opt.favorite_gameid.remove(gameid) self.updateFavoriteGamesMenu() + def mClearRecent(self, *event): + if self._cancelDrag(break_pause=False): + return + if not self.game.areYouSure(_("Clear recent games"), + _("Clear the recent games list?")): + return + gameid = self.app.game.id + self.app.opt.recent_gameid = [] + self.app.opt.recent_gameid.append(gameid) + self.updateRecentGamesMenu(self.app.opt.recent_gameid) + def mOpen(self, *event): if self._cancelDrag(break_pause=False): return