1 |
/* wptKeyEditDlgs.cpp - GPG key edit dialogs |
/* wptKeyEditDlgs.cpp - GPG key edit dialogs |
2 |
* Copyright (C) 2002-2005 Timo Schulz |
* Copyright (C) 2002-2006 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of WinPT. |
* This file is part of WinPT. |
5 |
* |
* |
968 |
msg_box( dlg, _("Could not find key."), _("Key Edit"), MB_ERR ); |
msg_box( dlg, _("Could not find key."), _("Key Edit"), MB_ERR ); |
969 |
return NULL; |
return NULL; |
970 |
} |
} |
971 |
|
if (!k->ctx) |
972 |
|
k->ctx = key; |
973 |
nkeys = count_subkeys (key); |
nkeys = count_subkeys (key); |
974 |
if( !nkeys ) { |
if( !nkeys ) { |
975 |
msg_box( dlg, _("No subkey(s) found."), _("Key Edit"), MB_ERR ); |
msg_box( dlg, _("No subkey(s) found."), _("Key Edit"), MB_ERR ); |
1758 |
} /* uid_subclass_proc */ |
} /* uid_subclass_proc */ |
1759 |
|
|
1760 |
|
|
1761 |
|
/* Dialog box procedure for the edit key dialog. */ |
1762 |
BOOL CALLBACK |
BOOL CALLBACK |
1763 |
keyedit_main_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
keyedit_main_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
1764 |
{ |
{ |
1799 |
BUG( NULL ); |
BUG( NULL ); |
1800 |
} |
} |
1801 |
} |
} |
1802 |
if (!k->key_pair) { |
if (!k->key_pair || k->ctx->revoked) { |
1803 |
EnableWindow (GetDlgItem (dlg, IDC_KEYEDIT_CMD), FALSE); |
EnableWindow (GetDlgItem (dlg, IDC_KEYEDIT_CMD), FALSE); |
1804 |
EnableWindow (GetDlgItem (dlg, IDOK), FALSE); |
EnableWindow (GetDlgItem (dlg, IDOK), FALSE); |
1805 |
} |
} |
1874 |
break; |
break; |
1875 |
} |
} |
1876 |
return FALSE; |
return FALSE; |
1877 |
} /* keyedit_main_dlg_proc */ |
} |
1878 |
|
|