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

Diff of /trunk/Src/wptVerifyList.cpp

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

revision 219 by twoaday, Sat May 27 08:56:00 2006 UTC revision 228 by twoaday, Thu Jun 15 11:37:53 2006 UTC
# Line 26  Line 26 
26  #include <windows.h>  #include <windows.h>
27  #include <time.h>  #include <time.h>
28    
29    #include "resource.h"
30  #include "wptTypes.h"  #include "wptTypes.h"
31  #include "wptGPG.h"  #include "wptGPG.h"
32  #include "wptCommonCtl.h"  #include "wptCommonCtl.h"
# Line 34  Line 35 
35  #include "wptContext.h"  #include "wptContext.h"
36  #include "wptErrors.h"  #include "wptErrors.h"
37  #include "wptW32API.h"  #include "wptW32API.h"
38    #include "wptVersion.h"
39    
40  /* Symbolic column IDs */  /* Symbolic column IDs */
41  enum {  enum {
# Line 157  void Line 158  void
158  verlist_build (verlist_ctrl_t *vlv, HWND ctrl, int fm_mode)  verlist_build (verlist_ctrl_t *vlv, HWND ctrl, int fm_mode)
159  {  {
160      struct listview_column_s verlist[] = {      struct listview_column_s verlist[] = {
161          {0, 100, (char *)_("Name")},          {0, 120, (char *)_("Name")},
162          {1, 140, (char *)_("Status") },          {1, 140, (char *)_("Status") },
163          {2, 120, (char *)_("Signed") },          {2, 120, (char *)_("Signed") },
164          {3,  58, (char *)_("Trust") },          {3,  58, (char *)_("Trust") },
# Line 165  verlist_build (verlist_ctrl_t *vlv, HWND Line 166  verlist_build (verlist_ctrl_t *vlv, HWND
166          {5, 160, (char *)_("User ID") },          {5, 160, (char *)_("User ID") },
167          {6, 0, NULL}          {6, 0, NULL}
168      };      };
169        HICON ico[2];
170      struct verlist_ctrl_s *v;      struct verlist_ctrl_s *v;
171      int j;      int j;
172            
# Line 176  verlist_build (verlist_ctrl_t *vlv, HWND Line 178  verlist_build (verlist_ctrl_t *vlv, HWND
178      for(j=0; verlist[j].fieldname; j++)      for(j=0; verlist[j].fieldname; j++)
179          listview_add_column (v->lv, &verlist[j]);          listview_add_column (v->lv, &verlist[j]);
180      if (!fm_mode)      if (!fm_mode)
181          listview_set_column_width (v->lv, 0, 60);          listview_set_column_width (v->lv, 0, 80);
182      listview_set_ext_style (v->lv);      listview_set_ext_style (v->lv);
183        ico[0] = LoadIcon (glob_hinst, (LPCTSTR)IDI_SIG_GOOD);
184        ico[1] = LoadIcon (glob_hinst, (LPCTSTR)IDI_SIG_BAD);
185        listview_set_image_list (v->lv, 16, 16, ico, 2);
186      *vlv = v;      *vlv = v;
187  }  }
188    
# Line 205  verlist_delete (verlist_ctrl_t vlv) Line 210  verlist_delete (verlist_ctrl_t vlv)
210  int  int
211  verlist_add_sig (verlist_ctrl_t vlv, gpgme_signature_t sig)  verlist_add_sig (verlist_ctrl_t vlv, gpgme_signature_t sig)
212  {  {
213      struct listview_ctrl_s *lv;      listview_ctrl_t lv;
214      struct winpt_key_s key;      struct winpt_key_s key;
215      u32 key_attr;      u32 key_attr;
216      const char *attr;      const char *attr;
217      char keyid[32+1];      char keyid[32+1];
218        int is_bad;
219            
220        is_bad = sig->summary & GPGME_SIGSUM_RED? 1 : 0;
221      lv = vlv->lv;      lv = vlv->lv;
222      if (listview_add_item (lv, " "))      if (listview_add_item_image (lv, " ", is_bad))
223          return WPTERR_GENERAL;          return WPTERR_GENERAL;
224                    
225      listview_add_sub_item (lv, 0, VER_COL_NAME, "Clipboard");      listview_add_sub_item (lv, 0, VER_COL_NAME, "Clipboard");

Legend:
Removed from v.219  
changed lines
  Added in v.228

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26