diff options
-rw-r--r-- | src/volume-control.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala index 899cc35..97d980c 100644 --- a/src/volume-control.vala +++ b/src/volume-control.vala @@ -408,8 +408,12 @@ public class VolumeControl : Object return; } - // Listen for property changes, this will get current volume (since getting proxy loads properties) + // Get current values and listen for changes _user_proxy.g_properties_changed.connect (accountsservice_props_changed_cb); + var props_variant = yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "GetAll", new Variant ("(s)", _user_proxy.get_interface_name ()), null, DBusCallFlags.NONE, -1); + Variant props; + props_variant.get ("(@a{sv})", out props); + accountsservice_props_changed_cb(_user_proxy, props, null); } private void greeter_user_changed (string username) |