From aef979d28536b4855a0c882f44c0a786a3841e5d Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 10 Oct 2005 11:11:38 +0000 Subject: [PATCH] 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 --- include/applicat.cpp | 4 ++-- include/maskfld.cpp | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/applicat.cpp b/include/applicat.cpp index cfca637d9..343ba10df 100755 --- a/include/applicat.cpp +++ b/include/applicat.cpp @@ -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; } diff --git a/include/maskfld.cpp b/include/maskfld.cpp index 9135918b9..0ae9ffefe 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -3758,7 +3758,15 @@ bool TEdit_field::on_key(KEY key) case K_CTRL+K_SPACE: set_dirty(TRUE); return handler(K_SPACE); - default: + 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; }