aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-13 12:47:47 -0600
committerTed Gould <ted@gould.cx>2015-02-13 12:47:47 -0600
commitd1000c6d613b4cd26bd9ab3d890c3dee295f86a8 (patch)
tree0b5c4e53abb0dcdd0c7f7525e89a7af78bf9c378 /src
parentd97e4bc15eb9edd7a25d4cf9e7ce773fcce94f73 (diff)
downloadayatana-indicator-sound-d1000c6d613b4cd26bd9ab3d890c3dee295f86a8.tar.gz
ayatana-indicator-sound-d1000c6d613b4cd26bd9ab3d890c3dee295f86a8.tar.bz2
ayatana-indicator-sound-d1000c6d613b4cd26bd9ab3d890c3dee295f86a8.zip
Adding a test for notification servers coming on and off the bus, and fixing the code for it
Diffstat (limited to 'src')
-rw-r--r--src/service.vala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/service.vala b/src/service.vala
index 7ab0c9c..0b03b6e 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -33,11 +33,11 @@ public class IndicatorSound.Service: Object {
this.notification_proxy = new DBusProxy.for_bus_sync(GLib.BusType.SESSION,
DBusProxyFlags.DO_NOT_LOAD_PROPERTIES | DBusProxyFlags.DO_NOT_CONNECT_SIGNALS | DBusProxyFlags.DO_NOT_AUTO_START,
null, /* interface info */
- "org.freedesktop.DBus",
- "/org/freedesktop/DBus",
- "org.freedesktop.DBus",
+ "org.freedesktop.Notifications",
+ "/org/freedesktop/Notifications",
+ "org.freedesktop.Notifications",
null);
- this.notification_proxy.notify["g-name-owner"].connect ( () => { check_sync_notification = false; } );
+ this.notification_proxy.notify["g-name-owner"].connect ( () => { debug("Notifications name owner changed"); check_sync_notification = false; } );
} catch (GLib.Error e) {
error("Unable to build notification proxy: %s", e.message);
}
@@ -288,6 +288,7 @@ public class IndicatorSound.Service: Object {
void update_sync_notification () {
if (!check_sync_notification) {
+ support_sync_notification = false;
List<string> caps = Notify.get_server_caps ();
if (caps.find_custom ("x-canonical-private-synchronous", strcmp) != null) {
support_sync_notification = true;