116 |
BOOL CALLBACK |
BOOL CALLBACK |
117 |
sigprops_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
sigprops_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
118 |
{ |
{ |
119 |
static gpgme_key_sig_t ks; |
gpgme_key_sig_t ks; |
120 |
gpgme_key_t issuer; |
gpgme_key_t issuer; |
121 |
char tmpbuf[256]; |
char tmpbuf[256]; |
122 |
struct { |
struct { |
128 |
int _class; |
int _class; |
129 |
} ctx; |
} ctx; |
130 |
const char *fmt_templ = _("%s %s signature"); |
const char *fmt_templ = _("%s %s signature"); |
131 |
const char *s; |
char *s; |
132 |
|
|
133 |
switch (msg) { |
switch (msg) { |
134 |
case WM_SYSCOMMAND: |
case WM_SYSCOMMAND: |
146 |
SetDlgItemText (dlg, IDC_SIGPROPS_EXPSTR, _("Expire date")); |
SetDlgItemText (dlg, IDC_SIGPROPS_EXPSTR, _("Expire date")); |
147 |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYINF, _("Issuer key")); |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYINF, _("Issuer key")); |
148 |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYIDINF, _("Issuer key ID")); |
SetDlgItemText (dlg, IDC_SIGPROPS_KEYIDINF, _("Issuer key ID")); |
149 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_POLICINF, _("Policy URL")); |
150 |
ks = (gpgme_key_sig_t)lparam; |
ks = (gpgme_key_sig_t)lparam; |
151 |
if (!ks) |
if (!ks) |
152 |
BUG (0); |
BUG (0); |
171 |
if (ctx.exportable) |
if (ctx.exportable) |
172 |
CheckDlgButton (dlg, IDC_SIGPROPS_EXP, BST_CHECKED); |
CheckDlgButton (dlg, IDC_SIGPROPS_EXP, BST_CHECKED); |
173 |
if (!get_pubkey (ks->keyid+8, &issuer)) |
if (!get_pubkey (ks->keyid+8, &issuer)) |
174 |
s = issuer->uids->uid; |
s = utf8_to_native (issuer->uids->uid); |
175 |
else |
else |
176 |
s = _(" user ID not found"); |
s = strdup (_(" user ID not found")); |
177 |
SetDlgItemText_utf8 (dlg, IDC_SIGPROPS_ISSUER, s); |
SetDlgItemText (dlg, IDC_SIGPROPS_ISSUER, s); |
178 |
|
safe_free (s); |
179 |
if (ks->expires == 0) { |
if (ks->expires == 0) { |
180 |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPSTR), SW_HIDE); |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPSTR), SW_HIDE); |
181 |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPDATE), SW_HIDE); |
ShowWindow (GetDlgItem (dlg, IDC_SIGPROPS_EXPDATE), SW_HIDE); |
204 |
if (ctx.expired) |
if (ctx.expired) |
205 |
CheckDlgButton (dlg, IDC_SIGPROPS_EXPIRED, BST_CHECKED); |
CheckDlgButton (dlg, IDC_SIGPROPS_EXPIRED, BST_CHECKED); |
206 |
} |
} |
207 |
|
/* XXX: gpgme does not support cert policy URLs yet. */ |
208 |
|
if (ks->notations && !ks->notations->name && ks->notations->value) |
209 |
|
SetDlgItemText (dlg, IDC_SIGPROPS_POLIC, ks->notations->value); |
210 |
|
|
211 |
SetDlgItemText (dlg, IDC_SIGPROPS_EXP, _("Exportable")); |
SetDlgItemText (dlg, IDC_SIGPROPS_EXP, _("Exportable")); |
212 |
SetDlgItemText (dlg, IDC_SIGPROPS_NREV, _("Non-revocably")); |
SetDlgItemText (dlg, IDC_SIGPROPS_NREV, _("Non-revocably")); |
213 |
SetDlgItemText (dlg, IDC_SIGPROPS_REV, _("Revoked")); |
SetDlgItemText (dlg, IDC_SIGPROPS_REV, _("Revoked")); |
395 |
k = (winpt_key_t) lparam; |
k = (winpt_key_t) lparam; |
396 |
if (!k) |
if (!k) |
397 |
BUG (0); |
BUG (0); |
398 |
if (k->uid) |
if (k->uid) { |
399 |
_snprintf (inf, DIM (inf)-1, _("Signature List for \"%s\""), k->uid); |
char *p = utf8_to_native (k->uid); |
400 |
SetWindowText_utf8 (dlg, inf); |
_snprintf (inf, DIM (inf)-1, _("Signature List for \"%s\""), p); |
401 |
|
safe_free (p); |
402 |
|
} |
403 |
|
SetWindowText (dlg, inf); |
404 |
SetDlgItemText (dlg, IDC_KEYSIG_RECVKEY, _("&Receive Key")); |
SetDlgItemText (dlg, IDC_KEYSIG_RECVKEY, _("&Receive Key")); |
405 |
SetDlgItemText (dlg, IDC_KEYSIG_SIGPROPS, _("&Properties")); |
SetDlgItemText (dlg, IDC_KEYSIG_SIGPROPS, _("&Properties")); |
406 |
|
|