From dece0b82c06a7ad23d204c394341d50a64ba3b7b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 26 May 2010 17:18:29 -0500 Subject: Adding a small function to get the submenu of an item. --- libdbusmenu-gtk/client.c | 23 +++++++++++++++++++++++ libdbusmenu-gtk/client.h | 1 + 2 files changed, 24 insertions(+) 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 diff --git a/libdbusmenu-gtk/client.h b/libdbusmenu-gtk/client.h index 4cfbdcf..7672bf7 100644 --- a/libdbusmenu-gtk/client.h +++ b/libdbusmenu-gtk/client.h @@ -77,6 +77,7 @@ struct _DbusmenuGtkClient { GType dbusmenu_gtkclient_get_type (void); DbusmenuGtkClient * dbusmenu_gtkclient_new (gchar * dbus_name, gchar * dbus_object); GtkMenuItem * dbusmenu_gtkclient_menuitem_get (DbusmenuGtkClient * client, DbusmenuMenuitem * item); +GtkMenu * dbusmenu_gtkclient_menuitem_get_submenu (DbusmenuGtkClient * client, DbusmenuMenuitem * item); void dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * item, GtkMenuItem * gmi, DbusmenuMenuitem * parent); -- cgit v1.2.3 From 23bda1f081c96c21af4f645e936fa746013c46a2 Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Thu, 27 May 2010 16:44:35 +0200 Subject: Make sure the ItemUpdated signal matches with what is written in the xml file --- libdbusmenu-glib/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 02c9c57..0da66cc 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -146,8 +146,8 @@ dbusmenu_server_class_init (DbusmenuServerClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(DbusmenuServerClass, id_update), NULL, NULL, - g_cclosure_marshal_VOID__UINT, - G_TYPE_NONE, 1, G_TYPE_UINT); + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); /** DbusmenuServer::layout-updated: @arg0: The #DbusmenuServer emitting the signal. -- cgit v1.2.3 From 7f65b44564cda33de94688b35f0b191fedea1bf8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 May 2010 11:33:40 -0500 Subject: 0.3.0 --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b88d96d..d6c7d51 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.2.9, ted@canonical.com) +AC_INIT(libdbusmenu, 0.3.0, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.2.9, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.3.0, [-Wno-portability]) AM_MAINTAINER_MODE @@ -78,7 +78,7 @@ AC_PATH_PROG([VALA_API_GEN], [vapigen]) ########################### LIBDBUSMENU_CURRENT=1 -LIBDBUSMENU_REVISION=6 +LIBDBUSMENU_REVISION=7 LIBDBUSMENU_AGE=0 AC_SUBST(LIBDBUSMENU_CURRENT) -- cgit v1.2.3