[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.3/kdelibs/plasma
From:       Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date:       2009-07-26 14:21:43
Message-ID: 1248618103.147025.9648.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1002602 by rdale:

* Add Plasma/PluginApplet as another type of plasmoid service when making KTrader queries

 M  +8 -1      applet.cpp  


--- branches/KDE/4.3/kdelibs/plasma/applet.cpp #1002601:1002602
@@ -783,8 +783,12 @@
 
     QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(appletName);
     KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
-
+	
     if (offers.isEmpty()) {
+        offers = KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint);
+	}
+	
+    if (offers.isEmpty()) {
         return QString();
     }
 
@@ -1761,6 +1765,7 @@
     }
 
     KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
+    offers << KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint);
 
     //now we have to do some manual filtering because the constraint can't handle everything
     KConfigGroup constraintGroup(KGlobal::config(), "Constraints");
@@ -1802,6 +1807,7 @@
     QString constraint = QString("'%1' in [X-Plasma-DropMimeTypes]").arg(mimetype);
     //kDebug() << "listAppletInfoForMimetype with" << mimetype << constraint;
     KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
+    offers << KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint);
     return KPluginInfo::fromServices(offers);
 }
 
@@ -1822,6 +1828,7 @@
     }
 
     KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
+    offers << KServiceTypeTrader::self()->query("Plasma/PopupApplet", constraint);
     QStringList categories;
     QSet<QString> known = AppletPrivate::knownCategories();
     foreach (const KService::Ptr &applet, offers) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic