aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-11-05 10:30:49 -0600
committerTed Gould <ted@gould.cx>2014-11-05 10:30:49 -0600
commit409dc37e0cf9bc5229d134f145315fb19c916769 (patch)
tree41b578e58abc5c861434ad11d7da369760b84eda /src/volume-control.vala
parentdec2d5350f47e52539941b45d394516066a19678 (diff)
parent9ab88593b90ee51361c4b4789daf11a2f1d08429 (diff)
downloadayatana-indicator-sound-409dc37e0cf9bc5229d134f145315fb19c916769.tar.gz
ayatana-indicator-sound-409dc37e0cf9bc5229d134f145315fb19c916769.tar.bz2
ayatana-indicator-sound-409dc37e0cf9bc5229d134f145315fb19c916769.zip
Remove various Vala warnings
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index ad186a7..5061ae8 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -689,7 +689,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) {
@@ -747,10 +747,14 @@ public class VolumeControl : Object
// 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);
+ try {
+ 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);
+ } catch (GLib.Error e) {
+ debug("Unable to get properties for user %s at first try: %s", username, e.message);
+ }
}
private void greeter_user_changed (string username)