[sword-cvs] sword/apps/windoze/CBuilder5/BibleCS DevOfTheDay.cpp,1.3,1.4 RxRichEditX.cpp,1.47,1.48 RxRichEditX.h,1.17,1.18 mainfrm.cpp,1.124,1.125 searchfrm.cpp,1.43,1.44 sword.res,1.105,1.106 vrslstfrm.cpp,1.14,1.15

sword@www.crosswire.org sword@www.crosswire.org
Fri, 4 Jul 2003 18:16:48 -0700


Update of /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS
In directory www:/tmp/cvs-serv24006/apps/windoze/CBuilder5/BibleCS

Modified Files:
	DevOfTheDay.cpp RxRichEditX.cpp RxRichEditX.h mainfrm.cpp 
	searchfrm.cpp sword.res vrslstfrm.cpp 
Log Message:
Changed entry attribute osis footnotes around to better facilitate separation of crossRefs from other kinds of footnotes

Index: DevOfTheDay.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/DevOfTheDay.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DevOfTheDay.cpp	27 Jun 2003 11:31:41 -0000	1.3
--- DevOfTheDay.cpp	5 Jul 2003 01:16:46 -0000	1.4
***************
*** 44,48 ****
  	SWBuf tmpval = Form1->optionsconf->Sections["ModDefaults"]["DailyDevotion"];
  	if ((it = Form1->mainmgr->Modules.find(tmpval)) != Form1->mainmgr->Modules.end()) {
! 		RichTip->fillWithVerses(it->second, &key, false, false);
  	}
  	else	DevOfTheDay2->RichTip->Text = "A Daily Devotional is not installed or is not configured for use with the \"Devotional of the Day.\n\nTo configure an installed devotional for use with this dialog box open the Preferences dialog box by going to the \"Options\" menu and selecting \"Preferences...\"; then click the \"Special Modules\" tab. Find the \"Default Devotional\" option and select a devotional to use from the list. If nothing shows up in the pull-down list you will need to install a devotional. This can be done by using the Install Manager. Some examples of devotionals are \"Spurgeon's Morning and Evening\" or \"Jonathan Bagster's Daily Light\".\n\nVisit our website at www.crosswire.org for more information."; 
--- 44,48 ----
  	SWBuf tmpval = Form1->optionsconf->Sections["ModDefaults"]["DailyDevotion"];
  	if ((it = Form1->mainmgr->Modules.find(tmpval)) != Form1->mainmgr->Modules.end()) {
! 		RichTip->fillWithVerses(it->second, &key, 0, false, false);
  	}
  	else	DevOfTheDay2->RichTip->Text = "A Daily Devotional is not installed or is not configured for use with the \"Devotional of the Day.\n\nTo configure an installed devotional for use with this dialog box open the Preferences dialog box by going to the \"Options\" menu and selecting \"Preferences...\"; then click the \"Special Modules\" tab. Find the \"Default Devotional\" option and select a devotional to use from the list. If nothing shows up in the pull-down list you will need to install a devotional. This can be done by using the Install Manager. Some examples of devotionals are \"Spurgeon's Morning and Evening\" or \"Jonathan Bagster's Daily Light\".\n\nVisit our website at www.crosswire.org for more information."; 

Index: RxRichEditX.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** RxRichEditX.cpp	27 Jun 2003 11:31:41 -0000	1.47
--- RxRichEditX.cpp	5 Jul 2003 01:16:46 -0000	1.48
***************
*** 280,284 ****
  
  
! bool TRxRichEditX::fillWithVerses(SWModule *module, ListKey *verses, bool heading, bool verseNum, const char *type, bool stripNewlines) {
  	SWBuf fontname;
  	TMemoryStream *RTFStream = new TMemoryStream();
--- 280,284 ----
  
  
! bool TRxRichEditX::fillWithVerses(SWModule *module, ListKey *verses, const char *introText, bool heading, bool verseNum, const char *type, bool stripNewlines) {
  	SWBuf fontname;
  	TMemoryStream *RTFStream = new TMemoryStream();
***************
*** 312,315 ****
--- 312,322 ----
  	module->setKey(verses);
  
+ 
+ 	if (introText) {
+ 		newtext += RTFHeadingPre;
+ 		newtext += introText;
+ 		newtext += RTFHeadingPost;
+ 		newtext += "{\\par ________ \\par\\par}";
+ 	}
  	SWKey *lastKey = 0;
  	bool first = true;

Index: RxRichEditX.h
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/RxRichEditX.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** RxRichEditX.h	22 Jun 2003 23:50:23 -0000	1.17
--- RxRichEditX.h	5 Jul 2003 01:16:46 -0000	1.18
***************
*** 105,109 ****
  	TRxRichEditX(TWinControl *parent);
  	int paintTo(HDC, TRect *size, int margin = 4);
! 	bool fillWithVerses(SWModule *module, ListKey *verses, bool heading = true, bool verseNum = true, const char* type = "Default", bool stripNewlines = true);
  	void fillWithRTFString(SWModule *module, const char *text, const char *type = "Default");
  	void getDisplayPrefs(DISP_ATTRIBS *attribs, SWModule *module);
--- 105,109 ----
  	TRxRichEditX(TWinControl *parent);
  	int paintTo(HDC, TRect *size, int margin = 4);
! 	bool fillWithVerses(SWModule *module, ListKey *verses, const char *introText = 0, bool heading = true, bool verseNum = true, const char* type = "Default", bool stripNewlines = true);
  	void fillWithRTFString(SWModule *module, const char *text, const char *type = "Default");
  	void getDisplayPrefs(DISP_ATTRIBS *attribs, SWModule *module);

Index: mainfrm.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** mainfrm.cpp	27 Jun 2003 11:31:41 -0000	1.124
--- mainfrm.cpp	5 Jul 2003 01:16:46 -0000	1.125
***************
*** 1703,1710 ****
  				SWBuf body = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["body"].c_str();
  				DefaultVSKey->Verse(oldVerse);
! 				if ((type == "crossReference") || (type == "x-cross-ref")) {
! 					tmpVerseList = DefaultVSKey->ParseVerseList(body.c_str(), *DefaultVSKey);
  					if (tmpVerseList.Count())
! 						AddVerseChoices(menu, body.c_str(), rtf);
  				}
  			}                                 
--- 1703,1711 ----
  				SWBuf body = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["body"].c_str();
  				DefaultVSKey->Verse(oldVerse);
! 				if (type == "crossReference") {
! 					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);
  				}
  			}                                 
***************
*** 2409,2417 ****
  					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") || (type == "x-cross-ref")) {
! 						ListKey verses = DefaultVSKey->ParseVerseList(body.c_str(), *DefaultVSKey, true);
  						if (verses.Count()) {
! 							RTFHintForm->rtfDrawer->fillWithVerses(module, &verses, true, true, "Popup");
  							HintStr = "show rtf";
  						}
--- 2410,2420 ----
  					SWBuf type = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["type"].c_str();
  					SWBuf body = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["body"].c_str();
+ 					SWBuf refList = module->getEntryAttributes()["Footnote"][fnNum.c_str()]["refList"].c_str();
+ 					body = module->RenderText(body.c_str());
  					DefaultVSKey->Verse(oldVerse);
! 					if (type == "crossReference") {
! 						ListKey verses = DefaultVSKey->ParseVerseList(refList.c_str(), *DefaultVSKey, true);
  						if (verses.Count()) {
! 							RTFHintForm->rtfDrawer->fillWithVerses(module, &verses, body.c_str(), true, true, "Popup");
  							HintStr = "show rtf";
  						}
***************
*** 2419,2424 ****
  					}
  					else {
! 						SWBuf text = module->RenderText(body.c_str());
! 						RTFHintForm->rtfDrawer->fillWithRTFString(module, text.c_str());
  						HintStr = "show rtf";
  					}
--- 2422,2426 ----
  					}
  					else {
! 						RTFHintForm->rtfDrawer->fillWithRTFString(module, body.c_str());
  						HintStr = "show rtf";
  					}
***************
*** 2441,2445 ****
  					ListKey verses = DefaultVSKey->ParseVerseList(verseList.c_str(), *DefaultVSKey, true);
  					if (verses.Count()) {
! 						RTFHintForm->rtfDrawer->fillWithVerses(module, &verses, true, true, "Popup");
  						HintStr = "show rtf";
  					}
--- 2443,2447 ----
  					ListKey verses = DefaultVSKey->ParseVerseList(verseList.c_str(), *DefaultVSKey, true);
  					if (verses.Count()) {
! 						RTFHintForm->rtfDrawer->fillWithVerses(module, &verses, 0, true, true, "Popup");
  						HintStr = "show rtf";
  					}
***************
*** 2481,2485 ****
  					ListKey key;
  					key << WideStringToUTF8(strongsWord).c_str();
! 					bool validEntry = RTFHintForm->rtfDrawer->fillWithVerses(defMod, &key, true, false, "Popup");
  					HintStr = (validEntry) ? "show rtf" : "";
  					break;
--- 2483,2487 ----
  					ListKey key;
  					key << WideStringToUTF8(strongsWord).c_str();
! 					bool validEntry = RTFHintForm->rtfDrawer->fillWithVerses(defMod, &key, 0, true, false, "Popup");
  					HintStr = (validEntry) ? "show rtf" : "";
  					break;
***************
*** 2500,2504 ****
  				ListKey key;
  				key << WideStringToUTF8(targetWord).c_str();
! 				bool validEntry = RTFHintForm->rtfDrawer->fillWithVerses(defMod, &key, true, false, "Popup");
  				HintStr = (validEntry) ? "show rtf" : "";
  				break;
--- 2502,2506 ----
  				ListKey key;
  				key << WideStringToUTF8(targetWord).c_str();
! 				bool validEntry = RTFHintForm->rtfDrawer->fillWithVerses(defMod, &key, 0, true, false, "Popup");
  				HintStr = (validEntry) ? "show rtf" : "";
  				break;

Index: searchfrm.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/searchfrm.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** searchfrm.cpp	27 Jun 2003 11:31:41 -0000	1.43
--- searchfrm.cpp	5 Jul 2003 01:16:46 -0000	1.44
***************
*** 140,144 ****
  			verse << *key;
  			delete key;
! 			pvrtf->fillWithVerses(target, &verse, true, false, "Search");
  		}
  	}
--- 140,144 ----
  			verse << *key;
  			delete key;
! 			pvrtf->fillWithVerses(target, &verse, 0, true, false, "Search");
  		}
  	}
***************
*** 284,288 ****
  		ListKey verse;
  		verse << Item->Caption.c_str();
! 		RTFHintForm->searchListDrawer->fillWithVerses(target, &verse, false, false, "Search", true);
  		//set color back in case it got changed in fill*
  		if (resultsLV->Selected == Item) RTFHintForm->searchListDrawer->Color = TColor(0xB4CDBB);
--- 284,288 ----
  		ListKey verse;
  		verse << Item->Caption.c_str();
! 		RTFHintForm->searchListDrawer->fillWithVerses(target, &verse, 0, false, false, "Search", true);
  		//set color back in case it got changed in fill*
  		if (resultsLV->Selected == Item) RTFHintForm->searchListDrawer->Color = TColor(0xB4CDBB);

Index: sword.res
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/sword.res,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
Binary files /tmp/cvs8zBR2E and /tmp/cvs1wIrh5 differ

Index: vrslstfrm.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/vrslstfrm.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** vrslstfrm.cpp	19 Jun 2003 16:58:30 -0000	1.14
--- vrslstfrm.cpp	5 Jul 2003 01:16:46 -0000	1.15
***************
*** 53,57 ****
  		key << *tkey;
  		delete tkey;
! 		pvrtf->fillWithVerses(target, &key, true, false);
  	}
  }
--- 53,57 ----
  		key << *tkey;
  		delete tkey;
! 		pvrtf->fillWithVerses(target, &key, 0, true, false);
  	}
  }
***************
*** 129,133 ****
  	}
  	if (target) {
! 		RTFHintForm->rtfDrawer->fillWithVerses(target, &verses, true, true);
  		RTFHintForm->rtfDrawer->SelectAll();
  		RTFHintForm->rtfDrawer->CopyToClipboard();
--- 129,133 ----
  	}
  	if (target) {
! 		RTFHintForm->rtfDrawer->fillWithVerses(target, &verses, 0, true, true);
  		RTFHintForm->rtfDrawer->SelectAll();
  		RTFHintForm->rtfDrawer->CopyToClipboard();