X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fctsim.cpp;h=495c4dabab6e26c377cba15323efeaf011bd810e;hb=7c456cf1278a3dfd6149094292dffea81e795cc6;hp=d42bab2ac9bb2a315a574ed3ca5e9e58abe69a94;hpb=4cdd078f0f198a00e8037e6edec0eb30a6861bae;p=ctsim.git diff --git a/src/ctsim.cpp b/src/ctsim.cpp index d42bab2..495c4da 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.98 2001/03/07 16:34:47 kevin Exp $ +** $Id: ctsim.cpp,v 1.103 2001/09/24 11:20:08 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.98 2001/03/07 16:34:47 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.103 2001/09/24 11:20:08 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -160,7 +160,7 @@ CTSimApp::OnInit() int xDisplay, yDisplay; ::wxDisplaySize (&xDisplay, &yDisplay); m_pFrame = new MainFrame(m_docManager, (wxFrame *) NULL, -1, "CTSim", wxPoint(0, 0), - wxSize(nearest(xDisplay * .75), nearest(yDisplay * .755)), wxDEFAULT_FRAME_STYLE); + wxSize(nearest(xDisplay * .25), nearest(yDisplay * .255)), wxDEFAULT_FRAME_STYLE); setIconForFrame (m_pFrame); m_pFrame->Centre(wxBOTH); @@ -293,6 +293,12 @@ CTSimApp::openConfig() m_pConfig->Read ("StartupTips", &m_bShowStartupTips); m_pConfig->Read ("CurrentTip", &m_iCurrentTip); m_pConfig->Read ("UseBackgroundTasks", &m_bUseBackgroundTasks); +#ifdef HAVE_FFTW + wxString strFftwWisdom; + m_pConfig->Read ("FftwWisdom", strFftwWisdom); + if (strFftwWisdom.size() > 0) + fftw_import_wisdom_from_string (strFftwWisdom.c_str()); +#endif } void @@ -304,7 +310,13 @@ CTSimApp::closeConfig() m_pConfig->Write ("StartupTips", m_bShowStartupTips); m_pConfig->Write ("CurrentTip", m_iCurrentTip); m_pConfig->Write ("UseBackgroundTasks", m_bUseBackgroundTasks); - +#ifdef HAVE_FFTW + const char* const pszWisdom = fftw_export_wisdom_to_string(); + wxString strFftwWisdom (pszWisdom); + fftw_free ((void*) pszWisdom); + m_pConfig->Write ("FftwWisdom", strFftwWisdom); +#endif + delete m_pConfig; } @@ -728,15 +740,6 @@ MainFrame::OnUpdateUI (wxUpdateUIEvent& rEvent) #endif } -#ifdef CTSIM_CUSTOM_MRU -void -MainFrame::OnMRUFile (wxCommandEvent& event) -{ - wxString fileName (theApp->getDocManager()->GetHistoryFile(event.GetId() - wxID_FILE1)); - if (fileName != "") - theApp->getDocManager()->CreateDocument(fileName, wxDOC_SILENT); -} -#endif void MainFrame::DoWindowMenu (int iMenuPosition, wxCommandEvent& event) @@ -1022,9 +1025,19 @@ MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) { long lFreeMem = ::wxGetFreeMemory() / (1024L * 1024L); wxString strOSDesc = ::wxGetOsDescription(); - *theApp->getLog() << "Operation System: " << strOSDesc; + *theApp->getLog() << "Operating System: " << strOSDesc; if (lFreeMem > 0) *theApp->getLog() << ", Free Memory: " << lFreeMem << " MB"; + *theApp->getLog() << ", wxWindows: " << wxVERSION_STRING; +#ifdef __TIMESTAMP__ + *theApp->getLog() << ", Build Date: " << __TIMESTAMP__; +#endif +#if defined(DEBUG) + *theApp->getLog() << ", CTSim Debug version"; +#else + *theApp->getLog() << ", CTSim Release version"; +#endif + *theApp->getLog() << "\n"; wxBitmap bmp (splash); @@ -1043,6 +1056,7 @@ MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) msg += "Author: Kevin Rosenberg \nUsage: ctsim [files-to-open..] [--help]"; wxMessageBox(msg, "About CTSim", wxOK | wxICON_INFORMATION, this); + *theApp->getLog() << msg << "\n"; } }