[gnomemm] Initializing an inherited Gtk::Widget with Glade XML's get_widget()



Hey all,

When I do this:
namespace MyMenus {
//...
class Base : public Gtk::Menu {
public:
     Base(const Glib::ustring& menu_name) : Gtk::Menu(
         (GtkMenu*) glade_xml_get_widget(
             Gnome::Glade::Xml::create(ENV_VARS.pkgdatadir + menu_name + ".glade", menu_name)->gobj(),
             menu_name.c_str()))
     {}
};

....and inherit from that class and create an instance,
 I get something that runs and mostly works but tanks
and spews this error message after the popup() call:

(gabber:8404): Gtk-CRITICAL **: file gtkaccelgroup.c: line 281 (gtk_accel_group_find): assertion `GTK_IS_ACCEL_GROUP (accel_group)' failed

What's the Right Way to do this?

Thanks in advance,

James





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