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

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdebase/kdesktop
From:       Waldo Bastian <bastian () kde ! org>
Date:       2003-05-06 12:18:41
[Download RAW message or body]

CVS commit by waba: 

1) Unselects all icons when kdesktop looses focus
2) <Enter> only does something if the icon is actually highlighted (t.i.
selected)
(BR36577)


  M +11 -0     desktop.cc   1.261.2.4
  M +2 -0      desktop.h   1.118.4.1
  M +1 -1      kdiconview.cc   1.66.2.4


--- kdebase/kdesktop/desktop.cc  #1.261.2.3:1.261.2.4
@@ -32,4 +32,5 @@
 
 #include <qdir.h>
+#include <qevent.h>
 
 #include <netwm.h>
@@ -747,4 +748,14 @@ void KDesktop::setIconsEnabled( bool ena
         m_show_iconview = true;
     configure();
+}
+
+bool KDesktop::event(QEvent * e)
+{
+    if ( e->type() == QEvent::WindowDeactivate)
+    {
+        if (m_pIconView)
+            m_pIconView->clearSelection();
+    }
+    return QWidget::event(e);
 }
 

--- kdebase/kdesktop/desktop.h  #1.118:1.118.4.1
@@ -138,4 +138,6 @@ protected:
   virtual void setIconsEnabled( bool enable );
 
+  virtual bool event ( QEvent * e );
+
 private:
 

--- kdebase/kdesktop/kdiconview.cc  #1.66.2.3:1.66.2.4
@@ -455,5 +455,5 @@ void KDIconView::slotReturnPressed( QIco
     kapp->propagateSessionManager();
     m_lastDeletedIconPos = QPoint(); // user action -> not renaming an icon
-    if (item) {
+    if (item && item->isSelected()) {
         visualActivate(item);
         ((KFileIVI*)item)->returnPressed();


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

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