diff options
author | Dan Winship <danw@src.gnome.org> | 2000-05-07 11:15:22 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-05-07 11:15:22 +0800 |
commit | 58837630600292086b88a1994328d2908bc29b4d (patch) | |
tree | caf51be65989d6ff74777b739f0002a78452b095 /mail/session.c | |
parent | fcaa6565ec3885f3e2b537d2a0c5aa449378d1fb (diff) | |
download | gsoc2013-evolution-58837630600292086b88a1994328d2908bc29b4d.tar gsoc2013-evolution-58837630600292086b88a1994328d2908bc29b4d.tar.gz gsoc2013-evolution-58837630600292086b88a1994328d2908bc29b4d.tar.bz2 gsoc2013-evolution-58837630600292086b88a1994328d2908bc29b4d.tar.lz gsoc2013-evolution-58837630600292086b88a1994328d2908bc29b4d.tar.xz gsoc2013-evolution-58837630600292086b88a1994328d2908bc29b4d.tar.zst gsoc2013-evolution-58837630600292086b88a1994328d2908bc29b4d.zip |
Don't hardcode "inbox" here.
* folder-browser-factory.c (folder_browser_factory): Don't
hardcode "inbox" here.
* folder-browser.c (folder_browser_set_uri): Don't hardcode
"inbox" here either.
(folder_browser_load_folder): Create a new store according to the
folder browser's URI, and load the mbox file from that store.
Parts of this are temporary.
* session.c, mail.h: There is no longer a global store, just a
global session.
* mail-config.c, mail-ops.c: Update for default_session -> session
change. fetch_mail is currently broken.
svn path=/trunk/; revision=2853
Diffstat (limited to 'mail/session.c')
-rw-r--r-- | mail/session.c | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/mail/session.c b/mail/session.c index b822d3e177..b7b24920b0 100644 --- a/mail/session.c +++ b/mail/session.c @@ -11,7 +11,7 @@ #include "mail.h" #include "e-util/e-setup.h" -SessionStore *default_session; +CamelSession *session; static void request_callback (gchar *string, gpointer data) @@ -52,51 +52,11 @@ evolution_auth_callback (char *prompt, gboolean secret, return ans; } -SessionStore * -session_store_new (const char *uri) -{ - SessionStore *ss = g_new (SessionStore, 1); - CamelException ex; - - ss->session = camel_session_new (evolution_auth_callback); - camel_exception_init (&ex); - ss->store = camel_session_get_store (ss->session, uri, &ex); - - - g_assert (ss->session); - g_assert (ss->store); - - return ss; -} - -void -session_store_destroy (SessionStore *ss) -{ - g_assert (ss != NULL); - - gtk_object_unref (GTK_OBJECT (ss->store)); - gtk_object_unref (GTK_OBJECT (ss->session)); - - g_free (ss); -} - -static void -init_default_session (void) -{ - char *url; - - url = g_strconcat ("mbox://", evolution_folders_dir, NULL); - default_session = session_store_new (url); - g_free (url); -} - void session_init (void) { e_setup_base_dir (); camel_init (); - init_default_session (); + session = camel_session_new (evolution_auth_callback); } - - |