]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkimagemenuitem.c
Add a note to the docs about how to use this in the context of changeable
[~andy/gtk] / gtk / gtkimagemenuitem.c
index 19f8f41014daf434b7969ccfcb0e012de91cee6d..a51ccf0248021f9dfcafdbb376ca3b2aab62ae8b 100644 (file)
@@ -350,12 +350,19 @@ gtk_image_menu_item_new_with_mnemonic (const gchar *label)
 /**
  * gtk_image_menu_item_new_from_stock:
  * @stock_id: the name of the stock item.
- * @accel_group: the #GtkAccelGroup to add the menu items accelerator to.
+ * @accel_group: the #GtkAccelGroup to add the menu items accelerator to,
+ *   or %NULL.
  * @returns: a new #GtkImageMenuItem.
  *
  * Creates a new #GtkImageMenuItem containing the image and text from a 
  * stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK 
  * and #GTK_STOCK_APPLY.
+ *
+ * If you want this menu item to have changeable accelerators, then
+ * pass in %NULL for @accel_group call gtk_menu_item_set_accel_path()
+ * with an appropriate path for the menu item, then use gtk_stock_lookup()
+ * too look up the standard accelerator for the stock item and
+ * if one is found, call gtk_accel_map_add_entry() to register it.
  **/
 GtkWidget*
 gtk_image_menu_item_new_from_stock (const gchar      *stock_id,