aboutsummaryrefslogtreecommitdiff
path: root/src/sound-menu.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-02 11:24:54 -0500
committerTed Gould <ted@gould.cx>2014-10-02 11:24:54 -0500
commit4b6d204d6cc5d193d6400b14acb520296dfb7d96 (patch)
treed5a2cc54b4374bb3ab0db719972ee64c9c989aab /src/sound-menu.vala
parent4f500f48301cbc7140b87034d3e1326a0a3b917a (diff)
downloadayatana-indicator-sound-4b6d204d6cc5d193d6400b14acb520296dfb7d96.tar.gz
ayatana-indicator-sound-4b6d204d6cc5d193d6400b14acb520296dfb7d96.tar.bz2
ayatana-indicator-sound-4b6d204d6cc5d193d6400b14acb520296dfb7d96.zip
Add a silent mode menu item
Diffstat (limited to 'src/sound-menu.vala')
-rw-r--r--src/sound-menu.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index f5e2627..1247e0a 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -24,7 +24,8 @@ public class SoundMenu: Object
SHOW_MUTE = 1,
HIDE_INACTIVE_PLAYERS = 2,
HIDE_PLAYERS = 4,
- GREETER_PLAYERS = 8
+ GREETER_PLAYERS = 8,
+ SHOW_SILENT_MODE = 16
}
public SoundMenu (string? settings_action, DisplayFlags flags) {
@@ -34,8 +35,12 @@ public class SoundMenu: Object
*/
this.volume_section = new Menu ();
+
if ((flags & DisplayFlags.SHOW_MUTE) != 0)
volume_section.append (_("Mute"), "indicator.mute");
+ if ((flags & DisplayFlags.SHOW_SILENT_MODE) != 0)
+ volume_section.append (_("Silent Mode"), "indicator.silent-mode");
+
volume_section.append_item (this.create_slider_menu_item ("indicator.volume(0)", 0.0, 1.0, 0.01,
"audio-volume-low-zero-panel",
"audio-volume-high-panel"));