MenuItem.setAccelPath
void setAccelPath(string accelPath = null)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 persistent storage (see [gtk.accel_map.AccelMap.save] on this). To set up a default accelerator for this menu item, call [gtk.accel_map.AccelMap.addEntry] with the same accel_path. See also [gtk.accel_map.AccelMap.addEntry] on the specifics of accelerator paths, and [gtk.menu.Menu.setAccelPath] for a more convenient variant of this function.
This function is basically a convenience wrapper that handles calling [gtk.widget.Widget.setAccelPath] with the appropriate accelerator group for the menu item.
Note that you do need to set an accelerator on the parent menu with [gtk.menu.Menu.setAccelGroup] 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 [glib.global.internStaticString].
Parameters
accelPath | accelerator path, corresponding to this menu item’s functionality, or null to unset the current path. |