206 |
gpgme_set_pgm_string ("WinPT "PGM_VERSION); |
gpgme_set_pgm_string ("WinPT "PGM_VERSION); |
207 |
|
|
208 |
s = PTD_get_version (); |
s = PTD_get_version (); |
209 |
if (strcmp (s, "0.8.0")) |
if (strcmp (s, "0.8.0")) { |
|
{ |
|
210 |
log_box (_("Privacy Tray Dynamic (PTD)"), MB_ERR, |
log_box (_("Privacy Tray Dynamic (PTD)"), MB_ERR, |
211 |
_("Please update your PTD.dll to the newest version, " |
_("Please update your PTD.dll to the newest version, " |
212 |
"the version (%s) you use is too old."), s); |
"the version (%s) you use is too old."), s); |
213 |
return 0; |
return 0; |
214 |
} |
} |
215 |
|
|
216 |
if (gpg_md_selftest ()) |
if (gpg_md_selftest ()) { |
|
{ |
|
217 |
msg_box (NULL, _("Cryptographic selftest failed."), |
msg_box (NULL, _("Cryptographic selftest failed."), |
218 |
_("WinPT Error"), MB_ERR); |
_("WinPT Error"), MB_ERR); |
219 |
return 0; |
return 0; |
222 |
set_default_kserver (); |
set_default_kserver (); |
223 |
regist_inst_gnupg (1); |
regist_inst_gnupg (1); |
224 |
regist_inst_winpt (1, &created); |
regist_inst_winpt (1, &created); |
225 |
if (!created) |
if (!created) { |
|
{ |
|
226 |
memset (®_prefs, 0, sizeof (reg_prefs)); |
memset (®_prefs, 0, sizeof (reg_prefs)); |
227 |
reg_prefs.use_tmpfiles = 1; /* default */ |
reg_prefs.use_tmpfiles = 1; /* default */ |
228 |
|
reg_prefs.fm.progress = 0; /* XXX: fix the bug and enable it again */ |
229 |
get_reg_winpt_prefs (®_prefs); |
get_reg_winpt_prefs (®_prefs); |
230 |
if (!reg_prefs.no_hotkeys) |
if (!reg_prefs.no_hotkeys) |
231 |
hotkeys_modify (); |
hotkeys_modify (); |
232 |
} |
} |
233 |
|
|
234 |
rc = gnupg_check_homedir (); |
rc = gnupg_check_homedir (); |
235 |
if (rc) |
if (rc) { |
|
{ |
|
236 |
log_box (_("WinPT Error"), MB_ERR, |
log_box (_("WinPT Error"), MB_ERR, |
237 |
_("GPG home directory is not set correctly.\n" |
_("GPG home directory is not set correctly.\n" |
238 |
"Please check the GPG registry settings:\n%s."), |
"Please check the GPG registry settings:\n%s."), |
261 |
gnupg_check_homedir (); /* change gpgProgram if needed */ |
gnupg_check_homedir (); /* change gpgProgram if needed */ |
262 |
} |
} |
263 |
} |
} |
264 |
else |
else { |
|
{ |
|
265 |
msg_box (NULL, _("GPG home directory could not be determited."), |
msg_box (NULL, _("GPG home directory could not be determited."), |
266 |
_("WinPT Error"), MB_ERR); |
_("WinPT Error"), MB_ERR); |
267 |
goto start; |
goto start; |
269 |
} |
} |
270 |
|
|
271 |
rc = check_gnupg_prog (); |
rc = check_gnupg_prog (); |
272 |
if (rc) |
if (rc) { |
|
{ |
|
273 |
if (msg_box (NULL, _("Could not find the GPG binary (gpg.exe).\n" |
if (msg_box (NULL, _("Could not find the GPG binary (gpg.exe).\n" |
274 |
"Do you want to start the GPG preferences to " |
"Do you want to start the GPG preferences to " |
275 |
"correct this problem?"), _("WinPT Error"), |
"correct this problem?"), _("WinPT Error"), |