aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-03-02 01:46:46 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-03-02 01:46:46 +0000
commit0a3c667bfb6a1552975c1fd2325e7435363c2bc9 (patch)
tree1c0b7523a93c0e91f144a8f5ac9483811ea0f7ae /lib/python
parent41c6536e584c5102d78245e1ffbbe45f19d701fc (diff)
downloadenigma2-0a3c667bfb6a1552975c1fd2325e7435363c2bc9.tar.gz
enigma2-0a3c667bfb6a1552975c1fd2325e7435363c2bc9.zip
instant record now brings up a dialog to chose whether to record indefinitely, the current event or do nothing
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/ChoiceBox.py2
-rw-r--r--lib/python/Screens/InfoBarGenerics.py37
2 files changed, 24 insertions, 15 deletions
diff --git a/lib/python/Screens/ChoiceBox.py b/lib/python/Screens/ChoiceBox.py
index cc6afb1c..7192a229 100644
--- a/lib/python/Screens/ChoiceBox.py
+++ b/lib/python/Screens/ChoiceBox.py
@@ -19,7 +19,7 @@ class ChoiceBox(Screen):
self["actions"] = NumberActionMap(["WizardActions", "InputActions"],
{
"ok": self.go,
- "back": self.close,
+ "back": self.cancel,
"1": self.keyNumberGlobal,
"2": self.keyNumberGlobal,
"3": self.keyNumberGlobal,
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index e37730f3..954e9d1f 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -16,6 +16,7 @@ from ServiceReference import ServiceReference
from EpgSelection import EPGSelection
from Screens.MessageBox import MessageBox
+from Screens.ChoiceBox import ChoiceBox
from Screens.Dish import Dish
from Screens.Standby import Standby
from Screens.EventView import EventViewEPGSelect, EventViewSimple
@@ -999,21 +1000,24 @@ class InfoBarInstantRecord:
self.session.nav.RecordTimer.removeEntry(self.recording)
self.recording = None
- def startInstantRecording(self):
+ def startInstantRecording(self, limitEvent = False):
serviceref = self.session.nav.getCurrentlyPlayingServiceReference()
# try to get event info
event = None
- try:
- service = self.session.nav.getCurrentService()
- epg = eEPGCache.getInstance()
- event = epg.lookupEventTime(serviceref, -1, 0)
+ if limitEvent:
+ try:
+ service = self.session.nav.getCurrentService()
+ epg = eEPGCache.getInstance()
+ event = epg.lookupEventTime(serviceref, -1, 0)
+ if event is None:
+ info = service.info()
+ ev = info.getEvent(0)
+ event = ev
+ except:
+ pass
if event is None:
- info = service.info()
- ev = info.getEvent(0)
- event = ev
- except:
- pass
+ self.session.open(MessageBox, _("No event info found, recording indefinitely."), MessageBox.TYPE_INFO)
if event is not None:
data = parseEvent(event)
@@ -1036,13 +1040,16 @@ class InfoBarInstantRecord:
return False
def recordQuestionCallback(self, answer):
- if answer == False:
+ if answer is None or answer[1] == "no":
return
if self.isInstantRecordRunning():
self.stopCurrentRecording()
else:
- self.startInstantRecording()
+ limitEvent = False
+ if answer[1] == "event":
+ limitEvent = True
+ self.startInstantRecording(limitEvent = limitEvent)
def instantRecord(self):
try:
@@ -1052,9 +1059,11 @@ class InfoBarInstantRecord:
return
if self.isInstantRecordRunning():
- self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Do you want to stop the current\n(instant) recording?"))
+ self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, title=_("Do you want to stop the current\n(instant) recording?"), list=[(_("yes"), "yes"), (_("no"), "no")])
+# self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Do you want to stop the current\n(instant) recording?"))
else:
- self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Start recording?"))
+ self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, title=_("Do you want to stop the current\n(instant) recording?"), list=[(_("record indefinitely"), "indefinitely"), (_("stop after current event"), "event"), (_("don't record"), "no")])
+ #self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Start recording?"))
from Screens.AudioSelection import AudioSelection