46 |
#include "wptCardEdit.h" |
#include "wptCardEdit.h" |
47 |
#include "wptCrypto.h" |
#include "wptCrypto.h" |
48 |
|
|
|
extern HWND activ_hwnd; |
|
49 |
static int cmd = 0; |
static int cmd = 0; |
50 |
static int wipe_contents = 0; |
static int wipe_contents = 0; |
51 |
|
|
86 |
} |
} |
87 |
|
|
88 |
|
|
|
/* @unused |
|
|
static int |
|
|
cleanup_tmp_files (void) |
|
|
{ |
|
|
struct _finddata_t dat; |
|
|
char tmp[384]; |
|
|
long hd; |
|
|
|
|
|
if (GetTempPath (sizeof (tmp)-1, tmp) == FALSE || |
|
|
SetCurrentDirectory (tmp) == FALSE) { |
|
|
winpt_errmsg ("GetTempPath", 0); |
|
|
return WPTERR_GENERAL; |
|
|
} |
|
|
hd = _findfirst ("gpgmeOUT*", &dat); |
|
|
if (hd == -1) |
|
|
return 0; |
|
|
do { |
|
|
secure_unlink (dat.name, WIPE_MODE_SIMPLE); |
|
|
} while (_findnext (hd, &dat) == 0); |
|
|
_findclose (hd); |
|
|
return 0; |
|
|
} |
|
|
*/ |
|
|
|
|
|
|
|
89 |
/* Dialog box procedure to confirm to delete the clipboard contents. */ |
/* Dialog box procedure to confirm to delete the clipboard contents. */ |
90 |
static BOOL CALLBACK |
static BOOL CALLBACK |
91 |
confirm_delclipboard_dlg (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
confirm_delclipboard_dlg (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
96 |
SetDlgItemText (dlg, IDC_CONFDELCLIP_BRAIN, _("&Remember the answer")); |
SetDlgItemText (dlg, IDC_CONFDELCLIP_BRAIN, _("&Remember the answer")); |
97 |
SetDlgItemText (dlg, IDC_CONFDELCLIP_INFO, _("Do you want to delete the contents from the clipboard?")); |
SetDlgItemText (dlg, IDC_CONFDELCLIP_INFO, _("Do you want to delete the contents from the clipboard?")); |
98 |
SetDlgItemText (dlg, IDYES, _("&Yes")); |
SetDlgItemText (dlg, IDYES, _("&Yes")); |
99 |
SetDlgItemText (dlg, IDNO, _("&No")); |
SetDlgItemText (dlg, IDNO, _("&No")); |
100 |
center_window (dlg, NULL); |
center_window (dlg, NULL); |
101 |
SetForegroundWindow (dlg); |
SetForegroundWindow (dlg); |
102 |
break; |
break; |
285 |
|
|
286 |
/* Load the Card Manager with the current card. */ |
/* Load the Card Manager with the current card. */ |
287 |
static void |
static void |
288 |
load_smartcard (void) |
load_card_manager (void) |
289 |
{ |
{ |
290 |
gpg_card_t card; |
gpg_card_t card; |
291 |
|
|
295 |
GetDesktopWindow (), card_edit_dlg_proc, |
GetDesktopWindow (), card_edit_dlg_proc, |
296 |
(LPARAM)card, |
(LPARAM)card, |
297 |
_("Card Edit"), IDS_WINPT_CARD_EDIT); |
_("Card Edit"), IDS_WINPT_CARD_EDIT); |
298 |
gpg_card_release (card); |
gpg_card_release (card); |
|
card = NULL; |
|
299 |
} |
} |
300 |
} |
} |
301 |
|
|
560 |
break; |
break; |
561 |
|
|
562 |
case ID_WINPT_CARD: |
case ID_WINPT_CARD: |
563 |
load_smartcard (); |
load_card_manager (); |
564 |
break; |
break; |
565 |
|
|
566 |
case ID_WINPT_EDIT: |
case ID_WINPT_EDIT: |