X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fctsim.cpp;h=95ca5e7c4c8ab2f78952dc8b27c77b1c3cdd945a;hb=cdf102a192b78dd5a7708d449661ff247309be7e;hp=7362e2366e9afd47ca3741c8b42c63ed617c35d6;hpb=792cae55ba2e9ef41e963cfe58f1504f996bb57c;p=ctsim.git diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 7362e23..95ca5e7 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.68 2001/02/08 22:38:23 kevin Exp $ +** $Id: ctsim.cpp,v 1.71 2001/02/09 21:42:03 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.68 2001/02/08 22:38:23 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.71 2001/02/09 21:42:03 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -102,7 +102,7 @@ CTSimApp::OnInit() setpriority (PRIO_PROCESS, 0, 15); // set to low scheduling priority #endif - m_pConfig = new wxConfig("ctsim"); + m_pConfig = new wxConfig("ctsim", _T(""), ".ctsim", "", wxCONFIG_USE_LOCAL_FILE); wxConfigBase::Set(m_pConfig); g_bRunningWXWindows = true; @@ -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