aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/gconf-bridge.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-12-19 00:56:11 +0800
committerMilan Crha <mcrha@redhat.com>2009-12-19 00:56:11 +0800
commit10590768038b2f3172040da50533ca4f7802fc34 (patch)
tree64e23fda77958e0a421d828ccf54c4ee784bacf2 /e-util/gconf-bridge.c
parentf148a0b0e3aaee26c42c7fc03f7a6359ead71abb (diff)
downloadgsoc2013-evolution-10590768038b2f3172040da50533ca4f7802fc34.tar.gz
gsoc2013-evolution-10590768038b2f3172040da50533ca4f7802fc34.tar.zst
gsoc2013-evolution-10590768038b2f3172040da50533ca4f7802fc34.zip
Bug #596967 - Per-folder setting for threading and preview panel
Diffstat (limited to 'e-util/gconf-bridge.c')
-rw-r--r--e-util/gconf-bridge.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c
index be2a0cabd7..03f82f43ca 100644
--- a/e-util/gconf-bridge.c
+++ b/e-util/gconf-bridge.c
@@ -550,6 +550,46 @@ gconf_bridge_bind_property_full (GConfBridge *bridge,
return binding->id;
}
+static void
+prop_binding_block_cb (gpointer hkey, PropBinding *binding, const gchar *key)
+{
+ g_return_if_fail (binding != NULL);
+ g_return_if_fail (key != NULL);
+ g_return_if_fail (binding->key != NULL);
+
+ if (binding->type == BINDING_PROP && g_ascii_strcasecmp (binding->key, key) == 0)
+ g_signal_handler_block (binding->object, binding->prop_notify_id);
+}
+
+static void
+prop_binding_unblock_cb (gpointer hkey, PropBinding *binding, const gchar *key)
+{
+ g_return_if_fail (binding != NULL);
+ g_return_if_fail (key != NULL);
+ g_return_if_fail (binding->key != NULL);
+
+ if (binding->type == BINDING_PROP && g_ascii_strcasecmp (binding->key, key) == 0)
+ g_signal_handler_unblock (binding->object, binding->prop_notify_id);
+}
+
+void
+gconf_bridge_block_property_bindings (GConfBridge *bridge, const gchar *key)
+{
+ g_return_if_fail (bridge != NULL);
+ g_return_if_fail (key != NULL);
+
+ g_hash_table_foreach (bridge->bindings, (GHFunc) prop_binding_block_cb, (gpointer)key);
+}
+
+void
+gconf_bridge_unblock_property_bindings (GConfBridge *bridge, const gchar *key)
+{
+ g_return_if_fail (bridge != NULL);
+ g_return_if_fail (key != NULL);
+
+ g_hash_table_foreach (bridge->bindings, (GHFunc) prop_binding_unblock_cb, (gpointer)key);
+}
+
/* Unbinds a property binding */
static void
prop_binding_unbind (PropBinding *binding)