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();
|
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--------------
|
//PROPERTY change notifiers--------------
|
||||||
void iconChanged();
|
void iconChanged();
|
||||||
void titleChanged();
|
void titleChanged();
|
||||||
|
@ -695,6 +695,7 @@ void ContainmentInterface::mouseReleaseEvent(QMouseEvent *event)
|
|||||||
if (AppletInterface *ai = qobject_cast<AppletInterface *>(appletObject)) {
|
if (AppletInterface *ai = qobject_cast<AppletInterface *>(appletObject)) {
|
||||||
if (ai->contains(ai->mapFromItem(this, event->posF()))) {
|
if (ai->contains(ai->mapFromItem(this, event->posF()))) {
|
||||||
applet = ai->applet();
|
applet = ai->applet();
|
||||||
|
emit ai->contextualActionsAboutToShow();
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
ai = 0;
|
ai = 0;
|
||||||
@ -710,6 +711,7 @@ void ContainmentInterface::mouseReleaseEvent(QMouseEvent *event)
|
|||||||
if (applet) {
|
if (applet) {
|
||||||
addAppletActions(desktopMenu, applet, event);
|
addAppletActions(desktopMenu, applet, event);
|
||||||
} else {
|
} else {
|
||||||
|
emit contextualActionsAboutToShow();
|
||||||
addContainmentActions(desktopMenu, event);
|
addContainmentActions(desktopMenu, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user