actually add the actions to the menu
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=871120
This commit is contained in:
parent
59b5ac3080
commit
8cc7800aae
@ -323,7 +323,7 @@ void AppletBrowserWidget::destroyApplets(const QString &name)
|
|||||||
|
|
||||||
void AppletBrowserWidget::downloadWidgets(const QString &type)
|
void AppletBrowserWidget::downloadWidgets(const QString &type)
|
||||||
{
|
{
|
||||||
kDebug() << type;
|
//kDebug() << type;
|
||||||
PackageStructure *installer = 0;
|
PackageStructure *installer = 0;
|
||||||
|
|
||||||
if (!type.isEmpty()) {
|
if (!type.isEmpty()) {
|
||||||
@ -396,10 +396,11 @@ void AppletBrowserPrivate::populateWidgetsMenu()
|
|||||||
|
|
||||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure");
|
KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure");
|
||||||
foreach (const KService::Ptr service, offers) {
|
foreach (const KService::Ptr service, offers) {
|
||||||
|
//kDebug() << service->property("X-Plasma-ProvidesWidgetBrowser");
|
||||||
if (service->property("X-Plasma-ProvidesWidgetBrowser").toBool()) {
|
if (service->property("X-Plasma-ProvidesWidgetBrowser").toBool()) {
|
||||||
QAction *action = new QAction(KIcon("applications-internet"),
|
QAction *action = new QAction(KIcon("applications-internet"),
|
||||||
i18n("Download New %1 Widgets", service->name()), q);
|
i18n("Download New %1", service->name()), q);
|
||||||
QObject::connect(action, SIGNAL(triggered(bool)), mapper, SLOT(map()));
|
widgetsMenu->addAction(action);
|
||||||
mapper->setMapping(action, service->property("X-KDE-PluginInfo-Name").toString());
|
mapper->setMapping(action, service->property("X-KDE-PluginInfo-Name").toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user