1 |
/* wptGPGPrefsDlg.cpp - WinPT GnuPG Preferences |
/* wptGPGPrefsDlg.cpp - WinPT GnuPG Preferences |
2 |
* Copyright (C) 2001, 2002, 2003 Timo Schulz |
* Copyright (C) 2001-2005 Timo Schulz |
3 |
* |
* |
4 |
* This file is part of WinPT. |
* This file is part of WinPT. |
5 |
* |
* |
44 |
|
|
45 |
|
|
46 |
BOOL CALLBACK |
BOOL CALLBACK |
47 |
gpgprefs_dlg_proc( HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam ) |
gpgprefs_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
48 |
{ |
{ |
49 |
char exedir[1024], homedir[1024], optfile[1024]; |
char exedir[1024], homedir[1024], optfile[1024]; |
50 |
char locale_dir[1024]; |
char locale_dir[1024]; |
166 |
msg_box( dlg, _("Could not save 'gpgProgram' in the registry"), _("Preferences"), MB_ERR ); |
msg_box( dlg, _("Could not save 'gpgProgram' in the registry"), _("Preferences"), MB_ERR ); |
167 |
return FALSE; |
return FALSE; |
168 |
} |
} |
169 |
if( GetDlgItemText( dlg, IDC_GPGPREFS_LOCALE, locale_dir, sizeof locale_dir -1 ) ) { |
if( GetDlgItemText( dlg, IDC_GPGPREFS_LOCALE, locale_dir, sizeof (locale_dir) -1 ) ) { |
170 |
if ( dir_exist_check( locale_dir ) ) { |
if (dir_exist_check (locale_dir)) { |
171 |
log_box( _("Preferences"), MB_ERR, "%s: %s", locale_dir, winpt_strerror( WPTERR_DIR_OPEN ) ); |
log_box( _("Preferences"), MB_ERR, "%s: %s", locale_dir, winpt_strerror (WPTERR_DIR_OPEN)); |
172 |
return FALSE; |
return FALSE; |
173 |
} |
} |
174 |
set_reg_entry_mo( locale_dir ); |
set_reg_entry_mo (locale_dir); |
175 |
set_gettext_file( "winpt", locale_dir ); |
set_gettext_file ("winpt", locale_dir); |
176 |
} |
} |
177 |
|
else |
178 |
|
set_reg_entry_mo (""); |
179 |
|
|
180 |
p = get_gnupg_cfgfile( ); |
p = get_gnupg_cfgfile (); |
181 |
if( !p ) { |
if( !p ) { |
182 |
msg_box( dlg, _("Could not get GPG config file"), _("Preferences"), MB_ERR ); |
msg_box( dlg, _("Could not get GPG config file"), _("Preferences"), MB_ERR ); |
183 |
EndDialog( dlg, FALSE ); |
EndDialog( dlg, FALSE ); |