[sword-svn] r405 - in trunk/apps/InstallMgr: . installMgr

scribe at crosswire.org scribe at crosswire.org
Wed Jan 12 03:21:27 MST 2005


Author: scribe
Date: 2005-01-12 03:21:27 -0700 (Wed, 12 Jan 2005)
New Revision: 405

Modified:
   trunk/apps/InstallMgr/MainFrm.cpp
   trunk/apps/InstallMgr/MainFrm.h
   trunk/apps/InstallMgr/installMgr/installmgr.conf
Log:
Added support for DefaultMod sets to InstallManager

Modified: trunk/apps/InstallMgr/MainFrm.cpp
===================================================================
--- trunk/apps/InstallMgr/MainFrm.cpp	2005-01-10 08:51:43 UTC (rev 404)
+++ trunk/apps/InstallMgr/MainFrm.cpp	2005-01-12 10:21:27 UTC (rev 405)
@@ -82,6 +82,8 @@
 		: TForm(Owner) {
 	try {
 	    manager = new SWMgr();
+	    installCnt = 0;
+	    defSelected = false;
 	}
 	catch (...) {
 		 FileMgr::createPathAndFile("./mods.d/globals.conf");           
@@ -190,6 +192,7 @@
 
 	installMgr->installConf->Save();
 	fillSourceTree(localTree);
+	if (defSelected) MessageBox(this->Handle, "Since no books are yet installed, a basic set has been selected as a suggested starting point.  Please review and tailor to your liking.", "Default Module Set Selected", MB_OK);
 }
 //---------------------------------------------------------------------------
 
@@ -203,6 +206,7 @@
 	if (!manager->configPath)
 		return;
 
+	installCnt = 0;
 	for (mods = manager->Modules.begin(); mods != manager->Modules.end(); mods++) {
 		for (node = installTree->Items->GetFirstNode(); node; node = node->getNextSibling()) {
 			if (!strcmp(node->Text.c_str(), mods->second->Type())) {
@@ -219,6 +223,7 @@
 		nodeName += "] ";
 		nodeName += mods->second->Description();
 		node = installTree->Items->AddChildObject(node, nodeName.c_str(), mods->second->Name());
+		installCnt++;
 	}
 	for (node = installTree->Items->GetFirstNode(); node; node = node->getNextSibling())
 		node->Expand(true);
@@ -341,7 +346,11 @@
 				node->ImageIndex = 5;
 				node->SelectedIndex = 5;
 			}
-			node->StateIndex = 0;
+			if (!installCnt) {
+				node->StateIndex = installMgr->isDefaultModule(sections->first.c_str());
+				if (!defSelected) defSelected = node->StateIndex;
+			}
+			else	node->StateIndex = 0;
 		}
 	}
 	for (node = tree->Items->GetFirstNode(); node; node = node->getNextSibling())
@@ -530,6 +539,7 @@
 	InstallSourceTab *ist = (InstallSourceTab *) MainForm->PageControl1->ActivePage->Controls[0];
 	installMgr->refreshRemoteSource(ist->is);
 	fillSourceTree(ist->tree, ist->is);	
+	if (defSelected) MessageBox(this->Handle, "Since no books are yet installed, a basic set has been selected as a suggested starting point.  Please review and tailor to your liking.", "Default Module Set Selected", MB_OK);
 }
 
 
@@ -667,7 +677,9 @@
 			Application->Terminate();
 		}
 	}
+	if (defSelected) MessageBox(this->Handle, "Since no books are yet installed, a basic set has been selected as a suggested starting point.  Please review and tailor to your liking.", "Default Module Set Selected", MB_OK);
 	
+	
 }
 //---------------------------------------------------------------------------
 

Modified: trunk/apps/InstallMgr/MainFrm.h
===================================================================
--- trunk/apps/InstallMgr/MainFrm.h	2005-01-10 08:51:43 UTC (rev 404)
+++ trunk/apps/InstallMgr/MainFrm.h	2005-01-12 10:21:27 UTC (rev 405)
@@ -116,6 +116,8 @@
 private:	// User declarations
 
 	SWMgr *manager;
+	int installCnt;
+	bool defSelected;
 	const char *getLocalDir();
 	void setLocalDir(const char *idir);
 	void refreshPageControl();

Modified: trunk/apps/InstallMgr/installMgr/installmgr.conf
===================================================================
--- trunk/apps/InstallMgr/installMgr/installmgr.conf	2005-01-10 08:51:43 UTC (rev 404)
+++ trunk/apps/InstallMgr/installMgr/installmgr.conf	2005-01-12 10:21:27 UTC (rev 405)
@@ -1,10 +1,15 @@
 
 [General]
+DefaultMod=KJV
+DefaultMod=StrongsGreek
+DefaultMod=StrongsHebrew
+DefaultMod=Robinson
+DefaultMod=Personal
 PassiveFTP=true
 
 [Sources]
 FTPSource=crosswire|ftp.crosswire.org|/pub/sword/raw/
 FTPSource=host|192.168.32.123|/pub/sword
 FTPSource=CrossWire Beta|sword.cx|/pub/sword/betaraw/
-LocalPath=
+LocalPath=D:\
 



More information about the sword-cvs mailing list