diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-04-28 23:58:43 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-04-28 23:58:43 +0800 |
commit | d4876ac1ade43af853f5e0e47a73f9532211f214 (patch) | |
tree | 3c03e30db209968a166778b45ada7f36f9fe2b30 | |
parent | 89aadcbd295adee56b379dbd14802d745910d58c (diff) | |
download | gsoc2013-evolution-d4876ac1ade43af853f5e0e47a73f9532211f214.tar gsoc2013-evolution-d4876ac1ade43af853f5e0e47a73f9532211f214.tar.gz gsoc2013-evolution-d4876ac1ade43af853f5e0e47a73f9532211f214.tar.bz2 gsoc2013-evolution-d4876ac1ade43af853f5e0e47a73f9532211f214.tar.lz gsoc2013-evolution-d4876ac1ade43af853f5e0e47a73f9532211f214.tar.xz gsoc2013-evolution-d4876ac1ade43af853f5e0e47a73f9532211f214.tar.zst gsoc2013-evolution-d4876ac1ade43af853f5e0e47a73f9532211f214.zip |
If we fail to load the icon that gnome_vfs_get_icon() gave us, the default
2003-04-25 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): If we
fail to load the icon that gnome_vfs_get_icon() gave us, the
default back to gnome-unknown.png. This is the only POSSIBLE way
for Anna to be getting a NULL pixbuf if she has gnome-unknown.png
that I can see. Should fix bug #41513.
svn path=/trunk/; revision=20982
-rw-r--r-- | composer/ChangeLog | 8 | ||||
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index b7d6f1f8e3..d8ed8a6599 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,11 @@ +2003-04-25 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): If we + fail to load the icon that gnome_vfs_get_icon() gave us, the + default back to gnome-unknown.png. This is the only POSSIBLE way + for Anna to be getting a NULL pixbuf if she has gnome-unknown.png + that I can see. Should fix bug #41513. + 2003-04-23 Not Zed <NotZed@Ximian.com> * e-msg-composer.c (map_default_cb): removed debug printfs. diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index 0d064a4ede..6db77b7a5c 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -249,8 +249,13 @@ pixbuf_for_mime_type (const char *mime_type) } } - if (!filename) - filename = gnome_pixmap_file ("gnome-unknown.png"); + if (filename && (pixbuf = gdk_pixbuf_new_from_file (filename, NULL))) { + g_free (filename); + return pixbuf; + } + + g_free (filename); + filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "gnome-unknown.png", TRUE, NULL); pixbuf = gdk_pixbuf_new_from_file (filename, NULL); g_free (filename); |