Changeset View
Changeset View
Standalone View
Standalone View
core/ModuleView.cpp
Show All 37 Lines | |||||
38 | #include <KCModuleInfo> | 38 | #include <KCModuleInfo> | ||
39 | #include <KCModuleProxy> | 39 | #include <KCModuleProxy> | ||
40 | #include <KStandardGuiItem> | 40 | #include <KStandardGuiItem> | ||
41 | #include <kauthaction.h> | 41 | #include <kauthaction.h> | ||
42 | #include <KAboutData> | 42 | #include <KAboutData> | ||
43 | #include <kauthobjectdecorator.h> | 43 | #include <kauthobjectdecorator.h> | ||
44 | #include <KIconLoader> | 44 | #include <KIconLoader> | ||
45 | 45 | | |||
46 | #include <KActivities/ResourceInstance> | ||||
47 | | ||||
46 | #include "MenuItem.h" | 48 | #include "MenuItem.h" | ||
47 | 49 | | |||
48 | class ModuleView::Private { | 50 | class ModuleView::Private { | ||
49 | public: | 51 | public: | ||
50 | Private() {} | 52 | Private() {} | ||
51 | QMap<KPageWidgetItem*, KCModuleProxy*> mPages; | 53 | QMap<KPageWidgetItem*, KCModuleProxy*> mPages; | ||
52 | QMap<KPageWidgetItem*, KCModuleInfo*> mModules; | 54 | QMap<KPageWidgetItem*, KCModuleInfo*> mModules; | ||
53 | KPageWidget* mPageWidget; | 55 | KPageWidget* mPageWidget; | ||
▲ Show 20 Lines • Show All 282 Lines • ▼ Show 20 Line(s) | 337 | if( resolveChanges(previousModule) ) { | |||
336 | d->mPageWidget->setCurrentPage(current); | 338 | d->mPageWidget->setCurrentPage(current); | ||
337 | } | 339 | } | ||
338 | d->mPageWidget->blockSignals(false); | 340 | d->mPageWidget->blockSignals(false); | ||
339 | if( d->pageChangeSupressed ) { | 341 | if( d->pageChangeSupressed ) { | ||
340 | return; | 342 | return; | ||
341 | } | 343 | } | ||
342 | // We need to get the state of the now active module | 344 | // We need to get the state of the now active module | ||
343 | stateChanged(); | 345 | stateChanged(); | ||
346 | | ||||
347 | KCModuleProxy * activeModule = d->mPages.value( d->mPageWidget->currentPage() ); | ||||
348 | if (activeModule) { | ||||
349 | KActivities::ResourceInstance::notifyAccessed(QUrl("kcm:" + activeModule->moduleInfo().service()->storageId()), | ||||
davidedmundson: not "kcm:/" ? | |||||
i seen that kicker does application:desktopfile.desktop so i did the same, but is the same in the end mart: i seen that kicker does application:desktopfile.desktop so i did the same, but is the same in… | |||||
350 | "org.kde.systemsettings"); | ||||
351 | qWarning()<<QUrl("kcm:" + activeModule->moduleInfo().service()->storageId()); | ||||
352 | } | ||||
344 | } | 353 | } | ||
345 | 354 | | |||
346 | void ModuleView::stateChanged() | 355 | void ModuleView::stateChanged() | ||
347 | { | 356 | { | ||
348 | KCModuleProxy * activeModule = d->mPages.value( d->mPageWidget->currentPage() ); | 357 | KCModuleProxy * activeModule = d->mPages.value( d->mPageWidget->currentPage() ); | ||
349 | KAuth::Action moduleAction; | 358 | KAuth::Action moduleAction; | ||
350 | bool change = false; | 359 | bool change = false; | ||
351 | if( activeModule ) { | 360 | if( activeModule ) { | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |
not "kcm:/" ?