From 10590768038b2f3172040da50533ca4f7802fc34 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 18 Dec 2009 17:56:11 +0100 Subject: Bug #596967 - Per-folder setting for threading and preview panel --- e-util/gconf-bridge.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'e-util/gconf-bridge.c') 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) -- cgit