diff --git a/data/images/buttons/bluecurve/clear.png b/data/images/buttons/bluecurve/clear.png new file mode 100644 index 00000000..7673e62c Binary files /dev/null and b/data/images/buttons/bluecurve/clear.png differ diff --git a/data/images/buttons/remix/clear.png b/data/images/buttons/remix/clear.png new file mode 100644 index 00000000..2278c271 Binary files /dev/null and b/data/images/buttons/remix/clear.png differ diff --git a/po/de_pysol.po b/po/de_pysol.po index 974acb98..44c372d5 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: 2024-11-10 18:26-0500\n" +"PO-Revision-Date: 2024-11-16 11:21-0500\n" "Last-Translator: H. Schaekel \n" "Language-Team: German\n" "Language: de\n" @@ -111,6 +111,9 @@ msgstr "&Nächste Nummer" msgid "&Cancel" msgstr "&Abbruch" +msgid "C&lear" +msgstr "" + #: pysollib/actions.py:311 msgid "Select random game" msgstr "Zufallsspiel auswählen" diff --git a/po/fr_pysol.po b/po/fr_pysol.po index 57d1a0e9..63a283c6 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: 2024-11-10 18:25-0500\n" +"PO-Revision-Date: 2024-11-16 11:21-0500\n" "Last-Translator: Eric Rausch \n" "Language-Team: French\n" "Language: fr\n" @@ -116,6 +116,9 @@ msgstr "&Numéro suivant" msgid "&Cancel" msgstr "&Annuler" +msgid "C&lear" +msgstr "" + #: pysollib/actions.py:311 msgid "Select random game" msgstr "Jeu au hasard" diff --git a/po/it_pysol.po b/po/it_pysol.po index 05d8d311..7da3384a 100644 --- a/po/it_pysol.po +++ b/po/it_pysol.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: it_pysol\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-11-10 18:25-0500\n" +"PO-Revision-Date: 2024-11-16 11:21-0500\n" "Last-Translator: Giuliano Colla \n" "Language-Team: Italiano \n" "Language: it\n" @@ -121,6 +121,9 @@ msgstr "&Numero successivo" msgid "&Cancel" msgstr "&Cancella" +msgid "C&lear" +msgstr "" + #: pysollib/actions.py:311 msgid "Select random game" msgstr "Un gioco a caso" diff --git a/po/pl_pysol.po b/po/pl_pysol.po index 573566d0..08c65861 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: 2024-11-10 18:25-0500\n" +"PO-Revision-Date: 2024-11-16 11:22-0500\n" "Last-Translator: Jerzy Trzeciak \n" "Language-Team: Polish \n" "Language: pl\n" @@ -117,6 +117,9 @@ msgstr "&Następny numer" msgid "&Cancel" msgstr "Anuluj" +msgid "C&lear" +msgstr "" + #: pysollib/actions.py:311 msgid "Select random game" msgstr "Wybierz grę losowo" diff --git a/po/pt_BR_pysol.po b/po/pt_BR_pysol.po index 5f2e17c5..ecb79f48 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: 2024-11-10 18:26-0500\n" +"PO-Revision-Date: 2024-11-16 11:23-0500\n" "Last-Translator: Matheus Knack \n" "Language-Team: \n" "Language: pt_BR\n" @@ -116,6 +116,9 @@ msgstr "&próximo número" msgid "&Cancel" msgstr "&Cancelar" +msgid "C&lear" +msgstr "" + #: pysollib/actions.py:311 msgid "Select random game" msgstr "Selecionar jogo aleatório" diff --git a/po/pysol.pot b/po/pysol.pot index 3fb79539..e131b204 100644 --- a/po/pysol.pot +++ b/po/pysol.pot @@ -113,6 +113,9 @@ msgstr "" msgid "&Cancel" msgstr "" +msgid "C&lear" +msgstr "" + #: pysollib/actions.py:311 msgid "Select random game" msgstr "" diff --git a/po/ru_pysol.po b/po/ru_pysol.po index 7976cf9e..563a2079 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: 2024-11-10 18:24-0500\n" +"PO-Revision-Date: 2024-11-16 11:23-0500\n" "Last-Translator: Skomoroh \n" "Language-Team: Russian \n" "Language: ru\n" @@ -117,6 +117,9 @@ msgstr "&Следующий номер" msgid "&Cancel" msgstr "От&мена" +msgid "C&lear" +msgstr "" + #: pysollib/actions.py:311 msgid "Select random game" msgstr "Выбор случайной игры" diff --git a/pysollib/app.py b/pysollib/app.py index acad747d..fd704b3d 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -567,6 +567,7 @@ class Application: (_('&Next number'), 'next'), (_('&Play'), 'next'), (_('&Play this game'), 'next'), + (_('C&lear'), 'clear'), (_('&Solid color...'), 'color'), (_('&Save to file'), 'save'), (_('&Statistics...'), 'statistics'), diff --git a/pysollib/tile/selectcardset.py b/pysollib/tile/selectcardset.py index 13ad74fa..1683cf49 100644 --- a/pysollib/tile/selectcardset.py +++ b/pysollib/tile/selectcardset.py @@ -548,6 +548,10 @@ class SelectCardsetDialogWithPreview(MfxDialog): d = SelectCardsetAdvancedSearch(self.top, _("Advanced search"), self.criteria, self.manager) if d.status == 0 and d.button == 0: + self.criteria = SearchCriteria(self.manager) + self.performSearch() + + if d.status == 0 and d.button == 1: self.criteria.name = d.name.get() self.list_searchtext.delete(0, "end") @@ -903,11 +907,14 @@ class SelectCardsetAdvancedSearch(MfxDialog): top_frame, variable=self.compatible, text=_("Compatible with current game"), anchor="w" ) - compatCheck.grid(row=row, column=0, columnspan=2, sticky='ew', + compatCheck.grid(row=row, column=0, columnspan=5, sticky='ew', padx=1, pady=1) + top_frame.columnconfigure(4, weight=1) + focus = self.createButtons(bottom_frame, kw) # focus = text_w + self.mainloop(focus, kw.timeout) def updateSubtypes(self, *args): @@ -929,7 +936,7 @@ class SelectCardsetAdvancedSearch(MfxDialog): def initKw(self, kw): kw = KwStruct(kw, - strings=(_("&OK"), _("&Cancel")), default=0, - padx=10, pady=10, + strings=(_("C&lear"), 'sep', _("&OK"), _("&Cancel")), + default=1, padx=10, pady=10, ) return MfxDialog.initKw(self, kw) diff --git a/pysollib/tile/selectgame.py b/pysollib/tile/selectgame.py index 9975d825..a3a78c57 100644 --- a/pysollib/tile/selectgame.py +++ b/pysollib/tile/selectgame.py @@ -676,6 +676,10 @@ class SelectGameDialogWithPreview(SelectGameDialog): d = SelectGameAdvancedSearch(self.top, _("Advanced search"), self.criteria) if d.status == 0 and d.button == 0: + self.criteria = SearchCriteria() + self.performSearch() + + if d.status == 0 and d.button == 1: self.criteria.name = d.name.get() self.list_searchtext.delete(0, "end") @@ -1227,6 +1231,9 @@ class SelectGameAdvancedSearch(MfxDialog): padx=1, pady=1) focus = self.createButtons(bottom_frame, kw) + + top_frame.config(width=bottom_frame.winfo_width()) + # focus = text_w self.mainloop(focus, kw.timeout) @@ -1249,7 +1256,7 @@ class SelectGameAdvancedSearch(MfxDialog): def initKw(self, kw): kw = KwStruct(kw, - strings=(_("&OK"), _("&Cancel")), default=0, - padx=10, pady=10, + strings=(_("C&lear"), 'sep', _("&OK"), _("&Cancel")), + default=1, padx=10, pady=10, ) return MfxDialog.initKw(self, kw) diff --git a/pysollib/tile/selecttile.py b/pysollib/tile/selecttile.py index fca9b27c..37546ee0 100644 --- a/pysollib/tile/selecttile.py +++ b/pysollib/tile/selecttile.py @@ -344,6 +344,10 @@ class SelectTileDialogWithPreview(MfxDialog): d = SelectTileAdvancedSearch(self.top, _("Advanced search"), self.criteria) if d.status == 0 and d.button == 0: + self.criteria = SearchCriteria() + self.performSearch() + + if d.status == 0 and d.button == 1: self.criteria.name = d.name.get() self.list_searchtext.delete(0, "end") @@ -461,13 +465,15 @@ class SelectTileAdvancedSearch(MfxDialog): padx=1, pady=1) row += 1 + top_frame.columnconfigure(4, weight=1) + focus = self.createButtons(bottom_frame, kw) # focus = text_w self.mainloop(focus, kw.timeout) def initKw(self, kw): kw = KwStruct(kw, - strings=(_("&OK"), _("&Cancel")), default=0, - padx=10, pady=10, + strings=(_("C&lear"), 'sep', _("&OK"), _("&Cancel")), + default=1, padx=10, pady=10, ) return MfxDialog.initKw(self, kw) diff --git a/pysollib/tile/tkwidget.py b/pysollib/tile/tkwidget.py index c8cb6f3a..7fb3f810 100644 --- a/pysollib/tile/tkwidget.py +++ b/pysollib/tile/tkwidget.py @@ -154,7 +154,7 @@ class MfxDialog: # ex. _ToplevelDialog separator = ttk.Separator(self._frame) separator.pack(side='bottom', fill='x') top_frame = ttk.Frame(self._frame) - top_frame.pack(side='top', fill='both', expand=1) + top_frame.pack(side='top', fill='both', expand=True) return top_frame, bottom_frame def createBitmaps(self, frame, kw):