ImageMenuItem.newFromStock
gtk.image_menu_item.ImageMenuItem newFromStock(string stockId, gtk.accel_group.AccelGroup accelGroup = null)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. Next call [gtk.menu_item.MenuItem.setAccelPath] with an appropriate path for the menu item, use [gtk.global.stockLookup] to look up the standard accelerator for the stock item, and if one is found, call [gtk.accel_map.AccelMap.addEntry] to register it.
Parameters
stockId | the name of the stock item. |
accelGroup | the #GtkAccelGroup to add the menu items accelerator to, or null. |
Returns
a new #GtkImageMenuItem.
Deprecated
Use [gtk.menu_item.MenuItem.newWithMnemonic] instead.