Use g_filename_to_uri() to construct a file: URI.

2005-12-17  Tor Lillqvist  <tml@novell.com>

	* gui/e-cal-component-memo-preview.c (write_html): Use
	g_filename_to_uri() to construct a file: URI.

svn path=/trunk/; revision=30804
This commit is contained in:
Tor Lillqvist
2005-12-17 12:21:43 +00:00
committed by Tor Lillqvist
parent d8fc2ee08b
commit cb04b8196f
2 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,9 @@
* conduits/calendar/calendar-conduit.c: Use GLib to construct
filenames from URIs and back.
* gui/e-cal-component-memo-preview.c (write_html): Use
g_filename_to_uri() to construct a file: URI.
2005-12-15 Srinivasa Ragavan <sragavan@novell.com>
** Fixes bug #324094

View File

@ -162,8 +162,10 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
icon_file = e_categories_get_icon_file_for ((const char *) node->data);
if (icon_file && g_file_test(icon_file, G_FILE_TEST_EXISTS)) {
gtk_html_stream_printf (stream, "<IMG ALT=\"%s\" SRC=\"file://%s\">",
(const char *) node->data, icon_file);
gchar *icon_file_uri = g_filename_to_uri (icon_file, NULL, NULL);
gtk_html_stream_printf (stream, "<IMG ALT=\"%s\" SRC=\"%s\">",
(const char *) node->data, icon_file_uri);
g_free (icon_file_uri);
one_added = TRUE;
}
else{