[evolution-patches] Updated -- Patch fixes #72842 (gtkhtml a11y related)
- From: Mengjie Yu <Meng-Jie Yu Sun COM>
- To: Radek Doulik <rodo ximian com>
- Cc: evolution-patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] Updated -- Patch fixes #72842 (gtkhtml a11y related)
- Date: Wed, 23 Feb 2005 15:14:33 +0800
hi, rodo
Here is the updated patch for #72842
the related URL is:
http://bugzilla.ximian.com/show_bug.cgi?id=72842
Will you please help me to review it?
Thanks a lot.
Yours,
Mengjie
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/ChangeLog,v
retrieving revision 1.19
diff -u -p -r1.19 ChangeLog
--- ChangeLog 31 Jan 2005 10:46:33 -0000 1.19
+++ ChangeLog 23 Feb 2005 07:03:55 -0000
@@ -1,3 +1,13 @@
+2005-02-22 Mengjie Yu <meng-jie yu sun com>
+
+ * object.c: (gtk_html_a11y_get_focus_object),
+ (gtk_html_a11y_grab_focus_cb), (gtk_html_a11y_cursor_changed_cb),
+ (gtk_html_a11y_insert_object_cb), (gtk_html_a11y_delete_object_cb):
+ use html_engine_get_focus_object to get the focus_object while
+ cared_mode is off and gtkhtml widget is not editable.
+
+ Fixes #72842
+
2005-01-02 Mengjie Yu <meng-jie yu sun com>
Fix for 70130 and 70683.
Index: object.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/object.c,v
retrieving revision 1.9
diff -u -p -r1.9 object.c
--- object.c 26 Jan 2005 07:51:49 -0000 1.9
+++ object.c 23 Feb 2005 07:03:56 -0000
@@ -283,10 +283,17 @@ gtk_html_a11y_get_focus_object (GtkWidge
GtkHTML * html;
HTMLObject * htmlobj = NULL;
AtkObject *obj = NULL;
+ gint offset;
html = GTK_HTML(widget);
- if (html->engine && html->engine->cursor)
+
+ g_return_val_if_fail (html && html->engine, NULL);
+
+ if (!html->engine->caret_mode && !gtk_html_get_editable (html))
+ htmlobj = html_engine_get_focus_object (html->engine, &offset);
+ else if (html->engine && html->engine->cursor)
htmlobj = html->engine->cursor->object;
+
if (htmlobj)
obj = html_utils_get_accessible (htmlobj, NULL);
@@ -299,14 +306,15 @@ gtk_html_a11y_grab_focus_cb(GtkWidget *
AtkObject *focus_object, *obj, *clue;
- focus_object = gtk_html_a11y_get_focus_object (widget);
- obj = gtk_widget_get_accessible (widget);
- g_object_set_data (G_OBJECT(obj), "gail-focus-object", focus_object);
+ focus_object = gtk_html_a11y_get_focus_object (widget);
+ g_return_if_fail (focus_object != NULL);
+ obj = gtk_widget_get_accessible (widget);
+ g_object_set_data (G_OBJECT(obj), "gail-focus-object", focus_object);
clue = html_utils_get_accessible(GTK_HTML(widget)->engine->clue, obj);
atk_object_set_parent(clue, obj);
- atk_focus_tracker_notify (focus_object);
+ atk_focus_tracker_notify (focus_object);
}
@@ -318,8 +326,9 @@ gtk_html_a11y_cursor_changed_cb (GtkWidg
{
AtkObject *focus_object, *obj;
- focus_object = gtk_html_a11y_get_focus_object (widget);
- obj = gtk_widget_get_accessible (widget);
+ focus_object = gtk_html_a11y_get_focus_object (widget);
+ g_return_if_fail (focus_object != NULL);
+ obj = gtk_widget_get_accessible (widget);
if (gtk_html_a11y_focus_object != focus_object) {
gtk_html_a11y_focus_object = focus_object;
@@ -342,6 +351,7 @@ gtk_html_a11y_insert_object_cb (GtkWidge
obj = gtk_widget_get_accessible (widget);
a11y = gtk_html_a11y_get_focus_object (widget);
+ g_return_if_fail (a11y != NULL);
if (gtk_html_a11y_focus_object != a11y) {
gtk_html_a11y_focus_object = a11y;
@@ -362,6 +372,7 @@ gtk_html_a11y_delete_object_cb (GtkWidge
obj = gtk_widget_get_accessible (widget);
a11y = gtk_html_a11y_get_focus_object (widget);
+ g_return_if_fail (a11y != NULL);
if (gtk_html_a11y_focus_object != a11y) {
gtk_html_a11y_focus_object = a11y;
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2096
diff -u -p -r1.2096 ChangeLog
--- ChangeLog 23 Feb 2005 06:47:07 -0000 1.2096
+++ ChangeLog 23 Feb 2005 06:56:36 -0000
@@ -1,3 +1,10 @@
+2005-02-23 Mengjie Yu <meng-jie yu sun com>
+
+ * gtkhtml.c: (focus):we need cursor_changed signal even not in
+ caret_mode.
+
+ Fixes #72842
+
2005-02-22 Mengjie Yu <meng-jie yu sun com>
* htmlengine-edit-cut-and-paste.c: (insert_empty_paragraph):
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.589
diff -u -p -r1.589 gtkhtml.c
--- gtkhtml.c 9 Feb 2005 14:36:59 -0000 1.589
+++ gtkhtml.c 23 Feb 2005 06:57:33 -0000
@@ -2347,8 +2347,10 @@ focus (GtkWidget *w, GtkDirectionType di
gtk_widget_grab_focus (w);
if (e->caret_mode) {
html_engine_jump_to_object (e, obj, offset);
- g_signal_emit (GTK_HTML (w), signals [CURSOR_CHANGED], 0);
}
+
+ g_signal_emit (GTK_HTML (w), signals [CURSOR_CHANGED], 0);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]