GMenuItem: add constructor to copy from model

Add g_menu_item_new_from_model() for constructing a GMenuItem that is a
copy of a menu item that's in a GMenuModel.
This commit is contained in:
Ryan Lortie
2012-08-18 14:24:46 -04:00
parent 99478dd893
commit 6798fcdd0f
4 changed files with 93 additions and 0 deletions

View File

@@ -96,6 +96,10 @@ GType g_menu_item_get_type (void) G_GNUC_CONST;
GMenuItem * g_menu_item_new (const gchar *label,
const gchar *detailed_action);
GLIB_AVAILABLE_IN_2_34
GMenuItem * g_menu_item_new_from_model (GMenuModel *model,
gint item_index);
GMenuItem * g_menu_item_new_submenu (const gchar *label,
GMenuModel *submenu);