Gtk.MenuItem.prototype.set_accel_path

function set_accel_path(accel_path:String):void {
    // Gjs wrapper for gtk_menu_item_set_accel_path()
}

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 save on this). To set up a default accelerator for this menu item, call add_entry with the same accel_path. See also add_entry on the specifics of accelerator paths, and Gtk.Menu.prototype.set_accel_path for a more convenient variant of this function.

This function is basically a convenience wrapper that handles calling Gtk.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.prototype.set_accel_group for this to work.

Note that accel_path string will be stored in a GLib.Quark. Therefore, if you pass a static string, you can save some memory by interning it first with GLib.intern_static_string.

accel_path

accelerator path, corresponding to this menu item's functionality, or null to unset the current path.