GMenu: add g_menu_item_set_icon() convenience

This function takes a GIcon, serialises it and sets the resulting
GVariant as the "icon" attribute on the menu item.  We will need to add
a patch to Gtk to actually consume this icon.

Also add G_MENU_ATTRIBUTE_ICON.

https://bugzilla.gnome.org/show_bug.cgi?id=688820
This commit is contained in:
Ryan Lortie
2013-04-20 18:55:03 -04:00
parent 63a0cc3f8d
commit c1c1b33f88
4 changed files with 63 additions and 1 deletions

View File

@@ -3800,6 +3800,7 @@ g_menu_item_new_from_model
<SUBSECTION>
g_menu_item_set_label
g_menu_item_set_icon
g_menu_item_set_action_and_target_value
g_menu_item_set_action_and_target
g_menu_item_set_detailed_action
@@ -3836,8 +3837,9 @@ g_menu_model_get_n_items
<SUBSECTION>
G_MENU_ATTRIBUTE_ACTION
G_MENU_ATTRIBUTE_LABEL
G_MENU_ATTRIBUTE_TARGET
G_MENU_ATTRIBUTE_LABEL
G_MENU_ATTRIBUTE_ICON
G_MENU_LINK_SECTION
G_MENU_LINK_SUBMENU