From a97cd5fdfba888c256b1bf0ec0fd28e869974281 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 14 Apr 2010 16:58:17 -0500 Subject: Return error if we can't find parent in a buildxml routine --- libdbusmenu-glib/server.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libdbusmenu-glib/server.c') diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index d87c024..02c9c57 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -404,6 +404,16 @@ _dbusmenu_server_get_layout (DbusmenuServer * server, gint parent, guint * revis } } else { DbusmenuMenuitem * item = dbusmenu_menuitem_find_id(priv->root, parent); + if (item == NULL) { + if (error != NULL) { + g_set_error(error, + error_quark(), + INVALID_MENUITEM_ID, + "The ID supplied %d does not refer to a menu item we have", + parent); + } + return FALSE; + } dbusmenu_menuitem_buildxml(item, xmlarray); } g_ptr_array_add(xmlarray, NULL); -- 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(-) (limited to 'libdbusmenu-glib/server.c') 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