Re: libglademm: mixing Gtk-C code with gtkmm-C++ code possible?



Hi,

I've done a plugin for nautilus using gtkmm and it was necessary to do

Gtk::Main::init_gtkmm_internals();

before doing anything with gtkmmm. Don't know if this is the correct way
but it works. Failing to do that caused lots of stranges messages from
gtkmm, crashes, and of course no widget appeared.

Cheers,

Christian Nolte wrote:
> Hello,
> 
> I am trying to write a simple Gaim-Plugin. Gaim is a pure Gtk-C
> Application and so is the plugin-API. However, I want to write the main
> parts of the plugin with C++ using gtkmm. The UI shall be designed with
> glade2. I have a simple test.glade file which only contains one widget,
> a GtkWindow. Loading the .glade file from within the plugin works fine
> using:
> 
> ---
> RefPtr<Xml> xml = Xml::create("test.glade");
> ---
> 
> The window gets displayed. When I want to access the widget via
> 
> ---	
> Gtk::Window* w = 0;
> xml->get_widget("window", w);
> ---
> 
> I get the following messages from glibmm and libglademm:
> 
> ---
> (gaim:23186): glibmm-CRITICAL **:
> Glib::ObjectBase*<unnamed>::create_new_wrapper(GObject*): assertion
> `wrap_func_table != 0' failed
> 
> (gaim:23186): glibmm-WARNING **: failed to wrap type of 'GtkWindow'
> 
> (gaim:23186): libglademm-CRITICAL **: widget `window' not found in glade
> file `test.glade'
> ---
> 
> Could it be that what I want to do is not possible because the gtkmm-API
> is not correctly initialized? If so, how could this be achived?
> 
> Best regards
> Christian
> 
> 
> --
> Christian Nolte
> 
> key : http://public.fh-wolfenbuettel.de/~noltec/christian-nolte.asc
> or   : www.keyserver.net
> ----------------------------------------------------------------------
> The Information Revolution will be fought on the command line.
> ----------------------------------------------------------------------
_______________________________________________
gnomemm-list mailing list
gnomemm-list gnome org
http://mail.gnome.org/mailman/listinfo/gnomemm-list

-- 
Roger Ferrer Ibáñez



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