actually add the actions to the menu

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=871120
This commit is contained in:
Aaron J. Seigo 2008-10-13 22:57:23 +00:00
parent 59b5ac3080
commit 8cc7800aae

View File

@ -323,7 +323,7 @@ void AppletBrowserWidget::destroyApplets(const QString &name)
void AppletBrowserWidget::downloadWidgets(const QString &type)
{
kDebug() << type;
//kDebug() << type;
PackageStructure *installer = 0;
if (!type.isEmpty()) {
@ -396,10 +396,11 @@ void AppletBrowserPrivate::populateWidgetsMenu()
KService::List offers = KServiceTypeTrader::self()->query("Plasma/PackageStructure");
foreach (const KService::Ptr service, offers) {
//kDebug() << service->property("X-Plasma-ProvidesWidgetBrowser");
if (service->property("X-Plasma-ProvidesWidgetBrowser").toBool()) {
QAction *action = new QAction(KIcon("applications-internet"),
i18n("Download New %1 Widgets", service->name()), q);
QObject::connect(action, SIGNAL(triggered(bool)), mapper, SLOT(map()));
i18n("Download New %1", service->name()), q);
widgetsMenu->addAction(action);
mapper->setMapping(action, service->property("X-KDE-PluginInfo-Name").toString());
}
}