[jhbuild] Correctly call the GetCapabilities() method through an interface



commit 799ef61d3c3eb620d83728216208e19da6d1e487
Author: William Jon McCann <jmccann redhat com>
Date:   Fri Oct 29 19:40:02 2010 -0400

    Correctly call the GetCapabilities() method through an interface

 jhbuild/utils/trayicon.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/utils/trayicon.py b/jhbuild/utils/trayicon.py
index bbca615..7ebad90 100644
--- a/jhbuild/utils/trayicon.py
+++ b/jhbuild/utils/trayicon.py
@@ -31,11 +31,13 @@ class TrayIcon:
             return
         if not os.environ.get('DISPLAY'):
             return
+
         try:
             bus = dbus.SessionBus()
             proxy = bus.get_object('org.freedesktop.Notifications',
                                    '/org/freedesktop/Notifications')
-            caps = proxy.GetCapabilities()
+            notify_iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.Notifications')
+            caps = notify_iface.GetCapabilities()
             for item in caps:
                 if item == "persistence":
                     return



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