activating the global accelerator map?
- From: Christopher Howard <christopher howard frigidcode com>
- To: gtk-app-devel-list gnome org
- Subject: activating the global accelerator map?
- Date: Fri, 09 Mar 2012 16:00:12 -0900
Hi again. I wrote a whole bunch of menu code for my app with menu bar,
menu, and menu item widgets before I realized that it is supposed to be
done with the GtkUIManager. Since I've got most of it done I don't want
to rewrite it. However, I'm having trouble figuring out how to add
(activate?) the keyboard accelerators. I did one like so:
code:
----------
gtk_accel_map_add_entry ("<gFifteen-Board>/Game/New Game",
'n', GDK_CONTROL_MASK);
gtk_menu_item_set_accel_path (GTK_MENU_ITEM (gf_mi_new_game),
"<gFifteen-Board>/Game/New Game");
----------
But it doesn't seem to work in the application, nor does the shortcut
text show up next to the menu item label. I think I need to activate the
accelerators with gtk_accel_group_activate() or something, but I'm a bit
confused because I'm not even sure how to retrieve the global
accelerator map so I can work with it.
Any guidance would be appreciated.
--
frigidcode.com
indicium.us
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]