Bug 379402 - Reuse filter settings after adding geolocation information [patch]
Summary: Reuse filter settings after adding geolocation information [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-GeolocationEdit (show other bugs)
Version: 5.6.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-01 10:59 UTC by tuxflo
Modified: 2023-10-22 20:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0


Attachments
Patch to reuse filter settings after using the geolocation editor (4.52 KB, patch)
2017-05-01 10:59 UTC, tuxflo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tuxflo 2017-05-01 10:59:43 UTC
Created attachment 105295 [details]
Patch to reuse filter settings after using the geolocation editor

I'm currently adding geolocations to my complete image library using the following workflow:

-enable filter "Images without coordinates", to see which images don't provide geolocation information
-select images and apply Geotags using the Geolocation-Editor (Ctrl+Shift+G)

With the current version of digiKam there are some small issues with that workflow:

1. In the Geolocation-Editor one always has to press "Apply", then wait for completing the write process to the images, then click "Close"
-> IMHO it is more convenient if the "Apply" function does its work and then closes the dialog to continue processing, otherwise one can press "Cancel" to close the dialog without applying changes

2. After applying the tags to the images they are still visible, even the filter "Images without coordinates" is set
-> the patch adds a signal/slot connection to call the refreshFilter() function so that only the images with the current filter settings are displayed

This is my first contribution to digiKam (and to open source projects in general too) so just tell me if there is something completely wrong :)
Comment 1 caulier.gilles 2017-05-01 11:27:23 UTC
Thanks for you patch. We will review your patch soon...

Gilles Caulier
Comment 2 Simon 2017-05-30 06:27:51 UTC
*** Bug 380328 has been marked as a duplicate of this bug. ***
Comment 3 Andrius 2017-05-30 14:47:46 UTC
I want this. How can I install it?
Comment 4 caulier.gilles 2017-05-30 15:03:24 UTC
wildcowboy,

the patch, as all patch in fact must be applied to source code and whole digiKam recompiled/installed.

This require a complete compilation env, including compiler, linker, and shared libraries.

Under Linux it's not too much complicated. All digiKam dependencies will be available de facto. The list is given here :

https://cgit.kde.org/digikam-software-compilation.git/tree/DEPENDENCIES

The basis to checkout all code is given here :

https://cgit.kde.org/digikam-software-compilation.git/tree/README

As you don't need a developer account to apply a patch (or create one), you can use the read only git repository. So typically it will be simplified as below :

git clone git://anongit.kde.org/digikam-software-compilation.git

.. and later run "download-repos" script.

All the code will be downloaded from git server.

After that you need to configure use the "bootstrap.linux" script and fix unresolved dependencies.

When it's done, go to "build" directory and compile whole code with "make" 
If you have a multicore CPU "make -jxx" with xx the number of CPU to use will reduce a lots the compilation time.

When it's done. apply the patch with the "patch -p1 < blabla.diff" command, in core sub-directory.

Recompile digikam with make in build directory.

Switch as root and run "make install/fast" in "build directory. Now digiKam is installed with patch on your system.
This will overwrite the current version. So i recommend to use a cleaned VM dedicated for that.

Voilà

Gilles Caulier
Comment 5 caulier.gilles 2020-08-02 13:01:45 UTC
tuxflo, 

Ping about to update your patch ? We use Gitlab repository now and patch can be easily create to fork and make Pull Request for future review.

https://invent.kde.org/graphics/digikam

Gilles Caulier
Comment 6 caulier.gilles 2022-01-10 12:51:49 UTC
Hi Tuxflo and happy new year,

Did you read my previous comment #5.

Thanks in advance

Gilles Caulier
Comment 7 tuxflo 2022-01-10 21:07:20 UTC
Hi Gilles!
Yes I saw your comment, but I haven't used digikam for a while now and I'm not up to date with the latest changes. However I really think switching to Gitlab was a very good idea and I will take a look on resubmitting the patch as merge request there.
Comment 8 caulier.gilles 2023-04-21 14:56:16 UTC
@tuxflo

Any update to your patch using gitlab merge request ? 

Thanks in advance

Gilles Caulier
Comment 9 caulier.gilles 2023-10-12 05:53:16 UTC
@tuxflo,

Do you seen my previous comment ?

Gilles Caulier
Comment 10 tuxflo 2023-10-19 13:07:43 UTC
Hi Gilles!
Yes I saw the comment, but I was just too busy to do anything about the patch yet. If there is someone else that is interested in maintaining the patch feel free to adopt it.
My best guess is that I'll have time at the end of the year to do any open source development again.
Comment 11 caulier.gilles 2023-10-19 13:12:02 UTC
Maik,

What do think about this feature? If you are agree, i can update the patch to be compatible with current implementation, as it's not to much intrusive.

Best
Gilles
Comment 12 caulier.gilles 2023-10-19 14:54:09 UTC
Maik,

I take a look to the patch. It based on GeolocationEditor version included in digiKam, not as a plugin. Some code needs adjustment.

Gilles
Comment 13 Maik Qualmann 2023-10-19 17:49:45 UTC
Hi Gilles,

It has been requested several times that the Geolocation Editor is also finished with “Apply”. It's easy to implement. To reload the filter we don't need a signal/slots connection. We have the ImageChangeset, we have a watch flag for it, I'm looking into why it doesn't work.

Maik
Comment 14 Maik Qualmann 2023-10-19 19:49:56 UTC
Git commit 7f4e2265696971d41374d149656aa9865c1e025d by Maik Qualmann.
Committed on 19/10/2023 at 21:49.
Pushed by mqualmann into branch 'master'.

fix update item filter after change item geolocation

M  +1    -0    core/libs/database/models/itemfiltermodel.cpp

https://invent.kde.org/graphics/digikam/-/commit/7f4e2265696971d41374d149656aa9865c1e025d
Comment 15 Maik Qualmann 2023-10-19 20:27:30 UTC
Git commit 930b0d5df0414e259923ff94387843c9ecebf102 by Maik Qualmann.
Committed on 19/10/2023 at 22:26.
Pushed by mqualmann into branch 'master'.

same behavior for the Geolocation Editor as the Metadata Editor
- OK button, save geolocation and close
- Apply button, save geolocation and don't close
- Close Button, ignore all changes and close
- Window close ask the user for save geolocation
FIXED-IN: 8.2.0

M  +29   -1    core/dplugins/generic/metadata/geolocationedit/dialog/geolocationedit.cpp
M  +2    -0    core/dplugins/generic/metadata/geolocationedit/dialog/geolocationedit.h

https://invent.kde.org/graphics/digikam/-/commit/930b0d5df0414e259923ff94387843c9ecebf102
Comment 16 Maik Qualmann 2023-10-19 20:53:18 UTC
Git commit 3eb484deb2307fcdefe2cc157732c0fa25eca0ac by Maik Qualmann.
Committed on 19/10/2023 at 22:52.
Pushed by mqualmann into branch 'master'.

use the cancel button instead of the close button

M  +9    -9    core/dplugins/generic/metadata/geolocationedit/dialog/geolocationedit.cpp
M  +1    -1    core/dplugins/generic/metadata/geolocationedit/dialog/geolocationedit.h

https://invent.kde.org/graphics/digikam/-/commit/3eb484deb2307fcdefe2cc157732c0fa25eca0ac
Comment 17 Maik Qualmann 2023-10-20 06:03:11 UTC
Git commit e2e974f63e72ad3795803b9c0341c0bbafb5f924 by Maik Qualmann.
Committed on 20/10/2023 at 08:02.
Pushed by mqualmann into branch 'master'.

revert to cancel button and ask user for changes

M  +4    -20   core/dplugins/generic/metadata/geolocationedit/dialog/geolocationedit.cpp
M  +0    -1    core/dplugins/generic/metadata/geolocationedit/dialog/geolocationedit.h

https://invent.kde.org/graphics/digikam/-/commit/e2e974f63e72ad3795803b9c0341c0bbafb5f924
Comment 18 tuxflo 2023-10-22 20:39:28 UTC
Thanks Maik for taking care of this.
Really cool to see that you are aware to take a look after bugs that are more than 6 years old.

I really appreciate that.