Index: libseahorse/seahorse-pgp-key.c
===================================================================
RCS file: /cvs/gnome/seahorse/libseahorse/seahorse-pgp-key.c,v
retrieving revision 1.8
diff -u -r1.8 seahorse-pgp-key.c
--- libseahorse/seahorse-pgp-key.c	30 Oct 2005 22:44:00 -0000	1.8
+++ libseahorse/seahorse-pgp-key.c	10 Nov 2005 03:26:09 -0000
@@ -49,6 +49,7 @@
 /* SeahorseKey methods */
 static guint key_get_num_names (SeahorseKey *skey);
 static gchar* key_get_name (SeahorseKey *skey, guint uid);
+static gchar* key_get_display_name(SeahorseKey *skey, guint uid);
 static gchar* key_get_name_cn (SeahorseKey *skey, guint uid);
 
 /* Other forward declarations */
@@ -190,7 +191,7 @@
         g_value_set_pointer (value, pkey->seckey);
         break;
     case PROP_DISPLAY_NAME:
-        g_value_take_string (value, key_get_name(SEAHORSE_KEY (pkey), 0));
+        g_value_take_string (value, key_get_display_name(SEAHORSE_KEY (pkey), 0));
         break;
     case PROP_SIMPLE_NAME:        
         g_value_take_string (value, seahorse_pgp_key_get_userid_name (pkey, 0));
@@ -267,7 +268,6 @@
 	
 	return index;        
 }
-
 static gchar* 
 key_get_name (SeahorseKey *skey, guint index)
 {
@@ -279,6 +279,30 @@
 
     uid = seahorse_pgp_key_get_nth_userid (pkey, index);
 	return uid ? convert_string (uid->uid) : NULL;
+}
+
+static gchar* 
+key_get_display_name (SeahorseKey *skey, guint index)
+{
+    SeahorsePGPKey *pkey;
+    gpgme_user_id_t uid;
+    gchar *name;
+    
+    g_return_val_if_fail (SEAHORSE_IS_PGP_KEY (skey), NULL);
+    pkey = SEAHORSE_PGP_KEY (skey);
+
+    uid = seahorse_pgp_key_get_nth_userid (pkey, index);
+    
+    if(uid != NULL) {
+        if (strlen(uid->email) || strlen(uid->comment)){
+            return convert_string(uid->uid);
+        } else {
+            name = g_strdup_printf ("%s %s", uid->name, seahorse_key_get_short_keyid(skey));
+            return convert_string(name);
+        }
+    }
+    
+    return NULL;
 }
 
 static gchar* 
