MenuItem.setIcon

void setIcon(gio.icon.Icon icon)

Sets (or unsets) the icon on menu_item.

This call is the same as calling [gio.icon.Icon.serialize] and using the result as the value to [gio.menu_item.MenuItem.setAttributeValue] for [gio.types.MENU_ATTRIBUTE_ICON].

This API is only intended for use with "noun" menu items; things like bookmarks or applications in an "Open With" menu. Don't use it on menu items corresponding to verbs (eg: stock icons for 'Save' or 'Quit').

If icon is null then the icon is unset.

Parameters

icona #GIcon, or null