From 6423eeeb7e0d68e62d4e9b818173b2ded9b8a54b Mon Sep 17 00:00:00 2001 From: danglassey Date: Wed, 11 Sep 2002 13:02:15 +0000 Subject: sync with crosswire 20020911-1300 --- apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.cpp | 2 +- apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm | 6 ++-- apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp | 39 ++++++++++++++++++++----- apps/windoze/CBuilder5/BibleCS/mainfrm.cpp | 13 +++++---- apps/windoze/CBuilder5/BibleCS/searchfrm.cpp | 5 +++- apps/windoze/CBuilder5/BibleCS/sword.bpr | 20 ++++++------- apps/windoze/CBuilder5/BibleCS/sword.res | Bin 1976 -> 1976 bytes apps/windoze/CBuilder5/BibleCS/swordlib.bpr | 14 ++++----- 8 files changed, 64 insertions(+), 35 deletions(-) (limited to 'apps/windoze/CBuilder5/BibleCS') diff --git a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.cpp b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.cpp index b76b9b1..b5d6be1 100644 --- a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.cpp +++ b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.cpp @@ -59,7 +59,7 @@ void __fastcall TAboutBox::FormShow(TObject *Sender) { newtext += "sword-patches@crosswire.org (please include unified diffs if possible (diff -u)) \\par\\par "; newtext += "To be on our mailing list: \\par "; newtext += "sword-list-info@crosswire.org \\par\\par "; - newtext += "This software is provided free for the study of God and His Word. You DO NOT NEED TO license or pay for this software. Please: copy it freely and distribute it to athiests in Russia :), post it on your favorite FTP site, write your own modules and features for it, include it on your lastest freeware CDROM, incorporate all the cool utility classes into a product of your own, write a tract module for the program and sneak it onto all of your co-workers' computers and blame it on a virus, make fun of your pastor for spending $400 dollars on a similar package, give it to your pastor who can't figure out how to use his $400 dollar package :) \\par\\par "; + newtext += "This software is provided free for the study of God and His Word. You DO NOT NEED TO license or pay for this software. Please: copy it freely and distribute it to atheists in Russia :), post it on your favorite FTP site, write your own modules and features for it, include it on your lastest freeware CDROM, incorporate all the cool utility classes into a product of your own, write a tract module for the program and sneak it onto all of your co-workers' computers and blame it on a virus, make fun of your pastor for spending $400 dollars on a similar package, give it to your pastor who can't figure out how to use his $400 dollar package :) \\par\\par "; newtext += "OK, if you still feel the need, you can help our organization out at: \\par\\par "; newtext += "CrossWire Software & Bible Society \\par "; newtext += "P. O. Box 2528 \\par "; diff --git a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm index c5c7e41..186f784 100644 --- a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm +++ b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm @@ -1,6 +1,6 @@ object AboutBox: TAboutBox - Left = 253 - Top = 97 + Left = 290 + Top = 103 BorderStyle = bsDialog Caption = 'About The SWORD Project' ClientHeight = 448 @@ -102,7 +102,7 @@ object AboutBox: TAboutBox Width = 213 Height = 21 AutoSize = False - Caption = 'v1.5.4rc2' + Caption = 'v1.5.4rc4' IsControl = True end object Copyright: TLabel diff --git a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp index c23638f..1fa4976 100644 --- a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp +++ b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp @@ -452,7 +452,7 @@ void TRxRichEditX::fillWithVerses(SWModule *module, ListKey *verses, bool headin SWKey *lastKey = 0; bool first = true; - while (verses->Count() && !module->Error() && newtext.Length() < 10000 ) { + while (verses->Count() && !module->Error() && newtext.Length() < 40000 ) { SWKey *testKey = verses->GetElement(); VerseKey *element = SWDYNAMIC_CAST(VerseKey, testKey); if (heading) { @@ -475,17 +475,22 @@ void TRxRichEditX::fillWithVerses(SWModule *module, ListKey *verses, bool headin strcpy(buf, module->KeyText()); toupperstr_utf8(buf); int i; + char *start1 = buf; + char *start2 = buf2; for (i = 0; i < strlen(buf); i++) { - if ((buf[i] == buf2[i]) || (buf[i] != '0')) + if (*start1 == '0') + start1++; + if (*start2 == '0') + start2++; + if ((*start1 != '0') && (*start2 != '0')) if ((buf[i] == buf2[i]) || (buf[i] != '0')) break; } - char *buf3 = buf+i; - for (i = 0; i < strlen(buf2) && (i < strlen(buf3)); i++) { - if ((buf3[i] != buf2[i]) && - (SW_toupper(buf3[i]) != SW_toupper(buf2[i]))) + for (i = 0; i < strlen(start1) && (i < strlen(start2)); i++) { + if ((start1[i] != start2[i]) && + (SW_toupper(start1[i]) != SW_toupper(start2[i]))) break; } - if (!i || i < (strlen(buf2)/2)) { + if (!i || i < (strlen(start1)/2)) { delete [] buf2; verses->Remove(); continue; @@ -888,6 +893,26 @@ WideString __fastcall TRxRichEditX::WordAtCursor(void) { break; } } + int start = 1; + int end = Result.Length(); + if (end) { + if (strchr(",", Result[end])) + end--; + if (strchr(",", Result[start])) + start++; + // see if we're a verse number + if (isdigit(Result[start]) && (end > 3)) { + if (isalpha(Result[start+3])) { + start++; + if (isdigit(Result[start])) + start++; + if (isdigit(Result[start])) + start++; + } + } + Result = Result.SubString(start, end-(start-1)); + } + return Result; } diff --git a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp index 511d501..5df1c50 100644 --- a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp +++ b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp @@ -547,13 +547,13 @@ void __fastcall TForm1::DictionaryLookup1Click(TObject *Sender) SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl; int wordstart; int saveSelStart = rtf->SelStart; - String lookupKey; + WideString lookupKey; ConfigEntMap::iterator eit; char preChar = 0; if (!rtf->SelLength) { preChar = (rtf->WordAtCursor().Length()) ? rtf->WordAtCursor()[1] : 0; - lookupKey = TrimJunk(rtf->WordAtCursor()); + lookupKey = rtf->WordAtCursor(); } else { preChar = rtf->Text[(rtf->SelStart)?rtf->SelStart:0]; @@ -562,12 +562,13 @@ void __fastcall TForm1::DictionaryLookup1Click(TObject *Sender) // check if all digits (strongs) int i; - for (i = 0; i < strlen(lookupKey.c_str()); i++) { - if (!isdigit(lookupKey.c_str()[i])) + for (i = 0; i < lookupKey.Length(); i++) { + if (!isdigit(lookupKey[i+1]) && !strchr("<>()", lookupKey[i+1])) break; } - if ((i == strlen(lookupKey.c_str())) && (i)) { + if ((i == lookupKey.Length()) && (i)) { + lookupKey = TrimJunk(lookupKey); String curLex = LexDictPageControl->ActivePage->Caption; String feature = (DefaultVSKey->Testament() == 1)?"Hebrew":"Greek"; feature += (preChar == '(')?"Parse":"Def"; @@ -584,7 +585,7 @@ void __fastcall TForm1::DictionaryLookup1Click(TObject *Sender) } } - DictKeyEdit->Text = UTF8ToWideString(lookupKey); + DictKeyEdit->Text = lookupKey; } diff --git a/apps/windoze/CBuilder5/BibleCS/searchfrm.cpp b/apps/windoze/CBuilder5/BibleCS/searchfrm.cpp index 4d98ade..c9f70a2 100644 --- a/apps/windoze/CBuilder5/BibleCS/searchfrm.cpp +++ b/apps/windoze/CBuilder5/BibleCS/searchfrm.cpp @@ -180,6 +180,8 @@ void __fastcall TsearchForm::TSearchThread::FillListBox(void) TListItem *pItem; SWKey *savekey = (SWKey *)*(parent->target); + if (!savekey->Persist()) + savekey = 0; for (results = TOP; !results.Error(); results++) { parent->target->setKey(results); pItem = parent->resultsLV->Items->Add(); @@ -188,7 +190,8 @@ void __fastcall TsearchForm::TSearchThread::FillListBox(void) // pItem->SubItems->Add((*parent->target).second->StripText()); // pItem = resultsLV->Items->Add( } - parent->target->setKey(*savekey); + if (savekey) + parent->target->setKey(*savekey); // ListBox1->Items->Pack(); // so Count is set correctly (per helpfile) parent->Caption = ((AnsiString)parent->resultsLV->Items->Count + (AnsiString)" " + (AnsiString)((parent->resultsLV->Items->Count == 1) ? _tr("match") : _tr("matches"))) + (AnsiString)" from [ " + (AnsiString)parent->target->Description() + (AnsiString)" (" + (AnsiString)parent->target->Name() + (AnsiString)") ]"; parent->searchBtn->Caption = _tr("Search"); diff --git a/apps/windoze/CBuilder5/BibleCS/sword.bpr b/apps/windoze/CBuilder5/BibleCS/sword.bpr index 733c891..1de665e 100644 --- a/apps/windoze/CBuilder5/BibleCS/sword.bpr +++ b/apps/windoze/CBuilder5/BibleCS/sword.bpr @@ -43,7 +43,7 @@ - + @@ -55,11 +55,11 @@ - - + + - - + + @@ -73,7 +73,7 @@ AutoIncBuild=1 MajorVer=1 MinorVer=5 Release=3 -Build=116 +Build=118 Debug=0 PreRelease=0 Special=0 @@ -85,13 +85,13 @@ CodePage=1252 [Version Info Keys] CompanyName=CrossWire Software & Bible Society FileDescription=Windows 32bit User Interface to The SWORD Project -FileVersion=1.5.3.116 +FileVersion=1.5.3.118 InternalName=biblecs LegalCopyright=(c) 2002 CrossWire Bible Society under the terms of the GNU General Public License LegalTrademarks= OriginalFilename= ProductName=The SWORD Project -ProductVersion=1.5.4rc2 +ProductVersion=1.5.4rc4 Comments=Seek Him and you will find Him [HistoryLists\hlIncludePath] @@ -125,8 +125,8 @@ Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=5 -Item0=_ICU_;_ICUSWORD_;_DEBUG -Item1=_ICU_;_ICUSWORD_ +Item0=_ICU_;_ICUSWORD_ +Item1=_ICU_;_ICUSWORD_;_DEBUG Item2=_ICU_ Item3=_ICU_;_DEBUG Item4=_DEBUG diff --git a/apps/windoze/CBuilder5/BibleCS/sword.res b/apps/windoze/CBuilder5/BibleCS/sword.res index 2908244..9366299 100644 Binary files a/apps/windoze/CBuilder5/BibleCS/sword.res and b/apps/windoze/CBuilder5/BibleCS/sword.res differ diff --git a/apps/windoze/CBuilder5/BibleCS/swordlib.bpr b/apps/windoze/CBuilder5/BibleCS/swordlib.bpr index b97621d..52ae339 100644 --- a/apps/windoze/CBuilder5/BibleCS/swordlib.bpr +++ b/apps/windoze/CBuilder5/BibleCS/swordlib.bpr @@ -78,7 +78,7 @@ - + @@ -107,11 +107,11 @@ -I..\..\..\..\src\modules\comments\rawcom -I..\..\..\..\src\mgr -I..\..\..\..\src\keys -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -D_ICU_ -D_DEBUG"/> - - + + - + @@ -159,8 +159,8 @@ Item5=..\..\..\..\src\modules\lexdict\zld;..\..;..\..\..\..\src\utilfuns\zlib;.. [HistoryLists\hlConditionals] Count=5 -Item0=_ICU_;_ICUSWORD_;_DEBUG -Item1=_ICU_;_ICUSWORD_ +Item0=_ICU_;_ICUSWORD_ +Item1=_ICU_;_ICUSWORD_;_DEBUG Item2=_ICU_ Item3=_ICU_;_DEBUG Item4=_DEBUG -- cgit