From bebbdbbbcb5a6cdd516e47fd78143ae4c782bf54 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 29 May 2000 20:39:19 +0000 Subject: Hardcode the vfolder source to just the inbox (so at least it returns 2000-05-29 Not Zed * 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" :) svn path=/trunk/; revision=3269 --- mail/ChangeLog | 11 +++++++++++ mail/Makefile.am | 5 +++++ mail/component-factory.c | 7 ++++--- mail/folder-browser.c | 19 ++++++++++++++++++- 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 + + * 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 * 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;istr); 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); -- cgit v1.2.3