/[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 36 by werner, Thu Oct 27 15:25:13 2005 UTC revision 41 by twoaday, Fri Oct 28 07:15:26 2005 UTC
# Line 18  Line 18 
18   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19   */   */
20    
 #ifdef HAVE_CONFIG_H  
 #include <config.h>  
 #endif  
   
 #include <windows.h>  
21  #include <windows.h>  #include <windows.h>
22  #include <commctrl.h>  #include <commctrl.h>
23  #include "../resource.h"  #include "../resource.h"
# Line 1233  do_editkey_expire (winpt_key_t k, HWND d Line 1228  do_editkey_expire (winpt_key_t k, HWND d
1228      int j, cancel = 0;      int j, cancel = 0;
1229    
1230      if (!k->key_pair) {      if (!k->key_pair) {
1231          msg_box( dlg, _("There is no secret key available!"), _("Key Edit"), MB_ERR );          msg_box (dlg, _("There is no secret key available!"), _("Key Edit"), MB_ERR);
1232          return FALSE;          return FALSE;
1233      }      }
1234      if ( (j = listview_get_curr_pos( lv )) == -1 ) {      if ((j = listview_get_curr_pos (lv)) == -1) {
1235          msg_box( dlg, _("Please select a key."), _("Key Edit"), MB_ERR );          msg_box( dlg, _("Please select a key."), _("Key Edit"), MB_ERR );
1236          return FALSE;          return FALSE;
1237      }      }
1238                
1239      listview_get_item_text( lv, j, SUBK_COL_STATUS, buf, sizeof buf -1 );          /* If a key already expired, it is possible the user wants to
1240      if( !strcmp( buf, _("Expired") ) ) {             set a new expiration date.. */  
1241          msg_box( dlg, _("Key already expired!"), _("Key Edit"), MB_ERR );      listview_get_item_text (lv, j, SUBK_COL_STATUS, buf, sizeof buf -1);
1242          return FALSE;      if (!strcmp (buf, _("Expired"))) {
1243            cancel = msg_box (dlg, _("Key already expired.\n\n"
1244                              "Do you want to change the expiration date?"),
1245                              _("Key Edit"), MB_QUEST_ASK);
1246            if (cancel == IDNO)
1247                return FALSE;
1248            cancel = 0;
1249      }      }
1250    
1251      memset (&udd, 0, sizeof udd);      memset (&udd, 0, sizeof udd);
1252      udd.text = _("Key Expiration Date");      udd.text = _("Key Expiration Date");
1253      dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_DATE, dlg,          dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_DATE, dlg,    
# Line 1259  do_editkey_expire (winpt_key_t k, HWND d Line 1261  do_editkey_expire (winpt_key_t k, HWND d
1261          return FALSE;          return FALSE;
1262      }      }
1263      if( k->is_protected ) {      if( k->is_protected ) {
1264          pass = request_passphrase (_("Key Edit"), 1, &cancel );          pass = request_passphrase (_("Key Edit"), 1, &cancel);
1265          if( cancel )          if (cancel)
1266              return FALSE;              return FALSE;
1267      }      }
1268    
# Line 1810  keyedit_main_dlg_proc (HWND dlg, UINT ms Line 1812  keyedit_main_dlg_proc (HWND dlg, UINT ms
1812          break;          break;
1813      }      }
1814      return FALSE;      return FALSE;
1815  } /* keyedit_main_dlg_proc */  } /* keyedit_main_dlg_proc */

Legend:
Removed from v.36  
changed lines
  Added in v.41

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26