aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/service.vala5
-rw-r--r--src/sound-menu.vala1
2 files changed, 6 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)
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index 3881faf..96dd143 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -60,6 +60,7 @@ public class SoundMenu: Object
root_item.set_attribute ("x-canonical-type", "s", "com.canonical.indicator.root");
root_item.set_attribute ("x-canonical-scroll-action", "s", "indicator.scroll");
root_item.set_attribute ("x-canonical-secondary-action", "s", "indicator.mute");
+ root_item.set_attribute ("submenu-action", "s", "indicator.indicator-shown");
root_item.set_submenu (this.menu);
this.root = new Menu ();