aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
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')
-rw-r--r--plugins/audio-inline/Makefile.am1
-rw-r--r--plugins/image-inline/image-inline.c13
-rw-r--r--plugins/mail-to-task/mail-to-task.c12
3 files changed, 14 insertions, 12 deletions
diff --git a/plugins/audio-inline/Makefile.am b/plugins/audio-inline/Makefile.am
index 8d7501a444..1696ecd101 100644
--- a/plugins/audio-inline/Makefile.am
+++ b/plugins/audio-inline/Makefile.am
@@ -14,6 +14,7 @@ plugin_LTLIBRARIES = liborg-gnome-audio-inline.la
liborg_gnome_audio_inline_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir) \
+ -I$(top_srcdir)/widgets \
$(GNOME_PLATFORM_CFLAGS) \
$(EVOLUTION_MAIL_CFLAGS) \
$(GSTREAMER_CFLAGS)
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--;
}
}
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index f2e3f98435..e16999584e 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -893,18 +893,18 @@ text_contains_nonwhitespace (const gchar *text, gint len)
static gchar *
get_selected_text (EMailReader *reader)
{
- EMFormatHTMLDisplay *html_display;
- GtkHTML *html;
+ EMFormatHTML *formatter;
+ EWebView *web_view;
gchar *text = NULL;
gint len;
- html_display = e_mail_reader_get_html_display (reader);
- html = EM_FORMAT_HTML (html_display)->html;
+ formatter = e_mail_reader_get_formatter (reader);
+ web_view = em_format_html_get_web_view (formatter);
- if (!gtk_html_command (html, "is-selection-active"))
+ if (!e_web_view_is_selection_active (web_view))
return NULL;
- text = gtk_html_get_selection_plain_text (html, &len);
+ text = gtk_html_get_selection_plain_text (GTK_HTML (web_view), &len);
if (text == NULL || !text_contains_nonwhitespace (text, len)) {
g_free (text);