aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@gnome.org>2012-03-02 01:04:32 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-03-03 22:02:34 +0800
commite758de5b1d7f0e257ff034caa9d73db64607a800 (patch)
treea599c6a8898897852a4be59b8a9b34b8203d80de /filter
parent147687c60f59d6b8a9d484750119102329b6be04 (diff)
downloadgsoc2013-evolution-e758de5b1d7f0e257ff034caa9d73db64607a800.tar.gz
gsoc2013-evolution-e758de5b1d7f0e257ff034caa9d73db64607a800.tar.zst
gsoc2013-evolution-e758de5b1d7f0e257ff034caa9d73db64607a800.zip
Redo Filters/Search folder editors to use a shared non ui based library for
making search folders running remotely.
Diffstat (limited to 'filter')
-rw-r--r--filter/e-rule-context.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c
index 444b6c3388..175e885d8a 100644
--- a/filter/e-rule-context.c
+++ b/filter/e-rule-context.c
@@ -582,7 +582,11 @@ e_rule_context_add_part_set (ERuleContext *context,
g_return_if_fail (append != NULL);
g_return_if_fail (next != NULL);
- g_return_if_fail (g_hash_table_lookup (context->part_set_map, setname) == NULL);
+ if ((map = g_hash_table_lookup (context->part_set_map, setname)) != NULL) {
+ g_hash_table_remove (context->part_set_map, setname);
+ free_part_set (map);
+ map = NULL;
+ }
map = g_malloc0 (sizeof (*map));
map->type = part_type;
@@ -607,7 +611,11 @@ e_rule_context_add_rule_set (ERuleContext *context,
g_return_if_fail (append != NULL);
g_return_if_fail (next != NULL);
- g_return_if_fail (g_hash_table_lookup (context->rule_set_map, setname) == NULL);
+ if ((map = g_hash_table_lookup (context->rule_set_map, setname)) != NULL) {
+ g_hash_table_remove (context->rule_set_map, setname);
+ free_rule_set (map);
+ map = NULL;
+ }
map = g_malloc0 (sizeof (*map));
map->type = rule_type;