aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/server.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-02-14 11:00:28 -0600
committerTed Gould <ted@gould.cx>2011-02-14 11:00:28 -0600
commite2d75efe023912f9b4a52c295980137d1717ad14 (patch)
treebf2a167e0f611b8a87346bf51546849796550e5b /libdbusmenu-glib/server.c
parent4b7ed0aa2ddeb47107bb0c67cddc90789378c6c2 (diff)
downloadlibdbusmenu-e2d75efe023912f9b4a52c295980137d1717ad14.tar.gz
libdbusmenu-e2d75efe023912f9b4a52c295980137d1717ad14.tar.bz2
libdbusmenu-e2d75efe023912f9b4a52c295980137d1717ad14.zip
If we get default values of properties, treat them like a clear
Diffstat (limited to 'libdbusmenu-glib/server.c')
-rw-r--r--libdbusmenu-glib/server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index fb5e9ae..bee3199 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -891,6 +891,13 @@ menuitem_property_changed (DbusmenuMenuitem * mi, gchar * property, GVariant * v
}
}
+ /* If it's the default value we want to treat it like a clearing
+ of the value so that it doesn't get sent over dbus and waste
+ bandwidth */
+ if (dbusmenu_menuitem_property_is_default(mi, property)) {
+ variant = NULL;
+ }
+
/* If so, we need to swap the value */
if (prop != NULL) {
g_variant_unref(prop->variant);