aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer-hdrs.c11
2 files changed, 17 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index b2492fd67c..e2a42efc6a 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-msg-composer-hdrs.c (create_optionmenu): Use "Full Name
+ <address>" for the label in the menu rather than the account
+ name. Specify the account name only if it's not the same as the
+ address.
+
2001-01-19 Jason Leach <jasonleach@usa.net>
* e-msg-composer-hdrs.c (create_addressbook_entry): Listen for
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index 834d63214a..4228bd5f4c 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -152,6 +152,7 @@ create_optionmenu (EMsgComposerHdrs *hdrs,
accounts = mail_config_get_accounts ();
while (accounts) {
const MailConfigAccount *account;
+ char *label;
account = accounts->data;
@@ -161,7 +162,15 @@ create_optionmenu (EMsgComposerHdrs *hdrs,
continue;
}
- item = gtk_menu_item_new_with_label (account->name);
+ if (strcmp (account->name, account->id->address))
+ label = g_strdup_printf ("%s <%s> (%s)", account->id->name,
+ account->id->address, account->name);
+ else
+ label = g_strdup_printf ("%s <%s>", account->id->name, account->id->address);
+
+ item = gtk_menu_item_new_with_label (label);
+ g_free (label);
+
gtk_object_set_data (GTK_OBJECT (item), "account", account_copy (account));
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC (from_changed), hdrs);