diff options
author | Ted Gould <ted@gould.cx> | 2014-10-02 16:18:12 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-10-02 16:18:12 -0500 |
commit | 095353472e881855bff8f5d16ea9c13fe978a623 (patch) | |
tree | 8e710b12b1eb14c1bc0a9414acb95a74bad42039 /src | |
parent | 4b6d204d6cc5d193d6400b14acb520296dfb7d96 (diff) | |
download | ayatana-indicator-sound-095353472e881855bff8f5d16ea9c13fe978a623.tar.gz ayatana-indicator-sound-095353472e881855bff8f5d16ea9c13fe978a623.tar.bz2 ayatana-indicator-sound-095353472e881855bff8f5d16ea9c13fe978a623.zip |
Make it a switch
Diffstat (limited to 'src')
-rw-r--r-- | src/sound-menu.vala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala index 1247e0a..6cbbf67 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -38,8 +38,11 @@ public class SoundMenu: Object 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"); + if ((flags & DisplayFlags.SHOW_SILENT_MODE) != 0) { + var item = new MenuItem(_("Silent Mode"), "indicator.silent-mode"); + item.set_attribute("x-canonical-type", "s", "com.canonical.indicator.switch"); + volume_section.append_item(item); + } volume_section.append_item (this.create_slider_menu_item ("indicator.volume(0)", 0.0, 1.0, 0.01, "audio-volume-low-zero-panel", |