[evolution/wip/webkit2] Bug 765857 - Allow blank "Full Name" for email account ][
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 765857 - Allow blank "Full Name" for email account ][
- Date: Tue, 31 May 2016 12:08:47 +0000 (UTC)
commit 2152c8b09bf19b75d4a37cd3480b094ef66af25d
Author: Milan Crha <mcrha redhat com>
Date: Mon May 9 10:36:49 2016 +0200
Bug 765857 - Allow blank "Full Name" for email account ][
Accounts without filled Full Name were missing in the list of accounts
for the From address and for an Organizer in respective dialogs.
calendar/gui/itip-utils.c | 15 +++++++++++----
e-util/e-mail-identity-combo-box.c | 7 +++++--
2 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index f3d639f..5a688b0 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -147,10 +147,13 @@ itip_get_user_identities (ESourceRegistry *registry)
name = e_source_mail_identity_get_name (extension);
address = e_source_mail_identity_get_address (extension);
- if (name == NULL || address == NULL)
+ if (!address)
continue;
- identities[ii++] = g_strdup_printf ("%s <%s>", name, address);
+ if (name && *name)
+ identities[ii++] = g_strdup_printf ("%s <%s>", name, address);
+ else
+ identities[ii++] = g_strdup_printf ("%s", address);
}
g_list_free_full (list, (GDestroyNotify) g_object_unref);
@@ -198,8 +201,12 @@ itip_get_fallback_identity (ESourceRegistry *registry)
name = e_source_mail_identity_get_name (mail_identity);
address = e_source_mail_identity_get_address (mail_identity);
- if (name != NULL && address != NULL)
- identity = g_strdup_printf ("%s <%s>", name, address);
+ if (address != NULL) {
+ if (name && *name)
+ identity = g_strdup_printf ("%s <%s>", name, address);
+ else
+ identity = g_strdup_printf ("%s", address);
+ }
g_object_unref (source);
diff --git a/e-util/e-mail-identity-combo-box.c b/e-util/e-mail-identity-combo-box.c
index 7e52291..9320d13 100644
--- a/e-util/e-mail-identity-combo-box.c
+++ b/e-util/e-mail-identity-combo-box.c
@@ -437,7 +437,7 @@ e_mail_identity_combo_box_refresh (EMailIdentityComboBox *combo_box)
name = e_source_mail_identity_get_name (extension);
address = e_source_mail_identity_get_address (extension);
- if (name == NULL || address == NULL)
+ if (address == NULL)
continue;
queue = g_hash_table_lookup (address_table, address);
@@ -446,7 +446,10 @@ e_mail_identity_combo_box_refresh (EMailIdentityComboBox *combo_box)
uid = e_source_get_uid (source);
string = g_string_sized_new (512);
- g_string_append_printf (string, "%s <%s>", name, address);
+ if (name && *name)
+ g_string_append_printf (string, "%s <%s>", name, address);
+ else
+ g_string_append_printf (string, "%s", address);
/* Show the account name for duplicate email addresses. */
if (queue != NULL && g_queue_get_length (queue) > 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]