Bug 87762 - can't single-click to open thumbnails
Summary: can't single-click to open thumbnails
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-Image (show other bugs)
Version: 0.6.2
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-22 17:28 UTC by rfc469
Modified: 2017-07-14 04:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rfc469 2004-08-22 17:28:12 UTC
Version:           0.6.2 (using KDE KDE 3.2.3)
Installed from:    Gentoo Packages

I have to double-click to open thumbnails.  It would be nice to be able to single-click.  Possibly digikam could use the same KDE setting for opening files and folders (which I have set to single-click).  Thanks.
Comment 1 Joern Ahrens 2004-11-29 00:43:30 UTC
CVS commit by jahrens: 

digiKam respects the global kde configuration now:
- single/double click to open an image in the image editor
- change the cursor if it is over an item
- visual feedback if an item is opened in the image editor

These things can be configured in kcontrol (Peripherals->Mouse)
BUG: 87762
CCMAIL: joern.ahrens@kdemail.net


  M +15 -1     albumfolderview.cpp   1.64
  M +6 -3      albumiconview.cpp   1.104
  M +1 -1      albumiconview.h   1.33
  M +52 -26    thumbview.cpp   1.24
  M +2 -1      thumbview.h   1.9


--- kdeextragear-3/digikam/digikam/albumfolderview.cpp  #1.63:1.64
@@ -57,4 +57,6 @@
 #include <kstandarddirs.h>
 #include <kurl.h>
+#include <kglobalsettings.h>
+#include <kcursor.h>
 
 #include <kdeversion.h>
@@ -95,4 +97,5 @@ AlbumFolderView::AlbumFolderView(QWidget
     setAcceptDrops(true);
     viewport()->setAcceptDrops(true);
+    viewport()->setMouseTracking(true);
 
     dropTarget_     = 0;
@@ -1277,6 +1280,17 @@ void AlbumFolderView::contentsMouseMoveE
     if( !e ) return;
 
+    ListItem* item = itemAt(e->pos());
+
     if( e->state() == NoButton )
+    {
+        if(KGlobalSettings::changeCursorOverIcon())
+        {
+            if(item)
+                setCursor(KCursor::handCursor());
+            else
+                unsetCursor();
+        }
         return;
+    }
 
     // Dragging ?

--- kdeextragear-3/digikam/digikam/albumiconview.cpp  #1.103:1.104
@@ -67,4 +67,5 @@
 #include <kstandarddirs.h>
 #include <kdebug.h>
+#include <kiconeffect.h>
 
 #include <kdeversion.h>
@@ -833,9 +834,11 @@ void AlbumIconView::slotFilesModified(co
 void AlbumIconView::slotDisplayItem(AlbumIconItem *item )
 {
+    if (!item) return;
+    
     AlbumSettings *settings = AlbumSettings::instance();
 
     if (!settings) return;
 
-    if (!item) return;
+    KIconEffect::visualActivate(viewport(), contentsRectToViewport(item->rect()));
 
     QString currentFileExtension =

--- kdeextragear-3/digikam/digikam/thumbview.cpp  #1.23:1.24
@@ -16,4 +16,6 @@
 
 #include <kdebug.h>
+#include <kcursor.h>
+#include <kglobalsettings.h>
 
 #include <stdlib.h>
@@ -103,4 +105,5 @@ ThumbView::ThumbView(QWidget* parent, co
     viewport()->setFocusProxy(this);
     viewport()->setFocusPolicy(QWidget::WheelFocus);
+    viewport()->setMouseTracking(true);
 
     renamingItem = 0;
@@ -339,5 +342,5 @@ void ThumbView::sort()
 void ThumbView::setEnableToolTips(bool val)
 {
-    viewport()->setMouseTracking(val);
+    d->showTips = val;
     if (!val) {
         d->toolTipItem = 0;
@@ -757,4 +760,8 @@ void ThumbView::contentsMouseMoveEvent(Q
     if (e->state() == NoButton )
     {
+        ThumbItem* item = findItem(e->pos());
+        
+        if(d->showTips)
+        {
         if (!isActiveWindow())
         {
@@ -765,5 +772,4 @@ void ThumbView::contentsMouseMoveEvent(Q
         }
         
-        ThumbItem* item = findItem(e->pos());
         if (item != d->toolTipItem)
         {
@@ -774,4 +780,13 @@ void ThumbView::contentsMouseMoveEvent(Q
             d->toolTipTimer->start(500, true);
         }
+        }
+                
+        if(KGlobalSettings::changeCursorOverIcon())
+        {
+            if(item)
+                setCursor(KCursor::handCursor());
+            else
+                unsetCursor();
+        }
         return;
     }
@@ -916,14 +929,28 @@ void ThumbView::contentsMouseReleaseEven
         ThumbItem *item = findItem(e->pos());
         if (item)
+        {
             item->setSelected(true, true);
+            if(KGlobalSettings::singleClick())
+                itemClickedToOpen(item);
+        }
     }
-
-    
 }
 
 void ThumbView::contentsMouseDoubleClickEvent(QMouseEvent *e)
 {
+    if(KGlobalSettings::singleClick())
+        return;
+    
     ThumbItem *item = findItem(e->pos());
     if (item) {
+        itemClickedToOpen(item);
+    }
+}
+
+void ThumbView::itemClickedToOpen(ThumbItem *item)
+{
+    if(!item)
+        return;
+    
         blockSignals(true);
         clearSelection();
@@ -933,5 +960,4 @@ void ThumbView::contentsMouseDoubleClick
         item->setSelected(true);
         emit signalDoubleClicked(item);
-    }
 }
 

--- kdeextragear-3/digikam/digikam/thumbview.h  #1.8:1.9
@@ -91,4 +91,5 @@ private:
     void deleteContainers();
     void keySelectItem(ThumbItem* item, bool shift);
+    void itemClickedToOpen(ThumbItem *item);
 
 private: