aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-01-31 00:00:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-01-31 00:13:45 +0800
commit8fb84dda1293997250313223fb106cf845b09626 (patch)
tree8dd4309db6ee9f4109cc37da5c68c9b97274f9d8 /libemail-engine
parent0ec1a44c9fabcca0b3a8d025c4caf337ae2d33af (diff)
downloadgsoc2013-evolution-8fb84dda1293997250313223fb106cf845b09626.tar
gsoc2013-evolution-8fb84dda1293997250313223fb106cf845b09626.tar.gz
gsoc2013-evolution-8fb84dda1293997250313223fb106cf845b09626.tar.bz2
gsoc2013-evolution-8fb84dda1293997250313223fb106cf845b09626.tar.lz
gsoc2013-evolution-8fb84dda1293997250313223fb106cf845b09626.tar.xz
gsoc2013-evolution-8fb84dda1293997250313223fb106cf845b09626.tar.zst
gsoc2013-evolution-8fb84dda1293997250313223fb106cf845b09626.zip
e-mail-store-utils.c: Use the service's display name in status messages.
The display name is a user-provided name for the service. We should be using that in all status messages the refer to the service by name.
Diffstat (limited to 'libemail-engine')
-rw-r--r--libemail-engine/e-mail-store-utils.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/libemail-engine/e-mail-store-utils.c b/libemail-engine/e-mail-store-utils.c
index 757f86dfd5..2f5b044426 100644
--- a/libemail-engine/e-mail-store-utils.c
+++ b/libemail-engine/e-mail-store-utils.c
@@ -156,15 +156,17 @@ mail_store_go_offline_thread (GSimpleAsyncResult *simple,
GCancellable *cancellable)
{
CamelService *service;
- gchar *service_name;
+ const gchar *display_name;
GError *error = NULL;
service = CAMEL_SERVICE (store);
- service_name = camel_service_get_name (service, TRUE);
+ display_name = camel_service_get_display_name (service);
+ if (display_name == NULL || *display_name == '\0')
+ display_name = G_OBJECT_TYPE_NAME (service);
+
camel_operation_push_message (
- cancellable, _("Disconnecting from '%s'"), service_name);
- g_free (service_name);
+ cancellable, _("Disconnecting from '%s'"), display_name);
if (CAMEL_IS_DISCO_STORE (store)) {
CamelDiscoStore *disco_store;
@@ -245,15 +247,17 @@ mail_store_go_online_thread (GSimpleAsyncResult *simple,
GCancellable *cancellable)
{
CamelService *service;
- gchar *service_name;
+ const gchar *display_name;
GError *error = NULL;
service = CAMEL_SERVICE (store);
- service_name = camel_service_get_name (service, TRUE);
+ display_name = camel_service_get_display_name (service);
+ if (display_name == NULL || *display_name == '\0')
+ display_name = G_OBJECT_TYPE_NAME (service);
+
camel_operation_push_message (
- cancellable, _("Reconnecting to '%s'"), service_name);
- g_free (service_name);
+ cancellable, _("Reconnecting to '%s'"), display_name);
if (CAMEL_IS_DISCO_STORE (store))
camel_disco_store_set_status (
@@ -318,16 +322,18 @@ mail_store_prepare_for_offline_thread (GSimpleAsyncResult *simple,
GCancellable *cancellable)
{
CamelService *service;
- gchar *service_name;
+ const gchar *display_name;
GError *error = NULL;
service = CAMEL_SERVICE (store);
- service_name = camel_service_get_name (service, TRUE);
+ display_name = camel_service_get_display_name (service);
+ if (display_name == NULL || *display_name == '\0')
+ display_name = G_OBJECT_TYPE_NAME (service);
+
camel_operation_push_message (
cancellable, _("Preparing account '%s' for offline"),
- service_name);
- g_free (service_name);
+ display_name);
if (CAMEL_IS_DISCO_STORE (store))
camel_disco_store_prepare_for_offline (