GNOME Bugzilla – Bug 469482
need to register gailcanvas into a11y type system
Last modified: 2008-08-13 01:51:38 UTC
When moved gailcanvas into libgnomecanvas, we didn't setup the gailcanvas* type correctly.
Created attachment 94171 [details] [review] for fixing bug469482
> Index: libgnomecanvas/gnome-canvas.c > =================================================================== > --- libgnomecanvas/gnome-canvas.c (revision 1261) > +++ libgnomecanvas/gnome-canvas.c (working copy) > @@ -2135,6 +2135,8 @@ > canvas); > > canvas->need_repick = TRUE; > + > + gail_canvas_init(); > } > > /* Convenience function to remove the idle handler of a canvas */ Two things: 1. Please include the current functions in your patches: http://live.gnome.org/SubversionMigration#head-7224b37a5f7b17b605b7fd74cc51a560e817a91e 2. Please call gail_canvas_init() on the class_init() function and not instance_init()
Created attachment 98553 [details] [review] new version new patch for fixing bug 469482
What about the new patch?
Comment on attachment 98553 [details] [review] new version >@@ -85,11 +123,11 @@ static AtkObjectClass *parent_atk_object > * Tell ATK how to create the appropriate AtkObject peers > **/ > void >-gail_canvas_init (GType widget_type) >+gail_canvas_init () > { > atk_registry_set_factory_type (atk_get_default_registry (), >- widget_type, >- gail_canvas_widget_factory_get_type ()); >+ GNOME_TYPE_CANVAS, >+ gail_canvas_factory_get_type ()); > atk_registry_set_factory_type (atk_get_default_registry (), > GNOME_TYPE_CANVAS_GROUP, > gail_canvas_group_factory_get_type ()); In C, not specifying any parameter means "I don't tell", not "none", please write "(void)" for no parameters. >Index: libgnomecanvas/gailcanvas.h >=================================================================== >--- libgnomecanvas/gailcanvas.h (revision 1285) >+++ libgnomecanvas/gailcanvas.h (working copy) >@@ -45,7 +65,9 @@ struct _GailCanvasClass; > > AtkObject* gail_canvas_new (GtkWidget *widget); > >-void gail_canvas_init (GType canvas_type); >+void gail_canvas_init (); >+ >+GType gail_canvas_factory_get_type(void); > > G_END_DECLS > Same here. >Index: libgnomecanvas/gnome-canvas.c >=================================================================== >--- libgnomecanvas/gnome-canvas.c (revision 1285) >+++ libgnomecanvas/gnome-canvas.c (working copy) >@@ -2076,6 +2076,8 @@ gnome_canvas_class_init (GnomeCanvasClas > NULL, NULL, > g_cclosure_marshal_VOID__POINTER, > G_TYPE_NONE, 1, G_TYPE_POINTER); >+ >+ gail_canvas_init(); > } > > /* Callback used when the root item of a canvas is destroyed. The user should >@@ -2135,6 +2137,7 @@ gnome_canvas_init (GnomeCanvas *canvas) > canvas); > > canvas->need_repick = TRUE; >+ > } > > /* Convenience function to remove the idle handler of a canvas */ Please exclude this empty from the next version of the patch.
Created attachment 101661 [details] [review] new patch
hi, any update on this bug?
Hi Li, when applying your patch, it still throws out these warnings. Please fix the patch to get rid of them: gailcanvas.c: In function 'gail_canvas_factory_create_accessible': gailcanvas.c:71: warning: passing argument 1 of 'gail_canvas_new' from incompatible pointer type gnome-canvas.c: In function 'gnome_canvas_class_init': gnome-canvas.c:2080: warning: implicit declaration of function 'gail_canvas_init' Otherwise it looks fine, I'll happily apply this patch once these issues are solved.
Created attachment 115541 [details] [review] new patch to avoid warnings
Can we get the patch in and let the users test it before GNOME 2.24 release?
2008-08-12 Sven Herzberg <sven@imendio.com> Bug 469482 – need to register gailcanvas into a11y type system * libgnomecanvas/gailcanvas.c, * libgnomecanvas/gailcanvas.h, * libgnomecanvas/gnome-canvas.c: properly initialize gail canvas
Thanks Sven!