add config option to disable the zap warning message when trying to record
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 23 Dec 2005 02:51:36 +0000 (02:51 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 23 Dec 2005 02:51:36 +0000 (02:51 +0000)
RecordTimer.py
data/menu.xml
data/setup.xml
lib/python/Components/Makefile.am
mytest.py
po/Makefile.am

index f1f4e14..7088bb4 100644 (file)
@@ -3,6 +3,7 @@ import codecs
 #from time import datetime
 from Tools import Directories, Notifications
 
+from Components.config import config
 import timer
 import xml.dom.minidom
 
@@ -85,7 +86,10 @@ class RecordTimerEntry(timer.TimerEntry):
                                self.prepareOK = True
                        else:
                                # error.
-                               Notifications.AddNotificationWithCallback(self.failureCB, MessageBox, _("A timer failed to record!\nDisable TV and try again?\n"))
+                               if config.recording.asktozap.value == 0:
+                                       Notifications.AddNotificationWithCallback(self.failureCB, MessageBox, _("A timer failed to record!\nDisable TV and try again?\n"))
+                               else: # zap without asking
+                                       self.failureCB(True)
                elif event == self.EventStart:
                        if self.prepareOK:
                                self.record_service.start()
@@ -112,6 +116,7 @@ class RecordTimerEntry(timer.TimerEntry):
                        self.activate(self.EventPrepare)
                        if self.wantStart:
                                print "post-activating record"
+                               NavigationInstance.instance.playService(self.serviceref)
                                self.activate(self.EventStart)
                else:
                        print "user killed record"
index be0119f..9aacc98 100644 (file)
@@ -42,6 +42,7 @@
                        </menu>
                        <menu text="System">
                                <item text="Language"><screen module="LanguageSelection" /></item>
+                               <item text="Recording"><setup id="recording" /></item>
                                <item text="Timezone"><setup id="timezone" /></item>
                                <item text="Video Audio"><setup id="avsetup" /></item>
                                <item text="UHF Modulator"><setup id="RFmod" /></item>
index 3719556..51945cf 100644 (file)
@@ -15,6 +15,9 @@
                        <item text="AC3 default">config.av.defaultac3</item>
                        <item text="VCR Switch">config.av.vcrswitch</item>
                </setup>
+               <setup key="recording" title="Recording">
+                       <item text="Ask before zapping">config.recording.asktozap</item>
+               </setup>
                <setup key="network" title="Network setup">
                        <item text="Use DHCP">config.network.dhcp</item>
                        <item text="IP Address">config.network.ip</item>
index 340730a..656527b 100644 (file)
@@ -11,4 +11,4 @@ install_PYTHON = \
        AVSwitch.py Network.py RFmod.py DiskInfo.py NimManager.py Lcd.py                                \
        EpgList.py ScrollLabel.py Timezones.py Language.py HelpMenuList.py \
        BlinkingPixmap.py Pixmap.py ConditionalWidget.py Slider.py LanguageList.py \
-       PluginList.py PluginComponent.py
+       PluginList.py PluginComponent.py RecordingConfig.py
index 571747c..c94993b 100644 (file)
--- a/mytest.py
+++ b/mytest.py
@@ -217,6 +217,9 @@ Components.InputDevice.InitInputDevices()
 import Components.AVSwitch
 Components.AVSwitch.InitAVSwitch()
 
+import Components.RecordingConfig
+Components.RecordingConfig.InitRecordingConfig()
+
 import Components.Network
 Components.Network.InitNetwork()
 
index b444efc..1a29b70 100644 (file)
@@ -50,6 +50,7 @@ enigma2.pot:
                        ../lib/python/Components/NimManager.py \
                        ../lib/python/Components/EventInfo.py \
                        ../lib/python/Components/Network.py \
+                       ../lib/python/Components/RecordingConfig.py \
                        ../RecordTimer.py
        ./xml2po.py     ../data/ >> enigma2.pot