Hardcode the vfolder source to just the inbox (so at least it returns
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" :) svn path=/trunk/; revision=3269
This commit is contained in:
@ -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
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user