aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2014-04-01 16:12:58 -0400
committerMichael Terry <michael.terry@canonical.com>2014-04-01 16:12:58 -0400
commit5a20cd1f342ab4ae4dd7caacf2cec8d61bfe54be (patch)
treea7829ed685c98935fe7e1c32c6fc905874607e9e
parent2dc2db93122060318cbba27fb706226aed1cf17e (diff)
downloadayatana-indicator-sound-5a20cd1f342ab4ae4dd7caacf2cec8d61bfe54be.tar.gz
ayatana-indicator-sound-5a20cd1f342ab4ae4dd7caacf2cec8d61bfe54be.tar.bz2
ayatana-indicator-sound-5a20cd1f342ab4ae4dd7caacf2cec8d61bfe54be.zip
Use specified greeter bus name if available
-rw-r--r--src/volume-control.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 889c2d6..4c543f6 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -372,7 +372,7 @@ public class VolumeControl : Object
}
/* AccountsService operations */
- private void accountsservice_props_changed_cb (DBusProxy proxy, Variant changed_properties, string[] invalidated_properties)
+ private void accountsservice_props_changed_cb (DBusProxy proxy, Variant changed_properties, string[]? invalidated_properties)
{
Variant volume_variant = changed_properties.lookup_value ("Volume", new VariantType ("d"));
if (volume_variant != null) {
@@ -441,8 +441,11 @@ public class VolumeControl : Object
private async void setup_accountsservice ()
{
if (Environment.get_variable ("XDG_SESSION_CLASS") == "greeter") {
+ var bus_name = Environment.get_variable ("UNITY_GREETER_DBUS_NAME");
+ if (bus_name == null)
+ bus_name = "com.canonical.UnityGreeter";
try {
- _greeter_proxy = yield Bus.get_proxy (BusType.SESSION, "com.canonical.UnityGreeter", "/list");
+ _greeter_proxy = yield Bus.get_proxy (BusType.SESSION, bus_name, "/list");
} catch (GLib.Error e) {
warning ("unable to get greeter proxy: %s", e.message);
return;