Package: gio

Function g-menu-item-set-icon

Lambda List

g-menu-item-set-icon (item icon)

Arguments

item -- a g-menu-item object
icon -- a g-icon object

Details

Sets or unsets the icon on the menu item.

This call is the same as calling the g-icon-serialize function and using the result as the value to the g-menu-item-attribute-value function for "icon".

This API is only intended for use with "noun" menu items. Things like bookmarks or applications in an "Open With" menu. Do not use it on menu items corresponding to verbs, e.g. stock icons for 'Save' or 'Quit'.

If the icon argument is nil then the icon is unset.
 

See also

2021-9-5