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

Diff of /trunk/Src/wptKeyEditDlgs.cpp

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

revision 5 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 6 by twoaday, Mon Apr 4 06:59:24 2005 UTC
# Line 1  Line 1 
1  /* wptKeyEditDlgs.cpp - GPG key edit dialogs  /* wptKeyEditDlgs.cpp - GPG key edit dialogs
2   *      Copyright (C) 2002-2004 Timo Schulz   *      Copyright (C) 2002-2005 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
5   *   *
# Line 486  keyedit_addsubkey_dlg_proc( HWND dlg, UI Line 486  keyedit_addsubkey_dlg_proc( HWND dlg, UI
486          listbox_add_string( lb, "ElGamal (encrypt only)" );          listbox_add_string( lb, "ElGamal (encrypt only)" );
487          listbox_add_string( lb, "RSA (sign only)");          listbox_add_string( lb, "RSA (sign only)");
488          listbox_add_string( lb, "RSA (encrypt only)" );          listbox_add_string( lb, "RSA (encrypt only)" );
         if (reg_prefs.expert)  
             listbox_add_string (lb, "RSA (sign and encrypt)");  
489          SetDlgItemInt( dlg, IDC_ADDSUBKEY_VALID, 0, FALSE );          SetDlgItemInt( dlg, IDC_ADDSUBKEY_VALID, 0, FALSE );
490          SetDlgItemInt( dlg, IDC_ADDSUBKEY_SIZE, 2048, FALSE );          SetDlgItemInt( dlg, IDC_ADDSUBKEY_SIZE, 2048, FALSE );
491          SetForegroundWindow( dlg );          SetForegroundWindow( dlg );
# Line 506  keyedit_addsubkey_dlg_proc( HWND dlg, UI Line 504  keyedit_addsubkey_dlg_proc( HWND dlg, UI
504              lb = GetDlgItem( dlg, IDC_ADDSUBKEY_ALGO );              lb = GetDlgItem( dlg, IDC_ADDSUBKEY_ALGO );
505              switch (listbox_get_cursel (lb)) {              switch (listbox_get_cursel (lb)) {
506              case 0: index = 2; break;              case 0: index = 2; break;
507              case 1: index = 3; break;              case 1: index = 4; break;
508              case 2: index = 4; break;              case 2: index = 5; break;
509              case 3: index = 5; break;              case 3: index = 6; break;
             case 4: index = 6; break;  
510              default:              default:
511                  msg_box( dlg, _("Please select one entry."), _("Add Subkey"), MB_ERR );                  msg_box( dlg, _("Please select one entry."), _("Add Subkey"), MB_ERR );
512                  return FALSE;                  return FALSE;
# Line 549  keyedit_addsubkey_dlg_proc( HWND dlg, UI Line 546  keyedit_addsubkey_dlg_proc( HWND dlg, UI
546              keygen->bits = size;              keygen->bits = size;
547              switch (index) {              switch (index) {
548              case 2: keygen->algo = GPGME_PK_DSA; break;              case 2: keygen->algo = GPGME_PK_DSA; break;
549              case 3: keygen->algo = GPGME_PK_ELG_E; break;              case 4: keygen->algo = GPGME_PK_ELG_E; break;
550              case 4: keygen->algo = GPGME_PK_RSA_S; break;              case 5: keygen->algo = GPGME_PK_RSA_S; break;
551              case 5: keygen->algo = GPGME_PK_RSA_E; break;              case 6: keygen->algo = GPGME_PK_RSA_E; break;
             case 6: keygen->algo = GPGME_PK_RSA; break;  
552              }              }
553              if (valid)              if (valid)
554                  keygen->expire = time (NULL) + valid*24*60*60;                  keygen->expire = time (NULL) + valid*24*60*60;

Legend:
Removed from v.5  
changed lines
  Added in v.6

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26