[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/plasma/extenders
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2010-09-26 20:19:11
Message-ID: 20100926201911.DB48AAC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1180038 by aseigo:

when an extender is created on an applet without an extender and it is a popup applet \
without an explicitly defined graphicsWidget, make it re-check the layout so it \
creates a dialog or whatever when appropriate based on having a graphicsWidget now


 M  +7 -0      extender.cpp  


--- trunk/KDE/kdelibs/plasma/extenders/extender.cpp #1180037:1180038
@@ -44,6 +44,7 @@
 #include "private/extenderapplet_p.h"
 #include "private/extenderitem_p.h"
 #include "private/extenderitemmimedata_p.h"
+#include "private/popupapplet_p.h"
 
 namespace Plasma
 {
@@ -91,7 +92,13 @@
         kWarning() << "Applet already has an extender, and can have only one \
extender."  << "The previous extender will be destroyed.";
         delete applet->d->extender.data();
+    } else if (PopupApplet *popup = qobject_cast<PopupApplet *>(applet)) {
+        if (!popup->d->graphicsWidget) {
+            // ensure the popup gets a dialog with us as the graphics widget
+            popup->d->popupConstraintsEvent(SizeConstraint);
     }
+    }
+
     applet->d->extender = this;
     setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic