put the "Appearance Settings" after "Lock Widgets" in the context menu of the desktop

svn path=/trunk/KDE/kdelibs/; revision=894992
This commit is contained in:
Frederik Gladhorn 2008-12-09 19:10:30 +00:00
parent d0e899603c
commit f0c5eeea37

View File

@ -493,9 +493,15 @@ void ContainmentPrivate::containmentActions(KMenu &desktopMenu)
//get base context actions //get base context actions
QList<QAction*> actions = q->contextualActions(); QList<QAction*> actions = q->contextualActions();
//find the separator to insert the activity settings before it
QAction *separatorAction = 0;
foreach (QAction *action, actions) { foreach (QAction *action, actions) {
if (action) { if (action) {
desktopMenu.addAction(action); desktopMenu.addAction(action);
if(action->isSeparator()) {
separatorAction = action;
}
} }
} }
@ -504,7 +510,7 @@ void ContainmentPrivate::containmentActions(KMenu &desktopMenu)
//TODO: should a submenu be created if there are too many containment specific //TODO: should a submenu be created if there are too many containment specific
// actions? see folderview containment // actions? see folderview containment
if(q->containmentType() == Containment::DesktopContainment) { if(q->containmentType() == Containment::DesktopContainment) {
desktopMenu.addAction(q->action("activity settings")); desktopMenu.insertAction(separatorAction, q->action("activity settings"));
if (q->hasConfigurationInterface()) { if (q->hasConfigurationInterface()) {
desktopMenu.addAction(q->action("configure")); desktopMenu.addAction(q->action("configure"));
} }