146 |
SetDlgItemText ( dlg, IDC_GPGPREFS_LOCALINF, |
SetDlgItemText ( dlg, IDC_GPGPREFS_LOCALINF, |
147 |
_("Locale directory (to access the translation files)")); |
_("Locale directory (to access the translation files)")); |
148 |
SetDlgItemText (dlg, IDC_GPGPREFS_ASKLEVEL, _("Ask for the signature class during key sign")); |
SetDlgItemText (dlg, IDC_GPGPREFS_ASKLEVEL, _("Ask for the signature class during key sign")); |
149 |
|
SetDlgItemText (dlg, IDC_GPGPREFS_ASKEXPIRE, _("Allow to set an expiration date for signatures")); |
150 |
SetDlgItemText (dlg, IDC_GPGPREFS_CMTINF, _("Comment in armored files")); |
SetDlgItemText (dlg, IDC_GPGPREFS_CMTINF, _("Comment in armored files")); |
151 |
SetDlgItemText (dlg, IDC_GPGPREFS_ENCINF, _("Encrypt to this key")); |
SetDlgItemText (dlg, IDC_GPGPREFS_ENCINF, _("Encrypt to this key")); |
152 |
SetDlgItemText (dlg, IDC_GPGPREFS_ALLOPTINF, _("General GPG options")); |
SetDlgItemText (dlg, IDC_GPGPREFS_ALLOPTINF, _("General GPG options")); |
154 |
SetDlgItemText (dlg, IDC_GPGREFS_EXEDLG, _("Browse...")); |
SetDlgItemText (dlg, IDC_GPGREFS_EXEDLG, _("Browse...")); |
155 |
SetDlgItemText (dlg, IDC_GPGPREFS_LOCDLG, _("Browse...")); |
SetDlgItemText (dlg, IDC_GPGPREFS_LOCDLG, _("Browse...")); |
156 |
SetDlgItemText (dlg, IDC_GPGPREFS_OVRDEFAULT, _("&Overwrite default settings")); |
SetDlgItemText (dlg, IDC_GPGPREFS_OVRDEFAULT, _("&Overwrite default settings")); |
157 |
|
SetDlgItemText (dlg, IDCANCEL, _("&Cancel")); |
158 |
|
|
159 |
gpg4win = load_gpg4win_values (dlg); |
gpg4win = load_gpg4win_values (dlg); |
160 |
if (!gpg4win) { |
if (!gpg4win) { |
167 |
parse_gpg_options (p, &opt); |
parse_gpg_options (p, &opt); |
168 |
free_if_alloc (p); |
free_if_alloc (p); |
169 |
if (opt) { |
if (opt) { |
170 |
|
if (find_option (opt, "ask-cert-expire")) |
171 |
|
CheckDlgButton (dlg, IDC_GPGPREFS_ASKEXPIRE, BST_CHECKED); |
172 |
if (find_option (opt, "ask-cert-level")) |
if (find_option (opt, "ask-cert-level")) |
173 |
CheckDlgButton (dlg, IDC_GPGPREFS_ASKLEVEL, BST_CHECKED); |
CheckDlgButton (dlg, IDC_GPGPREFS_ASKLEVEL, BST_CHECKED); |
174 |
if ((e=find_option (opt, "comment"))) |
e = find_option (opt, "comment"); |
175 |
SetDlgItemText (dlg, IDC_GPGPREFS_COMMENT, e->val); |
if (e != NULL) |
176 |
if ((e=find_option (opt, "encrypt-to"))) |
SetDlgItemText (dlg, IDC_GPGPREFS_COMMENT, e->val); |
177 |
|
e = find_option (opt, "encrypt-to"); |
178 |
|
if (e != NULL) |
179 |
SetDlgItemText (dlg, IDC_GPGPREFS_ENCTO, e->val); |
SetDlgItemText (dlg, IDC_GPGPREFS_ENCTO, e->val); |
180 |
release_gpg_options (opt); |
release_gpg_options (opt); |
181 |
} |
} |
274 |
delete_option (opt, "ask-cert-level"); |
delete_option (opt, "ask-cert-level"); |
275 |
reg_prefs.gpg.ask_cert_level = 0; |
reg_prefs.gpg.ask_cert_level = 0; |
276 |
} |
} |
277 |
|
if (IsDlgButtonChecked (dlg, IDC_GPGPREFS_ASKEXPIRE)) { |
278 |
|
modify_entry (opt, ENTRY_SINGLE, "ask-cert-expire", NULL); |
279 |
|
reg_prefs.gpg.ask_cert_expire = 1; |
280 |
|
} |
281 |
|
else { |
282 |
|
delete_option (opt, "ask-cert-expire"); |
283 |
|
reg_prefs.gpg.ask_cert_expire = 0; |
284 |
|
} |
285 |
|
|
286 |
n = GetDlgItemText(dlg, IDC_GPGPREFS_COMMENT, t, sizeof t - 1); |
n = GetDlgItemText(dlg, IDC_GPGPREFS_COMMENT, t, sizeof t - 1); |
287 |
if (n > 0) |
if (n > 0) |
288 |
modify_entry (opt, ENTRY_MULTI, "comment", t); |
modify_entry (opt, ENTRY_MULTI, "comment", t); |
330 |
|
|
331 |
case IDC_GPGREFS_EXEDLG: |
case IDC_GPGREFS_EXEDLG: |
332 |
s = get_fileopen_dlg (dlg, _("Choose GPG binary"), |
s = get_fileopen_dlg (dlg, _("Choose GPG binary"), |
333 |
_("Executable Files (*.exe)\0*.exe\0\0"), |
"Executable Files (*.exe)\0*.exe\0\0", |
334 |
NULL); |
NULL); |
335 |
if (s) |
if (s) |
336 |
SetDlgItemText (dlg, IDC_GPGPREFS_EXEDIR, s); |
SetDlgItemText (dlg, IDC_GPGPREFS_EXEDIR, s); |