1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Added option to search games by games played/won/lost.

This commit is contained in:
Joe R 2023-06-29 22:37:30 -04:00
parent a23a3deee2
commit 7808c546e8
8 changed files with 240 additions and 13 deletions

View file

@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: PySol 0.0.1\n" "Project-Id-Version: PySol 0.0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2023-05-18 18:49-0400\n" "PO-Revision-Date: 2023-06-29 22:25-0400\n"
"Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n" "Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n"
"Language-Team: German\n" "Language-Team: German\n"
"Language: de\n" "Language: de\n"
@ -11,7 +11,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.2.2\n" "X-Generator: Poedit 3.3.1\n"
#: pysollib/actions.py:232 pysollib/kivy/menubar.py:292 #: pysollib/actions.py:232 pysollib/kivy/menubar.py:292
#: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176 #: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176
@ -3452,6 +3452,12 @@ msgstr ""
msgid "Inventor:" msgid "Inventor:"
msgstr "" msgstr ""
msgid "PySol Version:"
msgstr ""
msgid "Statistics:"
msgstr ""
#: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400 #: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400
#: pysollib/tk/selectgame.py:400 #: pysollib/tk/selectgame.py:400
msgid "Played:" msgid "Played:"
@ -3511,6 +3517,18 @@ msgstr ""
msgid "New since" msgid "New since"
msgstr "" msgstr ""
msgid "Games played"
msgstr ""
msgid "Games played and won"
msgstr ""
msgid "Games played and not won"
msgstr ""
msgid "Games not played"
msgstr ""
msgid "Popular" msgid "Popular"
msgstr "" msgstr ""

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 1.02\n" "Project-Id-Version: 1.02\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2023-05-18 18:49-0400\n" "PO-Revision-Date: 2023-06-29 22:24-0400\n"
"Last-Translator: Eric Rausch <neelix570@gmail.com>\n" "Last-Translator: Eric Rausch <neelix570@gmail.com>\n"
"Language-Team: French\n" "Language-Team: French\n"
"Language: fr\n" "Language: fr\n"
@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.2.2\n" "X-Generator: Poedit 3.3.1\n"
#: pysollib/actions.py:232 pysollib/kivy/menubar.py:292 #: pysollib/actions.py:232 pysollib/kivy/menubar.py:292
#: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176 #: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176
@ -3496,6 +3496,12 @@ msgstr ""
msgid "Inventor:" msgid "Inventor:"
msgstr "" msgstr ""
msgid "PySol Version:"
msgstr ""
msgid "Statistics:"
msgstr ""
#: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400 #: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400
#: pysollib/tk/selectgame.py:400 #: pysollib/tk/selectgame.py:400
msgid "Played:" msgid "Played:"
@ -3555,6 +3561,18 @@ msgstr ""
msgid "New since" msgid "New since"
msgstr "" msgstr ""
msgid "Games played"
msgstr ""
msgid "Games played and won"
msgstr ""
msgid "Games played and not won"
msgstr ""
msgid "Games not played"
msgstr ""
msgid "Popular" msgid "Popular"
msgstr "" msgstr ""

View file

@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: it_pysol\n" "Project-Id-Version: it_pysol\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2023-05-18 18:51-0400\n" "PO-Revision-Date: 2023-06-29 22:24-0400\n"
"Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n" "Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n"
"Language-Team: Italiano <it@li.org>\n" "Language-Team: Italiano <it@li.org>\n"
"Language: it\n" "Language: it\n"
@ -21,7 +21,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: pygettext.py 1.6con\n" "Generated-By: pygettext.py 1.6con\n"
"X-Generator: Poedit 3.2.2\n" "X-Generator: Poedit 3.3.1\n"
#: pysollib/actions.py:232 pysollib/kivy/menubar.py:292 #: pysollib/actions.py:232 pysollib/kivy/menubar.py:292
#: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176 #: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176
@ -3557,6 +3557,12 @@ msgstr ""
msgid "Inventor:" msgid "Inventor:"
msgstr "" msgstr ""
msgid "PySol Version:"
msgstr ""
msgid "Statistics:"
msgstr ""
#: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400 #: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400
#: pysollib/tk/selectgame.py:400 #: pysollib/tk/selectgame.py:400
msgid "Played:" msgid "Played:"
@ -3616,6 +3622,18 @@ msgstr ""
msgid "New since" msgid "New since"
msgstr "" msgstr ""
msgid "Games played"
msgstr ""
msgid "Games played and won"
msgstr ""
msgid "Games played and not won"
msgstr ""
msgid "Games not played"
msgstr ""
msgid "Popular" msgid "Popular"
msgstr "" msgstr ""

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PySolFC\n" "Project-Id-Version: PySolFC\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2023-05-28 21:12+0200\n" "PO-Revision-Date: 2023-06-29 22:22-0400\n"
"Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n" "Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n"
"Language-Team: Polish <pl@li.org>\n" "Language-Team: Polish <pl@li.org>\n"
"Language: pl\n" "Language: pl\n"
@ -2605,6 +2605,9 @@ msgstr "Włącz podświetlanie kart"
msgid "Enable highlight same rank" msgid "Enable highlight same rank"
msgstr "Podświetlaj karty o jednakowej sile" msgstr "Podświetlaj karty o jednakowej sile"
msgid "Enable face-down peek"
msgstr ""
#: pysollib/kivy/menubar.py:576 #: pysollib/kivy/menubar.py:576
msgid "Highlight no matching" msgid "Highlight no matching"
msgstr "Podświetlaj brak dopasowa&nia" msgstr "Podświetlaj brak dopasowa&nia"
@ -2778,17 +2781,29 @@ msgstr "Stół gry"
msgid "Solid colors" msgid "Solid colors"
msgstr "Kolory jednorodne" msgstr "Kolory jednorodne"
msgid "Azure"
msgstr ""
#: pysollib/kivy/menubar.py:832 pysollib/pysolgtk/selecttile.py:105 #: pysollib/kivy/menubar.py:832 pysollib/pysolgtk/selecttile.py:105
#: pysollib/tile/selecttile.py:74 pysollib/tk/selecttile.py:73 #: pysollib/tile/selecttile.py:74 pysollib/tk/selecttile.py:73
msgid "Blue" msgid "Blue"
msgstr "Niebieski" msgstr "Niebieski"
msgid "Bright Green"
msgstr ""
msgid "Cyan"
msgstr ""
#: pysollib/kivy/menubar.py:837 pysollib/pysolgtk/selecttile.py:106 #: pysollib/kivy/menubar.py:837 pysollib/pysolgtk/selecttile.py:106
#: pysollib/tile/selecttile.py:75 pysollib/tk/selecttile.py:74 #: pysollib/tile/selecttile.py:75 pysollib/tk/selecttile.py:74
#: pysollib/games/ultra/dashavatara.py:361 pysollib/games/ultra/mughal.py:264 #: pysollib/games/ultra/dashavatara.py:361 pysollib/games/ultra/mughal.py:264
msgid "Green" msgid "Green"
msgstr "Zielony" msgstr "Zielony"
msgid "Magenta"
msgstr ""
#: pysollib/kivy/menubar.py:842 pysollib/pysolgtk/selecttile.py:107 #: pysollib/kivy/menubar.py:842 pysollib/pysolgtk/selecttile.py:107
#: pysollib/tile/selecttile.py:76 pysollib/tk/selecttile.py:75 #: pysollib/tile/selecttile.py:76 pysollib/tk/selecttile.py:75
msgid "Navy" msgid "Navy"
@ -2806,6 +2821,12 @@ msgstr "Oliwkowy"
msgid "Orange" msgid "Orange"
msgstr "Pomarańczowy" msgstr "Pomarańczowy"
msgid "Pink"
msgstr ""
msgid "Purple"
msgstr ""
#: pysollib/kivy/menubar.py:857 pysollib/pysolgtk/selecttile.py:110 #: pysollib/kivy/menubar.py:857 pysollib/pysolgtk/selecttile.py:110
#: pysollib/tile/selecttile.py:79 pysollib/tk/selecttile.py:78 #: pysollib/tile/selecttile.py:79 pysollib/tk/selecttile.py:78
msgid "Teal" msgid "Teal"
@ -3492,6 +3513,12 @@ msgstr ""
msgid "Inventor:" msgid "Inventor:"
msgstr "" msgstr ""
msgid "PySol Version:"
msgstr ""
msgid "Statistics:"
msgstr ""
#: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400 #: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400
#: pysollib/tk/selectgame.py:400 #: pysollib/tk/selectgame.py:400
msgid "Played:" msgid "Played:"
@ -3551,6 +3578,18 @@ msgstr "Obecny w"
msgid "New since" msgid "New since"
msgstr "Nowy od" msgstr "Nowy od"
msgid "Games played"
msgstr ""
msgid "Games played and won"
msgstr ""
msgid "Games played and not won"
msgstr ""
msgid "Games not played"
msgstr ""
msgid "Popular" msgid "Popular"
msgstr "Popularny" msgstr "Popularny"
@ -3761,6 +3800,9 @@ msgstr "Podświetlenie kart: "
msgid "Highlight same rank: " msgid "Highlight same rank: "
msgstr "Podświetlenie jednakowych wartości: " msgstr "Podświetlenie jednakowych wartości: "
msgid "Face-down peeks: "
msgstr ""
#: pysollib/pysolgtk/tkstats.py:533 pysollib/tile/tkstats.py:620 #: pysollib/pysolgtk/tkstats.py:533 pysollib/tile/tkstats.py:620
#: pysollib/tk/tkstats.py:615 #: pysollib/tk/tkstats.py:615
msgid "" msgid ""
@ -3947,18 +3989,48 @@ msgstr "Klasyczny"
msgid "Revitalized" msgid "Revitalized"
msgstr "Odświeżona" msgstr "Odświeżona"
msgid "Alt/Revitalized"
msgstr ""
#: pysollib/tile/menubar.py:123 #: pysollib/tile/menubar.py:123
msgid "Windows native" msgid "Windows Native"
msgstr "Windows" msgstr ""
#: pysollib/tile/menubar.py:124 #: pysollib/tile/menubar.py:124
msgid "XP Native" msgid "XP Native"
msgstr "Windows XP" msgstr "Windows XP"
msgid "Windows XP Blue"
msgstr ""
#: pysollib/tile/menubar.py:125 #: pysollib/tile/menubar.py:125
msgid "Aqua" msgid "Aqua"
msgstr "Aqua" msgstr "Aqua"
msgid "ITFT1"
msgstr ""
msgid "Scid Blue"
msgstr ""
msgid "Scid Green"
msgstr ""
msgid "Scid Grey"
msgstr ""
msgid "Scid Mint"
msgstr ""
msgid "Scid Pink"
msgstr ""
msgid "Scid Purple"
msgstr ""
msgid "Scid Sand"
msgstr ""
#: pysollib/tile/playeroptionsdialog.py:50 #: pysollib/tile/playeroptionsdialog.py:50
#: pysollib/tk/playeroptionsdialog.py:90 #: pysollib/tk/playeroptionsdialog.py:90
msgid "Please enter your name" msgid "Please enter your name"
@ -5070,6 +5142,9 @@ msgstr "Włącz podświetlanie kart"
msgid "Enable highlight same &rank" msgid "Enable highlight same &rank"
msgstr "Podświetlaj karty o jednakowej sile" msgstr "Podświetlaj karty o jednakowej sile"
msgid "Enable face-down &peek"
msgstr ""
#: pysollib/ui/tktile/menubar.py:503 #: pysollib/ui/tktile/menubar.py:503
msgid "Highlight &no matching" msgid "Highlight &no matching"
msgstr "Podświetlaj brak dopasowa&nia" msgstr "Podświetlaj brak dopasowa&nia"
@ -5182,6 +5257,9 @@ msgstr ""
msgid "Shade &filled stacks" msgid "Shade &filled stacks"
msgstr "Cieniuj wypełnione stosy" msgstr "Cieniuj wypełnione stosy"
msgid "&Compact long stacks"
msgstr ""
msgid "&Randomize card placement" msgid "&Randomize card placement"
msgstr "Umieść karty w losowych miejscach" msgstr "Umieść karty w losowych miejscach"
@ -5217,6 +5295,9 @@ msgstr "Bardzo powoli"
msgid "&Redeal animation" msgid "&Redeal animation"
msgstr "Animacja &rozdawania" msgstr "Animacja &rozdawania"
msgid "F&lip animation"
msgstr ""
#: pysollib/ui/tktile/menubar.py:592 #: pysollib/ui/tktile/menubar.py:592
msgid "&Winning animation" msgid "&Winning animation"
msgstr "Animacja &wygranej" msgstr "Animacja &wygranej"
@ -5485,3 +5566,6 @@ msgstr "Ruchy ogółem"
#: data/pysolfc.glade:3145 #: data/pysolfc.glade:3145
msgid "Set font" msgid "Set font"
msgstr "Ustaw czcionkę" msgstr "Ustaw czcionkę"
#~ msgid "Windows native"
#~ msgstr "Windows"

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2023-05-18 18:51-0400\n" "PO-Revision-Date: 2023-06-29 22:23-0400\n"
"Last-Translator: Matheus Knack <mtknack555@gmail.com>\n" "Last-Translator: Matheus Knack <mtknack555@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: pt_BR\n" "Language: pt_BR\n"
@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.2.2\n" "X-Generator: Poedit 3.3.1\n"
#: pysollib/actions.py:232 pysollib/kivy/menubar.py:292 #: pysollib/actions.py:232 pysollib/kivy/menubar.py:292
#: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176 #: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176
@ -3519,6 +3519,12 @@ msgstr "Compatibilidade:"
msgid "Inventor:" msgid "Inventor:"
msgstr "Inventor:" msgstr "Inventor:"
msgid "PySol Version:"
msgstr ""
msgid "Statistics:"
msgstr ""
#: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400 #: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400
#: pysollib/tk/selectgame.py:400 #: pysollib/tk/selectgame.py:400
msgid "Played:" msgid "Played:"
@ -3578,6 +3584,18 @@ msgstr "Presente em"
msgid "New since" msgid "New since"
msgstr "Novo desde" msgstr "Novo desde"
msgid "Games played"
msgstr ""
msgid "Games played and won"
msgstr ""
msgid "Games played and not won"
msgstr ""
msgid "Games not played"
msgstr ""
msgid "Popular" msgid "Popular"
msgstr "Popular" msgstr "Popular"

View file

@ -3316,6 +3316,12 @@ msgstr ""
msgid "Inventor:" msgid "Inventor:"
msgstr "" msgstr ""
msgid "PySol Version:"
msgstr ""
msgid "Statistics:"
msgstr ""
#: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400 #: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400
#: pysollib/tk/selectgame.py:400 #: pysollib/tk/selectgame.py:400
msgid "Played:" msgid "Played:"
@ -3375,6 +3381,18 @@ msgstr ""
msgid "New since" msgid "New since"
msgstr "" msgstr ""
msgid "Games played"
msgstr ""
msgid "Games played and won"
msgstr ""
msgid "Games played and not won"
msgstr ""
msgid "Games not played"
msgstr ""
msgid "Popular" msgid "Popular"
msgstr "" msgstr ""

View file

@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-12-10 10:19-0500\n" "POT-Creation-Date: 2021-12-10 10:19-0500\n"
"PO-Revision-Date: 2023-05-18 18:53-0400\n" "PO-Revision-Date: 2023-06-29 22:23-0400\n"
"Last-Translator: Skomoroh <skomoroh@gmail.com>\n" "Last-Translator: Skomoroh <skomoroh@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n" "Language-Team: Russian <ru@li.org>\n"
"Language: ru\n" "Language: ru\n"
@ -17,7 +17,7 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"Generated-By: pygettext.py 1.6con\n" "Generated-By: pygettext.py 1.6con\n"
"X-Generator: Poedit 3.2.2\n" "X-Generator: Poedit 3.3.1\n"
#: pysollib/actions.py:232 pysollib/kivy/menubar.py:292 #: pysollib/actions.py:232 pysollib/kivy/menubar.py:292
#: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176 #: pysollib/kivy/toolbar.py:191 pysollib/tile/toolbar.py:176
@ -3568,6 +3568,12 @@ msgstr ""
msgid "Inventor:" msgid "Inventor:"
msgstr "" msgstr ""
msgid "PySol Version:"
msgstr ""
msgid "Statistics:"
msgstr ""
#: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400 #: pysollib/pysolgtk/selectgame.py:122 pysollib/tile/selectgame.py:400
#: pysollib/tk/selectgame.py:400 #: pysollib/tk/selectgame.py:400
msgid "Played:" msgid "Played:"
@ -3627,6 +3633,18 @@ msgstr ""
msgid "New since" msgid "New since"
msgstr "" msgstr ""
msgid "Games played"
msgstr ""
msgid "Games played and won"
msgstr ""
msgid "Games played and not won"
msgstr ""
msgid "Games not played"
msgstr ""
msgid "Popular" msgid "Popular"
msgstr "" msgstr ""

View file

@ -602,6 +602,20 @@ class SelectGameDialogWithPreview(SelectGameDialog):
if not version_okay: if not version_okay:
continue continue
if self.criteria.statistics != '':
won, lost = self.app.stats.getStats \
(self.app.opt.player, game.id)
statoption = \
self.criteria.statisticsOptions[self.criteria.statistics]
if statoption == 'played' and won + lost == 0:
continue
elif statoption == 'won' and won == 0:
continue
elif statoption == 'not won' and (won != 0 or lost == 0):
continue
elif statoption == 'not played' and won + lost != 0:
continue
if (self.criteria.popular and if (self.criteria.popular and
not (game.si.game_flags & GI.GT_POPULAR)): not (game.si.game_flags & GI.GT_POPULAR)):
continue continue
@ -657,6 +671,7 @@ class SelectGameDialogWithPreview(SelectGameDialog):
self.criteria.inventor = d.inventor.get() self.criteria.inventor = d.inventor.get()
self.criteria.versioncompare = d.versioncompare.get() self.criteria.versioncompare = d.versioncompare.get()
self.criteria.version = d.version.get() self.criteria.version = d.version.get()
self.criteria.statistics = d.statistics.get()
self.criteria.popular = d.popular.get() self.criteria.popular = d.popular.get()
self.criteria.children = d.children.get() self.criteria.children = d.children.get()
@ -838,6 +853,7 @@ class SearchCriteria:
self.inventor = "" self.inventor = ""
self.versioncompare = "New in" self.versioncompare = "New in"
self.version = "" self.version = ""
self.statistics = ""
self.popular = False self.popular = False
self.children = False self.children = False
@ -879,6 +895,12 @@ class SearchCriteria:
self.versionCompareOptions = ("New in", "Present in", "New since") self.versionCompareOptions = ("New in", "Present in", "New since")
self.statisticsOptions = {"": "all",
"Games played": "played",
"Games played and won": "won",
"Games played and not won": "not won",
"Games not played": "not played"}
class SelectGameAdvancedSearch(MfxDialog): class SelectGameAdvancedSearch(MfxDialog):
def __init__(self, parent, title, criteria, **kw): def __init__(self, parent, title, criteria, **kw):
@ -910,6 +932,8 @@ class SelectGameAdvancedSearch(MfxDialog):
self.versioncompare.set(criteria.versioncompare) self.versioncompare.set(criteria.versioncompare)
self.version = tkinter.StringVar() self.version = tkinter.StringVar()
self.version.set(criteria.version) self.version.set(criteria.version)
self.statistics = tkinter.StringVar()
self.statistics.set(criteria.statistics)
self.popular = tkinter.BooleanVar() self.popular = tkinter.BooleanVar()
self.popular.set(criteria.popular) self.popular.set(criteria.popular)
@ -1052,6 +1076,17 @@ class SelectGameAdvancedSearch(MfxDialog):
padx=1, pady=1) padx=1, pady=1)
row += 1 row += 1
statisticsValues = list(criteria.statisticsOptions.keys())
labelStats = tkinter.Label(top_frame, text="Statistics:", anchor="w")
labelStats.grid(row=row, column=0, columnspan=1, sticky='ew',
padx=1, pady=1)
textStats = PysolCombo(top_frame, values=statisticsValues,
textvariable=self.statistics, state='readonly')
textStats.grid(row=row, column=1, columnspan=4, sticky='ew',
padx=1, pady=1)
row += 1
col = 0 col = 0
popularCheck = tkinter.Checkbutton(top_frame, variable=self.popular, popularCheck = tkinter.Checkbutton(top_frame, variable=self.popular,
text=_("Popular"), anchor="w") text=_("Popular"), anchor="w")