aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/Makefile.am5
-rw-r--r--mail/component-factory.c7
-rw-r--r--mail/folder-browser.c19
4 files changed, 38 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f4c9dc1172..18a8649af0 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2000-05-29 Not Zed <NotZed@HelixCode.com>
+
+ * folder-browser.c (folder_browser_load_folder): Hardcode the
+ vfolder source to just the inbox (so at least it returns
+ something).
+
+ * component-factory.c (create_test_storage): Create a vfolder dir
+ first, and put the folders in that.
+ (create_test_storage): Create the storage as VFolders, not
+ "storage_name" :)
+
2000-05-28 Dan Winship <danw@helixcode.com>
* mail-config.c (error_dialog): helper function since we need to
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 2c3bb34251..0dd4a64deb 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -36,6 +36,10 @@ SHELL_OBJS = \
$(top_builddir)/shell/evolution-shell-component.o \
$(top_builddir)/shell/evolution-storage.o
+# FIXME Is there any way around having to do this?
+CAMEL_OBJS_EXTRA = \
+ $(top_builddir)/camel/providers/vee/libcamelvee.la
+
evolution_mail_SOURCES = \
$(EVOLUTION_MAIL_CORBA_GENERATED) \
component-factory.c \
@@ -64,6 +68,7 @@ evolution_mail_LDADD = \
$(top_builddir)/widgets/e-paned/libepaned.a \
../widgets/e-table/libetable.a \
../widgets/e-text/libetext.a \
+ $(CAMEL_OBJS_EXTRA) \
../camel/libcamel.la \
../e-util/libeutil.la \
../libibex/libibex.la \
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 749fc3c080..c94356660d 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -135,7 +135,7 @@ create_test_storage (EvolutionShellComponent *shell_component)
return;
}
- storage = evolution_storage_new ("storage_name");
+ storage = evolution_storage_new ("VFolders");
if (evolution_storage_register_on_shell (storage, corba_shell)
!= EVOLUTION_STORAGE_OK) {
g_warning ("Cannot register storage");
@@ -160,6 +160,7 @@ create_test_storage (EvolutionShellComponent *shell_component)
g_free(user);
g_free(system);
count = filter_driver_rule_count(fe);
+
for (i=0;i<count;i++) {
struct filter_option *fo;
GString *query;
@@ -179,14 +180,14 @@ create_test_storage (EvolutionShellComponent *shell_component)
sprintf(descunknown, "volder-%p", fo);
desctext = descunknown;
}
- g_string_sprintf(query, "vfolder:/%s/vfolder/%s?", evolution_dir, desctext);
+ g_string_sprintf(query, "vfolder:%s/vfolder/%s?", evolution_dir, desctext);
filter_driver_expand_option(fe, query, NULL, fo);
name = g_strdup_printf("/%s", desctext);
printf("Adding new vfolder: %s\n", query->str);
evolution_storage_new_folder (storage, name,
"mail",
query->str,
- name+1);
+ desctext);
g_string_free(query, TRUE);
g_free(name);
}
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index f435d0cf50..82972e0dbd 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -87,11 +87,28 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
if (store) {
new_folder = camel_store_get_folder (store, newquery, ex);
+ /* FIXME: do this properly rather than hardcoding */
+#warning "Find a way not to hardcode vfolder source"
+ {
+ CamelStore *st;
+ char *stname;
+ CamelFolder *source_folder;
+ extern char *evolution_dir;
+
+ stname = g_strdup_printf("mbox://%s/local/Inbox", evolution_dir);
+ st = camel_session_get_store (session, stname, ex);
+ g_free (stname);
+ if (st) {
+ source_folder = camel_store_get_folder (st, "mbox", ex);
+ if (source_folder) {
+ camel_vee_folder_add_folder(new_folder, source_folder);
+ }
+ }
+ }
}
g_free(newquery);
g_free(store_name);
- /* FIXME: Add the mbox folders we search!!! */
} else if (!strncmp(name, "file:", 5)) {
/* Change "file:" to "mbox:". */
store_name = g_strdup_printf ("mbox:%s", name + 5);