[evolution-patches] bug 47097, gal: atk object for e-text should be a build-in part with e-text
- From: Tianyu Tim-Wo <tim wo sun com>
- To: Mike Kestner <mkestner ximian com>
- Cc: evolution-patches lists ximian com, MailList_sceri-evolution-acc <sceri-evolution-acc sun com>
- Subject: [evolution-patches] bug 47097, gal: atk object for e-text should be a build-in part with e-text
- Date: Thu, 11 Sep 2003 21:46:12 +0800
Mike,
Please take a look at this patch. This patch is the base for futher
work on a11y implementation for e-text.
In this patch:
1) gal/a11y/e-text/gal-a11y-e-text-factory.h:
GalA11yETextFactory should inherit from AtkObjectFactory not
AtkObject.
2) gal/a11y/e-text/gal-a11y-e-text.c (et_class_init):
Set value for "component_parent_iface". Or the AtkComponent interface
of won't work properly. For example, when using at-poke to observe an
e-text widget, the position of the widget will be some very large
number. (bug 47100)
3) gal/e-text/e-text.c (e_text_class_init):
Added registration code for GalA11yETextFactory.
Thanks a lot.
Tim
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/ChangeLog,v
retrieving revision 1.805
diff -u -r1.805 ChangeLog
--- ChangeLog 5 Sep 2003 04:41:22 -0000 1.805
+++ ChangeLog 8 Sep 2003 14:27:27 -0000
@@ -1,3 +1,12 @@
+2003-09-08 Tim Wo <tim wo sun com>
+
+ * gal/a11y/e-text/gal-a11y-e-text-factory.h: GalA11yETextFactory
+ should inherit from AtkObjectFactory not AtkObject. (#47097).
+ * gal/a11y/e-text/gal-a11y-e-text.c (et_class_init): Set value
+ for "component_parent_iface". (#47097)
+ * gal/e-text/e-text.c (e_text_class_init): Added registration
+ code for GalA11yETextFactory. (#47097)
+
2003-09-05 Gilbert Fang <gilbert fang sun com>
* gal/a11y/Makefile.am: add e-table atk support to libgal a11y
Index: gal/a11y/e-text/gal-a11y-e-text-factory.h
===================================================================
RCS file: /cvs/gnome/gal/gal/a11y/e-text/gal-a11y-e-text-factory.h,v
retrieving revision 1.1
diff -u -r1.1 gal-a11y-e-text-factory.h
--- gal/a11y/e-text/gal-a11y-e-text-factory.h 30 Nov 2002 07:54:16 -0000 1.1
+++ gal/a11y/e-text/gal-a11y-e-text-factory.h 8 Sep 2003 14:27:27 -0000
@@ -22,11 +22,11 @@
typedef struct _GalA11yETextFactoryClass GalA11yETextFactoryClass;
struct _GalA11yETextFactory {
- AtkObject object;
+ AtkObjectFactory object;
};
struct _GalA11yETextFactoryClass {
- AtkObjectClass parent_class;
+ AtkObjectFactoryClass parent_class;
};
Index: gal/a11y/e-text/gal-a11y-e-text.c
===================================================================
RCS file: /cvs/gnome/gal/gal/a11y/e-text/gal-a11y-e-text.c,v
retrieving revision 1.1
diff -u -r1.1 gal-a11y-e-text.c
--- gal/a11y/e-text/gal-a11y-e-text.c 30 Nov 2002 07:54:16 -0000 1.1
+++ gal/a11y/e-text/gal-a11y-e-text.c 8 Sep 2003 14:27:29 -0000
@@ -452,6 +452,8 @@
parent_class = g_type_class_ref (PARENT_TYPE);
+ component_parent_iface = g_type_interface_peek(parent_class, ATK_TYPE_COMPONENT);
+
object_class->dispose = et_dispose;
}
Index: gal/e-text/e-text.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-text/e-text.c,v
retrieving revision 1.146
diff -u -r1.146 e-text.c
--- gal/e-text/e-text.c 13 Aug 2003 05:58:20 -0000 1.146
+++ gal/e-text/e-text.c 8 Sep 2003 14:27:32 -0000
@@ -67,6 +67,9 @@
#include <libart_lgpl/art_rgb.h>
#include <libart_lgpl/art_rgb_bitmap_affine.h>
+#include <atk/atk.h>
+#include "gal/a11y/e-text/gal-a11y-e-text-factory.h"
+
#define PARENT_TYPE (gnome_canvas_item_get_type())
#define BORDER_INDENT 3
@@ -3594,6 +3597,11 @@
if (!clipboard_atom)
clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
+
+ atk_registry_set_factory_type (atk_get_default_registry (),
+ E_TYPE_TEXT,
+ gal_a11y_e_text_factory_get_type ());
+
}
/* Object initialization function for the text item */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]