aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorRohini S <srohini@novell.com>2006-01-16 15:32:16 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-01-16 15:32:16 +0800
commit22c76b0d7487700ea00f5ec131faca887b389cbc (patch)
treef73d7e0d04e766c4aeae41c0a62de029fe37164a /mail
parent7d81874bbdbb65372d9298499f17f12280bb1e5a (diff)
downloadgsoc2013-evolution-22c76b0d7487700ea00f5ec131faca887b389cbc.tar
gsoc2013-evolution-22c76b0d7487700ea00f5ec131faca887b389cbc.tar.gz
gsoc2013-evolution-22c76b0d7487700ea00f5ec131faca887b389cbc.tar.bz2
gsoc2013-evolution-22c76b0d7487700ea00f5ec131faca887b389cbc.tar.lz
gsoc2013-evolution-22c76b0d7487700ea00f5ec131faca887b389cbc.tar.xz
gsoc2013-evolution-22c76b0d7487700ea00f5ec131faca887b389cbc.tar.zst
gsoc2013-evolution-22c76b0d7487700ea00f5ec131faca887b389cbc.zip
** Fixes bug #221270.
2006-01-12 Rohini S <srohini@novell.com> ** Fixes bug #221270. * mail-send-recv.c: (format_url), (build_dialog): Changed to display account name in Send/Receive dialog. svn path=/trunk/; revision=31199
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-send-recv.c38
2 files changed, 31 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 85253bca5f..dd70b33df2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
-2006-01-16 Srinivasa Ragavan <sragavan@novell.com>
+2006-01-12 Rohini S <srohini@novell.com>
+
+ ** Fixes bug #221270.
+ * mail-send-recv.c: (format_url), (build_dialog):
+ Changed to display account name in Send/Receive dialog.
+
+2006-01-16 Srinivasa Ragavan <sragavan@novell.com>
* em-format-html-display.c: (em_format_html_display_new): Changed
event to scroll_event in rajeev's patch.
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index ec1ab66eaa..2cb6338ab2 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -255,19 +255,28 @@ static void operation_status(CamelOperation *op, const char *what, int pc, void
static int operation_status_timeout(void *data);
static char *
-format_url(const char *internal_url)
+format_url(const char *internal_url, const char *account_name)
{
CamelURL *url;
char *pretty_url;
url = camel_url_new(internal_url, NULL);
- if (url->host && *url->host)
- pretty_url = g_strdup_printf(_("Server: %s, Type: %s"), url->host, url->protocol);
- else if (url->path)
- pretty_url = g_strdup_printf(_("Path: %s, Type: %s"), url->path, url->protocol);
- else
- pretty_url = g_strdup_printf(_("Type: %s"), url->protocol);
-
+ if (account_name) {
+ if (url->host && *url->host)
+ pretty_url = g_strdup_printf(_("<b>%s (%s)</b> : %s"), account_name, url->protocol, url->host);
+ else if (url->path)
+ pretty_url = g_strdup_printf(_("<b>%s (%s)</b> : %s"), account_name, url->protocol, url->path);
+ else
+ pretty_url = g_strdup_printf(_("<b>%s (%s)</b>"), account_name, url->protocol);
+ }
+ else {
+ if (url->host && *url->host)
+ pretty_url = g_strdup_printf(_("<b>%s</b> : %s"), url->protocol, url->host);
+ else if (url->path)
+ pretty_url = g_strdup_printf(_("<b>%s</b> : %s"), url->protocol, url->path);
+ else
+ pretty_url = g_strdup_printf(_("<b>%s</b>"), url->protocol);
+ }
camel_url_free(url);
return pretty_url;
@@ -404,9 +413,9 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
recv_icon = e_icon_factory_get_image ("stock_mail-receive", E_ICON_SIZE_LARGE_TOOLBAR);
-
- pretty_url = format_url (source->url);
- label = (GtkLabel *)gtk_label_new (pretty_url);
+ pretty_url = format_url (source->url, account->name);
+ label = (GtkLabel *)gtk_label_new (NULL);
+ gtk_label_set_markup (label, pretty_url);
g_free (pretty_url);
bar = (GtkProgressBar *)gtk_progress_bar_new ();
@@ -457,9 +466,10 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
send_icon = e_icon_factory_get_image ("stock_mail-send", E_ICON_SIZE_LARGE_TOOLBAR);
-
- pretty_url = format_url (destination);
- label = (GtkLabel *)gtk_label_new (pretty_url);
+ pretty_url = format_url (destination, NULL);
+ label = (GtkLabel *)gtk_label_new (NULL);
+ gtk_label_set_markup (label, pretty_url);
+
g_free (pretty_url);
bar = (GtkProgressBar *)gtk_progress_bar_new ();