From bd468dced14e2aa32889fdbf9b3b87b736a5e681 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 7 Aug 2017 10:51:19 +0200 Subject: [PATCH] [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 --- wallpapers/image/imagepackage/contents/ui/config.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wallpapers/image/imagepackage/contents/ui/config.qml b/wallpapers/image/imagepackage/contents/ui/config.qml index c851f3a58..ad243e083 100644 --- a/wallpapers/image/imagepackage/contents/ui/config.qml +++ b/wallpapers/image/imagepackage/contents/ui/config.qml @@ -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(); } }