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/client.c') 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/client.c') 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/client.c') 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