Commit Graph

343 Commits

Author SHA1 Message Date
9b49b3e25a Set threaded view before setting the folder (cleanup some flash ons
2000-11-30  Not Zed  <NotZed@HelixCode.com>

	* mail-ops.c (cleanup_load_folder): Set threaded view before
	setting the folder (cleanup some flash ons tartup).

	* message-list.c (message_list_init): Initialise a mempool for uid
	string storage.
	(new_id_from_uid): Added messagelist arg, allocate strings from
	uid_pool.
	(new_id_from_subject): Same.  Fixed all callers.
	(remove_node_diff): Dont free uid here.
	(build_flat_diff): Nor here.
	(clear_tree): Flush the mempool, rather than freeing the id's
	directly.
	(free_tree_ids): Removed, no longer required.
	(free_tree_ids): Likewise.
	(message_list_init): Dont connect to the table destroy signal
	anymore to free the uid table.
	(message_list_destroy): Free the uid pool here.
	(*): Use accessors for messageid stuff.
	(content_is_attachment): Removed, no longer required.
	(ml_tree_value_at): Get the attachment flag directly from the
	summary.
	(ml_tree_value_at): For 'fake' nodes, try and do something better
	than "?" for from, to, and size.
	(subtree_size): New function, add up the total size of a subtree.
	(subtree_earliest): Get the earliest date from a subtree.
	(ml_tree_value_at): Return earliest date sent/received for fake
	nodes.
	(ml_tree_value_at): Return something to mark a fake subject line
	as a fake subject, although i dont know, i guess this buggers up
	sorting ...
	(subtree_size): Check the info node is still there.
	(subtree_earliest): Same here.
	(subtree_unread): And here.  The info node might vanish if the
	folder has changed/is changing and we try and redraw stuff while
	its doing it.
	(message_list_drag_data_get): Use accessors.

svn path=/trunk/; revision=6732
2000-11-30 11:32:50 +00:00
6a337122e6 Use camel a bit more to help us out. Don't create the file ourselves,
2000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_save_messages): Use camel a bit more to help us
	out. Don't create the file ourselves, treat it as a CamelFolder so
	we don't have to worry about formatting.

svn path=/trunk/; revision=6724
2000-11-29 20:45:09 +00:00
3ca789bf0f Wait until after setting up the local storage to find the
* component-factory.c (owner_set_cb): Wait until after setting up
	the local storage to find the Drafts/Outbox/Sent folders.

	* mail-ops.c (do_setup_folder): Use the file: store rather than
	mbox:.

svn path=/trunk/; revision=6704
2000-11-28 22:59:00 +00:00
f22ac8e3a0 Added the SaveAs bonobo menu verb thingy.
2000-11-28  Jeffrey Stedfast  <fejj@helixcode.com>

	* folder-browser-factory.c: Added the SaveAs bonobo menu verb
	thingy.

	* mail-callbacks.c (save_msg): New callback for saving messages.
	(save_msg_ok):

	* folder-browser.c (on_right_click): Add a Save Ass menu item.

	* mail-ops.c (cleanup_save_messages): Save all emails to the path
	given.

svn path=/trunk/; revision=6699
2000-11-28 20:37:43 +00:00
0fa1b87e9e New function to return if user wants to view message source.
2000-11-21  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-config.c (mail_config_view_source): New function to return
	if user wants to view message source.
	(mail_config_set_view_source): New function to set whether the
	view wants to view source.

	* mail-ops.c (mail_do_view_message_sources): Removed. We're not
	gonna view-source this way anymore.

	* folder-browser-factory.c: Removed the ViewSource bonobo verb
	from the Message menu.
	(control_activate): Added ViewSource.

	* folder-browser.c (on_right_click): Removed Message menu item to
	view message source.
	(folder_browser_toggle_view_source): New callback to set whether
	or not the MailDisplay shows the raw message or the pretty-ified
	message.

	* mail-callbacks.c: Removed view_source.

	* mail-display.c (redisplay): If toggle_raw is set then display
	the raw message else display the pretty formatted message.
	(mail_display_redisplay): New function to force the redisplay of a
	message.

	* mail-format.c (mail_format_raw_message): New function to
	write the raw message data.

svn path=/trunk/; revision=6639
2000-11-21 22:09:51 +00:00
484334eaec Fix IMAP get-mail to work; CORBA calls in the dispatch thread are a no-no.
svn path=/trunk/; revision=6620
2000-11-21 02:08:37 +00:00
b8262fdf8d Use the new quote_message function and make it start with "On %s, %s
2000-11-17  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (mail_generate_reply): Use the new quote_message
	function and make it start with "On %s, %s wrote:" since people
	seem to want that.

	* mail-ops.c (cleanup_forward_messages): Use the new quote_message
	function.

	* mail-tools.c (mail_tool_quote_message): New convenience function
	to quote a message body (since both the reply and forward code do
	similar quoting)

svn path=/trunk/; revision=6605
2000-11-17 22:29:53 +00:00
4db080e17f Added the MessageViewSource bonobo menu verb.
2000-11-16  Jeffrey Stedfast  <fejj@helixcode.com>

	* folder-browser-factory.c: Added the MessageViewSource bonobo
	menu verb.

	* mail-ops.c (mail_do_save_messages): New async function to save
	messages as individual files in a given path.

svn path=/trunk/; revision=6596
2000-11-16 23:05:32 +00:00
64f95feb7d Added a new Forward as Attachment bonobo menu item verb.
2000-11-15  Jeffrey Stedfast  <fejj@helixcode.com>

	* folder-browser-factory.c: Added a new Forward as Attachment
	bonobo menu item verb.

	* mail-view.c (view_forward_msg): Updated to reflect changes to
	mail_do_forward_message(). It now forwards the message without
	attaching it - is this what we want?

	* mail-ops.c (mail_do_view_message_sources): New async function to
	display message source dialog windows.
	(setup_forward_messages): If we were asked not to forward the
	message(s) as attachment(s) and the user chose more than a single
	message, then default to making each message an attachment.
	(cleanup_forward_messages): If we aren't forwarding the message as
	an attachment, then quote the text and set the composer's body
	with it.

	* mail-callbacks.c (view_source): New callback to view the message
	source of all messages that are currently selected.
	(forward_attach): New callback to forward a message as an
	attachment (forward_msg is now for forwarding a message without it
	being an attachment).
	(forward_message): Convenience function for forwarding messages.

svn path=/trunk/; revision=6585
2000-11-16 00:36:07 +00:00
f95b414ea3 Sync the source folder.
2000-11-12  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_filter_ondemand): Sync the source folder.

svn path=/trunk/; revision=6553
2000-11-12 21:50:27 +00:00
3d3cfc1137 A very, long, very tedious IDL API rename and re-scoping;
this script + some grunt approximates the work:

    s/Evolution_MessageList/GNOME_Evolution_MessageList/g;
    s/GNOME_Evolution_MessageList_select_message/GNOME_Evolution_MessageList_selectMessage/g;
    s/GNOME_Evolution_MessageList_open_message/GNOME_Evolution_MessageList_openMessage/g;

    s/Evolution_Folder([ \t])/GNOME_Evolution_Folder$1/g;
    s/Evolution_FolderTypeList/GNOME_Evolution_FolderTypeList/g;
    s/Evolution_FolderBrowser/GNOME_Evolution_FolderBrowser/g;
    s/GNOME_Evolution_FolderBrowser_get_message_list/GNOME_Evolution_FolderBrowser_getMessageList/g;

    s/Evolution_LocalStorage/GNOME_Evolution_LocalStorage/g;
    s/GNOME_Evolution_LocalStorage_update_folder/GNOME_Evolution_LocalStorage_updateFolder/g;

    s/Evolution_ShellView/GNOME_Evolution_ShellView/g;
    s/GNOME_Evolution_ShellView_set_message/GNOME_Evolution_ShellView_setMessage/g;
    s/GNOME_Evolution_ShellView_unset_message/GNOME_Evolution_ShellView_unsetMessage/g;
    s/GNOME_Evolution_ShellView_change_current_view/GNOME_Evolution_ShellView_changeCurrentView/g;

    s/Evolution_StorageSetViewListener/GNOME_Evolution_StorageSetViewListener/g;
    s/GNOME_Evolution_StorageSetViewListener_folder_selected/GNOME_Evolution_StorageSetViewListener_notifyFolderSelected/g;
    s/GNOME_Evolution_StorageSetViewListener_storage_selected/GNOME_Evolution_StorageSetViewListener_notifyStorageSelected/g;

    s/Evolution_StorageSetView/GNOME_Evolution_StorageSetView/g;
    s/GNOME_Evolution_StorageSetView_add_listener/GNOME_Evolution_StorageSetView_addListener/g;
    s/GNOME_Evolution_StorageSetView_remove_listener/GNOME_Evolution_StorageSetView_removeListener/g;

    s/Evolution_Shell/GNOME_Evolution_Shell/g;
    s/GNOME_Evolution_Shell_get_component_for_type/GNOME_Evolution_Shell_getComponentByType/g;
    s/GNOME_Evolution_Shell_user_select_folder/GNOME_Evolution_Shell_selectUserFolder/g;
    s/GNOME_Evolution_Shell_get_local_storage/GNOME_Evolution_Shell_getLocalStorage/g;
    s/GNOME_Evolution_Shell_create_storage_set_view/GNOME_Evolution_Shell_createStorageSetView/g;

    s/Evolution_FolderSelectionListener/GNOME_Evolution_FolderSelectionListener/g;
    s/GNOME_Evolution_FolderSelectionListener_selected/GNOME_Evolution_FolderSelectionListener_notifySelected/g;
    s/GNOME_Evolution_FolderSelectionListener_cancel/GNOME_Evolution_FolderSelectionListener_notifyCanceled/g;

    s/Evolution_Storage/GNOME_Evolution_Storage/g;
    s/GNOME_Evolution_Storage_add_listener/GNOME_Evolution_Storage_addListener/g;
    s/GNOME_Evolution_Storage_remove_listener/GNOME_Evolution_Storage_removeListener/g;

    s/GNOME_Evolution_StorageListener_destroyed/GNOME_Evolution_StorageListener_notifyDestroyed/g;
    s/GNOME_Evolution_StorageListener_new_folder/GNOME_Evolution_StorageListener_notifyFolderCreated/g;
    s/GNOME_Evolution_StorageListener_update_folder/GNOME_Evolution_StorageListener_notifyFolderUpdated/g;
    s/GNOME_Evolution_StorageListener_removed_folder/GNOME_Evolution_StorageListener_notifyFolderRemoved/g;

    s/GNOME_Evolution_StorageRegistry_register_storage/GNOME_Evolution_StorageRegistry_addStorage/g;
    s/GNOME_Evolution_StorageRegistry_unregister_storage/GNOME_Evolution_StorageRegistry_removeStorageByName/g;

    s/Evolution_ShellComponent/GNOME_Evolution_ShellComponent/g;
    s/GNOME_Evolution_ShellComponent_set_owner/GNOME_Evolution_ShellComponent_setOwner/g;
    s/GNOME_Evolution_ShellComponent_unset_owner/GNOME_Evolution_ShellComponent_unsetOwner/g;
    s/GNOME_Evolution_ShellComponent_create_view/GNOME_Evolution_ShellComponent_createView/g;
    s/GNOME_Evolution_ShellComponent_async_create_folder/GNOME_Evolution_ShellComponent_addFolderAsync/g;
    s/GNOME_Evolution_ShellComponent_async_remove_folder/GNOME_Evolution_ShellComponent_removeFolderAsync/g;
    s/GNOME_Evolution_ShellComponent_populate_folder_context_menu/GNOME_Evolution_ShellComponent_populateFolderContextMenu/g;

    s/GNOME_Evolution_ShellComponentListener_report_result/GNOME_Evolution_ShellComponentListener_notifyResult/g;

    s/Evolution_Session/GNOME_Evolution_Session/g;
    s/GNOME_Evolution_Session_save_configuration/GNOME_Evolution_Session_saveConfiguration/g;
    s/GNOME_Evolution_Session_load_configuration/GNOME_Evolution_Session_loadConfiguration/g;

    s/Evolution_Calendar_Cal/GNOME_Evolution_Calendar_Cal/g;
    s/GNOME_Evolution_Calendar_Cal_get_n_objects/GNOME_Evolution_Calendar_Cal_countObjects/g;
    s/GNOME_Evolution_Calendar_Cal_get_object/GNOME_Evolution_Calendar_Cal_getObject/g;
    s/GNOME_Evolution_Calendar_Cal_get_uids/GNOME_Evolution_Calendar_Cal_getUIds/g;
    s/GNOME_Evolution_Calendar_Cal_get_changed_uids/GNOME_Evolution_Calendar_Cal_getChangedUIds/g;
    s/GNOME_Evolution_Calendar_Cal_get_objects_in_range/GNOME_Evolution_Calendar_Cal_getObjectsInRange/g;
    s/GNOME_Evolution_Calendar_Cal_get_alarms_in_range/GNOME_Evolution_Calendar_Cal_getAlarmsInRange/g;
    s/GNOME_Evolution_Calendar_Cal_get_alarms_for_object/GNOME_Evolution_Calendar_Cal_getAlarmsForObject/g;
    s/GNOME_Evolution_Calendar_Cal_update_object/GNOME_Evolution_Calendar_Cal_updateObject/g;
    s/GNOME_Evolution_Calendar_Cal_remove_object/GNOME_Evolution_Calendar_Cal_removeObject/g;

    s/Evolution_Calendar_Listener/GNOME_Evolution_Calendar_Listener/g;
    s/GNOME_Evolution_Calendar_Listener_cal_loaded/GNOME_Evolution_Calendar_Listener_notifyCalLoaded/g;
    s/GNOME_Evolution_Calendar_Listener_obj_updated/GNOME_Evolution_Calendar_Listener_notifyObjUpdated/g;
    s/GNOME_Evolution_Calendar_Listener_obj_removed/GNOME_Evolution_Calendar_Listener_notifyObjRemoved/g;

    s/Evolution_Calendar_CalFactory/GNOME_Evolution_Calendar_CalFactory/g;
    s/GNOME_Evolution_Calendar_CalFactory_load/GNOME_Evolution_Calendar_CalFactory_load/g;
    s/GNOME_Evolution_Calendar_CalFactory_create/GNOME_Evolution_Calendar_CalFactory_create/g;

    s/Evolution_Composer/GNOME_Evolution_Composer/g;
    s/GNOME_Evolution_Composer_set_headers/GNOME_Evolution_Composer_setHeaders/g;
    s/GNOME_Evolution_Composer_set_body_text/GNOME_Evolution_Composer_setBodyText/g;
    s/GNOME_Evolution_Composer_attach_MIME/GNOME_Evolution_Composer_attachMIME/g;
    s/GNOME_Evolution_Composer_attach_data/GNOME_Evolution_Composer_attachData/g;
    s/GNOME_Evolution_Composer_show/GNOME_Evolution_Composer_show/g;

    s/Evolution_Addressbook_SelectNames/GNOME_Evolution_Addressbook_SelectNames/g;
    s/GNOME_Evolution_Addressbook_SelectNames_add_section/GNOME_Evolution_Addressbook_SelectNames_addSection/g;
    s/GNOME_Evolution_Addressbook_SelectNames_get_entry_for_section/GNOME_Evolution_Addressbook_SelectNames_getEntryBySection/g;
    s/GNOME_Evolution_Addressbook_SelectNames_activate_dialog/GNOME_Evolution_Addressbook_SelectNames_activateDialog/g;

    s/Evolution_CardCursor/GNOME_Evolution_Addressbook_CardCursor/g;
    s/GNOME_Evolution_Addressbook_CardCursor_get_length/GNOME_Evolution_Addressbook_CardCursor_getLength/g;
    s/GNOME_Evolution_Addressbook_CardCursor_get_nth/GNOME_Evolution_Addressbook_CardCursor_getNth/g;

    s/Evolution_BookViewListener/GNOME_Evolution_Addressbook_BookViewListener/g;
    s/GNOME_Evolution_Addressbook_BookViewListener_signal_card_added/GNOME_Evolution_Addressbook_BookViewListener_notifyCardAdded/g;
    s/GNOME_Evolution_Addressbook_BookViewListener_signal_card_removed/GNOME_Evolution_Addressbook_BookViewListener_notifyCardRemoved/g;
    s/GNOME_Evolution_Addressbook_BookViewListener_signal_card_changed/GNOME_Evolution_Addressbook_BookViewListener_notifyCardChanged/g;
    s/GNOME_Evolution_Addressbook_BookViewListener_signal_sequence_complete/GNOME_Evolution_Addressbook_BookViewListener_notifySequenceComplete/g;
    s/GNOME_Evolution_Addressbook_BookViewListener_signal_status_message/GNOME_Evolution_Addressbook_BookViewListener_notifyStatusMessage/g;

    s/Evolution_BookView/GNOME_Evolution_Addressbook_BookView/g;

    s/Evolution_Book/GNOME_Evolution_Addressbook_Book/g;
    s/GNOME_Evolution_Addressbook_Book_get_vcard/GNOME_Evolution_Addressbook_Book_getVCard/g;
    s/GNOME_Evolution_Addressbook_Book_can_write/GNOME_Evolution_Addressbook_Book_isWriteable/g;
    s/GNOME_Evolution_Addressbook_Book_can_write_card/GNOME_Evolution_Addressbook_Book_isCardWriteable/g;
    s/GNOME_Evolution_Addressbook_Book_create_card/GNOME_Evolution_Addressbook_Book_addCard/g;
    s/GNOME_Evolution_Addressbook_Book_remove_card/GNOME_Evolution_Addressbook_Book_removeCard/g;
    s/GNOME_Evolution_Addressbook_Book_modify_card/GNOME_Evolution_Addressbook_Book_modifyCard/g;
    s/GNOME_Evolution_Addressbook_Book_get_cursor/GNOME_Evolution_Addressbook_Book_getCursor/g;
    s/GNOME_Evolution_Addressbook_Book_get_book_view/GNOME_Evolution_Addressbook_Book_getBookView/g;
    s/GNOME_Evolution_Addressbook_Book_get_changes/GNOME_Evolution_Addressbook_Book_getChanges/g;
    s/GNOME_Evolution_Addressbook_Book_check_connection/GNOME_Evolution_Addressbook_Book_checkConnection/g;
    s/GNOME_Evolution_Addressbook_Book_get_static_capabilities/GNOME_Evolution_Addressbook_Book_getStaticCapabilities/g;
    s/GNOME_Evolution_Addressbook_Book_get_name/GNOME_Evolution_Addressbook_Book_getName/g;

    s/Evolution_BookListener/GNOME_Evolution_Addressbook_BookListener/g;
    s/GNOME_Evolution_Addressbook_BookListener_respond_create_card/GNOME_Evolution_Addressbook_BookListener_notifyCardCreated/g;
    s/GNOME_Evolution_Addressbook_BookListener_respond_remove_card/GNOME_Evolution_Addressbook_BookListener_notifyCardRemoved/g;
    s/GNOME_Evolution_Addressbook_BookListener_respond_modify_card/GNOME_Evolution_Addressbook_BookListener_notifyCardModified/g;
    s/GNOME_Evolution_Addressbook_BookListener_report_open_book_progress/GNOME_Evolution_Addressbook_BookListener_notifyOpenBookProgress/g;
    s/GNOME_Evolution_Addressbook_BookListener_respond_open_book/GNOME_Evolution_Addressbook_BookListener_notifyBookOpened/g;
    s/GNOME_Evolution_Addressbook_BookListener_respond_get_cursor/GNOME_Evolution_Addressbook_BookListener_notifyCursorRequested/g;
    s/GNOME_Evolution_Addressbook_BookListener_respond_get_view/GNOME_Evolution_Addressbook_BookListener_notifyViewRequested/g;
    s/GNOME_Evolution_Addressbook_BookListener_respond_get_changes/GNOME_Evolution_Addressbook_BookListener_notifyChangesRequested/g;
    s/GNOME_Evolution_Addressbook_BookListener_report_connection_status/GNOME_Evolution_Addressbook_BookListener_notifyConnectionStatus/g;

    s/Evolution_BookFactory/GNOME_Evolution_Addressbook_BookFactory/g;
    s/GNOME_Evolution_Addressbook_BookFactory_open_book/GNOME_Evolution_Addressbook_BookFactory_openBook/g;

    s/Evolution_SummaryComponent/GNOME_Evolution_Summary_Component/g;
    s/GNOME_Evolution_Summary_SummaryComponent_set_owner/GNOME_Evolution_Summary_Component_setOwner/g;
    s/GNOME_Evolution_Summary_SummaryComponent_unset_owner/GNOME_Evolution_Summary_Component_unsetOwner/g;
    s/GNOME_Evolution_Summary_SummaryComponent_create_view/GNOME_Evolution_Summary_Component_createView/g;
    s/GNOME_Evolution_Summary_SummaryComponent_destroy_view/GNOME_Evolution_Summary_Component_destroyView/g;

    s/Evolution_Summary([ \t])/GNOME_Evolution_Summary_ViewFrame$1/g;
    s/Evolution_Summary_set_title/GNOME_Evolution_Summary_ViewFrame_setTitle/g;
    s/Evolution_Summary_set_icon/GNOME_Evolution_Summary_ViewFrame_setIcon/g;
    s/Evolution_Summary_update_component/GNOME_Evolution_Summary_ViewFrame_updateComponent/g;

    s/GNOME_GNOME/GNOME/g;
    s/GNOME_GNOME/GNOME/g;
    s/GNOME_GNOME/GNOME/g;

svn path=/trunk/; revision=6535
2000-11-10 20:41:13 +00:00
889ddc56b5 Updated to use the ESearchBar object rather than the previously used
2000-11-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* folder-browser.c (search_full_clicked): Updated to use the
	ESearchBar object rather than the previously used search widgets.
	(search_full): Same.
	(search_save): Same. Also use enums to make it a little easier to
	read now that we have to have enums anyway.
	(folder_browser_search_menu_activated): New ESearchBar menu
	callback.
	(folder_browser_search_query_changed): New ESearchBar query
	callback. Replaces search_set()
	(folder_browser_clear_search): Updated to use the ESearchBar
	object rather than the previously used search widgets.
	(folder_browser_gui_init): Don't hand construct a search widget,
	use the new ESearchBar convenience widget.

	* mail-ops.c (cleanup_load_folder): Updated to reflect changes to
	FolderBrowser.

svn path=/trunk/; revision=6490
2000-11-07 22:31:19 +00:00
8952ed2a26 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
2000-11-03 09:28:00 +00:00
f665251bcf Make "Get Mail" even more functional on IMAP (scans all folders),
and do a first cut at folder tree highlighting (for IMAP/news
	only).

	* mail-ops.c (do_fetch_mail): For imap (sigh, we *still* shouldn't
	be hardcoding that), rescan the store's folder tree, rescan each
	changed folder for new messages, and update the shell folder tree.
	(do_scan_subfolders): Update for component-factory.c changes, and
	set folder display names and highlights appropriately when
	building the storage.

	* component-factory.c (add_storage): Make this static (was
	mail_add_new_storage). Use camel_service_get_name for the name
	rather than url->host. (Among other things, this lets you use a
	single machine as both an IMAP server and a news server.)
	(mail_lookup_storage): Hash storages based on their CamelStore
	rather than the URL.
	(factory_destroy): Disconnect each of the CamelStores in the
	storages_hash.

	* subscribe-dialog.c (cleanup_subscribe_folder):
	* mail-vfolder.c (vfolder_refresh): Pass "highlighted" flag to
	evolution_storage_new_folder

svn path=/trunk/; revision=6342
2000-11-02 03:56:41 +00:00
f67d6c30e2 Don't call the default logging function. (do_fetch_mail): Set the logfile
2000-11-01  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (mail_op_report_status): Don't call the default
	logging function.
	(do_fetch_mail): Set the logfile and don't pass the logfile to
	filter_driver_set_status_func - it's purpose has been altered.
	(do_filter_ondemand): Same.

svn path=/trunk/; revision=6341
2000-11-02 03:52:31 +00:00
6db2305b33 ** Merged in camel-incremental-branch.
2000-11-02  Not Zed  <NotZed@HelixCode.com>

        ** Merged in camel-incremental-branch.

        * mail-format.c (mail_get_message_body): Jeff!  Sigh.
        We should definetly not be strduping the
        content, it has already been copied and duplicated.  Look at
        get_data_wrapper_text.

svn path=/trunk/; revision=6337
2000-11-02 03:36:48 +00:00
b23d7cd857 Sync the folder before refreshing so we don't lose flag settings.
* mail-ops.c (do_fetch_mail): Sync the folder before refreshing so
	we don't lose flag settings.

svn path=/trunk/; revision=6254
2000-10-29 20:39:18 +00:00
3a69bfad53 Don't forget to unref the FilterDriver.
2000-10-25  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_send_mail): Don't forget to unref the
	FilterDriver.

	* mail-callbacks.c (apply_filters): New callback for applying
	on-demand filters. (removed the old on-demand filters callback).

	* mail-ops.c (do_filter_ondemand): Rewrote to apply "incoming"
	filters to all selected messages.
	(mail_do_filter_ondemand): No longer takes a FilterContext
	argument or a destination folder argument (why did we ever need
	this last one??) but now takes a uids argument.

	* folder-browser-factory.c: Add a MessageApplyFilters menu item.

svn path=/trunk/; revision=6190
2000-10-26 00:16:31 +00:00
0887fc650f Apply outgoing filters to the message.
2000-10-23  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_send_mail): Apply outgoing filters to the
	message.

svn path=/trunk/; revision=6140
2000-10-24 02:53:01 +00:00
172f70c641 For an imap store, just refresh the INBOX.
* mail-ops.c: (do_fetch_mail): For an imap store, just refresh the
	INBOX.

	* folder-browser-factory.c (control_deactivate): Don't sync
	non-existent folders.
	* message-list.c (nuke_uids): Don't traverse non-existent trees.

svn path=/trunk/; revision=6047
2000-10-19 20:32:54 +00:00
1a867b4dcf Clean up some old #if 0 code.
* mail-ops.c: Clean up some old #if 0 code.

svn path=/trunk/; revision=6030
2000-10-19 14:39:50 +00:00
ee5eeb1dd2 No, we REALLY dont want to perform an immediate search as the keys are
2000-10-18  Not Zed  <NotZed@HelixCode.com>

        * folder-browser.c (folder_browser_gui_init): No, we REALLY dont
        want to perform an immediate search as the keys are pressed.

        * mail-display.c (on_object_requested): Kill a minor warning with
        a cast.

        * mail-config.c: Include mising ctype.h to kill a warning.

        * message-thread.c (main): Fixed the test case for api changes.

        * message-list.c (message_list_drag_data_get): Set some flags to
        get_folder().  I dont even think this will work because
        mail_tool_get_folder doesn't handle file url's.

        * mail-vfolder.c (vfolder_uri_to_folder): Pass appropriate flags.

        * mail-ops.c (do_setup_folder): Pass appropriate flags.  Hmm,
        whats the difference between setup and create.  *shrug*
        (do_create_folder): Pass appropriate flags to get_folder.  Needs a
        way to specify the index flag.

        * mail-tools.c (mail_tool_get_folder_from_urlname): Changed create
        to flags argument.
        (mail_tool_get_local_inbox_url): Add an index argument.
        (mail_tool_get_local_inbox): honour index flag.
        (mail_tool_get_inbox): Changed for api change.
        (mail_tool_uri_to_folder): Fixed calls to store_get_folder();

        * mail-local.c (load_metainfo): Added an indexed field to the metainfo.
        (save_metainfo): And save it too.
        (do_reconfigure_folder): Honour index flag when creating the new
        folder.  Do not open the old folder with an index at all.
        (mail_local_map_uri): Add an index argument - tells if the mbox is
        indexed.
        (mail_tool_local_uri_to_folder): Create & pass flags properly.
        (#include gnome.h): Dont include all of gnome, just what we use,
        and explicity include xml-memory, so we get xmlFree().

svn path=/trunk/; revision=5979
2000-10-18 06:13:12 +00:00
515462e922 sync & expunge the source folder after filtering.
2000-10-12  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_fetch_mail): sync & expunge the source folder
	after filtering.

svn path=/trunk/; revision=5895
2000-10-13 01:21:01 +00:00
80237e0c26 Duh, fix the test for the folder name, strstr != strcmp is it.
2000-10-12  Not Zed  <NotZed@HelixCode.com>

        * message-list.c (message_list_setup_etable): Duh, fix the test
        for the folder name, strstr != strcmp is it.

2000-10-10  Not Zed  <NotZed@HelixCode.com>

        * message-list.c (folder_to_cachename): Removed, changed callers
        to use mail_config_folder_to_cachename instead.

        * mail-config.c (mail_config_folder_to_cachename): New utility
        function to get a cache name for a folder.

        * mail-tools.c (mail_tool_do_movemail): Changed to return the path
        to the mbox, rather than opening a folder of it.

        * mail-ops.c (mail_incorporate_messages): Dont bother making the
        pseudo messageinfo, filder_driver_filter_message will do it for
        us.
        (report_status): Callback to report status of filtering operation.
        (do_fetch_mail): Changed significantly - for the api changes to
        the filtering system.  Also now incorporates a mailbox file
        directly, without having to import it into a camel folder first.
        (mail_incorporate_messages): Removed entirely, no longer needed.

        * mail-vfolder.c (vfolder_refresh): Fix for context api changes.
        (vfolder_uri_to_folder): Likewise.

        * folder-browser-factory.c (create_ondemand_hooks): Changed for
        api changes.  Also only adds demand filters to the menu (fixed a
        small logic bug).

svn path=/trunk/; revision=5883
2000-10-12 13:48:36 +00:00
73f3bc0bd4 add a ref to input->storage here so that the ref/unref pattern more
2000-10-10  Chris Toshok  <toshok@helixcode.com>

	* mail-ops.c (setup_scan_subfolders): add a ref to input->storage
	here so that the ref/unref pattern more closely matches other
	mail-ops.  also, this keeps the storage from being freed when we
	hit the unref in cleanup_scan_subfolders, which is important
	because we maintain a reference to it in the storage_hash in
	component-factory.c

	* subscribe-dialog.h: add storage field.

	* subscribe-dialog.c (subscribe_folder_info): new function,
	subscribe to a folder given it's CamelFolderInfo, and add it to
	the shell - we're generating a path from the name of the folder
	which is bad.
	(unsubscribe_folder_info): same (except we unsubscribe and remove
	from the shell).
	(storage_selected_cb): unref the currently selected storage.
	(subscribe_dialog_destroy): unref the currently selected storage.
	(subscribe_dialog_construct): sc->storage = NULL.

	* component-factory.c (mail_lookup_storage): new function, to look
	up a EvolutionStorage corresponding to a CamelService.  we ref the
	EvolutionStorage before passing it back.
	(mail_add_new_storage): insert the storage into storages_hash if
	result is EVOLUTION_STORAGE_OK.

	* mail.h: add prototype for mail_lookup_storage.

svn path=/trunk/; revision=5830
2000-10-11 02:05:29 +00:00
79154e4ac8 New widget, full search dialogue for mail.
2000-10-06  Not Zed  <NotZed@HelixCode.com>

        * mail-search-dialogue.c: New widget, full search dialogue for
        mail.

        * folder-browser.c (search_set): If we click on custom search, run
        the full search dialogue.
        (folder_browser_gui_init): Add a button to perform a full search.
        (search_full): Bring up the mail search dialogue asynchronously.
        (search_full_clicked): Handle search options.
        (folder_browser_destroy): Free the saved rule if there is one
        there.
        (search_options[]): Added a custom option option - brings up the
        full search dialogue.
        (search_set): Disable the search entry if we are doing a full
        search.

        * mail-vfolder.c (vfolder_create_storage): Yay, finally
        depeterised this stuff.
        (vfolder_uri_to_folder): Removed an irrelevant comment.

        * mail-callbacks.c (filter_edit): And here.

        * mail-ops.c (do_fetch_mail): And here too.

        * mail-autofilter.c (filter_gui_add_from_message): Fixed call to
        context_load.
        (filter_gui_add_for_mailing_list): And here too.

        * folder-browser-factory.c (create_ondemand_hooks): Remove that
        ondemand callback snot.

2000-10-05  Not Zed  <NotZed@HelixCode.com>

        * message-list.c (message_list_init_etable): Build the etable once
        we know what folder we are going to use.
        (save_header_state): Save the header spec to a cache file.
        (message_list_destroy): Save the header spec.
        (message_list_setup_etable): Setup the etable spec for this
        folder, from a saved version if one exists, or to suit the folder
        type (sent/received).
        (message_list_set_folder): Setup the etable here once we have a folder.

svn path=/trunk/; revision=5798
2000-10-09 12:57:36 +00:00
13e8c4071d Tag string for translation (do_flag_messages): ditto.
2000-10-08  Miguel de Icaza  <miguel@helixcode.com>

	* mail-ops.c (mail_incorporate_messages): Tag string for translation
	(do_flag_messages): ditto.

svn path=/trunk/; revision=5784
2000-10-08 06:43:26 +00:00
c627461cec Repeates writes on EINTRS. (pipe_read): Repeats reads on EINTRS.
2000-10-08  Miguel de Icaza  <miguel@helixcode.com>

	* mail-threads.c (pipe_write): Repeates writes on EINTRS.
	(pipe_read): Repeats reads on EINTRS.
	(mail_operation_queue): Use pipe_write
	(mail_op_set_percentage): ditto.
	(mail_op_hide_progressbar): ditto.
	(mail_op_show_progressbar): ditto.
	(mail_op_set_message): ditto.
	(mail_op_get_password): ditto.
	(mail_op_error): ditto.
	(mail_op_forward_event): ditto.
	(mail_operations_terminate): ditto.
	(dispatch): use pipe_read.
	(dispatch): use pipe_write
	(dispatch): ditto.

	* mail-ops.c (mail_incorporate_messages): Only show message being
	incorporated every 2 seconds, to avoid a bunch of CORBA round trips.
	(do_transfer_messages): ditto.
	(do_forward_messages): ditto.

svn path=/trunk/; revision=5783
2000-10-08 06:39:20 +00:00
f3b80606d8 Move the functionality to incorporate messages into
2000-10-07  Miguel de Icaza  <miguel@helixcode.com>

	* mail-ops.c (do_fetch_mail): Move the functionality to
	incorporate messages into mail_incorporate_messages.
	(mail_load_evolution_rule_context): New function.  Move the
	functionality for loading the context rules to its own function.

svn path=/trunk/; revision=5782
2000-10-08 05:30:59 +00:00
621ccca29e set the @subscribed_only parameter to TRUE, since the subscribe UI is the
2000-10-06  Chris Toshok  <toshok@helixcode.com>

	* mail-ops.c (do_scan_subfolders): set the @subscribed_only
	parameter to TRUE, since the subscribe UI is the only interface
	that should show unsubscribed groups.

svn path=/trunk/; revision=5768
2000-10-06 19:38:53 +00:00
745a10be4e Add missing parameter in call to `camel_store_get_folder_info()'.
(Duh, I hope `FALSE' is fine.)

svn path=/trunk/; revision=5763
2000-10-06 16:36:41 +00:00
032dceebc5 Don't expunge the source mailbox on completion.
2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_filter_ondemand): Don't expunge the source
	mailbox on completion.

svn path=/trunk/; revision=5715
2000-10-04 20:31:13 +00:00
6ede7826d8 Don't try to add_folders if get_folder_info returned NULL.
* mail-ops.c (do_scan_subfolders): Don't try to add_folders if
	get_folder_info returned NULL.

svn path=/trunk/; revision=5712
2000-10-04 17:50:47 +00:00
e459a0465f Update for CamelFolderInfo changes.
* mail-ops.c (mail_do_scan_subfolders, etc): Update for
	CamelFolderInfo changes.

	* message-list.c (message_list_destroy): Don't save_tree_state if
	there's no folder associated with the MessageList.

	* folder-browser.c (folder_browser_set_uri): Only call
	mail_do_load_folder if the URI is not "".

svn path=/trunk/; revision=5664
2000-10-02 19:08:44 +00:00
bb1d28d7c5 Messages should be appended to Sent as Seen. (do_send_mail): Same.
2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_send_queue): Messages should be appended to Sent
	as Seen.
	(do_send_mail): Same.

svn path=/trunk/; revision=5622
2000-09-28 20:49:24 +00:00
9deac0edb9 Note: We need a configuration option to specify whether to log filtering
2000-09-27  Jeffrey Stedfast  <fejj@helixcode.com>
	Note: We need a configuration option to specify whether to log
	filtering actions or not.

	* mail-ops.c (do_filter_ondemand): Updated to pass a log file
	pointer to filter_driver_run.
	(do_fetch_mail): Same.
	(mail_do_fetch_mail): Fixed a compiler warning.

svn path=/trunk/; revision=5604
2000-09-27 22:19:27 +00:00
0347b891dd If the message has been deleted, don't try filtering it - skip to the next
2000-09-27  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_filter_ondemand): If the message has been
	deleted, don't try filtering it - skip to the next message.
	Fixes bugzilla bug #639.

svn path=/trunk/; revision=5601
2000-09-27 17:54:48 +00:00
ff1cbe1ed2 CamelException is not for compile-time errors. Replace lots of argument
* mail-ops.c: CamelException is not for compile-time errors.
	Replace lots of argument checks in setup_ functions with
	g_return_if_fails in the public functions. Also remove some
	prototypes that weren't needed because they were for static
	functions that are defined before they're used.

svn path=/trunk/; revision=5576
2000-09-25 20:05:02 +00:00
4713393d8b Fixed some memory leakage. Call free_recipients() so we don't leak memory.
2000-09-21  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (mail_generate_reply): Fixed some memory
	leakage. Call free_recipients() so we don't leak memory.

svn path=/trunk/; revision=5542
2000-09-21 20:36:48 +00:00
bb84277a24 Use the folder's full_name so recursive directory structures display
2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_scan_subfolders): Use the folder's full_name so
	recursive directory structures display correctly ;-)

svn path=/trunk/; revision=5507
2000-09-19 19:16:59 +00:00
4e1d332270 Update for CamelFolder changes (subfolder_names -> subfolder_info).
* mail-ops.c (do_scan_subfolders): Update for CamelFolder changes
	(subfolder_names -> subfolder_info).

svn path=/trunk/; revision=5504
2000-09-19 17:27:59 +00:00
053af645da Deal with NULL composer.
* mail-callbacks.c (create_msg_composer, compose_msg, send_to_url,
	mail_reply, forward_msg):
	* mail-format.c (mail_generate_reply):
	* mail-ops.c (cleanup_edit_messages):
	* mail-view.c (view_forward_msg): Deal with NULL composer.

svn path=/trunk/; revision=5502
2000-09-19 15:35:40 +00:00
3b3f989e83 Don't get_message_flags, because POP doesn't support it and it's pointless
* mail-ops.c (do_fetch_mail): Don't get_message_flags, because
	POP doesn't support it and it's pointless anyway since we're
	setting deleted, not toggling it. call camel_folder_sync with
	expunge=TRUE so that the deletions are actually recorded.

svn path=/trunk/; revision=5450
2000-09-15 14:58:46 +00:00
283e2c32db Fix the sense of the "keep on server" check so we're not doing this
* mail-ops.c (do_fetch_mail): Fix the sense of the "keep on
	server" check so we're not doing this backwards.

svn path=/trunk/; revision=5447
2000-09-15 14:01:44 +00:00
88aa6978a3 This bug was so much fun to fix the first time that I decided to
fix it again.

	2000-07-11  Dan Winship  <danw@helixcode.com>

		* mail-ops.c (real_send_mail): Set the post_send_data flag
		rather than toggling it. (Maybe we'll need more control
		over it later, but for now, the only flag we set is
		"replied", and we want that set, not toggled.)

svn path=/trunk/; revision=5445
2000-09-15 13:28:43 +00:00
e9491ff705 camel_folder_append is perfectly happy to take a NULL info.
* mail-ops.c (setup_append_mail): camel_folder_append is perfectly
	happy to take a NULL info.

svn path=/trunk/; revision=5429
2000-09-14 15:13:30 +00:00
17b15d5539 Only use the cache if the user plans to keep_on_server.
2000-09-14  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_fetch_mail): Only use the cache if the user plans
	to keep_on_server.

svn path=/trunk/; revision=5422
2000-09-14 05:50:31 +00:00
436f8487ff Was trying to unhook an event from the wrong folder - oops.
2000-09-12  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_fetch_mail): Was trying to unhook an event from
	the wrong folder - oops.

svn path=/trunk/; revision=5356
2000-09-12 04:46:48 +00:00
a2c59a6e16 added some comments (no source code changes)
svn path=/trunk/; revision=5351
2000-09-11 23:34:51 +00:00
ca9ab0c63b Updated to use the new mail_do_filter_ondemand.
2000-09-11  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (run_filter_ondemand): Updated to use the new
	mail_do_filter_ondemand.

	* mail-ops.c (do_fetch_mail): Update to use the new
	filter_driver_run args.
	(do_filter_ondemand): Updated to use the new filter_driver_run
	args.
	(mail_do_filter_ondemand): Take a FilterContext as a argument
	instead of a driver as we need to destroy the filter inside the
	do_filter_ondemand function and things'd get messy.

svn path=/trunk/; revision=5347
2000-09-11 21:37:48 +00:00