[gthumb] Remember to call gth_monitor_notify_update_metadata, bug 583833
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Remember to call gth_monitor_notify_update_metadata, bug 583833
- Date: Sat, 30 May 2009 08:02:54 -0400 (EDT)
commit 5308a50283e206cf5dc66146e6ff707edee2b323
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Sat May 30 08:02:30 2009 -0400
Remember to call gth_monitor_notify_update_metadata, bug 583833
---
libgthumb/comments.c | 44 +++++++++++++++++++-------------------------
1 files changed, 19 insertions(+), 25 deletions(-)
diff --git a/libgthumb/comments.c b/libgthumb/comments.c
index 209cd07..d91c264 100644
--- a/libgthumb/comments.c
+++ b/libgthumb/comments.c
@@ -628,23 +628,20 @@ comments_save_comment (const char *uri,
comment_data_free_keywords (data_without_tags);
save_comment (uri, data_without_tags, TRUE);
comment_data_free (data_without_tags);
-
- return;
- }
-
- comment_data_free_comment (new_data);
-
- if (data != NULL) {
- if (data->place != NULL)
- new_data->place = g_strdup (data->place);
- if (data->time >= 0)
- new_data->time = data->time;
- if (data->comment != NULL)
- new_data->comment = g_strdup (data->comment);
+ } else {
+ comment_data_free_comment (new_data);
+ if (data != NULL) {
+ if (data->place != NULL)
+ new_data->place = g_strdup (data->place);
+ if (data->time >= 0)
+ new_data->time = data->time;
+ if (data->comment != NULL)
+ new_data->comment = g_strdup (data->comment);
+ }
+ save_comment (uri, new_data, TRUE);
+ comment_data_free (new_data);
}
- save_comment (uri, new_data, TRUE);
- comment_data_free (new_data);
gth_monitor_notify_update_metadata (uri);
}
@@ -705,18 +702,15 @@ comments_save_tags (const char *uri,
comment_data_free_comment (data_without_comment);
save_comment (uri, data_without_comment, TRUE);
comment_data_free (data_without_comment);
-
- return;
- }
-
- comment_data_free_keywords (new_data);
-
- for (tmp = data->keywords; tmp; tmp = g_slist_next (tmp)) {
- new_data->keywords = g_slist_append (new_data->keywords, g_strdup (tmp->data));
+ } else {
+ comment_data_free_keywords (new_data);
+ for (tmp = data->keywords; tmp; tmp = g_slist_next (tmp)) {
+ new_data->keywords = g_slist_append (new_data->keywords, g_strdup (tmp->data));
+ }
+ save_comment (uri, new_data, TRUE);
+ comment_data_free (new_data);
}
- save_comment (uri, new_data, TRUE);
- comment_data_free (new_data);
gth_monitor_notify_update_metadata (uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]