Avoid using the 'No Identity' card as the default identity. LP 1294559
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Wed, 19 Mar 2014 09:35:20 +0000 (05:35 -0400)
committerKevin Wasserman <kevin.wasserman@painless-security.com>
Wed, 19 Mar 2014 09:35:20 +0000 (05:35 -0400)
src/moonshot-identity-management-view.vala
src/moonshot-identity-manager-app.vala

index 37d30e1..4eebbda 100644 (file)
@@ -520,7 +520,7 @@ public class IdentityManagerView : Window {
         filter.refilter();
         redraw_id_card_widgets ();
 
         filter.refilter();
         redraw_id_card_widgets ();
 
-        if (identity != null)
+        if ((identity != null) && (!identity.IsNoIdentity()))
             parent_app.default_id_card = identity;
 
         request.return_identity (identity);
             parent_app.default_id_card = identity;
 
         request.return_identity (identity);
index a9a4c33..cbe1e43 100644 (file)
@@ -62,7 +62,7 @@ public class IdentityManagerApp {
             view = new IdentityManagerView(this);
         LinkedList<IdCard> card_list = model.get_card_list() ;
         if (card_list.size > 0)
             view = new IdentityManagerView(this);
         LinkedList<IdCard> card_list = model.get_card_list() ;
         if (card_list.size > 0)
-            this.default_id_card = card_list.first();
+            this.default_id_card = card_list.last();
 
         init_ipc_server ();
 
 
         init_ipc_server ();