37 |
BOOL CALLBACK |
BOOL CALLBACK |
38 |
keycache_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
keycache_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
39 |
{ |
{ |
40 |
gpgme_error_t err; |
gpgme_error_t err = 0; |
41 |
refresh_cache_s *rcs; |
refresh_cache_s *rcs; |
42 |
char *pubring = NULL; |
char *pubring, *secring; |
|
char *secring = NULL; |
|
43 |
|
|
44 |
switch( msg ) { |
switch (msg) { |
45 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
46 |
rcs = (refresh_cache_s *)lparam; |
rcs = (refresh_cache_s *)lparam; |
47 |
if (!rcs) |
if (!rcs) |
62 |
BUG (0); |
BUG (0); |
63 |
if (rcs->tr_update) |
if (rcs->tr_update) |
64 |
gpg_rebuild_cache (NULL); |
gpg_rebuild_cache (NULL); |
65 |
if (rcs->kr_update) { |
if (rcs->kr_update) |
66 |
err = keycache_init (pubring, secring); |
err = keycache_init (pubring, secring); |
|
if (err) |
|
|
msg_box (dlg, gpgme_strerror (err), _("Key Cache"), MB_ERR); |
|
|
} |
|
67 |
free_if_alloc (pubring); |
free_if_alloc (pubring); |
68 |
free_if_alloc (secring); |
free_if_alloc (secring); |
69 |
EndDialog (dlg, TRUE); |
if (err) { |
70 |
|
msg_box (dlg, gpgme_strerror (err), _("Key Cache"), MB_ERR); |
71 |
|
EndDialog (dlg, 1); |
72 |
|
} |
73 |
|
else |
74 |
|
EndDialog (dlg, 0); |
75 |
return FALSE; |
return FALSE; |
76 |
} |
} |
77 |
|
|