diff options
author | Dan Winship <danw@src.gnome.org> | 2000-08-12 01:03:25 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-08-12 01:03:25 +0800 |
commit | 5d79af0da616d725eebfc15d100ee62ff18cb037 (patch) | |
tree | cfa9f4d731b12cbd28d4d3278a41252b46b1dca3 /mail/message-list.c | |
parent | b32f025e59170847dbfa42238aa7d2c10983dc6a (diff) | |
download | gsoc2013-evolution-5d79af0da616d725eebfc15d100ee62ff18cb037.tar.gz gsoc2013-evolution-5d79af0da616d725eebfc15d100ee62ff18cb037.tar.zst gsoc2013-evolution-5d79af0da616d725eebfc15d100ee62ff18cb037.zip |
If the caller passes "-1" for the model row, translate that to view row 0.
* message-list.c (message_list_select): If the caller passes "-1"
for the model row, translate that to view row 0.
* message-list.c (idle_select_row):
* mail-callbacks.c (select_first_unread): Use new
message_list_select kludge^H^H^H^H^H^Hfeature
svn path=/trunk/; revision=4743
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index b88bd5f735..a25c449174 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -157,7 +157,8 @@ mark_msg_seen (gpointer data) * @mask: a mask for comparing against @flags * * This moves the message list selection to a suitable row. @base_row - * lists the first row to try, and @flags and @mask combine to specify + * lists the first (model) row to try, but as a special case, model + * row -1 is mapped to view row 0. @flags and @mask combine to specify * what constitutes a suitable row. @direction is * %MESSAGE_LIST_SELECT_NEXT if it should find the next matching * message, or %MESSAGE_LIST_SELECT_PREVIOUS if it should find the @@ -178,7 +179,10 @@ message_list_select (MessageList *message_list, int base_row, else last = e_table_model_row_count (message_list->table_model); - vrow = e_table_model_to_view_row (ets->table, base_row); + if (base_row == -1) + vrow = 0; + else + vrow = e_table_model_to_view_row (ets->table, base_row); /* We don't know whether to use < or > due to "direction" */ while (vrow != last) { @@ -930,10 +934,8 @@ idle_select_row (gpointer user_data) { MessageList *ml = MESSAGE_LIST (user_data); ETableScrolled *ets = E_TABLE_SCROLLED (ml->etable); - int mrow; - mrow = e_table_view_to_model_row (ets->table, 0); - message_list_select (ml, mrow, MESSAGE_LIST_SELECT_NEXT, + message_list_select (ml, -1, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN); return FALSE; } |