After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 469482 - need to register gailcanvas into a11y type system
need to register gailcanvas into a11y type system
Status: RESOLVED FIXED
Product: libgnomecanvas
Classification: Deprecated
Component: core
2.19.x
Other All
: Normal critical
: ---
Assigned To: Sven Herzberg
libgnomecanvas maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-23 04:30 UTC by Li Yuan
Modified: 2008-08-13 01:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
for fixing bug469482 (5.21 KB, patch)
2007-08-23 07:20 UTC, Yi Jin
needs-work Details | Review
new version (5.62 KB, patch)
2007-11-05 10:05 UTC, Yi Jin
none Details | Review
new patch (5.28 KB, patch)
2007-12-27 07:52 UTC, Li Yuan
none Details | Review
new patch to avoid warnings (5.51 KB, patch)
2008-07-30 05:05 UTC, Li Yuan
none Details | Review

Description Li Yuan 2007-08-23 04:30:08 UTC
When moved gailcanvas into libgnomecanvas, we didn't setup the gailcanvas* type correctly.
Comment 1 Yi Jin 2007-08-23 07:20:46 UTC
Created attachment 94171 [details] [review]
for fixing bug469482
Comment 2 Sven Herzberg 2007-10-20 16:30:06 UTC
> 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()
Comment 3 Yi Jin 2007-11-05 10:05:15 UTC
Created attachment 98553 [details] [review]
new version 

new patch for fixing bug 469482
Comment 4 Li Yuan 2007-11-22 05:45:33 UTC
What about the new patch?
Comment 5 Sven Herzberg 2007-12-21 18:54:55 UTC
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.
Comment 6 Li Yuan 2007-12-27 07:52:43 UTC
Created attachment 101661 [details] [review]
new patch
Comment 7 Li Yuan 2008-07-24 08:14:05 UTC
hi, any update on this bug?
Comment 8 Sven Herzberg 2008-07-24 16:00:01 UTC
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.
Comment 9 Li Yuan 2008-07-30 05:05:06 UTC
Created attachment 115541 [details] [review]
new patch to avoid warnings
Comment 10 Li Yuan 2008-08-05 02:48:26 UTC
Can we get the patch in and let the users test it before GNOME 2.24 release?
Comment 11 Sven Herzberg 2008-08-12 19:12:30 UTC
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
Comment 12 Li Yuan 2008-08-13 01:51:38 UTC
Thanks Sven!