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

Diff of /trunk/Src/wptKeyPropsDlg.cpp

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

revision 32 by twoaday, Mon Oct 24 08:03:48 2005 UTC revision 33 by twoaday, Tue Oct 25 07:46:20 2005 UTC
# Line 33  Line 33 
33  #include "wptVersion.h"  #include "wptVersion.h"
34  #include "wptKeyEdit.h"  #include "wptKeyEdit.h"
35    
   
36  static void  static void
37  do_change_ownertrust (winpt_key_t k, const char *s)  do_change_ownertrust (winpt_key_t k, const char *s)
38  {  {
# Line 84  ownertrust_to_string (int val) Line 83  ownertrust_to_string (int val)
83    
84  /* Load the photo from the key @key */  /* Load the photo from the key @key */
85  static int  static int
86  keyprops_load_photo (gpgme_key_t key)  keyprops_load_photo (gpgme_key_t key, gpgme_validity_t *r_valid)
87  {  {
88      winpt_key_s k;      winpt_key_s k;
89      FILE *f;      FILE *f;
# Line 94  keyprops_load_photo (gpgme_key_t key) Line 93  keyprops_load_photo (gpgme_key_t key)
93    
94      winpt_get_pubkey (key->subkeys->keyid, &k);      winpt_get_pubkey (key->subkeys->keyid, &k);
95      img = k.ext->attrib.d;      img = k.ext->attrib.d;
96      imglen = k.ext->attrib.len;      imglen = k.ext->attrib.len;    
97        if (!k.ext->attrib.validity)
98            get_uat_validity (key->subkeys->keyid, &k.ext->attrib.validity);
99        *r_valid = k.ext->attrib.validity;
100    
101      if (!img || !imglen)      if (!img || !imglen)
102          return -1;          return -1;
# Line 253  keyprops_dlg_proc (HWND dlg, UINT msg, W Line 255  keyprops_dlg_proc (HWND dlg, UINT msg, W
255      static winpt_key_t k;      static winpt_key_t k;
256      static gpgme_key_t key;      static gpgme_key_t key;
257      static int has_photo = 0;      static int has_photo = 0;
258        gpgme_validity_t valid;
259      refresh_cache_s rcs = {0};      refresh_cache_s rcs = {0};
260      const char *inf;      const char *inf;
261      int cancel = 0;      int cancel = 0;
# Line 268  keyprops_dlg_proc (HWND dlg, UINT msg, W Line 271  keyprops_dlg_proc (HWND dlg, UINT msg, W
271          SetDlgItemText (dlg, IDC_KEYPROPS_OT_CHANGE, _("&Change"));          SetDlgItemText (dlg, IDC_KEYPROPS_OT_CHANGE, _("&Change"));
272          SetDlgItemText (dlg, IDC_KEYPROPS_REVOKERS, _("&Revokers"));          SetDlgItemText (dlg, IDC_KEYPROPS_REVOKERS, _("&Revokers"));
273          SetDlgItemText (dlg, IDC_KEYPROPS_CHANGE_PWD, _("Change &Passwd"));          SetDlgItemText (dlg, IDC_KEYPROPS_CHANGE_PWD, _("Change &Passwd"));
274            SetDlgItemText (dlg, IDC_KEYPROPS_OTINF, _("Ownertrust"));
275          #endif            #endif  
276    
277          display_key_info (dlg, k, &key);          display_key_info (dlg, k, &key);
278          if (!keyprops_load_photo (key))          if (!keyprops_load_photo (key, &valid)) {
279              has_photo = 1;              has_photo = 1;      
280                if (valid != 0 && valid < GPGME_VALIDITY_MARGINAL)
281                    SetDlgItemText (dlg, IDC_KEYPROPS_IMGINF, _("Photo-ID not checked."));
282            }
283          if (k->key_pair)          if (k->key_pair)
284              EnableWindow (GetDlgItem (dlg, IDC_KEYPROPS_CHANGE_PWD), TRUE);              EnableWindow (GetDlgItem (dlg, IDC_KEYPROPS_CHANGE_PWD), TRUE);
285          if (check_for_desig_rev (key))          if (check_for_desig_rev (key))

Legend:
Removed from v.32  
changed lines
  Added in v.33

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26