61 |
return gpg_error (GPG_ERR_NO_PUBKEY); |
return gpg_error (GPG_ERR_NO_PUBKEY); |
62 |
|
|
63 |
gpgme_set_armor (ctx, 1); |
gpgme_set_armor (ctx, 1); |
64 |
|
gpgme_set_textmode (ctx, 1); |
65 |
|
|
66 |
err = gpg_data_new_from_clipboard (&plain, 0); |
err = gpg_data_new_from_clipboard (&plain, 0); |
67 |
if (err) |
if (err) |
104 |
passphrase_cb_s pwd; |
passphrase_cb_s pwd; |
105 |
char *signer = NULL; |
char *signer = NULL; |
106 |
int force_trust = 0; |
int force_trust = 0; |
|
int kmode = reg_prefs.keylist_mode? KEYLIST_ENCRYPT_MIN : KEYLIST_ENCRYPT; |
|
107 |
int n; |
int n; |
108 |
|
|
109 |
switch( msg ) { |
switch( msg ) { |
114 |
if (!kc) |
if (!kc) |
115 |
BUG (NULL); |
BUG (NULL); |
116 |
lv = keylist_load (GetDlgItem (dlg, IDC_SIGNENC_KEYLIST), |
lv = keylist_load (GetDlgItem (dlg, IDC_SIGNENC_KEYLIST), |
117 |
kc, NULL, kmode, KEY_SORT_USERID); |
kc, NULL, KEYLIST_ENCRYPT_MIN, KEY_SORT_USERID); |
118 |
seclist_init (dlg, IDC_SIGNENC_SECLIST, KEYLIST_FLAG_SHORT, &list); |
seclist_init (dlg, IDC_SIGNENC_SECLIST, KEYLIST_FLAG_SHORT, &list); |
119 |
center_window (dlg, NULL); |
center_window (dlg, NULL); |
|
set_active_window (dlg); |
|
120 |
EnableWindow (GetDlgItem (dlg, IDC_SIGNENC_SECLIST), FALSE); |
EnableWindow (GetDlgItem (dlg, IDC_SIGNENC_SECLIST), FALSE); |
121 |
SetDlgItemText (dlg, IDC_SIGNENC_SELKEY, _("Select key for signing")); |
SetDlgItemText (dlg, IDC_SIGNENC_SELKEY, _("Select key for signing")); |
122 |
SetDlgItemText (dlg, IDC_SIGNENC_SECLISTINF, _("Signing key:")); |
SetDlgItemText (dlg, IDC_SIGNENC_SECLISTINF, _("Signing key:")); |
125 |
|
|
126 |
case WM_DESTROY: |
case WM_DESTROY: |
127 |
seclist_destroy (&list); |
seclist_destroy (&list); |
|
reset_active_window (); |
|
128 |
if (lv) { |
if (lv) { |
129 |
keylist_delete (lv); |
keylist_delete (lv); |
130 |
lv = NULL; |
lv = NULL; |