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");
|
KConfigGroup cfg = KConfigGroup(corona()->config(), "ActionPlugins");
|
||||||
cfg = KConfigGroup(&cfg, QString::number(containmentType()));
|
cfg = KConfigGroup(&cfg, QString::number(containmentType()));
|
||||||
|
|
||||||
|
|
||||||
//kDebug() << cfg.keyList();
|
//kDebug() << cfg.keyList();
|
||||||
if (cfg.exists()) {
|
if (cfg.exists()) {
|
||||||
@ -200,11 +200,18 @@ void Containment::restore(KConfigGroup &group)
|
|||||||
addContainmentActions(key, cfg.readEntry(key, QString()));
|
addContainmentActions(key, cfg.readEntry(key, QString()));
|
||||||
}
|
}
|
||||||
} else { //shell defaults
|
} else { //shell defaults
|
||||||
//steal the data directly, for efficiency
|
KConfigGroup defaultActionsCfg;
|
||||||
QHash<QString,QString> defaults = corona()->defaultContainmentActionsPlugins(d->type);
|
if (d->type == Plasma::PanelContainment) {
|
||||||
for (QHash<QString,QString>::const_iterator it = defaults.constBegin(),
|
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Panel");
|
||||||
end = defaults.constEnd(); it != end; ++it) {
|
//Plasma::DesktopContainment
|
||||||
addContainmentActions(it.key(), it.value());
|
} 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;
|
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)
|
CoronaPrivate::CoronaPrivate(Corona *corona)
|
||||||
: q(corona),
|
: q(corona),
|
||||||
immutability(Mutable),
|
immutability(Mutable),
|
||||||
|
@ -34,7 +34,6 @@ namespace Plasma
|
|||||||
{
|
{
|
||||||
|
|
||||||
class CoronaPrivate;
|
class CoronaPrivate;
|
||||||
class ContainmentActionsPluginsConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class Corona plasma/Corona.h <Plasma/Corona>
|
* @class Corona plasma/Corona.h <Plasma/Corona>
|
||||||
@ -135,15 +134,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
KActionCollection* actions() const;
|
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
|
* Imports an applet layout from a config file. The results will be added to the
|
||||||
* current set of Containments.
|
* current set of Containments.
|
||||||
|
@ -58,7 +58,6 @@ public:
|
|||||||
QTimer *configSyncTimer;
|
QTimer *configSyncTimer;
|
||||||
QList<Containment*> containments;
|
QList<Containment*> containments;
|
||||||
KActionCollection actions;
|
KActionCollection actions;
|
||||||
QMap<Plasma::ContainmentType, QHash<QString, QString> > containmentActionsDefaults;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user