aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--src/service.vala4
-rw-r--r--src/volume-control.vala14
3 files changed, 17 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 483c78b..63b2e5f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+indicator-sound (12.10.2+14.10.20141010-0ubuntu2) UNRELEASED; urgency=medium
+
+ * Remove various Vala warnings
+
+ -- Ted Gould <ted@ubuntu.com> Wed, 05 Nov 2014 10:30:30 -0600
+
indicator-sound (12.10.2+14.10.20141010-0ubuntu1) utopic; urgency=low
[ Ricardo Salveti de Araujo ]
diff --git a/src/service.vala b/src/service.vala
index 2a65492..4298ad7 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -69,7 +69,7 @@ public class IndicatorSound.Service: Object {
List<string> caps = Notify.get_server_caps ();
if (caps.find_custom ("x-canonical-private-synchronous", strcmp) != null) {
this.notification = new Notify.Notification ("indicator-sound", "", "");
- this.notification.set_hint_string ("x-canonical-private-synchronous", "indicator-sound");
+ this.notification.set_hint ("x-canonical-private-synchronous", "indicator-sound");
}
}
@@ -186,7 +186,7 @@ public class IndicatorSound.Service: Object {
icon = "notification-audio-volume-high";
this.notification.update ("indicator-sound", "", icon);
- this.notification.set_hint_int32 ("value", ((int32) (100 * v / this.max_volume)).clamp (-1, 101));
+ this.notification.set_hint ("value", ((int32) (100 * v / this.max_volume)).clamp (-1, 101));
try {
this.notification.show ();
}
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)