diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-12-12 07:55:26 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-12-12 07:55:26 +0800 |
commit | 6287bb1af4c0a714b6133a5068dcd7791b1ec969 (patch) | |
tree | e7f75603571ef4b623c32723d5c9580607819303 /filter | |
parent | 0fb5f2db0fa2d1eab01965ec9383410cab140348 (diff) | |
download | gsoc2013-evolution-6287bb1af4c0a714b6133a5068dcd7791b1ec969.tar gsoc2013-evolution-6287bb1af4c0a714b6133a5068dcd7791b1ec969.tar.gz gsoc2013-evolution-6287bb1af4c0a714b6133a5068dcd7791b1ec969.tar.bz2 gsoc2013-evolution-6287bb1af4c0a714b6133a5068dcd7791b1ec969.tar.lz gsoc2013-evolution-6287bb1af4c0a714b6133a5068dcd7791b1ec969.tar.xz gsoc2013-evolution-6287bb1af4c0a714b6133a5068dcd7791b1ec969.tar.zst gsoc2013-evolution-6287bb1af4c0a714b6133a5068dcd7791b1ec969.zip |
Autoselect the rule that ends up in the same position (or the one above it
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).
svn path=/trunk/; revision=6926
Diffstat (limited to 'filter')
-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); |