diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js index d6a246377a..4575f253fd 100644 --- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js +++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js @@ -988,6 +988,8 @@ class CinnamonSoundApplet extends Applet.TextIconApplet { this.settings.bind("keyOpen", "keyOpen", this._setKeybinding); this.settings.bind("alwaysShowMuteInput", "alwaysShowMuteInput", this.on_settings_changed); + this.settings.bind("alwaysExpandApplications", "alwaysExpandApplications", this.on_settings_changed); + this.settings.bind("alwaysExpandOutputDevice", "alwaysExpandOutputDevice", this.on_settings_changed); this.settings.bind("tooltipShowVolume", "tooltipShowVolume", this.on_settings_changed); this.settings.bind("tooltipShowPlayer", "tooltipShowPlayer", this.on_settings_changed); @@ -1056,6 +1058,14 @@ class CinnamonSoundApplet extends Applet.TextIconApplet { this._applet_context_menu.addMenuItem(this._selectOutputDeviceItem); this._outputApplicationsMenu.actor.hide(); this._selectOutputDeviceItem.actor.hide(); + this._applet_context_menu.connect('open-state-changed', (menu, open) => { + if (open) { + if (this.alwaysExpandApplications && this._outputApplicationsMenu.actor.visible) + this._outputApplicationsMenu.menu.open(); + if (this.alwaysExpandOutputDevice && this._selectOutputDeviceItem.actor.visible) + this._selectOutputDeviceItem.menu.open(); + } + }); this._inputSection = new PopupMenu.PopupMenuSection(); this._inputVolumeSection = new VolumeSlider(this, null, _("Microphone"), null); diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json b/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json index 7dd69c5d56..17721f2a79 100644 --- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json +++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/settings-schema.json @@ -26,6 +26,18 @@ "tooltip": "Always show the 'Mute input' switch in the context menu.", "default": false }, + "alwaysExpandApplications": { + "type": "switch", + "description": "Always expand applications", + "tooltip": "Always expand the 'Applications' list in the context menu.", + "default": false + }, + "alwaysExpandOutputDevice": { + "type": "switch", + "description": "Always expand output devices", + "tooltip": "Always expand the 'Output device' list in the context menu.", + "default": true + }, "_knownPlayers": { "type": "generic", "default": ["banshee", "vlc", "rhythmbox"]