1 |
/* wptGPGPrefsDlg.cpp - GnuPG Preferences |
/* wptGPGPrefsDlg.cpp - GnuPG Preferences |
2 |
* Copyright (C) 2001-2005 Timo Schulz |
* Copyright (C) 2001-2006 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of WinPT. |
* This file is part of WinPT. |
5 |
* |
* |
68 |
} |
} |
69 |
free_if_alloc (p); |
free_if_alloc (p); |
70 |
} |
} |
71 |
|
free_if_alloc (path); |
72 |
|
|
73 |
p = get_reg_entry_mo (); |
p = get_reg_entry_mo (); |
74 |
if (p) { |
if (p) { |
79 |
} |
} |
80 |
free_if_alloc (p); |
free_if_alloc (p); |
81 |
} |
} |
82 |
|
|
83 |
|
path = get_reg_entry_gpg ("HomeDir"); |
84 |
p = multi_gnupg_path (1); |
p = multi_gnupg_path (1); |
85 |
|
if (path && dir_exist_check (path) == 0 && p && strcmp (path, p)) { |
86 |
|
/* The 'HomeDir' has a higher priority so if the key exists and is |
87 |
|
different from the multi user path, we force the use of it. */ |
88 |
|
free_if_alloc (p); |
89 |
|
p = path; |
90 |
|
} |
91 |
|
else |
92 |
|
free_if_alloc (path); |
93 |
if (p) { |
if (p) { |
94 |
SetDlgItemText (dlg, IDC_GPGPREFS_HOMEDIR, p); |
SetDlgItemText (dlg, IDC_GPGPREFS_HOMEDIR, p); |
95 |
EnableWindow (GetDlgItem (dlg, IDC_GPGPREFS_HOMEDIR), FALSE); |
EnableWindow (GetDlgItem (dlg, IDC_GPGPREFS_HOMEDIR), FALSE); |
96 |
EnableWindow (GetDlgItem (dlg, IDC_GPGPREFS_HOMEDLG), FALSE); |
EnableWindow (GetDlgItem (dlg, IDC_GPGPREFS_HOMEDLG), FALSE); |
97 |
free_if_alloc (p); |
free_if_alloc (p); |
98 |
} |
} |
|
|
|
99 |
return true; |
return true; |
100 |
} |
} |
101 |
|
|