Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gail/ChangeLog,v
retrieving revision 1.827
diff -r1.827 ChangeLog
0a1,10
> 2006-05-19  Li Yuan <li.yuan@sun.com>
>
>       Fix for #313703
>       reviewed by: <padraig.obriain@sun.com>
>
>       * gail/gailbutton.c: (gail_button_notify_weak_ref),
>       (gail_button_notify_label_weak_ref), (gail_button_init_textutil):
>       If the button is destroyed first, we should disconnect the signal
>       connected to the label.
>
Index: gail/gailbutton.c
===================================================================
RCS file: /cvs/gnome/gail/gail/gailbutton.c,v
retrieving revision 1.76
diff -r1.76 gailbutton.c
66a67,70
> static void                  gail_button_notify_label_weak_ref (gpointer data,
>                                                                 GObject  *obj);
> static void                  gail_button_notify_weak_ref       (gpointer data,
>                                                                 GObject  *obj);
411a416,453
> gail_button_notify_weak_ref (gpointer data, GObject* obj)
> {
>   GtkLabel *label = NULL;
>
>   AtkObject* atk_obj = ATK_OBJECT (obj);
>   if (data && GTK_IS_WIDGET (data))
>     {
>       label = GTK_LABEL (data);
>       if (label)
>         {
>           g_signal_handlers_disconnect_by_func (label,
>                                                 (GCallback) gail_button_notify_label_gtk,
>                                                 GAIL_BUTTON (atk_obj));
>           g_object_weak_unref (G_OBJECT (label),
>                                gail_button_notify_label_weak_ref,
>                                GAIL_BUTTON (atk_obj));
>         }
>     }
> }
>
> static void
> gail_button_notify_label_weak_ref (gpointer data, GObject* obj)
> {
>   GtkLabel *label = NULL;
>   GailButton *button = NULL;
>
>   label = GTK_LABEL (obj);
>   if (data && GAIL_IS_BUTTON (data))
>     {
>       button = GAIL_BUTTON (ATK_OBJECT (data));
>       if (button)
>         g_object_weak_unref (G_OBJECT (button), gail_button_notify_weak_ref,
>                              label);
>     }
> }
>
>
> static void
419a462,465
>   g_object_weak_ref (G_OBJECT (button),
>                      gail_button_notify_weak_ref, label);
>   g_object_weak_ref (G_OBJECT (label),
>                      gail_button_notify_label_weak_ref, button);
