diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-04-24 21:18:58 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-04-24 21:18:58 +0800 |
commit | 8ea9f9377f071d4e8088e5c744e5470ccddb0fb1 (patch) | |
tree | e932d7b46451146ad6b3f0187819c6261631f958 /widgets/misc/e-attachment.c | |
parent | 3de59d003f6ed27bc383604bdcd45e2c7279298c (diff) | |
download | gsoc2013-evolution-8ea9f9377f071d4e8088e5c744e5470ccddb0fb1.tar gsoc2013-evolution-8ea9f9377f071d4e8088e5c744e5470ccddb0fb1.tar.gz gsoc2013-evolution-8ea9f9377f071d4e8088e5c744e5470ccddb0fb1.tar.bz2 gsoc2013-evolution-8ea9f9377f071d4e8088e5c744e5470ccddb0fb1.tar.lz gsoc2013-evolution-8ea9f9377f071d4e8088e5c744e5470ccddb0fb1.tar.xz gsoc2013-evolution-8ea9f9377f071d4e8088e5c744e5470ccddb0fb1.tar.zst gsoc2013-evolution-8ea9f9377f071d4e8088e5c744e5470ccddb0fb1.zip |
Fix a couple attachment issues
Add a fallback icon name to attachments with GThemedIcons, just in case
there's a problem loading the MIME type icon. I seen this when I build
GTK+ locally and it can't find gnome-icon-theme icons. Also, fix a
packing issue in EAttachmentPaned. CompEditor's attachment bar is still
having problems, however.
Diffstat (limited to 'widgets/misc/e-attachment.c')
-rw-r--r-- | widgets/misc/e-attachment.c | 8 |
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. */ |