diff options
Diffstat (limited to 'composer/e-msg-composer-attachment-bar.c')
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index 3743c310af..0a7428b2ea 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -305,7 +305,22 @@ update (EMsgComposerAttachmentBar *bar) if (image) { e_icon_list_append_pixbuf (icon_list, attachment->pixbuf_cache, icon_name, label); } else { - e_icon_list_append (icon_list, icon_name, label); + if (icon_name) + pixbuf = gdk_pixbuf_new_from_file (icon_name); + else + pixbuf = NULL; + + /* Get the default */ + if (pixbuf == NULL) { + icon_name = gnome_vfs_mime_get_value ("text/plain", + "icon-filename"); + if (icon_name != NULL) + pixbuf = gdk_pixbuf_new_from_file (icon_name); + } + e_icon_list_append_pixbuf (icon_list, pixbuf, + icon_name, label); + if (pixbuf) + gdk_pixbuf_unref (pixbuf); } g_free (label); |