static void seahorse_pgp_signature_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SeahorsePgpSignature *self = SEAHORSE_PGP_SIGNATURE (object); switch (prop_id) { case PROP_KEYID: seahorse_pgp_signature_set_keyid (self, g_value_get_string (value)); break; case PROP_FLAGS: seahorse_pgp_signature_set_flags (self, g_value_get_uint (value)); break; } }
static void realize_signatures (SeahorseGpgmeUid *self) { gpgme_key_sig_t gsig; SeahorsePgpSignature *sig; GList *sigs = NULL; guint flags; g_return_if_fail (self->pv->pubkey); g_return_if_fail (self->pv->userid); /* If this key was loaded without signatures, then leave them as is */ if ((self->pv->pubkey->keylist_mode & GPGME_KEYLIST_MODE_SIGS) == 0) return; for (gsig = self->pv->userid->signatures; gsig; gsig = gsig->next) { sig = seahorse_pgp_signature_new (gsig->keyid); /* Order of parsing these flags is important */ flags = 0; if (gsig->revoked) flags |= SEAHORSE_FLAG_REVOKED; if (gsig->expired) flags |= SEAHORSE_FLAG_EXPIRED; if (flags == 0 && !gsig->invalid) flags = SEAHORSE_FLAG_IS_VALID; if (gsig->exportable) flags |= SEAHORSE_FLAG_EXPORTABLE; seahorse_pgp_signature_set_flags (sig, flags); sigs = g_list_prepend (sigs, sig); } seahorse_pgp_uid_set_signatures (SEAHORSE_PGP_UID (self), sigs); seahorse_object_list_free (sigs); }