[sword-svn] r85 - trunk/src/gui

bdrake at www.crosswire.org bdrake at www.crosswire.org
Sun Jan 6 11:26:34 MST 2008


Author: bdrake
Date: 2008-01-06 11:26:33 -0700 (Sun, 06 Jan 2008)
New Revision: 85

Modified:
   trunk/src/gui/SimpleNavigator.cpp
Log:
Code added to save the name of the last bible module used (as distinct from the last module used).  Need to have this information for cross-referencing.

Modified: trunk/src/gui/SimpleNavigator.cpp
===================================================================
--- trunk/src/gui/SimpleNavigator.cpp	2008-01-04 13:12:36 UTC (rev 84)
+++ trunk/src/gui/SimpleNavigator.cpp	2008-01-06 18:26:33 UTC (rev 85)
@@ -216,6 +216,13 @@
 	};
 	if (i!=position.lastModule()) {
 		position.setModule(i->second);
+		// added - bd 06/01/08
+		(*g_swordConf)["History"]["LastModule"] = position.getModName();
+		SWModule *mod = SwordIndex::manager->getModule((*g_swordConf)["History"]["LastModule"]);
+		if (!strcmp(mod->Type(), "Biblical Texts")) {
+			(*g_swordConf)["History"]["LastBible"] = position.getModName();
+			// end added code - bd 06/01/08
+		}
 	}
 }
 
@@ -243,24 +250,6 @@
 }
 
 
-/*
-//new code
-wchar_t *SWBuftowstr(const char *str) {
-  static wchar_t *c, *buffer = 0;
-  if (buffer)
-    delete [] buffer;
-  buffer = c = new wchar_t[ sizeof(str) + 1 ];
-  while (*str) {
-    *c++ = (WCHAR)*str++;
-	//*c++ = (WCHAR)*str++;
-	MessageBox(0, str, L"converting", MB_OK);
-  }
-  *c = 0;
-  return buffer;
-}
-//end new code
-*/
-
 void SimpleNavigator::urlClicked(const WCHAR *target) {
 	const char * t = wstrtostr(target);
 	// MessageBox(0, strtowstr(t), L"This is 't'", MB_OK);
@@ -282,7 +271,7 @@
 		mod->RenderText(); 
 		SWBuf body = mod->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
 		const char *Body = mod->RenderText(body.c_str()); // RenderText not StripText used
-		// not sure if MessageBox can display html - if it can, re-think this some day
+		// MessageBox can't display html - need to strip out tagged stuff; but Greek works OK
 		MessageBox(0, (const unsigned short *)Body, L"Footnote", MB_OK); //
 		}
 	// Strongs number MessageBox




More information about the sword-cvs mailing list