Commit Graph

69 Commits

Author SHA1 Message Date
95d963dec5 ** This and jeffs patch for #43862.
2003-06-02  Not Zed  <NotZed@Ximian.com>

	** This and jeffs patch for #43862.

	* mail-folder-cache.c (store_online_cb): If the store is still
	around, then flow on to a get folderinfo update, otherwise just
	clear up.

	* mail-ops.c (mail_store_set_offline): return the msgid of this so
	it can be cancelled.

2003-05-30  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-folder-cache.c (mail_note_store): If the session is
	'online' and we are noting a CamelDiscoStore, make sure that it is
	changed to online status and call mail_get_folderinfo().

svn path=/trunk/; revision=21369
2003-06-02 17:50:26 +00:00
f9804e1193 Commented out stuff that doesn't build yet. Also fixed idl build rule.
2002-11-13  Not Zed  <NotZed@Ximian.com>

	* Makefile.am: Commented out stuff that doesn't build yet.  Also
	fixed idl build rule.  importers still not built.

	* main.c (main): bonobactivationise.  remove push visual/colormap.
	(main): no longer activate activation, let bonobo_init do it.

	* mail-signature-editor.c (menu_help): Change help api.

	* mail-session.c (user_message_destroy_noreply): removed.  Not
	used?

	* mail-local.c (load_metainfo): xml root->children.

	* mail-format.c (g_string_append_len): Removed, it exists now.

2002-11-12  Not Zed  <NotZed@Ximian.com>

	* subscribe-dialog.c: gnome2ised, use gtkdialog.
	(subscribe_get_global_extras): use a weak ref rather than destroy signal.

	* message-tag-followup.c: gnome2ised.

	* message-tag-editor.c: gnome2ised & converted to gtkdialog.

	* message-list.c: gnome2ised.
	(message_list_finalise): From destroy method.  maybe should be
	destroy still.

	* message-browser.c: port to gnome2
	(message_browser_finalise): renamed from destroy method.

	* mail-stream-gtkhtml.c: removed redundant
	camel_class_get_global_classfuncs() call.

	* mail-signature-editor.c: gtkdialogised, & bonobo api changes.


	* mail-search-dialogue.c: gtkdialogised.

	* mail-folder-cache.c: cleaned up camel ref/hook casts.

	* mail-composer-prefs.c (mail_composer_prefs_get_type): convert to
	gtype.

	* mail-font-prefs.c (mail_font_prefs_destroy): from finalise.

	* mail-config.c: s/bonobo_config/e_config_listener/
	Added /apps/Evolution prefix to the evolution keys.
	Changed to use e_config_listener, etc.
	(mail_config_init): remove bonobo_config stuff.
	(mail_config_check_service): gtk dialogise.
	(check_response): from check_cancelled.

	* mail-config-druid.c (mail_config_druid_destroy): renamed from
	_finalize, turned into destroy handler.
	(construct): set type to toplevel, GTK_WINDOW_DIALOG no longer exists.

	* mail-config-factory.c (mail_config_register_factory): bonobo api
	changes.

	* mail-crypto.c (mail_crypto_get_pgp_cipher_context): cleaned up
	unref casts.

	* mail-display.c (write_data_to_file): gnome->gtkdialog.
	(on_link_clicked): use ascii_str*cmp on url.
	(save_part): g_path stuff.
	(launch_cb): gtk dialog.
	(pixmap_press): de-oafify.
	(pixbuf_for_mime_type): gnome-vfs api changes.
	(do_attachment_header): Change the pixmap to a gtkimage.
	(do_signature): "
	(pixbuf_gen_idle): "
	(do_attachment_header): ascii_str*cmp
	(do_attachment_header): gnome pixmap->gtkimage.
	(mail_display_destroy): protect against gtk mentalness.
	(html_button_press_event): ascii_str*cmp
	(drag_data_get_cb): added comment for translators of filename.

	* mail-format.c (component_supports): de-oafise.
	(is_anonymous): ascii_strncmp
	(attachment_header): remove utf8<>locale stuff, and gnomevfs api
	changes.
	(format_mime_part): fix g_strdown call.
	(write_field_row_begin): kill utf8->gtk stuff.
	(write_address): "
	(default_header_index): ascii_strcasecmp
	(handle_text_plain): "
	(handle_text_enriched): "
	(handle_multipart_encrypted): remove utf/gtk stuff.
	(handle_message_external_body): ascii_str*cmp

	* mail-identify.c (mail_identify_mime_part):
	(identify_by_magic): gnome vfs api changes.

	* mail-importer.c: Converted.

	* mail-local.c (load_metainfo): xml childs -> children.
	(mls_get_folder): g_strerror.
	(mls_delete_folder): g_strerror.
	(reconfigure_got_folder): Gnome->GtkDialog
	(reconfigure_response): from reconfigure_clicked.

	* mail-mt.c (mail_msg_check_error): gnome -> gtk dialog
	(error_response): renmae from error_gone.  destroy widget on any
	response.

	* mail-offline-handler.c (impl_finalise): renamed from
	impl_destroy since thats what it should be anyway.

	* mail-ops.c: removed utf8 widget conversion & camel_object_un/ref
	casts.

	* mail-preferences.c (mail_preferences_get_type): glib2'ised.

	* mail-search.c (mail_search_finalise): renmaed from destroy &
	properly chain.
	(mail_search_get_type): glib2 & make gtkdialog parent.
	(entry_run_search): run search when entry activated.  not sure if
	gtkdialog has anohter way to do this on an arbitrary widget.

	* mail-send-recv.c (dialogue_response): renamed from clicked.  Use
	gtkdialog.

	* mail-session.c (request_password_deleted): removed, redundant.
	(pass_response): rename from pass_got, changed for gtkdialog.
	(user_message_destroy): Removed, redundant.
	(user_message_response): Renamed from user_message_clicked.

2002-11-11  Not Zed  <NotZed@Ximian.com>

	* mail-stream-gtkhtml.c (mail_stream_gtkhtml_class_init): dont use
	get_global_classfuncs, just get the type

	* mail-tools.c: converted gnome2 api's.

	* mail-vfolder.c (vfolder_editor_response): clicked->response.
	(vfolder_editor_destroy): Removed.
	(vfolder_edit): gtk dialog api
	(edit_rule_response): clicked->response.
	(vfolder_edit_rule): gnomedialog->gtkdialog.
	(vfolder_gui_add_rule): "
	(new_rule_clicked): clicked->response

svn path=/trunk/; revision=18723
2002-11-12 14:59:35 +00:00
fbe9e89258 Spawn a new thread to ping the server but only if it is connected.
2002-08-21  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-folder-cache.c (ping_store): Spawn a new thread to ping the
	server but only if it is connected.
	(ping_cb): This needs to return TRUE so the timeout keeps getting
	called.

svn path=/trunk/; revision=17832
2002-08-21 20:01:46 +00:00
828a107720 Don't bother overloading the timeout virtual methods since they don't
2002-08-21  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-session.c (class_init): Don't bother overloading the
	timeout virtual methods since they don't exist anymore.

	* mail-folder-cache.c (mail_note_store): Register a ping timeout
	callback to ping each store to keep the connections alive.

svn path=/trunk/; revision=17831
2002-08-21 19:23:44 +00:00
c89f5e6986 camel:
2002-07-29  Peter Williams  <peterw@ximian.com>

	Fix bug #28238

	* providers/imap/camel-imap-store.c (imap_forget_folder): New
	function, breaking out the code in delete_folder() to handle when
	a folder is removed.
	(imap_folder_effectively_unsubscribed): New function, breaking out
	the code in unsubscribe_folder() to handle when a folder is
	unsubscribed.
	(imap_check_folder_still_extant): New function, check whether a
	folder exists by LIST'ing it.
	(imap_store_refresh_folders): Add code here to check if the folder
	still exists if we're unable to refresh its info. If so, pretend
	that it was unsubscribed (to get the mailer to remove it from
	the tree) and delete its cache. If somehow this goofs up, the
	worst that can happen is that we must redownload the headers.
	(get_folder_status): If we can't get the status, behave as above.
	(delete_folder): Call imap_forget_folder() where the bulk of this
	code has gone.
	(unsubscribe_folder): Call imap_folder_effectively_unsubscribed()
	where the bulk of this code has gone.

mail:

2002-07-31  Peter Williams  <peterw@ximian.com>

	* mail-folder-cache.c: Add another bitfield "unsub"
	(real_flush_updates): If unsubscribing, manually remove the folder
	from the shell.
	(unset_folder_info): Add another parameter which is used to set
	the unsub member.
	(store_folder_unsubscribed): Pass true for @unsub.
	(unset_folder_info_hash): Pass false for @unsub.

	* subscribe-dialog.c (fe_done_subscribing): Don't notify the shell
	here. The folder cache does it now, and it was broken to make the
	CORBA call in another thread anyway.

svn path=/trunk/; revision=17669
2002-08-01 15:52:38 +00:00
86d2d39580 Call camel_session_get_service instead of camel_session_get_store, as
2002-07-23  Peter Williams  <peterw@ximian.com>

	* mail-ops.c (get_store_get): Call camel_session_get_service
	instead of camel_session_get_store, as _get_store calls
	_get_service_connected which is not what we want to do on startup.
	(set_offline_do): Rework the logic here. It was failing when
	trying to go online with a disco store that couldn't work offline.

	* mail-folder-cache.c (mail_note_store): If we're using an offline
	(well, non-online) disco store that cannot work offline, don't get
	the folderinfo as that will fail.

svn path=/trunk/; revision=17576
2002-07-24 19:37:57 +00:00
0c43bcb20b Propagate name changes or removes to the mail config. #15951. Doesn't
2002-07-24  Not Zed  <NotZed@Ximian.com>

        * mail-folder-cache.c (real_flush_updates): Propagate name changes
        or removes to the mail config.  #15951.  Doesn't enitrely work for
        local folders, because they are never renamed only removed and
        added thanks to the shell's api.

        * mail-config.c (mail_config_uri_renamed): If a store folder is
        renamed, this checks for any config that needs updating, so far
        sent and drafts folders.
        (mail_config_uri_deleted): Same, for deleted folders.

svn path=/trunk/; revision=17568
2002-07-24 07:21:15 +00:00
71fb81afc7 Removed bogus static pre-declaration.
* mail-folder-cache.c: Removed bogus static pre-declaration.

* e-searching-tokenizer.c (e_searching_tokenizer_end): Removed
unused variables.

* mail-callbacks.c: #include <gtkhtml.h>.

* folder-info.h (evolution_folder_info_get_type): Add prototype.

svn path=/trunk/; revision=17508
2002-07-18 18:13:34 +00:00
393fa3c3e8 ** fixes for #10781
2002-07-10  Not Zed  <NotZed@Ximian.com>

        ** fixes for #10781

        * mail-callbacks.c (filter_edit): Add back a cancel button.  We
        dont need to do anything special to 'undo' here, as the rules are
        loaded every time they're used.

        * mail-vfolder.c (vfolder_editor_clicked): If ok wans't clicked,
        revert the ruleset.
        (vfolder_editor_destroy): Fake a button of -1 if we get destroyed
        with no click.
        (context_rule_removed): Unref the folder after we delete it.  If
        we're the last ref to the folder, unrefing it means it no longer
        exist,s which means no delte processing occurs ...

svn path=/trunk/; revision=17449
2002-07-15 02:06:46 +00:00
090af2cb0e Pass zero as the @sorting_priority to evolution_storage_new_folder().
* gui/component/addressbook-storage.c (load_source_data): Pass
zero as the @sorting_priority to evolution_storage_new_folder().
(addressbook_storage_add_source): Likewise.

* subscribe-dialog.c (recursive_add_folder): Pass zero as
@sorting_priority to evolution_storage_new_folder().

* mail-folder-cache.c (real_flush_updates): Pass zero as
@sorting_priority to evolution_storage_new_folder().

* evolution-test-component.c (setup_custom_storage): Pass
@sorting_priority to evolution_storage_new_folder() so we test it.
Also make /FirstFolder have an "inbox" custom icon.

* e-local-storage.c (new_folder): Pass zero as @sorting_priority
to evolution_storage_new_folder().

* evolution-storage.c (evolution_storage_new_folder): New arg
@sorting_priority; put it in the CORBA folder struct.

* evolution-shell-client.c
(impl_FolderSelectionListener_selected): Copy the sortingPriority
as well.

* e-folder.c (e_folder_to_corba): Set sortingPriority.

* e-corba-storage-registry.c
(impl_StorageRegistry_getFolderByUri): Set sortingPriority in the
new CORBA Folder struct.

* e-corba-storage.c (impl_StorageListener_notifyFolderCreated):
Set the custom_icon if folder->customIconName is not an empty
string.  Likewise, set the sorting_priority

* Evolution-common.idl: New member sortingPriority in struct
Folder.

* e-storage-set-view.c (folder_sort_callback): Sort according to
the sorting_priorities.

* e-folder.c: New member sorting_priority in EFolderPrivate.
(init): Init to zero.
(e_folder_set_custom_icon): Emit "changed" if required.
(e_folder_set_sorting_priority): New.

svn path=/trunk/; revision=17404
2002-07-10 15:26:31 +00:00
6d2b6fa6d2 Pass NULL @custom_icon_name to evolution_storage_new_folder().
* gui/component/addressbook-storage.c (load_source_data): Pass
NULL @custom_icon_name to evolution_storage_new_folder().
(addressbook_storage_add_source): Likewise.  [Note we could be
passing a nice custom here. ;-)]

* subscribe-dialog.c (recursive_add_folder): Pass NULL for
@custom_icon_name to evolution_storage_new_folder().

* mail-folder-cache.c (real_flush_updates): Pass NULL for
@custom_icon_name to evolution_storage_new_folder().

* evolution-test-component.c (setup_custom_storage): Pass NULL for
@custom_icon_name to evolution_storage_new_folder().

* e-local-storage.c (new_folder): Pass the custom_icon_name here
to evolution_storage_new_folder().

* evolution-shell-client.c
(impl_FolderSelectionListener_selected): Set customIconName here
too.

* e-folder.c (e_folder_to_corba): Set customIconName too.

* e-corba-storage-registry.c
(impl_StorageRegistry_getFolderByUri): Set customIconName.  Also,
use e_safe_corba_string() to clean up the code a bit.

* evolution-storage.c (evolution_storage_new_folder): New arg
@custom_icon_name.

* Evolution-common.idl: New member customIconName in struct
Folder.

svn path=/trunk/; revision=17397
2002-07-09 20:27:17 +00:00
613c4f1ce3 Removed. The folder's deleted event isn't needed since we're listening to
2002-07-01  Not Zed  <NotZed@Ximian.com>

	* mail-folder-cache.c (folder_deleted): Removed.  The
	folder's deleted event isn't needed since we're listening to the
	store's folder_deleted signal.  Also, the code was wrong, it
	cleared the folder without disconnecting events, etc.  See #16486,
	and probably others.
	(mail_note_folder): Dont hook onto deleted anymore.
	(unset_folder_info): Or unhook from it.

svn path=/trunk/; revision=17331
2002-07-01 04:56:35 +00:00
13c9d214fa Set the can_sync_offline property on the EFolder based on the
* e-corba-storage.c (impl_StorageListener_notifyFolderCreated):
Set the can_sync_offline property on the EFolder based on the
canSyncOffline value on the CORBA folder.

* evolution-test-component.c (setup_custom_storage): Pass FALSE
for @sync_offline to evolution_storage_new_folder().

* e-local-storage.c (new_folder): Pass FALSE for @sync_offline to
evolution_storage_new_folder().

* evolution-storage.h (evolution_storage_new_folder): New arg
@can_sync_offline.

* subscribe-dialog.c (recursive_add_folder): Pass TRUE for
@sync_offline to evolution_storage_new_folder().

* mail-folder-cache.c (real_flush_updates): Pass TRUE for
@sync_offline to evolution_storage_new_folder().

* gui/component/addressbook-storage.c (load_source_data): Pass
FALSE for @sync_offline to evolution_storage_new_folder().
(addressbook_storage_add_source): Pass FALSE for @sync_offline to
evolution_storage_new_folder().

svn path=/trunk/; revision=16947
2002-05-20 19:06:03 +00:00
7df203024e Remove "mailstorage", since it's not needed any more. (storage_activate):
* component-factory.c (folder_types): Remove "mailstorage", since
	it's not needed any more.
	(storage_activate): Gone, although some of it is moved to
	storage_connect.
	(create_view): Remove mailstorage code.
	(add_storage): Connect to the storage's open_folder signal.
	Instead of creating a "mailstorage" folder, call
	evolution_storage_has_subfolders to let the shell know we haven't
	finished filling it in yet.
	(storage_connect): Handler for the storage's asyncOpenFolder
	signal. Call mail_note_store() to try to connect.
	(storage_connected): Callback for above. If the connection attempt
	failed, call evolution_storage_has_subfolders again to make the
	shell re-close the storage.

	* mail-folder-cache.c (update_folders): Remove a piece of
	mailstorage legacy code from here.

svn path=/trunk/; revision=16170
2002-03-14 22:23:06 +00:00
4db8df6b4d Pull up assertion change from evolution-1-0-branch to allow external
* mail-folder-cache.c (mail_note_store): Pull up assertion change
	from evolution-1-0-branch to allow external storages.

svn path=/trunk/; revision=15928
2002-03-05 21:17:46 +00:00
b0a253e060 If a related part is requested, remove it from the related undisplayed
2002-02-26  Not Zed  <NotZed@Ximian.com>

        * mail-display.c (on_url_requested): If a related part is
        requested, remove it from the related undisplayed list.

        * mail-format.c (handle_multipart_related): Check if related parts
        are displayed, if not, remove them.  For #2741.

svn path=/trunk/; revision=15837
2002-02-26 00:26:55 +00:00
d6d55273d4 Require gal 0.15.99.8
2001-10-29  Joe Shaw  <joe@ximian.com>

	* configure.in: Require gal 0.15.99.8

	* addressbook/backend/ebook/e-card-simple.c,
	addressbook/gui/component/addressbook-storage.c,
	addressbook/gui/widgets/e-addressbook-view.c,
	calendar/gui/e-calendar-table.c,
	calendar/gui/e-itip-control.c,
	calendar/gui/e-meeting-model.c,
	calendar/gui/itip-utils.c,
	calendar/gui/print.c,
	calendar/gui/alarm-notify/alarm-notify-dialog.c,
	filter/rule-editor.c,
	mail/mail-config.c,
	mail/mail-folder-cache.c,
	mail/mail-format.c,
	mail/mail-local.c,
	mail/mail-ops.c,
	mail/mail-vfolder.c,
	shell/e-local-storage.c,
	shell/e-summary-storage.c: Change includes of
	e-util/e-unicode-i18n.h to gal/util/e-unicode-i18n.h

svn path=/trunk/; revision=14427
2001-10-30 05:02:49 +00:00
0
093a00cf2b Argh!!! Dont free the async op data here, the async op is still running
2001-10-30    <NotZed@Ximian.com>

        * subscribe-dialog.c (fe_cancel_op_foreach): Argh!!! Dont free the
        async op data here, the async op is still running and will access
        it!  Just try to cancel it and mark it as cancelled (id == -1)
        (fe_done_subscribing): Only remove outselves from the hash table
        if we're not cancelled.  The handle should always be set here,
        since this code runs in the gui thread.

        * message-list.c (on_cursor_activated_idle): If nothing
        selected/cursor not activated, then select no message.

        * mail-folder-cache.c (update_1folder): Make the trash count
        optional on EVOLUTION_COUNT_TRASH, becuase some lusers are just
        too stupid to understand what its for.

        * component-factory.c (storage_xfer_folder): Return slightly
        better error codes for copying folders, since its not implemented
        yet.

        * mail-vfolder.c, mail-local.c, mail-folder-cache.c,
        message-list.c component-factory.c, mail-ops.c,
        subscribe-dialog.c, mail-session.c: d() out some debug printfs,
        w() out some warnings.

        * folder-browser-ui.c (folder_browser_ui_add_message): Fix typo,
        Resent->Resend.

svn path=/trunk/; revision=14412
2001-10-30 03:28:40 +00:00
60dcd52057 Fixed a warning by #if 0ing out this function.
2001-10-29  Christopher James Lahey  <clahey@ximian.com>

	* e-searching-tokenizer.c (search_info_set_match_size_increase):
	Fixed a warning by #if 0ing out this function.

	* folder-browser.c, folder-browser.h (on_selection_changed):
	Update status bar in an idle call.  Fixes Ximian bug #13929.

	* mail-folder-cache.c (folder_renamed, store_folder_renamed):
	Fixed some warnings here.

svn path=/trunk/; revision=14372
2001-10-29 22:41:35 +00:00
9
93127a6daf Sort the folder updates first, since we dont seem to get them in the right
2001-10-29    <NotZed@Ximian.com>

        * mail-folder-cache.c (store_folder_renamed): Sort the folder
        updates first, since we dont seem to get them in the right order,
        or infact in any tree representation whatsoever when using IMAP
        ...? get_folder_info bugs?

        Unrelated note to self, the subscribe dialogue may interfere with
        the folder cache.

svn path=/trunk/; revision=14328
2001-10-29 08:28:53 +00:00
9
fedf164cb9 Copy the folder's full_name before trying to use it to rename.
2001-10-29    <NotZed@Ximian.com>

        * mail-vfolder.c (rule_changed): Copy the folder's full_name
        before trying to use it to rename.
        (vfolder_edit_rule): Set 'orig' to be a reference of the original
        rule.
        (edit_rule_clicked): Dont lookup orig by name, copy it over
        instead.

        * folder-browser.c (got_folder): oops, emit signal before
        unreffing object, incase we got killded during getting folder.
        (got_folder): Reset get_id.
        (folder_browser_new): Set get_id of the get_folder task.
        (folder_browser_init): Init get_id.
        (folder_browser_destroy): IF we have outstanding 'get folder' op,
        cancel it.

svn path=/trunk/; revision=14323
2001-10-29 05:06:28 +00:00
8
4229e6849d Remove uic, kill dumb warning.
2001-10-28    <NotZed@Ximian.com>

	* folder-browser-ui.c (fbui_sensitize_timeout): Remove uic, kill
	dumb warning.

	* mail-autofilter.c (mail_filter_rename_uri): Implement function
	for filters to keep track of uri's being renamed.
	(mail_filter_delete_uri): Similarly for deleting uri's.  Note that
	these functions are just noops though.

	(real_flush_updates): Also rename and delete uri's from filters.

	(mls_delete_folder): Unref the store when done.
	(mls_rename_folder): Fix implementation, shell already created
	destination folder, so we can't just rename :(

	(xfer_folder): Manually call rename code, since the shell will do
	a remove/add later on, AND there's no way we can determine the new
	path from the crock of an api we have to work with.

svn path=/trunk/; revision=14291
2001-10-28 10:53:02 +00:00
8
4689dccf16 Implemented. (mail_vfolder_rename_uri): We do want to check renamed uri's
2001-10-28    <NotZed@Ximian.com>

        * mail-vfolder.c (mail_vfolder_rename_uri): Implemented.
        (mail_vfolder_rename_uri): We do want to check renamed uri's from
        vstores.
        (mail_vfolder_delete_uri): Same.
        (store_folder_renamed): Fix the folder hash at the same time.

        * mail-folder-cache.c (real_flush_updates): Pass the rename event
        to vfolder rename uri.

        * mail-local.c (mail_local_folder_reconfigure): Change the store
        path to be same as parent + mbox to be full path.
        (mls_delete_folder): Change store path to be parent path, and mbox
        to be full path.
        (mail_local_folder_reconfigure): Fix a leak of tmpname.

        * component-factory.c (xfer_folder): Only do a rename if we have
        remove set, cleaned up logic a bit.
        (idle_quit): Put the components still active check last last of
        all.
        (storage_create_folder): IF we have a fragment, use that as part
        part for parent.

svn path=/trunk/; revision=14276
2001-10-28 05:11:53 +00:00
6
8f8b24c737 Changed to open the source store from '/', so we can do renames across
2001-10-26    <NotZed@Ximian.com>

        * mail-local.c (mlf_set_folder): Changed to open the source store
        from '/', so we can do renames across directories.  Of course,
        this doesn't quite work with different filesystems, but we'll
        assume this isn't a problem we're going to have.
        (mail_local_folder_get_type): Setup parent_class.
        (mlf_rename): Implement folder rename call, rename internal data.

        Is this a security issue?  Well, not really, no more than anything
        else.

        * mail-folder-cache.c (mail_note_store): Listen to rename event.
        (store_folder_renamed): Function to handle it, empty.
        (mail_note_store_remove): Unhook from rename event.
        (mail_note_folder): Hook onto renamed event.
        (unset_folder_info): Unhook from renamed event.
        (folder_finalised): Lock around update.
        (folder_deleted): Lock around update.
        (real_flush_updates): If we have a path to remove remove it.
        (rename_folders): Scan folderinfo's, if we can find ones renamed,
        rename them, otherwise add them.

        * component-factory.c (owner_unset_cb): Use a timeout not an idle handler.
        (storage_xfer_folder): Implementation of xfer_folder signal
        handler, so we can rename imap/vfolders/etc.

svn path=/trunk/; revision=14205
2001-10-27 06:02:04 +00:00
c0cddd6d1d Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14191
2001-10-27 00:47:22 +00:00
5
cab9406217 So apparently the uicomp can just 'vanish' while we're using it. Joy. Take
2001-10-25    <NotZed@Ximian.com>

	* folder-browser-ui.c (fbui_sensitize_timeout): So apparently the
	uicomp can just 'vanish' while we're using it.  Joy.  Take care of
	that case here, fixes #13482.
	(fbui_sensitise_item): Check here too just for kicks.

	* mail-folder-cache.c (store_finalised): If we can't destroy our
	async event, then queue another one to do it.
	(store_finalised_finish): And handle it here, until we can, then
	free it.
	(mail_note_store): Queue an async event to get folderinfo, dont
	use mail_get_folderinfo.
	(update_folders_get): thread-async event to retrieve the
	folderinfo, and build it, then queues gui-async event to update
	the gui.
	(add_unmatched_info): Taken from mail-ops, adds unmatched if
	required.
	(add_vtrash_info): From mail-ops, add trash if required.
	(update_folders): Thread async event to update gui.
	(mail_note_store): Ref the store and storage when created.
	(update_1folder): Changed to assume we have info_lock, and store
	updates in an updates list.
	(setup_folder): Same.
	(folder_changed): Changed to call update_1folder directly.
	(real_folder_changed): Removed.
	(mail_note_folder): Changed to call update_1folder directly.
	(real_note_folder): Removed.
	(store_folder_subscribed): Call setup_folder directly.
	(real_folder_created): Removed.
	(real_flush_update): Function that actually does the updates in
	the gui thread.
	(mail_note_store): Go back to using mail_get_folderinfo.
	(update_folders): Fixed upf ro changed api's.
	(unset_folder_info): Changed to queue pending updates.
	(real_folder_deleted): Removed.
	(store_folder_unsubscribed): Do the removal work directly.
	(mail_note_store): Dont link to finalised event of store - we now
	ref it.
	(mail_note_store_remove): If we have any pending updates, clear
	them out.  Also cancel any pending folderinfo retrieve operations.
	(update_folders): Remove our update from the storeinfo list, if it
	still exists.
	(update_1folder): Make 'sent folder shows all counts' optional via
	an environmental variable EVOLUTION_COUNT_SENT for all those
	bloody whinging lusers out there.
	(mail_note_store_remove): Unref the storage when done.

	* mail-mt.c (mail_async_event_emit): If we're in main and have a
	gui task, set it to run via an idle function.
	(idle_async_event): Wrapper for calling do_async_event from idle
	function, and freeing the message when done.
	(idle_async_event): Call mail_msg_free not free on the finished
	message.

	* component-factory.c (mail_remove_storage): Destroy the storage
	async.
	(store_disconnect): This does the work.
	(free_storage): Un-note the store when we remove it, so the store
	noting code can unref things properly.
	(idle_quit): Return false when done, dont loop.

2001-10-24    <NotZed@Ximian.com>

	* component-factory.c (owner_set_cb): Setup an async_event
	handler.
	(idle_quit): Try to destroy the async_event, or keep dropping out
	if it can't (deadlock).

	* mail-mt.c (do_async_event): Set the threadid of the thread we're
	running in so we know its running/which thread its in.
	(mail_async_event_emit): Added new argument 'type' which is the
	type of thread to execute against, gui or another one.  Fixed all
	callers.
	(mail_async_event_destroy): Return -1 if this operation will fail
	(deadlock possibility).  If we're in the thread of the task
	we're going to wait for, then return a failure (since we will
	deadlock).
	(mail_async_event_emit): Chagned to use MailAsyncFunc type as the
	function type, which just takes 3 void args, change args to suit.

	* mail-folder-cache.c (mail_note_store): Record the pending update
	events in a pending list.  We should really be able to use an
	async event for this, but that doesn't return to the gui loop when
	done :-/
	(update_folders): Remove from pending update when done.

svn path=/trunk/; revision=14101
2001-10-25 21:21:33 +00:00
9
3e6cd9a7e5 Free folders_uri. (real_folder_deleted): If folder is deleted, remove it
2001-10-19    <NotZed@Ximian.com>

	* mail-folder-cache.c (store_finalised): Free folders_uri.
	(real_folder_deleted): If folder is deleted, remove it from the
	hashtables.

	* subscribe-dialog.c (get_short_folderinfo_get): Remove the
	register/unregister, they're already done above us.

	* mail-vfolder.c
	(mail_vfolder_delete_uri): Dont do any work to remove the actual
	folder from the vfolder (we'd have to look it up first), let the
	vfolder remove it itself.  Just update the rules.

svn path=/trunk/; revision=13787
2001-10-19 05:40:42 +00:00
8
ae5590f88d Added remove flag - its not adduri, its removeuri, its less typing than
2001-10-18    <NotZed@Ximian.com>

        * mail-vfolder.c (vfolder_adduri): Added remove flag - its not
        adduri, its removeuri, its less typing than creating a removeuri.
        (vfolder_adduri_do): Implement the remove flag.
        (mail_vfolder_remove_uri): Changed to mail_vfolder_delte_uri, to
        indicate its actually been deleted.
        (mail_vfolder_add_uri): Added remove flag.
        (rule_changed): When adding existing folders to a new rule, strdup
        the list data.

        * mail-folder-cache.c (store_finalised): Unhook from all events
        when done.
        (mail_note_store_remove): Remove a store from being noted.
        (free_folder_info): Also if we have a folder, unhook all events.
        Also remove the uri from vfolders.
        (mail_note_folder): Remove warning about adding folders to stores
        that aren't added yet - we might actually be removing the store.

        * component-factory.c (mail_remove_storage): Call
        mail_note_store_remove when we remove the storage.

svn path=/trunk/; revision=13782
2001-10-19 00:45:02 +00:00
7
a31ef049c0 Clone the folderinfo before passing to async event. (real_folder_created):
2001-10-17    <NotZed@Ximian.com>

        * mail-folder-cache.c (store_folder_subscribed): Clone the
        folderinfo before passing to async event.
        (real_folder_created): Free when done.
        (store_folder_unsubscribed):
        (real_folder_deleted): And same here.

        * mail-ops.c (mail_expunge_folder): Use the queued thread for
        expunging folders.

svn path=/trunk/; revision=13741
2001-10-17 22:45:18 +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
f620356a6f Call mail_vfolder_shutdown.
2001-10-15  Jeffrey Stedfast  <fejj@ximian.com>

	* component-factory.c (owner_unset_cb): Call
	mail_vfolder_shutdown.

	* mail-vfolder.c (mail_vfolder_shutdown): Unref all of our
	VFolders.

	* mail-folder-cache.c (real_note_folder): Remember to unref the
	folder before returning if we have already noted this folder.

svn path=/trunk/; revision=13682
2001-10-15 20:18:08 +00:00
a2db1f2033 No longer need to pass folder display name to storage update_folder
* mail-folder-cache.c (update_1folder): No longer need to pass
	folder display name to storage update_folder methods.
	(setup_folder, free_folder_info): Meaning we no longer need to
	keep track of it.

	* evolution-outlook-importer.[ch], evolution-mbox-importer.[ch]:
	These copies are cruft. The real ones are in importers/.

svn path=/trunk/; revision=13589
2001-10-11 18:59:36 +00:00
9
b620893135 Ref folder so it hangs around till we're done with it.
2001-10-09    <NotZed@Ximian.com>

        * mail-folder-cache.c (folder_changed): Ref folder so it hangs
        around till we're done with it.
        (real_folder_changed): Unref folder when we are done with it.
        Should fix #11981.

svn path=/trunk/; revision=13543
2001-10-10 01:39:56 +00:00
5
e2aaec85d0 reformatted the menu tables so they're a bit more bloody readable.
2001-10-05    <NotZed@Ximian.com>

        * folder-browser.c: reformatted the menu tables so they're a bit
        more bloody readable.

        * mail-folder-cache.c (mail_note_store): Hook into
        subscribed/unsubscribed events.  Only 'add/remove' folders from
        the add/removed events if we aren't subscribed, otherwise use the
        subscribed events.  Rest of fix for #11831

svn path=/trunk/; revision=13472
2001-10-05 21:50:12 +00:00
4
b4d1e6b70e Show "nn sent" as total in sent folder, rather than just 'total'.
2001-10-04    <NotZed@Ximian.com>

        * folder-browser.c (update_status_bar): Show "nn sent" as total in
        sent folder, rather than just 'total'.

        * mail-folder-cache.c (update_1folder): Also show total message
        count for sent_folder.

svn path=/trunk/; revision=13429
2001-10-05 00:21:28 +00:00
3
63fe218a16 Handle vtrash case, emit 'folder_created' event for the folder-cache to
2001-10-03    <NotZed@Ximian.com>

        * mail-local.c (local_storage_new_folder_cb): Handle vtrash case,
        emit 'folder_created' event for the folder-cache to work, etc.

svn path=/trunk/; revision=13387
2001-10-03 21:10:12 +00:00
3
cb9d644a2e Dont wait for event to finish before returning. This could however mean we
2001-10-03    <NotZed@Ximian.com>

        * mail-folder-cache.c (folder_changed): Dont wait for event to
        finish before returning.  This could however mean we process it
        after things have vanished below us?  Fixes another case of ctrl-d
        deadlock.

        * mail-ops.c
        (remove_folder_get): Freeze/thaw around deleting all messages in
        folder.

svn path=/trunk/; revision=13382
2001-10-03 18:48:47 +00:00
8
4b14db5520 Emit folder_deleted event. (remove_find_path): Fix, compare against path,
2001-09-28    <NotZed@Ximian.com>

	* mail-local.c (mail_local_store_remove_folder): Emit
	folder_deleted event.
	(remove_find_path): Fix, compare against path, not full_name.

	* mail-tools.c (mail_tool_uri_to_folder): Dont
	vfolder_register_source anymore.

	* mail-vfolder.c (rule_changed): Changed to access
	mail_fodler_cahce to find out if the folder exist yet before
	trying to open them, also use the cache as a cache so we dont have
	to open the folder if its already been opened.
	(vfolder_register_source, register_source): Removed.
	(source_finalise): Removed,
	(check_source): Removed.  All handled through diff mechanism.
	(mail_vfolder_add_uri): New function, records uri's of available
	folders, and adds them to any active vfolders if required.
	(mail_vfolder_remove_uri): New function, removes a uri from
	available folders, and checks any rules to see fi they need
	updating.
	(vfolder_adduri): New async function to add a uri to all vfolders
	that need it.
	(store_folder_deleted): oops!  free user, not rule!!

	* mail-folder-cache.c: Add uri->folderinfo hashtable, and the
	store from which they come into the store info struct.
	Add uri to the folder_info.
	(setup_folder): Store the uri in the folderinfo.
	(setup_folder): And the uri in the folder_uri hashtable.
	(mail_note_store): Store the store in the storeinfo, and setup the
	folders_uri hashtable via the store's hash functions.
	(setup_folder): Call mail_vfolder_add_uri to note this newly setup
	folder uri.
	(store_folder_deleted): Proxy call to main thread.
	(real_folder_deleted): And tell the vfolder to remove this uri
	from its folder list.
	(setup_folder): Dont call vfolder_add_uri if noselect is set on
	the uri.

2001-09-27    <NotZed@Ximian.com>

	* mail-vfolder.c: Removed vfolder_info struct, vfolder_storage.
	Neither used anymore.

svn path=/trunk/; revision=13242
2001-09-28 23:54:30 +00:00
7
0ac20c6064 No such event finalized! Its finalize. (mail_note_store): "
2001-09-27    <NotZed@Ximian.com>

        * mail-folder-cache.c (real_note_folder): No such event finalized!
        Its finalize.
        (mail_note_store): "

        Fixed dan's comment a bit, info != NULL for folder_created, info==
        NULL for changed.

2001-09-26    <NotZed@Ximian.com>

        * mail-local.c (mlf_set_message_flags): Proxy the
        set_message_flags call too.  Doesn't fix the 'local folder counts
        dont update' problem, but its more correct.

svn path=/trunk/; revision=13200
2001-09-27 22:34:12 +00:00
3bf97142fa Add a big comment explaining unread message counts so no one can mess them
* mail-folder-cache.c: Add a big comment explaining unread message
	counts so no one can mess them up again in the future. :-)
	(update_1folder): If info->unread_message_count is -1, don't do
	anything.

	* component-factory.c (component_factory_init): warn and exit if
	oaf_active_server_register returns OAF_REG_ALREADY_ACTIVE.

svn path=/trunk/; revision=13155
2001-09-26 19:28:14 +00:00
36da2069e0 The folder-info needs to take priority over the folder because of the way
2001-09-25  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-folder-cache.c (update_1folder): The folder-info needs to
	take priority over the folder because of the way IMAP works (which
	is that it doesn't actually update the folders until you SELECT
	them and so when you do get_folder_info(), it doesn't actually
	SELECT the folders, it just STATUS's them).

svn path=/trunk/; revision=13133
2001-09-25 23:09:45 +00:00
1
b2e7adf9b8 Take a new argument 'done' that can callback when complete. Fixed callers
2001-09-21    <NotZed@Ximian.com>

        * mail-folder-cache.c (mail_note_store): Take a new argument
        'done' that can callback when complete.  Fixed callers
        appropriately.

        * mail-ops.c (mail_update_subfolders): Removed.  Isn't used
        anymore.

        * mail-send-recv.c (receive_update_got_store): Remove call to
        mail_update_subfolders.

svn path=/trunk/; revision=13044
2001-09-21 05:58:31 +00:00
0
096dad5a2a trigger a folder changed event, so the folderinfocache stuff has a chance
2001-09-20    <NotZed@Ximian.com>

        * component-factory.c (got_folder): trigger a folder changed
        event, so the folderinfocache stuff has a chance to see if this is
        the outbox_folder or not.

        * mail-folder-cache.c (update_1folder): If we have -1 unread
        count, pass that as 0 to the shell so it doesn't go bolding.
        (setup_folder): Same.

svn path=/trunk/; revision=13041
2001-09-21 03:10:02 +00:00
0
a68b568135 Update the status bar here, assuming we've just been activated.
2001-09-20    <NotZed@Ximian.com>

	* folder-browser.c (folder_browser_set_shell_view): Update the
	status bar here, assuming we've just been activated.

	* mail-ops.c (add_vtrash_info): Scan whole list, rather than
	missing the last one.  Also dont assume its always the last,
	otherwise we could lose following folders.

	* mail-vfolder.c
	(all): d(x) out debug printfs

	* mail-folder-cache.c
	(update_1folder): If its a vtrash folder, or the outbox_folder,
	and we have a folder, then make the 'count' the total message
	count, not unread messages count.

svn path=/trunk/; revision=13036
2001-09-21 00:56:49 +00:00
0
586f083c3a Lock around hashtable/list manipulation. Also dont try scan vfolder_hash
2001-09-20    <NotZed@Ximian.com>

	* mail-vfolder.c (vfolder_register_source): Lock around
	hashtable/list manipulation.  Also dont try scan vfolder_hash if
	it hasn't been setup yet.
	(source_finalise): Lock around list access.
	(rule_changed): Lock around hash access.
	(context_rule_added): Lock around hash access.
	(context_rule_removed): "
	(rule_changed): Lock around list access.

	* mail-local.c (storage_listener_startup): Fix for api change.
	(local_storage_new_folder_cb): Dont skip over leading / in path.
	(local_storage_removed_folder_cb): ditto.

	* mail-folder-cache.c (create_folders): No longer pass prefix
	between recursive calls - we have the path in the folderinfo.
	(setup_folder): No longer take path arg, we get it from
	folderinfo.
	(mail_note_folder): No longer take path arg, we use
	folder->full_name to key the folder table.
	(mail_note_store): Consolidate note_store interface, pass storage
	or corba_storage to it.
	(mail_note_local_store): Removed.

	* mail-ops.c
	(add_unmatched_info): Scan for unmatched name and re-title.

svn path=/trunk/; revision=13023
2001-09-20 22:59:11 +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
0
55690284e1 Dont special case file: url's anymore.
2001-09-20    <NotZed@Ximian.com>

        * mail-tools.c (mail_tool_uri_to_folder): Dont special case file:
        url's anymore.

        * mail-local.c: Add real_path to MailLocalFolder.
        (mail_local_folder_construct): Added path argument, setup
        full_name == path, and real_path == full_name.
        (mls_get_folder): First lookup folderinfo to confirm this folder
        exists, then use that to properly construct the folder paths.
        (mail_local_folder_reconfigure): Use real_path not full_name to
        create the store uri.
        (mlf_set_folder): Use real_path not folder_name to get real uri
        path.

2001-09-19    <NotZed@Ximian.com>

        * mail-folder-cache.c (setup_store): Use the wrong spelling of
        finalised for the event hook.
        (real_note_folder): Use the wrong spelling of finalised for the
        event hook.
        (free_folder_info): Free the full_name parameter.
        (setup_folder):
        (real_note_folder): Key the folderinfo table on full_name, not
        path.

svn path=/trunk/; revision=13014
2001-09-20 19:34:58 +00:00
9
73c74dd70d General cleanup of mail debug printfs.
2001-09-19    <NotZed@Ximian.com>

        * General cleanup of mail debug printfs.

        * mail-folder-cache.[ch]: Completely rewritten.  Removed all calls
        to the old code everywhere they were used.  Nuff said.

        * folder-browser.h: Add shell_view to folder_browser & api to set
        it.

        * folder-browser-factory.c (control_activate): Set the shell-view
        on the folder_browser.
        (control_deactivate): And clear it here.

        * folder-browser.c (folder_browser_destroy): Unhook from changed
        events on the folder before giving it away.
        (got_folder): Hook onto the folder-changed events.
        (folder_changed): Event hook proxy for folder_changed events
        (main_folder_changed): And the main code version.
        (update_status_bar): And the one that actually does the work.
        (on_selection_changed): Also call update_status_bar() to update
        the selection count.
        (folder_browser_set_shell_view): Implement function to set the
        shell_view on the folder_browser.
        (folder_browser_destroy): Release the shell_view here too.

        * mail-tools.c (mail_tool_uri_to_folder): Dont 'note' the new
        folder if its from a file: url, this is handled by hte local store
        (yeeruughck).

        * mail-local.c (mls_init):
        (free_info):
        (mls_finalise): Setup init/finalise funcs for the folderinfo hash.
        (local_storage_removed_folder_cb): re-enable.

2001-09-18    <NotZed@Ximian.com>

        * mail-local.c (MailLocalStore): Add a hash table to store
        uri<>folderinfo data.
        (mail_local_store_add_folder): Add a new folderinfo to our hash.
        (mail_local_store_remove_folder): Remove a folder by uri.
        (storage_listener_startup): Add this store to those monitored by
        the folder tree.

svn path=/trunk/; revision=12974
2001-09-19 08:29:13 +00:00
d0196161ec Don't set the folderinfo's unread count to 0 when camel reports -1, since
* mail-folder-cache.c (mail_folder_cache_note_folderinfo): Don't
	set the folderinfo's unread count to 0 when camel reports -1,
	since that may overwrite a valid unread count from before.
	(get_folder_info): Do it here instead when first creating a new
	folderinfo structure.
	Should fix bug #1756.

svn path=/trunk/; revision=12768
2001-09-11 19:29:13 +00:00
0
c7e1b2cbb0 Dynamically create the folder type list from camel. (reconfigure_clicked):
2001-09-10    <NotZed@Ximian.com>

        * mail-local.c (mail_local_reconfigure_folder): Dynamically create
        the folder type list from camel.
        (reconfigure_clicked): And change code to handle changes.

2001-09-10    <NotZed@Ximian.com>

        * merged mail_local patch from peterw.  Many changes.

svn path=/trunk/; revision=12759
2001-09-11 00:32:20 +00:00