[Glade-users] adding custom widgets written with Gtkmm



On Sat, Sep 20, 2008 at 12:49 PM, Tristan Wibberley
<tristan at wibberley.org> wrote:
On Sat, 2008-09-20 at 11:58 -0400, Tristan Van Berkom wrote:

Please tell me that your widget already works and that your
not making your tests in an experimental glade environment :D

Just have to double check ;-)

It seems that an application using any gtkmm widgets (and thus libglade
if the implementation of a widget happens to be in gtkmm) must create a
Gtk::Main object from gtkmm and destroy it when exiting.

Is there any way to make that happen from the catalog (I see that there
is support for an init function - but this object must last from before
the first gtkmm widget is created until after the last is destroyed).


What does "/gtk/gtkwidget.c:7967):gtk_widget_real_realize()" have to
say about it, did you look at the source around the assertion ?

I'm just getting my feet wet with gtk at the moment, but it looks like
I've stepped in a very deep puddle.

Lol it might work with a little effort :) please try ! haha

just create one that is static and global in your module :)

Im curious to see if it works, if it does, we can create a c++
plugin that c++ modules can depend on, which could create the Gtk::Main
on your behalf (to avoid problems with multiple c++ plugins loaded).

If it doesnt work, you can use the "parent" argument to fake the type
in glade, and provide extra properties virtually by way of the catalog
(but introspecting the type in an automatic way would be nice).

Cheers,
                 -Tristan




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