Commit Graph

293 Commits

Author SHA1 Message Date
3be64e5b65 Pass NULL, not "/" for @top.
* mail-vtrash.c (get_trash_get): Pass NULL, not "/" for @top.

	* mail-callbacks.c (create_folders): Make this work with
	CamelStores where the separator character isn't /. folder_created
	and folder_deleted are still broken.

svn path=/trunk/; revision=8306
2001-02-20 22:32:59 +00:00
7ac8a9c5e8 Use mail_storage_create_folder
2001-02-15  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-ops.c (do_scan_subfolders): Use mail_storage_create_folder

	* mail-callbacks.c (mail_storage_create_folder): Convenience
	function so we can keep all the evolution_storage_add_new_folder()
	code in one place as much as possible.

	* subscribe-dialog.c (recursive_add_folder): Use 'name' rather
	than the no-description bs since that's what all the other places
	do.

	* mail-callbacks.c (folder_created): New callback to handle the
	"folder_created" signal - handles CamelFolderInfo's recursively.
	(folder_deleted): Same but for "folder_deleted".

	* component-factory.c (storage_create_folder): Instead of doing
	the evolution_storage_new_folder() stuff by hand, pass it off to
	the new callback: folder_created(). At some point this will be
	unecessary as we'll attach this callback to the "folder_created"
	signal.

svn path=/trunk/; revision=8247
2001-02-15 23:54:16 +00:00
7d82a41220 Re-add non-static forward_messages. mail-view.c needs it.
* mail-callbacks.[ch]: Re-add non-static forward_messages.
	mail-view.c needs it.

svn path=/trunk/; revision=8175
2001-02-11 19:09:54 +00:00
7004fae0eb Don't leak memory. (forward_messages): change doinline to be a gboolean
2001-02-11  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-callbacks.c (forward_inlined): Don't leak memory.
	(forward_messages): change doinline to be a gboolean argument.

svn path=/trunk/; revision=8172
2001-02-11 07:00:07 +00:00
7d8ca744f7 Check the full list of IDs instead of just the default id and if we find
2001-02-10  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-callbacks.c (list_add_addresses): Check the full list of
	IDs instead of just the default id and if we find an address
	matching one of the user's ids, then save it.
	(mail_generate_reply): Try to guess which account to use based
	upon the list of To and Cc addresses and pass that as the 'From'
	address to e_msg_composer_set_headers().
	(forward_get_composer): Updated to reflect changes to
	e-msg-composer.

svn path=/trunk/; revision=8166
2001-02-11 04:14:17 +00:00
210c0386a9 New location for this function.
2001-02-08  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-callbacks.c (mail_generate_reply): New location for this
	function.

	* mail-format.c: Removed mail_generate_reply as it's ONLY ever
	used in mail-callbacks.c.

	* mail-ops.c (fetch_mail_fetch): Reworked some keep-mail-on-server
	logic so that we ALWAYS look for a cached array of UIDs that we
	may have downloaded previously so as not to download them again
	even if we will be deleting them off the server. This fixes bug
	#1344.

svn path=/trunk/; revision=8137
2001-02-09 02:51:22 +00:00
4459154549 Handle internal camel status return. (receive_done): Remove active
2001-02-07  Not Zed  <NotZed@Ximian.com>

        * mail-send-recv.c (operation_status): Handle internal camel status return.
        (receive_done): Remove active download when done.
        (mail_receive_uri): Initiate download of a single source, with no gui.
        (build_dialogue): Mark any new items as real active downloads.
        (do_show_status): Make the progress bar optional.

2001-02-06  Not Zed  <NotZed@Ximian.com>

        * mail-send-recv.c: camel_cancel->camel_operation.

        * mail-ops.old.c: camel_cancel->camel_operation.

        * mail-ops.c: camel_cancel->camel_operation.

        * mail-mt.c: camel_cancel->camel_operation.

        * mail-callbacks.c (stop_threads): camel_cancel->camel_operation.

        * mail-mt.h: CamelCancel->CamelOperation.

svn path=/trunk/; revision=8096
2001-02-08 01:45:37 +00:00
8634c7a4ec Moved bonobo includes from the .c to the .h. Include
2001-02-05  Christopher James Lahey  <clahey@ximian.com>

	* evolution-mbox-importer.c, evolution-mbox-importer.h: Moved
	bonobo includes from the .c to the .h.  Include
	evolution-mbox-importer.h in evolution-mbox-importer.c.

	* evolution-outlook-importer.c, evolution-outlook-importer.h:
	Moved bonobo includes from the .c to the .h.  Include
	evolution-outlook-importer.h in evolution-outlook-importer.c.

	* mail-callbacks.c: Include mail-send-recv.h.

	* mail-local.c (mail_local_lookup_folder): Cast local_store to
	CAMEL_STORE.

	* mail-mt.c (mail_msg_cleanup): Make this function static.

	* mail-send-recv.c, mail-send-recv.h: Created mail_send_recv.h.
	Included it in mail-send-recv.c.  Added a #include
	<libgnomeui/gnome-window-icon.h>.
	(mail_send_receive): Added a cast.

	* mail-summary.c (new_folder_cb, removed_folder_cb,
	create_summary_view): Cast the source func in calling g_idle_add.

svn path=/trunk/; revision=8002
2001-02-05 23:04:08 +00:00
c46245d4b5 (Don't prompt about unsaved changes for replies/forwards that have not
2001-01-25  Jason Leach  <jasonleach@usa.net>

	(Don't prompt about unsaved changes for replies/forwards that have
	 not actually been modified)

	 * mail-callbacks.c (do_forward_inline): Unset the has_changed for
	 the message composer.
	 (do_forward_attach): Same here.
	 (mail_reply): And here.

svn path=/trunk/; revision=7819
2001-01-25 19:36:03 +00:00
8b2495dcd4 Fix spelling.
* folder-browser-factory.c:
	* mail-callbacks.c (send_receive_mail): Fix spelling.

svn path=/trunk/; revision=7760
2001-01-23 22:55:59 +00:00
e40e98e0f8 s/filter-driver.h/camel-filter-driver.h/ and update first arg of
* mail-tools.h: s/filter-driver.h/camel-filter-driver.h/ and
	update first arg of mail_too_filter_get_folder_func

	* mail-tools.c (mail_tool_filter_get_folder_func): Update first
	arg to CamelFilterDriver *

	* mail-send-recv.c (receive_status):
	* mail-ops.c (send_queue_send): s/FILTER/CAMEL_FILTER/

	* mail-callbacks.c: Remove filter-driver.h include

	* mail-accounts.c: Put the news functions inside #ifdef
	ENABLE_NNTP to prevent warnings about unused statis functions.

	* subscribe-dialog.c (subscribe_folders, unsubscribe_folders,
	subscribe_refresh_list): Update prototype to match BONOBO_UI_VERB.
	(populate_store_list): add a de-constifying cast

svn path=/trunk/; revision=7708
2001-01-22 17:47:28 +00:00
88f9e36086 remove a warning with conditional news compilation.
2001-01-22  Not Zed  <NotZed@Ximian.com>

	* component-factory.c (owner_set_cb): remove a warning with
	conditional news compilation.

	* mail-ops.h: Cleaned up the header list.

	* folder-browser-factory.c: Replace the old get_send mail with the
	new one (button).

	* mail-ops.c (set_x_mailer):
	(mail_load_evolution_rule_context):
	(mail_do_fetch_mail):
	(mail_do_filter_ondemand):
	(mail_send_mail_old):
	(mail_do_send_queue): All removed, (for) now lives in mail-send-recv.c.
	(load_context):
	(setup_filter_driver):
	(filter_get_folder):
	(mail_filter_folder):
	(mail_fetch_mail):
	(mail_update_subfolders):
	(mail_send_mail):
	(mail_send_queue): New equivalents of all these fundtions, moved
	from mail-send-recv.c ...
	(mail_filter_on_demand): Moved here too.
	(mail_load_filter_context): Export this.

	* mail-callbacks.c (apply_filters): Use the new
	mail_filter_on_demand() call.
	(send_receieve_mail): Use mail_send_receive to do the work.  Add a
	little error handling here that used to be elsewhere.
	(send_queued_mail): Removed.
	(fetch_mail): Removed.
	(select_first_unread): #ifdef'd this out.  Not sure if this still
	makes sense, but it doesn't get run right now anyway.
	(composer_postpone_cb): Fix the setting of message flags.  You
	dont need to get them first, ever.

	* mail-send-recv.c (mail_send_message): Dont use
	mail_tool_send_via_transport anymore (it does nothing useful).

	* mail-tools.c (mail_tool_camel_lock_up): Turned into a noop.
	(mail_tool_camel_lock_down): And here too.
	(mail_tool_move_folder_contents): Removed from the code (hasn't
	bene used for ages).
	(mail_tool_send_via_transport): Removed, it doesn't save anything.

svn path=/trunk/; revision=7702
2001-01-22 11:43:18 +00:00
6e62c05946 Added the next/previous toolbar buttons.
2001-01-18  Jeffrey Stedfast  <fejj@ximian.com>

	* folder-browser-factory.c: Added the next/previous toolbar
	buttons.

	* mail-callbacks.c (next_msg): New callback so we can have a next
	toolbar button.
	(previous_msg): Same but for previous.

svn path=/trunk/; revision=7630
2001-01-19 02:05:33 +00:00
80a00a6df9 Update to use EMessageBox and to record if the user doesn't want to ever
2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-callbacks.c (ask_confirm_for_empty_subject): Update to use
	EMessageBox and to record if the user doesn't want to ever see
	this dialog again.

	* mail-config.c (mail_config_get_prompt_empty_subject): New config
	function.
	(mail_config_set_prompt_empty_subject): Another new one.

svn path=/trunk/; revision=7567
2001-01-17 09:14:36 +00:00
9180a6949f If the user hits "No", then don't destroy the filesel window.
2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-callbacks.c (save_msg_ok): If the user hits "No", then
	don't destroy the filesel window.

	* mail-ops.c (save_messages_save): Open with mode 0666 as danw
	suggests.

svn path=/trunk/; revision=7553
2001-01-16 23:21:28 +00:00
67be94cbd5 Setup a cancellation handle. (do_fetch_mail): REgister for cancellation
2001-01-16  Not Zed  <NotZed@Ximian.com>

        * mail-ops.c (mail_do_fetch_mail): Setup a cancellation handle.
        (do_fetch_mail): REgister for cancellation here.
        (cleanup_fetch_mail): And unregister for cancellation here.
        (mail_get_message): Add a cancel handle.
        (get_message_get): Register/deregister for cancel.
        (get_message_free): & clean up.

        * mail-mt.c (mail_msg_received): Removed debuggng.

        * mail-callbacks.c (stop_threads): Callback for stopping.

        * folder-browser-factory.c: Add a stop button verb thingy.
        (control_activate): Disable the stop button by default.

svn path=/trunk/; revision=7527
2001-01-16 03:57:24 +00:00
b2d82f7fb8 Set the default button to `Yes' here.
2001-01-15  Miguel de Icaza  <miguel@ximian.com>

	* mail-callbacks.c (configure_mail): Set the default button to
	`Yes' here.

svn path=/trunk/; revision=7498
2001-01-15 08:11:57 +00:00
f88c5b4073 Get the X-Evolution-Transport URL and use that if it exists, else fall
2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-ops.c (do_send_queue): Get the X-Evolution-Transport URL
	and use that if it exists, else fall back on the default
	transport.

	* mail-callbacks.c (composer_postpone_cb): Set an
	X-Evolution-Transport header.

svn path=/trunk/; revision=7474
2001-01-13 05:59:32 +00:00
7b02bff821 Get the account by using the new e_msg_composer_get_preferred_account()
2001-01-12  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (composer_send_cb): Get the account by using
	the new e_msg_composer_get_preferred_account() function. Also
	check to make sure everything is configured (in case they deleted
	their accounts while composing mail?).

	* mail-config.c (mail_config_get_account_by_address): New
	convenience function.

svn path=/trunk/; revision=7459
2001-01-12 21:15:36 +00:00
834325ad2b Force finalization of the function before returning fixing the FIXME that
2001-01-11  Miguel de Icaza  <miguel@gnu.org>

	* mail-callbacks.c (configure_mail): Force finalization of the
	function before returning fixing the FIXME that was there.

svn path=/trunk/; revision=7429
2001-01-12 04:25:40 +00:00
43f23f54d9 New function that explains to the user why he can't do the action he
2001-01-10  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (configure_mail): New function that explains to
	the user why he can't do the action he requested and then procedes
	to ask if he'd like to configure his accounts now.
	(check_send_configuration): If the user doesn't have configured
	accounts, don't let him continue and call configure_mail().
	(fetch_mail): Same.
	(send_queued_mail): Same.
	(send_receieve_mail): Same.

	* mail-config.c (mail_config_write): Don't save a "is_configured"
	variable. Instead we'll just check to see if we have accounts - if
	yes, then configured == TRUE.
	(mail_config_is_configured): return accounts != NULL.
	(mail_config_get_default_account): Mark the first account as the
	default if none are marked.

svn path=/trunk/; revision=7377
2001-01-11 00:18:40 +00:00
18121f04a2 Prevent Federico's segfault.
2001-01-10  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (send_queued_mail): Prevent Federico's segfault.

svn path=/trunk/; revision=7372
2001-01-10 21:27:37 +00:00
a2d998fe13 Brand spankin' new config druid, editor, and manager.
2001-01-08  Jeffrey Stedfast  <fejj@helixcode.com>

	* Makefile.am:
	* component-factory.c:
	* folder-browser-factory.c:
	* folder-browser.c:
	* mail-accounts.[c,h]:
	* mail-account-editor.[c,h]:
	* mail-callbacks.c:
	* mail-config.[c,h]:
	* mail-config-druid.[c,h]:
	* mail-config-druid.glade:
	* mail-display.c:
	* mail-format.c:
	* mail-tools.c: Brand spankin' new config druid, editor,
	and manager.

svn path=/trunk/; revision=7313
2001-01-09 03:31:31 +00:00
875c9d02c4 Reverted mail-config changes temporarily until I get it working correctly.
2001-01-08  Jeffrey Stedfast  <fejj@helixcode.com>

	* Makefile.am:
	* component-factory.c:
	* folder-browser-factory.c:
	* folder-browser.c:
	* mail-callbacks.c:
	* mail-config.[c,h]:
	* mail-display.c:
	* mail-format.c:
	* mail-tools.c: Reverted mail-config changes temporarily until
	I get it working correctly.

svn path=/trunk/; revision=7305
2001-01-08 20:51:24 +00:00
deb9cf4359 More lovely fixes...
2001-01-08  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-config-druid.c: More lovely fixes...

	* mail-callbacks.c: Don't segfault if a default account doesn't
	exist.

svn path=/trunk/; revision=7302
2001-01-08 20:37:44 +00:00
51bd9ba1bb A bunch of fixes.
2001-01-08  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-config-druid.c: A bunch of fixes.

	* mail-accounts.c: More fixes...

	* mail-account-editor.c (construct): Reparent the notebook to the
	editor->vbox and set the resize policy.

svn path=/trunk/; revision=7301
2001-01-08 20:05:56 +00:00
35139b2983 Updated to reflect changes to the mail-config API.
2001-01-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-tools.c (mail_tool_quote_message): Updated to reflect
	changes to the mail-config API.

	* mail-display.c (redisplay): Updated to reflect changes to the
	mail-config API.

	* mail-callbacks.c (providers_config): Use the new account dialog.

	* mail-config-druid.c (druid_finish): Load the new storage into
	the shell.
	(mail_config_druid_new): Take a shell argument.

	* mail-format.c (mail_generate_reply): Updated to reflect changes
	to the mail-config API.

	* mail-config-druid.c: Fixed this to build.

	* mail-callbacks.c (check_send_configuration): Updated to reflect
	changes to the mail-config API.
	(create_msg_composer): Same.
	(forward_get_composer): Same.
	(send_queued_mail): Same.
	(composer_send_cb): Same.

	* mail-account-editor.c: Updated to build cleanly.  *
	mail-config-druid.c: Same.  * mail-accounts.c: Same.

	* folder-browser-factory.c (control_activate): Updated for API
	changes in mail-config.

	* folder-browser.c (done_message_selected): Updated for API
	changed in mail-config.
	(folder_browser_gui_init): Same.
	(got_folder): Same.

	* component-factory.c (owner_set_cb): After using the sources
	list, free it as it is no longer a const GSList as with the older
	mail-config code.

	* mail-config.c: Totally rewritten.

svn path=/trunk/; revision=7298
2001-01-08 02:14:23 +00:00
d53b9af629 Updated to reflect changes to the mail-config API. (create_msg_composer):
2001-01-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (check_send_configuration): Updated to reflect
	changes to the mail-config API.
	(create_msg_composer): Same.
	(forward_get_composer): Same.
	(send_queued_mail): Same.
	(composer_send_cb): Same.

	* mail-account-editor.c: Updated to build cleanly.  *
	mail-config-druid.c: Same.  * mail-accounts.c: Same.

	* folder-browser-factory.c (control_activate): Updated for API
	changes in mail-config.

	* folder-browser.c (done_message_selected): Updated for API
	changed in mail-config.
	(folder_browser_gui_init): Same.
	(got_folder): Same.

	* component-factory.c (owner_set_cb): After using the sources
	list, free it as it is no longer a const GSList as with the older
	mail-config code.

	* mail-config.c: Totally rewritten.

svn path=/trunk/; revision=7294
2001-01-07 23:12:11 +00:00
f4f3ede9d3 Removed old implementation.
2001-01-04  Not Zed  <NotZed@HelixCode.com>

	* mail-ops.c (mail_do_send_mail): Removed old implementation.

	* folder-browser.c (do_message_selected): If we haven't got a real
	uid, then clear the display instead.

	* message-list.c (message_list_drag_data_get): Use new save
	message function, and also wait for it to finish before
	continuing.
	(folder_changed):
	(message_changed): Use mail_proxy_event instead of
	mail_do_forward.
	(mail_regen_list): New iplementation to replace the old.
	: remove <gnome.h> from headers.  Dont define timeit by default.
	(main_folder_changed):
	(message_list_set_folder):
	(message_list_set_threaded):
	(message_list_set_search):
	(message_list_hide_add):
	(message_list_hide_uids):
	(message_list_hide_clear): Use mail_regen_list instead of
	mail_do_regenerate_messagelist.
	(mail_do_regenerate_messagelist): Removed the old stuff.  No
	functionality changed yet, just using different thread stuff.

	* mail-callbacks.c (save_msg_ok): Use new save message function.

	* component-factory.c (create_view):
	(add_storage): Use mail_scan_subfolders to build the folder info.
	(create_folder): Use new implementation with our own callback.
	(owner_set_cb): Changed b ack to use mail_get_folder, but now wait
	for it to finish.  This will let any gui still run, but also gives
	us the required synchronous operation.
	(got_folder): Callback for when the folder has been opened.

	* mail-ops.c (mail_get_folderinfo): New function to just get the
	folder info in another thread.
	(mail_scan_subfolders): New scan subfolder implementation that
	uses mail_get_folderinfo.
	(mail_do_scan_subfolders): Removed old implementation.
	(mail_create_folder): Nerw implementation to create a folder, only.
	(mail_do_create_folder): Removed old implementation.
	(mail_save_messages): New implementation, fixes a couple of minor
	problems, and now provides a return so it can be waited on.  Also
	check that the writes worked, etc.
	(mail_do_save_messages): Remove previous implementation.
	(mail_do_flag_messages): Removed, nothing uses it.
	(mail_do_flag_messages): Removed, nothing uses it anymore.
	(mail_get_folder): REturn the operation id, so callers can wait
	for it.
	(sync_folder_desc):
	(expunge_folder_desc): Add describe functions so we know what its
	doing.
	(mail_send_mail): More generic implementation of sending mail.

	* mail-mt.c (mail_msg_new): Lock around seq increment.  And insert
	each new message into a hash table of active messages.
	(mail_msg_init): Init the active message table.
	(mail_msg_free): Remove the message from the active message table.
	(mail_msg_wait): New function, waits for a message to be
	processed, by id.
	(mail_msg_check_error): Dont display the error if it is a
	user-cancelled operation.
	(mail_proxy_event): new implementation of mail_op_forward_event.
	Only real difference is it uses the new	thread stuff, and you can
	wait for it to finish if you want.
	(mail_proxy_event): If we're already in the main thread, just call
	the function.

svn path=/trunk/; revision=7246
2001-01-04 07:34:26 +00:00
c37da13423 Call mail-callbacks.c:forward_messages(), so the behaviour is the same as
2001-01-03  Not Zed  <NotZed@HelixCode.com>

        * mail-view.c (view_forward_msg): Call
        mail-callbacks.c:forward_messages(), so the behaviour is the same
        as from the folder browser.

        * mail-callbacks.c (forward_messages): New function to forward
        messages, attached or not.
        (forward_inlined): Changed to use new forward-messages
        implementation.
        (forward_attached): Likewise.
        (do_forward_attach): Callback for forwarding as attachment, once
        we have built it.
        (do_forward_inline): Likewise, for inline, once we have retrieved
        the message.
        (forward_message): Removed.

        * mail-ops.c (mail_build_attachment): New function to build an
        attachment of messages.
        (mail_do_attach_message): Removed, functionality superceeded by
        above.
        (mail_do_forward_message): Removed.  Likewise.
        (mail_create_folder): Started work on an alternative
        implementation of create_folder, but not sure about it yet.

        * mail-tools.c (mail_tool_generate_forward_subject): Remove locking.
        (mail_tool_make_message_attachment): Free the description when done.

svn path=/trunk/; revision=7232
2001-01-03 11:52:04 +00:00
a16344fff4 Fix for mail_get_message change, use queue thread.
2001-01-02  Not Zed  <NotZed@HelixCode.com>

	* mail-callbacks.c (view_msg): Fix for mail_get_message change,
	use queue thread.

	* folder-browser.c (done_message_selected): Fix mail_Get_message
	calls, use new thread.
	(do_message_selected): "

	* mail-ops.c (mail_get_message): Add a thread argument so callers
	can specify which queue it executes on.

	* mail-mt.c (mail_msg_free): Fix a free order problem.
	(mail_msg_destroy): Call mail_msg_free to do the work.
	(mail_msgport_replied): "
	(mail_msgport_replied): Check/display errors if we get them.
	(mail_msgport_received): If we have a describe function, say what
	we're doing, also set busy/unbusy.
	(mail_msgport_replied): Clear busy when we get a reply.
	(mail_get_password): Unset busy.
	(mail_msg_received): Set busy as we go.
	(mail_msg_destroy): Unset busy when done.
	(mail_status): Blah blah, new status interface, the other wans't
	workable with the way the shell api works.

2000-12-29  Not Zed  <NotZed@HelixCode.com>

	* folder-browser.c (do_message_selected): If we are reconfiguring,
	just keep polling till we are done (yeah kinda shitty, but easy).
	(folder_browser_set_uri): Clear reconfigure flag here.  ick.
	(got_folder): And here too.
	(on_right_click): Remove locking.
	(hide_sender): and here too.
	(hide_subject): And here.
	(on_right_click): If we are in reconfigure, then the whole menu is disabled.

	* mail-mt.c (status_busy_timeout): Clear the status_busy_timeout_id.

	* mail-local.c (local_storage_new_folder_cb): Made getting folders
	completely synchronous.  The shell expects it, and it was only
	synchronous before by a sideeffect.
	(do_reconfigure_folder): Remove locking stuff.
	(do_reconfigure_folder): Use our own much simpler copying routine
	than that stupid move_folder_contents thing.
	(update_progress): Use mail_status_message() instead.
	(do_reconfigure_folder): Set the reconfigure flag during
	reconfigure & set busy flag.
	(cleanup_reconfigure_folder): clear busy flag.

	* mail-tools.c (mail_tool_uri_to_folder): Remove the tool_lock
	stuff.
	(mail_tool_uri_to_folder_noex): Clear exception on exit.
	(mail_tool_move_folder_contents): Get rid of this really stupid
	function that is only used in one place.

	* component-factory.c (owner_set_cb): Use direct calls to get the
	folders, as this code must run synchronous.  Remove the event wait
	stuff.

	* mail-callbacks.c (edit_msg): Call mail_get_messages, and create
	the composers ourself.
	(do_edit_messages): get_messages callback, create the composers
	and connect to signals we need.
	(view_msg): Dont call do_view_messages, just call
	mail_get_messge for each to get them in parallel.
	(do_view_message): view a single message.

	* mail-ops.c (mail_edit_messages): Just use mail_get_messages
	for this operation.  Removed the other async operation stuff.
	Changed my mind, just removed entirely.
	(mail_do_view_messages): Removed.
	(mail_do_setup_folder): Removed.
	(mail_do_scan_subfolders): Make this run synchronously, as every
	caller expects it to (even if they didn't realise).

2000-12-28  Not Zed  <NotZed@HelixCode.com>

	* mail-callbacks.c (send_queued_mail): Dont expunge the folder
	here, but in send_queue, otherwise it might execute out of order.
	(expunge_folder): Remove the talbe prechange stuff, and infact
	references to the message_list folder, as we have our own folder.
	Also, dont allow expunge if we're already expunging.
	(expunged_folder): Clkear the expunging flag if we're finished.

	* folder-browser-factory.c (control_deactivate): Likewise here.
	Hrm, i thought this function required a callback, silly me.

	* mail-tools.c (mail_tool_make_message_attachment): Remov e
	locking.

	* folder-browser.c (on_message_selected): Use a timeout handler so
	we dont select immediately.
	(folder_browser_set_uri): Changed to use mail_get_folder.
	(got_folder): New callback called when get_folder is finished.
	(folder_browser_destroy): Use new sync interface.

	* mail-ops.c (mail_get_message): New function to asynchrounously
	get a message.
	: #define out mail_tool_camel_lock stuff entirely.
	(mail_get_folder): New function to asynchrounously get a folder.
	(mail_do_load_folder): Removed, replaced by more generic function
	above.
	(mail_do_display_message): Removed, replaced by the more generic
	funciton get_message.
	(mail_get_messages): New function to get a list of messages
	asynchronously.
	(mail_sync_folder): New interface to sync a folder async.
	(mail_expunge_folder): New interface for expunging folder, with
	callback.
	(do_send_queue): Remove lock stuff, and expunge if (and only if)
	successful, also sync the sent folder while we're at it.

	* session.c (mail_session_request_dialog): Changed to use new
	mail_get_password call.

	* mail-mt.[ch]: New threading/interthread messaging framework.

	* main.c (main): Init the message/thread system.

svn path=/trunk/; revision=7223
2001-01-03 01:18:21 +00:00
fba04bdda7 Merge from camel-mt-branch.
2000-12-24  Not Zed  <NotZed@HelixCode.com>

        * Merge from camel-mt-branch.

svn path=/trunk/; revision=7153
2000-12-24 01:03:14 +00:00
b03dcd7552 Attach a signature when forwarding, fixes bug #826.
2000-12-12  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (forward_message): Attach a signature when
	forwarding, fixes bug #826.

svn path=/trunk/; revision=6944
2000-12-12 22:26:19 +00:00
e22c643dc6 Remove the never-once-used BonoboObject stuff and make MessageList be a
* message-list.c: Remove the never-once-used BonoboObject stuff
	and make MessageList be a GtkWidget instead. Also, keep track of
	the ETable directly rather than repeatedly calling
	e_table_scrolled_get_table.

	* folder-browser.c (folder_browser_destroy): Use gtk methods
	rather than bonobo methods to destroy the message list.
	(on_right_click, on_double_click): These are being attached to the
	ETable directly now, so fix the first argument (which isn't being
	used anyway, but...)
	(folder_browser_gui_init): simplify now that MessageList itself is
	a widget. Also use message_list->table rather than
	e_table_scrolled_get_table.

	* mail-local.c (mail_local_reconfigure_folder): Add "mail_" to
	the beginning of this function name to match its prototype and the
	other vague namespace conventions in the mailer.

	* mail-callbacks.c (select_all, invert_selection): Use ml->table.
	(configure_folder): s/local_reconfigure_folder/mail_&/

svn path=/trunk/; revision=6908
2000-12-11 16:44:30 +00:00
c65fda0e89 Check to see if the file already exists, if it does prompt the user to for
2000-12-08  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (save_msg_ok): Check to see if the file already
	exists, if it does prompt the user to for permission to overwrite
	the file.
	(forward_message): g_strdup the cursor_uid if there is only a
	single message to be forwarded or we'll segfault later.

	* mail-ops.c (do_save_messages): Rewrote yet again. I'm back to
	almost an identical implementation as the first time I wrote this
	except now we write the From line which I had forgotten last
	time. This means that we no longer have to unlink the .ev-summary
	file created and we also use fewer resources (no need to create a
	CamelMboxFolder object).

svn path=/trunk/; revision=6882
2000-12-09 02:09:56 +00:00
cec18e26aa Only do a message_list_foreach if we plan on attaching messages, otherwise
2000-12-07  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (forward_message): Only do a
	message_list_foreach if we plan on attaching messages, otherwise
	just use ml->cursor_uid.

	* mail-ops.c (cleanup_forward_messages): If attaching multiple
	forwarded message, wrap them in a multipart/digest otherwise just
	attach the single message as a message/rfc822.

svn path=/trunk/; revision=6851
2000-12-07 23:41:59 +00:00
97f16d13a4 Add some g_return_if_fail()s to protect from crashes until the code to
* mail-callbacks.c: (various)
	* folder-browser.c (filter_mlist):
	* mail-autofilter.c (filter_gui_add_from_message):
	* mail-vfolder.c (vfolder_gui_add_from_message): Add some
	g_return_if_fail()s to protect from crashes until the code to
	enable/disable commands based on how many messages are selected is
	done.

svn path=/trunk/; revision=6840
2000-12-07 19:19:48 +00:00
bfb8c33969 Make inline forwarding not be the default anymore.
svn path=/trunk/; revision=6771
2000-12-04 10:52:55 +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
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
b3a57cc8fe likewise
2000-11-08  Radek Doulik  <rodo@helixcode.com>

	* mail-format.c (mail_generate_reply): likewise

	* mail-callbacks.c (create_msg_composer): added send_html arg to
	e_msg_composer_new_with_sig_file call

svn path=/trunk/; revision=6511
2000-11-08 17:32:37 +00:00
3ccbffa051 Don't invert the flag. (undelete_msg): Same (when multiple messages are
2000-11-06  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (delete_msg): Don't invert the flag.
	(undelete_msg): Same (when multiple messages are selected).

svn path=/trunk/; revision=6421
2000-11-06 20:45:52 +00:00
d893466560 Updated to have the same menu items as the new right-click menu -
2000-11-06  Jeffrey Stedfast  <fejj@helixcode.com>

	* folder-browser-factory.c: Updated to have the same menu items as
	the new right-click menu - eventually these 2 menus should be the
	same.

	* folder-browser.c (on_right_click): Now correctly handles the
	case of multiple selection.

	* mail-callbacks.c (enumerate_msg): Make public so it can be used
	in other source files (it's a useful function!)

svn path=/trunk/; revision=6419
2000-11-06 20:05:25 +00:00
9ca299b427 Added an "Undelete" option to the right-click menu and also set a mask so
2000-11-05  Jeffrey Stedfast  <fejj@helixcode.com>

	* folder-browser.c (on_right_click): Added an "Undelete" option to
	the right-click menu and also set a mask so it was only selectable
	if the message is marked as deleted. Also set a mask for "Mark as
	Read" and "Mark as Unread".

	* mail-callbacks.c (undelete_msg): New callback to undelete
	messages.

svn path=/trunk/; revision=6407
2000-11-06 00:53:20 +00:00
1cb19b5a1b Added new header files.
2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>

	* Makefile.am: Added new header files.

	* component-factory.c (owner_set_cb):
	s/session_init/mail_session_init

	* session.c: Renamed public functions to mail_session_*.
	FIXME: Rename session.c to mail-session.c

	* folder-browser-factory.c: #include "mail-callbacks.h", #include
	"mail-session.h" and replace forget_passwords with
	mail_session_forget_passwords

	* mail.h: Move session prototypes to mail-session.h, Move
	mail-crypto prototypes to mail-crypto.h, Move mail-callback
	prototypes to mail-callbacks.h

	* mail-session.h: New header file containing public prototypes
	for session.c

	* mail-format.c: #include "mail-crypto.h"

	* mail-view.c:
	* folder-browser.c: #include "mail-callbacks.h"

	* mail-crypto.h: New header file containing public prototypes
	for mail-crypto.c

	* mail-callbacks.h: New header file containing public prototypes
	for mail-callbacks.c

	* message-list.c (message_list_get_layout): Set useful defaults.
	(message_list_setup_etable): Don't set the Outbox defaults on a
	folder just because it doesn't have a corresponding saved file.

svn path=/trunk/; revision=6372
2000-11-03 18:55:41 +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
e0668b4fde Shouldn't we be strdup'ing the content? This seems to fix the memory
2000-10-31  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (mail_get_message_body): Shouldn't we be
	strdup'ing the content? This seems to fix the memory corruption
	problems.
	(mail_generate_reply): Make sure that the last char in the
	generated reply text is '\0' (when bodt text doesn't end with a
	\n, a random char will appear otherwise).

svn path=/trunk/; revision=6306
2000-11-01 00:55:38 +00:00
78a43af4b2 Check to make sure that the recipient list is neither NULL nor a 0-length
2000-10-27  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (composer_send_cb): Check to make sure that the
	recipient list is neither NULL nor a 0-length list of addresses
	and pop up a dialog letting the user know why we are not allowing
	him/her to send the message.

svn path=/trunk/; revision=6238
2000-10-27 20:28:14 +00:00
37ffc13dcb Check for the TO recipient list being NULL and don't send.
2000-10-26  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-callbacks.c (composer_send_cb): Check for the TO recipient
	list being NULL and don't send.

svn path=/trunk/; revision=6201
2000-10-26 06:09:47 +00:00