[evolution-patches] cursor & anchors fix
- From: Radek Doulík <rodo ximian com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] cursor & anchors fix
- Date: 03 Jul 2003 18:21:39 +0200
attached patch fixes reversed type direction bug and also part of #44897
- resets blinking cursor after key is pressed
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.1815
diff -u -p -r1.1815 ChangeLog
--- ChangeLog 27 Jun 2003 15:51:05 -0000 1.1815
+++ ChangeLog 3 Jul 2003 16:18:59 -0000
@@ -1,3 +1,12 @@
+2003-07-03 Radek Doulik <rodo ximian com>
+
+ * htmlobject.c (html_object_cursor_backward): allow offset == 0 if
+ prev object doesn't accept cursor
+ (move_object_downtree_cursor): skip cursor non-accepting objects
+
+ * gtkhtml.c (key_press_event): reset blinking cursor if key was
+ used
+
2003-06-27 Radek Doulik <rodo ximian com>
* gtkhtml.c (gtk_html_editor_event): initialize retval to NULL
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.521
diff -u -p -r1.521 gtkhtml.c
--- gtkhtml.c 27 Jun 2003 15:51:06 -0000 1.521
+++ gtkhtml.c 3 Jul 2003 16:19:02 -0000
@@ -848,6 +848,9 @@ key_press_event (GtkWidget *widget, GdkE
}
}
+ if (retval)
+ html_engine_reset_blinking_cursor (html->engine);
+
/* printf ("retval: %d\n", retval); */
return retval;
Index: htmlobject.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlobject.c,v
retrieving revision 1.160
diff -u -p -r1.160 htmlobject.c
--- htmlobject.c 1 May 2003 16:41:23 -0000 1.160
+++ htmlobject.c 3 Jul 2003 16:19:03 -0000
@@ -1413,7 +1413,7 @@ html_object_cursor_backward (HTMLObject
return FALSE;
if (cursor->offset > 1 || (cursor->offset > 0 && (! (prev = html_object_prev_not_slave (self))
- || HTML_IS_CLUEALIGNED (prev)))) {
+ || HTML_IS_CLUEALIGNED (prev) || !html_object_accepts_cursor (prev)))) {
cursor->offset --;
cursor->position --;
return TRUE;
@@ -1512,11 +1512,22 @@ next_object_uptree_cursor (HTMLObject *o
/* go down in tree to leaf in way given by down_fn children */
static HTMLObject *
-move_object_downtree_cursor (HTMLObject *obj, HTMLObject * (*down_fn ) (HTMLObject *))
+move_object_downtree_cursor (HTMLObject *obj, HTMLObject * (*down_fn ) (HTMLObject *), HTMLObject * (*next_fn ) (HTMLObject *))
{
+ HTMLObject *last_obj = obj;
+
while ((obj = (*down_fn) (obj))) {
if (html_object_accepts_cursor (obj))
break;
+ last_obj = obj;
+ }
+
+ if (!obj && last_obj) {
+ obj = last_obj;
+
+ while ((obj = (*next_fn) (obj)))
+ if (html_object_accepts_cursor (obj))
+ break;
}
return obj;
@@ -1532,7 +1543,7 @@ move_object_cursor (HTMLObject *obj, gin
gboolean found = FALSE;
if (((*offset == 0 && forward) || (*offset && !forward)) && html_object_is_container (obj))
if ((down = (*down_fn) (obj))) {
- down = move_object_downtree_cursor (down, down_fn);
+ down = move_object_downtree_cursor (down, down_fn, next_fn);
if (down) {
if (html_object_is_container (down))
*offset = forward ? 0 : 1;
@@ -1552,7 +1563,7 @@ move_object_cursor (HTMLObject *obj, gin
found = TRUE;
} else {
HTMLObject *down;
- down = move_object_downtree_cursor (obj, down_fn);
+ down = move_object_downtree_cursor (obj, down_fn, next_fn);
if (down) {
if (html_object_is_container (down))
*offset = forward ? 0 : 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]