Bug 139547

Summary: tag hierarchy automatic fill
Product: [Applications] digikam Reporter: Juergen Flosbach <jforum>
Component: Tags-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 0.9.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.1
Sentry Crash Report:
Attachments: Parents & Childs tags selection/deselection
Screenshot of pop-up menu Tags treeview from Comments & tags sidebar
tag-tree.png
tags drag and drop menu
Backtrace crash on tags toggle
New backtrace

Description Juergen Flosbach 2007-01-03 12:16:01 UTC
Version:           0.9.0 (using KDE 3.5.5 "release 45.1" , openSUSE )
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.13-15.13-default

What I wish for is the automatic selection of parent tags in the tag hierarchy.
See right side the comments/tags tag.
Example :
Tags > People
Tags > People > Children
Tags > People > Children > Boy

If I set tag "Boy" I also have to set all higher tags manually. Because a boy is a child and also belongs to people.
This could be dont automatically.
I select Boy and the tags Children and People are selected by digikam.
I deselect Boy only this tag gets deselected because all other tags may still be true.

Juergen Flosbach
juergen.flosbach@bigfoot.com
Comment 1 caulier.gilles 2007-01-03 12:44:46 UTC
Hi Juergen,

Because i'm actually lost in Tags management implementation, I can said than it can be easy to implement this option (technically of course).

But before to do something in this way, i would to have the feedback from others users about this point...

Also, to do it, i think we need 2 new options in pop-up menu :

- Select parents.
- Deselect parents.

What do you think about ?

Gilles Caulier
Comment 2 Arnd Baecker 2007-01-03 13:03:55 UTC
Do you need this for usage outside of digikam?
E.g., if you use the Tag-Filter on the left hand side
and select "People", also all those with "Boy" will be displayed.
Comment 3 Daniel Bauer 2007-01-03 13:53:41 UTC
I'd vote for this. For the options

- Select parents.
- Deselect parents. 

they could also be set/unset in settings->metadata, so they don't need space in the sidebar/menu (I guess most people will not change these options frequently). If settings->metadata is not the right place, it would be comfortable if the chosen options remain remembered until one changes them.

...ehm, is it clear what happens to the children then? To explain:

When there is a picture tagged:

People > Children > Boy 
and option "Select parents" is checked
and I want to deselect "Children" 

what happens to the "Boy"?

proposals:
a) deselect a parent tag when the picture has cild-tags of this parent is not possible (warning like "you have to deselect all child-tags of this tag for this picture before you can deselect this tag"), or
b) extend option to "Deselect parents/children", or
c) add third option "Deselect children if parent is deselected"

(I'd prefer a)

Finally, so that people don't get afraid that they loose their children or parents, I'd name the options "parent tags" and "child tags" instead of just parents/children :-)

Daniel
Comment 4 caulier.gilles 2007-01-03 14:14:45 UTC
Daniel,

The 'Select/Deselect Parents' options will not be settings, but actions options, running like current 'Select All/Deselect/Invert Selection' options.

Gilles
Comment 5 Juergen Flosbach 2007-01-03 14:19:06 UTC
Answer to Arnd Baecker
"Do you need this for usage outside of digikam?"
If I leave it like it is and forget to select the children tag in my example than, if I use the left side tags filter, I don't see this picture if I select children as filter. But, my boy is a child. So I would expect him to show up.

Juergen
Comment 6 Daniel Bauer 2007-01-03 14:53:26 UTC
Hi Gilles,

oh, I see... So, then you'll have to right-click to deselect parents? Or did I understand wrong again?

As this is a wish-list, I'd wish to have it SET somehow, so that when one deselects a tag the rest is done automatically without the need for right-clicking. That would enhance comfort substantially (I think).

Daniel
Comment 7 caulier.gilles 2007-01-03 15:03:30 UTC
Yes Daniel,

My idea is when you right clic on a tag from treeview, when you choose the "Deselect Parents" option, all parents from this tag (and only this one) will be deselected. Same way for 'Select Parents' stuff.

Gilles
Comment 8 Daniel Bauer 2007-01-03 15:35:47 UTC
ok, that's not bad and adds some comfort.

However, my wish (for christmas 07? :-)) ) is maybe a bit different:

In my *personal* view a tag-tree makes only sense, if it is used hierarchical, i.e. (in the example here) a "boy" MUST be "children" which MUST be a "people". If a "boy" can also exist without beeing "children" it makes no sense to make "boy" a sub-tag of "children".

So my wish would be a setting, like maybe:

- use strict tag hierarchy (that implies tagging parents automatically when a child-tag is checked)
- use free tag hierarchy (that means, you can have "boys" which are no "children")

What do you think? Too complicated?

Daniel

 
Comment 9 Juergen Flosbach 2007-01-03 15:37:41 UTC
I have always to refrence the english documentation. To make sure that I say it right ( I have the german version ).

I don't think that this feature will be changed constantly.
So I would think that in the tags pop-up menue would be the best place for it.

-----------------------------------------+
x autoselect parents ( feature enabled ) |
-----------------------------------------+

Juergen
Comment 10 Juergen Flosbach 2007-01-03 15:41:28 UTC
It took me to long to write my last comment.
Daniel, you just past me on the left lane and said what I was thinking.

Juergen
Comment 11 caulier.gilles 2007-01-03 16:33:37 UTC
Created attachment 19092 [details]
Parents & Childs tags selection/deselection

Hi guy... try this first patch to apply against current svn implementation...

It re-factorize the pop-up menu from Tags treeview of Comments & Tags sidebar
using child new pop-up menu and add new options like this :

- All Tags / Select
- All Tags / Deselect
- All Tags / Invert
- Child Tags / Select
- Child Tags / Deselect
- Parent Tags / Select
- Parent Tags / Deselect

This is the first approach. It not exactly like you want Juergen, because you
would to set a settings to select automaticly all parent tags (or childrens
eventually if the idea is right for you)

In fact the patch give the core implementation to perform parent/child tags. To
do later an automatic stuff is simple using it (:=)))

Gilles
Comment 12 caulier.gilles 2007-01-03 16:39:22 UTC
Created attachment 19093 [details]
Screenshot of pop-up menu Tags treeview from Comments & tags sidebar
Comment 13 Juergen Flosbach 2007-01-03 19:19:06 UTC
Hey Gilles you are fast.

I can not be so fast because I got the tar ball not the svn sources. And maybe I have to try that out sometime towards the weekend. But not today.

But it looks good for the first shot.

I'll let you know when I have tested your patch.

Juergen
Comment 14 caulier.gilles 2007-01-04 10:14:40 UTC
SVN commit 619739 by cgilles:

digiKam from trunk : Improvment of Selection/Deselection of Tags in tree list view from Comments & Tags sidebar : add 2 new options sub popup-menu to Select/Deselect All/Parents/Childs tags. Refactoring of pop-up menu.
CCBUGS: 139547



 M  +26 -27    imagedescedittab.cpp  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #619738:619739
@@ -59,13 +59,13 @@
 #include "albumdb.h"
 #include "album.h"
 #include "albumsettings.h"
+#include "albumthumbnailloader.h"
 #include "tagcreatedlg.h"
 #include "navigatebarwidget.h"
-#include "imageinfo.h"
 #include "ratingwidget.h"
-#include "imageattributeswatch.h"
-#include "albumthumbnailloader.h"
 #include "talbumlistview.h"
+#include "imageinfo.h"
+#include "imageattributeswatch.h"
 #include "imagedescedittab.h"
 #include "imagedescedittab.moc"
 
@@ -632,43 +632,42 @@
 
     popmenu.insertSeparator(-1);
 
-    QPopupMenu allTagsMenu;
-    allTagsMenu.insertItem(i18n("Select "),     14);
-    allTagsMenu.insertItem(i18n("Deselect"),    15);
-    allTagsMenu.insertItem(i18n("Invert"),      16);
-    popmenu.insertItem(i18n("All Tags"), &allTagsMenu);
+    QPopupMenu selectTagsMenu;
+    selectTagsMenu.insertItem(i18n("All"),       14);
+    selectTagsMenu.insertItem(i18n("Childs"),    17);
+    selectTagsMenu.insertItem(i18n("Parents"),   19);
+    popmenu.insertItem(i18n("Select"), &selectTagsMenu);
 
-    QPopupMenu childTagsMenu;
-    childTagsMenu.insertItem(i18n("Select"),    17);
-    childTagsMenu.insertItem(i18n("Deselect"),  18);
-    popmenu.insertItem(i18n("Childs Tags"), &childTagsMenu);
+    QPopupMenu deselectTagsMenu;
+    deselectTagsMenu.insertItem(i18n("All"),     15);
+    deselectTagsMenu.insertItem(i18n("Childs"),  18);
+    deselectTagsMenu.insertItem(i18n("Parents"), 20);
+    popmenu.insertItem(i18n("Deselect"), &deselectTagsMenu);
 
-    QPopupMenu parentTagsMenu;
-    parentTagsMenu.insertItem(i18n("Select"),   19);
-    parentTagsMenu.insertItem(i18n("Deselect"), 20);
-    popmenu.insertItem(i18n("Parent Tags"), &parentTagsMenu);
-    
+
+    popmenu.insertItem(i18n("Invert Selection"), 16);
+
     int choice = popmenu.exec((QCursor::pos()));
     switch( choice )
     {
-        case 10:
+        case 10:   // New Tag.
         {
             tagNew(album);
             break;
         }
-        case 11:
+        case 11:   // Edit Tag Properties.
         {
             if (!album->isRoot())
                 tagEdit(album);
             break;
         }
-        case 12:
+        case 12:   // Delete Tag.
         {
             if (!album->isRoot())
                 tagDelete(album);
             break;
         }
-        case 13:
+        case 13:   // Reset Tag Icon.
         {
             QString errMsg;
             AlbumManager::instance()->updateTAlbumIcon(album, QString("tag"), 0, errMsg);
@@ -698,7 +697,7 @@
             }
             break;
         }
-        case 16:  // Invert All Tags Selection.
+        case 16:   // Invert All Tags Selection.
         {
             QListViewItemIterator it(d->tagsView);
             while (it.current())
@@ -715,22 +714,22 @@
             }
             break;
         }
-        case 17:    // Select Child Tags.
+        case 17:   // Select Child Tags.
         {
             toggleChildTags(album, true);
             break;
         }
-        case 18:    // Deselect Child Tags.
+        case 18:   // Deselect Child Tags.
         {
             toggleChildTags(album, false);
             break;
         }
-        case 19:    // Select Parent Tags.
+        case 19:   // Select Parent Tags.
         {
             toggleParentTags(album, true);
             break;
         }
-        case 20:    // Deselect Parent Tags.
+        case 20:   // Deselect Parent Tags.
         {
             toggleParentTags(album, false);
             break;
@@ -822,7 +821,7 @@
     {
         KMessageBox::error(this, i18n("You are currently viewing items in the "
                                       "tag '%1' that you are about to delete. "
-                                      "You will need to close this dialog first "
+                                      "You will need to apply change first "
                                       "if you want to delete the tag." )
                            .arg(album->title()));
         return;
Comment 15 Gerhard Kulzer 2007-01-04 11:55:00 UTC
I followed all the discussion string. What I don't understand is, that digiKam 
works already as you wish it to work. If boy is set and not child and then 
you select child on the left sidebar the whole hierarchy comes up child->boy 
and whatever else is under child.

Or do I understand your wish wrongly?

Gerhard

Am Mittwoch, 3. Januar 2007 12:16 schrieb Juergen Flosbach:
[bugs.kde.org quoted mail]
Comment 16 Gerhard Kulzer 2007-01-04 11:58:26 UTC
Here's a screen shot to explain my point in the previous mail. THis is from 
0.9.0 with Gilles patch of this morning.

Gerhard


Created an attachment (id=19099)
tag-tree.png
Comment 17 caulier.gilles 2007-01-04 12:00:53 UTC
Gerhard,

We talking about right side bar, especially the pop-up menu option from Tags treeview of Comment & Tags.

Gilles
Comment 18 Daniel Bauer 2007-01-04 12:11:50 UTC
Hi Gerard,

This is true *within* digikam. But if you save the tags as keywords into the file, only "boy" is saved, not its parents (unless you also check the parents or use Gilles new menu option, of course). 

So if you export the pictures into another app (could be at an image agency for example) that extracts the keywords from IPTC, they will not find your boy if they search for children.

Daniel
Comment 19 Juergen Flosbach 2007-01-04 13:56:16 UTC
And also
if I have picture of my boy and save that with the following tags
People > Children > Boys > MyBoy
  X         -        -       X

X = tag is set
- = tag is not set

In the left side tags list I select Children

 > You are right, here I see this picture.

But I have many pictures with Children. So I also use the
right side tags filter and select Boys.

Now the "MyBoy" pic is gone.

And anyway. If I have such a hierarchy I would expect it
to work like I asked for in my first posting. Because 
MyBoy is a boy and is a child and is a person.

Juergen.
Comment 20 Daniel Bauer 2007-01-04 14:08:26 UTC
Gilles,

I just had a look at the latest svn with the new tag menu entries. If I right-click on a child's text, then click select->parents, *only* the parents are selected, but not the child itself.

If I want to select the child and its parents I have to first click the child's box, then right-click in child's name to get the menu, then click select->parents.

If I right-click directly in the child's box, then its selection gets inverted as if I clicked normal (left) in the box. So, if I have already checked the child's box and want to have the parents checked too and right-click in the box (instead of the name), the child gets unchecked...

In order to reduce the amount of necessary clicks I'd suggest to change "select->parents" to "select->inclusive parents", so that the parents *and* the appropriate child get selected (similar in childs and deselect...).

What do you think?

Daniel
Comment 21 glaurent 2007-01-04 14:31:15 UTC
Really no chance to get the same kind of simple, free-form tagging that flickr has (and just damn everybody else too) ? This tagging scheme is way too complex for its purpose.
Comment 22 caulier.gilles 2007-01-04 14:32:48 UTC
Daniel,

Try my alternative using commit # 619788 : always select/deselect the current item from the Tags treeview when Parents/Childs tags are selected/deselected by user

Gilles
Comment 23 caulier.gilles 2007-01-04 14:41:45 UTC
Laurent, 

Flickr tagging stuff is another subject in other B.K.O file.

The Flickr tagging do not repect the tags hierarchy of digiKam. But Flickr tagging give a informations about the popularity of a tags. This is can be done in digiKam to show the number of images already tagged with a tag like this :

Travel
   \__City (5)
         \__Paris (25)
         \__ London (6)
  \__ Monuments

..But This is out of subject in this file. I will working on later at the right B.K.O file...

Gilles
Comment 24 glaurent 2007-01-04 15:07:19 UTC
My prediction is that practically nobody will use tag hierarchies, it's just too much work to maintain, for very little gain. Look at gmail, or spotlight vs. directory hierarchies, or google vs. semantic web. People don't want to have to worry about how to retrieve their images, by doing hierarchy tagging you force them to do the computer's job.
Comment 25 caulier.gilles 2007-01-04 15:14:16 UTC
Laurent,

_Nobody_ will use Tags hierarchies... Really ???

I would to hear others guys about this subject (:=)))...

In all case, if_you_ don't care to have a Tags hierarchies in digiKam, you can tags your pictures in a flat way, without create tree... 

Gilles
Comment 26 Daniel Bauer 2007-01-04 16:01:33 UTC
glaurent:

tag-tree *is* important. Ask any image agency: there are a lot of people getting paid just for doing nothing else then indexing photo material according to common keyword trees, because this is exactly one of those rare things computers cannot do :-) . If digiKam wants to become a widly used tool also for professionals (and it definitively can!) then proper keyword handling is needed for sure. However: nobody is obliged to use tags at all.

If you point to google etc., I find it extremely annoying that google tries to think for me and does not let me search for what *I* want, even if I put it in quotes (search for "Fotograf" and you'll get all "Photographer" too, etc). As another example: the organization in Picasa is absolutely unusable, allthough it really looks extremely nice from design - but its a game, not a tool. Same for the "tags-clouds" in flickr etc.: really funny gadgets, nothing more.

Daniel
Comment 27 Daniel Bauer 2007-01-04 16:04:28 UTC
Gilles,

latest svn from few minutes ago (don't know which number; don't know, how to find it :-) ) behaves just as I suggested above. In my opinion it's much better now.

Daniel
Comment 28 caulier.gilles 2007-01-04 16:14:50 UTC
Laurent,

Note than Daniel is pro-photographer : http://www.sanic.ch

Gilles
Comment 29 glaurent 2007-01-04 16:22:25 UTC
> _Nobody_ will use Tags hierarchies... Really ???

Almost no non-geek user, yes. Perhaps a few geeks will, but it won't be long before they give up because it's basically boring grunt work, and the current state of the technology has already proven it's pointless. Who wants to maintain tags for thousands of photos ? And a hierarchy makes it even more fragile, suppose I decide I need to change it, how will digikam cope with that ? Will I have to re-tag all my pictures ? It's a huge can of worms.

Sorry, I really think this tagging scheme is a waste of your time. As you say, yes, I certainly won't use it (especially if there's a free-form tagging like with flickr - please don't force me to 'create tags', let me just type words in a lineedit).
Comment 30 caulier.gilles 2007-01-04 16:37:41 UTC
Daniel,

To finalize the implemention in Comments & Tags view, I propose to add a _settings_ option (not an action option) on the bottom of the pop-up menu, like "Matching Condition" work from the pop-up menu of Tags Filter View :

Toogle Settings
       \__[x]Parents
       \__[x]Childs
       \__[x]Both

For example, if you set on "Toogle Settings/Parents", when you Select/Deselect a tags form treeview, all parents tags will be automaticly Selected/Deselected... Smae way for ".../Childs"  option with childs tags. The ".../Both" option will Select/Deselect parents and childs at the same time.

Juergen, this is finaly what you want...

What do you think about ?

Gilles
Comment 31 glaurent 2007-01-04 16:41:07 UTC
Daniel :

<<there are a lot of people getting paid just for doing nothing else then indexing photo material according to common keyword trees, because this is exactly one of those rare things computers cannot do :-)>>

That's precisely my point, who wants to do this kind of job all for himself ? :-) Well, if you really think that this kind of feature might be appealing to pros, ok, but AFAIC, I'll stick to a flickr-like scheme. It fits most "normal users" needs, hence why I think it's more worthy to work on.
Comment 32 Mikolaj Machowski 2007-01-04 17:50:12 UTC
You have one good point: creation of new tags. The rest is... rather
funny. While I am not pro-photographer like Daniel I am
pro-photo-manager. We *could* live without hierarchical tags but
quality of this life would be really low.

m.
Comment 33 Daniel Bauer 2007-01-04 19:03:29 UTC
Hi Gilles,

Your proposal in Comment #30 is the perfect solution (my opinion).

Laurent: 

<<who wants to do this kind of job all for himself>> Well, sometimes it's not a question of "want to", but of "have to". Although (many) image agencies have specially trained stuff doing the indexing work, the chances to sell material to them are often better if the pictures are already properly "keyworded" (which is even more than keywords, in includes caption, location and so on...), simply because you save them time and money. Some agencies just take the pics, extract the embedded metadata into their database and let their customers search. Good keywords then are just as important as in google, where it makes no sence if your website occurs on bottom of page 2358...

to the discussion:

besides of no-tags, ad-hoc-tags and cloudy-tags there are two main possibilities for tagging (excuse me, if my english is not correct):

a) "controlled vocabulary": we use a list of once pre-defined keywords that we apply consistently. Here we save only keywords (not a tree), thus use it like the "normal" behaviour of digiKam: we select "boy" but not its parent-tags. However, we might like to have a hierarchy so we can find the appropriate keywords easier. We could use this manner e.g.:

-message/emotion
    -happiness
        -laughter
        -reunion
        -love 
    -sadness
        -farewell
        -death
-occasions
    -chrismas
    -birthdays
    -marriage
-main colours of image
    -crazy colours
    -mild colours
    -reddish
    -blueish

Here we tag a picture like "love, mild colours".

b) "taxonomy": this means, we use a tree structure of keywords that becomes more specific as we go down the tree. This is the behaviour we can have from the left side bar or now with the new menu options by Gilles. This method allows us to work by refining the search in steps: people->children->boys->blondes. Of course here we must have the complete tree, because we also have "blondes" in "girls", "women", "men", "cigarettes" and we couldn't find the picture easily using only the last keyword.

So with the current implementation (Gilles Comment #30) I guess both ways are now possible in digiKam and everybody can do as s/he likes (and I didn't even have to wait till next Christmas :-). 

Of course, "fun-tags" in a flickr-way can still be a wish, but I wouldn't mix it with "principal tagging thoughts" and put it in the "design/gadgets"-file.

Daniel
Comment 34 Juergen Flosbach 2007-01-04 20:59:29 UTC
Hi Gilles

Back to your comment #30. Yes, that is exactly what I
was looking for.
I wished for this feature because I started using the
hierarchical tagging feature already a while ago. I filled
all the parent tags by hand.
To me, that was the way where I felt that it was correct.
But yes, different people do different things to pictures
in different ways.
And that's exactly the advantage of digikam, that everyone
can manage his pictures in different ways so that it will
suit everyone.
You like no tags, then forget them.
You like a flat hierarchy, you can do that and digikam supports that.
You like the hierarchical tagging, you can/could do it already
 but now with the additional settings it supports it perfectly.

I have never before send anything to a list like this. So, how
would you handle the question whether or not to include this new
feature into digikam.
Do we vote for it in this forum or in the mailing list or how does
this work ?

Juergen
Comment 35 Marcel Wiesweg 2007-01-04 23:23:24 UTC
Old KDE rule:
He who writes the code decides.
;-)

And if there is a feature which some people would like to have, and others dont, but they are not obliged to use it nor touched in any way by its inclusion, and someone codes it, then it's there.
Comment 36 Juergen Flosbach 2007-01-04 23:36:52 UTC
OK.

Thanks Marcel

Juergen
Comment 37 caulier.gilles 2007-01-05 08:51:29 UTC
Juergen,

KDE bugzilla is one of the brainstorming areas for digiKam (mailling-list is another one but not too powerfull). 

We talking together between developpers/users/testers. the GUI/coding is polished together. Some viewpoints can be differents (for example Laurent with tags hierarchy (:=)))).

The responsability of developpers is 

- to code, and valid implementation.
- to report to users what is possible to do.
- to explain to users how is work.
- to explain the developements goal.

It's an important task. Of course others users can help him for explainations stuff...

Gilles
Comment 38 Juergen Flosbach 2007-01-05 10:01:23 UTC
Hi Gilles

Thanks for the explanation.

I tried to copile the SVN stuff. But I couldn't.
I got the three scripts from the digikam download svn page
wherein I can automatically can retrive digikam from the
svn repository, compile and install it in a local directory.

When it compiles the digicam stuff (actually the kipi stuff )
it aborts with the following error :

-- Kipi-Plugins configure results -------------------
-- gphoto2 found.................. YES
-- libkipi found.................. YES
-- Exiv2 library found............ YES
-- libtiff found.................. YES
-- imlib2 found................... YES
-- OpenGL found................... YES
-- libxstl found.................. YES
-- libgpod > 0.4.0 found............ NO

<SNIP>

make -j 4
+ make -j 4
make  all-recursive
make[1]: Entering directory `/home/juergen/Download/digikam/SVN-Versions/graphics/libs'
Making all in libkipi
make[2]: Entering directory `/home/juergen/Download/digikam/SVN-Versions/graphics/libs/libkipi'
Making all in libkipi
make[3]: Entering directory `/home/juergen/Download/digikam/SVN-Versions/graphics/libs/libkipi/libkipi'
cd ../.. && /bin/sh /home/juergen/Download/digikam/SVN-Versions/graphics/libs/admin/missing --run autoheader
configure.in:92: warning: KDE_ENABLE_HIDDEN_VISIBILITY was called before AC_PATH_QT_1_3
acinclude.m4:3463: KDE_ENABLE_HIDDEN_VISIBILITY is expanded from...
configure.in:92: the top level
configure.in:399: warning: KDE_ENABLE_HIDDEN_VISIBILITY was called before AC_PATH_QT_1_3
configure.in:399: the top level
rm -f stamp-h2
touch libkipi_export.h.in
cd ../.. && /bin/sh ./config.status libkipi/libkipi/libkipi_export.h
config.status: creating libkipi/libkipi/libkipi_export.h
config.status: libkipi/libkipi/libkipi_export.h is unchanged
make  all-am

<SNIP>

imlibiface.cpp:29:20: error: Imlib2.h: No such file or directory

So, you see some warnins (are they important ? ) and that the header
imlib2.h is missing. Has my system to provide this file or should it
be part of the package ?

But I have the current 0.9.0 Version already compiled from the tarball
and there I had no problems. Everything was there and it compiled.

Juergen
Comment 39 Arnd Baecker 2007-01-05 10:21:05 UTC
> the header
> imlib2.h is missing. Has my system to provide this file or should it
> be part of the package ?


On my system (debian etch) it is in the package
libimlib2-dev. Could you try to install something like that on your system
(still it should be caught in the configure step, IMO).
Comment 40 caulier.gilles 2007-01-05 10:26:41 UTC
> imlibiface.cpp:29:20: error: Imlib2.h: No such file or directory 

Hum, imlib2 detection failed ? Where are installed your files header from imlib2 dev package ? Witch dist you use ?

But this report is about digiKam not kipi-plugins. Please, report this problem at the right place in bugzilla.

>But I have the current 0.9.0 Version already compiled from the tarball 
> and there I had no problems. Everything was there and it compiled. 

digiKam 0.9.0 do not use imlib2 (0.8.x use it). If you can compile it well you can try it, especially for test implementation about this report (:=)))...

Gilles
Comment 41 caulier.gilles 2007-01-05 13:59:22 UTC
SVN commit 620161 by cgilles:

digikam from trunk : Comments & Tags : add 3 new settings options to handlee how to auto select/deselect automaticly parents and childs tags in treelist view.
CCBUGS: 139547


 M  +71 -2     imagedescedittab.cpp  
 M  +3 -3      imagedescedittab.h  
 M  +3 -3      talbumlistview.cpp  
 M  +2 -2      talbumlistview.h  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #620160:620161
@@ -76,6 +76,14 @@
 {
 public:
 
+    enum ToggleAuto
+    {
+        None = 0,
+        Childs,
+        Parents,
+        Both
+    };
+
     ImageDescEditTabPriv()
     {
         modified                   = false;
@@ -92,6 +100,7 @@
         assignedTagsBtn            = 0;
         applyBtn                   = 0;
         revertBtn                  = 0;
+        toggleAuto                 = None;
     }
 
     bool               modified;
@@ -117,6 +126,8 @@
     TAlbumListView    *tagsView;
 
     RatingWidget      *ratingWidget;
+
+    ToggleAuto         toggleAuto;
 };
 
 ImageDescEditTab::ImageDescEditTab(QWidget *parent, bool navBar)
@@ -215,8 +226,8 @@
     connect(popupMenu, SIGNAL(activated(int)),
             this, SLOT(slotRecentTagsMenuActivated(int)));
 
-    connect(d->tagsView, SIGNAL(signalItemStateChanged()),
-            this, SLOT(slotModified()));
+    connect(d->tagsView, SIGNAL(signalItemStateChanged(TAlbumCheckListItem *)),
+            this, SLOT(slotItemStateChanged(TAlbumCheckListItem *)));
     
     connect(d->commentsEdit, SIGNAL(textChanged()),
             this, SLOT(slotModified()));
@@ -300,6 +311,13 @@
 
     connect(watch, SIGNAL(signalImageCaptionChanged(Q_LLONG)),
             this, SLOT(slotImageCaptionChanged(Q_LLONG)));
+
+    // -- read config ---------------------------------------------------------
+
+    KConfig* config = kapp->config();
+    config->setGroup("Tag List View");
+    d->toggleAuto = (ImageDescEditTabPriv::ToggleAuto)(config->readNumEntry("Toggle Auto", 
+                                                       ImageDescEditTabPriv::None));
 }
 
 ImageDescEditTab::~ImageDescEditTab()
@@ -314,6 +332,11 @@
     }
     */
 
+    KConfig* config = kapp->config();
+    config->setGroup("Tag List View");
+    config->writeEntry("Toggle Auto", (int)(d->toggleAuto));
+    config->sync();
+
     delete d;
 }
 
@@ -507,6 +530,27 @@
     }
 }
 
+void ImageDescEditTab::slotItemStateChanged(TAlbumCheckListItem *item)
+{
+    switch(d->toggleAuto)
+    {
+        case ImageDescEditTabPriv::Childs:
+            toggleChildTags(item->m_album, item->isOn());
+            break;
+        case ImageDescEditTabPriv::Parents:
+            toggleParentTags(item->m_album, item->isOn());
+            break;
+        case ImageDescEditTabPriv::Both:
+            toggleChildTags(item->m_album, item->isOn());
+            toggleParentTags(item->m_album, item->isOn());
+            break;
+        default:
+            break;
+    }
+
+    slotModified();
+}
+
 void ImageDescEditTab::slotModified()
 {
     d->modified = true;
@@ -633,7 +677,17 @@
     popmenu.insertItem(i18n("Deselect"), &deselectTagsMenu);
 
     popmenu.insertItem(i18n("Invert Selection"),  16);
+    popmenu.insertSeparator(-1);
 
+    QPopupMenu toggleAutoMenu;
+    toggleAutoMenu.setCheckable(true);
+    toggleAutoMenu.insertItem(i18n("Childs"),  21);
+    toggleAutoMenu.insertItem(i18n("Parents"), 22);
+    toggleAutoMenu.insertItem(i18n("Both"),    23);
+    if (d->toggleAuto != ImageDescEditTabPriv::None)
+        toggleAutoMenu.setItemChecked(20 + d->toggleAuto, true);
+    popmenu.insertItem(i18n("Toogle Auto"), &toggleAutoMenu);
+
     int choice = popmenu.exec((QCursor::pos()));
     switch( choice )
     {
@@ -729,6 +783,21 @@
             item->setOn(false);            
             break;
         }
+        case 21:   // Toggle auto Childs tags.
+        {
+            d->toggleAuto = ImageDescEditTabPriv::Childs;
+            break;
+        }
+        case 22:   // Toggle auto Parents tags.
+        {
+            d->toggleAuto = ImageDescEditTabPriv::Parents;
+            break;
+        }
+        case 23:   // Toggle auto Childs and Parents tags.
+        {
+            d->toggleAuto = ImageDescEditTabPriv::Both;
+            break;
+        }
         default:
             break;
     }
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.h #620160:620161
@@ -41,10 +41,10 @@
 class AlbumIconItem;
 class Album;
 class TAlbum;
+class TAlbumCheckListItem;
 class ImageInfo;
 class ImageDescEditTabPriv;
 
-
 class DIGIKAM_EXPORT ImageDescEditTab : public NavigateBarTab
 {
     Q_OBJECT
@@ -73,8 +73,7 @@
     void updateDate();
     void updateRecentTags();
 
-    void tagNew(TAlbum* parAlbum, const QString& _title=QString(),
-                const QString& _icon=QString());
+    void tagNew(TAlbum* parAlbum, const QString& _title=QString(), const QString& _icon=QString());
     void tagEdit(TAlbum* album);
     void tagDelete(TAlbum *album);
 
@@ -87,6 +86,7 @@
 
     void slotApplyAllChanges();
     void slotRevertAllChanges();
+    void slotItemStateChanged(TAlbumCheckListItem *);
     void slotModified();
     void slotRightButtonClicked(QListViewItem *, const QPoint &, int);
     void slotTagsSearchChanged();
--- trunk/extragear/graphics/digikam/libs/imageproperties/talbumlistview.cpp #620160:620161
@@ -74,7 +74,7 @@
 {
     QCheckListItem::stateChange(val);
     TAlbumListView* view = dynamic_cast<TAlbumListView*>(listView());
-    view->emitSignalItemStateChanged();
+    view->emitSignalItemStateChanged(this);
 }
 
 // ------------------------------------------------------------------------
@@ -87,9 +87,9 @@
     viewport()->setAcceptDrops(true);
 }
 
-void TAlbumListView::emitSignalItemStateChanged()
+void TAlbumListView::emitSignalItemStateChanged(TAlbumCheckListItem *item)
 {
-    emit signalItemStateChanged();
+    emit signalItemStateChanged(item);
 }
 
 QDragObject* TAlbumListView::dragObject()
--- trunk/extragear/graphics/digikam/libs/imageproperties/talbumlistview.h #620160:620161
@@ -62,11 +62,11 @@
 
     TAlbumListView(QWidget* parent);
 
-    void emitSignalItemStateChanged();
+    void emitSignalItemStateChanged(TAlbumCheckListItem *item);
 
 signals:
 
-    void signalItemStateChanged();
+    void signalItemStateChanged(TAlbumCheckListItem *item);
 
 protected:
 
Comment 42 caulier.gilles 2007-01-05 14:02:26 UTC
Juergen, Daniel,

It's done in svn. Please give me your feedback and let's me hear if these new options must be backported also in Tags Filter view pop-up menu (personally, i'm agree to do it because we need to have an homogenous interface)

Gilles
Comment 43 Daniel Bauer 2007-01-05 15:44:35 UTC
Hi Gilles,

yes, this is really fine!

"backported also in Tags Filter view pop-up menu": Yes, absolutely. It should work the same everywhere.

I think the tag behaviour should be the same all over digiKam, no matter which way a user takes to add/remove a tag. So, when "toggle auto" is set, the according value should be used also in all other tag-settings methods.

right now you get very different results depending on how you assign a tag:
(for the following I checked "toggle auto->parents" in right side bar)

- selecting one photo in album and clicking the box of a child selects the parents (as it should be)
- drag and drop the child from Comments/Tags-sidebar assigns only the child (it should also assign parents, the menu asks if the complete tag-family should be assigned, but only the child is assigned, see attachement testtag.png)

- no parents assigned also with drag and drop from "Tag Filters"
- no parents assigned also with "assign Tag" from right-click menu in album

the same is true for removing tags (parents only get removed when removing the child in the Comments/Tags sidbar, but not when using context menu in album)

This is why I voted to put these settings in settings->configure digikam->metadata (but this is a matter of taste, of course)

There are also some other issues, which I think we have already said in another thread:

- selecting multiple pictures and clicking a tag assigns it only to the first image
- assigning tags to multiple pictures is possible with drag and drop, but then parents are not assigned as mentioned above

Also, I found no way to remove tags again from several pics without doing it for each and every single one. (While clicking fast for the test, I draged a grand-child and clicked "to all items". To remove from all I had to delete the tag itself.)

In this regard I have a small suggestion: I'd change the order of the items in the drag and drop menu (1: assign to Selected 2: to Dropped, 3: to All), because I think usually you do an action for the selected items, only sometimes just for the dropped, and rarely for all.

Daniel
Comment 44 Daniel Bauer 2007-01-05 15:45:38 UTC
Created attachment 19112 [details]
tags drag and drop menu
Comment 45 Juergen Flosbach 2007-01-05 18:29:15 UTC
Hi Gilles

I got my bunch compiled and can only say the same as Daniel
already did.
- I like it ( The pop-up menu )
- I would like to see all places that deal with tags behave
  the same way.
- The drag and drop function works only on the item the mouse
  cursor was on. Not on the parents.

Juergen
Comment 46 caulier.gilles 2007-01-05 18:34:55 UTC
Ok, i will backport the code to Tags Filter View...

About drag & drop, only the multi-selection in Tags treeview is possible. This way already work with Tags Filter view. On Comments & Tags, we have only a Single selection of tags. I will fix it.

Gilles
Comment 47 caulier.gilles 2007-01-05 21:19:59 UTC
SVN commit 620379 by cgilles:

digikam from trunk: Comments & Tags : Support of multiple selection of tags in treeview. Drag and drop tags will work like Tags Filter view

CCBUGS: 139547

 M  +0 -5      imagedescedittab.cpp  
 M  +24 -10    talbumlistview.cpp  
 M  +1 -1      talbumlistview.h  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #620378:620379
@@ -27,7 +27,6 @@
 #include <qvbox.h>
 #include <qlabel.h>
 #include <qlayout.h>
-#include <qheader.h>
 #include <qtoolbutton.h>
 #include <qpushbutton.h>
 #include <qiconset.h>
@@ -191,10 +190,6 @@
     d->recentTagsBtn->setPopupDelay(1);
 
     d->tagsView = new TAlbumListView(settingsArea);
-    d->tagsView->addColumn(i18n("Tags"));
-    d->tagsView->header()->hide();
-    d->tagsView->setSelectionMode(QListView::Single);
-    d->tagsView->setResizeMode(QListView::LastColumn);
 
     // Buttons -----------------------------------------
 
--- trunk/extragear/graphics/digikam/libs/imageproperties/talbumlistview.cpp #620378:620379
@@ -3,7 +3,7 @@
  * Date  : 2006-18-12
  * Description : A list view to display digiKam Tags.
  *
- * Copyright 2006 by Gilles Caulier
+ * Copyright 2006-2007 by Gilles Caulier
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -18,6 +18,10 @@
  *
  * ============================================================ */
 
+// Qt includes.
+
+#include <qheader.h>
+
 // KDE includes.
 
 #include <kpopupmenu.h>
@@ -83,6 +87,10 @@
               : QListView(parent)
 {
     m_dragItem = 0;
+    addColumn(i18n("Tags"));
+    header()->hide();
+    setResizeMode(QListView::LastColumn);
+    setSelectionMode(QListView::Extended);
     setAcceptDrops(true);
     viewport()->setAcceptDrops(true);
 }
@@ -94,17 +102,23 @@
 
 QDragObject* TAlbumListView::dragObject()
 {
-    TAlbumCheckListItem *item = dynamic_cast<TAlbumCheckListItem*>(dragItem());
-    if(!item)
-        return 0;
+    QValueList<int> dragTagIDs;
 
-    if(!item->m_album->parent())
-        return 0;
+    QListViewItemIterator it(this, QListViewItemIterator::Selected);
+    while (it.current())
+    {
+        TAlbumCheckListItem* item = (TAlbumCheckListItem*)it.current();
+        if (item)
+        {
+            if (item->m_album->parent())
+                dragTagIDs.append(item->m_album->id());
+        }
+        ++it;
+    }
 
-    TagDrag *t = new TagDrag(item->m_album->id(), this);
-    t->setPixmap(*item->pixmap(0));
-
-    return t;
+    TagListDrag *drag = new TagListDrag(dragTagIDs, this);
+    drag->setPixmap(AlbumThumbnailLoader::instance()->getStandardTagIcon());
+    return drag;
 }
 
 void TAlbumListView::startDrag()
--- trunk/extragear/graphics/digikam/libs/imageproperties/talbumlistview.h #620378:620379
@@ -3,7 +3,7 @@
  * Date  : 2006-18-12
  * Description : A list view to display digiKam Tags.
  *
- * Copyright 2006 by Gilles Caulier
+ * Copyright 2006-2007 by Gilles Caulier
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
Comment 48 caulier.gilles 2007-01-05 21:32:45 UTC
Juergen, Daniel, 

Now, you can tag pictures with more than one tag by drag & drop between Comments & Tags and Album Icon view. Just press CTRL and select tags like you want in Tags tree view, and D&D...

Daniel, Tagging/Comments/Rating/Dating more than one picture directly with Comments & Tags view is under developpement by Marcel (CF : #138158, 127583)

Next stage is to fix Tags Filter View...

Gilles
Comment 49 caulier.gilles 2007-01-05 21:34:27 UTC
>Daniel, Tagging/Comments/Rating/Dating more than one picture directly with >Comments & Tags view is under developpement by Marcel (CF : #138158, 127583)

I would say _without_ using Drag & drop (:=)))

Gilles
Comment 50 caulier.gilles 2007-01-06 22:23:51 UTC
SVN commit 620653 by cgilles:

digikam from trunk : backport of Comments & Tags popup menu option in Tags Filter View popup menu. Both sidebar popup menus are the same controls and options about auto selection/deselection of tags on treeview.
BUG: 139547

 M  +181 -32   digikam/tagfilterview.cpp  
 M  +17 -4     digikam/tagfilterview.h  
 M  +11 -9     libs/imageproperties/Makefile.am  
 M  +29 -38    libs/imageproperties/imagedescedittab.cpp  
Comment 51 glaurent 2007-01-07 18:03:08 UTC
To close my point on this subject, after giving it more thought : if I can create tags on the fly by simply typing them (as in flickr), and refactor the tag hierarchy to add/remove branches (and photos would be retagged accordingly), then the problem of the hierarchy being too rigid would be solved.
Comment 52 caulier.gilles 2007-01-07 18:13:17 UTC
Laurent,

Well, i thinking a possible solution to use the Tags search bar on Comments & Tags and use a new button to create a tags on the root hierarchy.

What do you think about ?

Gilles
Comment 53 glaurent 2007-01-07 18:39:37 UTC
Hard to tell without actually seeing and using it. Just go ahead, if I really don't like it I'll try to submit a patch :-).
Comment 54 Juergen Flosbach 2007-01-07 22:33:31 UTC
Hallo Gilles

I've tested the last SVN version you checked in.

Here a few comments ( I didn't try D&D )
- Right side tags filter

-- Select one tag
-- Deselct  the same tag
-- > digikam crashes.

- Comments/tags tab
-- during my test I missed in the tags pop-up > autotoggle menue
-- the item "non".
-- Once you select one item there you seem to stick with it. You
-- can not go back to "non".

- Comments/tags tab
- the tags pop-up menu
-- I don't think that's good to have the "all tags" item as the
-- first. Who wants to selct "ALL" tags ? Maybe deselect. But not
-- select. What do you think?

- Comments/tags tab
-- I was more than one time surprised when I had the mousecursor
-- over one tags checkbox and pressed the right mouse button. The
-- tags pop-up menue appeared AND the box was checked.
-- I would assume that I can only with the left mouse button select
-- a tag.

- Album view
- all right/left side tabs are closed.
- select one image and type in a letter ( any letter ).
- It appears as comment. Was that intentional ?

If you need some more information about my system, let
me know. I will provide what's necessary to make a wonderful tool
even better.

Juergen
Comment 55 caulier.gilles 2007-01-08 09:04:35 UTC
Juergen,

> - Right side tags filter 
> -- Select one tag 
> -- Deselct  the same tag 
> -- > digikam crashes. 

Not reproductible here. Please give me a gdb backtrace. Look here for more informations :
http://www.digikam.org/?q=contrib

> - Comments/tags tab 
> -- during my test I missed in the tags pop-up > autotoggle menue 
> -- the item "non". 
> -- Once you select one item there you seem to stick with it. You 
> -- can not go back to "non". 

I can understand what you mean...

>- Comments/tags tab 
> - the tags pop-up menu 
> -- I don't think that's good to have the "all tags" item as the 
> -- first. Who wants to selct "ALL" tags ? Maybe deselect. But not 
> -- select. What do you think? 

I'm agree with you. But this option have been ask by another user during 0.9.0 development on B.K.O. I would to have more feedback...
 
>- Comments/tags tab 
> -- I was more than one time surprised when I had the mousecursor 
> -- over one tags checkbox and pressed the right mouse button. The 
> -- tags pop-up menue appeared AND the box was checked. 
> -- I would assume that I can only with the left mouse button select 
> -- a tag. 

The behaviour is not same if you clik on the cross area or on the Tags  name to get the pop-up menu with the right mouse button. I will take a look...

>- Album view 
> - all right/left side tabs are closed. 
> - select one image and type in a letter ( any letter ). 
> - It appears as comment. Was that intentional ? 

This problem is know. there is a B.K.O file about. This is relevant of Comments caption focus stuff. Marcel working on...

Gilles
Comment 56 Daniel Bauer 2007-01-08 10:41:31 UTC
> > - Right side tags filter
> > -- Select one tag
> > -- Deselct  the same tag
> > -- > digikam crashes.

> Not reproductible here. Please give me a gdb backtrace. Look here for more
> informations : http://www.digikam.org/?q=contrib

no such problem here, too

> > - Comments/tags tab
> > -- during my test I missed in the tags pop-up > autotoggle menue
> > -- the item "non".
> > -- Once you select one item there you seem to stick with it. You
> > -- can not go back to "non".

> I can understand what you mean...

Yes, once selected it cannot be deselected (except selecting another option, but not none). Should be fixed.

> >- Comments/tags tab
> > - the tags pop-up menu
> > -- I don't think that's good to have the "all tags" item as the
> > -- first. Who wants to selct "ALL" tags ? Maybe deselect. But not
> > -- select. What do you think?

> I'm agree with you. But this option have been ask by another user during
> 0.9.0 development on B.K.O. I would to have more feedback...

"deselect all" seems useful to revert to a "clean" starting stage. 

In "select all" I would change the action to *not* also select "Not Tagged" but only select real tags, so that "all tags" would show all images with any tag, but not those without a tag. I think "no tag" is not a tag and therefor it should not be considered as part of "all tags".

If "not tagged" would *not* be included in "all" one could use these options to fastly toggle between tagged and untagged pictures. As it is now, "deselect all"  and "select all" give the same selection.

> >- Comments/tags tab
> > -- I was more than one time surprised when I had the mousecursor
> > -- over one tags checkbox and pressed the right mouse button. The
> > -- tags pop-up menue appeared AND the box was checked.
> > -- I would assume that I can only with the left mouse button select
> > -- a tag.
>
> The behaviour is not same if you clik on the cross area or on the Tags 
> name to get the pop-up menu with the right mouse button. I will take a
> look...

I'd also prefer if right-clicking would consequently *not* directly change any settings/selections anywhere in digiKam. In my view right-clicking should always just get contextual menues, help etc., but not do any other action.
This is what I ment in my Comment #20 here. 

But maybe this is "programming style philosophy" (I've been stumbling across similar behaviour in other apps, too) and as I have no clue about that I don't insist on this, although I'd prefer it the other way :-)

Daniel
Comment 57 Juergen Flosbach 2007-01-08 13:52:22 UTC
Hi Gilles

I got my backtrace ( with a bit in front of it )

My actions where :
start digikam ( I'm now in an image directory )
open right side tags-filter tab
click one tag
click the same tag again

Backtrace :
digikam: ImagePluginLoader: Loaded plugin ImagePlugin_ChannelMixer
digikam: ImagePlugin_Charcoal plugin loaded
digikam: ImagePluginLoader: Loaded plugin ImagePlugin_Charcoal

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912601770720 (LWP 4555)]
0x00002aaaaaeec905 in Digikam::NavigateBarWidget::setButtonsState (this=0xffffffffffffffff, itemType=1) at navigatebarwidget.cpp:133
133         d->itemType = itemType;
(gdb) bt
#0  0x00002aaaaaeec905 in Digikam::NavigateBarWidget::setButtonsState (this=0xffffffffffffffff, itemType=1) at navigatebarwidget.cpp:133
#1  0x00002aaaaaef5a11 in Digikam::NavigateBarTab::setNavigateBarState (this=0x984140, hasPrevious=false, hasNext=true) at navigatebartab.cpp:77
#2  0x00002aaaaaedf2ba in Digikam::ImagePropertiesSideBarDB::setPreviousNextState (this=0x7fbbc0, hasPrevious=false, hasNext=true)
    at imagepropertiessidebardb.cpp:181
#3  0x00002aaaaadd206f in Digikam::DigikamView::slotDispatchImageSelected (this=0x730ac0) at digikamview.cpp:629
#4  0x00002aaaaadd370b in Digikam::DigikamView::qt_invoke (this=0x730ac0, _id=95, _o=0x7fffffab5e70) at digikamview.moc:333
#5  0x00002aaaae756448 in QObject::activate_signal () from /usr/lib/qt3/lib64/libqt-mt.so.3
#6  0x00002aaaae75687d in QObject::activate_signal () from /usr/lib/qt3/lib64/libqt-mt.so.3
#7  0x00002aaaae776385 in QTimer::event () from /usr/lib/qt3/lib64/libqt-mt.so.3
#8  0x00002aaaae6fe8b3 in QApplication::internalNotify () from /usr/lib/qt3/lib64/libqt-mt.so.3
#9  0x00002aaaae6ff347 in QApplication::notify () from /usr/lib/qt3/lib64/libqt-mt.so.3
#10 0x00002aaaadb5018e in KApplication::notify () from /opt/kde3/lib64/libkdecore.so.4
#11 0x00002aaaae6f4877 in QEventLoop::activateTimers () from /usr/lib/qt3/lib64/libqt-mt.so.3
#12 0x00002aaaae6b3f73 in QEventLoop::processEvents () from /usr/lib/qt3/lib64/libqt-mt.so.3
#13 0x00002aaaae713771 in QEventLoop::enterLoop () from /usr/lib/qt3/lib64/libqt-mt.so.3
#14 0x00002aaaae713672 in QEventLoop::exec () from /usr/lib/qt3/lib64/libqt-mt.so.3
#15 0x000000000040307b in main (argc=1, argv=0x7fffffab6858) at main.cpp:270
(gdb)                                                                                           

END

Hope that helps.

Juergen
Comment 58 Juergen Flosbach 2007-01-08 13:58:41 UTC
Created attachment 19194 [details]
Backtrace crash on tags toggle

Digikam chrashes when tag in tags filter tab gets clicked twice.
Comment 59 caulier.gilles 2007-01-08 15:53:01 UTC
SVN commit 621274 by cgilles:

digiKam from trunk : Comments & Tags pop-up menu : add missing option to disable 'Toggle Auto' of Tags option.

CCBUGS: 139547

 M  +14 -8     imagedescedittab.cpp  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #621273:621274
@@ -670,11 +670,12 @@
 
     QPopupMenu toggleAutoMenu;
     toggleAutoMenu.setCheckable(true);
-    toggleAutoMenu.insertItem(i18n("Childs"),  21);
-    toggleAutoMenu.insertItem(i18n("Parents"), 22);
-    toggleAutoMenu.insertItem(i18n("Both"),    23);
-    if (d->toggleAutoTags != TagFilterView::NoToggleAuto)
-        toggleAutoMenu.setItemChecked(20 + d->toggleAutoTags, true);
+    toggleAutoMenu.insertItem(i18n("None"),    21);
+    toggleAutoMenu.insertSeparator(-1);
+    toggleAutoMenu.insertItem(i18n("Childs"),  22);
+    toggleAutoMenu.insertItem(i18n("Parents"), 23);
+    toggleAutoMenu.insertItem(i18n("Both"),    24);
+    toggleAutoMenu.setItemChecked(21 + d->toggleAutoTags, true);
     popmenu.insertItem(i18n("Toogle Auto"), &toggleAutoMenu);
 
     int choice = popmenu.exec((QCursor::pos()));
@@ -772,17 +773,22 @@
             item->setOn(false);            
             break;
         }
-        case 21:   // Toggle auto Childs tags.
+        case 21:   // No toggle auto tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
+            break;
+        }
+        case 22:   // Toggle auto Childs tags.
+        {
             d->toggleAutoTags = TagFilterView::Childs;
             break;
         }
-        case 22:   // Toggle auto Parents tags.
+        case 23:   // Toggle auto Parents tags.
         {
             d->toggleAutoTags = TagFilterView::Parents;
             break;
         }
-        case 23:   // Toggle auto Childs and Parents tags.
+        case 24:   // Toggle auto Childs and Parents tags.
         {
             d->toggleAutoTags = TagFilterView::ChildsAndParents;
             break;
Comment 60 caulier.gilles 2007-01-08 16:46:02 UTC
SVN commit 621305 by cgilles:

digiKam from trunk : Comments & Tags pop-up menu : disable Toogle Auto Tags option if user perform Select/Deselect of parents/childs.

CCBUGS: 139547

 M  +13 -1     imagedescedittab.cpp  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #621304:621305
@@ -120,7 +120,7 @@
 
     RatingWidget                  *ratingWidget;
 
-    TagFilterView::ToggleAutoTags  toggleAutoTags;
+    TagFilterView::ToggleAutoTags  toggleAutoTags;  
 };
 
 ImageDescEditTab::ImageDescEditTab(QWidget *parent, bool navBar)
@@ -678,6 +678,8 @@
     toggleAutoMenu.setItemChecked(21 + d->toggleAutoTags, true);
     popmenu.insertItem(i18n("Toogle Auto"), &toggleAutoMenu);
 
+    TagFilterView::ToggleAutoTags oldAutoTags = d->toggleAutoTags;            
+
     int choice = popmenu.exec((QCursor::pos()));
     switch( choice )
     {
@@ -730,6 +732,7 @@
         }
         case 16:   // Invert All Tags Selection.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             QListViewItemIterator it(d->tagsView);
             while (it.current())
             {
@@ -743,34 +746,43 @@
                 }
                 ++it;
             }
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 17:   // Select Child Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleChildTags(album, true);
             TAlbumCheckListItem *item = (TAlbumCheckListItem*)album->extraData(this);
             item->setOn(true);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 18:   // Deselect Child Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleChildTags(album, false);
             TAlbumCheckListItem *item = (TAlbumCheckListItem*)album->extraData(this);
             item->setOn(false);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 19:   // Select Parent Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleParentTags(album, true);
             TAlbumCheckListItem *item = (TAlbumCheckListItem*)album->extraData(this);
             item->setOn(true);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 20:   // Deselect Parent Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleParentTags(album, false);
             TAlbumCheckListItem *item = (TAlbumCheckListItem*)album->extraData(this);
             item->setOn(false);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 21:   // No toggle auto tags.
Comment 61 caulier.gilles 2007-01-08 17:18:39 UTC
SVN commit 621319 by cgilles:

digiKam from trunk : Comments & Tags pop-up menu : fix behaviour if Toggle Auto Tags == "Childs and Parents"

CCBUGS: 139547

 M  +8 -2      imagedescedittab.cpp  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #621318:621319
@@ -521,17 +521,23 @@
 
 void ImageDescEditTab::slotItemStateChanged(TAlbumCheckListItem *item)
 {
+    TagFilterView::ToggleAutoTags oldAutoTags = d->toggleAutoTags;     
+
     switch(d->toggleAutoTags)
     {
         case TagFilterView::Childs:
-            toggleChildTags(item->m_album, item->isOn());
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;            toggleChildTags(item->m_album, item->isOn());
+            d->toggleAutoTags = oldAutoTags;
             break;
         case TagFilterView::Parents:
-            toggleParentTags(item->m_album, item->isOn());
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;                        toggleParentTags(item->m_album, item->isOn());
+            d->toggleAutoTags = oldAutoTags;
             break;
         case TagFilterView::ChildsAndParents:
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;            
             toggleChildTags(item->m_album, item->isOn());
             toggleParentTags(item->m_album, item->isOn());
+            d->toggleAutoTags = oldAutoTags;
             break;
         default:
             break;
Comment 62 caulier.gilles 2007-01-08 17:22:26 UTC
SVN commit 621321 by cgilles:

digiKam from trunk : Tags Filter View pop-up menu : Backport all rencent changes from Comments & Tags po-up menu.

Note : TagFilterViewItem class use QCheckListItem::CheckBox instead QCheckListItem::CheckBoxController. Regression tests require.

Please give me a feedback if Tags Filter view work fine for you

CCBUGS: 139547

 M  +47 -15    tagfilterview.cpp  


--- trunk/extragear/graphics/digikam/digikam/tagfilterview.cpp #621320:621321
@@ -73,7 +73,7 @@
 
     TagFilterViewItem(QListView* parent, TAlbum* tag, bool untagged=false)
         : FolderCheckListItem(parent, tag ? tag->title() : i18n("Not Tagged"),
-                              QCheckListItem::CheckBoxController)
+                              QCheckListItem::CheckBox/*Controller*/)
     {
         m_tag      = tag;
         m_untagged = untagged;
@@ -84,7 +84,8 @@
     }
 
     TagFilterViewItem(QListViewItem* parent, TAlbum* tag)
-        : FolderCheckListItem(parent, tag->title(), QCheckListItem::CheckBoxController)
+        : FolderCheckListItem(parent, tag->title(), 
+                              QCheckListItem::CheckBox/*Controller*/)
     {
         m_tag      = tag;
         m_untagged = false;
@@ -98,6 +99,10 @@
     {
         QCheckListItem::stateChange(val);
 
+/* NOTE G.Caulier 2007/01/08: this code is now disable because TagFilterViewItem 
+                              have been changed from QCheckListItem::CheckBoxController 
+                              to QCheckListItem::CheckBox.
+ 
         // All TagFilterViewItems are CheckBoxControllers. If they have no children,
         // they should be of type CheckBox, but that is not possible with our way of adding items.
         // When clicked, children-less items first change to the NoChange state, and a second
@@ -107,6 +112,7 @@
         {
             setState(On);
         }
+*/
 
         ((TagFilterView*)listView())->stateChanged(this);
     }
@@ -249,17 +255,25 @@
 
 void TagFilterView::stateChanged(TagFilterViewItem* item)
 {
+    ToggleAutoTags oldAutoTags = d->toggleAutoTags;            
+
     switch(d->toggleAutoTags)
     {
         case Childs:
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleChildTags(item, item->isOn());
+            d->toggleAutoTags = oldAutoTags;
             break;
         case Parents:
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleParentTags(item, item->isOn());
+            d->toggleAutoTags = oldAutoTags;
             break;
         case ChildsAndParents:
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleChildTags(item, item->isOn());
             toggleParentTags(item, item->isOn());
+            d->toggleAutoTags = oldAutoTags;
             break;
         default:
             break;
@@ -626,20 +640,23 @@
 
     QPopupMenu toggleAutoMenu;
     toggleAutoMenu.setCheckable(true);
-    toggleAutoMenu.insertItem(i18n("Childs"),  21);
-    toggleAutoMenu.insertItem(i18n("Parents"), 22);
-    toggleAutoMenu.insertItem(i18n("Both"),    23);
-    if (d->toggleAutoTags != None)
-        toggleAutoMenu.setItemChecked(20 + d->toggleAutoTags, true);
+    toggleAutoMenu.insertItem(i18n("None"),    21);
+    toggleAutoMenu.insertSeparator(-1);
+    toggleAutoMenu.insertItem(i18n("Childs"),  22);
+    toggleAutoMenu.insertItem(i18n("Parents"), 23);
+    toggleAutoMenu.insertItem(i18n("Both"),    24);
+    toggleAutoMenu.setItemChecked(21 + d->toggleAutoTags, true);
     popmenu.insertItem(i18n("Toogle Auto"), &toggleAutoMenu);
 
     QPopupMenu matchingCongMenu;
     matchingCongMenu.setCheckable(true);
-    matchingCongMenu.insertItem(i18n("Or Between Tags"),  24);
-    matchingCongMenu.insertItem(i18n("And Between Tags"), 25);
-    matchingCongMenu.setItemChecked((d->matchingCond == AlbumLister::OrCondition) ? 24 : 25, true);
+    matchingCongMenu.insertItem(i18n("Or Between Tags"),  25);
+    matchingCongMenu.insertItem(i18n("And Between Tags"), 26);
+    matchingCongMenu.setItemChecked((d->matchingCond == AlbumLister::OrCondition) ? 25 : 26, true);
     popmenu.insertItem(i18n("Matching Condition"), &matchingCongMenu);
 
+    ToggleAutoTags oldAutoTags = d->toggleAutoTags;            
+
     int choice = popmenu.exec((QCursor::pos()));
     switch( choice )
     {
@@ -690,6 +707,7 @@
         }
         case 16:       // Invert All Tags Selection.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             QListViewItemIterator it(this);
             while (it.current())
             {
@@ -708,58 +726,72 @@
                 ++it;
             }
             triggerChange();
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 17:   // Select Child Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleChildTags(item, true);
             TagFilterViewItem *tItem = (TagFilterViewItem*)item->m_tag->extraData(this);
             tItem->setOn(true);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 18:   // Deselect Child Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleChildTags(item, false);
             TagFilterViewItem *tItem = (TagFilterViewItem*)item->m_tag->extraData(this);
             tItem->setOn(false);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 19:   // Select Parent Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleParentTags(item, true);
             TagFilterViewItem *tItem = (TagFilterViewItem*)item->m_tag->extraData(this);
             tItem->setOn(true);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
         case 20:   // Deselect Parent Tags.
         {
+            d->toggleAutoTags = TagFilterView::NoToggleAuto;
             toggleParentTags(item, false);
             TagFilterViewItem *tItem = (TagFilterViewItem*)item->m_tag->extraData(this);
             tItem->setOn(false);            
+            d->toggleAutoTags = oldAutoTags;
             break;
         }
-        case 21:   // Toggle auto Childs tags.
+        case 21:   // No toggle auto tags.
         {
+            d->toggleAutoTags = NoToggleAuto;
+            break;
+        }
+        case 22:   // Toggle auto Childs tags.
+        {
             d->toggleAutoTags = Childs;
             break;
         }
-        case 22:   // Toggle auto Parents tags.
+        case 23:   // Toggle auto Parents tags.
         {
             d->toggleAutoTags = Parents;
             break;
         }
-        case 23:   // Toggle auto Childs and Parents tags.
+        case 24:   // Toggle auto Childs and Parents tags.
         {
             d->toggleAutoTags = ChildsAndParents;
             break;
         }
-        case 24:    // Or Between Tags.
+        case 25:    // Or Between Tags.
         {
             d->matchingCond = AlbumLister::OrCondition;
             triggerChange();
             break;
         }
-        case 25:    // And Between Tags.
+        case 26:    // And Between Tags.
         {
             d->matchingCond = AlbumLister::AndCondition;
             triggerChange();
Comment 63 Juergen Flosbach 2007-01-08 18:06:34 UTC
Created attachment 19197 [details]
New backtrace

Hi Gilles

Last time I've send the backtrace in I generated this backtrace
according to "If you are experiencing crashes with digiKam"
information with gdb.
I'm not shure if this was something usefull when I compare it
with what I got now.
This time when digikam crashed I recognized the KDE crash
monitor.
This one generated the attached backtrace.

Source was this time the last svn with your new menue
entry in the comments/tags tab. The one with the "non"
entry in the tags pop-up menu.

That looks good.

Juergen
Comment 64 caulier.gilles 2007-01-08 18:49:56 UTC
Juergen,

Your previous bactrace is good, the new one is unsuitable. Please revert the obsolete attachement.

Also, the crash is not relevant of my changes in Comments & Tags pop-up menu. I suspect than the cras is relevant of the sidebar management from digiKam core where Marcel is under working to support multiple pictures selection with Comments & Tags. In some conditions, i can reproduce it, but it difficult to hack...

Marcel, please give me a feedback

Gilles
Comment 65 Juergen Flosbach 2007-01-08 19:41:40 UTC
Comment on attachment 19194 [details]
Backtrace crash on tags toggle

This is the good backtrace, the next one the unusable one.
Comment 66 Juergen Flosbach 2007-01-08 19:43:13 UTC
Comment on attachment 19197 [details]
New backtrace

The last backtrace was good. This one is unusable.
Comment 67 caulier.gilles 2007-01-08 21:37:26 UTC
SVN commit 621450 by cgilles:

digikam from trunk : Comments & Tags popup menu behaviours. Do not toogle the current Tags checkbox from treeview when user click with right mouse button to get popup menu.
CCBUGS: 139547

 M  +12 -2     talbumlistview.cpp  


--- trunk/extragear/graphics/digikam/libs/imageproperties/talbumlistview.cpp #621449:621450
@@ -166,15 +166,25 @@
 
 void TAlbumListView::contentsMousePressEvent(QMouseEvent *e)
 {
-    QListView::contentsMousePressEvent(e);
     QPoint vp = contentsToViewport(e->pos());
     TAlbumCheckListItem *item = dynamic_cast<TAlbumCheckListItem*>(itemAt(vp));
+
+    if(item && e->button() == RightButton) 
+    {
+        bool isOn = item->isOn();
+        QListView::contentsMousePressEvent(e);
+        // Restore the status of checkbox. 
+        item->setOn(isOn);
+        return;
+    }
+
     if(item && e->button() == LeftButton) 
     {
         m_dragStartPos = e->pos();
         m_dragItem     = item;
-        return;
     }
+
+    QListView::contentsMousePressEvent(e);
 }
 
 void TAlbumListView::contentsMouseReleaseEvent(QMouseEvent *e)
Comment 68 caulier.gilles 2007-01-08 21:46:39 UTC
SVN commit 621456 by cgilles:

digikam from trunk : Tags Filter View popup menu behaviours. Do not toogle the current Tags checkbox from treeview when user click with right mouse button to get popup menu.
CCBUGS: 139547

 M  +17 -0     tagfilterview.cpp  
 M  +1 -0      tagfilterview.h  


--- trunk/extragear/graphics/digikam/digikam/tagfilterview.cpp #621455:621456
@@ -287,6 +287,23 @@
     d->timer->start(50, true);
 }
 
+void TagFilterView::contentsMousePressEvent(QMouseEvent *e)
+{
+    QPoint vp = contentsToViewport(e->pos());
+    TagFilterViewItem *item = dynamic_cast<TagFilterViewItem*>(itemAt(vp));
+
+    if(item && e->button() == RightButton) 
+    {
+        bool isOn = item->isOn();
+        QListView::contentsMousePressEvent(e);
+        // Restore the status of checkbox. 
+        item->setOn(isOn);
+        return;
+    }
+
+    QListView::contentsMousePressEvent(e);
+}
+
 QDragObject* TagFilterView::dragObject()
 {
     QValueList<int> dragTagIDs;
--- trunk/extragear/graphics/digikam/digikam/tagfilterview.h #621455:621456
@@ -60,6 +60,7 @@
     QDragObject* dragObject();
     bool acceptDrop(const QDropEvent *e) const;
     void contentsDropEvent(QDropEvent *e);
+    void contentsMousePressEvent(QMouseEvent *e);
 
 private slots:
 
Comment 69 Marcel Wiesweg 2007-01-08 23:28:01 UTC
SVN commit 621508 by mwiesweg:

Attempt to fix the crash:
Use dynamic_cast here as well, the assumption that all tabs are known was wrong (and fixed in other places)

CCBUG: 139547


 M  +1 -1      imagepropertiessidebardb.cpp  


--- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiessidebardb.cpp #621507:621508
@@ -175,7 +175,7 @@
     d->hasPrevious = hasPrevious;
     d->hasNext     = hasNext;
 
-    NavigateBarTab *navtab = static_cast<NavigateBarTab *>(getActiveTab());
+    NavigateBarTab *navtab = dynamic_cast<NavigateBarTab *>(getActiveTab());
     if (navtab)
     {
         navtab->setNavigateBarState(d->hasPrevious, d->hasNext);
Comment 70 caulier.gilles 2007-01-09 07:41:37 UTC
Thanks Marcel,

Juergen, the crash is now fixed for you using the current svn implementation ?

Gilles
Comment 71 Juergen Flosbach 2007-01-09 09:17:41 UTC
Hallo Gilles, Marcel

Thanks to the crashfree version. I've tested it
and couldn't reproduce the crash.
And with my original whish come true I would say
let's close this bug report.

Juergen
Comment 72 caulier.gilles 2007-01-09 09:20:12 UTC
Juergen, 

have you tested all my recents changes ? All work fine for you ?

Gilles
Comment 73 Juergen Flosbach 2007-01-09 09:44:23 UTC
Gilles

Yes.

I tested all changes and it loks very good to me.

P.S. D&D from comments/tags tab would be nice
( Child plus parents ) but this was not what I
whished for originaly.

Thanks again to the entire digikam team.

Juergen
Comment 74 Arnd Baecker 2007-01-09 10:27:47 UTC
> P.S. D&D from comments/tags tab would be nice
> ( Child plus parents ) but this was not what I
> whished for originaly.


For comments/tags moving tags around used to work,
but it does not anymore.
For the Tag-Filter it would be a nice addition so
that all the three tag-views behave the same.
Comment 75 caulier.gilles 2007-02-23 21:39:48 UTC
SVN commit 636689 by cgilles:

digikam from trunk : Comments & Tags popup menu behaviours. Do not toogle the current Tags checkbox from treeview when user click with right mouse button to get popup menu.
CCBUGS: 139547

 M  +2 -1      NEWS  


--- trunk/extragear/graphics/digikam/NEWS #636688:636689
@@ -654,6 +654,7 @@
 296 ==> 141980 : digiKam crash when rescan certain files exiv2.
 297 ==> 141924 : Tags preview not updated in last image of album.
 298 ==> 139024 : Camera GUI new items selection doesn't work.
-299 ==> 
+299 ==> 142109 : Turn under/over exposure display on/off by click on corresponding icons.
+300 ==> 
 
 ----------------------------------------------------------------------------------------------------