/[winpt]/trunk/Src/wptSigList.cpp
ViewVC logotype

Diff of /trunk/Src/wptSigList.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 327 by twoaday, Sun Mar 18 19:58:12 2007 UTC revision 328 by twoaday, Fri Sep 25 16:07:38 2009 UTC
# Line 43  Line 43 
43     Return value: 0 on success. */     Return value: 0 on success. */
44  static void  static void
45  siglist_build (listview_ctrl_t *lv, HWND ctrl)  siglist_build (listview_ctrl_t *lv, HWND ctrl)
46  {  {    
     listview_ctrl_t c;  
47      struct listview_column_s implist[] = {      struct listview_column_s implist[] = {
48          {0, 240, (char *)_("User ID")},          {0, 240, (char *)_("User ID")},
49          {1,  50, (char *)_("Valid")},          {1,  50, (char *)_("Valid")},
# Line 55  siglist_build (listview_ctrl_t *lv, HWND Line 54  siglist_build (listview_ctrl_t *lv, HWND
54          {6,  56, (char *)_("Algorithm")},          {6,  56, (char *)_("Algorithm")},
55          {0,   0, NULL}          {0,   0, NULL}
56      };      };
57      int j;      listview_ctrl_t c;
58    
59      listview_new (&c, ctrl);      listview_new (&c, ctrl);
60      for  (j=0; implist[j].fieldname != NULL; j++)      for  (int j=0; implist[j].fieldname != NULL; j++)
61          listview_add_column (c, &implist[j]);          listview_add_column (c, &implist[j]);
62      listview_set_ext_style (c);      listview_set_ext_style (c);
63      listview_del_all_items (c);      listview_del_all_items (c);
# Line 83  indent_string (const char *old, int ilvl Line 82  indent_string (const char *old, int ilvl
82  {  {
83      char *p;      char *p;
84      int i;      int i;
85        
86      p = new char[strlen (old) + 1 + ilvl];      p = new char[strlen (old) + 1 + ilvl];
87      if (!p)      if (!p)
88          BUG (NULL);          BUG (NULL);
# Line 95  indent_string (const char *old, int ilvl Line 94  indent_string (const char *old, int ilvl
94    
95    
96  /* Add an item at the given pos @pos with the opaque param @ks. */  /* Add an item at the given pos @pos with the opaque param @ks. */
97  int  static int
98  add_keysig_item (listview_ctrl_t ctx, int pos, gpgme_key_sig_t ks)  add_keysig_item (listview_ctrl_t ctx, int pos, gpgme_key_sig_t ks)
99  {  {
100      LV_ITEM lvi;      LV_ITEM lvi;
# Line 140  siglist_add_key (listview_ctrl_t lv, str Line 139  siglist_add_key (listview_ctrl_t lv, str
139      }      }
140      else      else
141          attr = uid->uid;          attr = uid->uid;
142      if (attr && strlen (attr)) {      if (attr && strlen (attr) > 0) {
143          char *p = uid? m_strdup (attr) : indent_string (attr, 2);          char *p = uid? m_strdup (attr) : indent_string (attr, 2);
144          listview_add_sub_item (lv, pos, SL_COL_UID, p);          listview_add_sub_item (lv, pos, SL_COL_UID, p);
145          free_if_alloc (p);          free_if_alloc (p);
# Line 161  siglist_add_key (listview_ctrl_t lv, str Line 160  siglist_add_key (listview_ctrl_t lv, str
160      case GPG_ERR_BAD_SIGNATURE:s = _("NO");    break;      case GPG_ERR_BAD_SIGNATURE:s = _("NO");    break;
161      default:                   s = _("ERROR"); break;      default:                   s = _("ERROR"); break;
162      }      }
163      if (no_uid)      if (ks->revoked)
164            s = _("REVOKED");
165        else if (no_uid)
166          s = _("NOKEY");          s = _("NOKEY");
167      listview_add_sub_item (lv, pos, SL_COL_VALID, s);      listview_add_sub_item (lv, pos, SL_COL_VALID, s);
168    
# Line 175  siglist_add_key (listview_ctrl_t lv, str Line 176  siglist_add_key (listview_ctrl_t lv, str
176      strcat (t, " ");      strcat (t, " ");
177      if (!ks->exportable)      if (!ks->exportable)
178          strcat (t, "L");          strcat (t, "L");
     /* XXX: if gpgme supports non-revocable status, add 'R' */  
179      listview_add_sub_item (lv, pos, SL_COL_CLASS, t);      listview_add_sub_item (lv, pos, SL_COL_CLASS, t);
180    
181      s = get_key_created (ks->timestamp);      s = get_key_created (ks->timestamp);

Legend:
Removed from v.327  
changed lines
  Added in v.328

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26