diff options
author | Ted Gould <ted@gould.cx> | 2010-02-13 00:03:36 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-13 00:03:36 -0600 |
commit | f7133702f0bec20aa4bebda08c7dd60431529b0b (patch) | |
tree | 8618744021162b4c77016c3d6c50820ce028645d /libdbusmenu-glib | |
parent | 285ee828ae89c5cc5bbf6e829c84d3980ac2f3c4 (diff) | |
download | libdbusmenu-f7133702f0bec20aa4bebda08c7dd60431529b0b.tar.gz libdbusmenu-f7133702f0bec20aa4bebda08c7dd60431529b0b.tar.bz2 libdbusmenu-f7133702f0bec20aa4bebda08c7dd60431529b0b.zip |
Making it so that NULL roots also cause the items to get delayed until we have a root element.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 191ea03..edffb07 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -415,15 +415,14 @@ id_prop_update (DBusGProxy * proxy, gint id, gchar * property, GValue * value, D /* If we're not on the right revision, we need to cache the property changes as it could be that the menuitems don't exist yet. */ - if (priv->my_revision != priv->current_revision) { + if (priv->root == NULL || priv->my_revision != priv->current_revision) { + #ifdef MASSIVEDEBUGGING + g_debug("Delaying prop update until rev %d for id %d property %s", priv->current_revision, id, property); + #endif delay_prop_update(priv->current_revision, priv->delayed_properties, id, property, value); return; } - if (priv->root != NULL) { - return; - } - DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id); g_return_if_fail(menuitem != NULL); @@ -923,6 +922,9 @@ update_layout_cb (DBusGProxy * proxy, guint rev, gchar * xml, GError * error, vo propertyDelayValue * value = &g_array_index(delay->entries, propertyDelayValue, j); DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, value->id); if (mi != NULL) { + #ifdef MASSIVEDEBUGGING + g_debug("Applying delayed property id %d property %s", value->id, value->name); + #endif dbusmenu_menuitem_property_set_value(mi, value->name, &value->value); } g_free(value->name); |