add the separator in a slightly more appropriate moment

svn path=/trunk/KDE/kdelibs/; revision=1173978
This commit is contained in:
Aaron J. Seigo 2010-09-11 00:48:15 +00:00
parent 8a74b21168
commit f90ee4e28d

View File

@ -704,13 +704,13 @@ void ContainmentPrivate::addAppletActions(KMenu &desktopMenu, Applet *applet, QE
} }
if (q->immutability() == Mutable) { if (q->immutability() == Mutable) {
if (!desktopMenu.isEmpty()) {
desktopMenu.addSeparator();
}
QAction *closeApplet = applet->d->actions->action("remove"); QAction *closeApplet = applet->d->actions->action("remove");
kDebug() << "checking for removal" << closeApplet; kDebug() << "checking for removal" << closeApplet;
if (closeApplet) { if (closeApplet) {
if (!desktopMenu.isEmpty()) {
desktopMenu.addSeparator();
}
kDebug() << "boo yah, adding it!" << closeApplet->isEnabled() << closeApplet->isVisible(); kDebug() << "boo yah, adding it!" << closeApplet->isEnabled() << closeApplet->isVisible();
desktopMenu.addAction(closeApplet); desktopMenu.addAction(closeApplet);
} }