[Xfce4-commits] <xfconf:master> Don't emit property-changed on cancelled calls.
Nick Schermer
noreply at xfce.org
Sun Apr 22 21:32:01 CEST 2012
Updating branch refs/heads/master
to 5ce79440801208e55bd6d1856c3099cc7e3cfcd3 (commit)
from c30eab4ed3a74fd055a4cefc348ea1818ed975d2 (commit)
commit 5ce79440801208e55bd6d1856c3099cc7e3cfcd3
Author: Nick Schermer <nick at xfce.org>
Date: Sun Apr 22 21:29:38 2012 +0200
Don't emit property-changed on cancelled calls.
xfconf/xfconf-cache.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/xfconf/xfconf-cache.c b/xfconf/xfconf-cache.c
index bb6d889..36bd03e 100644
--- a/xfconf/xfconf-cache.c
+++ b/xfconf/xfconf-cache.c
@@ -454,6 +454,13 @@ xfconf_cache_property_changed(DBusGProxy *proxy,
if(strcmp(channel_name, cache->channel_name))
return;
+ /* if a call was cancelled, we still receive a property-changed from
+ * that value, in that case, abort the emission of the signal. we can
+ * detect this because the new reply is not processed yet and thus
+ * there is still an old_prop in the hash table */
+ if(g_hash_table_lookup(cache->old_properties, property))
+ return;
+
item = g_tree_lookup(cache->properties, property);
if(item)
changed = xfconf_cache_item_update(item, value);
More information about the Xfce4-commits
mailing list