diff options
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index 81a9fce492..1a1f454828 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -219,16 +219,6 @@ mail_display_jump_to_anchor (MailDisplay *md, const char *url) static void on_link_clicked (GtkHTML *html, const char *url, MailDisplay *md) { - char *full_url; - - if (md->base_url) { - full_url = alloca (strlen (md->base_url) + strlen (url) + 2); - sprintf (full_url, "%s%s%s", md->base_url, - *url == '/' ? "" : "/", url); - - url = full_url; - } - if (!g_strncasecmp (url, "news:", 5) || !g_strncasecmp (url, "nntp:", 5)) g_warning ("Can't handle news URLs yet."); @@ -275,7 +265,7 @@ static void save_cb (GtkWidget *widget, gpointer user_data) { CamelMimePart *part = gtk_object_get_data (GTK_OBJECT (user_data), "CamelMimePart"); - + save_part (part); } @@ -1126,22 +1116,6 @@ ebook_callback (EBook *book, const gchar *addr, ECard *card, gpointer data) } static void -on_set_base (GtkHTML *html, const char *base_url, gpointer user_data) -{ - MailDisplay *md = user_data; - size_t len; - - g_free (md->base_url); - - /* strip the trailing '/' if there is one */ - len = strlen (base_url); - if (base_url[len - 1] == '/') - md->base_url = g_strndup (base_url, len - 1); - else - md->base_url = g_strdup (base_url); -} - -static void on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, gpointer user_data) { @@ -1149,7 +1123,6 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, GHashTable *urls; CamelMedium *medium; GByteArray *ba; - char *full_url; urls = g_datalist_get_data (md->data, "part_urls"); g_return_if_fail (urls != NULL); @@ -1193,14 +1166,6 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, urls = g_datalist_get_data (md->data, "data_urls"); g_return_if_fail (urls != NULL); - if (md->base_url) { - full_url = alloca (strlen (md->base_url) + strlen (url) + 2); - sprintf (full_url, "%s%s%s", md->base_url, - *url == '/' ? "" : "/", url); - - url = full_url; - } - /* See if it's some piece of cached data */ ba = g_hash_table_lookup (urls, url); if (ba) { @@ -1608,7 +1573,6 @@ mail_display_init (GtkObject *object) mail_display->idle_id = 0; mail_display->selection = NULL; mail_display->charset = NULL; - mail_display->base_url = NULL; mail_display->current_message = NULL; mail_display->data = NULL; @@ -1626,7 +1590,6 @@ mail_display_destroy (GtkObject *object) g_free (mail_display->charset); g_free (mail_display->selection); - g_free (mail_display->base_url); g_datalist_clear (mail_display->data); g_free (mail_display->data); @@ -2242,9 +2205,6 @@ mail_display_initialize_gtkhtml (MailDisplay *mail_display, GtkHTML *html) gtk_html_set_editable (GTK_HTML (html), FALSE); - gtk_signal_connect (GTK_OBJECT (html), "set_base", - GTK_SIGNAL_FUNC (on_set_base), - mail_display); gtk_signal_connect (GTK_OBJECT (html), "url_requested", GTK_SIGNAL_FUNC (on_url_requested), mail_display); |