[pitivi] render: Stop rendering when the user presses Escape
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] render: Stop rendering when the user presses Escape
- Date: Fri, 25 Jan 2013 20:38:39 +0000 (UTC)
commit 1a51f043ccd0612d1aac0785a62a7781e2218aa0
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Fri Jan 25 15:32:58 2013 -0500
render: Stop rendering when the user presses Escape
data/ui/renderingprogress.ui | 1 +
pitivi/render.py | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/data/ui/renderingprogress.ui b/data/ui/renderingprogress.ui
index f525a8e..e79f101 100644
--- a/data/ui/renderingprogress.ui
+++ b/data/ui/renderingprogress.ui
@@ -9,6 +9,7 @@
<property name="window_position">center-on-parent</property>
<property name="default_width">400</property>
<property name="type_hint">dialog</property>
+ <signal name="delete-event" handler="_deleteEventCb" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property>
diff --git a/pitivi/render.py b/pitivi/render.py
index 8c681d9..6a5d9ae 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -275,6 +275,10 @@ class RenderingProgressDialog(Signallable):
else:
self.progressbar.set_text(_("Estimating..."))
+ def _deleteEventCb(self, unused_dialog_widget, unused_event):
+ """If the user closes the window by pressing Escape, stop rendering"""
+ self.emit("cancel")
+
def _cancelButtonClickedCb(self, unused_button):
self.emit("cancel")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]