[Glade-users] segfault on gnome_app_set_contents



On Thu, 2003-05-15 at 11:34, Xavier Bestel wrote:
Le jeu 15/05/2003 � 12:12, Damon Chaplin a �crit :

Anyway, I've had a look at it and it looks like a bug in GTK+.
gtk_viewport_realize() doesn't check if the adjustments have been
created.

Is is already reported, or should I file something in bugzilla ?

I've just reported it - 
http://bugzilla.gnome.org/show_bug.cgi?id=113230


You can work around it by turning off the 'Visible' property of 
appwindow. Then after the call to gnome_app_set_contents() call
gtk_widget_show (appwindow);

Ok, it works if I don't call glade_xml_signal_autoconnect().
Otherwise, I have this segfault when autoconnecting (note that I don't
have signals defined in my .glade file):

Is this your demo code? You weren't initializing 'xml' anywhere:

int main(int argc, char *argv[]) {
        GladeXML *xml;
        GtkWidget *appwindow;

        gnome_program_init("xav", "0.0", LIBGNOMEUI_MODULE, argc, argv,
NULL);

        /* load the interface */
        appwindow = glade_xml_get_widget(glade_xml_new("xav.glade",
"appwindow", NULL), "appwindow");
        gnome_app_set_contents(GNOME_APP(appwindow),
glade_xml_get_widget(glade_xml_new("xav.glade", "vbox1", NULL),
"vbox1"));

        /* connect the signals in the interface */
        glade_xml_signal_autoconnect(xml);

        /* start the event loop */
        gtk_main();

        return 0;
}


Damon






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