Verified Commit d87b9268 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/activitybar: add "Configure Activities" menu item

This menu item will open Activities KCM, which makes the configuration
easier to be found.
parent 8625eee7
Pipeline #208724 passed with stage
in 8 minutes and 33 seconds
......@@ -12,6 +12,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents // PC3 Tabbar only has top and bottom tab positions, not left and right
import org.kde.activities 0.1 as Activities
import org.kde.kquickcontrolsaddons 2.1 // For KCMShell
Item {
Layout.minimumWidth: tabBar.implicitWidth
......@@ -19,6 +20,10 @@ Item {
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
function action_activitieskcm() {
KCMShell.openSystemSettings("kcm_activities");
}
PlasmaComponents.TabBar {
id: tabBar
......@@ -85,5 +90,9 @@ Item {
Component.onCompleted: {
Plasmoid.removeAction("configure");
if (KCMShell.authorize("kcm_activities.desktop").length > 0) {
Plasmoid.setAction("activitieskcm", i18nc("@action:inmenu", "&Configure Activities…"), "configure");
}
}
}
Supports Markdown
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