make sure the plugin config gets restored

This commit is contained in:
Marco Martin 2013-08-14 15:13:35 +02:00
parent 834f73a101
commit 902f98ed6e
3 changed files with 5 additions and 5 deletions

View File

@ -503,6 +503,7 @@ void Containment::addContainmentActions(const QString &trigger, const QString &p
if (plugin) {
cfg.writeEntry(trigger, pluginName);
containmentActions().insert(trigger, plugin);
plugin->setContainment(this);
} else {
//bad plugin... gets removed. is this a feature or a bug?
cfg.deleteEntry(trigger);

View File

@ -57,8 +57,6 @@ ContainmentActions::ContainmentActions(QObject *parentObject, const QVariantList
if (!mutableArgs.isEmpty()) {
mutableArgs.removeFirst();
}
setParent(parentObject);
}
ContainmentActions::~ContainmentActions()
@ -171,6 +169,7 @@ QString ContainmentActions::eventToString(QEvent *event)
void ContainmentActions::setContainment(Containment *newContainment)
{
d->containment = newContainment;
restore(config());
}
} // Plasma namespace

View File

@ -4,14 +4,14 @@ ToolBox=org.kde.desktoptoolbox
RuntimePlatform=
[Desktop][ContainmentActions]
RightButton=org.kde.contextmenu
MiddleButton=org.kde.paste
RightButton;NoModifier=org.kde.contextmenu
MiddleButton;NoModifier=org.kde.paste
[Panel]
Containment=org.kde.panel
ToolBox=org.kde.paneltoolbox
[Panel][ContainmentActions]
RightButton=org.kde.contextmenu
RightButton;NoModifier=org.kde.contextmenu
[Theme]
Theme=default