Package: gio

Function gio:menu-item-set-icon

Lambda List

gio:menu-item-set-icon (item icon)

Arguments

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

Details

Sets or unsets the "icon" attribute 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 the "icon" attribute.

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 that correspond to verbs, such as the stock icons for 'Save' or 'Quit'.

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

See also

2024-12-30