aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-07-03 20:29:24 +0800
committerDan Winship <danw@src.gnome.org>2003-07-03 20:29:24 +0800
commit994243e216d8349af1a416e9222f4f66f4c45b12 (patch)
treea14b8a265e9863e2da878b6d846f70d879919bab /mail/mail-display.c
parentccee5f3d1d15fbbe7bc42df7ceccf300da8d544c (diff)
downloadgsoc2013-evolution-994243e216d8349af1a416e9222f4f66f4c45b12.tar.gz
gsoc2013-evolution-994243e216d8349af1a416e9222f4f66f4c45b12.tar.zst
gsoc2013-evolution-994243e216d8349af1a416e9222f4f66f4c45b12.zip
Gone (pixbuf_gen_idle): Use e_icon_for_mime_type instead.
* mail-display.c (pixbuf_for_mime_type): Gone (pixbuf_gen_idle): Use e_icon_for_mime_type instead. svn path=/trunk/; revision=21736
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c60
1 files changed, 2 insertions, 58 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 543ff7279b..634542cd51 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -41,7 +41,6 @@
#include <gconf/gconf.h>
#include <gconf/gconf-client.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libgnome/gnome-url.h>
#include <bonobo/bonobo-exception.h>
@@ -65,6 +64,7 @@
#include <libsoup/soup-message.h>
+#include "e-util/e-gui-utils.h"
#include "e-util/e-mktemp.h"
#include "addressbook/backend/ebook/e-book-util.h"
@@ -81,8 +81,6 @@
#include "camel/camel-data-cache.h"
-#include "art/empty.xpm"
-
#define d(x)
struct _MailDisplayPrivate {
@@ -549,60 +547,6 @@ pixmap_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
return TRUE;
}
-static GdkPixbuf *
-pixbuf_for_mime_type (const char *mime_type)
-{
- const char *icon_name;
- char *filename = NULL;
- GdkPixbuf *pixbuf = NULL;
-
- icon_name = gnome_vfs_mime_get_icon (mime_type);
-
- if (icon_name) {
- if (*icon_name == '/') {
- pixbuf = gdk_pixbuf_new_from_file (icon_name, NULL);
- if (pixbuf)
- return pixbuf;
- }
-
- filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
- icon_name, TRUE, NULL);
- if (!filename) {
- char *fm_icon;
-
- fm_icon = g_strdup_printf ("nautilus/%s", icon_name);
- filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
- fm_icon, TRUE, NULL);
- if (!filename) {
- g_free (fm_icon);
- fm_icon = g_strdup_printf ("mc/%s", icon_name);
- filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
- fm_icon, TRUE, NULL);
- }
- g_free (fm_icon);
- }
-
- if (filename) {
- pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
- g_free (filename);
- }
- }
-
- if (!pixbuf) {
- filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP,
- "gnome-unknown.png", TRUE, NULL);
- if (filename) {
- pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
- g_free (filename);
- } else {
- g_warning ("Could not get any icon for %s!",mime_type);
- pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)empty_xpm);
- }
- }
-
- return pixbuf;
-}
-
static gboolean
pixbuf_uncache (gpointer key)
{
@@ -686,7 +630,7 @@ pixbuf_gen_idle (struct _PixbufLoader *pbl)
if (error || !pbl->mstream) {
if (pbl->type)
- pixbuf = pixbuf_for_mime_type (pbl->type);
+ pixbuf = e_icon_for_mime_type (pbl->type, 24);
else
pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_ICONSDIR "/pgp-signature-nokey.png", NULL);
} else