diff options
-rw-r--r-- | filter/ChangeLog | 6 | ||||
-rw-r--r-- | filter/vfolder-editor.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index 341ba297b1..92825b84dd 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2000-12-11 Jeffrey Stedfast <fejj@helixcode.com> + + * vfolder-editor.c (rule_delete): Autoselect the rule that ends up + in the same position (or the one above it if the list is shorter + than the position). + 2000-12-08 Jeffrey Stedfast <fejj@helixcode.com> * filter-rule.c (get_widget): Don't highlight the title if it's diff --git a/filter/vfolder-editor.c b/filter/vfolder-editor.c index 0f17005e6e..1b2022fecb 100644 --- a/filter/vfolder-editor.c +++ b/filter/vfolder-editor.c @@ -226,7 +226,7 @@ rule_edit (GtkWidget *widget, struct _editor_data *data) static void rule_delete (GtkWidget *widget, struct _editor_data *data) { - int pos; + int pos, len; GList *l; GtkListItem *item; @@ -242,6 +242,11 @@ rule_delete (GtkWidget *widget, struct _editor_data *data) gtk_object_unref (GTK_OBJECT (data->current)); data->current = NULL; + + /* select the item in the same position or 1-up */ + len = g_list_length (data->list->children); + pos = pos >= len ? len - 1: pos; + gtk_list_select_item (data->list, pos); } set_sensitive (data); |