100 |
p = get_reg_entry_gpg ("HomeDir"); |
p = get_reg_entry_gpg ("HomeDir"); |
101 |
if (p) { |
if (p) { |
102 |
SetDlgItemText (dlg, IDC_GPGPREFS_HOMEDIR, p); |
SetDlgItemText (dlg, IDC_GPGPREFS_HOMEDIR, p); |
103 |
free_if_alloc (p); |
free_if_alloc (p); |
104 |
} |
} |
105 |
p = get_reg_entry_gpg ("gpgProgram"); |
p = get_reg_entry_gpg ("gpgProgram"); |
106 |
if (p) { |
if (p) { |
107 |
SetDlgItemText (dlg, IDC_GPGPREFS_EXEDIR, p); |
SetDlgItemText (dlg, IDC_GPGPREFS_EXEDIR, p); |
108 |
free_if_alloc (p); |
free_if_alloc (p); |
109 |
} |
} |
110 |
p = get_reg_entry_mo (); |
p = get_reg_entry_mo (); |
111 |
if (p) { |
if (p) { |
112 |
SetDlgItemText (dlg, IDC_GPGPREFS_LOCALE, p); |
SetDlgItemText (dlg, IDC_GPGPREFS_LOCALE, p); |
113 |
free_if_alloc (p); |
free_if_alloc (p); |
114 |
} |
} |
115 |
if (!item_get_text_length (dlg, IDC_GPGPREFS_HOMEDIR)) { |
if (!item_get_text_length (dlg, IDC_GPGPREFS_HOMEDIR)) { |
116 |
p = multi_gnupg_path (0); |
p = multi_gnupg_path (0); |
188 |
case WM_DESTROY: |
case WM_DESTROY: |
189 |
gpg4win = false; |
gpg4win = false; |
190 |
break; |
break; |
|
|
|
|
case WM_SYSCOMMAND: |
|
|
if (LOWORD (wparam) == SC_CLOSE) |
|
|
EndDialog (dlg, FALSE); |
|
|
return FALSE; |
|
191 |
|
|
192 |
case WM_COMMAND: |
case WM_COMMAND: |
193 |
if (HIWORD (wparam) == BN_CLICKED && |
if (HIWORD (wparam) == BN_CLICKED && |
258 |
msg_box (dlg, _("Could not get GPG config file"), |
msg_box (dlg, _("Could not get GPG config file"), |
259 |
_("Preferences"), MB_ERR); |
_("Preferences"), MB_ERR); |
260 |
EndDialog (dlg, FALSE); |
EndDialog (dlg, FALSE); |
261 |
|
return TRUE; |
262 |
} |
} |
263 |
parse_gpg_options (p, &opt); |
parse_gpg_options (p, &opt); |
264 |
|
|
279 |
reg_prefs.gpg.ask_cert_expire = 0; |
reg_prefs.gpg.ask_cert_expire = 0; |
280 |
} |
} |
281 |
|
|
282 |
n = GetDlgItemText(dlg, IDC_GPGPREFS_COMMENT, t, sizeof t - 1); |
n = GetDlgItemText(dlg, IDC_GPGPREFS_COMMENT, t, DIM (t)-1); |
283 |
if (n > 0) |
if (n > 0) |
284 |
modify_entry (opt, ENTRY_MULTI, "comment", t); |
modify_entry (opt, ENTRY_MULTI, "comment", t); |
285 |
else if (n == 0) |
else if (n == 0) |
287 |
else |
else |
288 |
delete_option (opt, "comment"); |
delete_option (opt, "comment"); |
289 |
|
|
290 |
n = GetDlgItemText (dlg, IDC_GPGPREFS_ENCTO, t, sizeof t -1); |
n = GetDlgItemText (dlg, IDC_GPGPREFS_ENCTO, t, DIM (t)-1); |
291 |
if (n > 0) |
if (n > 0) |
292 |
modify_entry (opt, ENTRY_MULTI, "encrypt-to", t); |
modify_entry (opt, ENTRY_MULTI, "encrypt-to", t); |
293 |
else |
else |