trouble with dynamic accel changing

I have been updating my action based menu demo to use the new GtkAccelGroup/GtkAccelMap APIs, and hit a bit of a snag with dynamic accel changing. The current version is up at:

For each action object, I have an associated GClosure that just emits the activate signal on the action. I call gtk_accel_group_connect_by_path() on each action to associate a path with the closure. The actual key combos are associated with the action through a call to gtk_accel_map_add_entry().

For each menu item proxy in the demo, I call gtk_menu_item_set_accel_path() so that dynamically changing the accelerator should affect the action as well. The GtkAccelLabels inside the menu items are watching the action's closure rather than the menu item itself, so they show the accelerator attached to the action.

Now when I try to change accelerators, I just get a beep. Any idea why this would be failing?


Email: james daa com au

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