diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-09-03 03:01:04 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-09-03 03:01:04 +0800 |
commit | 4654c4625e79a0d36ef25d81a0c6f53fcd714837 (patch) | |
tree | 5ce873589d044e1c3ee1fd5aee8f1fbff0c868e4 /mail/message-list.c | |
parent | e8ae4bc97abed6ad8571908f5fc4ac6fd5565fde (diff) | |
download | gsoc2013-evolution-4654c4625e79a0d36ef25d81a0c6f53fcd714837.tar.gz gsoc2013-evolution-4654c4625e79a0d36ef25d81a0c6f53fcd714837.tar.zst gsoc2013-evolution-4654c4625e79a0d36ef25d81a0c6f53fcd714837.zip |
Make the `Home' and `End' keys do the Right Thing. Remove circular
reference to the shell. Bind "Open in New Window" to `Ctrl-O'.
svn path=/trunk/; revision=5181
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index e4f21933cf..8ee4541248 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1265,3 +1265,49 @@ void mail_do_regenerate_messagelist (MessageList *list, const gchar *search) mail_operation_queue (&op_regenerate_messagelist, input, TRUE); } + +static void +go_to_message (MessageList *message_list, + int model_row) +{ + ETableScrolled *table_scrolled; + const CamelMessageInfo *info; + int view_row; + + table_scrolled = E_TABLE_SCROLLED (message_list->etable); + + view_row = e_table_model_to_view_row (table_scrolled->table, model_row); + info = get_message_info (message_list, model_row); + + if (info != NULL) { + e_table_scrolled_set_cursor_row (table_scrolled, view_row); + mail_do_display_message (message_list, info->uid, mark_msg_seen); + } +} + +void +message_list_home (MessageList *message_list) +{ + g_return_if_fail (message_list != NULL); + + go_to_message (message_list, 0); +} + +void +message_list_end (MessageList *message_list) +{ + ETableScrolled *table_scrolled; + ETable *table; + int num_rows; + + g_return_if_fail (message_list != NULL); + + table_scrolled = E_TABLE_SCROLLED (message_list->etable); + table = table_scrolled->table; + + num_rows = e_table_model_row_count (table->model); + if (num_rows == 0) + return; + + go_to_message (message_list, num_rows - 1); +} |