Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8e6f9a49 authored by Laurent Montel's avatar Laurent Montel 😁

Hide action if GHNS is disabled by KIOSK restriction

parent c8a41a17
......@@ -41,6 +41,7 @@
#include "kowindowlist.h"
#include "KdepimDBusInterfaces/ReminderClient"
#include "kocheckableproxymodel.h"
#include <KAuthorized>
#include <KHolidays/HolidayRegion>
......@@ -276,9 +277,11 @@ void ActionManager::initActions()
mACollection->addAction(QStringLiteral("import_ical"), importAction);
connect(importAction, &QAction::triggered, this, &ActionManager::file_icalimport);
action = new QAction(i18n("Get &Hot New Stuff..."), this);
mACollection->addAction(QStringLiteral("downloadnewstuff"), action);
connect(action, &QAction::triggered, this, &ActionManager::downloadNewStuff);
if (KAuthorized::authorize(QStringLiteral("ghns"))) {
action = new QAction(i18n("Get &Hot New Stuff..."), this);
mACollection->addAction(QStringLiteral("downloadnewstuff"), action);
connect(action, &QAction::triggered, this, &ActionManager::downloadNewStuff);
}
action = new QAction(i18n("Export as &iCalendar..."), this);
mACollection->addAction(QStringLiteral("export_icalendar"), action);
......
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