17 |
* along with WinPT; if not, write to the Free Software Foundation, |
* along with WinPT; if not, write to the Free Software Foundation, |
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 |
#ifdef HAVE_CONFIG_H |
21 |
#include <config.h> |
#include <config.h> |
22 |
#endif |
#endif |
46 |
static int |
static int |
47 |
is_sig (listview_ctrl_t lv, int pos) |
is_sig (listview_ctrl_t lv, int pos) |
48 |
{ |
{ |
49 |
char tmpbuf[256]; |
char tmpbuf[200]; |
50 |
|
|
51 |
if (pos == -1) |
if (pos == -1) |
52 |
pos = listview_get_curr_pos (lv); |
pos = listview_get_curr_pos (lv); |
53 |
if (pos == -1) |
if (pos == -1) |
54 |
return 0; |
return 0; |
55 |
listview_get_item_text (lv, pos, 0, tmpbuf, 200); |
listview_get_item_text (lv, pos, 0, tmpbuf, sizeof (tmpbuf)-1); |
56 |
if (*tmpbuf == ' ') |
if (*tmpbuf == ' ') |
57 |
return -1; |
return -1; |
58 |
return 0; |
return 0; |
129 |
return FALSE; |
return FALSE; |
130 |
|
|
131 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
132 |
|
SetWindowText (dlg, _("Signature Properties")); |
133 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_EXP, _("Exportable")); |
134 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_NREV, _("Non-revocably")); |
135 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_EXPIRED, _("Expired")); |
136 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_REV, _("Revoked")); |
137 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_CLASSINF, _("Class")); |
138 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_EXPSTR, _("Expire date")); |
139 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_KEYINF, _("Issuer key")); |
140 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_KEYIDINF, _("Issuer key ID")); |
141 |
lv = (listview_ctrl_t)lparam; |
lv = (listview_ctrl_t)lparam; |
142 |
if (!lv) |
if (!lv) |
143 |
dlg_fatal_error (dlg, "could not get dialog param"); |
dlg_fatal_error (dlg, "could not get dialog param"); |
268 |
|
|
269 |
n = listview_count_items (lv, 0); |
n = listview_count_items (lv, 0); |
270 |
for( i = 0; i < n; i++ ) { |
for( i = 0; i < n; i++ ) { |
271 |
listview_get_item_text( lv, i, 1, id, sizeof id - 1 ); |
listview_get_item_text (lv, i, 1, id, sizeof (id) - 1); |
272 |
if( !strncmp( id, "NOKEY", 5 ) ) { |
if( !strncmp( id, "NOKEY", 5 ) ) { |
273 |
listview_get_item_text( lv, i, 4, keyid, sizeof keyid -1 ); |
listview_get_item_text( lv, i, 4, keyid, sizeof (keyid) -1); |
274 |
rc = hkp_recv_key( dlg, default_keyserver, default_keyserver_port, keyid, 0, 0 ); |
rc = hkp_recv_key (dlg, default_keyserver, |
275 |
|
default_keyserver_port, keyid, 0, 0); |
276 |
if( rc ) |
if( rc ) |
277 |
break; |
break; |
278 |
} |
} |
352 |
if (k->uid) |
if (k->uid) |
353 |
_snprintf (inf, DIM (inf)-1, _("Signature List for \"%s\""), k->uid); |
_snprintf (inf, DIM (inf)-1, _("Signature List for \"%s\""), k->uid); |
354 |
SetWindowText (dlg, inf); |
SetWindowText (dlg, inf); |
|
#ifndef LANG_DE |
|
355 |
SetDlgItemText (dlg, IDC_KEYSIG_RECVKEY, _("&Receive Key")); |
SetDlgItemText (dlg, IDC_KEYSIG_RECVKEY, _("&Receive Key")); |
356 |
SetDlgItemText (dlg, IDC_KEYSIG_SIGPROPS, _("&Properties")); |
SetDlgItemText (dlg, IDC_KEYSIG_SIGPROPS, _("&Properties")); |
357 |
#endif |
|
358 |
lv = siglist_load (GetDlgItem (dlg, IDC_KEYSIG_LIST), k->keyid); |
lv = siglist_load (GetDlgItem (dlg, IDC_KEYSIG_LIST), k->keyid); |
359 |
if (!check_for_missing_keys (lv)) |
if (!check_for_missing_keys (lv)) |
360 |
EnableWindow (GetDlgItem (dlg, IDC_KEYSIG_RECVKEY), FALSE); |
EnableWindow (GetDlgItem (dlg, IDC_KEYSIG_RECVKEY), FALSE); |
361 |
|
EnableWindow (GetDlgItem (dlg, IDC_KEYSIG_SIGPROPS), FALSE); |
362 |
k->callback.ctl = lv; |
k->callback.ctl = lv; |
363 |
sl = GetDlgItem (dlg, IDC_KEYSIG_LIST); |
sl = GetDlgItem (dlg, IDC_KEYSIG_LIST); |
364 |
siglist_proc.dlg = dlg; |
siglist_proc.dlg = dlg; |
399 |
&& notify->idFrom == IDC_KEYSIG_LIST) |
&& notify->idFrom == IDC_KEYSIG_LIST) |
400 |
do_load_keyprops (dlg, lv); |
do_load_keyprops (dlg, lv); |
401 |
if (notify && notify->code == NM_RCLICK && |
if (notify && notify->code == NM_RCLICK && |
402 |
notify->idFrom == IDC_KEYSIG_LIST) |
notify->idFrom == IDC_KEYSIG_LIST && |
403 |
|
is_sig (lv, -1)) |
404 |
do_create_popup (dlg); |
do_create_popup (dlg); |
405 |
if (notify && notify->code == LVN_ITEMCHANGED && |
if (notify && notify->code == LVN_ITEMCHANGED && |
406 |
((LPNMLISTVIEW)lparam)->uNewState) { |
((LPNMLISTVIEW)lparam)->uNewState) { |
408 |
listview_get_item_text (lv, idx, 1, inf, DIM (inf)-1); |
listview_get_item_text (lv, idx, 1, inf, DIM (inf)-1); |
409 |
EnableWindow (GetDlgItem (dlg, IDC_KEYSIG_RECVKEY), |
EnableWindow (GetDlgItem (dlg, IDC_KEYSIG_RECVKEY), |
410 |
strcmp (inf, "NOKEY") == 0? TRUE: FALSE); |
strcmp (inf, "NOKEY") == 0? TRUE: FALSE); |
411 |
|
EnableWindow (GetDlgItem (dlg, IDC_KEYSIG_SIGPROPS), |
412 |
|
is_sig (lv, -1)? TRUE : FALSE); |
413 |
} |
} |
414 |
break; |
break; |
415 |
|
|