aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-07 14:16:55 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-07 14:16:55 +0800
commitdcc0eea8aacc61ce5c031fb76288238b436fb5ab (patch)
treeace77abb10206d3c40649dc39a6fea1af285fc11
parent3179eb7162b3f9eb4c81abc76e186bba79aa5a67 (diff)
downloadgsoc2013-evolution-dcc0eea8aacc61ce5c031fb76288238b436fb5ab.tar
gsoc2013-evolution-dcc0eea8aacc61ce5c031fb76288238b436fb5ab.tar.gz
gsoc2013-evolution-dcc0eea8aacc61ce5c031fb76288238b436fb5ab.tar.bz2
gsoc2013-evolution-dcc0eea8aacc61ce5c031fb76288238b436fb5ab.tar.lz
gsoc2013-evolution-dcc0eea8aacc61ce5c031fb76288238b436fb5ab.tar.xz
gsoc2013-evolution-dcc0eea8aacc61ce5c031fb76288238b436fb5ab.tar.zst
gsoc2013-evolution-dcc0eea8aacc61ce5c031fb76288238b436fb5ab.zip
Create a global reference to the Drafts mbox folder for the Composer to
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 svn path=/trunk/; revision=4561
-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 ();