aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-11-03 17:28:00 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-11-03 17:28:00 +0800
commit8952ed2a26a3096c4592bd3dc0d8e47829e3999c (patch)
tree5f961203ade5184110e865cfcbf866f00e4f5492 /mail/mail-ops.c
parent2f0f6b89c36edeeb6b28d67992ab88c01e02dd49 (diff)
downloadgsoc2013-evolution-8952ed2a26a3096c4592bd3dc0d8e47829e3999c.tar.gz
gsoc2013-evolution-8952ed2a26a3096c4592bd3dc0d8e47829e3999c.tar.zst
gsoc2013-evolution-8952ed2a26a3096c4592bd3dc0d8e47829e3999c.zip
Added mail-display.h.
2000-11-03 Not Zed <NotZed@HelixCode.com> * mail-view.c: Added mail-display.h. * mail-autofilter.c: Removed unecessary headers. Who ran indent over this code? Sigh. * mail-ops.c (display_message_input_s): Added messagedisplay. (mail_do_display_message): Added messagedisplay arg. (mail_do_display_message): Dont bother doing another thread when we know we dont have a uid. (): Added folder-browser.h to headers. Sigh. * folder-browser-factory.c (control_activate): Setup the viewthreaded callback to the folder_browser function. * folder-browser.c (my_folder_browser_init): Connect to right_click of etable of the messagelist here. (on_right_click): Changed for argument changes. (folder_browser_toggle_threads): Changed to take a fb, and to set threaded mode on the messagelist. (my_folder_browser_init): Connect also to the double_click signal. (my_folder_browser_init): Connect to the message_selected signal of the message_list. (on_message_selected): Signal handler for message selected. (my_folder_browser_init): Fix for change to message_list_new(). * message-list.h: Dont include folder-browser.h. (message_list_toggle_threads): Moved into folder-browser.h. (struct _MessageList): Removed folderbrowser. * mail.h: Dont include folder-browser.h here either, but mail-types.h instead. Moved prototypes moved into folder-browser.c into folder-browser.h. (vfolder_*, filter_*). * mail-display.h: Dont include folder-browser.h here, but mail-types.h and specific camel headers. * message-thread.c (sort_node): Invert the sort order logic so the list is sorted in mailbox order, not reverse mailbox order. * message-list.c (free_tree_ids): Fix a merge foo. (remove_node_diff): Removed unused row argument. Fixed callers/prototype. (clear_tree): pre_change on the removal of the root node. (build_flat): Only perform pre_change if we are rebuilding the whole lot. For incremental change let etable do its thing. (build_tree): Likewise for building the tree view. If making incremental updates, do them as we build it. (vfolder_subject): (vfolder_sender): (vfolder_recipient): (filter_subject): (filter_sender): (filter_recipient): (filter_mlist): (on_right_click): Moved to folder-browser.c, where they belong. (message_list_init): Dont connect to right_click anymore. (message_list_toggle_threads): Moved to folder-browser.c, renamed. (on_double_click): Moved to folder-browser.c (on_click): Set the flags directly, rather than in anothre thread, which is just not necessary. (message_list_class_init): Added a new signal 'message_selected', to indicate when a message was selected. (on_cursor_change_idle): Emit a signal, rather than directly triggering the display update. (select_row): Removed, no longer used. (idle_select_row): And this too. (select_msg): Removed as well. (message_list_select): Emit a signal, rather thandisplaying/clearing the mail-display directly. (mark_msg_seen): Moved to folder-browser.c (message_list_new): Removed folderbrowser argument. svn path=/trunk/; revision=6365
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index e5c9140a15..f94d065b16 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -33,6 +33,7 @@
#include "mail-tools.h"
#include "mail-ops.h"
#include "composer/e-msg-composer.h"
+#include "folder-browser.h"
/* ** FETCH MAIL ********************************************************** */
@@ -1894,6 +1895,7 @@ mail_do_sync_folder (CamelFolder *folder)
typedef struct display_message_input_s
{
MessageList *ml;
+ MailDisplay *md;
gchar *uid;
gint (*timeout) (gpointer);
}
@@ -1947,8 +1949,7 @@ do_display_message (gpointer in_data, gpointer op_data, CamelException *ex)
return;
}
- data->msg = camel_folder_get_message (input->ml->folder,
- input->uid, ex);
+ data->msg = camel_folder_get_message (input->ml->folder, input->uid, ex);
}
static void
@@ -1957,8 +1958,7 @@ cleanup_display_message (gpointer in_data, gpointer op_data,
{
display_message_input_t *input = (display_message_input_t *) in_data;
display_message_data_t *data = (display_message_data_t *) op_data;
-
- MailDisplay *md = input->ml->parent_folder_browser->mail_display;
+ MailDisplay *md = input->md;
if (data->msg == NULL) {
mail_display_set_message (md, NULL);
@@ -1995,7 +1995,7 @@ static const mail_operation_spec op_display_message = {
};
void
-mail_do_display_message (MessageList *ml, const char *uid,
+mail_do_display_message (MessageList *ml, MailDisplay *md, const char *uid,
gint (*timeout) (gpointer))
{
display_message_input_t *input;
@@ -2003,8 +2003,14 @@ mail_do_display_message (MessageList *ml, const char *uid,
g_return_if_fail (IS_MESSAGE_LIST (ml));
g_return_if_fail (timeout != NULL);
+ if (uid == NULL) {
+ mail_display_set_message (md, NULL);
+ return;
+ }
+
input = g_new (display_message_input_t, 1);
input->ml = ml;
+ input->md = md;
input->uid = g_strdup (uid);
input->timeout = timeout;