diff --git a/popupapplet.cpp b/popupapplet.cpp index bdd470907..cf417f4c7 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -46,6 +46,7 @@ #include "plasma/extenders/extender.h" #include "plasma/extenders/extenderitem.h" #include "plasma/package.h" +#include "plasma/scripting/appletscript.h" #include "plasma/tooltipmanager.h" #include "plasma/widgets/iconwidget.h" @@ -550,8 +551,11 @@ Plasma::PopupPlacement PopupApplet::popupPlacement() const return d->popupPlacement; } -void PopupApplet::popupEvent(bool) +void PopupApplet::popupEvent(bool popped) { + if (Applet::d->script) { + emit Applet::d->script->popupEvent(popped); + } } void PopupApplet::setPassivePopup(bool passive) diff --git a/scripting/appletscript.h b/scripting/appletscript.h index 8bedab7d7..f2d7a0129 100644 --- a/scripting/appletscript.h +++ b/scripting/appletscript.h @@ -148,6 +148,11 @@ Q_SIGNALS: */ void saveState(KConfigGroup &group) const; + /** + * @see PopupApplet + */ + void popupEvent(bool popped) const; + public Q_SLOTS: /** @@ -222,6 +227,7 @@ protected: private: friend class Applet; + friend class PopupApplet; AppletScriptPrivate *const d; };