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 | |
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')
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 4 | ||||
-rw-r--r-- | mail/message-list.c | 12 |
3 files changed, 17 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 417e0dd6b3..b410bf75cd 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2000-08-11 Dan Winship <danw@helixcode.com> + + * 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 + 2000-08-11 JP Rosevear <jpr@helixcode.com> * mail-config-gui.c (source_dialog): Allow the window diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 7013fa7a65..77143c9258 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -73,10 +73,8 @@ select_first_unread (CamelFolder *folder, gpointer event_data, gpointer data) { FolderBrowser *fb = FOLDER_BROWSER (data); ETable *table = E_TABLE_SCROLLED (fb->message_list->etable)->table; - int mrow; - mrow = e_table_view_to_model_row (table, 0); - message_list_select (fb->message_list, mrow, MESSAGE_LIST_SELECT_NEXT, + message_list_select (fb->message_list, -1, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN); } 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; } |