[pitivi: 3/9] Handle delete-event in EncodingDialog. Fixes #5738



commit c3dc6b53955ba0f4a09f607c94231e39d7a22443
Author: Alessandro Decina <alessandro decina collabora co uk>
Date:   Tue Mar 3 16:56:35 2009 +0100

    Handle delete-event in EncodingDialog. Fixes #573898.
---
 pitivi/ui/encodingdialog.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index 7238f1c..0fa4df6 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -70,6 +70,8 @@ class EncodingDialog(GladeWindow, Loggable):
         self.timestarted = 0
         self._displaySettings()
 
+        self.window.connect("delete-event", self._deleteEventCb)
+
     def _shutDown(self):
         self.debug("shutting down")
         # Abort recording
@@ -91,6 +93,7 @@ class EncodingDialog(GladeWindow, Loggable):
                                        action=gtk.FILE_CHOOSER_ACTION_SAVE)
         if self.outfile:
             dialog.set_current_name(self.outfile)
+
         res = dialog.run()
         dialog.hide()
         if res == gtk.RESPONSE_ACCEPT:
@@ -149,6 +152,10 @@ class EncodingDialog(GladeWindow, Loggable):
         self.debug("Cancelling !")
         self._shutDown()
 
+    def _deleteEventCb(self, *args):
+        self.debug("delete event")
+        self._shutDown()
+
     def addRecordAction(self):
         self.debug("renderaction %r", self.renderaction)
         if self.renderaction == None:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]