aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-14 08:06:55 -0500
committerTed Gould <ted@gould.cx>2014-10-14 08:06:55 -0500
commit29576aceb257c868e5871972a1440b8602f2880b (patch)
tree96f46ce97bf2ea9aa41d1dfd17ad9497b93ffe57
parent973b4eb057f466ad88e62d25f733ed1700e1ac38 (diff)
downloadayatana-indicator-sound-29576aceb257c868e5871972a1440b8602f2880b.tar.gz
ayatana-indicator-sound-29576aceb257c868e5871972a1440b8602f2880b.tar.bz2
ayatana-indicator-sound-29576aceb257c868e5871972a1440b8602f2880b.zip
Adding a high volume warning menu item
-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 f245a1f..0094c22 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -25,7 +25,9 @@ public class SoundMenu: Object
HIDE_INACTIVE_PLAYERS = 2,
HIDE_PLAYERS = 4,
GREETER_PLAYERS = 8,
- SHOW_SILENT_MODE = 16
+ SHOW_SILENT_MODE = 16,
+ HIGH_VOLUME_WARNING = 32 /* Everyone should get this eventually, but we don't
+ want it in the desktop initially because of freezes */
}
public SoundMenu (string? settings_action, DisplayFlags flags) {
@@ -48,6 +50,9 @@ public class SoundMenu: Object
"audio-volume-low-zero-panel",
"audio-volume-high-panel"));
+ if ((flags & DisplayFlags.HIGH_VOLUME_WARNING) != 0)
+ volume_section.append (_("High volume can damage your hearing."), "indicator.high-volume-menu");
+
this.menu = new Menu ();
this.menu.append_section (null, volume_section);