diff options
Diffstat (limited to 'src/sound-menu.vala')
-rw-r--r-- | src/sound-menu.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala index 8718162..8f63d69 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -71,6 +71,7 @@ public class SoundMenu: Object this.notify_handlers = new HashTable<MediaPlayer, ulong> (direct_hash, direct_equal); this.greeter_players = (flags & DisplayFlags.GREETER_PLAYERS) != 0; + } ~SoundMenu () { @@ -185,6 +186,17 @@ public class SoundMenu: Object this.notify_handlers.remove (player); } + public void update_volume_slider (bool bluetooth_headset_active) { + int index = find_action (this.volume_section, "indicator.volume"); + if (index != -1) { + string label = bluetooth_headset_active ? "Volume (Bluetooth)" : "Volume"; + this.volume_section.remove (index); + this.volume_section.insert_item (index, this.create_slider_menu_item (_(label), "indicator.volume(0)", 0.0, 1.0, 0.01, + "audio-volume-low-zero-panel", + "audio-volume-high-panel")); + } + } + public Menu root; public Menu menu; Menu volume_section; |