diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-03-26 12:48:21 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-03-26 12:48:21 +0800 |
commit | c05c973cff53769ef575bfc5257a2a414117b323 (patch) | |
tree | 0fbf2bedde0eccc6062d2240890ab53875f6aa71 /widgets/misc/e-attachment-dialog.c | |
parent | 6e163b39c75dbba470d073b4f79a897aa6fb0e54 (diff) | |
download | gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.gz gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.bz2 gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.lz gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.xz gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.zst gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.zip |
Saving progress again on the attachment rewrite.
svn path=/branches/kill-bonobo/; revision=37476
Diffstat (limited to 'widgets/misc/e-attachment-dialog.c')
-rw-r--r-- | widgets/misc/e-attachment-dialog.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/widgets/misc/e-attachment-dialog.c b/widgets/misc/e-attachment-dialog.c index da3c3a855c..a844c228eb 100644 --- a/widgets/misc/e-attachment-dialog.c +++ b/widgets/misc/e-attachment-dialog.c @@ -58,20 +58,24 @@ attachment_dialog_update (EAttachmentDialog *dialog) attachment = e_attachment_dialog_get_attachment (dialog); - if (E_IS_ATTACHMENT (attachment)) { + if (attachment != NULL) { file_info = e_attachment_get_file_info (attachment); - content_type = e_attachment_get_content_type (attachment); - display_name = e_attachment_get_display_name (attachment); description = e_attachment_get_description (attachment); disposition = e_attachment_get_disposition (attachment); } else { file_info = NULL; - content_type = NULL; - display_name = NULL; description = NULL; disposition = NULL; } + if (file_info != NULL) { + content_type = g_file_info_get_content_type (file_info); + display_name = g_file_info_get_display_name (file_info); + } else { + content_type = NULL; + display_name = NULL; + } + if (content_type != NULL) { gchar *comment; gchar *mime_type; |