From a6135216493f33da3458e6befd221e41a1e3a054 Mon Sep 17 00:00:00 2001 From: Dan Breslau Date: Mon, 8 Aug 2016 14:45:42 -0400 Subject: [PATCH] Changed IdCard.IsNoIdentity to IdCard.is_no_identity --- src/moonshot-id.vala | 2 +- src/moonshot-identities-manager.vala | 8 ++++---- src/moonshot-identity-management-view.vala | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/moonshot-id.vala b/src/moonshot-id.vala index eae892f..45f3a83 100644 --- a/src/moonshot-id.vala +++ b/src/moonshot-id.vala @@ -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); } diff --git a/src/moonshot-identities-manager.vala b/src/moonshot-identities-manager.vala index 488d22c..1f390cc 100644 --- a/src/moonshot-identities-manager.vala +++ b/src/moonshot-identities-manager.vala @@ -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; diff --git a/src/moonshot-identity-management-view.vala b/src/moonshot-identity-management-view.vala index 0f4c942..35dcd5f 100644 --- a/src/moonshot-identity-management-view.vala +++ b/src/moonshot-identity-management-view.vala @@ -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); -- 2.1.4