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
This commit is contained in:
Jeffrey Stedfast
2001-07-06 00:14:36 +00:00
committed by Jeffrey Stedfast
parent 9dd6f8341c
commit 03ec245d4e
3 changed files with 12 additions and 2 deletions

View File

@ -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>

View File

@ -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");

View File

@ -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);