gtkMenuItemSetAccelPath
on
each menu item that should support runtime user changable accelerators.
Instead, by just calling gtkMenuSetAccelPath
on their parent,
each menu item of this menu, that contains a label describing its purpose,
automatically gets an accel path assigned. For example, a menu containing
menu items "New" and "Exit", will, after
gtk_menu_set_accel_path (menu, "/File");
has been called, assign its items the accel paths:
"/File/New"
and "/File/Exit"
.
Assigning accel paths to menu items then enables the user to change
their accelerators at runtime. More details about accelerator paths
and their default setups can be found at gtkAccelMapAddEntry
.gtkMenuSetAccelPath(object, accel.path)
object
GtkMenu
accel.path
accel.path
string will be stored in a GQuark
. Therefore, if you
pass a static string, you can save some memory by interning it first with
gInternStaticString()
.