[evolution] Bug #601218 - Accepted meeting doesn't show attachments in calendar view
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Bug #601218 - Accepted meeting doesn't show attachments in calendar view
- Date: Tue, 10 Nov 2009 13:27:22 +0000 (UTC)
commit 26889bef61bc32efd202bad6e736ac2fcaf586e0
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 10 14:26:19 2009 +0100
Bug #601218 - Accepted meeting doesn't show attachments in calendar view
calendar/gui/dialogs/comp-editor.c | 9 ++++++++-
widgets/misc/e-attachment.c | 6 +++---
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 4d3c0af..99dc3ea 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -2452,6 +2452,12 @@ attachment_loaded_cb (EAttachment *attachment,
*/
file_info = e_attachment_get_file_info (attachment);
+ if (!file_info) {
+ /* failed to load an attachment file */
+ e_attachment_load_handle_error (attachment, result, parent);
+ return;
+ }
+
display_name = g_file_info_get_display_name (file_info);
uid = g_object_get_data (G_OBJECT (attachment), "uid");
@@ -2703,12 +2709,13 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
for (attach = mime_attach_list; attach; attach = attach->next) {
struct CalMimeAttach *cma = (struct CalMimeAttach *) attach->data;
- attach_list = g_slist_append (attach_list, cma->content_id);
+ attach_list = g_slist_append (attach_list, g_strconcat ("cid:", cma->content_id, NULL));
}
if (attach_list) {
e_cal_component_set_attachment_list (send_comp, attach_list);
+ g_slist_foreach (attach_list, (GFunc) g_free, NULL);
g_slist_free (attach_list);
}
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index 44bf29c..1fec792 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -1699,12 +1699,12 @@ attachment_load_query_info_cb (GFile *file,
cancellable = attachment->priv->cancellable;
file_info = g_file_query_info_finish (file, result, &error);
- attachment_set_file_info (attachment, file_info);
- load_context->file_info = file_info;
-
if (attachment_load_check_for_error (load_context, error))
return;
+ attachment_set_file_info (attachment, file_info);
+ load_context->file_info = file_info;
+
load_context->total_num_bytes = g_file_info_get_size (file_info);
g_file_read_async (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]