[sword-svn] r86 - trunk/src/gui
bdrake at www.crosswire.org
bdrake at www.crosswire.org
Mon Jan 7 03:15:03 MST 2008
Author: bdrake
Date: 2008-01-07 03:15:02 -0700 (Mon, 07 Jan 2008)
New Revision: 86
Modified:
trunk/src/gui/SimpleNavigator.cpp
Log:
Added - X-Refs now use last bible opened as the X-Ref version. Also added save of last commentary opened. May never use this, but it's there!
Modified: trunk/src/gui/SimpleNavigator.cpp
===================================================================
--- trunk/src/gui/SimpleNavigator.cpp 2008-01-06 18:26:33 UTC (rev 85)
+++ trunk/src/gui/SimpleNavigator.cpp 2008-01-07 10:15:02 UTC (rev 86)
@@ -220,9 +220,12 @@
(*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
+ (*g_swordConf)["History"]["LastBible"] = position.getModName();
}
+ else if (!strcmp(mod->Type(), "Commentaries")) {
+ (*g_swordConf)["History"]["LastComment"] = position.getModName();
+ }
+ // end added code - bd 06/01/08
}
}
@@ -326,15 +329,11 @@
URL footnote(t); // t is char* to URL string
SWBuf module = footnote.getParameterValue("module"); // very unlikely to have this
SWBuf key = footnote.getParameterValue("value");
- // TODO the next piece of code need to check if there is a module referenced (unlikely!)
- // and if not, pick a valid module ... user ought to be able to choose
- // the module for cross referencing
- //if (!strstr(module.c_str(), ""))
- // SWModule *mod = SwordIndex::manager->getModule(module);
- //else mod = SwordIndex::manager->getModule("KJV");
- SWModule *mod = SwordIndex::manager->getModule("KJV");
+ // get the last bible module used and get xRefs from this version
+ SWModule *mod = SwordIndex::manager->getModule((*g_swordConf)["History"]["LastBible"]);
+ // will fail if user has never looked at a bible - possible??? so check ....
if (!mod) {
- MessageBox(0, strtowstr("No KJV bible found"),
+ MessageBox(0, strtowstr("xRef bible not found"),
L"Cross referencing", MB_ICONWARNING);
return;
}
More information about the sword-cvs
mailing list