[Glade-users] Binding data to widgets?



Is it possible to bind data to a widget with glade in the same manner as using
"g_object_set_data(object,key,value)" in direct C? (using libglade-2.4.4, glade
2.0.1)

I'm trying to make my application
(MegaTunix,http://sourceforge.net/project/showfiles.php?group_id=71778)
be able to use libglade to load parts of the gui on demand.  This is needed
because the app talks to external hardware (a Fuel injection ECU) and needs to
adapt based on what features are supported in the hardware it's talking to.

The current code uses LOTS of g_object_set_data() calls to bind various data to
the gui elements that is used in the signal handlers, from digging around in
glade I didn't see any easy way to do this. (for the most part I'm binding
numeric values to textual keys. 
 i.e. g_object_set_data(G_OBJECT(spinner),"offset",121);  I'm not trying to
bind pointers or pointers to structures which would be invalid in a glade file,
just simple data that the handler needs in order to handle changes to the
widget's value.





=====
Dave J. Andruczyk


                
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail




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