aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-11-11 11:28:43 -0600
committerTed Gould <ted@gould.cx>2010-11-11 11:28:43 -0600
commitd69f09d8320fbd3c4e06a6b96d6b3f77f41b6ffa (patch)
treebc30d10509e8f2814ea6c7e39fe2c9154df353e1 /libdbusmenu-glib
parent6e1734e1ad6ea13270afc6c9730d3e4ded2cda02 (diff)
parentf0c24c976f319d0b087adc0c8bc694cf930aa30b (diff)
downloadlibdbusmenu-d69f09d8320fbd3c4e06a6b96d6b3f77f41b6ffa.tar.gz
libdbusmenu-d69f09d8320fbd3c4e06a6b96d6b3f77f41b6ffa.tar.bz2
libdbusmenu-d69f09d8320fbd3c4e06a6b96d6b3f77f41b6ffa.zip
* New upstream release.
* Adding build support for GTK2/3 builds * Only force a flush of top level items, allow others to be based on the count.
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 6a51764..dae1dd7 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 "server-marshal.h"
#include "client-marshal.h"
+/* How many property requests should we queue before
+ sending the message on dbus */
+#define MAX_PROPERTIES_TO_QUEUE 100
+
/* Properties */
enum {
PROP_0,
@@ -628,6 +632,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;
}
@@ -1283,8 +1294,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;