Re: [gtk-list] Re: Glade



"T.S" wrote:
> 
> Jason McAfee wrote:
> 
> > Have you tried the lookup_widget function that is in support.c?
> > You can also look at the editor example that came with glade.  In the
> > callbacks file of that example it shows some very good examples of how
> > to reference other objects using the lookup function.
> >
> > In your callbacks file try something like this...
> >
> > void some_function (GtkMenuItem *item, gpointer user_data)
> > {
> >
> > GtkWidget *winmain;
> >
> > /* You can find the details of this function in the support.c file*/
> > winmain = lookup_widget(GTK_WIDGET(item),"winmain");
> >
> > code....
> >
> 
> I know the look_up widget.I want the first window to catch the signal and then
> change something in the second window. This can not be done with lookup_widget.

You could use gtk_object_set_data() or the related functions to store a pointer
to one of the windows in the other one. Though make sure you remove it somehow
if the window is destroyed.

Damon




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