aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-12-03 09:52:32 -0600
committerTed Gould <ted@gould.cx>2014-12-03 09:52:32 -0600
commit57982f343b03175c20a4b51ccb5c853588613935 (patch)
tree9180d1df5c69b847cfbf827c834214115efaa2d4 /src/service.vala
parentf6505dfead05c0e341d7ece63510e621a45e0325 (diff)
downloadayatana-indicator-sound-57982f343b03175c20a4b51ccb5c853588613935.tar.gz
ayatana-indicator-sound-57982f343b03175c20a4b51ccb5c853588613935.tar.bz2
ayatana-indicator-sound-57982f343b03175c20a4b51ccb5c853588613935.zip
Add an action to track whether the indicator is shown so that we can not show notifications if it is open
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/service.vala b/src/service.vala
index c74b2eb..48b0cbe 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -146,6 +146,7 @@ public class IndicatorSound.Service: Object {
{ "scroll", activate_scroll_action, "i", null, null },
{ "desktop-settings", activate_desktop_settings, null, null, null },
{ "phone-settings", activate_phone_settings, null, null, null },
+ { "indicator-shown", null, null, "@b false", null },
};
MainLoop loop;
@@ -255,6 +256,10 @@ public class IndicatorSound.Service: Object {
if (!support_sync_notification)
return;
+ var shown_action = actions.lookup_action ("indicator-shown") as SimpleAction;
+ if (shown_action != null && shown_action.get_state().get_boolean())
+ return;
+
/* Determine Label */
string volume_label = "";
if (volume_control.high_volume)