[sword-svn] r417 - trunk
scribe at crosswire.org
scribe at crosswire.org
Fri Jun 10 09:25:40 MST 2005
Author: scribe
Date: 2005-06-10 09:25:39 -0700 (Fri, 10 Jun 2005)
New Revision: 417
Modified:
trunk/AboutBoxfrm.cpp
trunk/AboutBoxfrm.dfm
trunk/RxRichEditX.cpp
trunk/mainfrm.cpp
trunk/mainfrm.dfm
trunk/mainfrm.h
trunk/optionfrm.cpp
trunk/searchfrm.cpp
trunk/swdisprtfchap.cpp
trunk/sword.bpr
trunk/sword.res
Log:
A number of fixes up to 1.5.8rc1
Modified: trunk/AboutBoxfrm.cpp
===================================================================
--- trunk/AboutBoxfrm.cpp 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/AboutBoxfrm.cpp 2005-06-10 16:25:39 UTC (rev 417)
@@ -37,8 +37,10 @@
newtext = newtext + "{\\fs24\\cf1\\b " + (*it).second->Name() + " }\t";
newtext = newtext + "{\\fs24\\i " + (*it).second->Description() + " } \\par ";
it3 = (*it2).second.find("About");
- if (it3 != (*it2).second.end())
- newtext = newtext + "{\\fs20\\cf0 " + (*it3).second.c_str() + " }\\par \\par";
+ if (it3 != (*it2).second.end()) {
+ SWBuf about = (*it3).second.c_str();
+ newtext = newtext + "{\\fs20\\cf0 " + about + " }\\par \\par";
+ }
}
}
}
Modified: trunk/AboutBoxfrm.dfm
===================================================================
(Binary files differ)
Modified: trunk/RxRichEditX.cpp
===================================================================
--- trunk/RxRichEditX.cpp 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/RxRichEditX.cpp 2005-06-10 16:25:39 UTC (rev 417)
@@ -901,9 +901,11 @@
WideString __fastcall TRxRichEditX::WordAtCursor(void) {
- TCharRange Range;
+ TCharRange Range, resultRange;
WideString TestStr = "";
- WideString Result = "";
+ WideString retVal = "";
+
+
if (HandleAllocated()) {
long max = TextLen() - 1;
@@ -918,10 +920,14 @@
while (SendMessage(Handle, EM_FINDWORDBREAK, WB_ISDELIMITER, Range.cpMin))
Range.cpMin++;
Range.cpMax = SendMessage(Handle, EM_FINDWORDBREAK, WB_RIGHTBREAK, Range.cpMax);
+
TestStr = Trim(GetTextRange(Range.cpMin, Range.cpMax));
- if (pre)
- Result = TestStr;
- else Result += TestStr;
+ if (pre) {
+ resultRange = Range;
+ }
+ else {
+ resultRange.cpMax = Range.cpMax;
+ }
if (Range.cpMin > 1)
Range.cpMin--;
@@ -952,32 +958,33 @@
}
}
}
- if (Result.Length())
+ retVal = Trim(GetTextRange(resultRange.cpMin, resultRange.cpMax));
+ if (retVal.Length())
break;
}
}
int start = 1;
- int end = Result.Length();
+ int end = retVal.Length();
if (end) {
- if (strchr(",", Result[end]))
+ if (strchr(",", retVal[end]))
end--;
- if (strchr(",", Result[start]))
+ if (strchr(",", retVal[start]))
start++;
// see if we're a verse number
- if (isdigit(Result[start]) && (end > 3)) {
- if (isalpha(Result[start+3])) {
+ if (isdigit(retVal[start]) && (end > 3)) {
+ if (isalpha(retVal[start+3])) {
start++;
- if (isdigit(Result[start]))
+ if (isdigit(retVal[start]))
start++;
- if (isdigit(Result[start]))
+ if (isdigit(retVal[start]))
start++;
}
}
- Result = Result.SubString(start, end-(start-1));
+ retVal = retVal.SubString(start, end-(start-1));
}
- return Result;
+ return retVal;
}
Modified: trunk/mainfrm.cpp
===================================================================
--- trunk/mainfrm.cpp 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/mainfrm.cpp 2005-06-10 16:25:39 UTC (rev 417)
@@ -119,7 +119,7 @@
freeHandLookup->Text = UTF8ToWideString(verse);
// freeHandLookup->Text = verse;
- freeHandLookupoldKeyPress(0, '\r');
+ freeHandLookupKeyPress(0, '\r');
delete [] verStr;
delete [] verStr2;
@@ -155,7 +155,28 @@
DictKeyEdit->Align = alTop;
// DictKeyEdit->Font->Name = "Code2000";
DictKeyEdit->OnChange = DictKeyEditOldChange;
- renderingHint = false;
+
+ cbBook = new TTntComboBox(this);
+ cbBook->Parent = cbBookOld->Parent;
+ cbBook->Left = cbBookOld->Left;
+ cbBook->Top = cbBookOld->Top;
+ cbBook->Width = cbBookOld->Width;
+ cbBook->Height = cbBookOld->Height;
+ cbBook->OnChange = cbBookOld->OnChange;
+// delete cbBookOld;
+
+ freeHandLookup = new TTntComboBox(this);
+ freeHandLookup->Parent = freeHandLookupOld->Parent;
+ freeHandLookup->Left = freeHandLookupOld->Left;
+ freeHandLookup->Top = freeHandLookupOld->Top;
+ freeHandLookup->Width = freeHandLookupOld->Width;
+ freeHandLookup->Height = freeHandLookupOld->Height;
+ freeHandLookup->OnKeyPress = freeHandLookupOld->OnKeyPress;
+// delete freeHandLookupOld;
+
+
+
+ renderingHint = false;
closing = false;
}
@@ -610,14 +631,20 @@
lookupKey = TrimJunk(lookupKey);
// check if all digits (strongs)
int i;
+ bool onlyAlpha = true;
for (i = 0; i < lookupKey.Length(); i++) {
- if (!isdigit(lookupKey[i+1])
- && (toupper(lookupKey[i+1]) != lookupKey[i+1])
- && !strchr("<>()-", lookupKey[i+1]))
- break;
+ if (!isdigit(lookupKey[i+1])) {
+ if (!strchr("<>()-", lookupKey[i+1])) {
+ if (toupper(lookupKey[i+1]) != lookupKey[i+1]) {
+ break;
+ }
+ }
+ else onlyAlpha = false;
+ }
+ else onlyAlpha = false;
}
- if ((i >= (lookupKey.Length()-1)) && (i)) {
+ if ((i >= (lookupKey.Length()-1)) && (i) && (!onlyAlpha)) {
lookupKey = TrimJunk(lookupKey);
String curLex = LexDictPageControl->ActivePage->Caption;
String feature = (DefaultVSKey->Testament() == 1)?"Hebrew":"Greek";
@@ -656,7 +683,7 @@
}
else freeHandLookup->Text = Trim(rtf->SelText);
char ret = '\r';
- freeHandLookupoldKeyPress(Sender, ret);
+ freeHandLookupKeyPress(Sender, ret);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SaveLayout1Click(TObject *Sender)
@@ -686,6 +713,7 @@
sit["SearchWidth"] = IntToStr(searchForm->Width).c_str();
sit["SearchHeight"] = IntToStr(searchForm->Height).c_str();
}
+ sit["SearchResCol0Width"] = IntToStr(searchForm->resultsLV->Column[0]->Width).c_str();
StringList options = mainmgr->getGlobalOptions();
for (StringList::iterator it = options.begin(); it != options.end(); it++) {
@@ -699,6 +727,8 @@
void TForm1::fillVKeySelector(VerseKey *vk) {
VerseKey *myVk = (VerseKey *)vk->clone();
+ myVk->AutoNormalize(1);
+ myVk->Headings(0);
myVk->Error(); //clear error
(*myVk) = TOP;
cbBook->Clear();
@@ -776,7 +806,7 @@
Options2->Caption = _tr("Options");
Options1->Caption = _tr("&Preferences...");
Search1->Caption = _tr("&Search");
- NewSearchWindow1->Caption = _tr("&New Search Window");
+ NewSearchWindow1->Caption = _tr("&Show Search Window");
Tools1->Caption = _tr("&Tools");
InstallManager1->Caption = _tr("Install Manager");
Help1->Caption = _tr("&Help");
@@ -975,7 +1005,7 @@
PreviewForm->btnPrint->Caption = "Print";
PreviewForm->btnClose->Caption = "&Close";
- delete UIFont;
+ delete UIFont;
}
@@ -1175,6 +1205,12 @@
val = max(val, searchForm->Constraints->MinWidth);
searchForm->Width = val;
}
+ if ((eit = (*sit).second.find("SearchResCol0Width")) != (*sit).second.end()) {
+ int val = atoi((*eit).second.c_str());
+ val = min(val, searchForm->Width-20);
+ val = max(val, 50);
+ searchForm->resultsLV->Column[0]->Width = val;
+ }
searchForm->WindowState = (sit->second["SearchMaximized"] == "true") ? wsMaximized : wsNormal;
}
@@ -1291,7 +1327,7 @@
if (startVerse.Length()) {
freeHandLookup->Text = UTF8ToWideString(startVerse.c_str());
char ret = '\r';
- freeHandLookupoldKeyPress(0, ret);
+ freeHandLookupKeyPress(0, ret);
}
}
@@ -1617,8 +1653,47 @@
void TForm1::AddVerseChoices(TPopupMenu *menu, const char *buf, TRxRichEdit *rtf) {
TMenuItem *newitem;
- tmpVerseList = DefaultVSKey->ParseVerseList((char *)buf, *DefaultVSKey);
+ // assert we're not just all numbers
+ const char *ch = buf;
+ for(; *ch; ch++)
+ if (!isdigit(*ch))
+ break;
+ if (!*ch)
+ return;
+
+ SWBuf clickText = buf;
+ SWBuf origText = Trim(clickText.c_str()).c_str();
+ if (clickText.c_str()[0] == '*') { // '*' = NOTE
+ ModMap::iterator it;
+ it = mainmgr->Modules.find(TextPageControl->ActivePage->Caption.c_str());
+ if (it != mainmgr->Modules.end()) {
+ SWModule *module = it->second;
+ SWBuf verseNum = clickText.c_str()+2;
+ int offset = (strchr(verseNum.c_str(), '.') - verseNum.c_str());
+ verseNum.setSize(offset);
+ SWBuf fnNum = clickText.c_str()+3+offset;
+ int oldVerse = DefaultVSKey->Verse();
+ DefaultVSKey->Verse(atoi(verseNum));
+ module->RenderText(); // force entry attributes to get set
+ SWBuf type = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["type"].c_str();
+ SWBuf body = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["body"].c_str();
+ DefaultVSKey->Verse(oldVerse);
+ if ((type == "crossReference") || (clickText.c_str()[1] == 'x')) {
+ clickText = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["refList"].c_str();
+ }
+ }
+ }
+ else {
+ clickText = origText;
+ }
+
+ tmpVerseList = DefaultVSKey->ParseVerseList(clickText.c_str(), *DefaultVSKey);
+
+ // assert we have something to add
+ if (!tmpVerseList.Count())
+ return;
+
ModMap::iterator target;
target = mainmgr->Modules.find(((TPageControl*)rtf->Parent->Parent)->ActivePage->Caption.c_str());
if (target != Form1->mainmgr->Modules.end()) {
@@ -1678,36 +1753,7 @@
SWDispRTF *rtf = (SWDispRTF *)Screen->ActiveControl;
if (clickText.Length()) {
- SWBuf highlight = Trim(clickText).c_str();
-
- if (clickText.c_str()[0] == '*') { // '*' = NOTE
- ModMap::iterator it;
- it = mainmgr->Modules.find(TextPageControl->ActivePage->Caption.c_str());
- if (it != mainmgr->Modules.end()) {
- SWModule *module = it->second;
- SWBuf verseNum = clickText.c_str()+2;
- int offset = (strchr(verseNum.c_str(), '.') - verseNum.c_str());
- verseNum.setSize(offset);
- SWBuf fnNum = clickText.c_str()+3+offset;
- int oldVerse = DefaultVSKey->Verse();
- DefaultVSKey->Verse(atoi(verseNum));
- module->RenderText(); // force entry attributes to get set
- SWBuf type = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["type"].c_str();
- SWBuf body = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["body"].c_str();
- DefaultVSKey->Verse(oldVerse);
- if ((type == "crossReference") || (clickText.c_str()[1] == 'x')) {
- SWBuf refList = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["refList"].c_str();
- tmpVerseList = DefaultVSKey->ParseVerseList(refList.c_str(), *DefaultVSKey);
- if (tmpVerseList.Count())
- AddVerseChoices(menu, refList.c_str(), rtf);
- }
- }
- }
- else {
- tmpVerseList = DefaultVSKey->ParseVerseList(highlight.c_str(), *DefaultVSKey);
- if (tmpVerseList.Count())
- AddVerseChoices(menu, highlight.c_str(), rtf);
- }
+ AddVerseChoices(menu, clickText.c_str(), rtf);
}
else if (!rtf->SelLength) {
int entrylen = strlen(rtf->Text.c_str());
@@ -1794,7 +1840,7 @@
}
//---------------------------------------------------------------------------
-void __fastcall TForm1::freeHandLookupoldKeyPress(TObject *Sender, char &Key)
+void __fastcall TForm1::freeHandLookupKeyPress(TObject *Sender, char &Key)
{
if (Key == '\r') {
ListKey tmpVerseList = DefaultVSKey->ParseVerseList(WideStringToUTF8(freeHandLookup->Text).c_str(), *DefaultVSKey);
@@ -2126,6 +2172,7 @@
SWBuf heading = pc->Pages[i]->Caption.c_str();
pc->Pages[i]->TabVisible = ((*section)[heading.c_str()] == "true");
}
+ searchForm->fillList();
}
}
//---------------------------------------------------------------------------
Modified: trunk/mainfrm.dfm
===================================================================
(Binary files differ)
Modified: trunk/mainfrm.h
===================================================================
--- trunk/mainfrm.h 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/mainfrm.h 2005-06-10 16:25:39 UTC (rev 417)
@@ -255,8 +255,7 @@
TMenuItem *LinktoVerse1;
TMenuItem *Options2;
TMenuItem *Contents1;
- TComboBox *freeHandLookupOrig;
- TPanel *Panel2;
+ TPanel *Panel2;
TSplitter *Splitter3;
TRichEdit *DictKeyEditOld;
TListBox *lbDictKeysOld;
@@ -275,8 +274,8 @@
TActionList *ActionList1;
TAction *Action1;
TMenuItem *NewVer1;
- TComboBox *cbBook;
- TComboBox *freeHandLookup;
+ TComboBox *cbBookOld;
+ TComboBox *freeHandLookupOld;
TPopupMenu *PopupMenu5;
TMenuItem *MenuItem2;
TMenuItem *MenuItem3;
@@ -326,7 +325,7 @@
void __fastcall FormCreate(TObject *Sender);
void __fastcall PopupMenuPopup(TObject *Sender);
void __fastcall createVerseList(TObject *Sender);
- void __fastcall freeHandLookupoldKeyPress(TObject *Sender, char &Key);
+ void __fastcall freeHandLookupKeyPress(TObject *Sender, char &Key);
void __fastcall RTFMouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall RTFURLClick(TObject *Sender, const AnsiString URLText, TMouseButton Button);
@@ -385,6 +384,8 @@
public: // User declarations
TTntListBox *lbDictKeys;
TTntEdit *DictKeyEdit;
+ TTntComboBox *freeHandLookup;
+ TTntComboBox *cbBook;
VerseKey *DefaultVSKey;
SWKey *DefaultStrKey;
BibleCSMGR *mainmgr;
Modified: trunk/optionfrm.cpp
===================================================================
--- trunk/optionfrm.cpp 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/optionfrm.cpp 2005-06-10 16:25:39 UTC (rev 417)
@@ -371,7 +371,7 @@
SaveSchDlg->FileName = name;
if(SaveSchDlg->Execute()){
exName = subdir + name + COLOR_EXT;
- newFileName = SaveSchDlg->FileName.c_str();
+ newFileName = SaveSchDlg->FileName.c_str();
if(!CopyFileA(exName.c_str(), newFileName.c_str(),1))
Application->MessageBox("Export Failed." , "Oops", MB_OK);
}
@@ -534,7 +534,7 @@
AutoVSColor->Checked = (config->Sections["Appearance"]["AutoVSColor"] != "0");
// default off
VerseNewLine->Checked = (config->Sections["Appearance"]["VerseNewLine"] == "1");
-
+ // Current Verse Color
if((tmpval = config->Sections["Appearance"]["CurrentVSColor"]) != ""){
shpCurrVSClr->Brush->Color = TColor(atoi(tmpval.c_str()));
ColorDialogVS->Color = shpCurrVSClr->Brush->Color;
@@ -543,7 +543,7 @@
shpCurrVSClr->Brush->Color = TColor(clBlue);
ColorDialogVS->Color = clBlue;
}
-
+ // Strong's Color
if((tmpval = config->Sections["Appearance"]["StrongsColor"]) != ""){
shpStrongClr->Brush->Color = TColor(atoi(tmpval.c_str()));
ColorDialogStrongs->Color = shpStrongClr->Brush->Color;
@@ -552,7 +552,7 @@
shpStrongClr->Brush->Color = TColor(16711935); // Magenta
ColorDialogStrongs->Color = shpStrongClr->Brush->Color;
}
-
+ // Morph Color
if((tmpval = config->Sections["Appearance"]["MorphColor"]) != ""){
shpMorphClr->Brush->Color = TColor(atoi(tmpval.c_str()));
ColorDialogMorph->Color = shpMorphClr->Brush->Color;
@@ -561,7 +561,7 @@
shpMorphClr->Brush->Color = TColor(60534); // Light Green
ColorDialogMorph->Color = shpMorphClr->Brush->Color;
}
-
+ // Verse Number Color
if((tmpval = config->Sections["Appearance"]["VSNumberColor"]) != ""){
shpNumClr->Brush->Color = TColor(atoi(tmpval.c_str()));
ColorDialogVerseNum->Color = shpNumClr->Brush->Color;
@@ -580,15 +580,6 @@
ColorDialogField->Color = shpFieldClr->Brush->Color;
}
- if((tmpval = config->Sections["Appearance"]["VSNumberColor"]) != ""){
- shpCurrVSClr->Brush->Color = TColor(atoi(tmpval.c_str()));
- ColorDialogVerseNum->Color = shpCurrVSClr->Brush->Color;
- }
- else {
- shpCurrVSClr->Brush->Color = clBlue;
- ColorDialogVerseNum->Color = shpCurrVSClr->Brush->Color;
- }
-
//**** Font BackColor ****//
if((tmpval = config->Sections["Appearance"]["TextBackColor"]) != "")
FontDialogText->BackColor = TColor(atoi(tmpval.c_str()));
@@ -801,28 +792,28 @@
emap["LDBackColor"] = IntToStr(Optionsfrm->FontDialogLD->BackColor).c_str();
emap["PopupBackColor"] = IntToStr(Optionsfrm->FontDialogPopup->BackColor).c_str();
emap["SearchBackColor"] = IntToStr(Optionsfrm->FontDialogSearch->BackColor).c_str();
- emap["UIBackColor"] = IntToStr(Optionsfrm->FontDialogUI->BackColor).c_str();
+ emap["UIBackColor"] = IntToStr(Optionsfrm->FontDialogUI->BackColor).c_str();
emap["TextFontName"] = (Optionsfrm->FontDialogText->Font->Name).c_str();
emap["CommentFontName"] = (Optionsfrm->FontDialogComment->Font->Name).c_str();
emap["LDFontName"] = (Optionsfrm->FontDialogLD->Font->Name).c_str();
emap["PopupFontName"] = (Optionsfrm->FontDialogPopup->Font->Name).c_str();
emap["SearchFontName"] = (Optionsfrm->FontDialogSearch->Font->Name).c_str();
- emap["UIFontName"] = (Optionsfrm->FontDialogUI->Font->Name).c_str();
+ emap["UIFontName"] = (Optionsfrm->FontDialogUI->Font->Name).c_str();
emap["TextFontSize"] = IntToStr(Optionsfrm->FontDialogText->Font->Size).c_str();
emap["CommentFontSize"] = IntToStr(Optionsfrm->FontDialogComment->Font->Size).c_str();
emap["LDFontSize"] = IntToStr(Optionsfrm->FontDialogLD->Font->Size).c_str();
emap["PopupFontSize"] = IntToStr(Optionsfrm->FontDialogPopup->Font->Size).c_str();
emap["SearchFontSize"] = IntToStr(Optionsfrm->FontDialogSearch->Font->Size).c_str();
- emap["UIFontSize"] = IntToStr(Optionsfrm->FontDialogUI->Font->Size).c_str();
+ emap["UIFontSize"] = IntToStr(Optionsfrm->FontDialogUI->Font->Size).c_str();
emap["TextFontColor"] = IntToStr(Optionsfrm->FontDialogText->Font->Color).c_str();
emap["CommentFontColor"] = IntToStr(Optionsfrm->FontDialogComment->Font->Color).c_str();
emap["LDFontColor"] = IntToStr(Optionsfrm->FontDialogLD->Font->Color).c_str();
emap["PopupFontColor"] = IntToStr(Optionsfrm->FontDialogPopup->Font->Color).c_str();
emap["SearchFontColor"] = IntToStr(Optionsfrm->FontDialogSearch->Font->Color).c_str();
- emap["UIFontColor"] = IntToStr(Optionsfrm->FontDialogUI->Font->Color).c_str();
+ emap["UIFontColor"] = IntToStr(Optionsfrm->FontDialogUI->Font->Color).c_str();
emap["locale"] = (const char *)Optionsfrm->localeCB->Items->Objects[Optionsfrm->localeCB->ItemIndex];
Modified: trunk/searchfrm.cpp
===================================================================
--- trunk/searchfrm.cpp 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/searchfrm.cpp 2005-06-10 16:25:39 UTC (rev 417)
@@ -404,6 +404,16 @@
return;
for (mods = manager->Modules.begin(); mods != manager->Modules.end(); mods++) {
+ // assert our module is not hidden
+ ConfigEntMap *section;
+ section = &(*Form1->layoutconf)["TextView"];
+ if (!strncmp(mods->second->Type(), "Comm", 4))
+ section = &(*Form1->layoutconf)["CommentView"];
+ else if (!strncmp(mods->second->Type(), "Lexi", 4))
+ section = &(*Form1->layoutconf)["LDView"];
+ if ((*section)[mods->second->Name()] == "false")
+ continue;
+
for (node = modTreeView->Items->GetFirstNode(); node; node = node->getNextSibling()) {
if (!strcmp(node->Text.c_str(), mods->second->Type())) {
break;
Modified: trunk/swdisprtfchap.cpp
===================================================================
--- trunk/swdisprtfchap.cpp 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/swdisprtfchap.cpp 2005-06-10 16:25:39 UTC (rev 417)
@@ -55,12 +55,22 @@
char buf[254];
System::AnsiString newtext, tmptext, tmptext2;
VerseKey *key = (VerseKey *)(SWKey *)Module;
+ key->Headings(1);
UnicodeRTF uToRTF;
testmt = key->Testament();
+ book = key->Book();
chap = key->Chapter();
- book = key->Book();
verse = key->Verse();
- key->Verse(1);
+ key->AutoNormalize(0);
+ key->Verse(0);
+ if (chap == 1) {
+ key->Chapter(0);
+ if (book == 1) {
+ key->Book(0);
+ if (testmt == 1) key->Testament(0);
+ }
+ }
+ key->AutoNormalize(0);
module = &Module;
type = "Default";
@@ -80,7 +90,7 @@
Module.Error(); // clear error;
SWBuf lastEntry = "something the first entry will never be";
- while ((key->Book() == book) && (key->Chapter() == chap) && (Module.Error() == 0)) {
+ while (((!key->Book())||(key->Book() == book)) && ((!key->Chapter())||(key->Chapter() == chap)) && (Module.Error() == 0)) {
if (lastEntry == (SWBuf)Module.getRawEntry()) {
Module++;
continue;
@@ -112,12 +122,14 @@
newtext = newtext + "\\cf2 "; // \cf2 = second color in color table
}
newtext += tmptext + RTFVersePost;
- newtext = newtext + RTFVerseMarkPre + /*"<a href=\"\">" +*/ IntToStr(key->Verse()) /*+ "</a>"*/ + RTFVerseMarkPost;
+ if (key->Verse())
+ newtext = newtext + RTFVerseMarkPre + /*"<a href=\"\">" +*/ IntToStr(key->Verse()) /*+ "</a>"*/ + RTFVerseMarkPost;
if (!dispAttribs.verseNewLine)
newtext = newtext + "\\par ";
}
else {
- newtext = newtext + RTFVerseMarkPre + /*"<a href=\"\">" +*/ IntToStr(key->Verse()) /*+ "</a>"*/ + RTFVerseMarkPost;
+ if (key->Verse())
+ newtext = newtext + RTFVerseMarkPre + /*"<a href=\"\">" +*/ IntToStr(key->Verse()) /*+ "</a>"*/ + RTFVerseMarkPost;
newtext = newtext + RTFVersePre;
if ((key->Verse() == verse) && (dispAttribs.markCurrentVerse)) {
newtext = newtext + "\\cf2 "; // \cf2 = second color in color table
@@ -152,12 +164,12 @@
key->Verse(verse);
RTFStream->Clear();
RTFStream->WriteBuffer(newtext.c_str(), newtext.Length());
- int fd = open("rtfout.txt", O_CREAT|O_RDWR|O_TRUNC, S_IREAD|S_IWRITE);
- write(fd, newtext.c_str(), newtext.Length());
- close(fd);
+// int fd = open("rtfout.txt", O_CREAT|O_RDWR|O_TRUNC, S_IREAD|S_IWRITE);
+// write(fd, newtext.c_str(), newtext.Length());
+// close(fd);
RTFStream->Position = 0;
- Lines->LoadFromStream(RTFStream);
-
+ Lines->LoadFromStream(RTFStream);
+
makeLinks();
makeImages();
Modified: trunk/sword.bpr
===================================================================
--- trunk/sword.bpr 2005-05-03 22:43:40 UTC (rev 416)
+++ trunk/sword.bpr 2005-06-10 16:25:39 UTC (rev 417)
@@ -73,8 +73,8 @@
AutoIncBuild=1
MajorVer=1
MinorVer=5
-Release=6
-Build=25
+Release=7
+Build=113
Debug=0
PreRelease=0
Special=0
@@ -86,13 +86,13 @@
[Version Info Keys]
CompanyName=CrossWire Software & Bible Society
FileDescription=Windows 32bit User Interface to The SWORD Project
-FileVersion=1.5.6.25
+FileVersion=1.5.7.113
InternalName=biblecs
LegalCopyright=(c) 1990-2005 CrossWire Bible Society under the terms of the GNU General Public License
LegalTrademarks=
OriginalFilename=
ProductName=The SWORD Project
-ProductVersion=1.5.8pre3
+ProductVersion=1.5.8rc1
Comments=Seek Him and you will find Him
[HistoryLists\hlIncludePath]
Modified: trunk/sword.res
===================================================================
(Binary files differ)
More information about the sword-cvs
mailing list