[Glade-users] glade mystery



I'm stumped. I have a glade file. It hasn't changed in the last 12 days
according to CVS. I have been working on callbacks over those days and
haven't messed with the GUI. If I do a fresh CVS checkout of the project
and run ./autogen.sh; make and then run my app it works perfectly.

Now I open the Glade file (with the same version/install), change
nothing and have it build the sources. Now when I run the app I get:

(cspec:3204): Gtk-CRITICAL **: file gtklabel.c: line 937
(gtk_label_set_text): assertion `GTK_IS_LABEL (label)' failed

It fails on a call to gtk_label_set_text.

Inspection of the changes in the files reveals that in interface.c this:

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  gtk_object_set_data_full (GTK_OBJECT (component), name, \
    gtk_widget_ref (widget), (GtkDestroyNotify) gtk_widget_unref)
                                                                                                              
                                             
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  gtk_object_set_data (GTK_OBJECT (component), name, widget)


...has been changed to this:

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
                                                                                                              
                                             
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  g_object_set_data (G_OBJECT (component), name, widget)


If I change these definitions back, it works fine. 

My question is: why is this happening? For some reasons it is using
G_OBJECT in the macro instead of GTK_OBJECT. There are similar changes
in support.c. As I said the glade file, glade itself, glib and all the
other libs have not changed. Any ideas?

Thanks!
Michael Koppelman






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