From 8952ed2a26a3096c4592bd3dc0d8e47829e3999c Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 3 Nov 2000 09:28:00 +0000 Subject: Added mail-display.h. 2000-11-03 Not Zed * 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 --- mail/message-list.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'mail/message-list.h') diff --git a/mail/message-list.h b/mail/message-list.h index 45a902e856..99776948b3 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -14,8 +14,6 @@ #include #include #include -#include "folder-browser.h" - #define MESSAGE_LIST_TYPE (message_list_get_type ()) #define MESSAGE_LIST(o) (GTK_CHECK_CAST ((o), MESSAGE_LIST_TYPE, MessageList)) @@ -25,7 +23,6 @@ typedef struct _Renderer Renderer; - enum { COL_MESSAGE_STATUS, COL_FLAGGED, @@ -49,12 +46,6 @@ enum { struct _MessageList { BonoboObject parent; - /* the folder browser that contains the - * this message list */ - /* FIXME: This MUST BE REMOVED from this structure. If we need access to the - mail-display, we should store that instead ... */ - FolderBrowser *parent_folder_browser; - ETableModel *table_model; ETreePath *tree_root; @@ -78,6 +69,9 @@ struct _MessageList { typedef struct { BonoboObjectClass parent_class; + + /* signals - select a message */ + void (*message_selected)(MessageList *ml, const char *uid); } MessageListClass; typedef void (*MessageListForeachFunc) (MessageList *message_list, @@ -90,8 +84,7 @@ typedef enum { } MessageListSelectDirection; GtkType message_list_get_type (void); -/* FIXME: We should be passing the MailDisplay to the list, or maybe raise signals instead */ -BonoboObject *message_list_new (FolderBrowser *parent_folder_browser); +BonoboObject *message_list_new (void); void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder); GtkWidget *message_list_get_widget (MessageList *message_list); @@ -108,11 +101,4 @@ void message_list_select (MessageList *message_list, void message_list_set_threaded(MessageList *ml, gboolean threaded); void message_list_set_search(MessageList *ml, const char *search); -/* FIXME: This should be an external callback that calls set_threaded() */ -void message_list_toggle_threads (BonoboUIComponent *component, - const char *path, - Bonobo_UIComponent_EventType type, - const char *state, - gpointer user_data); - #endif /* _MESSAGE_LIST_H_ */ -- cgit