diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-18 09:21:22 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:51 +0800 |
commit | 9b59286ea42a3db8b5d76f4e388b8691340b034c (patch) | |
tree | eb333208a2d7e3cb8deb2f461fb90bbddbb10eb6 /mail/mail-vfolder.c | |
parent | 87e18345094a649f2d6940d1ebd12b79454d7a94 (diff) | |
download | gsoc2013-evolution-9b59286ea42a3db8b5d76f4e388b8691340b034c.tar gsoc2013-evolution-9b59286ea42a3db8b5d76f4e388b8691340b034c.tar.gz gsoc2013-evolution-9b59286ea42a3db8b5d76f4e388b8691340b034c.tar.bz2 gsoc2013-evolution-9b59286ea42a3db8b5d76f4e388b8691340b034c.tar.lz gsoc2013-evolution-9b59286ea42a3db8b5d76f4e388b8691340b034c.tar.xz gsoc2013-evolution-9b59286ea42a3db8b5d76f4e388b8691340b034c.tar.zst gsoc2013-evolution-9b59286ea42a3db8b5d76f4e388b8691340b034c.zip |
Use new CamelService:display-name property.
Simplify, simplify...
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r-- | mail/mail-vfolder.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 64b31f3497..a24d9dcb45 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -208,11 +208,10 @@ struct _adduri_msg { static gchar * vfolder_adduri_desc (struct _adduri_msg *m) { - EAccount *account; CamelStore *store; + CamelService *service; EMailSession *session; const gchar *display_name; - const gchar *uid; gchar *folder_name; gchar *description; gboolean success; @@ -226,13 +225,8 @@ vfolder_adduri_desc (struct _adduri_msg *m) if (!success) return NULL; - uid = camel_service_get_uid (CAMEL_SERVICE (store)); - account = e_get_account_by_uid (uid); - - if (account != NULL) - display_name = account->name; - else - display_name = _("On This Computer"); + service = CAMEL_SERVICE (store); + display_name = camel_service_get_display_name (service); description = g_strdup_printf ( _("Updating Search Folders for '%s' : %s"), @@ -1123,9 +1117,10 @@ vfolder_load_storage (EMailBackend *backend) service = camel_session_add_service ( CAMEL_SESSION (session), "vfolder", storeuri, CAMEL_PROVIDER_STORE, NULL); - if (service != NULL) + if (service != NULL) { + camel_service_set_display_name (service, _("Search Folders")); em_utils_connect_service_sync (service, NULL, NULL); - else { + } else { g_warning("Cannot open vfolder store - no vfolders available"); return; } @@ -1162,7 +1157,7 @@ vfolder_load_storage (EMailBackend *backend) G_CALLBACK (context_rule_removed), context); /* load store to mail component */ - e_mail_store_add (session, vfolder_store, _("Search Folders")); + e_mail_store_add (session, vfolder_store); /* and setup the rules we have */ rule = NULL; |