X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fctsim.cpp;h=9248247d03640f0fdb77c4179d28beda2c97ffaa;hp=7beb6e3a397ddfcc3405fbcfd6ca833290e7d6ff;hb=5a6caa64e880f613b82e516031028d02fd127257;hpb=793b8154fdc069e43a939852657e89847d01ee77 diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 7beb6e3..9248247 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.95 2001/03/05 15:16:25 kevin Exp $ +** $Id: ctsim.cpp,v 1.101 2001/03/30 19:17:32 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 @@ -48,6 +48,7 @@ #include "ct.h" +#include "ctndicom.h" #include "ctsim.h" #include "docs.h" #include "views.h" @@ -69,7 +70,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.95 2001/03/05 15:16:25 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.101 2001/03/30 19:17:32 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -229,7 +230,10 @@ CTSimApp::OnInit() if (getStartupTips()) ShowTips(); +#ifdef HAVE_WXTHREADS m_pBackgroundMgr = new BackgroundManager; +#endif + return true; } @@ -289,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 @@ -300,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; } @@ -453,7 +469,7 @@ MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const m_dDefaultFilterBandwidth = 1.; m_dDefaultFilterInputScale = 1.; m_dDefaultFilterOutputScale = 1.; - m_iDefaultImportFormat = ImageFile::IMPORT_FORMAT_PPM; + m_iDefaultImportFormat = ImageFile::IMPORT_FORMAT_PNG; wxAcceleratorEntry accelEntries[15]; accelEntries[0].Set (wxACCEL_CTRL, static_cast('O'), wxID_OPEN); @@ -1018,9 +1034,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); @@ -1039,6 +1065,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"; } }