aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/image-inline
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-31 22:24:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-01 00:01:49 +0800
commit4f01d3d1823fd8d7b53919b03ff44cc46ad92b77 (patch)
tree93b7541b92635862399d7783cb2fed77cee74ef5 /plugins/image-inline
parent3d9b0002c5802e3d8c3a426221bfb5294691326e (diff)
downloadgsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.gz
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.bz2
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.lz
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.xz
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.tar.zst
gsoc2013-evolution-4f01d3d1823fd8d7b53919b03ff44cc46ad92b77.zip
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).
Diffstat (limited to 'plugins/image-inline')
-rw-r--r--plugins/image-inline/image-inline.c13
1 files changed, 7 insertions, 6 deletions
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--;
}
}