aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-attachment-bar.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2000-10-11 07:58:49 +0800
committerIain Holmes <iain@src.gnome.org>2000-10-11 07:58:49 +0800
commitfcfe968ab56dfa2493265a83a1227c2849328a63 (patch)
treeb164ec5e9bdb494b8ce99bd5463184b079f6cfec /composer/e-msg-composer-attachment-bar.c
parent169085b6806eac8a49ab32ee6b7aba6c530a39ea (diff)
downloadgsoc2013-evolution-fcfe968ab56dfa2493265a83a1227c2849328a63.tar
gsoc2013-evolution-fcfe968ab56dfa2493265a83a1227c2849328a63.tar.gz
gsoc2013-evolution-fcfe968ab56dfa2493265a83a1227c2849328a63.tar.bz2
gsoc2013-evolution-fcfe968ab56dfa2493265a83a1227c2849328a63.tar.lz
gsoc2013-evolution-fcfe968ab56dfa2493265a83a1227c2849328a63.tar.xz
gsoc2013-evolution-fcfe968ab56dfa2493265a83a1227c2849328a63.tar.zst
gsoc2013-evolution-fcfe968ab56dfa2493265a83a1227c2849328a63.zip
Handle missing icons better.
svn path=/trunk/; revision=5827
Diffstat (limited to 'composer/e-msg-composer-attachment-bar.c')
-rw-r--r--composer/e-msg-composer-attachment-bar.c17
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);