r609: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 5 Mar 2001 20:29:23 +0000 (20:29 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 5 Mar 2001 20:29:23 +0000 (20:29 +0000)
src/backgroundmgr.cpp
src/backgroundmgr.h
src/backgroundsupr.cpp
src/ctsim.cpp
src/dialogs.cpp
src/threadraster.cpp
src/threadraster.h
src/tips.cpp
src/tips.h
src/views.cpp

index 3a93370bea1c274d5ffc4696cf3caaf74ae8ec0a..2d7714570bb5515d6db2f7092c49b8e09453e86c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundmgr.cpp,v 1.11 2001/03/05 19:14:40 kevin Exp $
+**  $Id: backgroundmgr.cpp,v 1.12 2001/03/05 20:29:23 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
@@ -39,9 +39,7 @@
 #include "backgroundmgr.h"
 
 
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
 
 
 IMPLEMENT_DYNAMIC_CLASS(BackgroundManager, wxMiniFrame)
@@ -249,3 +247,5 @@ BackgroundManagerCanvas::OnPaint (wxPaintEvent& event)
 //  dc.DrawLine (30,0, 0, 30);
 }
 #endif
+
+#endif // HAVE_WXTHREADS
index b6e668a8c1cf74277f0c81ecaaa908d64e9399a5..a900f72941b1476b3582115f873e4718de68dcf6 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundmgr.h,v 1.7 2001/02/25 10:52:55 kevin Exp $
+**  $Id: backgroundmgr.h,v 1.8 2001/03/05 20:29:23 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
@@ -44,9 +44,7 @@
 
 #include <vector>
 
-#if defined(HAVE_CONFIG_H)
-#include "config.h"
-#endif
+#ifdef HAVE_WXTHREADS
 
 class BackgroundManagerCanvas;
 
@@ -117,6 +115,7 @@ public:
   DECLARE_EVENT_TABLE()
 };
 
+#endif // HAVE_WXTHREADS
 
 #endif // _BACKGROUNDMGR_H
 
index 7ec34080bed745d297c99197554e8a16497c4ad1..74b417a3ab6b01dede5ad9af8a9bf982becd6957 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundsupr.cpp,v 1.14 2001/03/05 19:14:40 kevin Exp $
+**  $Id: backgroundsupr.cpp,v 1.15 2001/03/05 20:29:23 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
@@ -40,7 +40,7 @@
 
 #ifdef HAVE_WXTHREADS
 
-#define USE_BKGMGR 1
+// #define USE_BKGMGR 1
 
 ////////////////////////////////////////////////////////////////////////////
 //
index 7beb6e3a397ddfcc3405fbcfd6ca833290e7d6ff..120be5b495c6a79db3e1237db12527a759bae4d6 100644 (file)
@@ -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.96 2001/03/05 20:29:23 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
@@ -69,7 +69,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.96 2001/03/05 20:29:23 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -229,7 +229,10 @@ CTSimApp::OnInit()
   if (getStartupTips())
     ShowTips();
   
+#ifdef HAVE_WXTHREADS
   m_pBackgroundMgr = new BackgroundManager;
+#endif
+
   return true;
 }
 
index 8ecf945f4e3a8359034255906b55a93afd788904..860841ae1adcbe9d6931ddb9955ed7dd1b3195ad 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: dialogs.cpp,v 1.46 2001/03/02 21:11:50 kevin Exp $
+**  $Id: dialogs.cpp,v 1.47 2001/03/05 20:29:23 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
@@ -242,9 +242,9 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi
   m_pCBStartupTips->SetValue (bStartupTips);
   pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL);
 
+#ifdef HAVE_WXTHREADS
   m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
   m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
-#ifdef HAVE_WXTHREADS
   pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
 #endif
 
@@ -298,7 +298,11 @@ DialogPreferences::getStartupTips ()
 bool
 DialogPreferences::getUseBackgroundTasks ()
 {
+#ifdef HAVE_WXTHREADS
   return static_cast<bool>(m_pCBUseBackgroundTasks->GetValue());
+#else
+  return false;
+#endif
 }
 
 
index 736bf90b71d1606ec044281b08fcef3c6873ce45..8a93facb5538ad2025e09cba70ac39a76562b878 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadraster.cpp,v 1.10 2001/03/05 19:14:40 kevin Exp $
+**  $Id: threadraster.cpp,v 1.11 2001/03/05 20:29:23 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
@@ -86,7 +86,7 @@ RasterizerSupervisorThread::Entry()
   if (! rasterSupervisor.cancelled())
     rasterSupervisor.onDone();
   rasterSupervisor.deleteWorkers();
-  
+
   return reinterpret_cast<wxThread::ExitCode>(0);
 }
 
index 222091c6b5f14a8fd184902646ef695646949bb9..6ed173b49f1266345d2a1bd47fb68357f0d88fa5 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadraster.h,v 1.3 2001/03/04 03:14:47 kevin Exp $
+**  $Id: threadraster.h,v 1.4 2001/03/05 20:29:23 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
@@ -56,7 +56,6 @@ public:
   RasterizerSupervisorThread(PhantomFileView* pProjView, int iNX, int iNY, int iNSample, double dViewRatio, const char* const pszLabel);
 
   virtual wxThread::ExitCode Entry();
-
   virtual void OnExit();
 };
 
index dc425d6602731ae7a5e79cc806869b749b028df3..05c2a9e3057cc2693adb389f5facf5b92f0b389f 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: tips.cpp,v 1.2 2001/02/22 11:05:38 kevin Exp $
+**  $Id: tips.cpp,v 1.3 2001/03/05 20:29:23 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
@@ -62,7 +62,7 @@ const char* const CTSimTipProvider::s_aszTips[] = {
   {"You can control CTSim's operation using the \"File - Preferences\" menu command."},
 };
 
-const int CTSimTipProvider::s_iNumTips = sizeof(s_aszTips) / sizeof(const char *);
+const size_t CTSimTipProvider::s_iNumTips = sizeof(s_aszTips) / sizeof(const char *);
 
 
 CTSimTipProvider::CTSimTipProvider (size_t iCurrentTip)
index 39d264d502c1d1f1c469ce51ac3fbbc08446cfa4..de50ee622da775521bcc211bcb87798f0c0fe1e9 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: tips.h,v 1.1 2001/02/22 00:56:50 kevin Exp $
+**  $Id: tips.h,v 1.2 2001/03/05 20:29:23 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
@@ -33,7 +33,7 @@ class CTSimTipProvider : public wxTipProvider
 {
 private:
   static const char* const s_aszTips[];
-  static const int s_iNumTips;
+  static const size_t s_iNumTips;
 
   size_t m_iCurrentTip;
 
index 13774796c6d2206876a141250ae99c566dbb8ac6..7bbf71a5937da8cdfeaf49dc7623a2bc2eae83e2 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.126 2001/03/04 22:30:20 kevin Exp $
+**  $Id: views.cpp,v 1.127 2001/03/05 20:29:23 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
@@ -1949,7 +1949,7 @@ PhantomFileView::OnProjections (wxCommandEvent& event)
     }
   } else {
 #if HAVE_WXTHREADS
-    if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+    if (theApp->getUseBackgroundTasks()) {
       ProjectorSupervisorThread* pProjector = new ProjectorSupervisorThread (this, m_iDefaultNDet,
         m_iDefaultNView, sGeometry.c_str(), m_iDefaultNSample, dRotationRadians,
         m_dDefaultFocalLength, m_dDefaultCenterDetectorLength, m_dDefaultViewRatio, m_dDefaultScanRatio, os.str().c_str());
@@ -2032,7 +2032,7 @@ PhantomFileView::OnRasterize (wxCommandEvent& event)
     << m_iDefaultRasterNSamples;;
 
 #if HAVE_WXTHREADS
-  if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+  if (theApp->getUseBackgroundTasks()) {
     RasterizerSupervisorThread* pThread = new RasterizerSupervisorThread (this, m_iDefaultRasterNX, m_iDefaultRasterNY,
       m_iDefaultRasterNSamples, m_dDefaultRasterViewRatio, os.str().c_str());
     if (pThread->Create() != wxTHREAD_NO_ERROR) {
@@ -2472,7 +2472,7 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event)
     delete pReconstructor;
   } else {
 #if HAVE_WXTHREADS
-    if (theApp->getUseBackgroundTasks() || theApp->getNumberCPU() > 1) {
+    if (theApp->getUseBackgroundTasks()) {
       ReconstructorSupervisorThread* pReconstructor = new ReconstructorSupervisorThread (this, 
         m_iDefaultNX, m_iDefaultNY, optFilterName.c_str(), 
         m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),