aboutsummaryrefslogtreecommitdiffstats
path: root/filter/rule-context.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-04-30 01:08:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-04-30 01:08:40 +0800
commit8a3def40ba938b502f67a697704f67f31623465e (patch)
tree113c0ef6e80dafee9027ec3068de964c86df5bc1 /filter/rule-context.c
parent71c542d2b38013e861e7fa16cf9a8e33865ea572 (diff)
downloadgsoc2013-evolution-8a3def40ba938b502f67a697704f67f31623465e.tar.gz
gsoc2013-evolution-8a3def40ba938b502f67a697704f67f31623465e.tar.zst
gsoc2013-evolution-8a3def40ba938b502f67a697704f67f31623465e.zip
Fix for bug #41578.
2003-04-24 Jeffrey Stedfast <fejj@ximian.com> Fix for bug #41578. * rule-editor.c (rule_move): Pass re->source instead of re->current->source to rule_context_get_rank_rule(). Also updated to pass re->source to rule_context_rank_rule(). (rule_editor_play_undo): Updated to pass re->source to rule_context_rank_rule(). * rule-context.c (rule_context_rank_rule): Now takes a 'source' argument rather than using rule->source (vfolder editor lists rules of all sources, not just same-source rules). (revert): Pass frule->source/part->source to rule_context_rank_rule() - might not be right but should preserve the prior behaviour at least. svn path=/trunk/; revision=21006
Diffstat (limited to 'filter/rule-context.c')
-rw-r--r--filter/rule-context.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/filter/rule-context.c b/filter/rule-context.c
index a131db6d63..a1751b6e62 100644
--- a/filter/rule-context.c
+++ b/filter/rule-context.c
@@ -542,11 +542,11 @@ revert(RuleContext *rc, const char *user)
filter_rule_copy(frule, part);
g_object_unref(part);
- rule_context_rank_rule(rc, frule, rest_data->rank);
+ rule_context_rank_rule(rc, frule, frule->source, rest_data->rank);
g_hash_table_remove(rest_data->rules, frule->name);
} else {
rule_context_add_rule(rc, part);
- rule_context_rank_rule(rc, part, rest_data->rank);
+ rule_context_rank_rule(rc, part, part->source, rest_data->rank);
}
rest_data->rank++;
} else {
@@ -733,7 +733,7 @@ rule_context_remove_rule(RuleContext *rc, FilterRule *rule)
}
void
-rule_context_rank_rule(RuleContext *rc, FilterRule *rule, int rank)
+rule_context_rank_rule(RuleContext *rc, FilterRule *rule, const char *source, int rank)
{
GList *node;
int i = 0, index = 0;
@@ -741,7 +741,7 @@ rule_context_rank_rule(RuleContext *rc, FilterRule *rule, int rank)
g_assert(rc);
g_assert(rule);
- if (rule_context_get_rank_rule(rc, rule, rule->source) == rank)
+ if (rule_context_get_rank_rule (rc, rule, source) == rank)
return;
rc->rules = g_list_remove(rc->rules, rule);
@@ -758,7 +758,7 @@ rule_context_rank_rule(RuleContext *rc, FilterRule *rule, int rank)
}
index++;
- if (rule->source == NULL || (r->source && strcmp(r->source, rule->source) == 0))
+ if (source == NULL || (r->source && strcmp(r->source, source) == 0))
i++;
node = node->next;