~ubuntu-branches/ubuntu/trusty/irssi-plugin-xmpp/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/singpolyma-0006-Display-verified-keyID-in-roster.patch

  • Committer: Package Import Robot
  • Author(s): Florian Schlichting, Florian Schlichting
  • Date: 2014-01-03 00:25:20 UTC
  • mfrom: (1.3.6)
  • Revision ID: package-import@ubuntu.com-20140103002520-zc3sfydzt1wp03i0
Tags: 0.52+git20140102-1
[ Florian Schlichting ]
* Import Upstream version 0.52+git20140102
* Add VCS-* fields for collab-maint on alioth
* Add upstream git URL to Source field in debian/copyright
* Drop patches plucked from upstream CVS
* Refresh hardening.patch (offset, drop hunk fixed upstream)
* Provide xmpp-admin.pl script by Seth Difley
* Add GTalk-MUC-support.patch, plucked from github/freemandrew
* Add support for XMPP-PGP, plucked from github/singpolyma
* New useless-dependency-on-libidn.patch, to fix a lintian warning
* Declare compliance with Debian Policy 3.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
 
 
6
---
 
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(-)
 
11
 
 
12
--- a/src/fe-common/fe-rosters.c
 
13
+++ b/src/fe-common/fe-rosters.c
 
14
@@ -65,7 +65,7 @@
 
15
        GSList *tmp;
 
16
        GString *resources;
 
17
        XMPP_ROSTER_RESOURCE_REC *resource;
 
18
-       char *show, *status, *status_str, *priority, *text;
 
19
+       char *show, *status, *status_str, *priority, *text, *pgp_keyid;
 
20
 
 
21
        if (list == NULL)
 
22
                return NULL;
 
23
@@ -82,9 +82,12 @@
 
24
                        XMPPTXT_FORMAT_RESOURCE_STATUS, status_str);
 
25
                g_free(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,
 
32
-                   status);
 
33
+                   status, pgp_keyid);
 
34
                g_free(show);
 
35
                g_free(status);
 
36
                g_free(priority);
 
37
@@ -144,7 +147,7 @@
 
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,
 
41
-           status);
 
42
+           status, settings_get_str("xmpp_pgp"));
 
43
        g_free(show);
 
44
        g_free(status);
 
45
        g_free(priority);
 
46
--- a/src/fe-common/module-formats.c
 
47
+++ b/src/fe-common/module-formats.c
 
48
@@ -26,10 +26,11 @@
 
49
 
 
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 } },
 
58
 
 
59
        /* ---- */
 
60
        { NULL, "Roster", 0, { 0 } },
 
61
--- a/src/fe-common/module-formats.h
 
62
+++ b/src/fe-common/module-formats.h
 
63
@@ -11,6 +11,7 @@
 
64
        XMPPTXT_FORMAT_RESOURCE_SHOW,
 
65
        XMPPTXT_FORMAT_RESOURCE_STATUS,
 
66
        XMPPTXT_FORMAT_SUBSCRIPTION,
 
67
+       XMPPTXT_FORMAT_PGP_KEYID,
 
68
 
 
69
        XMPPTXT_FILL_2,
 
70