aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
Commit message (Collapse)AuthorAgeFilesLines
* ** See bug 234008Parthasarathi Susarla2005-12-201-1/+3
| | | | | | | | | | | | | 2005-12-20 Parthasarathi Susarla <sparthasarathi@novell.com> ** See bug 234008 * em-folder-tree-model.c: * mail-folder-cache.c: Make sure that the Draft folder highlights the number of messages in it svn path=/trunk/; revision=30891
* em-folder-browser.c em-folder-view.c em-format-html.cTor Lillqvist2005-12-181-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-12-18 Tor Lillqvist <tml@novell.com> * em-folder-browser.c * em-folder-view.c * em-format-html.c * em-format-html-display.c * em-mailer-prefs.c * em-message-browser.c * em-migrate.c * em-subscribe-editor.c * em-sync-stream.c * em-utils.c * em-vfolder-editor.c * em-vfolder-rule.c * mail-autofilter.c * mail-component.c * mail-config.c * mail-folder-cache.c: Use gstdio wrappers. Construct pathnames of glade, xml, etspec and png files at run-time. Use g_filename_{to,from}_uri(). * em-folder-browser.c (emfb_init) * em-folder-view.c (emfv_finalise) * em-message-browser.c (emmb_init): As EMFolderView::ui_files now always is a list of filenames constructed with g_build_filename(), use g_free() on each list entry before calling g_slist_free() on the list. * em-folder-tree-model.c (em_folder_tree_model_load_state): Use e_xml_parse_file(). * em-migrate.c: Bypass all the code for upgrading from 1.x on Win32. (emm_setup_initial): Use GDir instead of dirent. * em-sync-stream.c * mail-folder-cache.c: Use pthread_equal() to compare pthread_t values. * em-vfs-stream.c: No EINPROGRESS or ELOOP on Win32. svn path=/trunk/; revision=30854
* cast warning away.Not Zed2005-08-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 2005-08-23 Not Zed <NotZed@Ximian.com> * mail-tools.c (mail_tool_uri_to_folder): cast warning away. * mail-folder-cache.c: include missing header for e_filename_make_safe. * em-junk-hook.h: Fix some header includes, fix the include guard to use the right name. (EMJunk): Ugh, this is an object, properly derive from it! How did this work? * em-junk-hook.c (em_junk_check_junk): fix bool conversion. * em-format-html-display.c (efhd_bar_popup_position): another wraning, why this crap isn't in the attachment bar like i said it should be, i'll never know. (efhd_xpkcs7mime_viewcert_foad): only define if used. * em-account-editor.c (emae_defaults_page): attempt to fix parentheses (emae_security_page): fix conditional compilation warnings. svn path=/trunk/; revision=30214
* ** See #232499.Not Zed2005-08-121-3/+43
| | | | | | | | | | | 2005-08-11 Not Zed <NotZed@Ximian.com> ** See #232499. * mail-folder-cache.c (rename_folders): rename view meta-data along with the folder. svn path=/trunk/; revision=30093
* if we get a null default, then set "" on the entry. (emae_option_entry):Not Zed2005-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-07-21 Not Zed <NotZed@Ximian.com> * em-account-editor.c (emae_option_entry): if we get a null default, then set "" on the entry. (emae_option_entry): set the default value on the url if it doesn't exist already. 2005-07-20 Not Zed <NotZed@Ximian.com> * mail-send-recv.c (refresh_folders_desc, refresh_folders_get) (refresh_folders_got, refresh_folders_free, get_folders) (receive_update_got_folderinfo, receive_update_got_store): refresh all the folders manually and directly. * mail-folder-cache.c (setup_folder): propagate even -1 unread counts, they get ignored later. * em-composer-utils.c (emu_handle_receipt_message) (em_utils_handle_receipt): use getmessagex too, so we can always clear any error. * em-folder-view.c (emfv_message_selected_timeout) (emfv_list_done_message_selected): use getmessagex and do something meaninful with the error. * mail-ops.c (mail_get_messagex): added new get message which returns an exception. 2005-07-19 Not Zed <NotZed@Ximian.com> * mail-tools.c (mail_tool_uri_to_folder): dont get the service connected, it will connect if it needs to. * mail-ops.c (get_folderinfo_get): * em-folder-utils.c (emft_copy_folders__copy) (emfu_delete_folders): * em-folder-tree.c (emft_get_folder_info__get): Always request subscribed folders, if the backend doesn't implement it it will ignore it. 2005-07-13 Not Zed <NotZed@Ximian.com> * mail-send-recv.c (mail_autoreceive_init, auto_online): listen to session online events, and if we are online, trigger an auto-receive of all auto-check accounts. 2005-07-11 Not Zed <NotZed@Ximian.com> * mail-send-recv.c (auto_account_commit): force an update immediately if we're setting up the timeout to start with. * em-folder-tree-model.c (em_folder_tree_model_set_unread_count): noop if the unread count < 0. (em_folder_tree_model_set_folder_info): only set the unread count if we actually have one. * em-folder-tree.c (emft_tree_row_expanded): get the folder list 'fast'. * mail-ops.c (get_folderinfo_get): get the folder list 'fast'. svn path=/trunk/; revision=29822
* Handle the CamelOfflineStore case just like the CamelDiscoStore case.Jeffrey Stedfast2005-01-071-22/+27
| | | | | | | | | | | | | | 2005-01-06 Jeffrey Stedfast <fejj@novell.com> * mail-folder-cache.c (mail_note_store): Handle the CamelOfflineStore case just like the CamelDiscoStore case. * mail-ops.c (prep_offline_do): Since we can't kill off CamelDisco* (groupwise is using it), we have to handle both CamelOfflineFolder and CamelDiscoFolder for now. (set_offline_do): Same. svn path=/trunk/; revision=28256
* added hook docs, and cleaned up some of the hook point names.Not Zed2004-10-281-2/+1
| | | | | | | | | | | | | | | | | | | | 2004-10-28 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (real_flush_updates): * em-message-browser.c (em_message_browser_new): * em-mailer-prefs.c (em_mailer_prefs_construct): * em-format-html-display.c (efhd_attachment_popup): * em-folder-view.c (emfv_popup, emfv_list_done_message_selected) (emfv_format_popup_event): * em-folder-tree.c (emft_popup): * em-folder-properties.c (emfp_dialog_got_folder): * em-folder-browser.c (em_folder_browser_new): * em-composer-utils.c (em_utils_reply_to_message): * em-composer-prefs.c (em_composer_prefs_construct): * em-account-editor.c (em_account_editor_construct): added hook docs, and cleaned up some of the hook point names. svn path=/trunk/; revision=27749
* duh, they're camel not gobjects.Not Zed2004-10-221-1/+7
| | | | | | | | | | | 2004-10-22 Not Zed <NotZed@Ximian.com> * em-event.c (eme_target_free): duh, they're camel not gobjects. * em-folder-view.c (emfv_list_done_message_selected): added a message.reading event. svn path=/trunk/; revision=27694
* Merged notzed-eplugin-2-branch to head.Michael Zucci2004-09-201-0/+12
| | | | svn path=/trunk/; revision=27300
* ** See #61958.Not Zed2004-07-291-27/+42
| | | | | | | | | | | | | | | | | 2004-07-28 Not Zed <NotZed@Ximian.com> ** See #61958. * mail-folder-cache.c (real_flush_updates): remove the soreinfo lookup, it isn't used anywhere anymore. (mail_note_folder): hook onto the events outside of the lock, and don't pass the mfi pointer anymore. (mail_note_store): hook onto the events outside of the lock. (folder_changed, folder_finalised, folder_renamed): lookup the mfi if needed, it is no longer passed to the callback. (unset_folder_info): change unhook calls for new parameters. svn path=/trunk/; revision=26764
* Disable debug here too - all this code has been working fine.Jeffrey Stedfast2004-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | 2004-05-28 Jeffrey Stedfast <fejj@novell.com> * em-folder-tree.c (d): Disable debug here too - all this code has been working fine. * em-folder-selector.c (d): Disable debug spew here too (not that this debug was ever seen since it never hit those conditions). * mail-folder-cache.c (d): Disable debug here too. * em-folder-tree-model.c: Disable debug spewage that we don't need anymore. The amount of debug spewage on the console is getting to be too much to find anything. * em-folder-tree.c (emft_expand_node): Use p+1 as the full_name rather than p. Fixes bug #59187. svn path=/trunk/; revision=26125
* set the default selection to inbox.Not Zed2004-05-261-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-05-26 Not Zed <NotZed@Ximian.com> * importers/evolution-mbox-importer.c (create_control_fn): set the default selection to inbox. * importers/evolution-outlook-importer.c (folder_selected) (create_control_fn): copied from mbox importer. fixes a crash & lets you choose the target folder. 2004-05-25 Not Zed <NotZed@Ximian.com> * mail-component.c (mc_add_local_store_done): removed, now redundant. * em-folder-tree.c (em_folder_tree_set_selected): fix for path changes. * em-folder-tree-model.c (em_folder_tree_model_set_unread_count): change to use full name rather than path name. * em-folder-tree-model.h: renamed path_hash to full_hash. * em-folder-tree-model.c (folder_subscribed): dont use g_path_get_dirname here, it is os dependent, we want / always. (full_hash_free): rename from path_hash free. svn path=/trunk/; revision=26090
* put note_store back in. Quick hack to fix the issue of folders beingNot Zed2004-05-221-5/+0
| | | | | | | | | | | | | 2004-05-22 Not Zed <NotZed@Ximian.com> * mail-tools.c (mail_tool_uri_to_folder): put note_store back in. Quick hack to fix the issue of folders being opened before we hook onto folder_created. * mail-folder-cache.c: remove 'name' from update struct, not used anymore svn path=/trunk/; revision=26043
* ** Another unread count bug, #58814.Not Zed2004-05-221-0/+10
| | | | | | | | | | | | | | | | | | 2004-05-22 Not Zed <NotZed@Ximian.com> ** Another unread count bug, #58814. * mail-vfolder.c (context_rule_added): * mail-tools.c (mail_tool_uri_to_folder): * mail-component.c (mc_add_local_store_done): don't call mail note folder anymore, fix up headers. * mail-folder-cache.c (store_folder_opened) (mail_note_store_remove, mail_note_store): handle the new store:folder_opened signal. Don't need the mail_note_folder hack anymore, mail_tool_uri_to_folder slowly does less. svn path=/trunk/; revision=26042
* no new message test if its the drafts folder too.Not Zed2004-05-181-0/+1
| | | | | | | | | | | | | 2004-05-18 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (folder_changed): no new message test if its the drafts folder too. * mail-vfolder.c (vfolder_adduri_desc): use a nicer, account-based formatter for folder names. Hmm, that was a good waste of time. For #55412. svn path=/trunk/; revision=25955
* don't emit new mail if its any vfolder, not just vtrash folder. #56350.Not Zed2004-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-05-18 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (folder_changed): don't emit new mail if its any vfolder, not just vtrash folder. #56350. * em-folder-view.c (emfv_list_done_message_selected): run enable_menu's to make sure we're up to date. #58352. ** crappy hacks for #58385. * em-folder-selection-button.c (em_folder_selection_button_clicked): leave Ok button for this selection. * em-folder-selection.c (em_select_folder): added oklabel here too. * em-folder-selector.c (em_folder_selector_new) (em_folder_selector_construct, em_folder_selector_create_new): Added oklabel- text for ok label. (em_folder_selector_create_new): Set the ok label to Create. * em-message-browser.c (emmb_set_message): don't mark message seen if user has disabled auto-mark seen feature. #58629. * em-format.c (em_format_part): if we have no content-type header, then we get no mime-type set, so assume text/plain. #58470. svn path=/trunk/; revision=25951
* enabled some unread-count debug spewageJeffrey Stedfast2004-04-141-2/+2
| | | | svn path=/trunk/; revision=25439
* VJUNK_FOLDER's dont exist, they're VTRASH folders now.Not Zed2004-04-081-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-04-08 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c: (update_1folder): VJUNK_FOLDER's dont exist, they're VTRASH folders now. * em-folder-view.c: remove message_changed stuff from camel folder stuff. * mail-component.c (mail_component_init): don't setup the search context here, wait till its requested. Fixes #56672. 2004-04-07 Not Zed <NotZed@Ximian.com> * mail-component.c (view_changed_cb): hook to update the info label when the folderview changes. * em-folder-view.c (emfv_class_init): added 2 signals 'loaded' and 'changed'. For when a folder is set/cleared or when some state changes. (emfv_set_folder): emit LOADED signal when we set the folder. (emfv_list_message_selected): emit changed event. (emfv_gui_folder_changed): emit changed event. svn path=/trunk/; revision=25369
* ref the emfoldertree in our thread message. (em_folder_tree_set_selected):Not Zed2004-04-061-1/+1
| | | | | | | | | | | | | | | | | 2004-04-06 Not Zed <NotZed@Ximian.com> * em-folder-tree.c (emft_tree_row_expanded): ref the emfoldertree in our thread message. (em_folder_tree_set_selected): same. (emft_get_folder_info__free): unref it. * mail-folder-cache.c (ping_store): use thread_queued_slow not thread_queued - we dont care when it runs. * em-folder-view.c (emfv_set_folder_uri): use thread_new for getting the folder, we do elsewhere, and it aids interactivity. svn path=/trunk/; revision=25330
* ** See bug # 56402.Not Zed2004-04-051-2/+6
| | | | | | | | | | | | | | 2004-04-05 Not Zed <NotZed@Ximian.com> ** See bug # 56402. * mail-folder-cache.c (update_folders): if we're cancelled, noop. (mail_note_store_remove): mark the update data cancelled. * mail-ops.c (get_folderinfo_got): Removed the meaningless comment here. svn path=/trunk/; revision=25312
* Fixes bug #37416Jeffrey Stedfast2004-04-031-3/+8
| | | | | | | | | | | | | | | | 2004-04-02 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #37416 * mail-folder-cache.c (update_1folder): Same as below. Also add vJunk fodlers to the list of folders that we display the total count for (as discussed on the mailing lists). * em-folder-tree-model.c (em_folder_tree_model_set_folder_info): Use 'total - deleted' as the count for Outbox rather than just the total count. svn path=/trunk/; revision=25305
* pass the raw header in instead of name and value. (efh_format_headers): ifNot Zed2004-03-111-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-03-11 Not Zed <NotZed@Ximian.com> * em-format-html.c (efh_format_header): pass the raw header in instead of name and value. (efh_format_headers): if we have specific headers to show, iterate over all headers and print out all matching ones, so duplicate headers are properly displayed. Related to #55298. * em-folder-selector.c (em_folder_selector_construct): dont set this to be modal. otherwise you can't click on error popups. duh. 2004-03-08 Not Zed <NotZed@Ximian.com> * em-folder-selection-button.c (em_folder_selection_button_clicked): don't let the user select virtual/vtrash folders or non-selectable folders. * mail-component.c (impl_createControls): disable selection of non-select rows. * em-folder-selector.c (em_folder_selector_create_new): exclude folders with noinferiors set. * em-folder-tree.c (folder_tree_new): add folder tree arg, hook onto the selection funciton for the tree selection. (emft_select_func): selection override function. allow certain things to be excluded. (em_folder_tree_set_excluded): api to set what is excluded from the selectability. (emft_tree_row_activated): call emft_select_func check to see if this row is excluded before emitting an activated signal. * em-folder-tree-model.c (em_folder_tree_model_set_folder_info): save folder info->flags in the tree store. * mail-folder-cache.c (create_folders): use tail recursion. (get_folders): tail recurse. * (*): Fixed for api changes in camel. svn path=/trunk/; revision=25020
* if we have the folder opened already, and its the outbox, then use theNot Zed2004-03-031-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-03-03 Not Zed <NotZed@Ximian.com> * em-inline-filter.c (emif_scan): * em-folder-tree-model.c (em_folder_tree_model_set_folder_info): if we have the folder opened already, and its the outbox, then use the total count instead of unread count. Bit of hack, but copies mail-folder-cache stuff. * mail-component.c (mc_add_store): renamed from mail_component_add_store, internal call. Added a done callback. (mc_add_local_store): renamed from mc_add_store, callback for local store. (mail_component_add_store): call mc_add_store to do the work. (mc_add_local_store_done): ugh, the target of all this shit - note all the default folders now they should be setup. * mail-folder-cache.c (mail_note_folder): clean up the logic a bit. was gonna do osmething else but it didn't work. 2004-03-02 Not Zed <NotZed@Ximian.com> * mail-send-recv.c (mail_send): if we're already sending, up the again count to tell it we need to re-send again. (receive_done): if we've been asked to run a send again while we were already running it, run it again to make sure we didn't miss any new messages. See bug #46839. * em-mailer-prefs.c (em_mailer_prefs_construct): update check_incoming_imap changes for merge conflicts. (settings_changed): i have no idea what these changes jeff did do, but check_incoming_imap is no longer needed, so i've deleted most of it. 2004-02-27 Not Zed <NotZed@Ximian.com> * em-format.c (emf_multipart_encrypted, emf_multipart_signed): If validation fails, display as multipart/mixed rather than unkown attachment type, and make the error a little clearer that its an error. See #52939. 2004-02-26 Not Zed <NotZed@Ximian.com> * message-list.c (regen_list_regened): NOOP if the folder has changed. * mail-session.c (mail_session_check_junk_notify): remove check_incoming_imap test. (mail_session_init): " * evolution-mail.schemas.in.in: Remove check_incoming_imap option. * mail-config.glade: Remove check incoming imap checkbox. * em-mailer-prefs.c (em_mailer_prefs_construct): remove check_incoming_imap test. (em_mailer_prefs_apply): " (settings_changed): " svn path=/trunk/; revision=24944
* switch the sense of the no select checks. TEST!Not Zed2004-02-201-3/+3
| | | | | | | | | 2004-02-20 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (unset_folder_info, setup_folder) (rename_folders): switch the sense of the no select checks. TEST! svn path=/trunk/; revision=24813
* Updated for em-popup API change (altho currently passes a dummy value).Jeffrey Stedfast2004-02-191-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | 2004-02-12 Jeffrey Stedfast <fejj@ximian.com> * em-folder-tree.c (emft_tree_button_press): Updated for em-popup API change (altho currently passes a dummy value). * em-popup.c (em_popup_target_new_folder): Check for vTrash/vJunk by checking the CAMEL_FOLDER_VIRTUAL info flags bit. (perhaps this flag should be renamed to SPECIAL? VIRTUAL might not have been a good name). Also changed to check flags & CAMEL_FOLDER_NOSELECT rather than checking the uri string for a noselect param. * mail-folder-cache.c (unset_folder_info): Instead of checking for ";noselect" in the uri, check for a CAMEL_FOLDER_NOSELECT flag on mfi->flags. (setup_folder): Copy the fi->flags to mfi->flags here. (rename_folders): Same. (setup_folder): Check fi->flags for CAMEL_FOLDER_NOSELECT here instead. (rename_folders): Same. Also gets rid of a FIXME. svn path=/trunk/; revision=24784
* ** See bug #53084 and others.Not Zed2004-01-271-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-01-27 Not Zed <NotZed@Ximian.com> ** See bug #53084 and others. * em-migrate.c (em_migrate): remove the vfolder_revert hack. * em-composer-utils.c (ask_confirm_for_only_bcc): removed unused vars. * mail-tools.c (mail_tool_get_local_inbox): removed, handled by mail_component_get_folder now. * mail-component.c (mail_component_*): Changed the api slightly. Using NULL as the component argument automatically implies you want the default component. (em_uri_from_camel, em_uri_to_camel): moved to em-utils.[ch]. Ok so it isn't namespaced right ... *shrug*. (mail_component_get_local_inbox): removed. (mail_component_get_folder): single entry point for getting standard folders. This is MT-Safe. (mail_component_get_folder_uri): single entry point for getting standard folder uri's. This is MT-Safe. (add_store): removed, moved to mail_component_add_store. (mail_component_load_store_by_uri): call mail_component_add_store directly rather than copying its code. (default_*_folder*): Removed, use accessor methods instead, fixed all callers. (setup_local_store): renamed to mc_setup_local_store, use proper url encoding too. make run-once and thread-safe. (MailComponentPrivate): Added a lock. (mail_control_new): exported properly to kill warnings. (mail_component_init): dont setup_local_store or add accounts here. (impl_createControls): setup local store/accounts here. (mail_component_peek): dont setup vfolder storage here. (mc_startup): internal function to startup stuff needed for gui operation. (setup_search_context): make run-once. (mail_component_peek_search_context): call setup_search_context incase it isn't setup yet. (impl_upgradeFromVersion): remove the local store setup hack. svn path=/trunk/; revision=24462
* change this to check the store using the provider url_cmp and just lookupNot Zed2004-01-161-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | 2004-01-16 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (storeinfo_find_folder_info): change this to check the store using the provider url_cmp and just lookup the folder name directly. folder_compare can't be used for uri's, this stuff was so broken, my fault :( ** See bug #52467. * em-folder-tree-model.c (sort_cb): handle null path (root?). * mail-vfolder.c (mail_vfolder_add_uri): map uri to euri before processing. (rule_changed): map uri to camel uri before looking up. (mail_vfolder_delete_uri): handle as euri internally. (mail_vfolder_rename_uri): " * mail-autofilter.c (vfolder_rule_from_message): map camel uri to euri before setting as vfolder source. svn path=/trunk/; revision=24266
* Update the unread count in the model if the folder got new mail.Jeffrey Stedfast2003-12-111-1/+11
| | | | | | | | | | | | | | | | | | | 2003-12-10 Jeffrey Stedfast <fejj@ximian.com> * mail-folder-cache.c (real_flush_updates): Update the unread count in the model if the folder got new mail. * em-folder-selection.c (em_select_folder): Updated. * em-folder-selection-button.c (em_folder_selection_button_clicked): Updated. * em-folder-tree-model.c (em_folder_tree_model_set_unread_count): New function to update the unread count for a folder. * mail-component.c (mail_component_peek_tree_model): Don't ref the model. Also renamed s/get/peek/ svn path=/trunk/; revision=23910
* New folder-tree widget that replaces the shell's folder-tree widget.Jeffrey Stedfast2003-11-141-76/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-11-13 Jeffrey Stedfast <fejj@ximian.com> * em-folder-tree.[c,h]: New folder-tree widget that replaces the shell's folder-tree widget. * em-folder-tree-model.[c,h]: New source files subclassing GtkTreeStore for handling the mess that is drag&drop. * em-folder-selection-button.c: Ported to use EMFolderTree. * em-folder-selection.c: Ported to use EMFolderTree. * em-folder-selector.c: Ported to use EMFolderTree. * mail-component.c: Ported to use EMFolderTree. * mail-offline-handler.c (storage_go_online): Updated to not pass a storage argument. * mail-folder-cache.c: Removed storage stuff. * mail-send-recv.c (receive_update_got_store): Don't do EStorage* stuff anymore. svn path=/trunk/; revision=23331
* don't call CAMEL_IS_VJUNK_FOLDER, it was added by mistakeRadek Doulik2003-11-131-1/+1
| | | | | | | | | 2003-11-13 Radek Doulik <rodo@ximian.com> * mail-folder-cache.c (folder_changed): don't call CAMEL_IS_VJUNK_FOLDER, it was added by mistake svn path=/trunk/; revision=23316
* merged spam filtering branchRadek Doulik2003-11-131-3/+11
| | | | svn path=/trunk/; revision=23302
* Merge new-ui-branch to the trunk.Ettore Perazzoli2003-10-221-34/+32
| | | | svn path=/trunk/; revision=22964
* ** See bug #32996Not Zed2003-09-231-1/+2
| | | | | | | | | | | | | | | | 2003-09-22 Not Zed <NotZed@Ximian.com> ** See bug #32996 * mail-folder-cache.c (real_flush_updates): don't just pass TRUE to the 'can work offline' parameter of new shell folder. ** See bug #39410 * mail-ops.c (prep_offline_do): sync all messages, not just unread or flagged ones. svn path=/trunk/; revision=22655
* Removed the new-mail-notification mess.Jeffrey Stedfast2003-08-201-13/+99
| | | | | | | | | | | | | | | | | | | | 2003-08-18 Jeffrey Stedfast <fejj@ximian.com> * mail-session.c (main_get_filter_driver): Removed the new-mail-notification mess. * mail-folder-cache.c (notify_idle_cb): New idle callback to alert the user about new mail. (notify_type_changed): New function to intercept user changes to his/her notification settings changes. (real_flush_updates): Initialise new mail notification if not yet initialised and setup an idle callback if none is already set. (update_1folder): Now takes an additional argument `new' which states whether or not the fodler got any new mail so that we may handle notify the user (if needed). (folder_changed): Pass in the number of new messages received. svn path=/trunk/; revision=22290
* add a CamelOperation for overriding status handler.Not Zed2003-08-021-3/+3
| | | | | | | | | | | | | | | | | 2003-07-29 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (mail_note_store): add a CamelOperation for overriding status handler. * mail-send-recv.c (receive_update_got_store): Pass our own cancel handle to get_folderinfo and mail_note_store. (mail_send_receive, mail_receive_uri): Same for get_store. * mail-ops.c (mail_get_store, mail_get_folderinfo): Add a CamelOperation argument, for overriding the status handler. Fixed most calles to pass NULL to use the default. svn path=/trunk/; revision=22056
* ** This and jeffs patch for #43862.Not Zed2003-06-031-8/+39
| | | | | | | | | | | | | | | | | | | | | 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
* Commented out stuff that doesn't build yet. Also fixed idl build rule.Not Zed2002-11-121-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Spawn a new thread to ping the server but only if it is connected.Jeffrey Stedfast2002-08-221-4/+55
| | | | | | | | | | | 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
* Don't bother overloading the timeout virtual methods since they don'tJeffrey Stedfast2002-08-221-3/+33
| | | | | | | | | | | | 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
* camel:Peter Williams2002-08-011-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Call camel_session_get_service instead of camel_session_get_store, asPeter Williams2002-07-251-5/+11
| | | | | | | | | | | | | | | | 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
* Propagate name changes or removes to the mail config. #15951. Doesn'tNot Zed2002-07-241-0/+3
| | | | | | | | | | | | | | | | 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
* Removed bogus static pre-declaration.Ettore Perazzoli2002-07-191-1/+0
| | | | | | | | | | | | | * 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
* ** fixes for #10781Not Zed2002-07-151-1/+3
| | | | | | | | | | | | | | | | | | | | 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
* Pass zero as the @sorting_priority to evolution_storage_new_folder().Ettore Perazzoli2002-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Pass NULL @custom_icon_name to evolution_storage_new_folder().Ettore Perazzoli2002-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Removed. The folder's deleted event isn't needed since we're listening toNot Zed2002-07-011-14/+1
| | | | | | | | | | | | | | 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
* Set the can_sync_offline property on the EFolder based on theEttore Perazzoli2002-05-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Remove "mailstorage", since it's not needed any more. (storage_activate):Dan Winship2002-03-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | * 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
* Pull up assertion change from evolution-1-0-branch to allow externalDan Winship2002-03-061-1/+1
| | | | | | | * 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
* If a related part is requested, remove it from the related undisplayedNot Zed2002-02-261-2/+4
| | | | | | | | | | | | 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
* Require gal 0.15.99.8Joe Shaw2001-10-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Argh!!! Dont free the async op data here, the async op is still running02001-10-301-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed a warning by #if 0ing out this function.Christopher James Lahey2001-10-301-1/+4
| | | | | | | | | | | | | | | 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
* Sort the folder updates first, since we dont seem to get them in the right92001-10-291-23/+28
| | | | | | | | | | | | | | 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
* Copy the folder's full_name before trying to use it to rename.92001-10-291-3/+6
| | | | | | | | | | | | | | | | | | | | | 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
* Remove uic, kill dumb warning.82001-10-281-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Implemented. (mail_vfolder_rename_uri): We do want to check renamed uri's82001-10-281-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Changed to open the source store from '/', so we can do renames across62001-10-271-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update the licensing information to require version 2 of the GPLEttore Perazzoli2001-10-271-3/+2
| | | | | | (instead of version 2 or any later version). svn path=/trunk/; revision=14191
* So apparently the uicomp can just 'vanish' while we're using it. Joy. Take52001-10-261-169/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Free folders_uri. (real_folder_deleted): If folder is deleted, remove it92001-10-191-8/+33
| | | | | | | | | | | | | | | | | | 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
* Added remove flag - its not adduri, its removeuri, its less typing than82001-10-191-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Clone the folderinfo before passing to async event. (real_folder_created):72001-10-181-2/+6
| | | | | | | | | | | | | | | 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
* Added an async_event handler to store_info. (mail_note_store): Setup asyncMichael Zucci2001-10-171-40/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Call mail_vfolder_shutdown.Jeffrey Stedfast2001-10-161-1/+3
| | | | | | | | | | | | | | | 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
* No longer need to pass folder display name to storage update_folderDan Winship2001-10-121-7/+4
| | | | | | | | | | | | * 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
* Ref folder so it hangs around till we're done with it.92001-10-101-0/+2
| | | | | | | | | | | 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
* reformatted the menu tables so they're a bit more bloody readable.52001-10-061-15/+18
| | | | | | | | | | | | | | 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
* Show "nn sent" as total in sent folder, rather than just 'total'.42001-10-051-2/+2
| | | | | | | | | | | | 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
* Handle vtrash case, emit 'folder_created' event for the folder-cache to32001-10-041-3/+3
| | | | | | | | | 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
* Dont wait for event to finish before returning. This could however mean we32001-10-041-1/+2
| | | | | | | | | | | | | | | 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
* Emit folder_deleted event. (remove_find_path): Fix, compare against path,82001-09-291-3/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* No such event finalized! Its finalize. (mail_note_store): "72001-09-281-9/+9
| | | | | | | | | | | | | | | | | | | 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
* Add a big comment explaining unread message counts so no one can mess themDan Winship2001-09-271-3/+28
| | | | | | | | | | | | * 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
* The folder-info needs to take priority over the folder because of the wayJeffrey Stedfast2001-09-261-3/+7
| | | | | | | | | | | | 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
* Take a new argument 'done' that can callback when complete. Fixed callers12001-09-211-6/+24
| | | | | | | | | | | | | | | | 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
* trigger a folder changed event, so the folderinfocache stuff has a chance02001-09-211-9/+8
| | | | | | | | | | | | | | 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
* Update the status bar here, assuming we've just been activated.02001-09-211-5/+10
| | | | | | | | | | | | | | | | | | | | | 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
* Lock around hashtable/list manipulation. Also dont try scan vfolder_hash02001-09-211-68/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Register vfolder sources here.02001-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Dont special case file: url's anymore.02001-09-211-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* General cleanup of mail debug printfs.92001-09-191-883/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't set the folderinfo's unread count to 0 when camel reports -1, sinceDan Winship2001-09-121-2/+1
| | | | | | | | | | | * 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
* Dynamically create the folder type list from camel. (reconfigure_clicked):02001-09-111-2/+24
| | | | | | | | | | | | | | 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
* Due to the introduction of mail_folder_cache_remove(), we can no longerPeter Williams2001-08-311-38/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-30 Peter Williams <peterw@ximian.com> Due to the introduction of mail_folder_cache_remove(), we can no longer assume that mail_folder_info's always exist, so we need to robustify a lot of this. * mail-folder-cache.c (folder_browser_destroyed): New function. Called when the folder browser is destroyed -- analogous to camel_folder_finalized. (mail_folder_cache_note_fb): Hook it up here. (struct _mail_folder_info): Add a member, mail_info_id, that records the get_mail operation's id, so that we can cancel it if we need to. (get_folder_info): Initialize it here. (get_mail_info_reply): Clear it here. (mail_folder_cache_remove_folder): If necessary, cancel it here. (mail_folder_cache_note_folder): Check it here before starting a new operation, just in case. (update_message_counts_main): Take a URI instead of a mail_folder_info *, in case the MFI has gotten destroyed. (update_message_counts): Take a quark of the URI instead of a mail_folder_info *, for the same reason. We use a quark instead of an allocated gchar * because figuring out when to free the string gets tricky. Then go from quark -> URI string -> MFI. Return if the folder is no longer valid, because this indicates that the MFI was removed before this signal got called. Pass a string to update_message_counts_main instead of an MFI. (camel_folder_finalized): Don't bother unhooking the signals here. Same change as above, but don't bother checking for a valid folder because we're about to make it invalid anyway. (message_list_built): Analogous to the above, except with the FolderBrowser instead of the CamelFolder. (selection_changed): As above. (folder_browser_destroyed): As above. (struct get_mail_info_msg): Instead of taking a mail_folder_info *, take a URI, for reasons explained above. (get_mail_info_receive): Go from URI -> MFI before doing anything. (get_mail_info_reply): Same. (get_mail_info_destroy): Free the URI. (get_mail_info): Take a URI and return the message id so that it can be cancelled if necessary. (mail_folder_cache_remove_folder): Disconnect from signals and events before removing. (mail_folder_cache_note_folder): Use a GQuark instead of the mail_folder_info * as the user_data. (mail_folder_cache_note_fb): Same. (mail_folder_cache_note_folderinfo): Little formatting change. svn path=/trunk/; revision=12532
* Record the timeout_id so we can cancel it if the mail_folder_info is laterPeter Williams2001-08-231-15/+29
| | | | | | | | | | | | | | 2001-08-23 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (maybe_update): Record the timeout_id so we can cancel it if the mail_folder_info is later freed. Also obviates the use of the _UPDATE_QUEUED flag. (mail_folder_cache_remove_folder): Cancel the timeout if we need to. Lock around the hash table operations. Free mfi itself. Add debugging spew. (get_folder_info): Initialiae the timeout_id to 0. svn path=/trunk/; revision=12417
* Fix bug #215... desensitize menu items based on the number of selectedPeter Williams2001-08-141-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-09 Peter Williams <peterw@ximian.com> Fix bug #215... desensitize menu items based on the number of selected messages (and whether there's a message in the pane) * folder-browser-ui.c (folder_browser_ui_add_message): Sensitize the menu items appropriately based on the old state. (fbui_sensitize_items): New function. Set the sensitivity of a list of commands. (folder_browser_ui_set_selection_state): New function. Move the FB to a new state of selected-ness, and sensitize menu items appropriately. (folder_browser_ui_message_loaded): New function. When notified that a message has been loaded, sensitize some menu items. * folder-browser-ui.h: Prototype new functions. * folder-browser.h: New enumeration, FolderBrowserSelectionState, that records the previous state of the selection (_NONE, _SINGLE, _MULTIPLE). * folder-browser.c (got_folder): If the component is set, set our selection state to _NONE, because that's the default state of the ETree. (on_selection_changed): When the number of selected messages is updated, notify the FBUI code of our new state. (folder_browser_gui_init): Hook up to the selection_changed signal and default to the _NONE selection state. (done_message_selected): Notify when a message is loaded. 2001-08-08 Peter Williams <peterw@ximian.com> * mail-folder-cache.c: Display how many messages are selected, too. (make_folder_status): If multiple messages are selected, add that to the string (the 0 and 1 cases are boring) (selection_changed): New function, update the selected count. (mail_folder_cache_note_fb): Connect to the selection_changed signal. svn path=/trunk/; revision=12012
* Remove all the messages from a folder that's being deleted before actuallyJason Leach2001-08-111-0/+18
| | | | | | | | | | | | | | | | | 2001-08-10 Jason Leach <jleach@ximian.com> * mail-ops.c (remove_folder_get): Remove all the messages from a folder that's being deleted before actually doing the camel_store_delete_folder, so it won't leave behind an mbox file that's going to prevent the actual directory from being deleted, and strange effects like new folders with the same name being made in it's place. Bug #5618. * mail-folder-cache.c (mail_folder_cache_remove_folder): New function, a way to get something out of the folder cache, like folders being deleted. Bug #6878. svn path=/trunk/; revision=11887
* Removed this function, it's not needed anymore.Jason Leach2001-08-071-29/+5
| | | | | | | | | | | | 2001-08-06 Jason Leach <jleach@ximian.com> * mail-folder-cache.c (make_folder_name): Removed this function, it's not needed anymore. (mail_folder_cache_note_folderinfo): Initialize mfi->unread to 0 always, so the shell won't get sent a random int for vtrash or potentially other folders. svn path=/trunk/; revision=11699
* Updates for EvolutionStorage API changes.Jason Leach2001-08-041-20/+13
| | | | | | | | | | | | | 2001-08-03 Jason Leach <jleach@ximian.com> * mail-folder-cache.c (update_idle): Updates for EvolutionStorage API changes. * mail-importer.c (mail_importer_create_folder): Ditto. * mail-local.c: Same here. svn path=/trunk/; revision=11636
* Don't display "0 hidden".Peter Williams2001-07-271-1/+1
| | | | | | | | | 2001-07-26 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (make_folder_status): Don't display "0 hidden". svn path=/trunk/; revision=11427
* Don't display "(0 unsent)" if the outbox is empty.Peter Williams2001-07-251-2/+2
| | | | | | | | | 2001-07-24 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (make_folder_name): Don't display "(0 unsent)" if the outbox is empty. svn path=/trunk/; revision=11347
* Make the error reporting a little but more descriptive.Peter Williams2001-07-241-2/+2
| | | | | | | | | 2001-07-24 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (update_idle): Make the error reporting a little but more descriptive. svn path=/trunk/; revision=11341
* prototype outbox_folder so we can check if a folder is it.Peter Williams2001-07-171-4/+14
| | | | | | | | | | | | | 2001-07-16 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (outbox_folder): prototype outbox_folder so we can check if a folder is it. (make_folder_name): If the folder is the outbox, display the count of total messages as "unsent". (make_folder_status): If the folder is the outbox, display "unsent" instead of "total" svn path=/trunk/; revision=11132
* DUH. No need to update every folder if we set the folder browser to NULL.Peter Williams2001-07-161-5/+5
| | | | | | | | | | 2001-07-16 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (mail_folder_cache_set_folder_browser): DUH. No need to update every folder if we set the folder browser to NULL. svn path=/trunk/; revision=11128
* Gave up and got rid of dm. Just replaced it with d(g_message()) and setPeter Williams2001-07-091-39/+43
| | | | | | | | | 2001-07-09 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (dm): Gave up and got rid of dm. Just replaced it with d(g_message()) and set G_LOG_DOMAIN. svn path=/trunk/; revision=10911
* Deleted (as opposed to #if 0) (get_folder_info): Changed to assume it hasPeter Williams2001-07-091-53/+29
| | | | | | | | | | | | | | | | | 2001-07-09 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (mail_folder_cache_set_update_shellview): Deleted (as opposed to #if 0) (get_folder_info): Changed to assume it has the folder lock. (make_folder_name): Same. (make_folder_status): Same. (update_idle): Don't unlock around the make_folder_ functions. (*): Changed behavior wrt. get_folder_info. Lock before calling, but also move preconditions before -- get_folder_info can only return NULL if uri is NULL. Also add preconditions for other arguments where necessary. svn path=/trunk/; revision=10910
* Don't free the psd here -- it will be freed on the "destroy" signal.Peter Williams2001-07-071-1/+1
| | | | | | | | | | | | | | | 2001-07-06 Peter Williams <peterw@ximian.com> * mail-callbacks.c (composer_postpone_cb): Don't free the psd here -- it will be freed on the "destroy" signal. * mail-folder-cache.c (maybe_update): Instead of an idle, use a very short timeout in hopes of reducing the number of redundant updates. * mail-tools.c (mail_tool_uri_to_folder): Only note the folder in the cache if we successfully got it. svn path=/trunk/; revision=10852
* Fix obvious bug in previous bugfix: Pass "fb" to check_for_fb_match() soDan Winship2001-07-071-1/+1
| | | | | | | | | * mail-folder-cache.c (mail_folder_cache_set_folder_browser): Fix obvious bug in previous bugfix: Pass "fb" to check_for_fb_match() so only the selected folder gets updated, instead of "all folders that haven't yet been selected". svn path=/trunk/; revision=10846
* Clear the shell view label if mailer loses focus.Peter Williams2001-07-051-0/+11
| | | | | | | | | | | | 2001-07-05 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (mail_folder_cache_set_folder_browser): Clear the shell view label if mailer loses focus. * mail-ops.c (do_update_subfolders_rec): Check for NULL url before calling folder cache functions. svn path=/trunk/; revision=10804
* Split make_string into these. (update_idle): Use (name and status) insteadPeter Williams2001-07-041-40/+45
| | | | | | | | | | | 2001-07-03 Peter Williams <peterw@ximian.com> * mail-folder-cache.c (make_folder_name, make_folder_status): Split make_string into these. (update_idle): Use (name and status) instead of (wide and thin) for the text. svn path=/trunk/; revision=10766
* Prevent folders from appearing to have -1 new messages. Prevent nonactivePeter Williams2001-07-041-15/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-03 Peter Williams <peterw@ximian.com> Prevent folders from appearing to have -1 new messages. Prevent nonactive folders from updating the title bar. Make the title bar update when switching to an already-opened folder. * mail-folder-cache.c (update_message_counts): Ignore the value for 'unread' if it is -1. (get_mail_info_receive): Same (mail_folder_cache_note_folderinfo): Same. (get_folder_info): Initialize 'fb' to NULL. (mail_folder_info): Add 'fb' member. (mail_folder_cache_note_fb): Change note_message_list to this. (update_idle): Only update the ShellView if the active folder browser is the same as the one that the MFI references. (mail_folder_cache_set_folder_browser): New function. Use it to set the active folder browser. NULL is okay. (check_for_fb_match): Called from the above. If the MFI has the new folder browser as its view, queue an update. * mail-folder-cache.h: Fix prototypes. * mail-callbacks.c (create_folders): Check if fi->url is nonnull. * folder-browser.c (got_folder): Change to use note_fb instead of note_messge_list. * folder-browser-factory.c (control_activate): Set the folder browser (control_deactivate): Clear it here. (fb_get_svi): Kill some inappropriately cut-n-pasted code. svn path=/trunk/; revision=10755
* New file. Protoypes for the Mail Folder Cache, which provides a place forPeter Williams2001-07-031-0/+798
2001-07-02 Peter Williams <peterw@ximian.com> * mail-folder-cache.h: New file. Protoypes for the Mail Folder Cache, which provides a place for all the disparate pieces of the mailer to save bits of information about a folder. Centralizes the information display code. * mail-folder-cache.c: New file. Implements the Mail Folder Cache. * Makefile.am (evolution_mail_SOURCES): Add the mail-folder-cache.{c,h} * folder-browser-factory.c (fb_get_svi): Copy of that absurdly long-named function in mail-display.c that gets the GNOME_Evolution_ShellView. (control_activate): Set the ShellView for the folder cache. * folder-browser.c (got_folder): Tell the folder browser about this folder. * mail-callbacks.c (create_folders): Tell the folder cache about the new folders. * mail-local.c (reconfigure_folder_reconfigure): Don't unhook our events as we no longer hook them up. (register_folder_registered): Tell the folder cache about this folder's place in the local storage. (register_folder_register): No longer hook events; the Folder Cache will do this. (local_folder_changed, local_folder_changed_proxy): Move to mail-folder-cache.c (free_local_folder): No longer unhook events. * mail-ops.c (do_update_subfolders_rec): Instead of setting the folder status ourselves, inform the Folder Cache about the changes. * mail-tools.c (mail_tool_uri_to_folder): Replace danw's cache with the new Mail Folder Cache. (cache_folder, etc): removed. svn path=/trunk/; revision=10694