[pitivi] render: Allow the render progress dialog to close the desktop notification



commit f0f4f33fdf0c7eabebe2880aad3566a816c8075b
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Jan 31 20:26:25 2014 +0100

    render: Allow the render progress dialog to close the desktop notification
    
    This got broken in 38861f742af4ce115c9265f3e7c85d8ea0f17111

 pitivi/render.py       |    2 +-
 pitivi/utils/system.py |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/render.py b/pitivi/render.py
index 10c1d92..078077f 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -965,7 +965,7 @@ class RenderDialog(Loggable):
             self.progress.setFilesizeEstimate(None)
             if not self.progress.window.is_active():
                 notification = _('"%s" has finished rendering.' % self.fileentry.get_text())
-                self.app.system.desktopMessage(_("Render complete"), notification, "pitivi")
+                self.notification = self.app.system.desktopMessage(_("Render complete"), notification, 
"pitivi")
             if has_canberra:
                 canberra = pycanberra.Canberra()
                 canberra.play(1, pycanberra.CA_PROP_EVENT_ID, "complete-media", None)
diff --git a/pitivi/utils/system.py b/pitivi/utils/system.py
index 01a2204..1ae6c73 100644
--- a/pitivi/utils/system.py
+++ b/pitivi/utils/system.py
@@ -157,6 +157,7 @@ class System(Signallable, Loggable):
         @arg icon: C{str} icon to be shown with the message
         """
         self.debug("desktopMessage(): %s, %s", title, message)
+        return None
 
     def getUniqueFilename(self, string):
         """Get a filename which can only be obtained from the specified string.
@@ -187,6 +188,9 @@ class FreedesktopOrgSystem(System):
                 # This can happen if the system is not properly configured.
                 # See for example https://bugzilla.gnome.org/show_bug.cgi?id=719627.
                 self.error("desktopMessage: Failed displaying notification: %s", e.message)
+                return None
+            return notification
+        return None
 
 
 #org.gnome.SessionManager flags


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