set_icon


Description:

[ Version ( since = "2.38" ) ]
public void set_icon (Icon icon)

Sets (or unsets) the icon on this.

This call is the same as calling serialize and using the result as the value to set_attribute_value for g_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:

this

a MenuItem

icon

a Icon, or null