Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Loading