summaryrefslogtreecommitdiff
path: root/gtk/gtkimagemenuitem.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-03-03 01:43:01 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-03-03 01:43:01 +0000
commitf5b8bde792cfaa06a5960bf2498c8c74c6e289bd (patch)
tree935868eb80aa54b0581e8630f427cfd9df6c8132 /gtk/gtkimagemenuitem.c
parent80bef5ac25b3d10e63730fe6f8ee27c44771b642 (diff)
downloadgtk+-f5b8bde792cfaa06a5960bf2498c8c74c6e289bd.tar.gz
Add a note to the docs about how to use this in the context of changeable
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock): Add a note to the docs about how to use this in the context of changeable accelerators. (#72382, Mark Patton)
Diffstat (limited to 'gtk/gtkimagemenuitem.c')
-rw-r--r--gtk/gtkimagemenuitem.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/gtkimagemenuitem.c b/gtk/gtkimagemenuitem.c
index 19f8f41014..a51ccf0248 100644
--- a/gtk/gtkimagemenuitem.c
+++ b/gtk/gtkimagemenuitem.c
@@ -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,