Bug 495722 - Assigning rating via keyboard shortcut doesnt work as expected (toggling vs assigning rating)
Summary: Assigning rating via keyboard shortcut doesnt work as expected (toggling vs a...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Keyboard (show other bugs)
Version: 8.4.0
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-02 14:18 UTC by Michael Fuchs
Modified: 2024-11-27 06:33 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Fuchs 2024-11-02 14:18:28 UTC
To me assigning rating via keyboard shortcut (Ctrl+<1..5>) doesnt work as expected and I can't get myself used to the default behaviour.

I would expect pressing Ctrl+1 assigning 1 star rating to the image and not toggling it.

I guess it'S intended to behave like this, so I'm asking this to be configureabel.

One way to achieve this would be creating an additional action, which actually *assigns* the rating.

- rename the current action to "Toggle Rating "n Star" "
- add a new action "Assign Rating "n Star" "

Which leads me to the second issue:

IMO the current name of the action (Assign Rating "n Star") is misleading as it actually toggles the rating.

But I guess it's not a good idea to rename it, because it's mentioned in the documentation.

If somebody could give me a hint, where to find the code, I'll try to provide a PR.
Comment 1 caulier.gilles 2024-11-02 16:16:09 UTC
Which digiKam version ?
Comment 2 caulier.gilles 2024-11-02 16:16:31 UTC
Which Operating system ?
Comment 3 Maik Qualmann 2024-11-02 16:27:23 UTC
Personally, I think this behavior is good, probably because I've been used to it for years. Otherwise there would have to be an additional key function to delete ratings. In principle, setting with the mouse is also a toggle function.

Maik
Comment 4 Michael Fuchs 2024-11-02 16:37:27 UTC
> Otherwise there would have to be an additional key function to delete ratings.

Isn't this already Ctrl+0?
Comment 5 Michael Fuchs 2024-11-04 13:48:00 UTC
Ok, I found the code and there are several ways to enhance it. I will provide some PRs. 

But I didn't manage to compile digikam on Arch Linux yet.
Comment 6 caulier.gilles 2024-11-04 14:04:27 UTC
Hi Michael,

For Ubuntu, not Arch, a script to install all dependencies exists, if it can help :

https://invent.kde.org/graphics/digikam/-/blob/master/project/scripts/installdeps-ubuntu.sh?ref_type=heads

It use all system dependencies.

Another scripts in github that i written for Ubuntu, install system based dependencies too, but compile and install all the most important, eg KDE frameworks 6, Qt6, etc :

https://github.com/cgilles/digikam-install-deps

For this one, the compiled dependencies are placed in /opt.

Best.

Gilles Caulier
Comment 7 Michael Fuchs 2024-11-05 09:34:06 UTC
Thank you. For now I'm still trying to just rebuild the original package. I downloaded the PKGBUILD and compiled it in a clean chroot with `pkgctl build` but I get an error which seems odd to me:

> [  7%] Building CXX object core/libs/database/CMakeFiles/digikamdatabase_obj.dir/coredb/coredburl.cpp.o
> /build/digikam/src/digikam-8.4.0/core/libs/database/coredb/coredburl.cpp: In member function ‘bool Digikam::CoreDbUrl::operator==(const QUrl&) const’:
> /build/digikam/src/digikam-8.4.0/core/libs/database/coredb/coredburl.cpp:251:19: error: ‘operator==’ is not a member of ‘QUrl’
>   251 |     return (QUrl::operator==(digikamalbumsUrl));
>       |                   ^~~~~~~~~~
> make[2]: *** [core/libs/database/CMakeFiles/digikamdatabase_obj.dir/build.make:404: core/libs/database/CMakeFiles/digikamdatabase_obj.dir/coredb/coredburl.cpp.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:6998: core/libs/database/CMakeFiles/digikamdatabase_obj.dir/all] Error 2
> make: *** [Makefile:136: all] Error 2

Anyway, as this isn't about this bug i'll ask for help in arch forums.
I can still setup a VM (or WSL) with ubuntu and use your scripts.
Comment 8 caulier.gilles 2024-11-05 09:38:47 UTC
This is a problem introduced with Qt 6.8.0 that i fixed in git master code (next 8.5.0). Look my commit:

https://invent.kde.org/graphics/digikam/-/commit/a8b49ed8df676cae0f48b3369831edde2b74903e

I think there is another one somewhere in the whole digiKam code about this QUrl API problem

Best

Gilles Caulier
Comment 9 Michael Fuchs 2024-11-05 11:51:50 UTC
Ok, thanks again. The git master code compiles now with the instructions in PKGBUILD.
Comment 10 caulier.gilles 2024-11-05 11:55:44 UTC
Cool, 

Well we wait your MR... (:=))

Gilles
Comment 11 Michael Fuchs 2024-11-08 15:48:00 UTC
I just can't get this thing running.

Release 8.4. doesn't compile on Arch. Master HEAD compiles but crashes at startup. I tried setting up an ubuntu WSL on a windows machine, but the scripts Gilles provided fail at some point.

I gues I'll just wait for the next release on Arch, coz then it should be easy to recompile it with my patches.
Comment 12 caulier.gilles 2024-11-08 15:52:54 UTC
I experienced WSL under Windows, and it's a waste of time. Uses a VM instead (here VirtualBox)...

Gilles
Comment 13 Maik Qualmann 2024-11-26 18:13:51 UTC
Git commit 00a3ddd2e9dcd14eba45a4d5af63f8e355b8ccb3 by Maik Qualmann.
Committed on 26/11/2024 at 18:12.
Pushed by mqualmann into branch 'master'.

polish merge request #324
FIXED-IN: 8.6.0

M  +1    -1    NEWS
M  +3    -4    core/app/views/stack/itemiconview.h
M  +8    -14   core/app/views/stack/itemiconview_tags.cpp
M  +21   -11   core/libs/tags/engine/tagsactionmngr.cpp

https://invent.kde.org/graphics/digikam/-/commit/00a3ddd2e9dcd14eba45a4d5af63f8e355b8ccb3
Comment 14 Michael Fuchs 2024-11-27 06:33:08 UTC
Thank you very much!