Learn R Programming

RGtk2 (version 2.20.31)

gtkMenuItemSetAccelPath: gtkMenuItemSetAccelPath

Description

Set the accelerator path on menu.item, through which runtime changes of the menu item's accelerator caused by the user can be identified and saved to persistant storage (see gtkAccelMapSave on this). To setup a default accelerator for this menu item, call gtkAccelMapAddEntry with the same accel.path. See also gtkAccelMapAddEntry on the specifics of accelerator paths, and gtkMenuSetAccelPath for a more convenient variant of this function.

Usage

gtkMenuItemSetAccelPath(object, accel.path)

Arguments

object
a valid GtkMenuItem
accel.path
accelerator path, corresponding to this menu item's functionality, or NULL to unset the current path. [ allow-none ]

Details

This function is basically a convenience wrapper that handles calling gtkWidgetSetAccelPath with the appropriate accelerator group for the menu item. Note that you do need to set an accelerator on the parent menu with gtkMenuSetAccelGroup for this to work. Note that 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().