[balsa] Correctly initialize the identity combo-box



commit f3eb4ad9c76874a995d32fdea69974c559ddddf9
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Mar 13 14:41:07 2017 -0400

    Correctly initialize the identity combo-box
    
        * libbalsa/identity.c (libbalsa_identity_combo_box): compare
        active name with the identity name, not the parenthesized
        version

 ChangeLog           |    6 ++++++
 libbalsa/identity.c |    6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b9322a2..3ab99ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-13  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * libbalsa/identity.c (libbalsa_identity_combo_box): compare
+       active name with the identity name, not the parenthesized
+       version
+
 2017-03-10  Peter Bloomfield  <pbloomfield bellsouth net>
 
        * libbalsa/mailbox_local.c (lbml_load_messages_idle_cb): clear
diff --git a/libbalsa/identity.c b/libbalsa/identity.c
index 7fe6913..0f8085b 100644
--- a/libbalsa/identity.c
+++ b/libbalsa/identity.c
@@ -2224,11 +2224,11 @@ libbalsa_identity_combo_box(GList       * identities,
                            2, ident,
                            -1);
 
-        if (active_name && strcmp(active_name, name) == 0)
-            gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo_box), &iter);
-
         g_free(from);
         g_free(name);
+
+        if (active_name != NULL && strcmp(active_name, ident->identity_name) == 0)
+            gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo_box), &iter);
     }
     g_object_unref(store);
 


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