[g-a-devel]Fix for bug 92465



The attached patch removes the warnings reported in bug 92465.

Should this patch be applied or should we consider more radical solutions, e.g. 
do not create an accessible object for child widget when emitting a 
children-changed signal or should be not emit a children-changed signal when 
widgets are being destroyed?

Padraig
cvs server: Diffing .
Index: bonobo_socket_atk_object.c
===================================================================
RCS file: /cvs/gnome/libgail-gnome/gail-gnome/bonobo_socket_atk_object.c,v
retrieving revision 1.8
diff -u -p -r1.8 bonobo_socket_atk_object.c
--- bonobo_socket_atk_object.c	19 Apr 2002 10:01:38 -0000	1.8
+++ bonobo_socket_atk_object.c	4 Sep 2002 13:15:39 -0000
@@ -29,8 +29,7 @@ static GQuark quark_private_frame = 0;
 static BonoboControlFrame *
 bonobo_socket_atk_object_get_frame (BonoboSocketAtkObject *accessible)
 {
-  return BONOBO_CONTROL_FRAME (
-		  g_object_get_qdata (G_OBJECT (accessible), quark_private_frame));
+  return g_object_get_qdata (G_OBJECT (accessible), quark_private_frame);
 }
 
 static Accessibility_Accessible
@@ -154,9 +153,12 @@ bonobo_socket_atk_object_new (BonoboSock
 
   atk_object_initialize (ATK_OBJECT (retval), GTK_WIDGET (socket));
 
-  g_object_ref (G_OBJECT (socket->frame));
+  if (socket->frame)
+    {
+      g_object_ref (G_OBJECT (socket->frame));
 
-  g_object_set_qdata (G_OBJECT (retval), quark_private_frame, socket->frame);
+      g_object_set_qdata (G_OBJECT (retval), quark_private_frame, socket->frame);
+    }
 
   return ATK_OBJECT (retval);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]