diff options
author | Dan Winship <danw@src.gnome.org> | 2003-07-03 20:29:11 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-07-03 20:29:11 +0800 |
commit | ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c (patch) | |
tree | 7f2b2356492bc3802187d69ee6bfab327b1a57c6 /composer | |
parent | 425cd47d6eadcbd2c3f1a555611593ba5a44abf0 (diff) | |
download | gsoc2013-evolution-ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c.tar gsoc2013-evolution-ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c.tar.gz gsoc2013-evolution-ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c.tar.bz2 gsoc2013-evolution-ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c.tar.lz gsoc2013-evolution-ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c.tar.xz gsoc2013-evolution-ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c.tar.zst gsoc2013-evolution-ccee5f3d1d15fbbe7bc42df7ceccf300da8d544c.zip |
Gone. (update): Use e_icon_for_mime_type instead.
* e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): Gone.
(update): Use e_icon_for_mime_type instead.
* Makefile.am (INCLUDES): remove EVOLUTION_IMAGESDIR define
svn path=/trunk/; revision=21735
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 7 | ||||
-rw-r--r-- | composer/Makefile.am | 1 | ||||
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 63 |
3 files changed, 9 insertions, 62 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 7d4a19afbd..e5f4116d8a 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,10 @@ +2003-07-01 Dan Winship <danw@ximian.com> + + * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): Gone. + (update): Use e_icon_for_mime_type instead. + + * Makefile.am (INCLUDES): remove EVOLUTION_IMAGESDIR define + 2003-06-25 Antonio Xu <antonio.xu@sun.com> * e-msg-composer.c (handle_mailto): Change file url to absolute diff --git a/composer/Makefile.am b/composer/Makefile.am index 51d158daf9..1699dbff37 100644 --- a/composer/Makefile.am +++ b/composer/Makefile.am @@ -62,7 +62,6 @@ INCLUDES = \ -I$(top_builddir)/shell \ -I$(top_srcdir)/shell \ -DEVOLUTION_DATADIR=\"$(datadir)\" \ - -DEVOLUTION_IMAGESDIR=\"$(imagesdir)\" \ -DEVOLUTION_UIDIR=\"$(evolutionuidir)\" \ -DEVOLUTION_GLADEDIR=\"$(gladedir)\" \ -DPREFIX=\"$(prefix)\" \ diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index fe826e4089..857265fdfe 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -51,6 +51,7 @@ #include "camel/camel-mime-filter-bestenc.h" #include "camel/camel-mime-part.h" +#include "e-util/e-gui-utils.h" #define ICON_WIDTH 64 #define ICON_SEPARATORS " /-_" @@ -203,66 +204,6 @@ remove_attachment (EMsgComposerAttachmentBar *bar, /* Icon list contents handling. */ -static GdkPixbuf * -pixbuf_for_mime_type (const char *mime_type) -{ - const char *icon_name; - char *filename = NULL; - GdkPixbuf *pixbuf; - - /* Special-case these two since GNOME VFS doesn't know about them and - they are used every time the user forwards one or more messages - inline. (See #9786.) */ - if (strcmp (mime_type, "message/digest") == 0 - || strcmp (mime_type, "multipart/digest") == 0 - || strcmp (mime_type, "message/rfc822") == 0) { - char *name; - - name = g_build_filename (EVOLUTION_IMAGESDIR, "mail.png", NULL); - pixbuf = gdk_pixbuf_new_from_file (name, NULL); - g_free (name); - - if (pixbuf != NULL) - return pixbuf; - } - - 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); - 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); - - return pixbuf; -} - static void update (EMsgComposerAttachmentBar *bar) { @@ -382,7 +323,7 @@ update (EMsgComposerAttachmentBar *bar) char *mime_type; mime_type = header_content_type_simple (content_type); - pixbuf = pixbuf_for_mime_type (mime_type); + pixbuf = e_icon_for_mime_type (mime_type, 48); g_free (mime_type); gnome_icon_list_append_pixbuf (icon_list, pixbuf, NULL, label); if (pixbuf) |