On Tue, 14 Nov 2000, wackode .....! wrote:

> Hi ros,
> 
> >   spinbutton = gtk_object_get_data(GTK_OBJECT(widget),"spinbutton");
> >
> >   widget is often the main window in which spinbutton is, you may declare
> >it as a global variable.
> 
> Ok, let me understand, "widget" is declared on interface.c into a function, 
> but I may declare it again on callbaks.c as a global variable?
> 
> -shouldn't I lookup "widget" (lets call it main_window) before?
> -----------------------------------------------------------
> GtkWidget *main_window_on_callbacks;
> 
> main_window_on_callbacks = lookup_widget(GTK_WIDGET (window), 
> "main_window");

To tell you the truth I never used lookup_widget. I only delete the
declaration of main window in main.c, I created a file with all global
variables and I declare them as extern in callbacks.c, so I can use them
every time I will, and I can retrieve data about all widget associated
with them, but I think that your idea is good.
 > -----------------------------------------------------------
> Notice that, when widgets are created, they are
> >associated to their main window by the function
> 
> Ok, that's very logical :)
> 
> >
> >  gtk_object_set_data_full(GTK_OBJECT(window),"widget",widget,
> >                           (GtkDestroyNotify) gtk_widget_unref),
> >"widget" is a const gchar key to retrieve data about widget from window or
> >other objects tou created.
> >Then you can use gtk_spin_button_get_value_as_int(...)
> >
> >  I hope to be useful to you.
> 
> thanks rosa :P
> (sorry, where are you from? 
  I'm italian and you?)

BYE!
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> Share information about yourself, create your own public profile at 
> http://profiles.msn.com.
> 
> 


_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to