Il giorno dom, 12/11/2006 alle 11.20 -0500, Tristan Van Berkom ha
scritto:
> That is normal, I wouldnt expect calling gtk_widget_destroy() to
> destroy your window, its the combination of calling gtk_widget_destroy()
> *and returning to the mainloop* that will actually remove the visible 
> window,
> nothing will be redrawn when you are sitting in a gdb breakpoint.

but when i receive the segfault, and i'm stopped into debug, the window
would have to be already destroyed

> >moreover, the first window is into a library called from the program
> >  
> >
> That phrase doesnt make any sence to me, so I have no idea where
> you're pulling that stack trace from, so I dont know what to look for...
> what exactly is the /problem/ ? is your program crashing when you call
> gtk_widget_destroy() ?

sorry for my english

my problem is:
- the program calls a library that create a window with libglade
- when the window is closed the program leaves the library
- returning from the library calling, the program creates another window
but _without_ libglade (with hand wrote code)
- when the program uses the function gtk_menu_item_new_with_mnemonic it
crashes (the stack trace is from here)

if the program doesn't call the library it works

the source code

int
main (int argc, char **argv)
{
        Corpo *corpo;

        gtk_init (&argc, &argv);


        /* this is the library that use libglade */
        solipa = solipa_init (&argc, &argv);
        if (solipa == NULL)
                {
                        return 0;
                }


        w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title (GTK_WINDOW (w), "gRaStampa");
        gtk_window_set_default_size (GTK_WINDOW (w), 600, 400);


        /* making widgets with hand wrote code */
        corpo = crea_corpo ();


        gtk_container_add (GTK_CONTAINER (w), corpo_get_widget (corpo));

        gtk_widget_show (w);

        gtk_main ();

        return 0;
}

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to