aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-23 00:11:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-24 04:36:01 +0800
commit256422cab27d0b7adbe99fdeaceb72cd78c129bb (patch)
tree8d087e570e7656e7d088232d98c52636c95baed0 /calendar
parent37c5951635a4f45ba26b0f95ce7af61275d47fba (diff)
downloadgsoc2013-evolution-256422cab27d0b7adbe99fdeaceb72cd78c129bb.tar.gz
gsoc2013-evolution-256422cab27d0b7adbe99fdeaceb72cd78c129bb.tar.zst
gsoc2013-evolution-256422cab27d0b7adbe99fdeaceb72cd78c129bb.zip
Attachment-related cleanups.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/comp-editor.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index abbf737206..778e69008d 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -3209,7 +3209,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;
@@ -3697,7 +3697,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;
@@ -3726,18 +3727,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);