Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > media > main-testing-src > by-pkgid > 87ca796ee02d84f8e38aaeca259e7ea7 > files > 4

kdeplasma-addons-4.2.4-0.2mdv2009.0.src.rpm

--- applets/lancelot/libs/lancelot/widgets/ScrollPane.cpp~  2009-01-21 11:29:18.000000000 +0100
+++ applets/lancelot/libs/lancelot/widgets/ScrollPane.cpp   2009-02-18 12:16:22.000000000 +0100
@@ -227,8 +227,10 @@
 
 void ScrollPane::setGeometry(const QRectF & rect) //>
 {
+    QRectF old_geometry = geometry();
     Widget::setGeometry(rect);
 
+    if (rect == old_geometry) return ;
     scrollableWidgetSizeUpdateNeeded();
 } //<
 
--- applets/lancelot/libs/lancelot/widgets/CustomListView.cpp~  2008-11-28 16:33:59.000000000 +0100
+++ applets/lancelot/libs/lancelot/widgets/CustomListView.cpp   2009-02-18 12:30:05.000000000 +0100
@@ -164,9 +164,9 @@
             QGraphicsWidget * item = itemForIndex(i);
             QRectF itemGeometry = item->geometry();
             if (viewport.intersects(itemGeometry)) {
-                if (q->isVisible()) {
+                //if (q->isVisible()) {
                     item->show();
-                }
+                //}
                 transform.reset();
                 if (!viewport.contains(itemGeometry)) {
                     QRectF clip = viewport.intersect(itemGeometry);
--- applets/lancelot/libs/lancelot/layouts/FullBorderLayout.cpp~    2008-11-28 16:33:58.000000000 +0100
+++ applets/lancelot/libs/lancelot/layouts/FullBorderLayout.cpp 2009-02-18 12:47:40.000000000 +0100
@@ -41,10 +41,10 @@
     {
     }
 
-    QMap< FullBorderLayout::Place, QGraphicsLayoutItem * > itemPositions;
-    QMap< FullBorderLayout::Border, qreal > sizes;
+    QMap < FullBorderLayout::Place, QGraphicsLayoutItem * > itemPositions;
+    QMap < FullBorderLayout::Border, qreal > sizes;
 
-    void calculateBorderSizes(qreal & top, qreal & bottom, qreal & left, qreal & right) const
+    void calculateBorderSizes(qreal & top, qreal & bottom, qreal & left, qreal & right) // const
     {
         // top
         top = sizes[FullBorderLayout::TopBorder];
--- applets/lancelot/libs/lancelot/layouts/CardLayout.cpp~  2008-08-20 21:53:48.000000000 +0200
+++ applets/lancelot/libs/lancelot/layouts/CardLayout.cpp   2009-02-18 12:56:54.000000000 +0100
@@ -31,6 +31,35 @@
     {
     }
 
+    void _hide(QGraphicsWidget * widget) {
+        // since Qt has some strange bug (or it
+        // just doesn't behave as it should,
+        // this is a temporary solution
+        // so instead of hiding the item,
+        // we are moving it somewhere
+        // out of bounds
+        // this is a very dirty hack!
+
+        QRectF g = widget->geometry();
+        if (g.left() < 0) {
+            return;
+        }
+        g.moveRight(- g.left());
+        widget->setGeometry(g);
+    }
+
+    void _show(QGraphicsWidget * widget) {
+        // see the comment in _hide
+
+        QRectF g = widget->geometry();
+        if (g.left() >= 0) {
+            return;
+        }
+
+        g.moveLeft(- g.right());
+        widget->setGeometry(g);
+    }
+
     void relayout()
     {
         QRectF g = q->geometry();
@@ -40,9 +69,11 @@
         }
 
         foreach (QGraphicsWidget * l, widgets) {
-            l->show();
+            _show(l);
             l->setGeometry(g);
-            if (shown != l) l->hide();
+            if (shown != l) {
+                _hide(l);
+            }
         }
     }
 
@@ -106,7 +137,7 @@
 {
     if (widget) {
         d->widgets[id] = widget;
-        // widget->hide(); // BUGS in QT
+        d->_hide(widget);
     } else {
         d->removeItem(id);
     }
@@ -142,17 +173,17 @@
     if (!d->widgets.contains(id)) return;
     if (d->shown == d->widgets[id]) return;
     if (d->shown) {
-        d->shown->hide();
+        d->_hide(d->shown);
     }
     d->shown = d->widgets[id];
     d->shown->setGeometry(geometry());
-    d->shown->show();
+    d->_show(d->shown);
 }
 
 void CardLayout::hideAll()
 {
     if (!d->shown) return;
-    d->shown->hide();
+    d->_hide(d->shown);
     d->shown = NULL;
 }
 
--- applets/lancelot/app/src/models/ContactsKopete.cpp~ 2008-11-28 16:33:58.000000000 +0100
+++ applets/lancelot/app/src/models/ContactsKopete.cpp  2009-02-18 12:57:44.000000000 +0100
@@ -22,7 +22,7 @@
 #include <KStandardDirs>
 #include <KDebug>
 
-#define UPDATE_INTERVAL 30000
+#define UPDATE_INTERVAL 15000
 #define CHECK_RUNNING_INTERVAL 5000
 
 namespace Models {