X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fmoonshot-identities-manager.vala;h=e434503e54fbf5979ece6d5d99210fd4d8367249;hb=7297b4e1e4ebbac6f36ce312f005a3f306f78cf9;hp=51f9d6466b7b59c166355d73ad3f5feb295bbd09;hpb=0e8e93eb82c55d2e8efa1edc21f4f142036e0be4;p=moonshot-ui.git diff --git a/src/moonshot-identities-manager.vala b/src/moonshot-identities-manager.vala index 51f9d64..e434503 100644 --- a/src/moonshot-identities-manager.vala +++ b/src/moonshot-identities-manager.vala @@ -97,8 +97,16 @@ public class IdentityManagerModel : Object { } public bool HasNonTrivialIdentities() { - var identities = store.get_card_list(); - return !identities.is_empty; + 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()) || + (card.services.length > 0) || + (card.rules.length > 0)) { + return true; + } + } + return false; }