Patch level : 2.2

Files correlati     : tutti
Ricompilazione Demo : [ ]
Commento            :
Rifiuta i caratteri accentati o comunque strani nei campi di testo
associati ad una ricerca.
Questo e' necessario perche' il database non accetta le accentate nei campi chiave


git-svn-id: svn://10.65.10.50/trunk@13401 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2005-10-10 11:11:38 +00:00
parent 2a625307e9
commit aef979d285
2 changed files with 11 additions and 3 deletions

View File

@ -688,7 +688,7 @@ void TApplication::run(
bool TApplication::get_version_info(int& year, int& release, int& tag, int& patch)
{
const char* const VERSIONANDPATCH = "Don't cry for me Argentina.2002.02.00.000.2004";
const char* const VERSIONANDPATCH = "Don't cry for me Argentina.2005.02.00.000.2007";
TToken_string vep(VERSIONANDPATCH, '.');
year = vep.get_int(1);
release = vep.get_int();
@ -696,7 +696,7 @@ bool TApplication::get_version_info(int& year, int& release, int& tag, int& patc
patch = vep.get_int();
int checksum = vep.get_int();
bool valid = year >= 2002 && release > 0 && tag >= 0 && patch >= 0 &&
bool valid = year >= 2005 && release > 0 && tag >= 0 && patch >= 0 &&
checksum == (year + release + tag + patch);
return valid;
}

View File

@ -3759,6 +3759,14 @@ bool TEdit_field::on_key(KEY key)
set_dirty(TRUE);
return handler(K_SPACE);
default:
if (_ctl->is_edit_key(key))
{
// Nei campi di ricerca devo rifiutare i caratteri strani (comprese le accentate)
const bool ok = (key >= ' ' && key < 128) || browse()==NULL;
if (!ok)
beep();
return ok;
}
break;
}