[sword-cvs] sword/apps/windoze/CBuilder5/BibleCS mainfrm.cpp,1.119,1.120

sword@www.crosswire.org sword@www.crosswire.org
Sat, 14 Jun 2003 17:27:21 -0700


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

Modified Files:
	mainfrm.cpp 
Log Message:
Fixed Back Button for parallel display
SaveLayout now saves and restores the last versions shown in the parallel display

Index: mainfrm.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** mainfrm.cpp	14 Jun 2003 23:13:57 -0000	1.119
--- mainfrm.cpp	15 Jun 2003 00:27:18 -0000	1.120
***************
*** 236,240 ****
  	parallelDisp = new ParallelDisp(this);
  	char buf[1024];
! 	SectionMap::iterator sit;
  
  	newtab->Caption = "PARALLEL";
--- 236,240 ----
  	parallelDisp = new ParallelDisp(this);
  	char buf[1024];
! 	//SectionMap::iterator sit;
  
  	newtab->Caption = "PARALLEL";
***************
*** 254,257 ****
--- 254,261 ----
  	parallelDisp->recalcAppearance();
  
+ 	parallelDisp->mod[0] = layoutconf->Sections["History"]["LastParaMod01"];
+ 	parallelDisp->mod[1] = layoutconf->Sections["History"]["LastParaMod02"];
+ 	parallelDisp->mod[2] = layoutconf->Sections["History"]["LastParaMod03"];
+ 
  	return 0;
  }
***************
*** 437,441 ****
                          pc->Hint = "PARALLEL";
  			if (logmodstate)
! 				modstates.insert(modstates.begin(), new ModState(pc, pc->ActivePage, *DefaultStrKey));
  			if (pc == LexDictPageControl)
  				FillDictKeys();
--- 441,445 ----
                          pc->Hint = "PARALLEL";
  			if (logmodstate)
! 				modstates.insert(modstates.begin(), new ModState(pc, pc->ActivePage, *DefaultVSKey));
  			if (pc == LexDictPageControl)
  				FillDictKeys();
***************
*** 1010,1013 ****
--- 1014,1018 ----
  	}
  */
+ 	layoutconf = new SWConfig("./layout.conf");
  
  	logmodstate = true;
***************
*** 1143,1148 ****
  	}
  
- 	layoutconf = new SWConfig("./layout.conf");
- 
  	if ((sit = layoutconf->Sections.find("Screen")) != layoutconf->Sections.end()) {
  
--- 1148,1151 ----
***************
*** 1382,1386 ****
  }
  //---------------------------------------------------------------------------
! 
  void TForm1::RestoreState(ModState *state)
  {
--- 1385,1392 ----
  }
  //---------------------------------------------------------------------------
! /* TODO -cParallel Disp : Troy could you make sure that I did this correctly?
! 					I am not sure what they key was for in the original
!                          if statement so I left it out of the PARALLEL statement
!                          and it works, I think ;-) */
  void TForm1::RestoreState(ModState *state)
  {
***************
*** 1398,1402 ****
  					*DefaultVSKey = state->key;
  					TextKeyChanged();
! 				}
  			}
  		}
--- 1404,1411 ----
  					*DefaultVSKey = state->key;
  					TextKeyChanged();
! 				}else if(state->pc->ActivePage->Caption == "PARALLEL") {
! 					*DefaultVSKey = state->key;
! 					TextKeyChanged();
!                     }
  			}
  		}
***************
*** 2005,2008 ****
--- 2014,2020 ----
  	section["LastComModule"] = CommentaryPageControl->ActivePage->Caption.c_str();
  	section["LastLDModule"] = LexDictPageControl->ActivePage->Caption.c_str();
+ 	section["LastParaMod01"] = parallelDisp->mod[0].c_str();
+ 	section["LastParaMod02"] = parallelDisp->mod[1].c_str();
+ 	section["LastParaMod03"] = parallelDisp->mod[2].c_str();
  
  	layoutconf->Sections["History"] = section;