Skip to content
Open
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
18 changes: 16 additions & 2 deletions files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1656,8 +1656,15 @@ class CinnamonSoundApplet extends Applet.TextIconApplet {
let selectItem = this["_select" + type[0].toUpperCase() + type.slice(1) + "DeviceItem"];
selectItem.menu.addMenuItem(item);
//show the menu if we have more than two devices
if(selectItem.menu.numMenuItems > 1)
if(selectItem.menu.numMenuItems > 1) {
selectItem.actor.show();
// show input section so user can switch devices even without an active recording app
if (type === "input") {
this._inputSection.actor.show();
if (this.alwaysShowMuteInput)
this.mute_in_switch.actor.show();
}
}

this._devices.push({id: id, type: type, item: item});
}
Expand All @@ -1671,8 +1678,15 @@ class CinnamonSoundApplet extends Applet.TextIconApplet {

//hide submenu if showing them is unnecessary
let selectItem = this["_select" + type[0].toUpperCase() + type.slice(1) + "DeviceItem"];
if (selectItem.menu.numMenuItems <= 1)
if (selectItem.menu.numMenuItems <= 1) {
selectItem.actor.hide();
// hide input section when back to one device and nothing is recording
if (type === "input" && this._recordingAppsNum === 0) {
this._inputSection.actor.hide();
if (!this.alwaysShowMuteInput)
this.mute_in_switch.actor.hide();
}
}

this._devices.splice(i, 1);
break;
Expand Down
Loading