aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/local
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-02-16 03:20:38 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-02-16 03:20:38 +0800
commitf89ca302d1bc8cdd0a988121523928b80366441a (patch)
tree4779cde1691418bccaa93608c7493c6558cd30f6 /camel/providers/local
parentcb66ad3fe4a2297ea211adfe012dbdf3f875090b (diff)
downloadgsoc2013-evolution-f89ca302d1bc8cdd0a988121523928b80366441a.tar
gsoc2013-evolution-f89ca302d1bc8cdd0a988121523928b80366441a.tar.gz
gsoc2013-evolution-f89ca302d1bc8cdd0a988121523928b80366441a.tar.bz2
gsoc2013-evolution-f89ca302d1bc8cdd0a988121523928b80366441a.tar.lz
gsoc2013-evolution-f89ca302d1bc8cdd0a988121523928b80366441a.tar.xz
gsoc2013-evolution-f89ca302d1bc8cdd0a988121523928b80366441a.tar.zst
gsoc2013-evolution-f89ca302d1bc8cdd0a988121523928b80366441a.zip
Emit the folder_created signal here.
2001-02-15 Jeffrey Stedfast <fejj@ximian.com> * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit the folder_created signal here. * providers/local/camel-local-folder.c (camel_local_folder_construct): Emit the folder_created signal. * providers/local/camel-local-store.c (delete_folder): On error, free the 'name' string so we don't leak. Also emit the folder_deleted signal. * providers/imap/camel-imap-store.c (subscribe_folder): Emit the folder_created signal. (unsubscribe_folder): Emit the folder_deleted signal. * camel-store.c (camel_store_class_init): Added folder_created and folder_deleted signal defs. svn path=/trunk/; revision=8246
Diffstat (limited to 'camel/providers/local')
-rw-r--r--camel/providers/local/camel-local-folder.c14
-rw-r--r--camel/providers/local/camel-local-store.c14
2 files changed, 27 insertions, 1 deletions
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
index 116a10ea7d..ea2894aa2e 100644
--- a/camel/providers/local/camel-local-folder.c
+++ b/camel/providers/local/camel-local-folder.c
@@ -162,6 +162,7 @@ CamelType camel_local_folder_get_type(void)
CamelLocalFolder *
camel_local_folder_construct(CamelLocalFolder *lf, CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex)
{
+ CamelFolderInfo *fi;
CamelFolder *folder;
const char *root_dir_path, *name;
struct stat st;
@@ -213,7 +214,18 @@ camel_local_folder_construct(CamelLocalFolder *lf, CamelStore *parent_store, con
camel_object_unref (CAMEL_OBJECT (folder));
return NULL;
}
-
+
+ fi = g_new0 (CamelFolderInfo, 1);
+ fi->full_name = g_strdup (full_name);
+ fi->name = g_strdup (name);
+ fi->url = g_strdup (lf->folder_path);
+ fi->unread_message_count = -1;
+
+ camel_object_trigger_event (CAMEL_OBJECT (parent_store),
+ "folder_deleted", fi);
+
+ camel_folder_info_free (fi);
+
return lf;
}
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index b6ea31a98f..34da035301 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -270,6 +270,7 @@ rename_folder(CamelStore *store, const char *old, const char *new, CamelExceptio
static void
delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
{
+ CamelFolderInfo *fi;
char *name;
char *str;
@@ -281,6 +282,7 @@ delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
_("Could not delete folder summary file `%s': %s"),
str, strerror(errno));
g_free(str);
+ g_free (name);
return;
}
g_free(str);
@@ -290,8 +292,20 @@ delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
_("Could not delete folder index file `%s': %s"),
str, strerror(errno));
g_free(str);
+ g_free (name);
return;
}
g_free(str);
g_free(name);
+
+ fi = g_new0 (CamelFolderInfo, 1);
+ fi->full_name = g_strdup (folder_name);
+ fi->name = g_strdup (g_basename (folder_name));
+ fi->url = g_strdup_printf ("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
+ fi->unread_message_count = -1;
+
+ camel_object_trigger_event (CAMEL_OBJECT (store),
+ "folder_deleted", fi);
+
+ camel_folder_info_free (fi);
}