Re: libglademm, menus, accelgroup, Bug#412037
- From: Murray Cumming <murrayc murrayc com>
- To: Karthik Ganesan <kganesan handylab com>
- Cc: gtkmm-list gnome org
- Subject: Re: libglademm, menus, accelgroup, Bug#412037
- Date: Mon, 12 Mar 2007 01:43:04 +0100
On Thu, 2007-03-08 at 17:14 -0500, Karthik Ganesan wrote:
> 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.
Surely this GtkAccelGroup would be reference-counted.
If you think there is a problem, could you please create a bugzilla
report with a simple test case? It sounds like it should really be a
libglade test case, though.
> 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...
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]