[evolution-patches] 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] Patch fixes #72842 (gtkhtml a11y related)
- Date: Tue, 22 Feb 2005 18:08:14 +0800
hi, rodo
Here is the 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
--
Mengjie Yu <meng-jie yu sun com>
meng-jie yu sun com
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 22 Feb 2005 09:35:38 -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 22 Feb 2005 09:35:39 -0000
@@ -283,10 +283,18 @@ 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, NULL);
+ g_return_val_if_fail (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 +307,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 +327,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 +352,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 +373,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.2095
diff -u -p -r1.2095 ChangeLog
--- ChangeLog 21 Feb 2005 17:44:41 -0000 1.2095
+++ ChangeLog 22 Feb 2005 09:14:17 -0000
@@ -1,3 +1,10 @@
+2005-02-22 Mengjie Yu <meng-jie yu sun com>
+
+ * gtkhtml.c: (focus):we need cursor_changed signal even not in
+ caret_mode.
+
+ Fixes #72842
+
2005-02-21 Radek Doulik <rodo novell com>
* htmltextslave.c (html_text_slave_get_glyph_item_at_offset): add
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 22 Feb 2005 09:14:47 -0000
@@ -2345,10 +2345,10 @@ focus (GtkWidget *w, GtkDirectionType di
if (!GTK_WIDGET_HAS_FOCUS (w) && !html_object_is_embedded (obj))
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);
- }
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]