[geary] Fix Composer not correctly handling multiple account sender mailboxes
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Fix Composer not correctly handling multiple account sender mailboxes
- Date: Fri, 8 Feb 2019 06:00:16 +0000 (UTC)
commit fc8f0b6f16d64bda28cc0162d2c5cc25aefca814
Author: Michael Gratton <mike vee net>
Date: Fri Feb 8 16:59:20 2019 +1100
Fix Composer not correctly handling multiple account sender mailboxes
src/client/composer/composer-widget.vala | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 05da827d..c01581b7 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -2005,22 +2005,13 @@ public class ComposerWidget : Gtk.EventBox {
}
private bool add_account_emails_to_from_list(Geary.Account other_account, bool set_active = false) {
- Geary.RFC822.MailboxAddresses primary_address = new Geary.RFC822.MailboxAddresses.single(
- other_account.information.primary_mailbox);
- this.from_multiple.append_text(primary_address.to_full_display());
- this.from_list.add(new FromAddressMap(other_account, primary_address));
- if (!set_active && this.from.equal_to(primary_address)) {
- this.from_multiple.set_active(this.from_list.size - 1);
- set_active = true;
- }
-
bool is_primary = true;
- foreach (Geary.RFC822.MailboxAddress alternate_mailbox in
+ foreach (Geary.RFC822.MailboxAddress mailbox in
other_account.information.sender_mailboxes) {
Geary.RFC822.MailboxAddresses addresses =
- new Geary.RFC822.MailboxAddresses.single(alternate_mailbox);
+ new Geary.RFC822.MailboxAddresses.single(mailbox);
- string display = primary_address.to_full_display();
+ string display = mailbox.to_full_display();
if (!is_primary) {
// Displayed in the From dropdown to indicate an
// "alternate email address" for an account. The first
@@ -2030,9 +2021,8 @@ public class ComposerWidget : Gtk.EventBox {
display = _("%1$s via %2$s").printf(
display, other_account.information.display_name
);
- } else {
- is_primary = false;
}
+ is_primary = false;
this.from_multiple.append_text(display);
this.from_list.add(new FromAddressMap(other_account, addresses));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]