mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added game search options for PySol versions and popular games.
This commit is contained in:
parent
a3e8bcc8d8
commit
c00e73d2d7
7 changed files with 143 additions and 8 deletions
|
@ -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: 2022-08-13 11:50-0400\n"
|
||||
"PO-Revision-Date: 2022-08-22 17:51-0400\n"
|
||||
"Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n"
|
||||
"Language-Team: German\n"
|
||||
"Language: de\n"
|
||||
|
@ -3372,6 +3372,18 @@ msgstr ""
|
|||
msgid "Check alternate names"
|
||||
msgstr ""
|
||||
|
||||
msgid "New in"
|
||||
msgstr ""
|
||||
|
||||
msgid "Present in"
|
||||
msgstr ""
|
||||
|
||||
msgid "New since"
|
||||
msgstr ""
|
||||
|
||||
msgid "Popular"
|
||||
msgstr ""
|
||||
|
||||
msgid "Children's"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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: 2022-08-13 11:49-0400\n"
|
||||
"PO-Revision-Date: 2022-08-22 17:52-0400\n"
|
||||
"Last-Translator: Eric Rausch <neelix570@gmail.com>\n"
|
||||
"Language-Team: French\n"
|
||||
"Language: fr\n"
|
||||
|
@ -3418,6 +3418,18 @@ msgstr ""
|
|||
msgid "Check alternate names"
|
||||
msgstr ""
|
||||
|
||||
msgid "New in"
|
||||
msgstr ""
|
||||
|
||||
msgid "Present in"
|
||||
msgstr ""
|
||||
|
||||
msgid "New since"
|
||||
msgstr ""
|
||||
|
||||
msgid "Popular"
|
||||
msgstr ""
|
||||
|
||||
msgid "Children's"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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: 2022-08-13 11:49-0400\n"
|
||||
"PO-Revision-Date: 2022-08-22 17:53-0400\n"
|
||||
"Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n"
|
||||
"Language-Team: Italiano <it@li.org>\n"
|
||||
"Language: it\n"
|
||||
|
@ -3479,6 +3479,18 @@ msgstr ""
|
|||
msgid "Check alternate names"
|
||||
msgstr ""
|
||||
|
||||
msgid "New in"
|
||||
msgstr ""
|
||||
|
||||
msgid "Present in"
|
||||
msgstr ""
|
||||
|
||||
msgid "New since"
|
||||
msgstr ""
|
||||
|
||||
msgid "Popular"
|
||||
msgstr ""
|
||||
|
||||
msgid "Children's"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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: 2022-08-13 11:48-0400\n"
|
||||
"PO-Revision-Date: 2022-08-22 17:53-0400\n"
|
||||
"Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n"
|
||||
"Language-Team: Polish <pl@li.org>\n"
|
||||
"Language: pl\n"
|
||||
|
@ -3518,6 +3518,18 @@ msgstr ""
|
|||
msgid "Check alternate names"
|
||||
msgstr ""
|
||||
|
||||
msgid "New in"
|
||||
msgstr ""
|
||||
|
||||
msgid "Present in"
|
||||
msgstr ""
|
||||
|
||||
msgid "New since"
|
||||
msgstr ""
|
||||
|
||||
msgid "Popular"
|
||||
msgstr ""
|
||||
|
||||
msgid "Children's"
|
||||
msgstr ""
|
||||
|
||||
|
|
12
po/pysol.pot
12
po/pysol.pot
|
@ -3244,6 +3244,18 @@ msgstr ""
|
|||
msgid "Check alternate names"
|
||||
msgstr ""
|
||||
|
||||
msgid "New in"
|
||||
msgstr ""
|
||||
|
||||
msgid "Present in"
|
||||
msgstr ""
|
||||
|
||||
msgid "New since"
|
||||
msgstr ""
|
||||
|
||||
msgid "Popular"
|
||||
msgstr ""
|
||||
|
||||
msgid "Children's"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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: 2022-08-13 11:47-0400\n"
|
||||
"PO-Revision-Date: 2022-08-22 17:54-0400\n"
|
||||
"Last-Translator: Skomoroh <skomoroh@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"Language: ru\n"
|
||||
|
@ -3490,6 +3490,18 @@ msgstr ""
|
|||
msgid "Check alternate names"
|
||||
msgstr ""
|
||||
|
||||
msgid "New in"
|
||||
msgstr ""
|
||||
|
||||
msgid "Present in"
|
||||
msgstr ""
|
||||
|
||||
msgid "New since"
|
||||
msgstr ""
|
||||
|
||||
msgid "Popular"
|
||||
msgstr ""
|
||||
|
||||
msgid "Children's"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -582,6 +582,29 @@ class SelectGameDialogWithPreview(SelectGameDialog):
|
|||
if not invent_okay:
|
||||
continue
|
||||
|
||||
if self.criteria.version != "":
|
||||
version_okay = False
|
||||
version_found = False
|
||||
for name, games in GI.GAMES_BY_PYSOL_VERSION:
|
||||
if self.criteria.version == name:
|
||||
version_found = True
|
||||
if game.id in games:
|
||||
version_okay = True
|
||||
break
|
||||
elif ((not version_found and
|
||||
self.criteria.versioncompare == "Present in")
|
||||
or (version_found and
|
||||
self.criteria.versioncompare == "New since")):
|
||||
if game.id in games:
|
||||
version_okay = True
|
||||
break
|
||||
|
||||
if not version_okay:
|
||||
continue
|
||||
|
||||
if (self.criteria.popular and
|
||||
not (game.si.game_flags & GI.GT_POPULAR)):
|
||||
continue
|
||||
if (self.criteria.children and
|
||||
not (game.si.game_flags & GI.GT_CHILDREN)):
|
||||
continue
|
||||
|
@ -632,7 +655,10 @@ class SelectGameDialogWithPreview(SelectGameDialog):
|
|||
self.criteria.redeals = d.redeals.get()
|
||||
self.criteria.compat = d.compat.get()
|
||||
self.criteria.inventor = d.inventor.get()
|
||||
self.criteria.versioncompare = d.versioncompare.get()
|
||||
self.criteria.version = d.version.get()
|
||||
|
||||
self.criteria.popular = d.popular.get()
|
||||
self.criteria.children = d.children.get()
|
||||
self.criteria.scoring = d.scoring.get()
|
||||
self.criteria.stripped = d.stripped.get()
|
||||
|
@ -810,7 +836,10 @@ class SearchCriteria:
|
|||
self.redeals = ""
|
||||
self.compat = ""
|
||||
self.inventor = ""
|
||||
self.versioncompare = "New in"
|
||||
self.version = ""
|
||||
|
||||
self.popular = False
|
||||
self.children = False
|
||||
self.scoring = False
|
||||
self.stripped = False
|
||||
|
@ -848,6 +877,8 @@ class SearchCriteria:
|
|||
"Variable redeals": -2,
|
||||
"Other number of redeals": 4}
|
||||
|
||||
self.versionCompareOptions = ("New in", "Present in", "New since")
|
||||
|
||||
|
||||
class SelectGameAdvancedSearch(MfxDialog):
|
||||
def __init__(self, parent, title, criteria, **kw):
|
||||
|
@ -875,7 +906,13 @@ class SelectGameAdvancedSearch(MfxDialog):
|
|||
self.compat.set(criteria.compat)
|
||||
self.inventor = tkinter.StringVar()
|
||||
self.inventor.set(criteria.inventor)
|
||||
self.versioncompare = tkinter.StringVar()
|
||||
self.versioncompare.set(criteria.versioncompare)
|
||||
self.version = tkinter.StringVar()
|
||||
self.version.set(criteria.version)
|
||||
|
||||
self.popular = tkinter.BooleanVar()
|
||||
self.popular.set(criteria.popular)
|
||||
self.children = tkinter.BooleanVar()
|
||||
self.children.set(criteria.children)
|
||||
self.scoring = tkinter.BooleanVar()
|
||||
|
@ -994,7 +1031,33 @@ class SelectGameAdvancedSearch(MfxDialog):
|
|||
padx=1, pady=1)
|
||||
row += 1
|
||||
|
||||
versionCompareValues = list(criteria.versionCompareOptions)
|
||||
versionValues = list()
|
||||
versionValues.append("")
|
||||
for name, games in GI.GAMES_BY_PYSOL_VERSION:
|
||||
versionValues.append(name)
|
||||
|
||||
labelVersion = tkinter.Label(top_frame, text="PySol Version:",
|
||||
anchor="w")
|
||||
labelVersion.grid(row=row, column=0, columnspan=1, sticky='ew',
|
||||
padx=1, pady=1)
|
||||
textVersionCompare = PysolCombo(top_frame, values=versionCompareValues,
|
||||
textvariable=self.versioncompare)
|
||||
textVersionCompare.grid(row=row, column=1, columnspan=2, sticky='ew',
|
||||
padx=1, pady=1)
|
||||
textVersion = PysolCombo(top_frame, values=versionValues,
|
||||
textvariable=self.version)
|
||||
textVersion.grid(row=row, column=3, columnspan=2, sticky='ew',
|
||||
padx=1, pady=1)
|
||||
row += 1
|
||||
|
||||
col = 0
|
||||
popularCheck = tkinter.Checkbutton(top_frame, variable=self.popular,
|
||||
text=_("Popular"), anchor="w")
|
||||
popularCheck.grid(row=row, column=col, columnspan=1, sticky='ew',
|
||||
padx=1, pady=1)
|
||||
col += 1
|
||||
|
||||
childCheck = tkinter.Checkbutton(top_frame, variable=self.children,
|
||||
text=_("Children's"), anchor="w")
|
||||
childCheck.grid(row=row, column=col, columnspan=1, sticky='ew',
|
||||
|
@ -1011,14 +1074,14 @@ class SelectGameAdvancedSearch(MfxDialog):
|
|||
text=_("Stripped Deck"), anchor="w")
|
||||
stripCheck.grid(row=row, column=col, columnspan=1, sticky='ew',
|
||||
padx=1, pady=1)
|
||||
col += 1
|
||||
row += 1
|
||||
col = 0
|
||||
|
||||
sepCheck = tkinter.Checkbutton(top_frame, variable=self.separate,
|
||||
text=_("Separate Decks"), anchor="w")
|
||||
sepCheck.grid(row=row, column=col, columnspan=1, sticky='ew',
|
||||
padx=1, pady=1)
|
||||
row += 1
|
||||
col = 0
|
||||
col += 1
|
||||
|
||||
openCheck = tkinter.Checkbutton(top_frame, variable=self.open,
|
||||
text=_("Open"), anchor="w")
|
||||
|
|
Loading…
Add table
Reference in a new issue