* don't create multiple rows in the case of an sk applet; this does mean that you can't mix'n'match plasmoids and sk themes in the same .desktop file, but i can't see that as a bad thing tbh

* don't show items that are in the group "Hidden"

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=728714
This commit is contained in:
Aaron J. Seigo 2007-10-24 01:04:36 +00:00
parent c810963a94
commit 30afcb5ef9

View File

@ -104,8 +104,18 @@ PlasmaAppletItemModel::PlasmaAppletItemModel(KConfigGroup configGroup, QObject *
//TODO: get recommended, favorit, used, etc out of knownApplets() //TODO: get recommended, favorit, used, etc out of knownApplets()
foreach (const KPluginInfo& info, Plasma::Applet::knownApplets()) { foreach (const KPluginInfo& info, Plasma::Applet::knownApplets()) {
if (info.category() == i18n("Hidden")) {
// we don't want to show the hidden category
continue;
}
kDebug() << info.pluginName() << " is the name of the plugin\n"; kDebug() << info.pluginName() << " is the name of the plugin\n";
if (info.pluginName() == "skapplet") {
// If there is the SuperKaramba applet,
// add SuperKaramba themes to the
// model too
loadSuperKarambaThemes(info);
} else {
QMap<QString, QVariant> attrs; QMap<QString, QVariant> attrs;
attrs.insert("name", info.name()); attrs.insert("name", info.name());
attrs.insert("pluginName", info.pluginName()); attrs.insert("pluginName", info.pluginName());
@ -117,12 +127,6 @@ PlasmaAppletItemModel::PlasmaAppletItemModel(KConfigGroup configGroup, QObject *
((m_favorites.contains(info.pluginName())) ? PlasmaAppletItem::Favorite : PlasmaAppletItem::NoFilter) | ((m_favorites.contains(info.pluginName())) ? PlasmaAppletItem::Favorite : PlasmaAppletItem::NoFilter) |
((m_used.contains(info.pluginName())) ? PlasmaAppletItem::Used : PlasmaAppletItem::NoFilter) ((m_used.contains(info.pluginName())) ? PlasmaAppletItem::Used : PlasmaAppletItem::NoFilter)
, &(extraPluginAttrs[info.pluginName()]))); , &(extraPluginAttrs[info.pluginName()])));
// If there is the SuperKaramba applet,
// add SuperKaramba themes to the
// model too
if (info.pluginName() == "skapplet") {
loadSuperKarambaThemes(info);
} }
} }
} }