[seahorse] pgp: Don't load signatures unless showing key properties



commit 6072b306123008647a640ede6883e63ed5a675e0
Author: Stef Walter <stefw collabora co uk>
Date:   Mon Nov 14 09:31:14 2011 +0100

    pgp: Don't load signatures unless showing key properties
    
    https://bugzilla.gnome.org/show_bug.cgi?id=662088

 pgp/seahorse-gpgme-key.c          |    8 +++++++-
 pgp/seahorse-gpgme-key.h          |    2 ++
 pgp/seahorse-pgp-key-properties.c |    4 +++-
 3 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/pgp/seahorse-gpgme-key.c b/pgp/seahorse-gpgme-key.c
index 89f086f..f2875e6 100644
--- a/pgp/seahorse-gpgme-key.c
+++ b/pgp/seahorse-gpgme-key.c
@@ -157,7 +157,7 @@ require_key_private (SeahorseGpgmeKey *self)
 static gboolean
 require_key_uids (SeahorseGpgmeKey *self)
 {
-	return require_key_public (self, GPGME_KEYLIST_MODE_LOCAL | GPGME_KEYLIST_MODE_SIGS);
+	return require_key_public (self, GPGME_KEYLIST_MODE_LOCAL);
 }
 
 static gboolean
@@ -364,6 +364,12 @@ seahorse_gpgme_key_realize (SeahorseGpgmeKey *self)
 }
 
 void
+seahorse_gpgme_key_ensure_signatures (SeahorseGpgmeKey *self)
+{
+	require_key_public (self, GPGME_KEYLIST_MODE_LOCAL | GPGME_KEYLIST_MODE_SIGS);
+}
+
+void
 seahorse_gpgme_key_refresh (SeahorseGpgmeKey *self)
 {
 	if (self->pv->pubkey)
diff --git a/pgp/seahorse-gpgme-key.h b/pgp/seahorse-gpgme-key.h
index 012d24c..c8c204e 100644
--- a/pgp/seahorse-gpgme-key.h
+++ b/pgp/seahorse-gpgme-key.h
@@ -57,6 +57,8 @@ void              seahorse_gpgme_key_refresh              (SeahorseGpgmeKey *sel
 
 void              seahorse_gpgme_key_realize              (SeahorseGpgmeKey *self);
 
+void              seahorse_gpgme_key_ensure_signatures    (SeahorseGpgmeKey *self);
+
 GType             seahorse_gpgme_key_get_type             (void);
 
 gpgme_key_t       seahorse_gpgme_key_get_public           (SeahorseGpgmeKey *self);
diff --git a/pgp/seahorse-pgp-key-properties.c b/pgp/seahorse-pgp-key-properties.c
index 0b6d097..58bbc3b 100644
--- a/pgp/seahorse-pgp-key-properties.c
+++ b/pgp/seahorse-pgp-key-properties.c
@@ -1984,8 +1984,10 @@ seahorse_pgp_key_properties_show (SeahorsePgpKey *pkey, GtkWindow *parent)
 	SeahorseWidget *swidget;
 
 	/* This causes the key source to get any specific info about the key */
-	if (SEAHORSE_IS_GPGME_KEY (pkey))
+	if (SEAHORSE_IS_GPGME_KEY (pkey)) {
 		seahorse_gpgme_key_refresh (SEAHORSE_GPGME_KEY (pkey));
+		seahorse_gpgme_key_ensure_signatures (SEAHORSE_GPGME_KEY (pkey));
+	}
 
 	if (seahorse_object_get_usage (SEAHORSE_OBJECT (pkey)) == SEAHORSE_USAGE_PUBLIC_KEY)
 		swidget = setup_public_properties (pkey, parent);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]