git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix movielist selection when there is no (selected) item
[enigma2.git]
/
lib
/
python
/
Screens
/
HelpMenu.py
diff --git
a/lib/python/Screens/HelpMenu.py
b/lib/python/Screens/HelpMenu.py
index cae0a5db1b0210235fb5813ee1fc8612a5ac77b2..06f0cfaba3249b732a3ac1e133fe4f386f8485a5 100644
(file)
--- a/
lib/python/Screens/HelpMenu.py
+++ b/
lib/python/Screens/HelpMenu.py
@@
-18,6
+18,7
@@
class HelpMenu(Screen):
self.onSelChanged = [ ]
self["list"] = HelpMenuList(list, self.close)
self.onSelChanged = [ ]
self["list"] = HelpMenuList(list, self.close)
+ self["list"].onSelChanged.append(self.SelectionChanged)
self["rc"] = Pixmap()
self["arrowup"] = MovingPixmap()
self["rc"] = Pixmap()
self["arrowup"] = MovingPixmap()
@@
-26,26
+27,18
@@
class HelpMenu(Screen):
{
"ok": self["list"].ok,
"back": self.close,
{
"ok": self["list"].ok,
"back": self.close,
- "up": self.up,
- "down": self.down
}, -1)
}, -1)
-
- def up(self):
- self["list"].instance.moveSelection(self["list"].instance.moveUp)
- self.SelectionChanged()
-
- def down(self):
- self["list"].instance.moveSelection(self["list"].instance.moveDown)
- self.SelectionChanged()
def SelectionChanged(self):
selection = self["list"].getCurrent()[3]
def SelectionChanged(self):
selection = self["list"].getCurrent()[3]
+ arrow = self["arrowup"]
+
if selection is None:
if selection is None:
-
self["arrowup"].instance
.hide()
+
arrow
.hide()
else:
else:
-
self["arrowup"]
.moveTo(selection[1], selection[2], 1)
-
self["arrowup"]
.startMoving()
-
self["arrowup"].instance
.show()
+
arrow
.moveTo(selection[1], selection[2], 1)
+
arrow
.startMoving()
+
arrow
.show()
class HelpableScreen:
def __init__(self):
class HelpableScreen:
def __init__(self):
@@
-53,8
+46,10
@@
class HelpableScreen:
{
"displayHelp": self.showHelp,
})
{
"displayHelp": self.showHelp,
})
+
def showHelp(self):
self.session.openWithCallback(self.callHelpAction, HelpMenu, self.helpList)
def showHelp(self):
self.session.openWithCallback(self.callHelpAction, HelpMenu, self.helpList)
+
def callHelpAction(self, *args):
if len(args):
(actionmap, context, action) = args
def callHelpAction(self, *args):
if len(args):
(actionmap, context, action) = args