aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-browser.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-04-25 04:56:56 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-04-25 04:56:56 +0800
commitb61b14b324f367bbd43ab27c16b5bcb88aa2a8c4 (patch)
tree6f3a22682dad3c8ebbb880c009f554c184900e75 /mail/message-browser.c
parentec67eb41a73097b60135d9f85e669f66497ef127 (diff)
downloadgsoc2013-evolution-b61b14b324f367bbd43ab27c16b5bcb88aa2a8c4.tar.gz
gsoc2013-evolution-b61b14b324f367bbd43ab27c16b5bcb88aa2a8c4.tar.zst
gsoc2013-evolution-b61b14b324f367bbd43ab27c16b5bcb88aa2a8c4.zip
Added a new signal, "message_loaded" that gets emitted when the message
2001-04-24 Jeffrey Stedfast <fejj@ximian.com> * folder-browser.c: Added a new signal, "message_loaded" that gets emitted when the message has been loaded and set on the mail_display. (folder_browser_class_init): Define the "message_loaded" signal stuff. (done_message_selected): Emit the "message_loaded" signal here. * message-browser.c (message_browser_next_msg): Do our own message-list manipulation. We want the next message, not the next unread message. (message_browser_prev_msg): Same here but for previous. (message_browser_new): Connect to the folder browser's "message_loaded" signal. (message_browser_folder_loaded): Don't connect to the message-list's "message_selected" signal. (message_browser_message_loaded): Nw callback which replaces the old message_browser_message_selected callback's functionality. svn path=/trunk/; revision=9551
Diffstat (limited to 'mail/message-browser.c')
-rw-r--r--mail/message-browser.c30
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);