aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-attachment.c')
-rw-r--r--widgets/misc/e-attachment.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index 92ebd36be4..ee5446e699 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -347,6 +347,7 @@ attachment_set_file_info (EAttachment *attachment,
GFileInfo *file_info)
{
GtkTreeRowReference *reference;
+ GIcon *icon;
reference = e_attachment_get_reference (attachment);
@@ -358,6 +359,13 @@ attachment_set_file_info (EAttachment *attachment,
attachment->priv->file_info = file_info;
+ /* If the GFileInfo contains a GThemedIcon, append a
+ * fallback icon name to ensure we display something. */
+ icon = g_file_info_get_icon (file_info);
+ if (G_IS_THEMED_ICON (icon))
+ g_themed_icon_append_name (
+ G_THEMED_ICON (icon), DEFAULT_ICON_NAME);
+
g_object_notify (G_OBJECT (attachment), "file-info");
/* Tell the EAttachmentStore its total size changed. */