prevent getting called twice (fixes crash on removing panels)
svn path=/trunk/KDE/kdelibs/; revision=964500
This commit is contained in:
parent
53476746bc
commit
5f7fb0c500
@ -567,13 +567,10 @@ void ContainmentPrivate::appletActions(KMenu &desktopMenu, Applet *applet, bool
|
||||
}
|
||||
|
||||
QAction *closeApplet = applet->d->actions->action("remove");
|
||||
if (!closeApplet) { //unlikely but not impossible
|
||||
closeApplet = new QAction(i18nc("%1 is the name of the applet", "Remove this %1", applet->name()), &desktopMenu);
|
||||
closeApplet->setIcon(KIcon("edit-delete"));
|
||||
QObject::connect(closeApplet, SIGNAL(triggered(bool)), applet, SLOT(destroy()));
|
||||
}
|
||||
if (closeApplet) {
|
||||
desktopMenu.addAction(closeApplet);
|
||||
}
|
||||
}
|
||||
|
||||
KMenu *containmentMenu = new KMenu(i18nc("%1 is the name of the containment", "%1 Options", q->name()), &desktopMenu);
|
||||
containmentActions(*containmentMenu);
|
||||
@ -1611,7 +1608,7 @@ void ContainmentPrivate::requestConfiguration()
|
||||
|
||||
void Containment::destroy(bool confirm)
|
||||
{
|
||||
if (immutability() != Mutable) {
|
||||
if (immutability() != Mutable || Applet::d->transient) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user