Re: Application development using GTK and GLADE3



Hi.

I think it's common practice in gtk programming to create structure of
all widgets that are needed across the application and then pass a
pointer to that structure to the callbacks that need access to GUI.


2008/12/16 Harinandan S <harinandans gmail com>:
> Hi All,
>
> I am using Gtk+ 2.12.2 and Glade 3. I create windows using glade3 and use
> GtkBuilder to create widgets. My application has many windows and each
> window has a builder object associated with this. At some point of time I
> have many windows open. I need to change some widgets in one window
> depending on changes done to other widgets in another window. For example in
> one window I show a label, the current file selected and if user changes the
> file using another window which has a file chooser dialog I'll update the
> label.
>
> This requires pointer to the label. There are multiple dependencies like
> this. Is there any way that I not maintain global variables and get the
> pointer to other widgets? I have instances where there are more than two
> windows open and multiple widget from other windows need to be accessed.
> Also I cannot have all of them in one builder since I cannot afford to spend
> memory to create all windows at a time.
>
> How to manage this and access different pointers in different windows?
> Regards,
> Harinandan S
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>



-- 
Tadej Borovšak
00386 (0)40 613 131
tadeboro gmail com
tadej borovsak gmail com


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