aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-03 14:39:14 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-03 14:39:14 +0800
commit467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9 (patch)
tree9bb0cb5e2fb74fbea57f5dfd818a4769349f8990 /mail/mail-folder-cache.c
parent9b2a16eb3e313e3057a8ac785fecacf54c8266a0 (diff)
downloadgsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar
gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar.gz
gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar.bz2
gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar.lz
gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar.xz
gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar.zst
gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.zip
if we have the folder opened already, and its the outbox, then use the
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
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index c2df775195..edd6dc1dc3 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -54,7 +54,7 @@
#include "em-folder-tree-model.h"
#define w(x)
-#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (x))*/
+#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (x))*/
/* note that many things are effectively serialised by having them run in
the main loop thread which they need to do because of corba/gtk calls */
@@ -334,11 +334,14 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
folder = mfi->folder;
if (folder) {
+ d(printf("update 1 folder '%s'\n", folder->full_name));
if ((count_trash && CAMEL_IS_VTRASH_FOLDER (folder))
|| folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
|| (count_sent && folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT))) {
+ d(printf(" total count\n"));
unread = camel_folder_get_message_count(folder);
} else {
+ d(printf(" unread count\n"));
if (info)
unread = info->unread_message_count;
else
@@ -423,7 +426,9 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
if (mfi->folder != folder)
return;
-
+
+ d(printf("folder '%s' changed\n", folder->full_name));
+
if (!CAMEL_IS_VTRASH_FOLDER(folder)
&& folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
&& folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT)
@@ -480,22 +485,13 @@ void mail_note_folder(CamelFolder *folder)
struct _store_info *si;
struct _folder_info *mfi;
- if (stores == NULL) {
- g_warning("Adding a folder `%s' to a store which hasn't been added yet?\n", folder->full_name);
- return;
- }
+ d(printf("noting folder '%s'\n", folder->full_name));
LOCK(info_lock);
- si = g_hash_table_lookup(stores, store);
- if (si == NULL) {
- /*g_warning("Adding a folder `%s' to a store %p which hasn't been added yet?", folder->full_name, store);*/
- UNLOCK(info_lock);
- return;
- }
-
- mfi = g_hash_table_lookup(si->folders, folder->full_name);
- if (mfi == NULL) {
- w(g_warning("Adding a folder `%s' that I dont know about yet?", folder->full_name));
+ if (stores == NULL
+ || (si = g_hash_table_lookup(stores, store)) == NULL
+ || (mfi = g_hash_table_lookup(si->folders, folder->full_name)) == NULL) {
+ w(g_warning("Noting folder before store initialised"));
UNLOCK(info_lock);
return;
}