libglademm, menus, accelgroup, Bug#412037
- From: Karthik Ganesan <kganesan handylab com>
- To: gtkmm-list gnome org
- Subject: libglademm, menus, accelgroup, Bug#412037
- Date: Thu, 08 Mar 2007 17:14:55 -0500
Hi,
I am newbie using Gtk+. But, I think I have found a "feature" that needs
documenting/verification.
Using Gnome::Glade::Xml::create() when used with a root widget that is
not a toplevel widget should be done with care - and the comments added
in response to Bug#412037 need to be changed.
The returned pointer should not go out of scope. The reason is that the
accel group created by libglademm is a (private) member of the object
that has not been assigned to any toplevel window (see
glade_xml_ensure_accel() and glade_xml_set_toplevel() in glade-xml.c)
and gets destroyed when the Glib::RefPtr<Gnome::Glade::Xml> goes out of
scope.
Please see my post earlier regarding libglademm and menus to see an
example demonstrating this.
Roger Leigh's ogcalc example (glade/C++ version) falls into this trap
as well; although it does not crash - he has only buttons and I have
actiongroups/menus in my example.
I still dont completely understand the workings of accelerators in Gtk
+... I could'nt find any writeups and am currently digging through the
source to try and understand! Any pointers would be nice...
Thanks,
-karthik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]