diff options
author | Ted Gould <ted@gould.cx> | 2010-05-27 11:43:19 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-05-27 11:43:19 -0500 |
commit | 8c1f4590755a8b7d6db506cd8f03676f6a9c74d2 (patch) | |
tree | baa7819468a0e23ff6332320f48447265ad96fcf /libdbusmenu-gtk/client.c | |
parent | ba52ef2eaf9e377bfc55e00e3c8520a26f2fa0e6 (diff) | |
parent | 77dfdb6c174eed409e8060fd08f6e0bd50d8e9ec (diff) | |
download | libdbusmenu-8c1f4590755a8b7d6db506cd8f03676f6a9c74d2.tar.gz libdbusmenu-8c1f4590755a8b7d6db506cd8f03676f6a9c74d2.tar.bz2 libdbusmenu-8c1f4590755a8b7d6db506cd8f03676f6a9c74d2.zip |
* New upstream release.
* Add function to get submenu of GTK-ified items
* Fix signal prototype of ID update
* Fixing the version string in the GIR file
Diffstat (limited to 'libdbusmenu-gtk/client.c')
-rw-r--r-- | libdbusmenu-gtk/client.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index b13af6a..3bd0af6 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -423,6 +423,29 @@ dbusmenu_gtkclient_menuitem_get (DbusmenuGtkClient * client, DbusmenuMenuitem * return GTK_MENU_ITEM(data); } +/** + dbusmenu_gtkclient_menuitem_get_submenu: + @client: A #DbusmenuGtkClient with the item in it. + @item: #DbusmenuMenuitem to get associated #GtkMenu on. + + This grabs the submenu associated with the menuitem. + + Return value: The #GtkMenu if there is one. +*/ +GtkMenu * +dbusmenu_gtkclient_menuitem_get_submenu (DbusmenuGtkClient * client, DbusmenuMenuitem * item) +{ + g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), NULL); + g_return_val_if_fail(DBUSMENU_IS_MENUITEM(item), NULL); + + gpointer data = g_object_get_data(G_OBJECT(item), data_menu); + if (data == NULL) { + return NULL; + } + + return GTK_MENU(data); +} + /* The base type handler that builds a plain ol' GtkMenuItem to represent, well, the GtkMenuItem */ static gboolean |