[evolution-patches] Seeking review for bug #47676 , "(evolution-1-4-branch) unable to select line if only a single character present in mail"



Hi,

In gtkhtml from evolution-1-4-branch, a line with only one character cannot be selected by mouse. It seems that there's been
great changes between trunk's codes and 1-4-branch's.

The attached patch fixes this bug. It's quite simple, please review. Thanks!

--
Best Regards
Maxx

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.1814.2.8
diff -u -r1.1814.2.8 ChangeLog
--- ChangeLog	15 Aug 2003 07:47:04 -0000	1.1814.2.8
+++ ChangeLog	16 Aug 2003 08:07:25 -0000
@@ -1,3 +1,8 @@
+2003-08-16  Maxx Cao  <maxx cao sun com>
+
+	* htmltextslave.c (get_offset_for_pointer): add consideration for
+	one-character text.
+
 2003-08-15  Antonio Xu  <antonio xu sun com>
 
 	* htmlengine-edit-movement.c (html_engine_jump_at): add
Index: htmltextslave.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltextslave.c,v
retrieving revision 1.146
diff -u -r1.146 htmltextslave.c
--- htmltextslave.c	29 Apr 2003 20:16:05 -0000	1.146
+++ htmltextslave.c	16 Aug 2003 08:07:28 -0000
@@ -956,6 +956,9 @@
 	if (x <= 0)
 		return 0;
 
+	if (slave->posLen == 1 && x > HTML_OBJECT (slave)->width / 2)
+		return 1;
+
 	if (x >= HTML_OBJECT (slave)->width)
 		return slave->posLen;
 				      


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]