[Glade-devel] feature request: additional callback like post-create-function



Hi,

some gtkmm-users (including me) are currently investigating on how to
integrate gtkmm-style widgets into glade.

so far, we have already succeeded in getting the widgets into the glade
palette and have glade set their (Glib::Property-based) properties.
(this only involves a minor part of glue code.)

there remains, however, a problem that can only be solved by patching
glade: whenever a GObject is created, it is necessary to call a function
that wraps this GObject in its correspnding C++ class. this can be done
from the widget's post-create-function and works wonderfully.

however, when loading the widgets from a glade file, the properties of
the GObject get set before the wrapper function is called.
at that time, the custom properties of the respective did already
register a "set_property" function in their GWidgetClass, but as the
respective Glib::Properties are not yet created, the values are silently
lost and later, when the C++-object gets created, are set to their
default values.

so, loading a glade file results in all of the custom properties getting
set to their default values.

a possible solution would be to introduce an additional callback
function in the style of "post-create-function", that gets called after
the GObject is created and before it's properties are set (i suppose in
glade_widget_build_object() right after the call to g_object_newv()).

i can create a patch against the current cvs and post it here (or file a
bug in bugzilla - are there bugs of type "feature request"?).

I'm very interested in every feedback you can give me, including "we
don't care for gtkmm whimps" ;-)

TIA
  --o
-- 
Oliver Nittka
ESEM Gr?nau GmbH & Co. KG
Dornierstra?e 6, 88677 Markdorf/Germany
phone: +49 7544 9583-25, fax: +49 7544 9583-60




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