After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 356718 - Sorting images by comment
Sorting images by comment
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.6.x
Other All
: Normal enhancement
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
: 336978 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-19 12:26 UTC by David Kiliani
Modified: 2006-11-07 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gthumb 2.6.9 to include comment sorting of images (9.04 KB, patch)
2006-09-19 12:28 UTC, David Kiliani
none Details | Review
Patch for gthumb CVS to include comment sorting of images (5.37 KB, patch)
2006-11-02 09:24 UTC, David Kiliani
none Details | Review
Patch for gnome gthumb CVS to include comment sorting of images (9.12 KB, patch)
2006-11-03 08:50 UTC, David Kiliani
none Details | Review
Comment sorting patch, v2. (10.73 KB, patch)
2006-11-06 21:38 UTC, Michael Chudobiak
none Details | Review

Description David Kiliani 2006-09-19 12:26:49 UTC
I added a menu item to sort images by image comment, very useful if the comment field is used for classification of pictures.
Patch attached, please review / include.
Comment 1 David Kiliani 2006-09-19 12:28:08 UTC
Created attachment 73032 [details] [review]
Patch for gthumb 2.6.9 to include comment sorting of images
Comment 2 Michael Chudobiak 2006-09-21 17:21:55 UTC
*** Bug 336978 has been marked as a duplicate of this bug. ***
Comment 3 Michael Chudobiak 2006-11-01 20:42:47 UTC
This doesn't patch cleanly against CVS HEAD. Can you update your patch, and I'll take another look at committing it?

- Mike
Comment 4 David Kiliani 2006-11-02 09:23:19 UTC
I rewrote the patch against CVS HEAD. Unfortunately HEAD doesn't compile on my system, so I have to hope I made no errors.
Comment 5 David Kiliani 2006-11-02 09:24:54 UTC
Created attachment 75827 [details] [review]
Patch for gthumb CVS to include comment sorting of images
Comment 6 Michael Chudobiak 2006-11-02 12:39:08 UTC
I'll take a look at it. What compilation problems are you having?

- Mike
Comment 7 Michael Chudobiak 2006-11-02 21:22:09 UTC
David,

Your last patch doesn't apply to CVS HEAD. I guess a lot has changed since 2.6.9. For instance, the typedefs are totally different now:

typedef enum { /*< skip >*/
        GTH_SORT_METHOD_NONE,
        GTH_SORT_METHOD_BY_NAME,
        GTH_SORT_METHOD_BY_PATH,
        GTH_SORT_METHOD_BY_SIZE,
        GTH_SORT_METHOD_BY_TIME,
        GTH_SORT_METHOD_MANUAL
} GthSortMethod;

Also, you'll need to modify data/gthumb.schemas.in.

- Mike
Comment 8 David Kiliani 2006-11-03 08:50:25 UTC
Created attachment 75916 [details] [review]
Patch for gnome gthumb CVS to include comment sorting of images

Sorry, I checked out the 4 year old SF CVS HEAD last time. This should be better.
Comment 9 Michael Chudobiak 2006-11-03 13:17:11 UTC
Ah, that's better!

Two comments:

1) I think the comment comparison code should use g_utf8_casefold + g_utf8_collate (instead of just strcmp), to allow case-insensitivity and unicode handling. See http://developer.gnome.org/doc/API/2.0/glib/glib-Unicode-Manipulation.html#g-utf8-casefold.

2) Please update data/gthumb.schemas.in to reflect the new option for /apps/gthumb/browser/arrange_images.

- Mike
Comment 10 Michael Chudobiak 2006-11-06 21:38:18 UTC
Created attachment 76115 [details] [review]
Comment sorting patch, v2.

This patch corrects a number of errors in the earlier version. It requires further testing. Please test against CVS head.

- Mike
Comment 11 Michael Chudobiak 2006-11-07 01:26:05 UTC
I've committed a patch with further corrections. Please test the sort-by-comment feature when viewing as a list, viewing as slides, exporting to a web album, and generating an index image. Use CVS HEAD.

- Mike