diff options
Diffstat (limited to 'mail/message-browser.c')
-rw-r--r-- | mail/message-browser.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/mail/message-browser.c b/mail/message-browser.c index 3a471b24e9..280afeea07 100644 --- a/mail/message-browser.c +++ b/mail/message-browser.c @@ -129,27 +129,41 @@ static void message_browser_next_msg (GtkWidget *button, gpointer user_data) { MessageBrowser *mb = MESSAGE_BROWSER (user_data); + int row; + + row = e_tree_row_of_node (mb->fb->message_list->tree, + e_tree_get_cursor (mb->fb->message_list->tree)); + + message_list_select (mb->fb->message_list, row, + MESSAGE_LIST_SELECT_NEXT, + 0, 0); - next_msg (NULL, mb->fb); } static void message_browser_prev_msg (GtkWidget *button, gpointer user_data) { MessageBrowser *mb = MESSAGE_BROWSER (user_data); + int row; + + row = e_tree_row_of_node (mb->fb->message_list->tree, + e_tree_get_cursor (mb->fb->message_list->tree)); + + message_list_select (mb->fb->message_list, row, + MESSAGE_LIST_SELECT_PREVIOUS, + 0, 0); - previous_msg (NULL, mb->fb); } static void -message_browser_message_selected (MessageList *ml, const char *uid, MessageBrowser *mb) +message_browser_message_loaded (FolderBrowser *fb, const char *uid, MessageBrowser *mb) { CamelMimeMessage *message; char *subject = NULL; - g_warning ("got 'message_selected' event"); + g_warning ("got 'message_loaded' event"); - message = mb->fb->mail_display->current_message; + message = fb->mail_display->current_message; if (message) subject = (char *) camel_mime_message_get_subject (message); @@ -164,9 +178,6 @@ message_browser_folder_loaded (FolderBrowser *fb, const char *uri, MessageBrowse g_warning ("got 'folder_loaded' event"); - gtk_signal_connect (GTK_OBJECT (fb->message_list), "message_selected", - message_browser_message_selected, mb); - message_list_select_uid (fb->message_list, uid); } @@ -274,6 +285,9 @@ message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const c gtk_signal_connect (GTK_OBJECT (fb), "folder_loaded", message_browser_folder_loaded, new); + gtk_signal_connect (GTK_OBJECT (fb), "message_loaded", + message_browser_message_loaded, new); + folder_browser_set_uri (fb, uri); return GTK_WIDGET (new); |