diff options
author | Ted Gould <ted@gould.cx> | 2010-07-20 15:15:24 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-07-20 15:15:24 -0500 |
commit | 7467274b62cd6db89dc51a9b0e4ad0b5b3bc6f91 (patch) | |
tree | b7f0b385528f2f13a8c56f735b92aa5a6c6bfe33 | |
parent | 2ef5fad1187c79a33dae89971cc75d5ed7287c42 (diff) | |
download | libdbusmenu-7467274b62cd6db89dc51a9b0e4ad0b5b3bc6f91.tar.gz libdbusmenu-7467274b62cd6db89dc51a9b0e4ad0b5b3bc6f91.tar.bz2 libdbusmenu-7467274b62cd6db89dc51a9b0e4ad0b5b3bc6f91.zip |
After getting all the nodes requested at a particular level we should flush the properties requests.
-rw-r--r-- | libdbusmenu-glib/client.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 4dcf90c..5ecfbde 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -514,6 +514,25 @@ get_properties_idle (gpointer user_data) return FALSE; } +/* Forces a call out to start getting properties with the menu items + that we have queued up already. */ +static void +get_properties_flush (DbusmenuClient * client) +{ + DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client); + + if (priv->delayed_idle != 0) { + g_source_remove(priv->delayed_idle); + priv->delayed_idle = 0; + } + + get_properties_idle(client); + + dbus_g_connection_flush(priv->session_bus); + + return; +} + /* A function to group all the get_properties commands to make them more efficient over dbus. */ static void @@ -1147,6 +1166,10 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it g_list_free(oldchildren); /* We've got everything built up at this node and reconcilled */ + + /* Flush the properties requests */ + get_properties_flush(client); + /* now it's time to recurse down the tree. */ children = node->children; GList * childmis = dbusmenu_menuitem_get_children(item); |