aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-09 21:54:40 -0500
committerTed Gould <ted@gould.cx>2014-10-09 21:54:40 -0500
commit365f0a5af2b6327531f49a0fa3754359063dfea1 (patch)
tree32ff5f4076f1f8375bb60697f1b1ac5cf25a8e66
parent228153f72649485111052f5f13a84fd73f290b94 (diff)
downloadayatana-indicator-sound-365f0a5af2b6327531f49a0fa3754359063dfea1.tar.gz
ayatana-indicator-sound-365f0a5af2b6327531f49a0fa3754359063dfea1.tar.bz2
ayatana-indicator-sound-365f0a5af2b6327531f49a0fa3754359063dfea1.zip
Catch the error that show can throw and present a warning
-rw-r--r--src/volume-control.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 86b976e..dbc1797 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -594,7 +594,12 @@ public class VolumeControl : Object
} else {
_notification.set_hint ("sound-file", null);
}
- _notification.show ();
+
+ try {
+ _notification.show ();
+ } catch (GLib.Error e) {
+ warning("Unable to send volume change notification: %s", e.message);
+ }
}
if (set_volume_internal (volume)) {