aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-12 22:21:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-07-12 22:22:13 +0800
commit43c8c058a9449363d20470cb10889147a4613632 (patch)
tree632a2fddd5c8c839d2f2554b23b961a9ea0c35c2 /mail/mail-send-recv.c
parent03009ee631b98e9a9f9360e0853d05572fc8b36a (diff)
downloadgsoc2013-evolution-43c8c058a9449363d20470cb10889147a4613632.tar
gsoc2013-evolution-43c8c058a9449363d20470cb10889147a4613632.tar.gz
gsoc2013-evolution-43c8c058a9449363d20470cb10889147a4613632.tar.bz2
gsoc2013-evolution-43c8c058a9449363d20470cb10889147a4613632.tar.lz
gsoc2013-evolution-43c8c058a9449363d20470cb10889147a4613632.tar.xz
gsoc2013-evolution-43c8c058a9449363d20470cb10889147a4613632.tar.zst
gsoc2013-evolution-43c8c058a9449363d20470cb10889147a4613632.zip
Bug 332115 - Remove Camel module names from Send/Receive window
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c41
1 files changed, 14 insertions, 27 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 500e17e412..95e17ac500 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -384,33 +384,20 @@ format_url (CamelService *service)
g_return_val_if_fail (provider != NULL, NULL);
- if (display_name != NULL && *display_name != '\0') {
- if (host != NULL && *host != '\0')
- pretty_url = g_markup_printf_escaped (
- "<b>%s (%s)</b>: %s",
- display_name, provider->protocol, host);
- else if (path != NULL)
- pretty_url = g_markup_printf_escaped (
- "<b>%s (%s)</b>: %s",
- display_name, provider->protocol, path);
- else
- pretty_url = g_markup_printf_escaped (
- "<b>%s (%s)</b>",
- display_name, provider->protocol);
-
- } else {
- if (host != NULL && *host != '\0')
- pretty_url = g_markup_printf_escaped (
- "<b>%s</b>: %s",
- provider->protocol, host);
- else if (path != NULL)
- pretty_url = g_markup_printf_escaped (
- "<b>%s</b>: %s",
- provider->protocol, path);
- else
- pretty_url = g_markup_printf_escaped (
- "<b>%s</b>", provider->protocol);
- }
+ /* This should never happen, but if the service has no
+ * display name, fall back to the generic service name. */
+ if (display_name == NULL || *display_name == '\0')
+ display_name = camel_service_get_name (service, TRUE);
+
+ if (host != NULL && *host != '\0')
+ pretty_url = g_markup_printf_escaped (
+ "<b>%s</b>: %s", display_name, host);
+ else if (path != NULL)
+ pretty_url = g_markup_printf_escaped (
+ "<b>%s</b>: %s", display_name, path);
+ else
+ pretty_url = g_markup_printf_escaped (
+ "<b>%s</b>", display_name);
return pretty_url;
}