aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/component-factory.c24
2 files changed, 26 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 546db6dbbe..5dbd2c8dee 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * component-factory.c (owner_set_cb): Create a global reference to
+ the Drafts mbox folder for the Composer to use
+
2000-08-06 JP Rosevear <jpr@helixcode.com>
* mail-config.c (ndialog_page_undone): Desensitize ok button
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 595d184551..8130800137 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -41,6 +41,8 @@
#include "component-factory.h"
+CamelFolder *drafts_folder = NULL;
+
static void create_vfolder_storage (EvolutionShellComponent *shell_component);
static void create_imap_storage (EvolutionShellComponent *shell_component);
static void real_create_imap_storage( gpointer user_data );
@@ -138,11 +140,27 @@ owner_set_cb (EvolutionShellComponent *shell_component,
EvolutionShellClient *shell_client,
gpointer user_data)
{
+ CamelException *ex;
+ CamelStore *store;
+ char *url;
+
g_print ("evolution-mail: Yeeeh! We have an owner!\n"); /* FIXME */
-
+
/* GROSS HACK */
/*global_shell_client = shell_client;*/
-
+
+ ex = camel_exception_new ();
+ url = g_strdup_printf ("mbox://%s/local/Drafts", evolution_dir);
+ store = camel_session_get_store (session, url, ex);
+ g_free (url);
+ if (!camel_exception_is_set (ex)) {
+ drafts_folder = camel_store_get_folder (store, "mbox", TRUE, ex);
+ gtk_object_unref (GTK_OBJECT (store));
+ } else {
+ drafts_folder = NULL;
+ }
+ camel_exception_free (ex);
+
create_vfolder_storage (shell_component);
create_imap_storage (shell_component);
create_news_storage (shell_component);
@@ -231,7 +249,7 @@ create_imap_storage (EvolutionShellComponent *shell_component)
EvolutionShellClient *shell_client;
Evolution_Shell corba_shell;
EvolutionStorage *storage;
- char *source=NULL, *server, *p;
+ char *source = NULL, *server, *p;
struct create_info_s *ii;
config = mail_config_fetch ();