aboutsummaryrefslogtreecommitdiffstats
path: root/apps/windoze/CBuilder5
diff options
context:
space:
mode:
Diffstat (limited to 'apps/windoze/CBuilder5')
-rw-r--r--apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm2
-rw-r--r--apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp9
-rw-r--r--apps/windoze/CBuilder5/BibleCS/mainfrm.cpp89
-rw-r--r--apps/windoze/CBuilder5/BibleCS/mainfrm.dfm4
-rw-r--r--apps/windoze/CBuilder5/BibleCS/optionfrm.cpp8
-rw-r--r--apps/windoze/CBuilder5/BibleCS/optionfrm.dfm2
-rw-r--r--apps/windoze/CBuilder5/BibleCS/stage/colors/Light Blues.sch8
-rw-r--r--apps/windoze/CBuilder5/BibleCS/stage/colors/Lighten Up.sch6
-rw-r--r--apps/windoze/CBuilder5/BibleCS/sword.bpr6
-rw-r--r--apps/windoze/CBuilder5/BibleCS/sword.resbin1976 -> 1976 bytes
-rw-r--r--apps/windoze/CBuilder5/BibleCS/vrslstfrm.cpp24
-rw-r--r--apps/windoze/CBuilder5/BibleCS/vrslstfrm.dfm7
12 files changed, 119 insertions, 46 deletions
diff --git a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm
index 00aeb24..31b6d49 100644
--- a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm
+++ b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm
@@ -102,7 +102,7 @@ object AboutBox: TAboutBox
Width = 213
Height = 21
AutoSize = False
- Caption = 'v1.5.4rc1'
+ Caption = 'v1.5.4rc2'
IsControl = True
end
object Copyright: TLabel
diff --git a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
index b10ed36..5e53439 100644
--- a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
@@ -473,8 +473,13 @@ void TRxRichEditX::fillWithVerses(SWModule *module, ListKey *verses, bool headin
module->getRawEntry();
strcpy(buf, module->KeyText());
int i;
- for (i = 0; i < strlen(buf2); i++) {
- if (buf[i] != buf2[i])
+ for (i = 0; i < strlen(buf); i++) {
+ 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])
break;
}
if (!i || i < (strlen(buf2)/2)) {
diff --git a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
index 705911d..8d79c1d 100644
--- a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
@@ -1566,21 +1566,50 @@ void __fastcall TForm1::PopupMenuPopup(TObject *Sender) {
int selstart = rtf->SelStart;
strcpy(entrytext, rtf->Text.c_str());
// for (versestart = rtf->SelStart; ((versestart)&&(rtf->Text[versestart] != '#')); versestart--);
- for (versestart = selstart; ((versestart)&&(entrytext[versestart] != '#')); versestart--);
- if (versestart) {
- for (verseend = versestart; ((verseend < entrylen) && (entrytext[verseend] != '|')); verseend++);
- if ((verseend < entrylen) && (verseend > selstart)) {
- int len = (verseend - versestart) + 1;
- char *buf = new char [ len + 1 ];
- memset(buf, 0 , len + 1);
- strncpy(buf, &entrytext[versestart+1], len - 2); // strip the # and | from the string
- int buflen = strlen(buf);
- for (int i = 0; i < buflen; i++) {
- if ((buf[i] == 10) || (buf[i] == 13))
- buf[i] = ' ';
+
+ String verseList = "";
+ rtf->SelLength = 1;
+ if (rtf->SelAttributes->Link) {
+ int saveStart = rtf->SelStart;
+ int last = -1;
+ while ((rtf->SelStart != last) && (rtf->SelAttributes->Link)) {
+ last = rtf->SelStart;
+ rtf->SelStart -= 1;
+ rtf->SelLength = 1;
+ }
+ int start = rtf->SelStart + 1;
+ rtf->SelStart++;
+ rtf->SelLength = 1;
+ last = -1;
+ while ((rtf->SelStart != last) && (rtf->SelAttributes->Link)) {
+ last = rtf->SelStart;
+ rtf->SelStart += 1;
+ rtf->SelLength = 1;
+ }
+ int len = (rtf->SelStart - start);
+ rtf->SelStart = saveStart;
+ verseList = rtf->GetTextRange(start, start+len);
+ AddVerseChoices(menu, verseList.c_str(), rtf);
+ }
+ rtf->SelLength = 0;
+
+ if (!verseList.Length()) {
+ for (versestart = selstart; ((versestart)&&(entrytext[versestart] != '#')); versestart--);
+ if (versestart) {
+ for (verseend = versestart; ((verseend < entrylen) && (entrytext[verseend] != '|')); verseend++);
+ if ((verseend < entrylen) && (verseend > selstart)) {
+ int len = (verseend - versestart) + 1;
+ char *buf = new char [ len + 1 ];
+ memset(buf, 0 , len + 1);
+ strncpy(buf, &entrytext[versestart+1], len - 2); // strip the # and | from the string
+ int buflen = strlen(buf);
+ for (int i = 0; i < buflen; i++) {
+ if ((buf[i] == 10) || (buf[i] == 13))
+ buf[i] = ' ';
+ }
+ AddVerseChoices(menu, buf, rtf);
+ delete [] buf;
}
- AddVerseChoices(menu, buf, rtf);
- delete [] buf;
}
}
delete [] entrytext;
@@ -1660,6 +1689,7 @@ void __fastcall TForm1::RTFURLClick(TObject *Sender, const AnsiString URLText, T
clickText = URLText;
rtf->PopupMenu->Popup(Mouse->CursorPos.x, Mouse->CursorPos.y);
}
+ else renderingHint = false;
}
@@ -2034,11 +2064,23 @@ void __fastcall TForm1::ApplicationEvents1ShowHint(AnsiString &HintStr,
TPoint mousePoint = pc->ScreenToClient(Mouse->CursorPos);
int tab = pc->IndexOfTabAt(mousePoint.x, mousePoint.y);
if (tab >=0) {
- TTabSheet *ts = pc->Pages[tab];
- SWModule *module = mainmgr->Modules[ts->Caption.c_str()];
- if (module) {
- HintStr = module->Description();
- HintInfo.CursorRect = TRect(TPoint(mousePoint.x-7, mousePoint.y-7), TPoint(mousePoint.x+7, mousePoint.y+7));
+ int visTabs = -1;
+ int i;
+ for (i = 0; i < pc->PageCount; i++) {
+ if (pc->Pages[i]->TabVisible) {
+ if (++visTabs >= tab)
+ break;
+ }
+ }
+ if (pc->PageCount) {
+ TTabSheet *ts = pc->Pages[i];
+
+ SWModule *module = mainmgr->Modules[ts->Caption.c_str()];
+ if (module) {
+ HintStr = module->Description();
+ HintInfo.CursorRect = pc->TabRect(tab);
+// HintInfo.CursorRect = >TRect(TPoint(mousePoint.x-7, mousePoint.y-7), TPoint(mousePoint.x+7, mousePoint.y+7));
+ }
}
}
return;
@@ -2184,7 +2226,7 @@ void __fastcall TForm1::ApplicationEvents1ShowHint(AnsiString &HintStr,
break;
}
- if ((i == strongsWord.Length()+1) && (i-1)) {
+ if (!link && (i == strongsWord.Length()+1) && (i-1)) {
String feature = (DefaultVSKey->Testament() == 1)?"Hebrew":"Greek";
feature += (preChar == '(')?"Parse":"Def";
if (!strncmp(HintInfo.HintControl->Name.c_str(), "TextRTFLXX", 10))
@@ -2206,7 +2248,7 @@ void __fastcall TForm1::ApplicationEvents1ShowHint(AnsiString &HintStr,
}
// try looking up the word in a general dictionary
- if (hintWords) {
+ if (!link && hintWords) {
string tmpval = optionsconf->Sections["ModDefaults"]["GenDict"];
if (tmpval.size()) {
SWModule *defMod = mainmgr->Modules[tmpval];
@@ -2225,13 +2267,14 @@ void __fastcall TForm1::ApplicationEvents1ShowHint(AnsiString &HintStr,
if (!HintStr.Length()) {
// HintInfo = saveHintInfo;
HintInfo.HintWindowClass = __classid(THintWindow);
-
+/*
if (module)
HintStr = module->Description();
if (lastHint == HintStr)
HintStr = "";
- lastHint = HintStr;
+*/
lastWord = "";
+// renderingHint = false;
}
lastHint = HintStr;
}
diff --git a/apps/windoze/CBuilder5/BibleCS/mainfrm.dfm b/apps/windoze/CBuilder5/BibleCS/mainfrm.dfm
index 41f747c..b1cf7a1 100644
--- a/apps/windoze/CBuilder5/BibleCS/mainfrm.dfm
+++ b/apps/windoze/CBuilder5/BibleCS/mainfrm.dfm
@@ -1,6 +1,6 @@
object Form1: TForm1
- Left = 451
- Top = 100
+ Left = 311
+ Top = 144
Width = 686
Height = 510
Caption = 'The SWORD Project'
diff --git a/apps/windoze/CBuilder5/BibleCS/optionfrm.cpp b/apps/windoze/CBuilder5/BibleCS/optionfrm.cpp
index aaaae46..d067d1c 100644
--- a/apps/windoze/CBuilder5/BibleCS/optionfrm.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/optionfrm.cpp
@@ -28,7 +28,7 @@ __fastcall TOptionsfrm::TOptionsfrm(TComponent* Owner)
FontDialogLD = new TFontSelFrm(this);
FontDialogPopup = new TFontSelFrm(this);
FontDialogSearch = new TFontSelFrm(this);
- }
+}
//---------------------------------------------------------------------------
void __fastcall TOptionsfrm::btnCurrVerseClick(TObject *Sender)
{
@@ -696,9 +696,9 @@ void TOptionsfrm::LoadMiscSettings(SWConfig* config) {
Optionsfrm->devsAsDictsCB->Checked = true;
Optionsfrm->glosAsDictsCB->Checked = true;
- tmpval = ((eit = config->Sections["General"].find("GlosAsDicts")) != config->Sections["General"].end())? (*eit).second : (string)"true";
- if (stricmp(tmpval.c_str(), "false"))
- Optionsfrm->glosAsDictsCB->Checked = true;
+ tmpval = config->Sections["General"].getWithDefault("GlosAsDicts", "true");
+ if (!stricmp(tmpval.c_str(), "false"))
+ Optionsfrm->glosAsDictsCB->Checked = false;
Optionsfrm->devSplashCB->Checked = false;
tmpval = ((eit = config->Sections["General"].find("TipOfTheDay")) != config->Sections["General"].end())? (*eit).second : (string)"";
diff --git a/apps/windoze/CBuilder5/BibleCS/optionfrm.dfm b/apps/windoze/CBuilder5/BibleCS/optionfrm.dfm
index 920be7e..95d89fc 100644
--- a/apps/windoze/CBuilder5/BibleCS/optionfrm.dfm
+++ b/apps/windoze/CBuilder5/BibleCS/optionfrm.dfm
@@ -75,7 +75,7 @@ object Optionsfrm: TOptionsfrm
Top = 0
Width = 554
Height = 284
- ActivePage = TabSheet1
+ ActivePage = TabSheet2
Align = alClient
TabOrder = 1
object TabSheet1: TTabSheet
diff --git a/apps/windoze/CBuilder5/BibleCS/stage/colors/Light Blues.sch b/apps/windoze/CBuilder5/BibleCS/stage/colors/Light Blues.sch
index bf26d58..6ae34b7 100644
--- a/apps/windoze/CBuilder5/BibleCS/stage/colors/Light Blues.sch
+++ b/apps/windoze/CBuilder5/BibleCS/stage/colors/Light Blues.sch
@@ -2,23 +2,23 @@
[Appearance]
CommentBackColor=16771797
CommentFontColor=8388608
-CommentFontName=MS Sans Serif
+CommentFontName=Arial
CommentFontSize=12
CurrentVSColor=8388863
FieldColor=16771797
LDBackColor=16771797
LDFontColor=8388608
-LDFontName=MS Sans Serif
+LDFontName=Arial
LDFontSize=12
MorphColor=4227072
PopupBackColor=16773087
PopupFontColor=8388608
-PopupFontName=MS Sans Serif
+PopupFontName=Arial
PopupFontSize=10
StrongsColor=8388736
TextBackColor=16771797
TextFontColor=8388608
-TextFontName=MS Sans Serif
+TextFontName=Arial
TextFontSize=12
VSNumberColor=255
diff --git a/apps/windoze/CBuilder5/BibleCS/stage/colors/Lighten Up.sch b/apps/windoze/CBuilder5/BibleCS/stage/colors/Lighten Up.sch
index 657beba..12f1bc5 100644
--- a/apps/windoze/CBuilder5/BibleCS/stage/colors/Lighten Up.sch
+++ b/apps/windoze/CBuilder5/BibleCS/stage/colors/Lighten Up.sch
@@ -2,13 +2,13 @@
[Appearance]
CommentBackColor=16777215
CommentFontColor=8421504
-CommentFontName=MS Serif
+CommentFontName=Times New Roman
CommentFontSize=12
CurrentVSColor=0
FieldColor=12632256
LDBackColor=16777215
LDFontColor=8421504
-LDFontName=MS Serif
+LDFontName=Times New Roman
LDFontSize=12
MorphColor=5329233
PopupBackColor=15461355
@@ -18,7 +18,7 @@ PopupFontSize=11
StrongsColor=5329233
TextBackColor=16777215
TextFontColor=8421504
-TextFontName=MS Serif
+TextFontName=Times New Roman
TextFontSize=12
VSNumberColor=12632256
diff --git a/apps/windoze/CBuilder5/BibleCS/sword.bpr b/apps/windoze/CBuilder5/BibleCS/sword.bpr
index bc458e9..25de7c2 100644
--- a/apps/windoze/CBuilder5/BibleCS/sword.bpr
+++ b/apps/windoze/CBuilder5/BibleCS/sword.bpr
@@ -73,7 +73,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=5
Release=3
-Build=113
+Build=114
Debug=0
PreRelease=0
Special=0
@@ -85,13 +85,13 @@ CodePage=1252
[Version Info Keys]
CompanyName=CrossWire Software &amp; Bible Society
FileDescription=Windows 32bit User Interface to The SWORD Project
-FileVersion=1.5.3.113
+FileVersion=1.5.3.114
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.4rc1
+ProductVersion=1.5.4rc2
Comments=Seek Him and you will find Him
[HistoryLists\hlIncludePath]
diff --git a/apps/windoze/CBuilder5/BibleCS/sword.res b/apps/windoze/CBuilder5/BibleCS/sword.res
index e96e557..cc86a9a 100644
--- a/apps/windoze/CBuilder5/BibleCS/sword.res
+++ b/apps/windoze/CBuilder5/BibleCS/sword.res
Binary files differ
diff --git a/apps/windoze/CBuilder5/BibleCS/vrslstfrm.cpp b/apps/windoze/CBuilder5/BibleCS/vrslstfrm.cpp
index 12e5f6a..7e8e39b 100644
--- a/apps/windoze/CBuilder5/BibleCS/vrslstfrm.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/vrslstfrm.cpp
@@ -53,12 +53,22 @@ void __fastcall TVerseListForm::ListBox1DblClick(TObject *Sender)
//---------------------------------------------------------------------------
void __fastcall TVerseListForm::FormShow(TObject *Sender)
{
+ Caption = _tr("Verse List");
+ SpeedButton1->Hint = _tr("Add Current Verse To List");
+ SpeedButton2->Hint = _tr("Remove Highlighted Entry From List");
+ SpeedButton3->Hint = _tr("Copy All Entries To Clipboard");
+ SpeedButton4->Hint = _tr("Print All Entries");
+ SpeedButton5->Hint = _tr("Save Verse List To File");
+ SpeedButton6->Hint = _tr("Load Verse List From File");
fillWithVerseList(verseList);
}
//---------------------------------------------------------------------------
void TVerseListForm::fillWithVerseList(ListKey &verseList) {
+
+
+
ListBox1->Items->Clear();
for (verseList = TOP; (!verseList.Error()); verseList++)
ListBox1->Items->Add((const char *)verseList);
@@ -115,7 +125,9 @@ void __fastcall TVerseListForm::SpeedButton4Click(TObject *Sender)
void __fastcall TVerseListForm::SpeedButton5Click(TObject *Sender)
{
- if (VLSaveDialog->Execute()) {
+ int result = VLSaveDialog->Execute();
+ SetCurrentDir(ExtractFilePath(Application->ExeName));
+ if (result) {
if (FileMgr::existsFile(VLSaveDialog->FileName.c_str())) {
string message = _tr("File exists. Overwrite?");
string header = _tr("Overwrite File");
@@ -128,7 +140,11 @@ void __fastcall TVerseListForm::SpeedButton5Click(TObject *Sender)
fd = FileMgr::systemFileMgr.open(VLSaveDialog->FileName.c_str(), O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
ListKey verses;
for (int i = 0; i < ListBox1->Items->Count; i++) {
- verses << ListBox1->Items->Strings[i].c_str();
+ VerseKey toEn;
+ toEn = ListBox1->Items->Strings[i].c_str();
+ toEn.getText();
+ toEn.setLocale("en_us");
+ verses << toEn.getText();
}
const char *rangeText = verses.getRangeText();
write(fd->getFd(), rangeText, strlen(rangeText));
@@ -139,7 +155,9 @@ void __fastcall TVerseListForm::SpeedButton5Click(TObject *Sender)
void __fastcall TVerseListForm::SpeedButton6Click(TObject *Sender)
{
- if (VLOpenDialog->Execute()) {
+ int result = VLOpenDialog->Execute();
+ SetCurrentDir(ExtractFilePath(Application->ExeName));
+ if (result) {
if (!FileMgr::existsFile(VLOpenDialog->FileName.c_str())) {
return;
}
diff --git a/apps/windoze/CBuilder5/BibleCS/vrslstfrm.dfm b/apps/windoze/CBuilder5/BibleCS/vrslstfrm.dfm
index 5277e5b..b95ac6d 100644
--- a/apps/windoze/CBuilder5/BibleCS/vrslstfrm.dfm
+++ b/apps/windoze/CBuilder5/BibleCS/vrslstfrm.dfm
@@ -14,6 +14,7 @@ object VerseListForm: TVerseListForm
OldCreateOrder = True
Position = poScreenCenter
Scaled = False
+ ShowHint = True
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
@@ -50,6 +51,7 @@ object VerseListForm: TVerseListForm
Top = 2
Width = 23
Height = 22
+ Hint = 'Add Current Verse To List'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000130B0000130B00001000000000000000000000000000
@@ -71,6 +73,7 @@ object VerseListForm: TVerseListForm
Top = 2
Width = 23
Height = 22
+ Hint = 'Remove Highlighted Entry From List'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
@@ -92,6 +95,7 @@ object VerseListForm: TVerseListForm
Top = 2
Width = 23
Height = 22
+ Hint = 'Copy All Entries To Clipboard'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000130B0000130B00001000000000000000000000000000
@@ -113,6 +117,7 @@ object VerseListForm: TVerseListForm
Top = 2
Width = 23
Height = 22
+ Hint = 'Print All Entries'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000130B0000130B00001000000000000000000000000000
@@ -134,6 +139,7 @@ object VerseListForm: TVerseListForm
Top = 2
Width = 23
Height = 22
+ Hint = 'Save Verse List To File'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
@@ -155,6 +161,7 @@ object VerseListForm: TVerseListForm
Top = 2
Width = 23
Height = 22
+ Hint = 'Load Verse List From File'
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000