Instant recordings - confirmation for Stop (and delete) for recording
authorims <ims21@users.sourceforge.net>
Thu, 26 Mar 2015 21:01:59 +0000 (22:01 +0100)
committerlittlesat <littlesat99@yahoo.com>
Thu, 26 Mar 2015 22:55:37 +0000 (23:55 +0100)
Signed-off-by: littlesat <littlesat99@yahoo.com>

lib/python/Screens/InfoBarGenerics.py

index a75d556..257e7e6 100644 (file)
@@ -2234,11 +2234,19 @@ class InfoBarInstantRecord:
                moveServiceFiles(entry.Filename, trash, entry.name, allowCopy=False)
 
        def stopCurrentRecording(self, entry = -1):
+               def confirm(answer=False):
+                       if answer:
+                               self.session.nav.RecordTimer.removeEntry(self.recording[entry])
+                               if self.deleteRecording:
+                                       self.moveToTrash(self.recording[entry])
+                               self.recording.remove(self.recording[entry])
                if entry is not None and entry != -1:
-                       self.session.nav.RecordTimer.removeEntry(self.recording[entry])
+                       msg =  _("Stop recording:")
                        if self.deleteRecording:
-                               self.moveToTrash(self.recording[entry])
-                       self.recording.remove(self.recording[entry])
+                               msg = _("Stop and delete recording:")
+                       msg += "\n"
+                       msg += " - " + self.recording[entry].name + "\n"
+                       self.session.openWithCallback(confirm, MessageBox, msg, MessageBox.TYPE_YESNO)
 
        def stopAllCurrentRecordings(self, list):
                def confirm(answer=False):