[Glade-users] adding custom widgets written with Gtkmm



On Sat, Sep 20, 2008 at 8:37 PM, Tristan Wibberley
<tristan at wibberley.org> wrote:
On Sat, 2008-09-20 at 20:16 -0400, Tristan Van Berkom wrote:
sure, looks like its worth a try, I wonder if its harmfull at all to
call gtk_init()
twice...

hmm. I think I've been barking up the wrong tree, my "init
function" (ie, my constructor) is not being called and nor is my
on_realize function.

Does glade-3 create an instance by using the
gtkmm___custom_object_mywidget_new() function? Because that is not being
called in my case and if it /were/ called then everything would work, I
think.

In the xml catalog file that you supply to glade, you are allowed
to specify a "init-function" argument (the gnome catalog does that
to register its icons at startup, also the python support plugin to
initialize the interpretor).

I want you to try to assign the "init-function" and supply one in
your library, from that entry point call your Gtkmm initialization
routines.

Double check the api docs at http://glade.gnome.org/docs, do
you want your type to be written to the glade file as "gtkmm_MyObjectType" or
should it be written out as "MyObjectType" (not sure how this should
look from the GtkBuilder side of things..) ?

Remember we have an attribute for the name of the type, and another attribute
for the get-type-function that you must specify yourself if the type
name is something weird like gtkmm_MyObject.

Hope that gives you something to chew ;-)

Cheers,
              -Tristan


--
Tristan






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