Re: [Glade-users] adding custom widgets written with Gtkmm



On Sun, 2008-09-21 at 00:25 +0200, Germán Diago wrote:
> > 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).
> >
> 
> I would be interested in this kind of stuff directly supported in
> glade. I also use gtkmm
> and I find really difficult to add widgets to glade (I gave up).

Indeed, it will need some changes to gtkmm as it will double initialise
(Gtkmm wraps the initialisation of gtk up with the initialisation of its
static data).

If the glade requires="" attribute supports keeping gtkmm initialised
for as long as there is at least one library that uses it then splitting
gtk and glib initialisation out from the gtkmm initialisation should
work - I think. But I haven't yet mapped everything in my head.

It looks like the below would work except as in the comment - any
thoughts?

  Pango::wrap_init();
  Atk::wrap_init();
  Gdk::wrap_init();
  Gtk::wrap_init();
  Glib::wrap_register_init(); // but without calling g_type_init()
  Glib::Error::register_init();

-- 
Tristan



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