Re-add the mail_vtrash_create() hack back in for LocalStores since there's
2001-02-25 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (owner_set_cb): Re-add the mail_vtrash_create() hack back in for LocalStores since there's no better way to register a vTrash folder on the Local Storage yet. * mail-local.c (register_folder_registered): Add folders to the vTrash folder here since the LocalStore does not let the parent CamelStore class keep it's own hash of the folders. svn path=/trunk/; revision=8391
This commit is contained in:
committed by
Jeffrey Stedfast
parent
4b098b1a42
commit
1aba985def
@ -1,3 +1,13 @@
|
||||
2001-02-25 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* component-factory.c (owner_set_cb): Re-add the
|
||||
mail_vtrash_create() hack back in for LocalStores since there's no
|
||||
better way to register a vTrash folder on the Local Storage yet.
|
||||
|
||||
* mail-local.c (register_folder_registered): Add folders to the
|
||||
vTrash folder here since the LocalStore does not let the parent
|
||||
CamelStore class keep it's own hash of the folders.
|
||||
|
||||
2001-02-25 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* session.c (mail_session_forget_password): New function to force
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
#include "mail-mt.h"
|
||||
#include "mail-importer.h"
|
||||
#include "mail-vfolder.h" /* vfolder_create_storage */
|
||||
#include "mail-vtrash.h"
|
||||
#include "openpgp-utils.h"
|
||||
#include <gal/widgets/e-gui-utils.h>
|
||||
|
||||
@ -215,6 +216,8 @@ owner_set_cb (EvolutionShellComponent *shell_component,
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
mail_vtrash_create ("file:/", "vTrash");
|
||||
|
||||
mail_session_enable_interaction (TRUE);
|
||||
|
||||
mail_autoreceive_setup ();
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
#include "evolution-storage-listener.h"
|
||||
|
||||
#include "camel/camel.h"
|
||||
#include "camel/camel-vee-folder.h"
|
||||
|
||||
#include "filter/vfolder-context.h"
|
||||
#include "filter/vfolder-rule.h"
|
||||
@ -119,7 +120,7 @@ load_metainfo(const char *path)
|
||||
xmlFreeDoc(doc);
|
||||
return meta;
|
||||
|
||||
dodefault:
|
||||
dodefault:
|
||||
meta->format = g_strdup("mbox"); /* defaults */
|
||||
meta->name = g_strdup("mbox");
|
||||
meta->indexed = TRUE;
|
||||
@ -324,7 +325,8 @@ get_folder (CamelStore *store, const char *folder_name,
|
||||
camel_object_ref (CAMEL_OBJECT (folder));
|
||||
} else {
|
||||
folder = NULL;
|
||||
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER, "No such folder %s", folder_name);
|
||||
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
|
||||
"No such folder %s", folder_name);
|
||||
}
|
||||
return folder;
|
||||
}
|
||||
@ -507,11 +509,20 @@ register_folder_registered(struct _mail_msg *mm)
|
||||
int unread;
|
||||
|
||||
if (local_folder->folder) {
|
||||
g_hash_table_insert (local_folder->local_store->folders, local_folder->uri + 8, local_folder);
|
||||
|
||||
CamelStore *store = CAMEL_STORE (local_folder->local_store);
|
||||
|
||||
g_hash_table_insert (local_folder->local_store->folders, local_folder->uri + 8,
|
||||
local_folder);
|
||||
|
||||
/* Add the folder to the vTrash folder */
|
||||
if (store->vtrash)
|
||||
camel_vee_folder_add_folder (CAMEL_VEE_FOLDER (store->vtrash),
|
||||
local_folder->folder);
|
||||
|
||||
unread = local_folder->last_unread;
|
||||
local_folder->last_unread = 0;
|
||||
local_folder_changed (CAMEL_OBJECT (local_folder->folder), GINT_TO_POINTER (unread), local_folder);
|
||||
local_folder_changed (CAMEL_OBJECT (local_folder->folder), GINT_TO_POINTER (unread),
|
||||
local_folder);
|
||||
m->local_folder = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,6 +42,16 @@
|
||||
extern char *evolution_dir;
|
||||
extern CamelSession *session;
|
||||
|
||||
|
||||
/**
|
||||
* mail_vtrash_add: add a "vTrash" folder on the EvolutionStorage
|
||||
* @store: the CamelStore that the vTrash exists on
|
||||
* @store_uri: the URL of the store
|
||||
* @name: the name to give the vTrash folder
|
||||
*
|
||||
* Creates the vTrash folder for the provided store in the folder view
|
||||
* (EvolutionStorage) and creates the URL for that vTrash folder.
|
||||
**/
|
||||
void
|
||||
mail_vtrash_add (CamelStore *store, const char *store_uri, const char *name)
|
||||
{
|
||||
@ -73,7 +83,7 @@ mail_vtrash_add (CamelStore *store, const char *store_uri, const char *name)
|
||||
|
||||
struct _get_trash_msg {
|
||||
struct _mail_msg msg;
|
||||
|
||||
|
||||
CamelStore *store;
|
||||
char *store_uri;
|
||||
char *name;
|
||||
@ -136,6 +146,16 @@ static struct _mail_msg_op get_trash_op = {
|
||||
get_trash_free,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* mail_vtrash_create: Create a vTrash folder
|
||||
* @store_uri: URL of the CamelStore
|
||||
* @name: name to give the vTrash folder
|
||||
*
|
||||
* Async function to lookup the CamelStore corresponding to @store_uri
|
||||
* and then calls mail_vtrash_add() to create the vTrash folder/URL on
|
||||
* the EvolutionStorage.
|
||||
**/
|
||||
int
|
||||
mail_vtrash_create (const char *store_uri, const char *name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user