1
From 9647768f6caf2180026c0206be2476ccc77eaccf Mon Sep 17 00:00:00 2001
2
From: Stephen Paul Weber <singpolyma@singpolyma.net>
3
Date: Thu, 21 Apr 2011 22:10:23 -0500
4
Subject: [PATCH 06/18] Display verified keyID in roster
7
src/fe-common/fe-rosters.c | 9 ++++++---
8
src/fe-common/module-formats.c | 3 ++-
9
src/fe-common/module-formats.h | 1 +
10
3 files changed, 9 insertions(+), 4 deletions(-)
12
--- a/src/fe-common/fe-rosters.c
13
+++ b/src/fe-common/fe-rosters.c
17
XMPP_ROSTER_RESOURCE_REC *resource;
18
- char *show, *status, *status_str, *priority, *text;
19
+ char *show, *status, *status_str, *priority, *text, *pgp_keyid;
24
XMPPTXT_FORMAT_RESOURCE_STATUS, status_str);
26
priority = g_strdup_printf("%d", resource->priority);
27
+ pgp_keyid = !resource->pgp_keyid ? NULL : \
28
+ format_get_text(MODULE_NAME, NULL, server, NULL,
29
+ XMPPTXT_FORMAT_PGP_KEYID, resource->pgp_keyid);
30
text = format_get_text(MODULE_NAME, NULL, server, NULL,
31
XMPPTXT_FORMAT_RESOURCE, show, resource->name, priority,
38
priority = g_strdup_printf("%d", server->priority);
39
text = format_get_text(MODULE_NAME, NULL, server, NULL,
40
XMPPTXT_FORMAT_RESOURCE, show, server->resource, priority,
42
+ status, settings_get_str("xmpp_pgp"));
46
--- a/src/fe-common/module-formats.c
47
+++ b/src/fe-common/module-formats.c
50
{ "format_name", "{nick $0} {nickhost $1}", 2, { 0, 0 } },
51
{ "format_jid", "{nick $0}", 1, { 0 } },
52
- { "format_resource", "{comment $0{hilight $1}($2)$3}", 4, { 0, 0, 0, 0 } },
53
+ { "format_resource", "{comment $0{hilight $1}($2)$4$3}", 5, { 0, 0, 0, 0, 0 } },
54
{ "format_resource_show", "($0)", 1, { 0 } },
55
{ "format_resource_status", ": $0", 1, { 0 } },
56
{ "format_subscription", "(subscription: $0)", 1, { 0 } },
57
+ { "format_pgp_keyid", "(pgp: $0)", 1, { 0 } },
60
{ NULL, "Roster", 0, { 0 } },
61
--- a/src/fe-common/module-formats.h
62
+++ b/src/fe-common/module-formats.h
64
XMPPTXT_FORMAT_RESOURCE_SHOW,
65
XMPPTXT_FORMAT_RESOURCE_STATUS,
66
XMPPTXT_FORMAT_SUBSCRIPTION,
67
+ XMPPTXT_FORMAT_PGP_KEYID,