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,12 +567,9 @@ void ContainmentPrivate::appletActions(KMenu &desktopMenu, Applet *applet, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
QAction *closeApplet = applet->d->actions->action("remove");
|
QAction *closeApplet = applet->d->actions->action("remove");
|
||||||
if (!closeApplet) { //unlikely but not impossible
|
if (closeApplet) {
|
||||||
closeApplet = new QAction(i18nc("%1 is the name of the applet", "Remove this %1", applet->name()), &desktopMenu);
|
desktopMenu.addAction(closeApplet);
|
||||||
closeApplet->setIcon(KIcon("edit-delete"));
|
|
||||||
QObject::connect(closeApplet, SIGNAL(triggered(bool)), applet, SLOT(destroy()));
|
|
||||||
}
|
}
|
||||||
desktopMenu.addAction(closeApplet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KMenu *containmentMenu = new KMenu(i18nc("%1 is the name of the containment", "%1 Options", q->name()), &desktopMenu);
|
KMenu *containmentMenu = new KMenu(i18nc("%1 is the name of the containment", "%1 Options", q->name()), &desktopMenu);
|
||||||
@ -1611,7 +1608,7 @@ void ContainmentPrivate::requestConfiguration()
|
|||||||
|
|
||||||
void Containment::destroy(bool confirm)
|
void Containment::destroy(bool confirm)
|
||||||
{
|
{
|
||||||
if (immutability() != Mutable) {
|
if (immutability() != Mutable || Applet::d->transient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user