aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-19 21:15:37 -0600
committercharles kerr <charlesk@canonical.com>2015-12-19 21:15:37 -0600
commitc6e14ab043d6fd5ba774698cf58a17692478f586 (patch)
tree35c03be739c18dbdcb5553ff26d22a34a1f4d0de /src
parent937b0acb33b3494d1ee6d34943a3d7ded0b3445b (diff)
downloadayatana-indicator-sound-c6e14ab043d6fd5ba774698cf58a17692478f586.tar.gz
ayatana-indicator-sound-c6e14ab043d6fd5ba774698cf58a17692478f586.tar.bz2
ayatana-indicator-sound-c6e14ab043d6fd5ba774698cf58a17692478f586.zip
bugfix: don't requery notificaton server capabilities each time volume changes
Diffstat (limited to 'src')
-rw-r--r--src/service.vala10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/service.vala b/src/service.vala
index ed0fc74..85e03fa 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -611,10 +611,12 @@ public class IndicatorSound.Service: Object {
private void update_notification () {
- List<string> caps = Notify.get_server_caps ();
- notify_server_supports_actions = caps.find_custom ("actions", strcmp) != null;
- notify_server_supports_sync = caps.find_custom ("x-canonical-private-synchronous", strcmp) != null;
- notify_server_caps_checked = true;
+ if (!notify_server_caps_checked) {
+ List<string> caps = Notify.get_server_caps ();
+ notify_server_supports_actions = caps.find_custom ("actions", strcmp) != null;
+ notify_server_supports_sync = caps.find_custom ("x-canonical-private-synchronous", strcmp) != null;
+ notify_server_caps_checked = true;
+ }
var loud = volume_control.high_volume;
bool ignore_warning_this_time = this.volume_control.ignore_high_volume;