Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-updates-src > by-pkgid > 36e35a7a1cedf0f7f039dc3bd76bfb00 > files > 22

kdebase3-3.5.10-23.8mdv2009.1.src.rpm

--- kdebase-3.5.6/kdesktop/kfileividesktop.cpp.rubberband	2007-01-15 12:32:10.000000000 +0100
+++ kdebase-3.5.6/kdesktop/kfileividesktop.cpp	2007-02-08 10:36:24.000000000 +0100
@@ -100,7 +100,13 @@
 
   // draw the pixmap as in KIconViewItem::paintItem(...)
   paintPixmap(p, colors);
-
+   if ( isSelected() ) {
+     p->setBrush( QBrush( cg.highlight() ) );
+     p->setPen( QPen( cg.highlight() ) );
+     p->drawRoundRect( textRect( FALSE ),
+                       1000 / textRect( FALSE ).width(),
+                       1000 / textRect( FALSE ).height() );
+  }
   //
   // Paint the text as shadowed if the shadow is available
   //
@@ -167,7 +173,7 @@
 
 void KFileIVIDesktop::drawShadowedText( QPainter *p, const QColorGroup &cg )
 {
-  int textX = textRect( FALSE ).x() + 2;
+  int textX = textRect( FALSE ).x() + 4;
   int textY = textRect( FALSE ).y();
   int align = ((KIconView *) iconView())->itemTextPos() == QIconView::Bottom
     ? AlignHCenter : AlignAuto;
@@ -184,12 +190,15 @@
   int spread = shadowThickness();
 
   if ( isSelected() && settings->selectionType() != KShadowSettings::InverseVideoOnSelection ) {
-    // select using a filled rect
     text = cg.highlightedText();
     QRect rect = textRect( false );
     rect.setRight( rect.right() - spread );
     rect.setBottom( rect.bottom() - spread + 1 );
-    p->fillRect( rect, cg.highlight() );
+    p->setBrush( QBrush( cg.highlight() ) );
+    p->setPen( QPen( cg.highlight() ) );
+    p->drawRoundRect( rect,
+		      1000 / rect.width(),
+		      1000 / rect.height() );
   }
   else {
     // use shadow
--- kdebase-3.5.6/kdesktop/kfileividesktop.h.rubberband	2005-10-10 17:04:11.000000000 +0200
+++ kdebase-3.5.6/kdesktop/kfileividesktop.h	2007-02-08 10:31:45.000000000 +0100
@@ -80,12 +80,6 @@
     virtual void paintItem(QPainter *p, const QColorGroup &cg);
 
     /**
-     * Reimplements QIconView::paintFocus() to take the shadow
-     * metrics into account();
-     */
-    virtual void paintFocus( QPainter *p, const QColorGroup &cg );
-
-    /**
      * Draws the shadow text.
      * @param p the painter for drawing the item
      * @param cg the base color group
@@ -101,6 +95,8 @@
      */
     virtual QImage *buildShadow(QPainter *p, const int align, QColor &shadowColor);
 
+	void paintFocus(QPainter*, const QColorGroup&);
+
  protected:
     void setNormalImage(QImage *newImage) { delete m_normalImage; m_normalImage = newImage; };
     void setSelectedImage(QImage *newImage) { delete m_selectedImage; m_selectedImage = newImage; };
--- kdebase-3.5.6/konqueror/listview/konq_listviewwidget.cc.rubberband	2006-10-01 19:32:03.000000000 +0200
+++ kdebase-3.5.6/konqueror/listview/konq_listviewwidget.cc	2007-02-08 10:31:45.000000000 +0100
@@ -405,7 +405,6 @@
 {
    if ( m_rubber )
    {
-      drawRubber();
       delete m_rubber;
       m_rubber = 0;
    }
@@ -417,14 +416,17 @@
    KonqBaseListViewItem* item = isExecuteArea( vp ) ?
          static_cast<KonqBaseListViewItem*>( itemAt( vp ) ) : 0L;
 
-   if ( item )
+   if ( item ) {
       KListView::contentsMousePressEvent( e );
+   }
    else {
       if ( e->button() == LeftButton )
       {
          if ( !( e->state() & ControlButton ) )
             setSelected( itemAt( vp ), false );
          m_rubber = new QRect( e->x(), e->y(), 0, 0 );
+         clearSelection();
+         emit selectionChanged();
          m_fileTip->setItem( 0 );
       }
       if ( e->button() != RightButton )
@@ -440,9 +442,10 @@
 {
    if ( m_rubber )
    {
-      drawRubber();
+      QRect r( m_rubber->normalize() );
       delete m_rubber;
       m_rubber = 0;
+      repaintContents( r, FALSE );
    }
 
    if ( m_scrollTimer )
@@ -534,23 +537,21 @@
    KListView::leaveEvent( e );
 }
 
-void KonqBaseListViewWidget::drawRubber()
+void KonqBaseListViewWidget::drawRubber( QPainter *p )
 {
    if ( !m_rubber )
       return;
 
-   QPainter p;
-   p.begin( viewport() );
-   p.setRasterOp( NotROP );
-   p.setPen( QPen( color0, 1 ) );
-   p.setBrush( NoBrush );
+   p->setRasterOp( NotROP );
+   p->setPen( QPen( color0, 1 ) );
+   p->setBrush( NoBrush );
 
    QPoint pt( m_rubber->x(), m_rubber->y() );
    pt = contentsToViewport( pt );
-   style().drawPrimitive( QStyle::PE_FocusRect, &p,
+   style().drawPrimitive( QStyle::PE_FocusRect, p,
                           QRect( pt.x(), pt.y(), m_rubber->width(), m_rubber->height() ),
                           colorGroup(), QStyle::Style_Default, colorGroup().base() );
-   p.end();
+   p->end();
 }
 
 void KonqBaseListViewWidget::slotAutoScroll()
@@ -566,10 +567,11 @@
    if ( vc == m_rubber->bottomRight() )
       return;
 
+   QRect oldRubber = *m_rubber;
+
    const int oldTop = m_rubber->normalize().top();
    const int oldBottom = m_rubber->normalize().bottom();
 
-   drawRubber();
    m_rubber->setBottomRight( vc );
 
    QListViewItem *cur = itemAt( QPoint(0,0) );
@@ -577,10 +579,19 @@
    bool block = signalsBlocked();
    blockSignals( true );
 
+   QRect rr;
    QRect nr = m_rubber->normalize();
+   bool changed = FALSE;
    if ( cur )
    {
-      QRect rect = itemRect( cur );
+      QRect rect;
+      if ( allColumnsShowFocus() )
+          rect = itemRect( cur );
+      else {
+          rect = itemRect( cur );
+          rect.setWidth( executeArea( cur ) );
+      }
+
       if ( !allColumnsShowFocus() )
           rect.setWidth( executeArea( cur ) );
 
@@ -606,10 +617,25 @@
          if ( rect.intersects( nr ) )
          {
             if ( !cur->isSelected() && cur->isSelectable() )
+            {
                setSelected( cur, true );
-         } else if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) )
-            setSelected( cur, false );
-
+               changed=TRUE;
+               rr = rr.unite( itemRect( cur ) );
+            }
+         }
+         else
+         {
+            if ( cur->isSelected() )
+            {
+               changed = TRUE;
+               rr = rr.unite( itemRect( cur ) );
+            }
+
+            if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) )
+            {
+               setSelected( cur, false );
+            }
+         }
          cur = cur->itemBelow();
          if (cur && !allColumnsShowFocus())
             rect.setWidth( executeArea( cur ) );
@@ -625,9 +651,22 @@
          if ( rect.intersects( nr ) )
          {
             if ( !cur->isSelected() && cur->isSelectable() )
+            {
                setSelected( cur, true );
-         } else if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) )
-            setSelected( cur, false );
+               changed = TRUE;
+               rr = rr.unite( itemRect( cur ) );
+            }
+         }
+         else
+         {
+            if ( cur->isSelected() )
+            {
+               changed = TRUE;
+               rr = rr.unite( itemRect( cur ) );
+            }
+            if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) )
+               setSelected( cur, false );
+         }
 
          cur = cur->itemAbove();
          if (cur && !allColumnsShowFocus())
@@ -639,7 +678,31 @@
    blockSignals( block );
    emit selectionChanged();
 
-   drawRubber();
+   QRect allRect = oldRubber.normalize();
+   if ( changed )
+   {
+       allRect |= rr.normalize();
+   }
+   allRect |= m_rubber->normalize();
+   QPoint point = contentsToViewport( allRect.topLeft() );
+   allRect = QRect( point.x(), point.y(), allRect.width(), allRect.height() );
+   allRect &= viewport()->rect();
+   allRect.addCoords( -2, -2, 2, 2 );
+
+   QPixmap backrubber( viewport()->rect().size() );
+   backrubber.fill( viewport(), viewport()->rect().topLeft() );
+
+   QPainter p( &backrubber );
+   p.save();
+   drawContentsOffset( &p,
+      contentsX(),
+      contentsY(),
+      contentsX() + allRect.left(), contentsY() + allRect.top(),
+      allRect.width(), allRect.height() );
+   p.restore();
+   drawRubber( &p );
+   p.end();
+   bitBlt( viewport(), allRect.topLeft(), &backrubber, allRect );
 
    const int scroll_margin = 40;
    ensureVisible( vc.x(), vc.y(), scroll_margin, scroll_margin );
@@ -669,9 +732,11 @@
 
 void KonqBaseListViewWidget::viewportPaintEvent( QPaintEvent *e )
 {
-   drawRubber();
    KListView::viewportPaintEvent( e );
-   drawRubber();
+
+   QPainter p( viewport() );
+   drawRubber( &p );
+   p.end();
 }
 
 void KonqBaseListViewWidget::viewportResizeEvent(QResizeEvent * e)
--- kdebase-3.5.6/konqueror/listview/konq_listviewwidget.h.rubberband	2005-10-10 17:04:14.000000000 +0200
+++ kdebase-3.5.6/konqueror/listview/konq_listviewwidget.h	2007-02-08 10:31:45.000000000 +0100
@@ -206,7 +206,7 @@
    virtual void viewportPaintEvent( QPaintEvent *e );
    virtual void viewportResizeEvent( QResizeEvent *e );
 
-   virtual void drawRubber();
+   virtual void drawRubber( QPainter * );
    virtual void contentsMousePressEvent( QMouseEvent *e );
    virtual void contentsMouseReleaseEvent( QMouseEvent *e );
    virtual void contentsMouseMoveEvent( QMouseEvent *e );
@@ -246,6 +246,7 @@
    QColor m_itemColor;
 
    QRect *m_rubber;
+   QPixmap *m_backrubber;
 
    bool m_bTopLevelComplete:1;
    bool m_showIcons:1;
--- kdebase-3.5.6/konqueror/sidebar/konqsidebar.cpp.rubberband	2005-09-10 10:25:47.000000000 +0200
+++ kdebase-3.5.6/konqueror/sidebar/konqsidebar.cpp	2007-02-08 10:31:45.000000000 +0100
@@ -56,7 +56,8 @@
 	return true;
 }
 
-bool KonqSidebar::openURL(const KURL &url) {
+bool KonqSidebar::openURL(const KURL &url)
+{
 	if (m_widget)
 		return m_widget->openURL(url);
 	else return false;
@@ -73,8 +74,6 @@
 	}
 }
 
-
-
 // It's usually safe to leave the factory code alone.. with the
 // notable exception of the KAboutData data
 #include <kaboutdata.h>
--- kdebase-3.5.6/konqueror/sidebar/konqsidebartng.rc.rubberband	2005-09-10 10:25:47.000000000 +0200
+++ kdebase-3.5.6/konqueror/sidebar/konqsidebartng.rc	2007-02-08 10:31:45.000000000 +0100
@@ -1,7 +1,12 @@
 [filemanagement]
+[filemanagement]
 OpenViews=home.desktop
 SingleWidgetMode=true
 
 [webbrowsing]
 OpenViews=bookmarks.desktop
 SingleWidgetMode=true
+
+[webbrowsing]
+OpenViews=bookmarks.desktop
+SingleWidgetMode=true
--- kdebase-3.5.6/konqueror/sidebar/konqsidebartng.upd.rubberband	2005-09-10 10:25:47.000000000 +0200
+++ kdebase-3.5.6/konqueror/sidebar/konqsidebartng.upd	2007-02-08 10:31:45.000000000 +0100
@@ -10,3 +10,15 @@
 
 Id=konqsidebartng_entries
 Script=move_konqsidebartng_entries.sh,sh
+Id=konqsidebartng_rc
+File=konqsidebartng.rc
+Group=<default>,webbrowsing
+Options=Copy
+AllKeys
+Group=<default>,filemanagement
+Options=Copy
+AllKeys
+RemoveGroup=<default>
+
+Id=konqsidebartng_entries
+Script=move_konqsidebartng_entries.sh,sh
--- kdebase-3.5.6/konqueror/sidebar/move_konqsidebartng_entries.sh.rubberband	2005-09-10 10:25:47.000000000 +0200
+++ kdebase-3.5.6/konqueror/sidebar/move_konqsidebartng_entries.sh	2007-02-08 10:31:45.000000000 +0100
@@ -16,3 +16,21 @@
 done
 
 rm -rf $source/entries
+#!/bin/sh
+
+prefix=$(kde-config --localprefix)
+source="$prefix/share/apps/konqsidebartng"
+
+[ -d "$source/entries" ] || exit 0
+
+profiles="filemanagement webbrowsing"
+for profile in $profiles; do
+	dest="$source/$profile/entries"
+	if [ ! -d "$dest" ]; then
+		mkdir -p "$dest" || exit 1
+		cp $source/entries/.version $dest/
+		cp $source/entries/* $dest/
+	fi
+done
+
+rm -rf $source/entries
--- kdebase-3.5.6/konqueror/sidebar/sidebar_widget.cpp.rubberband	2006-05-22 20:12:52.000000000 +0200
+++ kdebase-3.5.6/konqueror/sidebar/sidebar_widget.cpp	2007-02-08 10:31:45.000000000 +0100
@@ -14,6 +14,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
+
 #include <config.h>
 
 #include <limits.h>
@@ -25,6 +26,11 @@
 #include <qwhatsthis.h>
 #include <qlayout.h>
 #include <qstringlist.h>
+#include <qdockwindow.h>
+#include <qlabel.h>
+#include <qtoolbox.h>
+#include <qpainter.h>
+#include <kpushbutton.h>
 
 #include <klocale.h>
 #include <ksimpleconfig.h>