diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-19 21:15:37 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-19 21:15:37 -0600 |
commit | c6e14ab043d6fd5ba774698cf58a17692478f586 (patch) | |
tree | 35c03be739c18dbdcb5553ff26d22a34a1f4d0de | |
parent | 937b0acb33b3494d1ee6d34943a3d7ded0b3445b (diff) | |
download | ayatana-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
-rw-r--r-- | src/service.vala | 10 |
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; |