Commit bd468dce authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Wallpaper Configuration] Hide Get New Stuff if disabled by KIOSK

KCMs can be individually disabled by KIOSK if desired but wallpaper configuration cannot (unless you lock down
Plasma completely). Hence, at least honoring the ghns restriction here, until we have a proper solution
(that is a QtQuick equivalent of KNS3::Button).

Also, KNS3::DownloadDialog refuses to open when ghns is restricted *but* this applies only to using open()
or exec() but not a blatant show() we do from QML.

Differential Revision: https://phabricator.kde.org/D7086
parent b2341661
......@@ -26,6 +26,7 @@ import QtQuick.Window 2.0 // for Screen
import org.kde.plasma.core 2.0 as Plasmacore
import org.kde.plasma.wallpapers.image 2.0 as Wallpaper
import org.kde.kquickcontrolsaddons 2.0
import org.kde.kconfig 1.0 // for KAuthorized
ColumnLayout {
id: root
......@@ -351,6 +352,7 @@ ColumnLayout {
QtControls.Button {
iconName: "get-hot-new-stuff"
text: i18nd("plasma_applet_org.kde.image","Get New Wallpapers...")
visible: KAuthorized.authorize("ghns")
onClicked: imageWallpaper.getNewWallpaper();
}
}
......
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