diff options
author | Dan Winship <danw@src.gnome.org> | 2001-02-10 00:45:09 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-02-10 00:45:09 +0800 |
commit | fa2c19fdd1aee26d8bf5b622a3adf970004c3abf (patch) | |
tree | ffd18597510f602e430c08224748ab44761888ba /mail/mail-tools.c | |
parent | ec981301f5489626ffbf9474db49f1fda4e41a99 (diff) | |
download | gsoc2013-evolution-fa2c19fdd1aee26d8bf5b622a3adf970004c3abf.tar gsoc2013-evolution-fa2c19fdd1aee26d8bf5b622a3adf970004c3abf.tar.gz gsoc2013-evolution-fa2c19fdd1aee26d8bf5b622a3adf970004c3abf.tar.bz2 gsoc2013-evolution-fa2c19fdd1aee26d8bf5b622a3adf970004c3abf.tar.lz gsoc2013-evolution-fa2c19fdd1aee26d8bf5b622a3adf970004c3abf.tar.xz gsoc2013-evolution-fa2c19fdd1aee26d8bf5b622a3adf970004c3abf.tar.zst gsoc2013-evolution-fa2c19fdd1aee26d8bf5b622a3adf970004c3abf.zip |
Updates for CamelStore changes, small memory leak fixes. (lookup_folder):
* mail-local.c: Updates for CamelStore changes, small memory leak
fixes.
(lookup_folder): Removed (and moved into the reconfigure code)
since this method no longer exists in CamelStore.
(do_reconfigure_folder, etc): Update the info in the
MailLocalStore after reconfiguring.
(mail_local_lookup_folder): Removed
* local-config.glade: fix padding of the label_format
* message-list.c (ml_tree_value_at): Don't keep message infos
reffed across calls, since this can cause badness after a
reconfigure. Instead, just strdup the needed values and free those
on the next call.
* mail-tools.c (mail_tool_get_root_of_store): Unused, remove.
(mail_tool_get_inbox): use camel_store_get_inbox.
* evolution-outlook-importer.c (load_file_fn):
* evolution-mbox-importer.c (load_file_fn): Use
mail_tool_get_local_inbox() instead of mail_importer_get_folder()
* mail-importer.c (mail_importer_get_folder): Removed
svn path=/trunk/; revision=8147
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 55 |
1 files changed, 16 insertions, 39 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 1dc13c5f2e..cb4325ca70 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -106,14 +106,6 @@ mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name, return NULL; } - /*camel_service_connect (CAMEL_SERVICE (store), ex); - *if (camel_exception_is_set (ex)) { - * camel_object_unref (CAMEL_OBJECT (store)); - * mail_tool_camel_lock_down(); - * return NULL; - *} - */ - folder = camel_store_get_folder (store, name, flags, ex); camel_object_unref (CAMEL_OBJECT (store)); mail_tool_camel_lock_down(); @@ -161,8 +153,22 @@ mail_tool_get_local_inbox (CamelException *ex) CamelFolder * mail_tool_get_inbox (const gchar *url, CamelException *ex) { - /* FIXME: should be smarter? get_default_folder, etc */ - return mail_tool_get_folder_from_urlname (url, "inbox", 0, ex); + CamelStore *store; + CamelFolder *folder; + + mail_tool_camel_lock_up(); + + store = camel_session_get_store (session, url, ex); + if (!store) { + mail_tool_camel_lock_down(); + return NULL; + } + + folder = camel_store_get_inbox (store, ex); + camel_object_unref (CAMEL_OBJECT (store)); + mail_tool_camel_lock_down(); + + return folder; } @@ -296,35 +302,6 @@ mail_tool_filter_get_folder_func (CamelFilterDriver *d, const char *uri, void *d } CamelFolder * -mail_tool_get_root_of_store (const char *source_uri, CamelException *ex) -{ - CamelStore *store; - CamelFolder *folder; - - mail_tool_camel_lock_up(); - - store = camel_session_get_store (session, source_uri, ex); - if (!store) { - mail_tool_camel_lock_down (); - return NULL; - } - - /*camel_service_connect (CAMEL_SERVICE (store), ex); - *if (camel_exception_is_set (ex)) { - * camel_object_unref (CAMEL_OBJECT (store)); - * mail_tool_camel_lock_down(); - * return NULL; - *} - */ - - folder = camel_store_get_root_folder (store, ex); - camel_object_unref (CAMEL_OBJECT (store)); - mail_tool_camel_lock_down(); - - return folder; -} - -CamelFolder * mail_tool_uri_to_folder (const char *uri, CamelException *ex) { CamelURL *url; |