diff options
author | 8 <NotZed@Ximian.com> | 2001-09-19 05:43:00 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-19 05:43:00 +0800 |
commit | 8347ce1403c68a408a3b9952f6486b5ac584104b (patch) | |
tree | 3df009be2f1e694e277133818acb872904d10392 /camel/camel-store.c | |
parent | 390621f624b0be7485abdba29d0fe46c905156c8 (diff) | |
download | gsoc2013-evolution-8347ce1403c68a408a3b9952f6486b5ac584104b.tar.gz gsoc2013-evolution-8347ce1403c68a408a3b9952f6486b5ac584104b.tar.zst gsoc2013-evolution-8347ce1403c68a408a3b9952f6486b5ac584104b.zip |
If filter inbox is set on the store, and we're opening inbox '', then
2001-09-18 <NotZed@Ximian.com>
* providers/local/camel-maildir-folder.c
(camel_maildir_folder_new): If filter inbox is set on the store,
and we're opening inbox '', then enable filtering on new messages.
* providers/local/camel-local-folder.c
(camel_local_folder_construct): After loading the summary, check
it, and only abort if that fails. Also maintain the changes
count.
* providers/local/camel-local-summary.c
(camel_local_summary_load): Remove summary_check code from here.
(camel_local_summary_check): Sync index/summary here, if we were
successful.
* providers/local/camel-spool-folder.c
(camel_spool_folder_new): If we have filter-new-messages-on-inbox
set and we just opened inbox, turn on filtering on this folder.
(camel_spool_folder_construct): Keep track of changes for the
folder, so that filter-new-messages works right (?)
* providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
as the folder name, not the path.
* camel-folder-search.c (search_not): Modified patch from
<peterw@ximian.com> since the summary is messageinfo's, not
strings.
** Ok so the problem with the stuff below is that maildir/spool
'summary_load' throws away all events, including recents, joy eh?
* providers/local/camel-maildir-summary.c (maildir_summary_check):
Add new messages to the recent changeinfo.
* providers/local/camel-spool-summary.c: Mark 'new' message as
recent, for later processing if required (i.e. 'filter new
messages').
* camel-store.c (construct): new function, cascade up construct
method and check for 'filter' param, and set accordingly for any
one that might want it.
* providers/imap/camel-imap-store.c (construct): map the
param_filter_inbox flag to the store->flags as
CAMEL_STORE_FILTER_INBOX.
* camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
filter inbox.
* providers/imap/camel-imap-folder.h: Removed do_filtering flag
from CamelImapFolder.
* providers/imap/camel-imap-folder.c (imap_update_summary): Remove
the 'recents' parameter, use the 'changes' parameter instead to
convey this info.
(camel_imap_folder_changed): Changed for update_summary api
change. Now always just emit the changed event if we have any
changes to report, filtering code removed, handled upstream.
(filter_proc):
(filter_free): Removed old filtering code.
(camel_imap_folder_new): Set the filter_recent flag on the folder
if we're the inbox and filtering of inbox is enabled.
* camel-folder.c (folder_changed): If we have 'recent' messages,
and are set to filter recents, then freeze the folder and launch a
thread to do the processing (or similar if threading not enabled).
(thaw): Make sure we emit the changed signal outside of owning the
lock and if things have changed. Also, no longer bother
downgrading folder_changed events to message_changed events.
* camel-folder.h (struct _CamelFolder): Added filter_recent flag
-> signifies all recent messages in folder should be filtered.
* camel-session.c: (camel_session_thread_msg_new,
camel_session_thread_msg_free, camel_session_thread_queue,
camel_session_thread_wait): code to handle async operations as
part of camel processing.
(camel_session_finalise): free thread_lock, destroy thread, active
hash, etc.
(camel_session_init): init thread, active hash, etc.
(camel_session_class_init): Init virtual functions.
(session_thread_msg_new, session_thread_msg_free,
session_thread_destroy, session_thread_received,
session_thread_queue, session_thread_wait): default implementation
of session threads stuff.
2001-09-17 <NotZed@Ximian.com>
* camel-folder.c (camel_folder_change_info_recent_uid): New
function to add a 'recent' uid to the change info.
(camel_folder_change_info_clear): Clear recent list.
(camel_folder_change_info_free): Free recent list.
(camel_folder_change_info_new): Setup recent list.
* camel-folder.h: Added a uid_recent item to the folder_changed
event data.
* providers/local/camel-maildir-store.c (scan_dir): Free new in
the right block.
* providers/local/camel-local-provider.c: Add local config entries
to filter on new messages in spool and maildir provider.
* camel-vee-folder.c (vee_folder_construct): Remove the assertion
which stops ? in names from being allowed.
svn path=/trunk/; revision=12956
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c index 9722163cec..489d269991 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -67,12 +67,17 @@ static gboolean folder_subscribed (CamelStore *store, const char *folder_name); static void subscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex); static void unsubscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex); +static void construct (CamelService *service, CamelSession *session, + CamelProvider *provider, CamelURL *url, + CamelException *ex); + static void camel_store_class_init (CamelStoreClass *camel_store_class) { CamelObjectClass *camel_object_class = CAMEL_OBJECT_CLASS (camel_store_class); - + CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_store_class); + parent_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ())); /* virtual method definition */ @@ -93,6 +98,8 @@ camel_store_class_init (CamelStoreClass *camel_store_class) camel_store_class->unsubscribe_folder = unsubscribe_folder; /* virtual method overload */ + camel_service_class->construct = construct; + camel_object_class_declare_event (camel_object_class, "folder_created", NULL); camel_object_class_declare_event (camel_object_class, @@ -184,6 +191,21 @@ folder_finalize (CamelObject *folder, gpointer event_data, gpointer user_data) } } +static void +construct (CamelService *service, CamelSession *session, + CamelProvider *provider, CamelURL *url, + CamelException *ex) +{ + CamelStore *store = CAMEL_STORE(service); + + parent_class->construct(service, session, provider, url, ex); + if (camel_exception_is_set (ex)) + return; + + if (camel_url_get_param(url, "filter")) + store->flags |= CAMEL_STORE_FILTER_INBOX; +} + static CamelFolder * get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex) { |