Declaration [src]

gtk_menu_item_set_accel_path (
  GtkMenuItem* menu_item,
  const gchar* accel_path

Description [src]

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_save() on this). To set up a default accelerator for this menu item, call gtk_accel_map_add_entry() with the same accel_path. See also gtk_accel_map_add_entry() on the specifics of accelerator paths, and gtk_menu_set_accel_path() for a more convenient variant of this function.

This function is basically a convenience wrapper that handles calling gtk_widget_set_accel_path() 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_set_accel_group() 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 g_intern_static_string().



Type: const gchar*

Accelerator path, corresponding to this menu item’s functionality, or NULL to unset the current path.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.