aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configure.in2
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-format-html.c11
4 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 68d7d8674b..8f8c295646 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-18 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #423395
+
+ * configure.in: Requires newer GtkHTML, 3.23.5.
+
2008-06-17 Johnny Jacob <jjohnny@novell.com>
* configure.in: Bumped to 2.23.5 .
diff --git a/configure.in b/configure.in
index c16e81c0db..edbea5e31c 100644
--- a/configure.in
+++ b/configure.in
@@ -17,7 +17,7 @@ m4_define([eds_minimum_version], [2.23.3])
m4_define([gnome_icon_theme_minimum_version], [2.19.91])
m4_define([libbonobo_minimum_version], [2.20.3])
m4_define([libbonoboui_minimum_version], [2.4.2])
-m4_define([libgtkhtml_minimum_version], [3.19.1])
+m4_define([libgtkhtml_minimum_version], [3.23.5])
m4_define([gconf_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libglade_minimum_version], [2.0.0]) # XXX Just a Guess
m4_define([libgnomecanvas_minimum_version], [2.0.0]) # XXX Just a Guess
diff --git a/mail/ChangeLog b/mail/ChangeLog
index bef54c63c9..37c746db00 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2008-06-18 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #423395
+
+ * em-format-html.c: (efh_init), (efh_text_plain), (efh_text_enriched),
+ (efh_text_html), (efh_message_deliverystatus): Put the anchor where
+ the message body begins and let GtkHTML know the anchor name to place
+ the cursor there in caret mode on the first focus.
+
2008-06-18 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #532472
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index c43ca1aa46..004c787458 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -85,6 +85,8 @@
#define d(x)
#define EFH_TABLE_OPEN "<table>"
+#define EFM_MESSAGE_START_ANAME "evolution#message#start"
+#define EFH_MESSAGE_START "<A name=\"" EFM_MESSAGE_START_ANAME "\"></A>"
struct _EMFormatHTMLCache {
CamelMultipart *textmp;
@@ -153,6 +155,7 @@ efh_init(GObject *o)
efh->html = (GtkHTML *)gtk_html_new();
gtk_html_set_blocking(efh->html, FALSE);
+ gtk_html_set_caret_first_focus_anchor (efh->html, EFM_MESSAGE_START_ANAME);
g_object_ref_sink(efh->html);
gtk_html_set_default_content_type(efh->html, "text/html; charset=utf-8");
@@ -799,7 +802,7 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
camel_stream_printf (stream,
"<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n",
efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff, efh->text_colour & 0xffffff);
- camel_stream_write_string(stream, "<tt>\n");
+ camel_stream_write_string(stream, "<tt>\n" EFH_MESSAGE_START);
em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)newpart);
camel_stream_flush((CamelStream *)filtered_stream);
camel_stream_write_string(stream, "</tt>\n");
@@ -837,7 +840,7 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
camel_object_unref(enriched);
camel_stream_printf (stream,
- "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n",
+ "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n" EFH_MESSAGE_START,
efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff, efh->text_colour & 0xffffff);
em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
@@ -875,7 +878,7 @@ efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFor
camel_stream_printf (stream,
"<div style=\"border: solid #%06x 1px; background-color: #%06x; color: #%06x;\">\n"
- "<!-- text/html -->\n",
+ "<!-- text/html -->\n" EFH_MESSAGE_START,
efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff, efh->text_colour & 0xffffff);
/* TODO: perhaps we don't need to calculate this anymore now base is handled better */
@@ -1022,7 +1025,7 @@ efh_message_deliverystatus(EMFormatHTML *efh, CamelStream *stream, CamelMimePart
camel_stream_filter_add(filtered_stream, html_filter);
camel_object_unref(html_filter);
- camel_stream_write_string(stream, "<tt>\n");
+ camel_stream_write_string(stream, "<tt>\n" EFH_MESSAGE_START);
em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_stream_flush((CamelStream *)filtered_stream);
camel_stream_write_string(stream, "</tt>\n");