Commit Graph

51 Commits

Author SHA1 Message Date
72edd88061 change va_copy to G_VA_COPY
svn path=/trunk/; revision=13753
2001-10-18 17:30:04 +00:00
40964e5ccc Use va_copy to make this compile on ppc again.
* mail-mt.c (mail_call_main): Use va_copy to make this compile on
	ppc again.

svn path=/trunk/; revision=13749
2001-10-18 17:00:37 +00:00
8c85ed61ba Added an async_event handler to store_info. (mail_note_store): Setup async
* mail-folder-cache.c: Added an async_event handler to store_info.
	(mail_note_store): Setup async event handler here.
	(store_finalised): Flush out async events here.
	(folder_changed): Use async event handler to emit event.
	(mail_note_folder): Chagned, do most of the work in the calling
	context, only do the corba stuff in main.
	(store_folder_subscribed): Use async event, and do more work locally.
	(store_folder_unsubscribed): Same.
	(store_folder_deleted): Call store_folder_unsubscribed if we have
	to do any work.
	(store_folder_created): Call store_folder_subscribed if we have to
	do any work.
	(store_folder_unsubscribed): Ref store while busy.
	(real_folder_deleted): And unref here.
	(store_folder_subscribed): Reg store while busy.
	(real_folder_created): Unref here.
	(mail_note_folder): Ref folder while busy.
	(real_note_folder): And unref here.
	(mail_note_folder): Hook onto folder_deleted event.
	(folder_deleted): Just mark this folder as no longer available.

	* mail-session.c (register_timeout): Use mail_call_main instead of
	proxy_event.
	(remove_timeout): Same here.

	* folder-browser.c (folder_changed): use the new mail_async_event
	stuff.
	(folder_changed_main): Remove old async event handling stuff.
	(FOLDER_BROWSER_LOCK/UNLOCK): Removed.
	(FolderBrowserPrivate): Removed too, sigh.

	* mail-mt.c (mail_async_event_new, mail_async_event_emit,
	mail_async_event_destroy): New functions to handle async events.
	(mail_proxy_event, mail_proxy_event_id): Removed old functions for
	async events.
	(do_call): Add suport for MAIL_CALL_p_pp.
	(mail_msg_free): Use mail_async_event instead of proxy_event.

	* message-list.c (message_changed): Promote the message_changed to
	a folder_changed and use main_folder_changed to process it.
	(main_message_changed): Remove.d
	(message_list_init): Setup async event handler.
	(message_list_destroy): Remove async handler.
	(folder_changed): Use async hanler to emit event in main loop.
	(message_changed): Same.

svn path=/trunk/; revision=13698
2001-10-16 19:13:31 +00:00
6
41802db263 New function to return the id of the currently executing proxied event.
2001-10-16    <NotZed@Ximian.com>

	* mail-mt.c (mail_proxy_event_id): New function to return the id
	of the currently executing proxied event.

	* folder-browser.h: Added private field.

	* folder-browser.c (folder_changed): Keep track of tasks
	outstanding in the tasks list, locked access.
	(FOLDER_BROWSER_LOCK, UNLOCK): Macros to lock the folder browser
	for poking about in diff threads.
	(folder_browser_finalise): Wait for any outstanding takss to
	finish before cleaning ourself up.
	(folder_browser_destroy): Move the seen_id handling to finalise,
	also add a loading_id handling code.
	(main_folder_changed): Remove our running task when done.

svn path=/trunk/; revision=13695
2001-10-16 17:34:59 +00:00
5
3ac3a15e3c Proxy get-password call to main thread. (forget_password): same for
2001-10-15    <NotZed@Ximian.com>

        * mail-session.c (get_password): Proxy get-password call to main
        thread.
        (forget_password): same for forget_password.
        (get_filter_driver): and same for get_filter_driver, since it uses
        gtk objects.

        * mail-mt.c (mail_call_main): new generic interface for calling
        stuff/proxying in the gui thread.

svn path=/trunk/; revision=13679
2001-10-15 18:55:18 +00:00
c0af9ae948 Fix a merge-conflict leftover.
2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (pass_got): Fix a merge-conflict leftover.

svn path=/trunk/; revision=13474
2001-10-05 22:17:04 +00:00
f26378de36 Don't call mail_config_service_set_save_passwd if we didn't find a
* mail-mt.c (pass_got): Don't call
	mail_config_service_set_save_passwd if we didn't find a service.

svn path=/trunk/; revision=13231
2001-09-28 21:11:35 +00:00
03dcbdb743 Added mail_msg_cleanup() prototype.
2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.h: Added mail_msg_cleanup() prototype.

svn path=/trunk/; revision=13219
2001-09-28 18:40:55 +00:00
905bc4ef20 Always make the Cancel button the last one.
* mail-mt.c (do_user_message): Always make the Cancel button the
last one.

svn path=/trunk/; revision=13207
2001-09-28 00:03:51 +00:00
115673976e Change the wording of the password dialog if we are getting a pgp
2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (do_get_pass): Change the wording of the password
	dialog if we are getting a pgp passphrase so that users don't
	misinterpret it to mean saving the passphrase forever.

svn path=/trunk/; revision=13176
2001-09-26 23:45:35 +00:00
5
ba5b1b6be7 Deal with destroy vs finalise semantics. Only destroy widgets here.
2001-09-25    <NotZed@Ximian.com>

        * folder-browser.c (folder_browser_destroy): Deal with destroy vs
        finalise semantics.  Only destroy widgets here.
        (folder_browser_finalise): object finalise function, actually
        unref/free all other objects here.
        (folder_browser_class_init): Init the finalise hook.
        (got_folder): Check if message_list == NULL -> we've been
        destroyed before the thread got a chance to finish loading the
        folder.
        (folder_browser_is_drafts): Dont use a g_return_if_fail to return
        in what could be a valid state of the object.
        (folder_browser_is_sent): Likewise.
        (folder_browser_copy): Do nothing if message_list == NULL.

        * main.c (main): call  mail_msg_cleanup() before leaving threads.

        * component-factory.c (owner_unset_cb): Wait for all outstanding
        operations to finish before setting up to quit.
        (idle_quit): Wait for all outstanding ops to finish before
        cleanup.
        (unref_standard_folders): NULL out the standard folder before
        unreffing it.

        * mail-mt.c (mail_msg_wait_all): New function to wait for all
        outstanding thread operations.
        (mail_msg_cleanup): Destroy the io channels before we're
        finished.  Also wait for all outstanding threads first.  Made
        public.
        (mail_msg_init): Dont call mail_msg_cleanup atexit automatically.

svn path=/trunk/; revision=13129
2001-09-25 22:18:52 +00:00
d6cecfcef1 Only cache the password for the service if it has an entry in the account
2001-09-25  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (pass_got): Only cache the password for the service if
	it has an entry in the account database. Fixes bug #10875.

svn path=/trunk/; revision=13111
2001-09-25 18:12:47 +00:00
3c632cd045 Always cache POP and IMAP passwords, even if the user didn't tell us to.
2001-09-23  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (pass_got): Always cache POP and IMAP passwords, even
	if the user didn't tell us to. Fixes bug #10569.

svn path=/trunk/; revision=13089
2001-09-24 00:34:01 +00:00
1
cca23c1566 If we have an operation that failed before, dont show the dialogue for the
2001-09-21    <NotZed@Ximian.com>

	* mail-mt.c (mail_msg_check_error): If we have an operation that
	failed before, dont show the dialogue for the the new error.  Also
	use gtk_widget_show rather than invoking another main loop.  Fix
	for lazy people who like to leave their mailers running and go
	home.

svn path=/trunk/; revision=13075
2001-09-21 23:12:44 +00:00
0
412c2967bb Register vfolder sources here.
2001-09-20    <NotZed@Ximian.com>

        * mail-tools.c(mail_tool_uri_to_folder): Register vfolder sources here.

        * folder-browser.c (got_folder): Dont register vfolder sources
        here.

        * mail-ops.c (mail_get_folder): Add thread parameter.  Fix callers.

        * mail-vfolder.c (vfolder_setup): Use the 'slow' queue for setting
        up vfolders.

        * mail-mt.c (mail_msg_init): Limit the maximum number of threads
        on the 'new' thread to 10.
        (mail_msg_init): Create a new queue 'slow' for doing slow
        operations.

svn path=/trunk/; revision=13017
2001-09-20 21:01:53 +00:00
c3b248ff4b Make the title translatable, and also use the account name when possible.
2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (do_get_pass): Make the title translatable, and also
	use the account name when possible. Sorta fixes bug #6277.

svn path=/trunk/; revision=12964
2001-09-19 00:16:34 +00:00
3e079da9b6 Pass a 'cache-me' argument to mail_get_password.
2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-session.c (get_password): Pass a 'cache-me' argument to
	mail_get_password.

	* mail-mt.c (pass_got): Make less confusing...
	(mail_get_password): Now takes an argument 'cache' that allows our
	caller to determine if the user wanted to cache his/her password
	or not.
	(pass_got): Set the cache option.

svn path=/trunk/; revision=12950
2001-09-18 20:14:38 +00:00
ac4f13b93e Allow the activity to be NULL if there isn't a global_shell_client so that
2001-08-19  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (do_op_status): Allow the activity to be NULL if there
	isn't a global_shell_client so that we don't try and report status
	updates when the shell is destroyed.

	* mail-config.c (add_shortcut_entry): Return if there isn't a
	global_shell_client.

	* component-factory.c (owner_set_cb): set the global_shell_client
	here and connect to the destroy signal.

	* mail-vfolder.c (vfolder_create_storage): Use an extern global_shell_client.

svn path=/trunk/; revision=12242
2001-08-20 04:02:10 +00:00
c2e50e8804 Changed the title of this dialog to "Enter Password".
2001-07-31  Anna Marie Dirks <anna@ximian.com>
	* mail-mt.c (do_get_pass): Changed the title of this dialog
	to "Enter Password".

svn path=/trunk/; revision=11534
2001-07-31 20:53:46 +00:00
bf408fed06 We are not guarenteed to have a non-NULL service (ie. PGP) thus check for
2001-07-30  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (do_get_pass): We are not guarenteed to have a
	non-NULL service (ie. PGP) thus check for it.
	(pass_got): And again here.
	(mail_get_password): And of course here too.

svn path=/trunk/; revision=11493
2001-07-30 22:16:49 +00:00
45701621c5 Don't need this anymore. (do_get_pass): Since we already have the entry
2001-07-27  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (focus_on_entry): Don't need this anymore.
	(do_get_pass): Since we already have the entry widget, no need to
	do the nasty focus_on_entry hack.

svn path=/trunk/; revision=11453
2001-07-27 19:02:42 +00:00
4157d65284 Figure out whether we're getting the password for the source or the
2001-07-26  Peter Williams  <peterw@ximian.com>

	* mail-mt.c (do_get_pass): Figure out whether we're getting the password
	for the source or the transport, and get the toggle button accordingly.
	(pass_got): Same.

	* mail-config.c (mail_config_get_account_by_transport_url): New function.
	Cut + paste + search + replace of _by_source_url.

	* mail-config.h: Prototype here.

svn path=/trunk/; revision=11446
2001-07-27 15:36:42 +00:00
871a58ea8a Use magic to make the password remembering checkbutton come after the
2001-07-26  Peter Williams  <peterw@ximian.com>

	* mail-mt.c (do_get_pass): Use magic to make the password
	remembering checkbutton come after the entry, visually.

svn path=/trunk/; revision=11432
2001-07-26 19:47:05 +00:00
b0d5e599ce Don't make the key url:item if we have the url, just make it url. This
2001-07-25  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-session.c (make_key): Don't make the key url:item if we
	have the url, just make it url. This fixes bug #5339.
	(mail_session_set_password): Removed.

svn path=/trunk/; revision=11411
2001-07-25 20:04:12 +00:00
56d33b7e47 Now take a CamelService parameter (as passed by Camel). Allows us to have
2001-07-25  Peter Williams  <peterw@ximian.com>

	* mail-mt.c (mail_get_password): Now take a CamelService parameter
	(as passed by Camel). Allows us to have a "remember password"
	checkbox that is set correctly and whose settings can be
	propagated back to the proper MailConfigService.
	(do_get_pass): Add a checkbutton allowing the user to change
	whether the password is remembered or not.
	(pass_got): Apply the setting of the "remember password"
	checkbutton (if not cancelled.)

	* mail-mt.h: Update the prototype here.

	* mail-config.c (mail_config_service_set_save_passwd): New function,
	pretty bland.

	* mail-config.h: Prototype our bland new function. (Get it? It's a pun!)

	* mail-session.c (get_password): Pass the service as well.

svn path=/trunk/; revision=11408
2001-07-25 19:05:08 +00:00
cb4926026f Go back to calling mail_msg_free here. (mail_msg_destroy): Remove the
2001-07-23  Not Zed  <NotZed@Ximian.com>

        * mail-mt.c (mail_msgport_replied): Go back to calling
        mail_msg_free here.
        (mail_msg_destroy): Remove the operation unregistration stuff.
        (mail_msg_received): And put it here, so we unregister as soon as
        the async part of the operation is complete.  I thought about this
        and we should be doing this anyway so we register/unregister
        always in the same thread, although the camel_operation api
        doesn't enforce it, this *is* what it expects.

        * message-list.c (regen_list_regen): re-add reporting to
        rebuilding the message list.  Basically fixes #4931

svn path=/trunk/; revision=11332
2001-07-24 01:36:11 +00:00
fcce65ec8a Fix DanW's fix. Pass the right arguments to mail_msg_destroy.
2001-07-20  Peter Williams  <peterw@ximian.com>

	* mail-mt.c (mail_msgport_replied): Fix DanW's fix. Pass the right
	arguments to mail_msg_destroy.

	* component-factory.c (component_fn): Don't populate the context
	menu; our only action didn't even work.
	(populate_folder_context_menu): Removed. ChangeFolderProperties
	needs a FolderBrowser which we don't have. It didn't even work
	before.

	* mail-local.c (mail_local_reconfigure_folder): Bring the creation
	of the hash table to the beginning to prevent warnings. Complain
	if the mailbox is non-local.

svn path=/trunk/; revision=11266
2001-07-20 19:15:04 +00:00
47b817166c Use mail_msg_destroy rather than mail_msg_free, so the cancellation
* mail-mt.c (mail_msgport_replied): Use mail_msg_destroy rather
	than mail_msg_free, so the cancellation operation gets
	unregistered and doesn't leak two file descriptors.

svn path=/trunk/; revision=11263
2001-07-20 18:00:44 +00:00
37695c74b7 remvoed register/start/end etc code.
2001-07-19  Not Zed  <NotZed@Ximian.com>

        * mail-local.c (reconfigure_folder_reconfigure): remvoed
        register/start/end etc code.

        * mail-ops.c (get_messages_desc): Add the count here.
        (get_messages_get): Remove the register/start code, its handled
        above us.
        (save_messages_desc): Added count.
        (save_messages_save): Removed register/start/end code.

        * mail-mt.c (mail_msg_received, mail_msg_destroy): Changed to use
        camel_operation rather than mail_status.
        (mail_msgport_received, mail_msgport_replied): Turn of the
        mail_status stuff, we dont need to report on stuff running in the
        gui thread right?
        (retrieve_shell_view_interface_from_control, set_view_data,
        mail_statusf,  mail_status, mail_status_end, mail_status_start,
        status_timeout, do_del_status, set_status_op): removed now
        redundant stuff.
        (mail_msg_free): Removed reference to timeout_id.

svn path=/trunk/; revision=11225
2001-07-19 13:31:22 +00:00
cdea22d886 partial checkin before completing the changes
2001-07-18  Not Zed  <NotZed@Ximian.com>

        * mail-local.c (reconfigure_folder_reconfigure): Changed to use
        camel_operation rathre than mail_status.
        (reconfigure_folder_describe): re-enabled this function.

        * mail-ops.c (get_messages_get): Changed to use camel-progress for
        status reporting.
        (save_messages_save): Likewise.

2001-07-17  Not Zed  <NotZed@Ximian.com>

        * mail-mt.c (struct _mail_msg_priv, destroy_objects, mail_msg_new,
        mail_msg_free, do_op_status): Changed to use an EvolutionActivityClient for
        progress.

svn path=/trunk/; revision=11223
2001-07-19 11:50:49 +00:00
03d2f262c0 Don't pop up a progress dialog to say "I already finished this a while
* mail-mt.c (op_status_timeout): Don't pop up a progress dialog to
	say "I already finished this a while ago".

	* component-factory.c (storage_create_folder): Pass the path
	prefix to folder_created so it can add it to the folder tree in
	the right place.

	* mail-callbacks.c (folder_created): Take a path prefix.

svn path=/trunk/; revision=10508
2001-06-26 19:13:24 +00:00
d4b3c14fcd Renamed from session.c and made to be a subclass of CamelSession.
* mail-session.c: Renamed from session.c and made to be a subclass
	of CamelSession.

	* mail-mt.c (mail_user_message): Renamed from mail_get_accept and
	made more general-purpose, to implement the new
	camel_session_alert_user.

svn path=/trunk/; revision=9618
2001-04-27 21:08:51 +00:00
72b0983f7a more memory leaks
svn path=/trunk/; revision=9431
2001-04-17 20:29:40 +00:00
57574f0be3 Cleaned up #includes. Remove unneccesary includes of <gnome.h>,
2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>

	* *.*: Cleaned up #includes. Remove unneccesary includes of
	<gnome.h>, <gtk/gtk.h>, <bonobo.h> and replaced with more
	fine grained headers where needed. Also marked a bunch of
	strings for translations and added some missing prototypes.

svn path=/trunk/; revision=9025
2001-03-29 20:53:17 +00:00
fcb4ed5a4f Move the proxy event outside the lock (otherwise we always deadlock).
2001-03-17  Not Zed  <NotZed@Ximian.com>

	* mail-mt.c (mail_msg_free): Move the proxy event outside the lock
	(otherwise we always deadlock).

	* mail-local.c (reconfigure_clicked): Clear the message list
	during update inside the folder thingy.  This is a hell mess, need
	to move the gui stuff to mail-callbacks and make this reconfigure
	thing a more generic func.

	* message-list.c (ml_value_to_string): Cleanup the logic to use
	lookup tables.
	(sort_uid_to_rows): Removed due to rewrite below.
	(build_flat_diff): Changes for node/summary/etc changes.  Also do
	changed nodes too.
	(clear_tree): Free the info reference for nodes in our hashtable.
	(build_subtree): Ref the info reference in our hash/tree node.
	(on_click): Dont free message info, since we just got our ref to
	it.
	(remove_node_diff): Free messageinfo off node.
	(build_flat): Ref messageinfo.
	(message_list_set_folder): Allow a NULL folder to be set -
	i.e. clear the view.
	(message_list_set_folder): Emit a no message sleeted signal.
	(build_tree): Change cursor keeping stuff to work with new info.

	Turned off BROKEN_ETREE - well maybe it'll work.  Check for
	duplicate messages displayed, etc.

2001-03-16  Not Zed  <NotZed@Ximian.com>

	* message-list.h: Added uid_nodemap; mapping of uid's to e-tree
	nodes.

	* message-list.c (build_flat): Changed to take a summary argument,
	and to store node in node map, etc, and store info's in e-tree.
	(build_subtree): Changed to store node in node map, and to store
	info's in tree directly.
	(ml_tree_value_at): Changed to get info directly from tree node,
	removed allocated return value logic.
	(ml_tree_value_at): Removed all "fake node" handling, no fake
	nodes should ever exist.
	(id_is_uid, id_is_subject, id_uid, id_subject): Removed macro's no
	longer used.
	(new_id_from_uid, new_id_from_subject): Removed no longer used.
	(get_message_uid):
	(get_message_info): Treat tree node data as messageinfo.
	(message_list_select): Dont free the messageinfo, as its part of
	our data, not retrieved from folder.
	(message_list_drag_data_get): ditto.
	(subtree_unread): Treat tree node data as messageinfo.
	(subtree_size): ditto.
	(subtree_earliest): ditto.
	(clear_tree): Reset uid_nodemap on clear.
	(save_node_state): tree nodes == messageinfo's.
	(add_node_diff): ditto.
	(remove_node_diff): ditto.
	(main_folder_changed): use uid_nodemap to lookup changed nodes.
	(main_message_changed): ditto.

svn path=/trunk/; revision=8775
2001-03-17 04:56:54 +00:00
673fb08aef Tell camel to init NSS. (mail_session_accept_dialog): Doh! NULL terminate
2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

	* session.c (mail_session_init): Tell camel to init NSS.
	(mail_session_accept_dialog): Doh! NULL terminate the list of
	buttons and show the label.

	* mail-mt.c (do_get_accept): Same.

svn path=/trunk/; revision=8721
2001-03-15 02:48:35 +00:00
013b2e0078 Tell camel to init NSS. (mail_session_accept_dialog): Doh! NULL terminate
2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

	* session.c (mail_session_init): Tell camel to init NSS.
	(mail_session_accept_dialog): Doh! NULL terminate the list of
	buttons.

	* mail-mt.c (do_get_accept): Same.

svn path=/trunk/; revision=8719
2001-03-15 02:32:53 +00:00
b860bc0e2d New async function that will be used for SSL certs later.
2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (mail_get_accept): New async function that will be
	used for SSL certs later.

	* session.c (auth_callback): Changed to return a gpointer value.
	(mail_session_accept_dialog): New function to handle the new
	_ACCEPT authenticator mode.

svn path=/trunk/; revision=8622
2001-03-10 00:14:11 +00:00
63145be20b Check the container is not NIL before trying to set thje prop.
2001-03-02  Not Zed  <NotZed@Ximian.com>

        * mail-mt.c (set_stop): Check the container is not NIL before
        trying to set thje prop.

svn path=/trunk/; revision=8449
2001-03-01 17:10:50 +00:00
f01589262c Fixes for changes to search bar. (search_save): Removed. (search_full):
2001-03-01  Not Zed  <NotZed@Ximian.com>

        * folder-browser.c (folder_browser_search_menu_activated): Fixes
        for changes to search bar.
        (search_save): Removed.
        (search_full): Removed.
        (search_full_clicked): Removed.
        (folder_browser_search_option_items[]): Removed.
        (folder_browser_search_query_changed): Changed for search bar
        changes.
        (folder_browser_clear_search): Removed.

        * mail-vfolder.c (vfolder_clone_rule): New function to clone a
        filter/search rule into a matching vfolder rule.

        * mail-send-recv.c (mail_receive_uri): Setup a timeout for status
        updates.
        (build_dialogue): Setup timeout id for status updates.
        (operation_status_timeout): New function to set the status via a
        timeout.
        (receive_done): Remove the timeout handler if we need to.
        (operation_status):
        (receive_status): Just update the info, and let the timeout
        handler update the gui.
        (do_free_status):
        (do_show_status): Removed gui thread status message processing.

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

        * folder-browser.c (folder_browser_config_search): New function to
        configure the FilterRule for the search mechanism.

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

        * folder-browser.c (folder_browser_gui_init): Setup the search bar
        as a filterbar.
        (got_folder): Set the whole search bar sensitive or not based on
        the search capability of the folder.

        * folder-browser.h: Changed to use efilterbar instead of esearchbar.

svn path=/trunk/; revision=8438
2001-03-01 00:58:16 +00:00
351903ad90 Make op cancellable/report internals. (get_folder_get):
2001-02-23  Not Zed  <NotZed@Ximian.com>

        * mail-ops.c (create_folder_get): Make op cancellable/report
        internals.
        (get_folder_get):
        (sync_folder_sync):
        (get_folderinfo_get): Make op cancellable/report internals.

        * mail-vtrash.c (get_trash_get): Setup the operation registration,
        and create a pseudo "start/stop" operation.

        * component-factory.c (owner_set_cb): Make trash creation async.

        * mail-local.c (register_folder_desc): A description of what we're
        doing.

        * mail-mt.c (mail_msg_new): Set status callback to operation_new.
        (mail_operation_status): Operation status function, proxy messages
        to main thread, and attempt to present a meaningful ui experience
        for operations.

svn path=/trunk/; revision=8351
2001-02-22 22:27:40 +00:00
3d924d9972 started hack for progress reporting, which is currently to the console.
2001-02-22  Not Zed  <NotZed@Ximian.com>

        * mail-local.c (local_storage_new_folder_cb): started hack for
        progress reporting, which is currently to the console.

        * mail-mt.c (set_stop): Set the stop button sensitivity.
        (mail_msg_received): enable/disable stop button while we're
        processing stuff in another thread.

        * message-list.c (ml_tree_value_at): If our uid entry vanishes
        before w'ere ready, then make a fake.

svn path=/trunk/; revision=8338
2001-02-21 20:13:07 +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
4bac88ea16 Check current_message for NULL - this fixes a bug running under SunOS (not
2001-02-07  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-mt.c (set_view_data): Check current_message for NULL - this
	fixes a bug running under SunOS (not a major deal tho as it's in a
	debug printf).

svn path=/trunk/; revision=8093
2001-02-08 00:22:34 +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
aad4202594 Debug function to compare the tree we think we have, after an incremental
2001-01-29  Not Zed  <NotZed@Ximian.com>

        * message-list.c (tree_equal): Debug function to compare the tree
        we think we have, after an incremental update.
        (build_tree): Check the tree after we've built it.

        * mail-mt.c (mail_get_password): If we are being called from the
        main gui thread, then just call the dialogue directly.  Ideally we
        dont want this anyway but lets handle the case nicely.
        (mail_get_password): Try locking around the password request, to
        single-queue any password requests.
        (mail_msg_init): Push an exit handler to clean it up on completion.

        * mail-send-recv.c (receive_update_got_store): New function called
        when the store has been retrieved asynchronously.
        (mail_send_receive): Get the store asynchronously.  This was
        causing problems where the password dialogue would try and be
        called from the main thread via a message.

        * mail-ops.c (mail_get_store): New function to get a store
        (a)synchronously.  More or less taken from subscribe-dialog, which
        i will remove later.
        (mail_scan_subfolders): Try running the scan subfolder thing
        asynchronously, to help startup time.  Not sure if this will work,
        but presumably the shell can handle the folders appearing later
        ok.

svn path=/trunk/; revision=7886
2001-01-29 09:33:15 +00:00
ff2d16601e make mail_gui_thread non-static.
* mail-mt.[ch]: make mail_gui_thread non-static.

	* main.c (main): Set up signal handler for SEGV, BUS, FPE
	(segv_redirect): if a gnome-segv'ing signal is received in
	a thread other than mail_gui_thread, re-deliver it to that
	thread to work around a problem with the gnome segv handler.

svn path=/trunk/; revision=7728
2001-01-22 23:16:33 +00:00
50ef085e18 Init a cancel field in the message. (mail_msg_free): Free it.
2001-01-21  Not Zed  <NotZed@Ximian.com>

        * mail-mt.c (mail_msg_new): Init a cancel field in the message.
        (mail_msg_free): Free it.
        (mail_msg_cancel): New function to attempt to cancel an
        operation by id.  Impelementation functions can still be
        uncancellable by not registering for cancellation, etc, or do it
        themselves as well.

        * mail-send-recv.c (fetch_mail_filter_folder): set folder_uid's
        properly, so we can save it later.
        (filter_folder_filter): Renamed from fetch_mail_filter_folder,
        since its going to be used for all filtering.
        (mail_fetch_mail): Changed from mail_filter_mail.
        (mail_filter_folder): New function, replaces
        mail_do_filter_ondemand functionality.
        (mail_filter_on_demand): New function, actually replaces
        mail_do_filter_ondemand.
        (receive_get_folder): Added an exception arg.
        (mail_send_message): New function to just send a message.
        (send_mail_send): Use mail_send_message.
        (send_queue_send): New send qeue code, use mail_send_message, and
        clean up some stuff.
        (mail_send_receive): Changed from mail_receive.
        (build_dialogue): Setup the sending data, as well.
        (mail_update_subfolders): New function to update folder info.
        (send_mail_send): hook into cancellation if we want.

svn path=/trunk/; revision=7672
2001-01-21 04:19:30 +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
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