diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-05-23 00:11:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-05-24 06:14:11 +0800 |
commit | 2d1ecb2c04629eb0ba6a52fbde16feae21b01484 (patch) | |
tree | 3c94cb69d7113dd7a02384d90fc60799dd90d9a5 /calendar/gui | |
parent | eecfcd709089a894ee7600577d1a56dec41121e2 (diff) | |
download | gsoc2013-evolution-2d1ecb2c04629eb0ba6a52fbde16feae21b01484.tar gsoc2013-evolution-2d1ecb2c04629eb0ba6a52fbde16feae21b01484.tar.gz gsoc2013-evolution-2d1ecb2c04629eb0ba6a52fbde16feae21b01484.tar.bz2 gsoc2013-evolution-2d1ecb2c04629eb0ba6a52fbde16feae21b01484.tar.lz gsoc2013-evolution-2d1ecb2c04629eb0ba6a52fbde16feae21b01484.tar.xz gsoc2013-evolution-2d1ecb2c04629eb0ba6a52fbde16feae21b01484.tar.zst gsoc2013-evolution-2d1ecb2c04629eb0ba6a52fbde16feae21b01484.zip |
Attachment-related cleanups.
(cherry picked from commit 256422cab27d0b7adbe99fdeaceb72cd78c129bb)
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index a4c6ea437b..6a8e2ae09f 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -3240,7 +3240,7 @@ attachment_loaded_cb (EAttachment *attachment, */ file_info = e_attachment_get_file_info (attachment); - if (!file_info) { + if (file_info == NULL) { /* failed to load an attachment file */ e_attachment_load_handle_error (attachment, result, parent); return; @@ -3728,7 +3728,8 @@ comp_editor_get_mime_attach_list (CompEditor *editor) CamelStream *stream; GByteArray *byte_array; guchar *buffer = NULL; - const gchar *desc, *disp; + const gchar *description; + const gchar *disposition; gint column_id; column_id = E_ATTACHMENT_STORE_COLUMN_ATTACHMENT; @@ -3757,18 +3758,19 @@ comp_editor_get_mime_attach_list (CompEditor *editor) cal_mime_attach->length = byte_array->len; cal_mime_attach->filename = g_strdup (camel_mime_part_get_filename (mime_part)); - desc = camel_mime_part_get_description (mime_part); - if (!desc || *desc == '\0') - desc = _("attachment"); - cal_mime_attach->description = g_strdup (desc); + description = camel_mime_part_get_description (mime_part); + if (description == NULL || *description == '\0') + description = _("attachment"); + cal_mime_attach->description = g_strdup (description); cal_mime_attach->content_type = g_strdup ( camel_data_wrapper_get_mime_type (wrapper)); cal_mime_attach->content_id = g_strdup ( camel_mime_part_get_content_id (mime_part)); - disp = camel_mime_part_get_disposition (mime_part); - if (disp && !g_ascii_strcasecmp (disp, "inline")) - cal_mime_attach->disposition = TRUE; + disposition = camel_mime_part_get_disposition (mime_part); + cal_mime_attach->disposition = + (disposition != NULL) && + (g_ascii_strcasecmp (disposition, "inline") == 0); attach_list = g_slist_append (attach_list, cal_mime_attach); |