[gthumb] Fix crash on click on "tags" in photo importer (Bug 584918)
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Fix crash on click on "tags" in photo importer (Bug 584918)
- Date: Mon, 8 Jun 2009 14:41:28 -0400 (EDT)
commit 5e0636299ebda87cf3fc368ba225c2eb06fbc047
Author: Marc Pavot <marc pavot gmail com>
Date: Mon Jun 8 19:56:50 2009 +0200
Fix crash on click on "tags" in photo importer (Bug 584918)
---
src/dlg-tags.c | 46 +++++++++++++++++++++++-----------------------
1 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/dlg-tags.c b/src/dlg-tags.c
index 3bc9d36..1466cc8 100644
--- a/src/dlg-tags.c
+++ b/src/dlg-tags.c
@@ -741,35 +741,35 @@ dlg_tags_update (GtkWidget *dlg)
CommentData *first_data = file_data_get_comment (data->file_list->data, TRUE);
all_tags = g_slist_copy (first_data->keywords);
partial_tags = g_slist_copy (first_data->keywords);
- }
- /* Loop on all other files */
- for (scan = data->file_list->next; scan; scan = scan->next) {
- CommentData *scan_cdata;
+ /* Loop on all other files */
+ for (scan = data->file_list->next; scan; scan = scan->next) {
+ CommentData *scan_cdata;
- scan_cdata = file_data_get_comment (scan->data, TRUE);
+ scan_cdata = file_data_get_comment (scan->data, TRUE);
- if (!scan_cdata) {
- /* No comment in this file: empty all_tags */
- g_slist_free (all_tags);
- all_tags = NULL;
- continue;
- }
+ if (!scan_cdata) {
+ /* No comment in this file: empty all_tags */
+ g_slist_free (all_tags);
+ all_tags = NULL;
+ continue;
+ }
- /* Remove a tag from all_tags if it is not present in current file */
- for (tmp = all_tags; tmp; tmp = g_slist_next (tmp)) {
- if (!g_slist_find_custom (scan_cdata->keywords, tmp->data, (GCompareFunc) strcmp))
- all_tags = g_slist_remove (all_tags, tmp->data);
- }
+ /* Remove a tag from all_tags if it is not present in current file */
+ for (tmp = all_tags; tmp; tmp = g_slist_next (tmp)) {
+ if (!g_slist_find_custom (scan_cdata->keywords, tmp->data, (GCompareFunc) strcmp))
+ all_tags = g_slist_remove (all_tags, tmp->data);
+ }
- /* Add all tags to partial_tags */
- for (tmp = scan_cdata->keywords; tmp; tmp = g_slist_next (tmp)) {
- char *keyword = tmp->data;
+ /* Add all tags to partial_tags */
+ for (tmp = scan_cdata->keywords; tmp; tmp = g_slist_next (tmp)) {
+ char *keyword = tmp->data;
- if (!g_slist_find_custom (partial_tags, keyword, (GCompareFunc) strcmp))
- partial_tags = g_slist_prepend (partial_tags, keyword);
- }
- }
+ if (!g_slist_find_custom (partial_tags, keyword, (GCompareFunc) strcmp))
+ partial_tags = g_slist_prepend (partial_tags, keyword);
+ }
+ }
+ }
/* Remove tags from partial_tags if they are already in all_tags */
for (tmp = all_tags; tmp; tmp = g_slist_next (tmp))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]