From ffe464a75f028d5efb8be49d03bd60c8dd176970 Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Wed, 10 Mar 2010 09:00:02 +0200 Subject: Fix a typo in dbusmenu_menuitem_take_children() documentation. It wasn't fully clear if the "no" was actually "now" or "not", but based on the code I assume that it should be "now". --- libdbusmenu-glib/menuitem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index a2d2682..28d3134 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -459,7 +459,7 @@ take_children_signal (gpointer data, gpointer user_data) While the name sounds devious that's exactly what this function does. It takes the list of children from the @mi and clears the - internal list. The calling function is no in charge of the ref's + internal list. The calling function is now in charge of the ref's on the children it has taken. A lot of responsibility involved in taking children. -- cgit v1.2.3 From 6eef17fbf0844823f52d6971c5f597e366d6f24e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 18 Mar 2010 00:01:40 -0500 Subject: Adding a define to provide a blank icon in the icon name --- libdbusmenu-glib/menuitem.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h index 1382335..04fd911 100644 --- a/libdbusmenu-glib/menuitem.h +++ b/libdbusmenu-glib/menuitem.h @@ -66,6 +66,8 @@ G_BEGIN_DECLS #define DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED 1 #define DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN -1 +#define DBUSMENU_MENUITEM_ICON_NAME_BLANK "blank-icon" + /** DbusmenuMenuitem: -- cgit v1.2.3 From 4f9bfdd91ad1ebd0fb8d778a717c9429a6c258c2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 31 Mar 2010 00:47:26 -0500 Subject: When the proxies drop, we need to assume we're starting over with revision numbers too. --- libdbusmenu-glib/client.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 309a11c..697420f 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -444,6 +444,9 @@ proxy_destroyed (GObject * gobj_proxy, gpointer userdata) priv->layoutcall = NULL; } + priv->current_revision = 0; + priv->my_revision = 0; + build_dbus_proxy(DBUSMENU_CLIENT(userdata)); return; } -- cgit v1.2.3 From 4d34ef26ed23a32ba777d1049a6fa6de88750516 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 31 Mar 2010 01:03:44 -0500 Subject: Removing this error. It's reasonable for this to happen, and the correction is that when we DO get the item, we'll ask for all of it's properties. --- libdbusmenu-glib/client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 697420f..ae4b2f9 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -337,7 +337,12 @@ id_prop_update (DBusGProxy * proxy, gint id, gchar * property, GValue * value, D g_return_if_fail(priv->root != NULL); DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id); - g_return_if_fail(menuitem != NULL); + if (menuitem == NULL) { + #ifdef MASSIVEDEBUGGING + g_debug("Property update '%s' on id %d which couldn't be found", property, id); + #endif + return; + } dbusmenu_menuitem_property_set_value(menuitem, property, value); -- cgit v1.2.3 From 69f2190a6e57920e6086013c87cea5cc1734abcb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 31 Mar 2010 08:59:36 -0500 Subject: Unreffing always when updating. --- libdbusmenu-glib/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index ae4b2f9..fb2a2bc 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -802,13 +802,17 @@ parse_layout (DbusmenuClient * client, const gchar * layout) clean up that old root */ if (oldroot != NULL) { dbusmenu_menuitem_set_root(oldroot, FALSE); - g_object_unref(oldroot); } /* If the root changed we can signal that */ g_signal_emit(G_OBJECT(client), signals[ROOT_CHANGED], 0, priv->root, TRUE); } + /* We need to unref it in this function no matter */ + if (oldroot != NULL) { + g_object_unref(oldroot); + } + return 1; } -- cgit v1.2.3