From 55c2d1cc21974936e5b431de49ae81e6fc3845be Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 25 Aug 2015 23:04:21 +0100 Subject: PGP: Display whether contact public key was received or manually set --- src/command/command.c | 4 ++-- src/command/commands.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/command') diff --git a/src/command/command.c b/src/command/command.c index 95fff417..58a2e295 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1157,8 +1157,8 @@ static struct cmd_t command_defs[] = CMD_ARGS( { "libver", "Show which version of the libgpgme library is being used." }, { "keys", "List all keys known to the system." }, - { "contacts", "Show contacts with assigned public keys." }, - { "setkey ", "Manually associate a key ID with a JID." }, + { "contacts", "Show contacts with assigned public keys." }, + { "setkey ", "Manually associate a contact with a public key." }, { "start []", "Start PGP encrypted chat, current contact will be used if not specified." }, { "end", "End PGP encrypted chat with the current recipient." }, { "log on|off", "Enable or disable plaintext logging of PGP encrypted messages." }, diff --git a/src/command/commands.c b/src/command/commands.c index 5143329e..99770abd 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -4287,8 +4287,12 @@ cmd_pgp(ProfWin *window, const char * const command, gchar **args) GList *curr = jids; while (curr) { char *jid = curr->data; - char *pubkey = g_hash_table_lookup(pubkeys, jid); - cons_show(" %s: %s", jid, pubkey); + ProfPGPPubKeyId *pubkeyid = g_hash_table_lookup(pubkeys, jid); + if (pubkeyid->received) { + cons_show(" %s: %s (received)", jid, pubkeyid->id); + } else { + cons_show(" %s: %s (stored)", jid, pubkeyid->id); + } curr = g_list_next(curr); } g_list_free(jids); -- cgit 1.4.1-2-gfad0