Commit 839223aa authored by Nicolas Fella's avatar Nicolas Fella

Temporarily move KCM out of applet config

The applet config window cannot handle multi-page KCMs so it's
impossible to open the Advanced page when opening the KCM from the
applet config.

The notifications applet has this problem too. Apply the same workaround
here.

This is of course not a good solution, but adding proper support into
the applet config is not going to happen before Plasma 5.21. This is
better than having a broken KCM.

BUG: 429337
parent 314d4604
......@@ -26,6 +26,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents // PC3 TabBar/TabButton
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.plasmoid 2.0
import org.kde.kquickcontrolsaddons 2.0 as KQCAddons
import org.kde.plasma.private.volume 0.1
......@@ -674,11 +675,19 @@ Item {
}
}
function action_openKcm() {
KQCAddons.KCMShell.openSystemSettings("kcm_pulseaudio");
}
Component.onCompleted: {
MicrophoneIndicator.init();
plasmoid.setAction("forceMute", i18n("Force mute all playback devices"), "audio-volume-muted");
plasmoid.action("forceMute").checkable = true;
plasmoid.action("forceMute").checked = Qt.binding(() => {return globalMute;});
// FIXME only while Multi-page KCMs are broken when embedded in plasmoid config
plasmoid.setAction("openKcm", i18n("&Configure Audio Devices..."), "audio-volume-high");
plasmoid.action("openKcm").visible = (KQCAddons.KCMShell.authorize("kcm_pulseaudio.desktop").length > 0);
}
}
......@@ -100,7 +100,7 @@ X-Plasma-MainScript=ui/main.qml
X-Plasma-NotificationArea=true
X-Plasma-NotificationAreaCategory=Hardware
X-Plasma-ConfigPlugins=kcm_pulseaudio
#X-Plasma-ConfigPlugins=kcm_pulseaudio FIXME reenable when the applet config dialog properly handles multipage KCMs
X-KDE-PluginInfo-Name=org.kde.plasma.volume
X-KDE-PluginInfo-Category=Multimedia
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment