aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
author0 <NotZed@Ximian.com>2001-10-30 11:28:40 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-30 11:28:40 +0800
commit093a00cf2bba85c4f1f0826dde1cb500ecc415d6 (patch)
treeafd4239a5665fbdd3f3e9dd048a818295084f44e /mail/mail-folder-cache.c
parente01b1cb6625883a4db723209c743dc03abc112ef (diff)
downloadgsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.gz
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.bz2
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.lz
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.xz
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.tar.zst
gsoc2013-evolution-093a00cf2bba85c4f1f0826dde1cb500ecc415d6.zip
Argh!!! Dont free the async op data here, the async op is still running
2001-10-30 <NotZed@Ximian.com> * subscribe-dialog.c (fe_cancel_op_foreach): Argh!!! Dont free the async op data here, the async op is still running and will access it! Just try to cancel it and mark it as cancelled (id == -1) (fe_done_subscribing): Only remove outselves from the hash table if we're not cancelled. The handle should always be set here, since this code runs in the gui thread. * message-list.c (on_cursor_activated_idle): If nothing selected/cursor not activated, then select no message. * mail-folder-cache.c (update_1folder): Make the trash count optional on EVOLUTION_COUNT_TRASH, becuase some lusers are just too stupid to understand what its for. * component-factory.c (storage_xfer_folder): Return slightly better error codes for copying folders, since its not implemented yet. * mail-vfolder.c, mail-local.c, mail-folder-cache.c, message-list.c component-factory.c, mail-ops.c, subscribe-dialog.c, mail-session.c: d() out some debug printfs, w() out some warnings. * folder-browser-ui.c (folder_browser_ui_add_message): Fix typo, Resent->Resend. svn path=/trunk/; revision=14412
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index a3abc13073..ffbc210e82 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -47,6 +47,7 @@
#include "mail-vfolder.h"
#include "mail-autofilter.h"
+#define w(x)
#define d(x)
/* note that many things are effectively serialised by having them run in
@@ -113,6 +114,7 @@ static int update_id = -1;
/* hack for people who LIKE to have unsent count */
static int count_sent = FALSE;
+static int count_trash = FALSE;
static void
free_update(struct _folder_update *up)
@@ -162,7 +164,7 @@ real_flush_updates(void *o, void *event_data, void *data)
/* Its really a rename, but we have no way of telling the shell that, so remove it */
if (up->oldpath) {
if (storage != NULL) {
- printf("Removing old folder (rename?) '%s'\n", up->oldpath);
+ d(printf("Removing old folder (rename?) '%s'\n", up->oldpath));
evolution_storage_removed_folder(storage, up->oldpath);
}
/* ELSE? Shell supposed to handle the local snot case */
@@ -170,7 +172,7 @@ real_flush_updates(void *o, void *event_data, void *data)
/* We can tell the vfolder code though */
if (up->olduri && up->add) {
- printf("renaming folder '%s' to '%s'\n", up->olduri, up->uri);
+ d(printf("renaming folder '%s' to '%s'\n", up->olduri, up->uri));
mail_vfolder_rename_uri(up->store, up->olduri, up->uri);
mail_filter_rename_uri(up->store, up->olduri, up->uri);
}
@@ -288,7 +290,9 @@ update_1folder(struct _folder_info *mfi, CamelFolderInfo *info)
folder = mfi->folder;
if (folder) {
- if (CAMEL_IS_VTRASH_FOLDER (folder) || folder == outbox_folder || (count_sent && folder == sent_folder)) {
+ if ((count_trash && CAMEL_IS_VTRASH_FOLDER (folder))
+ || folder == outbox_folder
+ || (count_sent && folder == sent_folder)) {
unread = camel_folder_get_message_count(folder);
} else {
if (info)
@@ -432,7 +436,7 @@ void mail_note_folder(CamelFolder *folder)
mfi = g_hash_table_lookup(si->folders, folder->full_name);
if (mfi == NULL) {
- g_warning("Adding a folder `%s' that I dont know about yet?", folder->full_name);
+ w(g_warning("Adding a folder `%s' that I dont know about yet?", folder->full_name));
UNLOCK(info_lock);
return;
}
@@ -674,7 +678,7 @@ mail_note_store_remove(CamelStore *store)
ud = (struct _update_data *)si->folderinfo_updates.head;
while (ud->next) {
- (printf("Cancelling outstanding folderinfo update %d\n", ud->id));
+ d(printf("Cancelling outstanding folderinfo update %d\n", ud->id));
mail_msg_cancel(ud->id);
ud = ud->next;
}
@@ -735,6 +739,7 @@ mail_note_store(CamelStore *store, EvolutionStorage *storage, GNOME_Evolution_St
if (stores == NULL) {
stores = g_hash_table_new(NULL, NULL);
count_sent = getenv("EVOLUTION_COUNT_SENT") != NULL;
+ count_trash = getenv("EVOLUTION_COUNT_TRASH") != NULL;
}
si = g_hash_table_lookup(stores, store);