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

Diff of /trunk/Src/wptKeysignDlg.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 198  get_expire_date (gpgme_key_t key) Line 198  get_expire_date (gpgme_key_t key)
198      return get_key_expire_date (u);      return get_key_expire_date (u);
199  }  }
200    
201    /* Display photo of key @key in a separate window. */
202    static void
203    show_photo (winpt_key_t key)
204    {
205        /* XXX: fill it with life. */
206    }
207    
208    
209  /* Dialog box procedure to sign a key. */  /* Dialog box procedure to sign a key. */
210  BOOL CALLBACK  BOOL CALLBACK
# Line 209  keysign_dlg_proc (HWND dlg, UINT msg, WP Line 216  keysign_dlg_proc (HWND dlg, UINT msg, WP
216      gpgme_key_t k;      gpgme_key_t k;
217      SYSTEMTIME st;      SYSTEMTIME st;
218      HWND h;      HWND h;
219      char keymsg[4096], pwd[256], *uid = NULL;      char keymsg[2048], pwd[256];
220        char *uid = NULL;
221      const char *keyid, *s;      const char *keyid, *s;
     u32 created;  
222      int type, expires=0, idx;      int type, expires=0, idx;
223            
224      switch ( msg )  {      switch ( msg )  {
# Line 222  keysign_dlg_proc (HWND dlg, UINT msg, WP Line 229  keysign_dlg_proc (HWND dlg, UINT msg, WP
229          SetWindowText (dlg, _("Key Signing"));          SetWindowText (dlg, _("Key Signing"));
230          #endif          #endif
231          key = (winpt_key_t) lparam;          key = (winpt_key_t) lparam;
         created = key->ctx->subkeys->timestamp;  
232          s = key->ctx->uids->uid;          s = key->ctx->uids->uid;
233          if (s)          uid = utf8_to_wincp (s, strlen (s));
             uid = utf8_to_wincp (s, strlen (s));  
234          _snprintf (keymsg, sizeof keymsg -1,          _snprintf (keymsg, sizeof keymsg -1,
235                     _("pub %d/%s  created: %s    expires: %s\n\n"                     _("pub %d/%s  created: %s    expires: %s\n\n"
236                       "Primary key fingerprint: %s\n\n"                       "Primary key fingerprint: %s\n\n"
# Line 257  keysign_dlg_proc (HWND dlg, UINT msg, WP Line 262  keysign_dlg_proc (HWND dlg, UINT msg, WP
262          EnableWindow (GetDlgItem (dlg, IDC_KEYSIGN_EXPIRES), FALSE);          EnableWindow (GetDlgItem (dlg, IDC_KEYSIGN_EXPIRES), FALSE);
263          if (reg_prefs.expert == 0)          if (reg_prefs.expert == 0)
264              ShowWindow (GetDlgItem (dlg, IDC_KEYSIGN_NREV), SW_HIDE);              ShowWindow (GetDlgItem (dlg, IDC_KEYSIGN_NREV), SW_HIDE);
265            if (key->ext && key->ext->attrib.len > 0)
266                EnableWindow (GetDlgItem (dlg, IDC_KEYSIGN_SHOWIMG), TRUE);
267          SetForegroundWindow (dlg);          SetForegroundWindow (dlg);
268          h = GetDlgItem (dlg, IDC_KEYSIGN_PASSPHRASE);          h = GetDlgItem (dlg, IDC_KEYSIGN_PASSPHRASE);
269          SetFocus (h);          SetFocus (h);
# Line 274  keysign_dlg_proc (HWND dlg, UINT msg, WP Line 281  keysign_dlg_proc (HWND dlg, UINT msg, WP
281          return FALSE;          return FALSE;
282                    
283      case WM_COMMAND:      case WM_COMMAND:
284          if( HIWORD( wparam ) == CBN_SELCHANGE ) {          if (HIWORD( wparam ) == CBN_SELCHANGE) {
285              do_check_protection( dlg );              do_check_protection (dlg);
286              break;              break;
287          }          }
288          if (HIWORD (wparam) == BN_CLICKED && LOWORD (wparam) == IDC_KEYSIGN_EXPSIG) {          if (HIWORD (wparam) == BN_CLICKED && LOWORD (wparam) == IDC_KEYSIGN_EXPSIG) {
# Line 346  keysign_dlg_proc (HWND dlg, UINT msg, WP Line 353  keysign_dlg_proc (HWND dlg, UINT msg, WP
353          case IDCANCEL:          case IDCANCEL:
354              EndDialog (dlg, FALSE);              EndDialog (dlg, FALSE);
355              return TRUE;              return TRUE;
356    
357            case IDC_KEYSIGN_SHOWIMG:
358                show_photo (key);
359                return TRUE;
360          }          }
361          break;          break;
362      }      }

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26