aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-06 08:14:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-06 08:14:36 +0800
commit03ec245d4e927b7c2ae32bea6c35851ee9ac35d9 (patch)
treeac847459cf2f8db8b562b31cdd120ae46e25689f /filter
parent9dd6f8341cfd10406782cff940db767eccee08a3 (diff)
downloadgsoc2013-evolution-03ec245d4e927b7c2ae32bea6c35851ee9ac35d9.tar.gz
gsoc2013-evolution-03ec245d4e927b7c2ae32bea6c35851ee9ac35d9.tar.zst
gsoc2013-evolution-03ec245d4e927b7c2ae32bea6c35851ee9ac35d9.zip
Select the most appropriate filter rule.
2001-07-05 Jeffrey Stedfast <fejj@ximian.com> * rule-editor.c (rule_delete): Select the most appropriate filter rule. svn path=/trunk/; revision=10836
Diffstat (limited to 'filter')
-rw-r--r--filter/ChangeLog3
-rw-r--r--filter/libfilter-i18n.h2
-rw-r--r--filter/rule-editor.c9
3 files changed, 12 insertions, 2 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index 58bd174db0..df9b4d0e06 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,5 +1,8 @@
2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
+ * rule-editor.c (rule_delete): Select the most appropriate filter
+ rule.
+
* filtertypes.xml: Fix bug #4043: s/colour/color
2001-07-03 Peter Williams <peterw@ximian.com>
diff --git a/filter/libfilter-i18n.h b/filter/libfilter-i18n.h
index d60ea90300..0c05212bc4 100644
--- a/filter/libfilter-i18n.h
+++ b/filter/libfilter-i18n.h
@@ -1,6 +1,6 @@
/* Automatically generated. Do not edit. */
char *s = N_("after");
-char *s = N_("Assign Colour");
+char *s = N_("Assign Color");
char *s = N_("Assign Score");
char *s = N_("Attachments");
char *s = N_("before");
diff --git a/filter/rule-editor.c b/filter/rule-editor.c
index 33e85aea73..19c49bb16e 100644
--- a/filter/rule-editor.c
+++ b/filter/rule-editor.c
@@ -320,15 +320,22 @@ rule_delete (GtkWidget *widget, RuleEditor *re)
d(printf ("delete rule\n"));
pos = rule_context_get_rank_rule (re->context, re->current, re->source);
if (pos != -1) {
+ gint len;
+
rule_context_remove_rule (re->context, re->current);
- item = g_list_nth_data (((GtkList *)re->list)->children, pos);
+ item = g_list_nth_data (GTK_LIST (re->list)->children, pos);
l = g_list_append (NULL, item);
gtk_list_remove_items (re->list, l);
g_list_free (l);
gtk_object_unref (GTK_OBJECT (re->current));
re->current = NULL;
+
+ /* now select the next rule */
+ len = g_list_length (GTK_LIST (re->list)->children);
+ pos = pos >= len ? len - 1 : pos;
+ gtk_list_select_item (GTK_LIST (re->list), pos);
}
rule_editor_set_sensitive (re);