177 |
if (!key) |
if (!key) |
178 |
BUG (0); |
BUG (0); |
179 |
key_load_photo (dlg, key->ctx, NULL); |
key_load_photo (dlg, key->ctx, NULL); |
180 |
_snprintf (buf, sizeof (buf)-1, _("Photo of %s"), key->uid); |
_snprintf (buf, DIM (buf)-1, _("Photo of %s"), key->uid); |
181 |
SetWindowText (dlg, buf); |
SetWindowText (dlg, buf); |
182 |
SetForegroundWindow (dlg); |
SetForegroundWindow (dlg); |
183 |
break; |
break; |
214 |
sig_class_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
sig_class_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
215 |
{ |
{ |
216 |
HWND parent; |
HWND parent; |
217 |
int sig_class = 0; |
int sig_class; |
218 |
|
|
219 |
switch (msg) { |
switch (msg) { |
220 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
300 |
size_t len; |
size_t len; |
301 |
|
|
302 |
gpgme_data_new (&kinf); |
gpgme_data_new (&kinf); |
303 |
_snprintf (tmp, sizeof (tmp) -1, |
_snprintf (tmp, DIM (tmp) -1, |
304 |
_("pub %d/0x%s created: %s expires: %s\n\n" |
_("pub %d/0x%s created: %s expires: %s\n\n" |
305 |
"Primary key fingerprint: %s\n\n"), |
"Primary key fingerprint: %s\n\n"), |
306 |
key->ctx->subkeys->length, |
key->ctx->subkeys->length, |
428 |
} |
} |
429 |
else |
else |
430 |
expires = 1; |
expires = 1; |
431 |
_snprintf (keymsg, sizeof (keymsg)-1, "%04d-%02d-%02d", |
_snprintf (keymsg, DIM (keymsg)-1, "%04d-%02d-%02d", |
432 |
st.wYear, st.wMonth, st.wDay); |
st.wYear, st.wMonth, st.wDay); |
433 |
} |
} |
434 |
|
|
451 |
|
|
452 |
err = ke->signKey (type, sig_class, expires? keymsg : "0"); |
err = ke->signKey (type, sig_class, expires? keymsg : "0"); |
453 |
sfree_if_alloc (pwd); |
sfree_if_alloc (pwd); |
454 |
if (err) { |
if (err) |
|
delete ke; |
|
455 |
msg_box (dlg, gpgme_strerror (err), _("Key Signing"), MB_ERR); |
msg_box (dlg, gpgme_strerror (err), _("Key Signing"), MB_ERR); |
456 |
return TRUE; |
else if (ke->getResult () != 0) |
|
} |
|
|
if (ke->getResult () != 0) { |
|
457 |
msg_box (dlg, _("This key is already signed by your key"), |
msg_box (dlg, _("This key is already signed by your key"), |
458 |
_("Key Signing"), MB_INFO); |
_("Key Signing"), MB_INFO); |
|
delete ke; |
|
|
return TRUE; |
|
|
} |
|
459 |
else { |
else { |
460 |
status_box (dlg, _("Key successfully signed."), _("Key Signing")); |
status_box (dlg, _("Key successfully signed."), _("Key Signing")); |
461 |
key->update = 1; |
key->update = 1; |