Re: Reverse-wrapping gtkmm widgets to gtk+ (for glade3)



On Wed, 2006-11-22 at 17:25 +0100, Oliver Nittka wrote:
> Oliver Nittka schrieb:
> 
> > Seems the properties get set by libglade, but are later overwritten by
> > the c'tor of the Glib::Property.
> 
> ok, my misunderstanding. when libglade sets the properties, the
> GObjectClass'es ->set_property already points to
> custom_set_property_callback. (glibmm2.4-2.12.0/glib/glibmm/property.cc
> l.123)
> 
> there, _get_current_wrapper() fails (no C++ wrapper yet) and the value
> disappears into nirvana :-(
> 
> one solution would be, as Alexander pointed out, to do
> glade_register_custom_prop for each and every of our properties (which
> is sad, because we're 99% there, bot OTOH would solve the issue with enums).
> 
> another possibility would be to glade_register_widget() each of our
> widgets in glade_module_register_widgets(), with a custom *_new function
> that mimics glade_standard_build_widget
> (libglade2-2.6.0/glade/glade-xml.c, l.1586). there we could call our
> wrap_new().

As I understand it, you already have implemented some kind of glade
extension that causes the C++ instance to be instantiated (so that, for
instance, you see the effects of your C++ in a DrawingArea).

So it doesn't seem like much extra work to make sure that the C++
instance is instantiated before the properties are set.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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