remove Corona::defaultContainmentActionsPlugins()
This commit is contained in:
parent
7abd6d81d5
commit
4219697fcb
@ -191,7 +191,7 @@ void Containment::restore(KConfigGroup &group)
|
||||
|
||||
KConfigGroup cfg = KConfigGroup(corona()->config(), "ActionPlugins");
|
||||
cfg = KConfigGroup(&cfg, QString::number(containmentType()));
|
||||
|
||||
|
||||
|
||||
//kDebug() << cfg.keyList();
|
||||
if (cfg.exists()) {
|
||||
@ -200,11 +200,18 @@ void Containment::restore(KConfigGroup &group)
|
||||
addContainmentActions(key, cfg.readEntry(key, QString()));
|
||||
}
|
||||
} else { //shell defaults
|
||||
//steal the data directly, for efficiency
|
||||
QHash<QString,QString> defaults = corona()->defaultContainmentActionsPlugins(d->type);
|
||||
for (QHash<QString,QString>::const_iterator it = defaults.constBegin(),
|
||||
end = defaults.constEnd(); it != end; ++it) {
|
||||
addContainmentActions(it.key(), it.value());
|
||||
KConfigGroup defaultActionsCfg;
|
||||
if (d->type == Plasma::PanelContainment) {
|
||||
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Panel");
|
||||
//Plasma::DesktopContainment
|
||||
} else {
|
||||
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Desktop");
|
||||
}
|
||||
defaultActionsCfg = KConfigGroup(&defaultActionsCfg, "ContainmentActions");
|
||||
|
||||
foreach (const QString &key, defaultActionsCfg.keyList()) {
|
||||
//kDebug() << "loading" << key;
|
||||
addContainmentActions(key, cfg.readEntry(key, QString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -278,12 +278,6 @@ KActionCollection *Corona::actions() const
|
||||
return &d->actions;
|
||||
}
|
||||
|
||||
QHash<QString, QString> Corona::defaultContainmentActionsPlugins(ContainmentType containmentType) const
|
||||
{
|
||||
//FIXME: need to read these out of the package
|
||||
return d->containmentActionsDefaults.value(containmentType);
|
||||
}
|
||||
|
||||
CoronaPrivate::CoronaPrivate(Corona *corona)
|
||||
: q(corona),
|
||||
immutability(Mutable),
|
||||
|
@ -34,7 +34,6 @@ namespace Plasma
|
||||
{
|
||||
|
||||
class CoronaPrivate;
|
||||
class ContainmentActionsPluginsConfig;
|
||||
|
||||
/**
|
||||
* @class Corona plasma/Corona.h <Plasma/Corona>
|
||||
@ -135,15 +134,6 @@ public:
|
||||
*/
|
||||
KActionCollection* actions() const;
|
||||
|
||||
/**
|
||||
* @since 5.0
|
||||
* Returns the default containmentactions plugins for the given containment type.
|
||||
*
|
||||
* @arg containmentType the type of containment these actions apply to
|
||||
* @return a hash containing the triggers and the plugin names associated with them
|
||||
*/
|
||||
QHash<QString, QString> defaultContainmentActionsPlugins(ContainmentType containmentType) const;
|
||||
|
||||
/**
|
||||
* Imports an applet layout from a config file. The results will be added to the
|
||||
* current set of Containments.
|
||||
|
@ -58,7 +58,6 @@ public:
|
||||
QTimer *configSyncTimer;
|
||||
QList<Containment*> containments;
|
||||
KActionCollection actions;
|
||||
QMap<Plasma::ContainmentType, QHash<QString, QString> > containmentActionsDefaults;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user