From 448d624c00f0c4e12917a4d31babd10555b2e8a4 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 18 Dec 2005 08:24:26 +0000 Subject: em-folder-browser.c em-folder-view.c em-format-html.c 2005-12-18 Tor Lillqvist * em-folder-browser.c * em-folder-view.c * em-format-html.c * em-format-html-display.c * em-mailer-prefs.c * em-message-browser.c * em-migrate.c * em-subscribe-editor.c * em-sync-stream.c * em-utils.c * em-vfolder-editor.c * em-vfolder-rule.c * mail-autofilter.c * mail-component.c * mail-config.c * mail-folder-cache.c: Use gstdio wrappers. Construct pathnames of glade, xml, etspec and png files at run-time. Use g_filename_{to,from}_uri(). * em-folder-browser.c (emfb_init) * em-folder-view.c (emfv_finalise) * em-message-browser.c (emmb_init): As EMFolderView::ui_files now always is a list of filenames constructed with g_build_filename(), use g_free() on each list entry before calling g_slist_free() on the list. * em-folder-tree-model.c (em_folder_tree_model_load_state): Use e_xml_parse_file(). * em-migrate.c: Bypass all the code for upgrading from 1.x on Win32. (emm_setup_initial): Use GDir instead of dirent. * em-sync-stream.c * mail-folder-cache.c: Use pthread_equal() to compare pthread_t values. * em-vfs-stream.c: No EINPROGRESS or ELOOP on Win32. svn path=/trunk/; revision=30854 --- mail/em-format-html.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'mail/em-format-html.c') diff --git a/mail/em-format-html.c b/mail/em-format-html.c index f0a91f92c4..52c3fe9075 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -31,10 +31,20 @@ #include #include +#include +#ifdef G_OS_WIN32 +/* Work around 'DATADIR' and 'interface' lossage in */ +#define DATADIR crap_DATADIR +#include +#undef DATADIR +#undef interface +#endif + #include #include /* for e_utf8_strftime, what about e_time_format_time? */ #include #include "e-util/e-icon-factory.h" +#include "e-util/e-util-private.h" #include #include @@ -906,7 +916,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part if (name == NULL) goto fail; - url = g_strdup_printf ("file:///%s", *name == '/' ? name+1:name); + url = g_filename_to_uri (name, NULL, NULL); if (site) desc = g_strdup_printf(_("Pointer to local file (%s) valid at site \"%s\""), name, site); else @@ -1715,10 +1725,17 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) if (rupert && efh->show_rupert) { char *classid; CamelMimePart *iconpart; + char *pngfile; classid = g_strdup_printf("icon:///em-format-html/%s/icon/header", emf->part_id->str); camel_stream_printf(stream, "", classid); - iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", EVOLUTION_ICONSDIR "/monkey-16.png"); + + pngfile = g_build_filename (EVOLUTION_ICONSDIR, + "monkey-16.png", + NULL); + iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", pngfile); + g_free (pngfile); + if (iconpart) { em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image); camel_object_unref(iconpart); -- cgit v1.2.3