[Glade-users] Strange differences with gtk and libglade



Hi,
(sorry for my bad english)
(for my mistake this mail sent gtk-list too:( sorry)

I'm learning to use gtk and libglade libraries.

I have made a simple GtkWindow manually and with glade-2.6.0 program (just .glade file to use with libglade).
In manual-window I have added a 'close-button' with this signal:

g_signal_connect (G_OBJECT (button_close), "clicked",
                      G_CALLBACK (do_things_and_exit), (gpointer) window);

and relative callback handler:

void
do_things_and_exit (GtkButton * button, gpointer user_data)
{
        /* various things */
        .................

        gtk_widget_destroy (GTK_WIDGET (user_data));

}

This code works properly (press close button: do various things and close window).

With glade program I have edited a window.glade file and added to 'close-button' property this signal:

signal: clicked
handler: do_things_and_exit
object: window

launch signals with:

glade_xml_signal_autoconnect(window_xml_glade);

but when I press close-button, just close-button is deleted and window is on again... WHY???

Last question:

How is it possibile pass a constant value with libglade?

In manual-gtk I have:

g_signal_connect (G_OBJECT (my_button_widget), "clicked",
                    G_CALLBACK (my_handler), GINT_TO_POINTER (1000));

and with libglade???

Thank you very much,
Giulio
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Acquista ora Email.it Phone Card e comincia a risparmiare sulle tue telefonate! Clicca e scopri l'offerta
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2684&d=6-10




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