diff options
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/service.vala b/src/service.vala index c6f318b..da3bf09 100644 --- a/src/service.vala +++ b/src/service.vala @@ -101,6 +101,11 @@ public class IndicatorSound.Service: Object { GLib.Bus.unwatch_name(this.notification_server_watch); this.notification_server_watch = 0; } + + if (this.export_actions != 0) { + bus.unexport_action_group(this.export_actions); + this.export_actions = 0; + } } bool greeter_show_track () { @@ -480,9 +485,14 @@ public class IndicatorSound.Service: Object { return high_volume_action; } + DBusConnection? bus = null; + uint export_actions = 0; + void bus_acquired (DBusConnection connection, string name) { + bus = connection; + try { - connection.export_action_group ("/com/canonical/indicator/sound", this.actions); + export_actions = connection.export_action_group ("/com/canonical/indicator/sound", this.actions); } catch (Error e) { critical ("%s", e.message); } |