aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-vfolder.c
diff options
context:
space:
mode:
author9 <NotZed@Ximian.com>2001-09-19 16:29:13 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-09-19 16:29:13 +0800
commit73c74dd70d7e023cc24f7e28d52417b3c4e72805 (patch)
tree79596aab616dd7f2abd55c6f6a86c1abb3687d76 /mail/mail-vfolder.c
parentbef39dc4e0bbdb334fef71f973bcb7781dce65df (diff)
downloadgsoc2013-evolution-73c74dd70d7e023cc24f7e28d52417b3c4e72805.tar.gz
gsoc2013-evolution-73c74dd70d7e023cc24f7e28d52417b3c4e72805.tar.zst
gsoc2013-evolution-73c74dd70d7e023cc24f7e28d52417b3c4e72805.zip
General cleanup of mail debug printfs.
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
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r--mail/mail-vfolder.c33
1 files changed, 5 insertions, 28 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 0f4c271255..51740bf30f 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -107,8 +107,6 @@ source_finalise(CamelFolder *folder, void *event_data, void *data)
void
vfolder_register_source (CamelFolder *folder)
{
- GList *l;
-
if (CAMEL_IS_VEE_FOLDER(folder))
return;
@@ -245,16 +243,14 @@ rule_changed(FilterRule *rule, CamelFolder *folder)
/* if the folder has changed name, then add it, then remove the old manually */
if (strcmp(folder->full_name, rule->name) != 0) {
- char *uri, *path, *key;
+ char *path, *key;
CamelFolder *old;
gtk_signal_disconnect_by_func((GtkObject *)rule, rule_changed, folder);
context_rule_added((RuleContext *)context, rule);
- uri = g_strdup_printf("vfolder:%s/vfolder#%s", evolution_dir, folder->full_name);
- mail_folder_cache_remove_folder(uri);
- g_free(uri);
+ /* TODO: remove folder from folder info cache? */
path = g_strdup_printf("/%s", folder->full_name);
evolution_storage_removed_folder(mail_lookup_storage(vfolder_store), path);
@@ -299,7 +295,6 @@ rule_changed(FilterRule *rule, CamelFolder *folder)
static void context_rule_added(RuleContext *ctx, FilterRule *rule)
{
CamelFolder *folder;
- char *uri, *path;
printf("rule added: %s\n", rule->name);
@@ -310,37 +305,19 @@ static void context_rule_added(RuleContext *ctx, FilterRule *rule)
g_hash_table_insert(vfolder_hash, g_strdup(rule->name), folder);
- /* Ok, so the mail_folder_cache api is a complete fuckup,
- I think this mess probably does what it is supposed to do */
- uri = g_strdup_printf("vfolder:%s/vfolder#%s", evolution_dir, rule->name);
- printf("Noting folder '%s', storage = %p\n", uri, mail_lookup_storage(vfolder_store));
- path = g_strdup_printf("/%s", rule->name);
- evolution_storage_new_folder(mail_lookup_storage(vfolder_store),
- path, rule->name,
- "mail", uri,
- rule->name,
- FALSE);
-
- mail_folder_cache_note_folder(uri, folder);
- mail_folder_cache_set_update_estorage(uri, mail_lookup_storage(vfolder_store));
- g_free(uri);
- g_free(path);
-
+ mail_note_folder(folder, NULL);
rule_changed(rule, folder);
}
}
static void context_rule_removed(RuleContext *ctx, FilterRule *rule)
{
- char *uri, *key, *path;
+ char *key, *path;
CamelFolder *folder;
printf("rule removed; %s\n", rule->name);
- /* have to remove this first before unrefing the folder, otherwise it gets itself lost */
- uri = g_strdup_printf("vfolder:%s/vfolder#%s", evolution_dir, rule->name);
- mail_folder_cache_remove_folder(uri);
- g_free(uri);
+ /* TODO: remove from folder info cache? */
path = g_strdup_printf("/%s", rule->name);
evolution_storage_removed_folder(mail_lookup_storage(vfolder_store), path);