UIManager get_action_groups



Hi,

I'm trying to create dynamic menus using the UIManager, and am running
into a few problems, Gtkmm-2.6.4.

I'm basically trying to add an option to an existing menu structure.
I've got a simple test app and a callback which attempts to add a new
Action to an ActionGroup, then update the UIManager with
add_ui_from_string.

First of all, if I call
  uimanager->get_action_groups()
and do nothing more, when I exit a test case app, I get several lines
sush as;

(a.out:17434): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

This also happens if I click the same menuitem to perform the callback
again, and sometimes I just get a Segmentation fault.

is this somehow related to this post?
http://mail.gnome.org/archives/gtkmm-list/2004-March/msg00184.html

It seems if I hold onto the RefPtr<ActionGroup> returned when the
ActionGroup is first created, I can add the new item, and update the
UIManager, however if I attempt to access the ActionGroup via the
UIManager, it fails.

Am I doing something daft? Suggestions?
~Colin.




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