r7061: initial property settings
[ctsim.git] / src / dialogs.cpp
index 75596d4c939291e94394a78d6f1bd59a59f796b9..df9354dee2bfe0fed68a96a93f8b41dba1b21083 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: dialogs.cpp,v 1.55 2001/09/24 09:40:42 kevin Exp $
+**  $Id$
 **
 **  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
 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ******************************************************************************/
 
-#ifdef __GNUG__
-// #pragma implementation
-#endif
-
 #include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
@@ -301,7 +297,7 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi
   m_pCBStartupTips->SetValue (bStartupTips);
   pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL);
 
-#ifdef HAVE_WXTHREADS
+#if HAVE_WXTHREADS && MSVC
   m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
   m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
   pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
@@ -357,7 +353,7 @@ DialogPreferences::getStartupTips ()
 bool
 DialogPreferences::getUseBackgroundTasks ()
 {
-#ifdef HAVE_WXTHREADS
+#if HAVE_WXTHREADS && MSVC
   return static_cast<bool>(m_pCBUseBackgroundTasks->GetValue());
 #else
   return false;
@@ -782,12 +778,16 @@ DialogGetProjectionParameters::getNView ()
 unsigned int
 DialogGetProjectionParameters::getOffsetView ()
 {
-       wxString strCtrl = m_pTextCtrlOffsetView->GetValue();
-       unsigned long lValue;
-       if (strCtrl.ToULong (&lValue))
-         return lValue;
-       else
-         return (m_iDefaultOffsetView);
+  if (theApp->getAdvancedOptions()) {
+         wxString strCtrl = m_pTextCtrlOffsetView->GetValue();
+         unsigned long lValue;
+         if (strCtrl.ToULong (&lValue))
+           return lValue;
+         else
+           return (m_iDefaultOffsetView);
+  }
+  else
+    return 0;
 }
 
 unsigned int