Philippe MARTIN wrote:
>
> Hello,
>
> I've a little problem with the C code generated by glade.
>
> The widgets of a window are only defined for the
> construction function, and I can't find any way to access
> these widgets from the callback functions.
>
> I would like to know if somebody has a tip to access these
> widgets. I tried to make them globals but I have to modify
> the interface.[ch] files to do this.
it's far simpler than that...
glade adds a function specifically aimed to access to your widgets
from every where inside the widget hierarchy for a given window/dialog.
you will find this function defined in support.c (or whatever you have
called it):
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
with this function all you need is a pointer to a widget on the very
same sub-tree of the widget you are looking for, and its name (the name
you have choosen on the property panel of glade) and it will return the
pointer to said widget.
glade adds all widgets created in the create_something function to the
very same root widget, so it only need to find the root widget for a
given window/dialog and to ask it about the required widget.
>
> Thanks,
>
> --
> Philippe MARTIN
> ERIDAN Informatique
> http://www.eridan-info.fr
bye,
MP.
--
Stud. Marco Pietrobono | Murphy's Law: if something could
v. del Calice, 39 - 00178 ROMA | go wrong, it does.
Tel. +39.6.7186329 0339/7410893 | Legge di Murphy: se qualcosa può
http://www.pietrobo.com | andar male, lo farà.
------------------------------------------------------------------------
Some men see things as they are and say, why;
I dream things that never were and say, why not. ( George Bernard Shaw )
+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.