Bug 140412

Summary: Comments/Tags sidebar steels focus
Product: digikam Reporter: Caspar Maessen <cmaessen>
Component: Usability-ErgonomyAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.1

Description Caspar Maessen 2007-01-21 23:30:16 UTC
Version:           0.9.1-svn (using KDE 3.5.5 "release 50.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.18.2-34-default

When in albumview (thumbnails) opening the Comments/Tags sidebar, the Comments edit-field steels focus. This results in unexpected behavior of keys and keycombinations like up/down/left/right; delete; <ctrl>+<A>; <shift>+<delete>. I suggest to leave the focus on the main windowpane, and only let the comments edit-field get focus when specifically selected by clicking it. This at least is the behavior I would expect.

Caspar.
Comment 1 caulier.gilles 2007-01-31 16:11:20 UTC
SVN commit 628812 by cgilles:

digikam from trunk : forcing focus to Comments Edit Widget from Comments & Tags sidebar is not the right solution. Focus stuff  is a complicated problem witch must be study indeep.

In fact the folder view and album icon view take the focus with the mouse. The previous implementation cannot work with that. Also, alots of menu shorcuts are broken if we force Comments edit widget to take focus.

My viewpoint is to implement a shortcut to toggle gui to captionning mode. It a better/simple solution. Please give me your viewpoint.

CCBUGS: 131632, 131743

BUG: 140412

 M  +0 -9      imagedescedittab.cpp  
 M  +0 -1      imagedescedittab.h  
 M  +0 -16     imagepropertiessidebardb.cpp  
 M  +0 -1      imagepropertiessidebardb.h  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #628811:628812
@@ -265,7 +265,6 @@
     d->dateTimeEdit->installEventFilter(this);
     d->ratingWidget->installEventFilter(this);
     d->tagsView->installEventFilter(this);
-    setFocusToComments(true);
     updateRecentTags();
 
     // Connect to album manager -----------------------------
@@ -588,14 +587,6 @@
     d->revertBtn->setEnabled(true);
 }
 
-void ImageDescEditTab::setFocusToComments(bool f)
-{
-    if (f)
-        d->commentsEdit->setFocus();
-    else
-        d->commentsEdit->clearFocus();
-}
-
 void ImageDescEditTab::assignRating(int rating)
 {
     d->ratingWidget->setRating(rating);
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.h #628811:628812
@@ -59,7 +59,6 @@
     void setItem(ImageInfo *info=0);
     void setItems(QPtrList<ImageInfo> infos);
     void populateTags();
-    void setFocusToComments(bool f);
 
 signals:
 
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.cpp #628811:628812
@@ -98,9 +98,6 @@
     connectTab(m_colorTab);
     connectTab(d->desceditTab);
 
-    connect(this, SIGNAL(signalViewChanged()),
-            this, SLOT(slotSetFocus()));
-
     connect(this, SIGNAL(signalChangedTab(QWidget*)),
             this, SLOT(slotChangedTab(QWidget*)));
 
@@ -360,22 +357,9 @@
         }
     }
 
-    slotSetFocus();
-
     unsetCursor();
 }
 
-void ImagePropertiesSideBarDB::slotSetFocus()
-{
-    // See B.K.O #131632 and #131743 : always give focus to Comments widget 
-    // when we toogle between tab and when we change current item.
-
-    if (getActiveTab() == d->desceditTab && isExpanded())
-        d->desceditTab->setFocusToComments(true);
-    else
-        d->desceditTab->setFocusToComments(false);
-}
-
 void ImagePropertiesSideBarDB::slotFileMetadataChanged(const KURL &url)
 {
     if (url == m_currentURL)
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.h #628811:628812
@@ -95,7 +95,6 @@
 
 private slots:
 
-    void slotSetFocus();
     void slotChangedTab(QWidget* tab);
     void slotThemeChanged();
     void slotFileMetadataChanged(const KURL &url);
Comment 2 Caspar Maessen 2007-01-31 19:37:31 UTC
Op woensdag 31 januari 2007, schreef Gilles Caulier:
  > digikam from trunk : forcing focus to Comments Edit Widget from
  > Comments & Tags sidebar is not the right solution. Focus stuff  is

Ehhh? In fact, my complaint is that in the current implementation focus 
is forced to the comments edit widget.

  > In fact the folder view and album icon view take the focus with the
  > mouse.

The opposite is true right now. One would expect that the part of the 
window which is last clicked by the user gets the focus until clicked 
elsewhere. At the moment clicking in the folder or album view does 
select a folder or a picture, but immediatly focus returns to the 
comments edit widget. 

  > alots of menu shorcuts are broken if we force Comments edit widget
  > to take focus.
  >
  > My viewpoint is to implement a shortcut to toggle gui to
  > captionning mode. It a better/simple solution. Please give me your
  > viewpoint.

I am not quite sure what you mean. But I'm not in favor off an extra 
keystroke or menuselection to toggle the sidebar in and out of editing 
mode.

Caspar.
Comment 3 caulier.gilles 2007-01-31 19:49:17 UTC
Caspar, 

>Ehhh? In fact, my complaint is that in the current implementation focus 
> is forced to the comments edit widget. 

I have reverted the code. It work like 0.9.0.

>The opposite is true right now. One would expect that the part of the 
> window which is last clicked by the user gets the focus until clicked 
> elsewhere. 

...but look my comments. my first solution cannot be implemented properlly because the focus is unset from Edit widget by mouse move over Icon view or album tree view. We need to found another solution.

> alots of menu shorcuts are broken if we force Comments edit widget 
> to take focus. 

The comment Edit widget use shorcuts too. when he have the focus, a lots of shorcuts from GUI are disabled and remplaced by these one.

Gilles
Comment 4 Caspar Maessen 2007-01-31 20:40:06 UTC
Op woensdag 31 januari 2007, schreef Gilles Caulier:
  > I have reverted the code. It work like 0.9.0.

I downloaded and compiled latest svn-version. OK! 
Sorry for my premature reaction. This indeed is what I meant. It gives a 
more consistent and therefore natural way of navigating through the 
digiKam windows. Thanks.

Caspar.