diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-04-23 14:40:20 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-04-23 14:40:20 +0800 |
commit | d571c56260d30a00a03112b8bdfff463d4a24b81 (patch) | |
tree | 28905f8b19ac50d999ff3ed9cb6ea7f547628a7d /addressbook/gui/widgets/eab-contact-formatter.c | |
parent | 95746c8e3a9c341fac7beae7bc279d6379beb7e4 (diff) | |
download | gsoc2013-evolution-d571c56260d30a00a03112b8bdfff463d4a24b81.tar gsoc2013-evolution-d571c56260d30a00a03112b8bdfff463d4a24b81.tar.gz gsoc2013-evolution-d571c56260d30a00a03112b8bdfff463d4a24b81.tar.bz2 gsoc2013-evolution-d571c56260d30a00a03112b8bdfff463d4a24b81.tar.lz gsoc2013-evolution-d571c56260d30a00a03112b8bdfff463d4a24b81.tar.xz gsoc2013-evolution-d571c56260d30a00a03112b8bdfff463d4a24b81.tar.zst gsoc2013-evolution-d571c56260d30a00a03112b8bdfff463d4a24b81.zip |
Bug #674272 - Contacts preview differs with mailer running and not
This splits the giant EMailRequest to individual EFileRequest, EStockRequest, EHTTPRequest and EMailRequest,
making the first two available globally from e-utils, the othe two are loaded only with mailer,
since no other component uses them.
Diffstat (limited to 'addressbook/gui/widgets/eab-contact-formatter.c')
-rw-r--r-- | addressbook/gui/widgets/eab-contact-formatter.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/addressbook/gui/widgets/eab-contact-formatter.c b/addressbook/gui/widgets/eab-contact-formatter.c index 0531087295..b87944c224 100644 --- a/addressbook/gui/widgets/eab-contact-formatter.c +++ b/addressbook/gui/widgets/eab-contact-formatter.c @@ -110,33 +110,6 @@ common_location[] = "</script>\n" \ "</head>\n" -static gchar * -get_icon_uri (const gchar *icon_name) -{ - GtkIconTheme *icon_theme; - GtkIconInfo *icon_info; - const gchar *filename; - gchar *icon_uri; - GError *error = NULL; - - icon_theme = gtk_icon_theme_get_default (); - icon_info = gtk_icon_theme_lookup_icon ( - icon_theme, icon_name, GTK_ICON_SIZE_MENU, 0); - g_return_val_if_fail (icon_info != NULL, NULL); - - filename = gtk_icon_info_get_filename (icon_info); - icon_uri = g_filename_to_uri (filename, NULL, &error); - - if (error != NULL) { - g_warning ("%s", error->message); - g_error_free (error); - } - - gtk_icon_info_free (icon_info); - - return icon_uri; -} - static void render_address_link (GString *buffer, EContact *contact, @@ -292,9 +265,7 @@ render_table_row (GString *buffer, value = (gchar *) str; if (icon) { - gchar *icon_uri = get_icon_uri (icon); - icon_html = g_strdup_printf ("<img src=\"%s\" width=\"16\" height=\"16\" />", icon_uri); - g_free (icon_uri); + icon_html = g_strdup_printf ("<img src=\"gtk-stock://%s\" width=\"16\" height=\"16\" />", icon); } else { icon_html = ""; } @@ -441,9 +412,7 @@ render_title_block (EABContactFormatter *formatter, e_contact_photo_free (photo); if (e_contact_get (contact, E_CONTACT_IS_LIST)) { - gchar *icon = get_icon_uri (CONTACT_LIST_ICON); - g_string_append_printf (buffer, "<img src=\"%s\">", icon); - g_free (icon); + g_string_append_printf (buffer, "<img src=\"gtk-stock://%s\">", CONTACT_LIST_ICON); } g_string_append_printf ( |