From 1f993cacd1ac269ea4e7a77c57edbce732b9e8b5 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 6 Jun 2002 09:53:36 +0000 Subject: Remove the CONF_DEFAULT_PATH entry, as this is handled by the url config 2002-06-04 Not Zed * providers/local/camel-local-provider.c: Remove the CONF_DEFAULT_PATH entry, as this is handled by the url config stuff. This made it basically impossible to configure any local folder from the gui. * providers/local/camel-local-folder.c (local_refresh_info): Force a refresh. Should work for all local folders to force them to refresh. * providers/local/camel-maildir-folder.c (maildir_refresh_info): Removed, moved into camel-local-folder. * providers/local/camel-mh-summary.c (mh_summary_next_uid_string): Once we assign or get a uid, tell the summary of this, so the next uid we get will be higher than any previously. * camel-object.c (camel_object_ref, camel_object_unref): I got sick of casting, these now take void * like they should, and perform their own run-time type checking. * providers/local/camel-mh-store.c (recursive_scan): Changed to use stat, not lstat (*shrug* maybe someone wants to softlink their maildir tree?). (inode_hash): (inode_equal): (inode_free): Copied from camel-maildir store (should put into camel-local-store or utils?). (recursive_scan): Changed to check for re-visiting inodes. Also, it builds the tree itself, rather than using folder_info_build. (add_folder): Changed to folder_info_new. (recursive_scan): Properly honour the recursive flag. Also, lookup unread count from folder. (folder_info_new): Init unread message count to -1, since we dont know yet. (folder_info_new): Take the name as an argument, and perform the merging here. (folders_update): Util func to add/remove folders from .folders file. I'm assuming its sorted. (get_folder): Add the folder to .folders if we created a new one, and if it exists. (delete_folder): Remove from .folders, etc. (folders_scan): If we have a .folders file, read and use that instead. (recursive_scan): Handle scanning from a particular directory properly. (rename_folder): Implement so we can track any changes to the .folders file if its turned on. ** Applied patch below from Greg Hudson. 2002-05-10 Greg Hudson * camel-mh-store.c (get_inbox, get_folder_info, recursive_scan, add_folder): Implement support for MH stores. * camel-mh-summary.c (mh_summary_check, sort_uid_cmp): Sort MH messages by message number (uid), like we sort maildir messages by date. * camel-local-provider.c (mh_provider): Turn on source and store flags. svn path=/trunk/; revision=17130 --- camel/providers/local/camel-local-folder.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'camel/providers/local/camel-local-folder.c') diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c index c12e9d5da7..e79e6b8f5d 100644 --- a/camel/providers/local/camel-local-folder.c +++ b/camel/providers/local/camel-local-folder.c @@ -70,6 +70,8 @@ static int local_getv(CamelObject *object, CamelException *ex, CamelArgGetV *arg static int local_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex); static void local_unlock(CamelLocalFolder *lf); +static void local_refresh_info(CamelFolder *folder, CamelException *ex); + static void local_sync(CamelFolder *folder, gboolean expunge, CamelException *ex); static void local_expunge(CamelFolder *folder, CamelException *ex); @@ -94,6 +96,7 @@ camel_local_folder_class_init(CamelLocalFolderClass * camel_local_folder_class) /* virtual method overload */ oklass->getv = local_getv; + camel_folder_class->refresh_info = local_refresh_info; camel_folder_class->sync = local_sync; camel_folder_class->expunge = local_expunge; @@ -371,6 +374,21 @@ local_unlock(CamelLocalFolder *lf) /* nothing */ } +/* for auto-check to work */ +static void +local_refresh_info(CamelFolder *folder, CamelException *ex) +{ + CamelLocalFolder *lf = (CamelLocalFolder *)folder; + + if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex) == -1) + return; + + if (camel_folder_change_info_changed(lf->changes)) { + camel_object_trigger_event((CamelObject *)folder, "folder_changed", lf->changes); + camel_folder_change_info_clear(lf->changes); + } +} + static void local_sync(CamelFolder *folder, gboolean expunge, CamelException *ex) { -- cgit v1.2.3