aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/InfoBarGenerics.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-04-19 20:34:38 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-04-19 20:34:38 +0000
commit0f1d2fd66b8a00440370f2c55aecb7819a4fa35a (patch)
tree4fffc567d493c159a89450a5962617cef83a5c47 /lib/python/Screens/InfoBarGenerics.py
parent2b76c5fd83d27c2485609413f4392eb35af10912 (diff)
downloadenigma2-0f1d2fd66b8a00440370f2c55aecb7819a4fa35a.tar.gz
enigma2-0f1d2fd66b8a00440370f2c55aecb7819a4fa35a.zip
fix recursive close crashes
Diffstat (limited to 'lib/python/Screens/InfoBarGenerics.py')
-rw-r--r--lib/python/Screens/InfoBarGenerics.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index 77fca559..79b3e145 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -342,6 +342,7 @@ class InfoBarSimpleEventView:
class InfoBarEPG:
""" EPG - Opens an EPG list when the showEPGList action fires """
def __init__(self):
+ self.dlg_stack = [ ]
self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",
{
"showEventInfo": (self.openEventView, _("show EPG...")),
@@ -372,13 +373,16 @@ class InfoBarEPG:
if len(services):
self.epg_bouquet = bouquet
if withCallback:
- self.session.openWithCallback(self.closed, EPGSelection, services, self.zapToService)
+ self.dlg_stack.append(self.session.openWithCallback(self.closed, EPGSelection, services, self.zapToService))
else:
self.session.open(EPGSelection, services, self.zapToService)
def closed(self, ret):
+ self.dlg_stack.pop()
if ret:
- self.close(ret)
+ dlgs=len(self.dlg_stack)
+ assert dlgs>0
+ self.dlg_stack[dlgs-1].close(dlgs > 1)
def openMultiServiceEPG(self, withCallback=True):
bouquets = self.servicelist.getBouquetList()
@@ -388,7 +392,7 @@ class InfoBarEPG:
cnt = len(bouquets)
if cnt > 1: # show bouquet list
if withCallback:
- self.session.openWithCallback(self.closed, BouquetSelector, bouquets, self.openBouquetEPG)
+ self.dlg_stack.append(self.session.openWithCallback(self.closed, BouquetSelector, bouquets, self.openBouquetEPG))
else:
self.session.open(BouquetSelector, bouquets, self.openBouquetEPG)
elif cnt == 1:
@@ -421,7 +425,7 @@ class InfoBarEPG:
if ptr:
self.epglist.append(ptr)
if len(self.epglist) > 0:
- self.session.open(EventViewEPGSelect, self.epglist[0], ServiceReference(ref), self.eventViewCallback, self.openSingleServiceEPG, self.openMultiServiceEPG, self.openSimilarList)
+ self.dlg_stack.append(self.session.openWithCallback(self.closed, EventViewEPGSelect, self.epglist[0], ServiceReference(ref), self.eventViewCallback, self.openSingleServiceEPG, self.openMultiServiceEPG, self.openSimilarList))
else:
print "no epg for the service avail.. so we show multiepg instead of eventinfo"
self.openMultiServiceEPG(False)