Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions buildozer/aversion
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ sversion=$(echo $version | sed -E "s:(.*)\..*:\1:")
tuple=$(echo $version | sed -E "s:(.*)\.(.*)\.(.*):(\1, \2, \3):")

# patch different version info accordingly.
sed -E "s:VERSION_TUPLE =.*:VERSION_TUPLE = $tuple:" -i $appdir/pysollib/settings.py
sed -E "s:(.*\(')dev(',.*):\1fc-$sversion\2:" -i $appdir/pysollib/gamedb.py
tmp1=$(mktemp)
sed -E "s:VERSION_TUPLE =.*:VERSION_TUPLE = $tuple:" \
$appdir/pysollib/settings.py > "$tmp1"
mv "$tmp1" $appdir/pysollib/settings.py

tmp2=$(mktemp)
sed -E "s:(.*\(')dev(',.*):\1fc-$sversion\2:" \
$appdir/pysollib/gamedb.py > "$tmp2"
mv "$tmp2" $appdir/pysollib/gamedb.py

echo "VERSION = $version"
2 changes: 1 addition & 1 deletion buildozer/resize4k
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash

location='.'
if [ $1 ]
Expand Down
4 changes: 4 additions & 0 deletions po/de_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -2819,6 +2819,10 @@ msgstr ""
msgid "Full picture"
msgstr ""

#: pysollib\kivy\menubar.py:146 pysollib\kivy\selectgame.py:493
msgid "< Back"
msgstr ""

#: pysollib\kivy\menubar.py:265
msgid "File"
msgstr "Datei"
Expand Down
4 changes: 4 additions & 0 deletions po/fr_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -2860,6 +2860,10 @@ msgstr ""
msgid "Full picture"
msgstr ""

#: pysollib\kivy\menubar.py:146 pysollib\kivy\selectgame.py:493
msgid "< Back"
msgstr ""

#: pysollib\kivy\menubar.py:265
msgid "File"
msgstr "Fichier"
Expand Down
4 changes: 4 additions & 0 deletions po/it_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -2866,6 +2866,10 @@ msgstr ""
msgid "Full picture"
msgstr ""

#: pysollib\kivy\menubar.py:146 pysollib\kivy\selectgame.py:493
msgid "< Back"
msgstr ""

#: pysollib\kivy\menubar.py:265
msgid "File"
msgstr ""
Expand Down
4 changes: 4 additions & 0 deletions po/pl_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -2881,6 +2881,10 @@ msgstr ""
msgid "Full picture"
msgstr ""

#: pysollib\kivy\menubar.py:146 pysollib\kivy\selectgame.py:493
msgid "< Back"
msgstr ""

#: pysollib\kivy\menubar.py:265
msgid "File"
msgstr "Plik"
Expand Down
4 changes: 4 additions & 0 deletions po/pt_BR_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -2888,6 +2888,10 @@ msgstr ""
msgid "Full picture"
msgstr ""

#: pysollib\kivy\menubar.py:146 pysollib\kivy\selectgame.py:493
msgid "< Back"
msgstr ""

#: pysollib\kivy\menubar.py:265
msgid "File"
msgstr "Arquivo"
Expand Down
4 changes: 4 additions & 0 deletions po/pysol.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3005,6 +3005,10 @@ msgstr ""
msgid "Full picture"
msgstr ""

#: pysollib\kivy\menubar.py:146 pysollib\kivy\selectgame.py:493
msgid "< Back"
msgstr ""

#: pysollib\kivy\menubar.py:265
msgid "File"
msgstr ""
Expand Down
4 changes: 4 additions & 0 deletions po/ru_pysol.po
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,10 @@ msgstr ""
msgid "Full picture"
msgstr ""

#: pysollib\kivy\menubar.py:146 pysollib\kivy\selectgame.py:493
msgid "< Back"
msgstr ""

#: pysollib\kivy\menubar.py:265
msgid "File"
msgstr "Файл"
Expand Down
7 changes: 7 additions & 0 deletions pysollib/kivy/LApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,7 @@ def __init__(self, top, title='', **kw):
super().__init__(title=title, **kw)

self.main = top
self.is_overlay = True
self.titleline.bind(on_press=self.onClick)
self.main.pushWork(self.title, self)

Expand Down Expand Up @@ -1787,6 +1788,12 @@ def rebuildContainer(self):

def pushWork(self, key, widget):
if (widget):
is_overlay = getattr(widget, 'is_overlay', False)
if key != 'playground' and not is_overlay:
for k, w in list(self.workStack.items):
if k not in ('playground', key) and not getattr(
w, 'is_overlay', False):
self.workStack.pop(k)
self.workStack.push(key, widget)
self.rebuildContainer()

Expand Down
25 changes: 22 additions & 3 deletions pysollib/kivy/menubar.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ def addSliderNode(self, tv, rg, auto_var, auto_setup):
LTreeSliderNode(variable=auto_var, setup=auto_setup), rg)
return rg1

def addBackNode(self, tv):
tv.add_node(LTreeNode(
text='[b]' + _('< Back') + '[/b]',
command=self.make_command(self.menubar.mMainMenuDialog)))

# ************************************************************************
# * Tree Generators
# ************************************************************************
Expand Down Expand Up @@ -323,6 +328,8 @@ def doit():
return doit

def buildTree(self, tv, node):
self.addBackNode(tv)

rg = tv.add_node(
LTreeNode(text=_('Recent games')))
recids = self.app.opt.recent_gameid
Expand Down Expand Up @@ -370,6 +377,8 @@ def __init__(self, menubar, parent, title, app, **kw):
menubar, parent, title, app, **kw)

def buildTree(self, tv, node):
self.addBackNode(tv)

tv.add_node(LTreeNode(
text=_('New game'), command=self.menubar.mNewGame))
tv.add_node(LTreeNode(
Expand Down Expand Up @@ -444,22 +453,26 @@ def __init__(self, menubar, parent, title, app, **kw):
super().__init__(
menubar, parent, title, app, **kw)

def make_command(self, key, command):
def make_stats_command(self, key, command):
def stats_command():
kw = {}
kw['mode'] = key
command(**kw)
return stats_command

def buildTree(self, tv, node):
self.addBackNode(tv)

tv.add_node(LTreeNode(
text=_('Current game...'),
command=self.auto_close(
self.make_command(101, self.menubar.mPlayerStats))), None)
self.make_stats_command(101, self.menubar.mPlayerStats))),
None)

# tv.add_node(LTreeNode(
# text='All games ...',
# command=self.make_command(102, self.menubar.mPlayerStats)), None)
# command=self.make_stats_command(102, self.menubar.mPlayerStats)),
# None)

# -------------------------------------------
# TBD ? - just to remember original tk code.
Expand Down Expand Up @@ -515,6 +528,8 @@ def __init__(self, menubar, parent, title, app, **kw):
menubar, parent, title, app, **kw)

def buildTree(self, tv, node):
self.addBackNode(tv)

tv.add_node(LTreeNode(
text=_('Hint'), command=self.menubar.mHint))

Expand Down Expand Up @@ -552,6 +567,8 @@ def buildTree(self, tv, node):

class LOptionsMenuGenerator(LTreeGenerator):
def buildTree(self, tv, node):
self.addBackNode(tv)

# -------------------------------------------
# Automatic play settings

Expand Down Expand Up @@ -1344,6 +1361,8 @@ def __init__(self, menubar, parent, title, app, **kw):
super().__init__(menubar, parent, title, app, **kw)

def buildTree(self, tv, node):
self.addBackNode(tv)

tv.add_node(
LTreeNode(
text=_('Contents'),
Expand Down
6 changes: 6 additions & 0 deletions pysollib/kivy/selectgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ def loaderCB(treeview, node):
tv.load_func = loaderCB
tv.bind(minimum_height=tv.setter('height'))

def back_command():
parent.popWork('SelectGame')
self.app.menubar.mMainMenuDialog()
tv.add_node(LTreeNode(
text='[b]' + _('< Back') + '[/b]', command=back_command))

# tree in einem Scrollwindow präsentieren.

root = LScrollView(pos=(0, 0))
Expand Down