diff options
author | Miguel de Icaza <miguel@gnu.org> | 2000-02-16 01:28:34 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 2000-02-16 01:28:34 +0800 |
commit | d53eea370b1a53cbae519c92fa602d0e7aa5ecc8 (patch) | |
tree | 610202886dae8219e74e4e83e344d735c16a6c4a /mail/folder-browser.c | |
parent | f9cdc1e00912852e94f454b0de79d613df46c19d (diff) | |
download | gsoc2013-evolution-d53eea370b1a53cbae519c92fa602d0e7aa5ecc8.tar gsoc2013-evolution-d53eea370b1a53cbae519c92fa602d0e7aa5ecc8.tar.gz gsoc2013-evolution-d53eea370b1a53cbae519c92fa602d0e7aa5ecc8.tar.bz2 gsoc2013-evolution-d53eea370b1a53cbae519c92fa602d0e7aa5ecc8.tar.lz gsoc2013-evolution-d53eea370b1a53cbae519c92fa602d0e7aa5ecc8.tar.xz gsoc2013-evolution-d53eea370b1a53cbae519c92fa602d0e7aa5ecc8.tar.zst gsoc2013-evolution-d53eea370b1a53cbae519c92fa602d0e7aa5ecc8.zip |
Add the unicode libraries as well.
2000-02-14 Miguel de Icaza <miguel@gnu.org>
* camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
the unicode libraries as well.
* camel/camel-provider.c (camel_provider_register_as_module): Add
error reporting here. Desire to use Solaris increases. Hair loss
in the last two hours: 5,400.
* camel/providers/mbox/camel-mbox-provider.c
(camel_mbox_get_provider): Renamed function.
* camel/camel.h: All include files use camel/ now here.
* camel/providers/mbox/Makefile.am: Drop all the dynamism from
Camel, and make this a standard library.
* configure.in: set the UNICODE_LIBS variable here.
2000-02-14 Miguel de Icaza <miguel@gnu.org>
* folder-browser.c (folder_browser_load_folder): New routine,
loads a camel folder.
(folder_browser_set_uri): redo.
* session.c: new file. Implements SessionStores to keep track of
a Session/Store tuple.
svn path=/trunk/; revision=1783
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r-- | mail/folder-browser.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c index c74d49ced7..263577d6f9 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -11,6 +11,7 @@ #include <gnome.h> #include "e-util/e-util.h" #include "folder-browser.h" +#include "session.h" #define PARENT_TYPE (gtk_table_get_type ()) @@ -27,6 +28,9 @@ folder_browser_destroy (GtkObject *object) if (folder_browser->uri) g_free (folder_browser->uri); + if (folder_browser->folder) + gtk_object_unref (GTK_OBJECT (folder_browser->folder)); + if (folder_browser->message_list) bonobo_object_unref (BONOBO_OBJECT (folder_browser->message_list)); @@ -41,14 +45,43 @@ folder_browser_class_init (GtkObjectClass *object_class) folder_browser_parent_class = gtk_type_class (PARENT_TYPE); } +static gboolean +folder_browser_load_folder (FolderBrowser *fb, const char *name) +{ + CamelFolder *new_folder; + CamelException *ex; + + ex = camel_exception_new (); + new_folder = camel_store_get_folder (default_session->store, name, ex); + + if (camel_exception_get_id (ex)){ + camel_exception_free (ex); + return FALSE; + } + camel_exception_free (ex); + + if (fb->folder) + gtk_object_unref (GTK_OBJECT (fb->folder)); + + fb->folder = new_folder; + + message_list_set_folder (fb->message_list, new_folder); + + return TRUE; +} + #define EQUAL(a,b) (strcmp (a,b) == 0) void folder_browser_set_uri (FolderBrowser *folder_browser, const char *uri) { + /* FIXME: hardcoded uri */ + if (!folder_browser_load_folder (folder_browser, "inbox")) + return; + if (folder_browser->uri) g_free (folder_browser->uri); - + folder_browser->uri = g_strdup (uri); } |