Changed IdCard.IsNoIdentity to IdCard.is_no_identity
authorDan Breslau <dbreslau@painless-security.com>
Mon, 8 Aug 2016 18:45:42 +0000 (14:45 -0400)
committerDan Breslau <dbreslau@painless-security.com>
Mon, 8 Aug 2016 18:45:42 +0000 (14:45 -0400)
src/moonshot-id.vala
src/moonshot-identities-manager.vala
src/moonshot-identity-management-view.vala

index eae892f..45f3a83 100644 (file)
@@ -112,7 +112,7 @@ public class IdCard : Object
 
     public bool store_password { get; set; default = false; }
 
-    public bool IsNoIdentity() 
+    public bool is_no_identity() 
     {
         return (display_name == NO_IDENTITY);
     }
index 488d22c..1f390cc 100644 (file)
@@ -96,14 +96,14 @@ public class IdentityManagerModel : Object {
         identities.sort((a, b) => {
                 IdCard id_a = (IdCard )a;
                 IdCard id_b = (IdCard )b;
-                if (id_a.IsNoIdentity() && !id_b.IsNoIdentity()) {
+                if (id_a.is_no_identity() && !id_b.is_no_identity()) {
                     return -1;
-                } else if (id_b.IsNoIdentity() && !id_a.IsNoIdentity()) {
+                } else if (id_b.is_no_identity() && !id_a.is_no_identity()) {
                     return 1;
                 }
                 return strcmp(id_a.display_name, id_b.display_name);
             });
-        if (identities.is_empty || !identities[0].IsNoIdentity())
+        if (identities.is_empty || !identities[0].is_no_identity())
             identities.insert(0, IdCard.NewNoIdentity());
         foreach (IdCard id_card in identities) {
             if (!id_card.store_password) {
@@ -260,7 +260,7 @@ public class IdentityManagerModel : Object {
         foreach (IdCard card in this.store.get_card_list()) {
             // The 'NoIdentity' card is non-trivial if it has services or rules.
             // All other cards are automatically non-trivial.
-            if ((!card.IsNoIdentity()) || 
+            if ((!card.is_no_identity()) || 
                 (card.services.length > 0) ||
                 (card.rules.length > 0)) {
                 return true;
index 0f4c942..35dcd5f 100644 (file)
@@ -511,7 +511,7 @@ public class IdentityManagerView : Window {
         IdCard retval = identity;
         bool idcard_has_pw = (identity.password != null) && (identity.password != "");
         bool request_has_pw = (request.password != null) && (request.password != "");
-        if ((!idcard_has_pw) && (!identity.IsNoIdentity())) {
+        if ((!idcard_has_pw) && (!identity.is_no_identity())) {
             if (request_has_pw) {
                 identity.password = request.password;
                 retval = model.update_card(identity);
@@ -566,7 +566,7 @@ public class IdentityManagerView : Window {
         filter.refilter();
         redraw_id_card_widgets();
 
-        if ((identity != null) && (!identity.IsNoIdentity()))
+        if ((identity != null) && (!identity.is_no_identity()))
             parent_app.default_id_card = identity;
 
         request.return_identity(identity, remember_identity_binding.active);