diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 11 | ||||
-rw-r--r-- | mail/em-folder-view.c | 3 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 51 | ||||
-rw-r--r-- | mail/em-format-html.c | 1 |
4 files changed, 26 insertions, 40 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index df7309454f..3477cf791f 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,14 @@ +2005-05-17 Radek Doulik <rodo@novell.com> + + * em-format-html.c: removed include of htmlengine.h which wasn't + needed + + * em-format-html-display.c: use top level gtkhtml API instead of + lower level one + + * em-folder-view.c (emfv_popup_selectall): use gtk_html_select_all + instead of calling html engine directly + 2005-05-16 Not Zed <NotZed@Ximian.com> * mail-vfolder.h: diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index ed4afe7672..f5f42eb7f9 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -760,7 +760,6 @@ emfv_popup_selectall(EPopup *ep, EPopupItem *pitem, void *data) { EMFolderView *emfv = data; gtk_html_select_all (((EMFormatHTML *)emfv->preview)->html); - } static void @@ -1271,7 +1270,7 @@ emfv_select_all_text(BonoboUIComponent *uid, void *data, const char *path) { EMFolderView *emfv = data; - html_engine_select_all (((EMFormatHTML *)emfv->preview)->html->engine); + gtk_html_select_all (((EMFormatHTML *)emfv->preview)->html); } static void diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 14877890af..0bf61bd145 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -27,8 +27,6 @@ #include <string.h> #include <gtkhtml/gtkhtml.h> -#include <gtkhtml/htmlengine.h> -#include <gtkhtml/htmlobject.h> #include <gtkhtml/gtkhtml-embedded.h> #include <gtkhtml/gtkhtml-search.h> @@ -239,7 +237,7 @@ efhd_init(GObject *o) efhd->priv = g_malloc0(sizeof(*efhd->priv)); efhd->search_tok = (ESearchingTokenizer *)e_searching_tokenizer_new(); - html_engine_set_tokenizer(efh->html->engine, (HTMLTokenizer *)efhd->search_tok); + gtk_html_set_tokenizer (efh->html, (HTMLTokenizer *)efhd->search_tok); g_signal_connect(efh->html, "realize", G_CALLBACK(efhd_gtkhtml_realise), o); g_signal_connect(efh->html, "style-set", G_CALLBACK(efhd_gtkhtml_style_set), o); @@ -578,34 +576,26 @@ efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh) static int efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efhd) { - HTMLEngine *e; - HTMLObject *obj; - const char *url; + char *url; gboolean res = FALSE; - gint offset; EMFormatPURI *puri = NULL; - char *uri = NULL; if (event->button != 3) return FALSE; - e = ((GtkHTML *)widget)->engine; - obj = html_engine_get_object_at(e, event->x, event->y, &offset, FALSE); + url = gtk_html_get_url_at (GTK_HTML (widget), event->x, event->y); d(printf("popup button pressed\n")); - if ( obj != NULL - && ((url = html_object_get_src(obj)) != NULL - || (url = html_object_get_url(obj, offset)) != NULL)) { - uri = gtk_html_get_url_object_relative((GtkHTML *)widget, obj, url); - puri = em_format_find_puri((EMFormat *)efhd, uri); + if (url) { + puri = em_format_find_puri((EMFormat *)efhd, url); d(printf("poup event, uri = '%s' part = '%p'\n", uri, puri?puri->part:NULL)); } - g_signal_emit((GtkObject *)efhd, efhd_signals[EFHD_POPUP_EVENT], 0, event, uri, puri?puri->part:NULL, &res); + g_signal_emit((GtkObject *)efhd, efhd_signals[EFHD_POPUP_EVENT], 0, event, url, puri?puri->part:NULL, &res); - g_free(uri); + g_free(url); return res; } @@ -614,33 +604,20 @@ gboolean em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd) { GtkHTML *html; - HTMLEngine *e; - HTMLObject *obj; - const char *url; + char *url; gboolean res = FALSE; - gint offset; EMFormatPURI *puri = NULL; - char *uri = NULL; html = efhd->formathtml.html; - e = html->engine; - if (!efhd->caret_mode) - obj = html_engine_get_focus_object (e, &offset); - else { - obj = e->cursor->object; - offset = e->cursor->offset; - } - if ( obj != NULL - && ((url = html_object_get_src(obj)) != NULL - || (url = html_object_get_url(obj, offset)) != NULL)) { - uri = gtk_html_get_url_object_relative(html, obj, url); - puri = em_format_find_puri((EMFormat *)efhd, uri); - } + url = gtk_html_get_cursor_url (html); + + if (url) + puri = em_format_find_puri((EMFormat *)efhd, url); - g_signal_emit((GtkObject *)efhd, efhd_signals[EFHD_POPUP_EVENT], 0, NULL, uri, puri?puri->part:NULL, &res); + g_signal_emit((GtkObject *)efhd, efhd_signals[EFHD_POPUP_EVENT], 0, NULL, url, puri?puri->part:NULL, &res); - g_free(uri); + g_free(url); return res; } diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 3125e32b4e..87d840923d 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -39,7 +39,6 @@ #include <gtkhtml/gtkhtml.h> #include <gtkhtml/gtkhtml-embedded.h> #include <gtkhtml/gtkhtml-stream.h> -#include <gtkhtml/htmlengine.h> #include <libgnome/gnome-i18n.h> |