aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 19:51:45 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:05 +0800
commit0341ec5c9eb1394b9de36d53150916c98340861a (patch)
tree9cb9ea176e671878bb23e63681294abc40822964 /mail
parent390555c6a4ff70c6200942b60e51ce8fd444674f (diff)
downloadgsoc2013-evolution-0341ec5c9eb1394b9de36d53150916c98340861a.tar.gz
gsoc2013-evolution-0341ec5c9eb1394b9de36d53150916c98340861a.tar.zst
gsoc2013-evolution-0341ec5c9eb1394b9de36d53150916c98340861a.zip
em-utils.c: Simplify guess_account_from_folder().
Diffstat (limited to 'mail')
-rw-r--r--mail/em-utils.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 448dcf8320..676a0f69db 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -2218,21 +2218,13 @@ em_utils_url_unescape_amp (const gchar *url)
static EAccount *
guess_account_from_folder (CamelFolder *folder)
{
- CamelService *service;
- CamelStore *parent_store;
- EAccount *account;
- CamelURL *url;
- gchar *source_url;
-
- parent_store = camel_folder_get_parent_store (folder);
- service = CAMEL_SERVICE (parent_store);
+ CamelStore *store;
+ const gchar *uid;
- url = camel_service_get_camel_url (service);
- source_url = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- account = e_get_account_by_source_url (source_url);
- g_free (source_url);
+ store = camel_folder_get_parent_store (folder);
+ uid = camel_service_get_uid (CAMEL_SERVICE (store));
- return account;
+ return e_get_account_by_uid (uid);
}
static EAccount *