gtkMenuItemSetAccelPath: gtkMenuItemSetAccelPath

Description Usage Arguments Details Author(s)

View source: R/gtkFuncs.R

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

1
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().

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.