X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fctsim.cpp;h=953ab6f3fbbc67a7ec5684b50c789435be7fe478;hb=72615e14dd531463cea3278ff6dc19ffbbe0b06c;hp=17ebe7055a03e821147ad40e5df63cc1e9a8824b;hpb=5e2332e2d4cacd81f208f3d2f9dc6a1eff4f849e;p=ctsim.git diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 17ebe70..953ab6f 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.69 2001/02/09 21:24:27 kevin Exp $ +** $Id: ctsim.cpp,v 1.72 2001/02/09 22:09:38 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -70,7 +70,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.69 2001/02/09 21:24:27 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.72 2001/02/09 22:09:38 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -181,12 +181,16 @@ CTSimApp::OnInit() m_pLog = new wxTextCtrl (m_pFrame, -1, "Log Window\n", wxPoint(0, 0), wxSize(0,0), wxTE_MULTILINE | wxTE_READONLY); #endif wxLog::SetActiveTarget (new wxLogTextCtrl(m_pLog)); - + #ifdef CTSIM_WINHELP if (! m_pFrame->getWinHelpController().Initialize("ctsim")) *m_pLog << "Cannot initialize the Windows Help system" << "\n"; #endif - if (! m_pFrame->getHtmlHelpController().Initialize(::wxGetCwd() + "/ctsim")) + wxString helpDir; + if (! m_pConfig->Read("HelpDir", &helpDir)) + helpDir = ::wxGetCwd(); + if (! m_pFrame->getHtmlHelpController().Initialize(helpDir + "/ctsim") && + ! m_pFrame->getHtmlHelpController().Initialize("/usr/local/man/ctsim")) *m_pLog << "Cannot initialize the HTML Help system" << "\n"; for (int i = optind + 1; i <= argc; i++) { @@ -221,6 +225,8 @@ CTSimApp::usage(const char* program) int CTSimApp::OnExit() { + delete m_pConfig; + #ifdef HAVE_DMALLOC dmalloc_shutdown(); #endif