aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-12-01 20:13:48 -0600
committerTed Gould <ted@gould.cx>2010-12-01 20:13:48 -0600
commit5c3f84012f814438bb6b40488d943620a2df72c9 (patch)
treece8abb74752aa2b6ab08916044b551bb42766ddd /libdbusmenu-glib
parent0ac0a85f42be1aa1c93cfc42a0b4d455f594ba2c (diff)
parentb3768eaec11202758801a3dd0f94a2ab315f4a0d (diff)
downloadlibdbusmenu-5c3f84012f814438bb6b40488d943620a2df72c9.tar.gz
libdbusmenu-5c3f84012f814438bb6b40488d943620a2df72c9.tar.bz2
libdbusmenu-5c3f84012f814438bb6b40488d943620a2df72c9.zip
Merging in trunk changes for dual build and GTK3 fixes
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/client.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 454e8bb..a15469b 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -43,6 +43,10 @@ License version 3 and version 2.1 along with this program. If not, see
#include "client-marshal.h"
#include "dbus-menu-clean.xml.h"
+/* How many property requests should we queue before
+ sending the message on dbus */
+#define MAX_PROPERTIES_TO_QUEUE 100
+
/* Properties */
enum {
PROP_0,
@@ -689,6 +693,13 @@ get_properties_globber (DbusmenuClient * client, gint id, const gchar ** propert
priv->delayed_idle = g_idle_add(get_properties_idle, client);
}
+ /* Look at how many proprites we have queued up and
+ make it so that we don't leave too many in one
+ request. */
+ if (priv->delayed_property_listeners->len == MAX_PROPERTIES_TO_QUEUE) {
+ get_properties_flush(client);
+ }
+
return;
}
@@ -1429,8 +1440,10 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it
/* We've got everything built up at this node and reconcilled */
- /* Flush the properties requests */
- get_properties_flush(client);
+ /* Flush the properties requests if this is the first level */
+ if (dbusmenu_menuitem_get_id(parent) == 0) {
+ get_properties_flush(client);
+ }
/* now it's time to recurse down the tree. */
children = node->children;