trouble with dynamic accel changing
- From: James Henstridge <james daa com au>
- To: Gtk Development List <gtk-devel-list gnome org>, Tim Janik <timj gtk org>
- Subject: trouble with dynamic accel changing
- Date: Tue, 04 Dec 2001 09:55:15 +0800
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:
http://www.daa.com.au/~james/files/gmenu.tar.gz
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?
James.
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]