diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-15 04:14:08 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-15 04:14:08 +0800 |
commit | 1911f19678bf2dbfa0fb1a8f316293c12c060872 (patch) | |
tree | d7be626e314be2ed93a43ec9177a6e06a1397970 /mail/message-list.c | |
parent | 4ed704581dd70d9fca3388c95cb6a834c592204b (diff) | |
download | gsoc2013-evolution-1911f19678bf2dbfa0fb1a8f316293c12c060872.tar gsoc2013-evolution-1911f19678bf2dbfa0fb1a8f316293c12c060872.tar.gz gsoc2013-evolution-1911f19678bf2dbfa0fb1a8f316293c12c060872.tar.bz2 gsoc2013-evolution-1911f19678bf2dbfa0fb1a8f316293c12c060872.tar.lz gsoc2013-evolution-1911f19678bf2dbfa0fb1a8f316293c12c060872.tar.xz gsoc2013-evolution-1911f19678bf2dbfa0fb1a8f316293c12c060872.tar.zst gsoc2013-evolution-1911f19678bf2dbfa0fb1a8f316293c12c060872.zip |
Implemented.
2002-03-14 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (next_thread): Implemented.
* message-list.c (message_list_select_next_thread): New function
to select the next thread.
svn path=/trunk/; revision=16165
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index e9dd90fa9a..79f24f14a8 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -376,7 +376,7 @@ search_func (ETreeModel *model, ETreePath path, struct search_func_data *data) return FALSE; info = get_message_info (data->message_list, path); - + if (info && (info->flags & data->mask) == data->flags) { gtk_signal_emit (GTK_OBJECT (data->message_list), message_list_signals[MESSAGE_SELECTED], camel_message_info_uid (info)); @@ -463,6 +463,40 @@ message_list_select_uid (MessageList *message_list, const char *uid) } } + +void +message_list_select_next_thread (MessageList *message_list) +{ + ETreePath node, last; + + if (!message_list->cursor_uid) + return; + + /* get the thread parent node */ + last = node = g_hash_table_lookup (message_list->uid_nodemap, message_list->cursor_uid); + while (!e_tree_model_node_is_root (message_list->model, node)) { + last = node; + node = e_tree_model_node_get_parent (message_list->model, node); + } + + /* get the next toplevel node */ + node = e_tree_model_node_get_next (message_list->model, last); + + if (node) { + CamelMessageInfo *info; + + info = get_message_info (message_list, node); + e_tree_set_cursor (message_list->tree, node); + + g_free (message_list->cursor_uid); + message_list->cursor_uid = g_strdup (camel_message_info_uid (info)); + + gtk_signal_emit (GTK_OBJECT (message_list), message_list_signals[MESSAGE_SELECTED], + camel_message_info_uid (info)); + } +} + + /* * SimpleTableModel::col_count */ |