contextualActionsAboutToShow signal
emitted just before showing a context menu gives the plasmoid the time to fiddle with the actions beforehand reviewd by:Eike Hein BUG:337959
This commit is contained in:
parent
d7a7a4fb83
commit
120132879a
@ -306,6 +306,13 @@ Q_SIGNALS:
|
||||
*/
|
||||
void activated();
|
||||
|
||||
/**
|
||||
* Emitted just before the contextual actions are about to show
|
||||
* For instance just before the context menu containing the actions
|
||||
* added with setAction() is shown
|
||||
*/
|
||||
void contextualActionsAboutToShow();
|
||||
|
||||
//PROPERTY change notifiers--------------
|
||||
void iconChanged();
|
||||
void titleChanged();
|
||||
|
@ -695,6 +695,7 @@ void ContainmentInterface::mouseReleaseEvent(QMouseEvent *event)
|
||||
if (AppletInterface *ai = qobject_cast<AppletInterface *>(appletObject)) {
|
||||
if (ai->contains(ai->mapFromItem(this, event->posF()))) {
|
||||
applet = ai->applet();
|
||||
emit ai->contextualActionsAboutToShow();
|
||||
break;
|
||||
} else {
|
||||
ai = 0;
|
||||
@ -710,6 +711,7 @@ void ContainmentInterface::mouseReleaseEvent(QMouseEvent *event)
|
||||
if (applet) {
|
||||
addAppletActions(desktopMenu, applet, event);
|
||||
} else {
|
||||
emit contextualActionsAboutToShow();
|
||||
addContainmentActions(desktopMenu, event);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user