Bug 158791 - Multi-select tags (i.e. to delete more than one at a time)
Summary: Multi-select tags (i.e. to delete more than one at a time)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Engine (show other bugs)
Version: 3.0.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-05 11:56 UTC by Adam Porter
Modified: 2013-11-06 19:04 UTC (History)
7 users (show)

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


Attachments
allow multiple tag removal (11.50 KB, patch)
2008-08-09 15:01 UTC, Andi Clemens
Details
complete patch #1 (49.10 KB, patch)
2008-08-09 21:06 UTC, Andi Clemens
Details
complete patch #2 (48.79 KB, patch)
2008-08-09 21:17 UTC, Andi Clemens
Details
updated patch (30.35 KB, patch)
2008-12-06 06:43 UTC, Andi Clemens
Details
icon view drag & drop pop up menu problem (189.91 KB, image/png)
2008-12-09 12:34 UTC, caulier.gilles
Details
How this is possible ? There is no tag selected... (147.70 KB, image/png)
2008-12-09 13:02 UTC, caulier.gilles
Details
new patch with d&d (58.55 KB, patch)
2008-12-12 11:27 UTC, Andi Clemens
Details
mylyn/context/zip (23.56 KB, application/octet-stream)
2008-12-12 11:27 UTC, Andi Clemens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Porter 2008-03-05 11:56:03 UTC
Version:            (using KDE 3.5.9)
Installed from:    Ubuntu Packages0

You should be able to select more than one tag in the sidebars (I don't just mean being able to check more than one checkbox in the Tag Filter sidebar).

After copying some images into my Digikam repository folder and restarting Digikam, it read some IPTC keywords from an image that was practically spammed with them, and it added all of them to my list of tags.  Now I have to delete them...one...by...one.  If only I could select more than one tag, then I could delete all of them at once!  But alas...  :(
Comment 1 Andi Clemens 2008-08-09 13:53:48 UTC
Currently I'm working on a patch for deleting multiple tags, because yesterday it bothered me again :-)
Someone gave me a lot of images from a wedding and they were all tagged. Nearly 50 tags were unusable for me so I need to remove them. But not being able to select all of them brought me to the conclusion that a patch is needed for that :-)
It works nearly fine, I have a problem when a subtag and its parent is selected, removing in this situation will kill digiKam (null pointer issue), I need to make sure that this special case is detected before publishing the patch.
Also drag&drop must be handled...
I'll post the patch later so we can discuss it... Gilles, Marcel, Arnd etc... what do yo think?
This one is a really needed feature... it is so annoying to delete / move tags one by one...
Comment 2 Andi Clemens 2008-08-09 15:01:56 UTC
Created attachment 26754 [details]
allow multiple tag removal

This patch will allow the removal of multiple tags.
Currently it is only implemented in the tagfolderview (left sidebar) and
drag&drop is missing (only works on the tag under the mouse cursor). But in
general deleting works fine.
So if you want to test the patch, please do so and post your comments in here.

Andi
Comment 3 Andi Clemens 2008-08-09 15:03:58 UTC
Just wanted to make sure that the above patch is for the KDE3 branch...
Comment 4 Andi Clemens 2008-08-09 21:06:25 UTC
Created attachment 26760 [details]
complete patch #1

This patch will allow multiple removal of tags in TagFolderView (left sidebar),
TagFilterView and Captions/Tags View (both right sidebar).
Drag&Drop is not implemented, first of all I'd like to hear what you think of
it.

Andi
Comment 5 Andi Clemens 2008-08-09 21:17:17 UTC
Created attachment 26761 [details]
complete patch #2

Sorry, uploaded an older patch. This is the right one...
Comment 6 caulier.gilles 2008-08-10 11:03:15 UTC
Thanks Andi,

I'm currently busy at Akademy2008, to meet and discut we KDE developpers (as Laurent Montel for ex.)

So, i will try to review your patches soon.

Gilles
Comment 7 Andi Clemens 2008-12-06 06:43:29 UTC
Created attachment 29083 [details]
updated patch

updated to compile with latest KDE3 source
Comment 8 caulier.gilles 2008-12-06 07:52:44 UTC
Andi,

It's in my TODO list. thanks

Gilles
Comment 9 caulier.gilles 2008-12-09 11:56:27 UTC
Andi,

Your patch is very big. I'm not sure if it's a good idea to apply it to KDE3 branch.

I don't have tested patch, only check code.

It's not better to included it to KDE4 ?

Gilles Caulier
Comment 10 Andi Clemens 2008-12-09 12:19:33 UTC
The question is, how far we will go with the model-view concept. If folderview, iconview etc is replaced, I don't even know if this patch is useful at all. Maybe there will be totally new code replacing all those things.

I just had created it for KDE3, because we will not change the folderview in there, and the patch might be helpful if people want to remove multiple tags in KDE3.
I usually apply my patch if I need it, remove tags, and remove the patch again.

In KDE4 we might not need this patch... but right now I don't know what will and can be done with the modelview concept.

Andi
Comment 11 caulier.gilles 2008-12-09 12:25:38 UTC
If patch is applied to KDE3, it must be done also to KDE4 (0.10.0) to sync version.

Yes, multiselection will be relevant of future Model/view, but 80% of your patch will still valid or copy/paste in a refactored implementation. For me nothing will be lost if KDE4 is patched in this way.

Ok, I'm testing patch right now under KDE3...

Gillles
Comment 12 caulier.gilles 2008-12-09 12:34:59 UTC
Created attachment 29170 [details]
icon view drag & drop pop up menu problem

When more than on tags are dropped to icon view, pop-up menu only show one tag to apply

Gilles Caulier
Comment 13 caulier.gilles 2008-12-09 12:42:15 UTC
Other problem, but certainly more complex to solve: go to tags folder view and select more than one tags => on icon view we can only see contents of first tags selected, not others.

Gilles
Comment 14 caulier.gilles 2008-12-09 12:43:39 UTC
Mik,

This patch is a big improvements, but can have serious side effects.

It will be great to have your viewpoint here. Your experience is always welcome (:=)))

Gilles
Comment 15 caulier.gilles 2008-12-09 12:48:58 UTC
Andi,

Another little problem 

1/ Select more than one tags from Tags folder view
2/ drag and drop selection to Caption & Tags to perform tags move
3/ See as only first tag selected is moved. All others are ignored.

Note this dysfunction is true also when you drag and drop tags on the same tags folder view.

Gilles
Comment 16 Andi Clemens 2008-12-09 12:51:13 UTC
Well the patch was just made to delete multiple tags, it can be improved for sure. I did deleting only because this was the main interest in the original bugreport.

Andi
Comment 17 caulier.gilles 2008-12-09 12:53:41 UTC
Andi,

Yes, but to enable multiple-selection of tags have a lots of side effects (:=)))

Gilles
Comment 18 Andi Clemens 2008-12-09 12:54:08 UTC
Sure ;-)
Comment 19 caulier.gilles 2008-12-09 13:02:03 UTC
Created attachment 29174 [details]
How this is possible ? There is no tag selected...
Comment 20 caulier.gilles 2008-12-09 13:06:29 UTC
Andi,

Another D&D stuff :

1/ Open Light Table
2/ Go to Tags Folder View
3/ Select more than one tag
4/ D&D selection to Light table thumbbar

==> only items from first selected tag are dropped

Gilles
Comment 21 Andi Clemens 2008-12-09 13:10:33 UTC
Yes, yes... :-)
I'm trying to improve it... it was a quickfix for myself at this time, and not well tested...

Andi
Comment 22 caulier.gilles 2008-12-09 13:14:45 UTC
Andi,

In KDE3 and KDE4, there is an container of tags to play with D&D :

http://lxr.kde.org/source/extragear/graphics/digikam/digikam/ddragobjects.h#115

Gilles
Comment 23 Mikolaj Machowski 2008-12-09 23:15:27 UTC
Some thoughts about patch:

1. Nice thing when deleting items is giving in dialog number of selected items. "Do you want to delete 2 tags?" - last chance to see how many items were selected and if there is something wrong with that.
2. When selecting multiple tags in left panel would be good to achieve OR effect similar to that of right panel. Or maybe try AND? Now after selecting several tags in left panel I see images affected by last selected tag - not intuitive. Without much refinement I would vote for disabling of multiple tags in left panel.
3. When deleting tags in right panel I am not asked about possibly orphaned tags.
4. IMO good option for selected multiple tags would be merging of them. It also helps in management without losing some info. For example I got CD with photos from some event with strange tags. I select all tags use option 'Merge tags' get question about name of new tag and have all photos with common tag understable for me - and I don't have to hunt those images in various folders to tag them later.
5. When deleting tags from left panel with orphaned tag (also deleted of course) I got unnecessary question for that tag 'You want to remove tag with one photo. Do you want to continue?". This question is redundant. I already agreed to remove all orphaned tags.
Comment 24 Andi Clemens 2008-12-12 01:35:37 UTC
(In reply to comment #20)
> Andi,
> 
> Another D&D stuff :
> 
> 1/ Open Light Table
> 2/ Go to Tags Folder View
> 3/ Select more than one tag
> 4/ D&D selection to Light table thumbbar
> 
> ==> only items from first selected tag are dropped
> 
> Gilles

Gilles,

this doesn't even work with a single Tag here on my system, the D&D symbol looks as though something will happen (drop is allowed), but no tag is assigned.
So it also doesn't work with multiple tags of course.

(In reply to comment #13)
> Other problem, but certainly more complex to solve: go to tags folder view and
> select more than one tags => on icon view we can only see contents of first tags
> selected, not others.
> 
> Gilles

Yes this seems to be more complex. Right now all other points you mentioned should be fixed.
I will go through Mik's list and try to fix some points mentioned in there. Guess I will upload an updated patch tomorrow.

Andi
Comment 25 Andi Clemens 2008-12-12 10:00:40 UTC
(In reply to comment #23)
> Some thoughts about patch:
> 
> 1. Nice thing when deleting items is giving in dialog number of selected items.
> "Do you want to delete 2 tags?" - last chance to see how many items were
> selected and if there is something wrong with that.

done

> 2. When selecting multiple tags in left panel would be good to achieve OR effect
> similar to that of right panel. Or maybe try AND? Now after selecting several
> tags in left panel I see images affected by last selected tag - not intuitive.
> Without much refinement I would vote for disabling of multiple tags in left
> panel.

I don't quite understand. Do you mean that when multiple tags are selected, the iconview should display all the images with those tags? Like Gilles mentioned in comment #13?

> 3. When deleting tags in right panel I am not asked about possibly orphaned
> tags.

Works fine here... but maybe due to the new patch.

> 4. IMO good option for selected multiple tags would be merging of them. It also
> helps in management without losing some info. For example I got CD with photos
> from some event with strange tags. I select all tags use option 'Merge tags' get
> question about name of new tag and have all photos with common tag understable
> for me - and I don't have to hunt those images in various folders to tag them
> later.

I mark this as wish for now.

> 5. When deleting tags from left panel with orphaned tag (also deleted of course)
> I got unnecessary question for that tag 'You want to remove tag with one photo.
> Do you want to continue?". This question is redundant. I already agreed to
> remove all orphaned tags.

This is the standard behavior, it has nothing to do with the patch (if I understood you correct :-))
If you delete a tag in current implementation with a subtag, it will ask if you want to continue and then ask again if you want to delete the tag.
But sure this is somehow redundant.

Andi
Comment 26 Andi Clemens 2008-12-12 11:27:49 UTC
Created attachment 29263 [details]
new patch with d&d

This patch should solve most of the issues filed in the bugreport.
But there is problem with the mainmenu now:

When you select multiple tags in TagFolderView, the menu entry still reads "Delete Tag". But even worse, when you select one tag in TagFilterView for example and go to the menu "Tag->Delete Tag", it still wants to delete the multiple tags selected in TagFolderView.
This is a general problem I think, how is the user supposed to know that the menu entry is working on the TagFolderView and not on the TagFilterView?

Andi
Comment 27 Andi Clemens 2008-12-12 11:27:51 UTC
Created attachment 29264 [details]
mylyn/context/zip
Comment 28 Andi Clemens 2008-12-12 11:28:35 UTC
Oh my MyLyn context is attached, too... hm well... :-)
Comment 29 Mikolaj Machowski 2008-12-13 17:11:18 UTC
(In reply to comment #25)
> I don't quite understand. Do you mean that when multiple tags are 
> selected, the iconview should display all the images with those tags?

Yes.
Comment 30 Felix 2009-05-21 03:14:38 UTC
I've also been waiting for this feature for a long time.

I think a more industrial-strength solution might be called for: rather than having to clean up digikam after importing a picture with a spamload of tags, digikam should isolate the new tags on import.

New tags should go into a parent tag called something like "import on <date>" and all the new tags from pictures imported on that date/time go below that. If you want to get rid of those tags completely, all you have to do is delete the parent tag, since digikam already deletes subtags on deleting the parent.

I would also like the option of merging those tags into my collection. Say a friend gave me some pictures that she's tagged really well. I rename the "import on <date>" parent tag to "Tagged by Karen". Later she gives me another batch of pictures and I get another "import on <date>" tag array -- I drag that into "Tagged by Karen" and choose "Merge" instead of "Move" -- digikam merges the tags, and adds any that Karen didn't have in her last batch.

At the moment I do all of this with sqliteman by editing the digikam database directly :)
Comment 31 caulier.gilles 2009-06-19 12:41:14 UTC
*** Bug 102413 has been marked as a duplicate of this bug. ***
Comment 32 caulier.gilles 2009-06-19 12:41:28 UTC
*** Bug 146761 has been marked as a duplicate of this bug. ***
Comment 33 caulier.gilles 2009-06-19 12:41:44 UTC
*** Bug 159209 has been marked as a duplicate of this bug. ***
Comment 34 Andi Clemens 2009-10-01 16:59:49 UTC
I marked all my patches as obsolete now, since I'm not able to re-apply them to the current trunk.
We should start from scratch when we finally ported all the folderviews to Qt4 model-view as well. We should also consider to not only apply multiple selection to tags, but albums as well.
Comment 35 caulier.gilles 2011-12-16 12:54:27 UTC
Andi,

Any progress on your patches, since all code relevant of tags are ported to Qt4 model/view ?

Gilles Caulier
Comment 36 caulier.gilles 2012-10-29 11:58:33 UTC
*** Bug 300041 has been marked as a duplicate of this bug. ***
Comment 37 Veaceslav Munteanu 2013-11-06 19:04:21 UTC
Tags Manager and all sidebars with tags have multiple selection enabled in 4.0.0