Bug 313855

Summary: Use single/double click setting from KDE control center to leave media player mode
Product: [Applications] digikam Reporter: Stas <stas.kazmin>
Component: Preview-ImageAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: caulier.gilles
Priority: NOR    
Version: 3.0.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.4.0

Description Stas 2013-01-24 23:33:26 UTC
This function was in a previous release (do not know exactly what version it was) but now to go back to the thumbnails screen you have to push the button in the pannel or use a shortcut.

I think it is a vary often used porcess that you look at one photo ans than want to gou back to the list.

So it would be helpful to make this going back as easy as possible.

Thanks.

Reproducible: Always
Comment 1 Marcel Wiesweg 2013-01-25 11:26:33 UTC
Works quite well for me here, single click on thumbnail for preview, single click on preview to go back.
Comment 2 Stas 2013-01-25 11:55:23 UTC
Ok, I have tested it, the function works, if you have single click set up for you mouse.

But with double click the function does not work, so I have changed the request from wishlist to minor bug.
Comment 3 caulier.gilles 2014-08-29 22:01:46 UTC
Here single click and double click do not work using digiKam 4.3.0.

I vote to have only double click for this feature.

Gilles Caulier
Comment 4 caulier.gilles 2014-09-05 22:14:49 UTC
Git commit 7fe6f23e77119992f2b5827fd993aa450c769b00 by Gilles Caulier.
Committed on 05/09/2014 at 22:13.
Pushed by cgilles into branch 'master'.

Restore double click over preview canvas to escape from preview mode
FIXED-IN: 4.3.0

M  +2    -1    NEWS
M  +1    -1    digikam/views/imagepreviewview.cpp
M  +2    -2    libs/widgets/graphicsview/graphicsdimgview.cpp
M  +1    -1    utilities/importui/views/importpreviewview.cpp

http://commits.kde.org/digikam/7fe6f23e77119992f2b5827fd993aa450c769b00
Comment 5 caulier.gilles 2014-09-06 08:18:44 UTC
Git commit fb3ddfcdf417066f2d3a2a61510e66efa34da22b by Gilles Caulier.
Committed on 06/09/2014 at 08:16.
Pushed by cgilles into branch 'master'.

Use also Double mouse click to escape vfrom video preview mode.
drop Escape preview button from preview mode toolbar. User can simple out frompreview with double click or to press ESC key.
User can also switch mode using main toolbar buttons.

M  +2    -10   digikam/views/imagepreviewview.cpp
M  +1    -8    digikam/views/mediaplayerview.cpp

http://commits.kde.org/digikam/fb3ddfcdf417066f2d3a2a61510e66efa34da22b
Comment 6 Marcel Wiesweg 2014-09-14 17:43:30 UTC
I now stumbled over this change as it broke my years-old digikam work flow to have single click back and forth to between view modes. Anyone else with the same feeling?

As it is now I find it irritating to have nothing done by single click. I saw some people use digikam and expect to go to the next picture by single click. That would integrate with the double-click-to-go-back mode.

Hm. Another option for my pet click mode?
Comment 7 caulier.gilles 2014-09-14 19:35:53 UTC
MArcel,

Do you seen my comment #3 ? Here Simple click over canvas do nothing. This is why i thinking to connect double click action to go back in icon-view.

Gilles
Comment 8 Marcel Wiesweg 2014-09-15 18:11:21 UTC
Yes, I saw your comment. I agree that having double click is better than no sort of mouse click to go back. Of course, I always thought it worked everywhere as nicely as it did for me (click to view a photo, click to go back to icon view, ...)
Have you configured using Double Click in KDE, to open files etc?
Comment 9 caulier.gilles 2014-09-15 20:32:24 UTC
>Have you configured using Double Click in KDE, to open files etc?

Not yet. I must found how to check with KDE control panel settings to get this information.
Wraping this config will be easy to manage in all cases i think.

Gilles
Comment 10 caulier.gilles 2014-09-27 09:08:49 UTC
MArcel,

I tried to check again simple/double click set in KDE control centrer.

I reverted here this commit :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/7fe6f23e77119992f2b5827fd993aa450c769b00/diff/digikam/views/imagepreviewview.cpp

In KDE control center (KDE 4.11.4)  :

- Mouse Simple click : preview cannot go back to icon view with simple or double click on right mouse button.
- - Mouse Double click : preview cannot go back to icon view with simple or double click on right mouse button.

With my preview commit, we can go back in all cases in icon view with double click. As simple click is used to pan canvas, it's more logic by default to use double click.

So i can confirm : to go back in icon-view with previous implementation is not possible and doesn't work. My commit is justified to restore this functionality.

Q: Which settings do you use on your computer exactly to have back to icon-view feature working with simple click ?

Gilles

Q : how do
Comment 11 caulier.gilles 2014-09-27 09:29:17 UTC
Marcel,

To look in code we have these methods in preview canvas :

1/ To handle double click event and emit signals :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/widgets/graphicsview/graphicsdimgview.cpp#L205

2/ To handle simple click event and emit signals :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/widgets/graphicsview/graphicsdimgview.cpp#L278

In both the famous signal used in previous implementation to go back in icon-view was activated() must be fire, but here it never appear.

Note : 

in 1/, activated() emit respect double click settings from KDE control center.
in 2/, activated() emit respect single click settings from KDE control center. There is 1 condition to emit signal : no panning in progress.

Gilles
Comment 12 Marcel Wiesweg 2014-09-28 16:49:46 UTC
No magic here: When I single click on the preview, activated() is emitted (breakpoint on line 284 stops). KGlobalSettings::singleClick() is true.
Comment 13 caulier.gilles 2014-10-01 15:04:04 UTC
Marcel, 

i checked again, to clean up whole compilation, and now the dysfunction cannot be reproduced... I don't know why.

Reverting my previous commits, mouse double or single click behavior from KDE control center work fine, excepted with MediaPlayer view.

Gilles
Comment 14 caulier.gilles 2014-10-01 15:04:15 UTC
Git commit f502634ca7a318d66f2d8c2a32470ed067874e67 by Gilles Caulier.
Committed on 01/10/2014 at 15:00.
Pushed by cgilles into branch 'master'.

Revert double click event only handling to go back from preview mode.
Implement test of KDE control setting about mouse single/double press button to go back from mediaplyer view.
FIXED-IN 4.4.0

M  +2    -1    app/views/imagepreviewview.cpp
M  +3    -1    app/views/mediaplayerview.cpp
M  +1    -1    utilities/importui/views/importpreviewview.cpp

http://commits.kde.org/digikam/f502634ca7a318d66f2d8c2a32470ed067874e67