aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-05-05 02:42:04 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-05 02:42:04 +0800
commita24b80f8fd5c0f3dddcc395f8f9ed1b802839637 (patch)
tree2c11359cb637d5192be729272b4f9a82608c7c3f /widgets/table
parentf9682040321beba12c82fc92e58133c5c45be704 (diff)
downloadgsoc2013-evolution-a24b80f8fd5c0f3dddcc395f8f9ed1b802839637.tar
gsoc2013-evolution-a24b80f8fd5c0f3dddcc395f8f9ed1b802839637.tar.gz
gsoc2013-evolution-a24b80f8fd5c0f3dddcc395f8f9ed1b802839637.tar.bz2
gsoc2013-evolution-a24b80f8fd5c0f3dddcc395f8f9ed1b802839637.tar.lz
gsoc2013-evolution-a24b80f8fd5c0f3dddcc395f8f9ed1b802839637.tar.xz
gsoc2013-evolution-a24b80f8fd5c0f3dddcc395f8f9ed1b802839637.tar.zst
gsoc2013-evolution-a24b80f8fd5c0f3dddcc395f8f9ed1b802839637.zip
Don't necessarily set row to 0 if the root node has the cursor (otherwise
2004-05-04 Jeffrey Stedfast <fejj@ximian.com> * e-tree.c (e_tree_find_next): Don't necessarily set row to 0 if the root node has the cursor (otherwise message_list_select() first unread will actually select the second unread if the first unread is the first in the list). Fixes a bug that's been pissing me off for years. svn path=/trunk/; revision=25789
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index e3fc19052f..fc684c5f61 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -2068,14 +2068,12 @@ e_tree_find_next (ETree *et, ETreeFindNextParams params, ETreePathFunc func, gpo
cursor = e_tree_get_cursor (et);
row = e_tree_table_adapter_row_of_node (et->priv->etta, cursor);
row_count = e_table_model_row_count (E_TABLE_MODEL (et->priv->etta));
- if (row == -1)
- row = 0;
-
+
if (params & E_TREE_FIND_NEXT_FORWARD)
found = find_next_in_range (et, row + 1, row_count - 1, func, data);
else
- found = find_prev_in_range (et, row - 1, 0, func, data);
-
+ found = find_prev_in_range (et, row == -1 ? -1 : row - 1, 0, func, data);
+
if (found) {
e_tree_table_adapter_show_node (et->priv->etta, found);
e_tree_set_cursor (et, found);