[evolution-patches] Fix for bug#221270 [UIHACKFEST]



Hi

Attached Fix for bug#221270 - Send & Receive -dialog should show also
account name for usability reasons

Please Review

Thanks,
Rohini


Index: mail-send-recv.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-send-recv.c,v
retrieving revision 1.105
diff -u -p -r1.105 mail-send-recv.c
--- mail-send-recv.c	6 Jan 2006 15:08:37 -0000	1.105
+++ mail-send-recv.c	12 Jan 2006 10:44:17 -0000
@@ -255,19 +255,28 @@ static void operation_status(CamelOperat
 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, Ca
 			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, Ca
 			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 ();
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3768
diff -u -p -r1.3768 ChangeLog
--- ChangeLog	10 Jan 2006 08:10:29 -0000	1.3768
+++ ChangeLog	12 Jan 2006 10:49:57 -0000
@@ -1,3 +1,8 @@
+2006-01-12  Rohini S  <srohini novell com>
+	* mail-send-recv.c: (format_url), (build_dialog):
+	Changed to display account name in Send/Receive dialog.
+	Fixes bug 221270.
+
 2006-01-10  Simon Zheng  <simon zheng sun com>
 
 	* em-composer-utils.c:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]