175 |
|
|
176 |
p = get_gnupg_cfgfile (); |
p = get_gnupg_cfgfile (); |
177 |
if (p) { |
if (p) { |
178 |
parse_gpg_options (p, &opt); |
parse_config (p, &opt); |
179 |
free_if_alloc (p); |
free_if_alloc (p); |
180 |
if (opt) { |
if (opt) { |
181 |
if (find_option (opt, "ask-cert-expire")) |
if (find_option (opt, "ask-cert-expire")) |
188 |
e = find_option (opt, "encrypt-to"); |
e = find_option (opt, "encrypt-to"); |
189 |
if (e != NULL) |
if (e != NULL) |
190 |
SetDlgItemText (dlg, IDC_GPGPREFS_ENCTO, e->val); |
SetDlgItemText (dlg, IDC_GPGPREFS_ENCTO, e->val); |
191 |
release_gpg_options (opt); |
release_config (opt); |
192 |
} |
} |
193 |
} |
} |
194 |
|
|
271 |
EndDialog (dlg, FALSE); |
EndDialog (dlg, FALSE); |
272 |
return TRUE; |
return TRUE; |
273 |
} |
} |
274 |
parse_gpg_options (p, &opt); |
parse_config (p, &opt); |
275 |
|
|
276 |
if (IsDlgButtonChecked (dlg, IDC_GPGPREFS_ASKLEVEL)) { |
if (IsDlgButtonChecked (dlg, IDC_GPGPREFS_ASKLEVEL)) { |
277 |
modify_entry (opt, ENTRY_SINGLE, "ask-cert-level", NULL); |
modify_entry (opt, ENTRY_SINGLE, "ask-cert-level", NULL); |
304 |
else |
else |
305 |
delete_option (opt, "encrypt-to"); |
delete_option (opt, "encrypt-to"); |
306 |
|
|
307 |
commit_gpg_options (p, opt); |
commit_config (p, opt); |
308 |
release_gpg_options (opt); |
release_config (opt); |
309 |
/* only return TRUE if the home dir has been changed. */ |
/* only return TRUE if the home dir has been changed. */ |
310 |
if (SendDlgItemMessage (dlg, IDC_GPGPREFS_HOMEDIR, EM_GETMODIFY, 0, 0)) { |
if (SendDlgItemMessage (dlg, IDC_GPGPREFS_HOMEDIR, EM_GETMODIFY, 0, 0)) { |
311 |
set_gnupg_default_key (NULL); |
set_gnupg_default_key (NULL); |