Strange differences with gtk and libglade
- From: antongiulio <antongiulio email it>
- To: gtk-list gnome org
- Subject: Strange differences with gtk and libglade
- Date: Sun, 26 Sep 2004 13:17:26 +0200
Hi,
(sorry for my bad english)
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:
Telefona con Email.it Phone Card, tanti minuti di conversazione con il massimo del risparmio, clicca qui
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2687&d=26-9
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]