From 4f01d3d1823fd8d7b53919b03ff44cc46ad92b77 Mon Sep 17 00:00:00 2001 From: Matthew Barnes <mbarnes@redhat.com> Date: Mon, 31 May 2010 10:24:14 -0400 Subject: Keep chipping away at direct GtkHTML usage. EMFormatHTML now holds a sealed EWebView instead of a public GtkHTML, accessible through em_format_html_get_web_view(). Rename e_mail_reader_get_html_display() to e_mail_reader_get_formatter() and have it return an EMFormatHTML instead of an EMFormatHTMLDisplay, since that's usually the type you want (or else an EMFormat, but never an EMFormatHTMLDisplay). --- plugins/image-inline/image-inline.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins/image-inline') diff --git a/plugins/image-inline/image-inline.c b/plugins/image-inline/image-inline.c index 21688dbf94..5548948f1a 100644 --- a/plugins/image-inline/image-inline.c +++ b/plugins/image-inline/image-inline.c @@ -233,15 +233,15 @@ size_allocate_cb (GtkHTMLEmbedded *embedded, ImageInlinePObject *image_object) { GtkAllocation image_allocation; - GtkWidget *widget; + EWebView *web_view; gint pixbuf_width; gint pixbuf_height; gint widget_width; gint widget_height; gdouble zoom = 1.0; - widget = GTK_WIDGET (image_object->object.format->html); - gtk_widget_get_allocation (widget, &image_allocation); + web_view = em_format_html_get_web_view (image_object->object.format); + gtk_widget_get_allocation (GTK_WIDGET (web_view), &image_allocation); widget_width = image_allocation.width - 12; pixbuf_width = gdk_pixbuf_get_width (image_object->pixbuf); @@ -264,10 +264,10 @@ mouse_wheel_scroll_cb (GtkWidget *image_view, { GtkOrientation orientation; GtkScrollType scroll_type; - GtkHTML *html; + EWebView *web_view; gint steps = 2; - html = image_object->object.format->html; + web_view = em_format_html_get_web_view (image_object->object.format); switch (direction) { case GDK_SCROLL_UP: @@ -296,7 +296,8 @@ mouse_wheel_scroll_cb (GtkWidget *image_view, while (steps > 0) { g_signal_emit_by_name ( - html, "scroll", orientation, scroll_type, 2.0, NULL); + web_view, "scroll", + orientation, scroll_type, 2.0, NULL); steps--; } } -- cgit