Injects the containment's context menu into the widget's. This allows, e.g. "Configure Panel" to show up in the context menu.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771315
This commit is contained in:
parent
9aa26c5e35
commit
0609ee5e38
|
@ -248,6 +248,21 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
|||
hasEntries = true;
|
||||
}
|
||||
|
||||
actions = contextActions();
|
||||
if (actions.count() > 0) {
|
||||
hasEntries = true;
|
||||
QMenu *containmentActionMenu = &desktopMenu;
|
||||
|
||||
if (actions.count() > 1) {
|
||||
containmentActionMenu = new KMenu(i18n("%1 Options", name()), &desktopMenu);
|
||||
desktopMenu.addMenu(containmentActionMenu);
|
||||
}
|
||||
|
||||
foreach(QAction* action, actions) {
|
||||
containmentActionMenu->addAction(action);
|
||||
}
|
||||
}
|
||||
|
||||
if (scene() && !static_cast<Corona*>(scene())->isImmutable()) {
|
||||
if (hasEntries) {
|
||||
desktopMenu.addSeparator();
|
||||
|
|
Loading…
Reference in New Issue
Block a user