88 |
typedef struct km_info_s *km_info_t; |
typedef struct km_info_s *km_info_t; |
89 |
|
|
90 |
/* Toolbar button structure. */ |
/* Toolbar button structure. */ |
91 |
struct mybuttons { |
struct tb_button_s { |
92 |
long icon; |
long icon; |
93 |
long command; |
long command; |
94 |
char *text; |
char *text; |
95 |
}; |
}; |
96 |
|
|
97 |
struct mybuttons myb[] = { |
/* The buttons in the toolbar. */ |
98 |
|
struct tb_button_s tbb[] = { |
99 |
{IMI_KEY_DELETE, ID_KEYMISC_DELETE, "Delete"}, |
{IMI_KEY_DELETE, ID_KEYMISC_DELETE, "Delete"}, |
100 |
{IMI_KEY_PROPS, ID_KEYMISC_PROPS, "Properties"}, |
{IMI_KEY_PROPS, ID_KEYMISC_PROPS, "Properties"}, |
101 |
{IMI_KEY_SIGN, ID_KEYMISC_SIGN, "Sign"}, |
{IMI_KEY_SIGN, ID_KEYMISC_SIGN, "Sign"}, |
173 |
} |
} |
174 |
|
|
175 |
|
|
176 |
#define ico2idx(ico) imagelist_getindex((ico)) |
#define ico2idx(ico) imagelist_getindex ((ico)) |
177 |
|
|
178 |
|
/* Create a new toolbar window with a pre-defined list of buttons. */ |
179 |
static HWND |
static HWND |
180 |
load_toolbar (HWND dlg, struct km_info_s *kmi) |
create_toolbar (HWND dlg, struct km_info_s *kmi) |
181 |
{ |
{ |
182 |
HWND tbwnd; |
HWND tbwnd; |
183 |
TBSAVEPARAMS tbsp; |
TBSAVEPARAMS tbsp; |
184 |
TBBUTTON tb_buttons[] = { |
TBBUTTON tb_buttons[] = { |
192 |
{ico2idx (IMI_KEY_FILE_EXPORT), ID_KEYMISC_EXPORT, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0}, 0L, 0}, |
{ico2idx (IMI_KEY_FILE_EXPORT), ID_KEYMISC_EXPORT, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0}, 0L, 0}, |
193 |
{ico2idx (IMI_KEY_IMPORT), ID_KEYCTX_PASTE, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0}, 0L, 0}, |
{ico2idx (IMI_KEY_IMPORT), ID_KEYCTX_PASTE, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0}, 0L, 0}, |
194 |
{ico2idx (IMI_KEY_EXPORT), ID_KEYCTX_COPY, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0}, 0L, 0}, |
{ico2idx (IMI_KEY_EXPORT), ID_KEYCTX_COPY, TBSTATE_ENABLED, TBSTYLE_BUTTON, {0}, 0L, 0}, |
195 |
}; |
}; |
196 |
|
|
197 |
tbwnd = CreateWindowEx (0, TOOLBARCLASSNAME, NULL, |
tbwnd = CreateWindowEx (0, TOOLBARCLASSNAME, NULL, |
198 |
WS_CHILD|TBSTYLE_TOOLTIPS|TBSTYLE_FLAT|CCS_ADJUSTABLE, |
WS_CHILD|TBSTYLE_TOOLTIPS|TBSTYLE_FLAT|CCS_ADJUSTABLE, |
199 |
0, 0, 0, 0, dlg, (HMENU)IDR_WINPT_KMTB, glob_hinst, NULL); |
0, 0, 0, 0, dlg, (HMENU)IDR_WINPT_KMTB, glob_hinst, NULL); |
200 |
if (tbwnd) { |
if (!tbwnd) |
201 |
SendMessage (tbwnd, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0); |
BUG (0); |
202 |
SendMessage (tbwnd, TB_SETIMAGELIST, 0, (LPARAM)glob_imagelist); |
SendMessage (tbwnd, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0); |
203 |
SendMessage (tbwnd, TB_AUTOSIZE, 0, 0); |
SendMessage (tbwnd, TB_SETIMAGELIST, 0, (LPARAM)glob_imagelist); |
204 |
ShowWindow (tbwnd, SW_SHOW); |
SendMessage (tbwnd, TB_AUTOSIZE, 0, 0); |
205 |
|
ShowWindow (tbwnd, SW_SHOW); |
206 |
/* Restore toolbar */ |
|
207 |
tbsp.hkr = HKEY_CURRENT_USER; |
/* Restore toolbar */ |
208 |
tbsp.pszSubKey = "Software\\WinPT"; |
tbsp.hkr = HKEY_CURRENT_USER; |
209 |
tbsp.pszValueName = "KM_toolbar"; |
tbsp.pszSubKey = "Software\\WinPT"; |
210 |
if (SendMessage(tbwnd, TB_SAVERESTORE, FALSE, (LPARAM)&tbsp ) == 0) |
tbsp.pszValueName = "KM_toolbar"; |
211 |
SendMessage (tbwnd, TB_ADDBUTTONS, sizeof(tb_buttons) / sizeof(tb_buttons[0]), |
if (SendMessage (tbwnd, TB_SAVERESTORE, FALSE, (LPARAM)&tbsp) == 0) |
212 |
(LONG)&tb_buttons[0]); |
SendMessage (tbwnd, TB_ADDBUTTONS, |
213 |
} |
sizeof (tb_buttons) / sizeof (tb_buttons[0]), |
214 |
return tbwnd; |
(LONG)&tb_buttons[0]); |
215 |
|
|
216 |
|
return tbwnd; |
217 |
} |
} |
218 |
|
|
219 |
|
|
224 |
{ |
{ |
225 |
WORD *buf; |
WORD *buf; |
226 |
HKEY root; |
HKEY root; |
227 |
DWORD type; |
DWORD type, size, i; |
|
DWORD size = kmi->lv->cols*sizeof (WORD), i; |
|
228 |
LONG ec; |
LONG ec; |
229 |
|
|
230 |
|
size = kmi->lv->cols*sizeof (WORD); |
231 |
ec = RegOpenKeyEx (HKEY_CURRENT_USER, "Software\\WinPT", 0, |
ec = RegOpenKeyEx (HKEY_CURRENT_USER, "Software\\WinPT", 0, |
232 |
KEY_ALL_ACCESS, &root); |
KEY_ALL_ACCESS, &root); |
233 |
if (ec != ERROR_SUCCESS) |
if (ec != ERROR_SUCCESS) |
519 |
void |
void |
520 |
update_status_bar (HWND sb, listview_ctrl_t lv) |
update_status_bar (HWND sb, listview_ctrl_t lv) |
521 |
{ |
{ |
522 |
char txt_sec[128], txt_pub[128]; |
char txt_sec[128]; |
523 |
|
char txt_pub[128]; |
524 |
int nkeys = 0, nsec = 0; |
int nkeys = 0, nsec = 0; |
525 |
int i; |
int i; |
526 |
|
|
540 |
separator_wnd_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
separator_wnd_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
541 |
{ |
{ |
542 |
static POINT last_mouse_pos; |
static POINT last_mouse_pos; |
543 |
|
PAINTSTRUCT ps; |
544 |
|
RECT rect; |
545 |
|
HPEN hpen; |
546 |
|
|
547 |
if (msg == WM_CREATE) |
if (msg == WM_CREATE) |
548 |
SetWindowLong (hwnd, GWL_USERDATA, |
SetWindowLong (hwnd, GWL_USERDATA, |
550 |
|
|
551 |
switch (msg) { |
switch (msg) { |
552 |
case WM_PAINT: |
case WM_PAINT: |
|
PAINTSTRUCT ps; |
|
|
RECT rect; |
|
|
HPEN hpen; |
|
|
|
|
553 |
GetClientRect (hwnd, &rect); |
GetClientRect (hwnd, &rect); |
554 |
BeginPaint (hwnd, &ps); |
BeginPaint (hwnd, &ps); |
555 |
|
|
605 |
if (wparam == MK_LBUTTON) { |
if (wparam == MK_LBUTTON) { |
606 |
struct km_info_s *kmi; |
struct km_info_s *kmi; |
607 |
POINT p; |
POINT p; |
|
RECT r; |
|
608 |
|
|
609 |
kmi = (struct km_info_s *)GetWindowLong (hwnd, GWL_USERDATA); |
kmi = (struct km_info_s *)GetWindowLong (hwnd, GWL_USERDATA); |
610 |
if (kmi == NULL) |
if (kmi == NULL) |
615 |
p.y = HIWORD (lparam); |
p.y = HIWORD (lparam); |
616 |
ClientToScreen (hwnd, &p); |
ClientToScreen (hwnd, &p); |
617 |
|
|
618 |
GetWindowRect (hwnd, &r); |
GetWindowRect (hwnd, &rect); |
619 |
r.top += (short)(p.y - last_mouse_pos.y); |
rect.top += (short)(p.y - last_mouse_pos.y); |
620 |
r.bottom += (short)(p.y - last_mouse_pos.y); |
rect.bottom += (short)(p.y - last_mouse_pos.y); |
621 |
|
|
622 |
last_mouse_pos.y = p.y; |
last_mouse_pos.y = p.y; |
623 |
|
|
624 |
/* Apply mouse movement to window. Beware the MoveWindow is relaive |
/* Apply mouse movement to window. Beware the MoveWindow is relaive |
625 |
to parent NOT screen */ |
to parent NOT screen */ |
626 |
MapWindowPoints (NULL, GetParent(hwnd), (POINT*)&r, 2); |
MapWindowPoints (NULL, GetParent(hwnd), (POINT*)&rect, 2); |
627 |
kmi->ypos_sep = r.top; |
kmi->ypos_sep = rect.top; |
628 |
kmi->ypercent_sep = 0; /* This forces do_resize_window to use abs. position */ |
kmi->ypercent_sep = 0; /* This forces do_resize_window to use abs. position */ |
629 |
do_resize_window (GetParent (hwnd), kmi); |
do_resize_window (GetParent (hwnd), kmi); |
630 |
return 0; |
return 0; |
642 |
WNDCLASS wndclass; |
WNDCLASS wndclass; |
643 |
HWND h; |
HWND h; |
644 |
|
|
645 |
|
memset (&wndclass, 0, sizeof (wndclass)); |
646 |
wndclass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; |
wndclass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; |
647 |
wndclass.lpfnWndProc = separator_wnd_proc; |
wndclass.lpfnWndProc = separator_wnd_proc; |
648 |
wndclass.cbClsExtra = 0; |
wndclass.cbClsExtra = 0; |
657 |
|
|
658 |
h = CreateWindowEx (WS_EX_WINDOWEDGE, WINDOWCLASS_SEPARATOR_CHILD, NULL, |
h = CreateWindowEx (WS_EX_WINDOWEDGE, WINDOWCLASS_SEPARATOR_CHILD, NULL, |
659 |
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE, |
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE, |
660 |
0, 400, 2000, 5, dlg, (HMENU) 0, glob_hinst, kmi); |
0, 400, 2000, 5, dlg, (HMENU) 0, glob_hinst, kmi); |
661 |
|
if (!h) |
662 |
|
BUG (NULL); |
663 |
ShowWindow (h, SW_SHOW); |
ShowWindow (h, SW_SHOW); |
664 |
return h; |
return h; |
665 |
} |
} |
679 |
HMENU hmenu; |
HMENU hmenu; |
680 |
int mult_resids[] = {ID_KEYMISC_PROPS, ID_KEYMISC_SIGN, ID_KEYMISC_EDITKEY, |
int mult_resids[] = {ID_KEYMISC_PROPS, ID_KEYMISC_SIGN, ID_KEYMISC_EDITKEY, |
681 |
ID_KEYMISC_CHECKSIGS, ID_KEYMISC_REVCERT, 0}; |
ID_KEYMISC_CHECKSIGS, ID_KEYMISC_REVCERT, 0}; |
682 |
int key_selected = 0; |
int key_selected; |
683 |
int key_has_sec = 0; |
int key_has_sec; |
684 |
int key_inv = 0; |
int key_inv = 0; |
685 |
int i, state=0; |
int i, state=0; |
686 |
|
|
881 |
for (i=1; i <= 3; i++) |
for (i=1; i <= 3; i++) |
882 |
partpos[i-1] = r.right/3*i; |
partpos[i-1] = r.right/3*i; |
883 |
statbar = CreateStatusWindow (WS_CHILD | WS_VISIBLE | CCS_BOTTOM, |
statbar = CreateStatusWindow (WS_CHILD | WS_VISIBLE | CCS_BOTTOM, |
884 |
"status bar", dlg, KM_SEPARATOR_ID); |
"WinPT_Status_Bar", dlg, KM_SEPARATOR_ID); |
885 |
|
if (!statbar) |
886 |
|
BUG (NULL); |
887 |
ShowWindow (statbar, SW_SHOW); |
ShowWindow (statbar, SW_SHOW); |
888 |
SendMessage (statbar, SB_SETPARTS, (WPARAM)3, (LPARAM)partpos); |
SendMessage (statbar, SB_SETPARTS, (WPARAM)3, (LPARAM)partpos); |
889 |
|
|
890 |
update_default_key_str (statbar); |
update_default_key_str (statbar); |
891 |
update_status_bar (statbar, lv); |
update_status_bar (statbar, lv); |
|
|
|
892 |
return statbar; |
return statbar; |
893 |
} |
} |
894 |
|
|
958 |
return file_exist_check (path) == 0? true : false; |
return file_exist_check (path) == 0? true : false; |
959 |
} |
} |
960 |
|
|
961 |
|
|
962 |
/* Translate all menu strings. */ |
/* Translate all menu strings. */ |
963 |
static void |
static void |
964 |
translate_menu_strings (HWND dlg) |
translate_menu_strings (HWND dlg) |
1023 |
set_menu_text (popup, ID_KEYCTX_KEYID_COPY, _("Copy Key ID to Clipboard")); |
set_menu_text (popup, ID_KEYCTX_KEYID_COPY, _("Copy Key ID to Clipboard")); |
1024 |
set_menu_text (popup, ID_KEYCTX_FPR_COPY, _("Copy Fingerprint to Clipboard")); |
set_menu_text (popup, ID_KEYCTX_FPR_COPY, _("Copy Fingerprint to Clipboard")); |
1025 |
set_menu_text (popup, ID_KEYCTX_KINFO_COPY, _("Copy Key Info to Clipboard")); |
set_menu_text (popup, ID_KEYCTX_KINFO_COPY, _("Copy Key Info to Clipboard")); |
1026 |
|
set_menu_text (popup, ID_KEYCTX_EMAIL_COPY, _("Copy E-Mail to Clipboard")); |
1027 |
set_menu_text (popup, ID_KEYCTX_COPY, _("Copy Key to Clipboard")); |
set_menu_text (popup, ID_KEYCTX_COPY, _("Copy Key to Clipboard")); |
1028 |
set_menu_text (popup, ID_KEYCTX_PASTE, _("Paste Key from Clipboard")); |
set_menu_text (popup, ID_KEYCTX_PASTE, _("Paste Key from Clipboard")); |
1029 |
set_menu_text (popup, ID_KEYCTX_RECVFROM, _("Refresh from Keyserver")); |
set_menu_text (popup, ID_KEYCTX_RECVFROM, _("Refresh from Keyserver")); |
1072 |
static int |
static int |
1073 |
find_keypos (listview_ctrl_t lv, gpgme_key_t key) |
find_keypos (listview_ctrl_t lv, gpgme_key_t key) |
1074 |
{ |
{ |
1075 |
char keyid[16+1]; |
char keyid[32+1]; |
1076 |
int i; |
int i; |
1077 |
|
|
1078 |
for (i=0; i < listview_count_items (lv, 0); i++) { |
for (i=0; i < listview_count_items (lv, 0); i++) { |
1240 |
if (!listview_get_item_state (kmi->lv, i)) |
if (!listview_get_item_state (kmi->lv, i)) |
1241 |
continue; |
continue; |
1242 |
switch (what) { |
switch (what) { |
1243 |
|
|
1244 |
|
case ID_KEYCTX_EMAIL_COPY: |
1245 |
|
key = km_get_key_ptr (kmi->lv, i, NULL); |
1246 |
|
gpgme_data_write (out, key->uids->email, strlen (key->uids->email)); |
1247 |
|
if (!single) gpgme_data_write (out, "\r\n", 2); |
1248 |
|
break; |
1249 |
|
|
1250 |
case ID_KEYCTX_UID_COPY: |
case ID_KEYCTX_UID_COPY: |
1251 |
key = km_get_key_ptr (kmi->lv, i, &kci); |
key = km_get_key_ptr (kmi->lv, i, &kci); |
1252 |
gpgme_data_write (out, kci->uids->uid, strlen (kci->uids->uid)); |
gpgme_data_write (out, kci->uids->uid, strlen (kci->uids->uid)); |
1342 |
keylist_proc.current = (WNDPROC)keylist_subclass_proc; |
keylist_proc.current = (WNDPROC)keylist_subclass_proc; |
1343 |
keylist_proc.old = (WNDPROC)GetWindowLong(kl, GWL_WNDPROC); |
keylist_proc.old = (WNDPROC)GetWindowLong(kl, GWL_WNDPROC); |
1344 |
if (keylist_proc.old) { |
if (keylist_proc.old) { |
1345 |
if( !SetWindowLong (kl, GWL_WNDPROC, (LONG)keylist_proc.current)) { |
if (!SetWindowLong (kl, GWL_WNDPROC, (LONG)keylist_proc.current)) { |
1346 |
msg_box (dlg, _("Could not set keylist window procedure."), |
msg_box (dlg, "Could not set keylist window procedure.", |
1347 |
_("Key Manager"), MB_ERR); |
_("Key Manager"), MB_ERR); |
1348 |
BUG (NULL); |
BUG (NULL); |
1349 |
} |
} |
1350 |
} |
} |
1351 |
kmi->statbar = setup_status_bar (dlg, kmi->lv); |
kmi->statbar = setup_status_bar (dlg, kmi->lv); |
1352 |
SetWindowLong (dlg, GWL_USERDATA, (LONG)kmi); |
SetWindowLong (dlg, GWL_USERDATA, (LONG)kmi); |
1353 |
kmi->toolbar = load_toolbar (dlg, kmi); |
kmi->toolbar = create_toolbar (dlg, kmi); |
1354 |
kmi->dlg = dlg; |
kmi->dlg = dlg; |
1355 |
|
|
1356 |
do_center_window (dlg, kmi); |
do_center_window (dlg, kmi); |
1395 |
set_reg_entry (HKEY_CURRENT_USER, "Software\\WinPT", "KM_Size_Height", |
set_reg_entry (HKEY_CURRENT_USER, "Software\\WinPT", "KM_Size_Height", |
1396 |
type); |
type); |
1397 |
|
|
1398 |
/* Remove runtime information. This should be the last action taken here. */ |
/* Remove runtime information. |
1399 |
|
This should be the last action taken here. */ |
1400 |
delete kmi; |
delete kmi; |
1401 |
kmi = NULL; |
kmi = NULL; |
1402 |
SetWindowLong (dlg, GWL_USERDATA, 0); |
SetWindowLong (dlg, GWL_USERDATA, 0); |
1433 |
case TBN_GETBUTTONINFO: |
case TBN_GETBUTTONINFO: |
1434 |
LPTBNOTIFY lpTbNotify; |
LPTBNOTIFY lpTbNotify; |
1435 |
lpTbNotify = (LPTBNOTIFY)lparam; |
lpTbNotify = (LPTBNOTIFY)lparam; |
1436 |
if (lpTbNotify->iItem < (sizeof(myb) / sizeof(mybuttons))) { |
if (lpTbNotify->iItem < (sizeof(tbb) / sizeof(tb_button_s))) { |
1437 |
lpTbNotify->tbButton.iBitmap = imagelist_getindex (myb[lpTbNotify->iItem].icon); |
lpTbNotify->tbButton.iBitmap = imagelist_getindex (tbb[lpTbNotify->iItem].icon); |
1438 |
lpTbNotify->tbButton.idCommand = myb[lpTbNotify->iItem].command; |
lpTbNotify->tbButton.idCommand = tbb[lpTbNotify->iItem].command; |
1439 |
lpTbNotify->tbButton.fsState = TBSTATE_ENABLED; |
lpTbNotify->tbButton.fsState = TBSTATE_ENABLED; |
1440 |
lpTbNotify->tbButton.fsStyle = TBSTYLE_BUTTON; |
lpTbNotify->tbButton.fsStyle = TBSTYLE_BUTTON; |
1441 |
lpTbNotify->tbButton.iString = 0; |
lpTbNotify->tbButton.iString = 0; |
1442 |
strncpy (lpTbNotify->pszText, myb[lpTbNotify->iItem].text, lpTbNotify->cchText); |
strncpy (lpTbNotify->pszText, tbb[lpTbNotify->iItem].text, lpTbNotify->cchText); |
1443 |
SetWindowLong(dlg, DWL_MSGRESULT, TRUE); |
SetWindowLong(dlg, DWL_MSGRESULT, TRUE); |
1444 |
} |
} |
1445 |
return TRUE; |
return TRUE; |
1520 |
break; |
break; |
1521 |
|
|
1522 |
case NM_RCLICK: |
case NM_RCLICK: |
1523 |
|
if (!wait_for_progress_cb (0)) |
1524 |
|
break; |
1525 |
if (notify->idFrom == IDC_KEYMISC_KEYLIST) { |
if (notify->idFrom == IDC_KEYMISC_KEYLIST) { |
1526 |
l_idx =listview_get_curr_pos (kmi->lv); |
l_idx =listview_get_curr_pos (kmi->lv); |
1527 |
if (l_idx == -1) |
if (l_idx == -1) |
1590 |
if (notify->idFrom == IDC_KEYMISC_KEYLIST) { |
if (notify->idFrom == IDC_KEYMISC_KEYLIST) { |
1591 |
NMLISTVIEW *nft = (LPNMLISTVIEW) lparam; |
NMLISTVIEW *nft = (LPNMLISTVIEW) lparam; |
1592 |
int sortby = 0; |
int sortby = 0; |
1593 |
|
|
1594 |
|
if (!wait_for_progress_cb (0)) |
1595 |
|
break; |
1596 |
switch (nft->iSubItem) { |
switch (nft->iSubItem) { |
1597 |
case 0: sortby = KEY_SORT_USERID; break; |
case 0: sortby = KEY_SORT_USERID; break; |
1598 |
case 1: sortby = KEY_SORT_KEYID; break; |
case 1: sortby = KEY_SORT_KEYID; break; |
1602 |
case 6: sortby = KEY_SORT_OTRUST; break; |
case 6: sortby = KEY_SORT_OTRUST; break; |
1603 |
case 7: sortby = KEY_SORT_CREATED; break; |
case 7: sortby = KEY_SORT_CREATED; break; |
1604 |
case 8: sortby = KEY_SORT_ALGO; break; |
case 8: sortby = KEY_SORT_ALGO; break; |
1605 |
default: return TRUE; //sortby = KEY_SORT_USERID; break; |
default: return TRUE; /*sortby userid.*/ |
1606 |
} |
} |
1607 |
|
|
1608 |
if ((kmi->keylist_sortby & ~KEYLIST_SORT_DESC) == sortby) |
if ((kmi->keylist_sortby & ~KEYLIST_SORT_DESC) == sortby) |
1657 |
return FALSE; |
return FALSE; |
1658 |
} |
} |
1659 |
|
|
1660 |
|
/*wait_for_progress_cb ();*/ |
1661 |
switch (LOWORD (wparam)) { |
switch (LOWORD (wparam)) { |
1662 |
case ID_KEYMISC_QUIT: |
case ID_KEYMISC_QUIT: |
1663 |
EndDialog (dlg, TRUE); |
EndDialog (dlg, TRUE); |
1723 |
return TRUE; |
return TRUE; |
1724 |
} |
} |
1725 |
km_get_key (kmi->lv, kmi->lv_idx, &k); |
km_get_key (kmi->lv, kmi->lv_idx, &k); |
|
if (!k.key_pair) { |
|
|
msg_box (dlg, _("It does not make any sense with a key pair!"), |
|
|
_("Key Manager"), MB_ERR); |
|
|
return TRUE; |
|
|
} |
|
1726 |
dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_KEYTRUST, dlg, |
dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_KEYTRUST, dlg, |
1727 |
keytrust_dlg_proc, (LPARAM)&k, |
keytrust_dlg_proc, (LPARAM)&k, |
1728 |
_("List Trust Path"), IDS_WINPT_KEYTRUST); |
_("List Trust Path"), IDS_WINPT_KEYTRUST); |
1955 |
_("Key Manager"), MB_INFO); |
_("Key Manager"), MB_INFO); |
1956 |
listview_select_all (kmi->lv); |
listview_select_all (kmi->lv); |
1957 |
} |
} |
1958 |
km_refresh_from_keyserver (kmi->lv, dlg); |
if (!km_refresh_from_keyserver (kmi->lv, dlg)) |
1959 |
msg_box (dlg, _("Keyserver refresh finished."), |
msg_box (dlg, _("Keyserver refresh finished."), |
1960 |
_("Key Manager"), MB_OK); |
_("Key Manager"), MB_OK); |
1961 |
break; |
break; |
1962 |
|
|
1963 |
/** Context menu **/ |
/** Context menu **/ |
2032 |
case ID_KEYCTX_KEYID_COPY: |
case ID_KEYCTX_KEYID_COPY: |
2033 |
case ID_KEYCTX_FPR_COPY: |
case ID_KEYCTX_FPR_COPY: |
2034 |
case ID_KEYCTX_KINFO_COPY: |
case ID_KEYCTX_KINFO_COPY: |
2035 |
|
case ID_KEYCTX_EMAIL_COPY: |
2036 |
copy_key_info (LOWORD (wparam), kmi); |
copy_key_info (LOWORD (wparam), kmi); |
2037 |
break; |
break; |
2038 |
|
|
2094 |
case ID_GROUP_SHOW: |
case ID_GROUP_SHOW: |
2095 |
/* XXX: Implement group manager. */ |
/* XXX: Implement group manager. */ |
2096 |
return TRUE; |
return TRUE; |
|
|
|
|
/* |
|
|
case IDCANCEL: |
|
|
EndDialog (dlg, TRUE); |
|
|
return TRUE; |
|
|
*/ |
|
2097 |
} |
} |
2098 |
|
|
2099 |
break; |
break; |