]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/configtoolview.cpp
Old API depreciated. Use of new API. Source cleaning.
[wxWidgets.git] / utils / configtool / src / configtoolview.cpp
index 138fc3eac5c7fd8287ff58fec4e5efa70ed7b530..6cd42bc8faded61c77c8956f031b553554919e66 100644 (file)
@@ -9,19 +9,18 @@
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "configtoolview.h"
 #endif
 
-// Includes other headers for precompiled compilation
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-    #pragma hdrstop
+#pragma hdrstop
 #endif
 
 #include "wx/wfstream.h"
-
 #include "configtoolview.h"
 #include "configtooldoc.h"
 #include "configtree.h"
@@ -81,7 +80,7 @@ BEGIN_EVENT_TABLE(ctConfigToolView, wxView)
     EVT_UPDATE_UI(ctID_EDIT_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateEditCustomProperty)
     EVT_UPDATE_UI(ctID_DELETE_CUSTOM_PROPERTY, ctConfigToolView::OnUpdateDeleteCustomProperty)
 
-    EVT_NOTEBOOK_PAGE_CHANGED(-1, ctConfigToolView::OnTabSelect)
+    EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, ctConfigToolView::OnTabSelect)
 
     EVT_MENU(ctID_SAVE_SETUP_FILE, ctConfigToolView::OnSaveSetupFile)
     EVT_MENU(ctID_SAVE_CONFIGURE_COMMAND, ctConfigToolView::OnSaveConfigureCommand)
@@ -96,23 +95,19 @@ BEGIN_EVENT_TABLE(ctConfigToolView, wxView)
 
 END_EVENT_TABLE()
 
-ctConfigToolView::ctConfigToolView()
-{
-}
-
 // What to do when a view is created. Creates actual
 // windows for displaying the view.
 bool ctConfigToolView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
 {
-    wxGetApp().GetDocManager()->ActivateView(this, TRUE);
+    wxGetApp().GetDocManager()->ActivateView(this, true);
     wxGetApp().GetMainFrame()->SetDocument((ctConfigToolDoc*) doc);
     wxGetApp().GetMainFrame()->GetSetupPage()->SetDocument((ctConfigToolDoc*) doc) ;
     wxGetApp().GetMainFrame()->GetConfigurePage()->SetDocument((ctConfigToolDoc*) doc) ;
 
-    return TRUE;
+    return true;
 }
 
-void ctConfigToolView::OnDraw(wxDC *dc)
+void ctConfigToolView::OnDraw(wxDC *WXUNUSED(dc))
 {
 }
 
@@ -122,11 +117,11 @@ void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj)
     ctConfigTreeCtrl* treeCtrl = wxGetApp().GetMainFrame()->GetConfigTreeCtrl();
     if (!treeCtrl)
         return;
-    
+
     wxASSERT (doc != NULL);
-    
+
     ctConfigItem* selItem = NULL;
-    
+
     wxTreeItemId sel = treeCtrl->GetSelection();
     if (sel.IsOk())
     {
@@ -134,12 +129,12 @@ void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj)
         if (data)
             selItem = data->GetConfigItem() ;
     }
-    
+
     ctConfigToolHint* hint = (ctConfigToolHint*) hintObj;
     int hintOp = ctNoHint;
     if (hint)
         hintOp = hint->m_op;
-    
+
     switch (hintOp)
     {
     case ctInitialUpdate:
@@ -152,12 +147,12 @@ void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj)
             }
         }
         break;
-    case ctSelChanged:        
+    case ctSelChanged:
         {
             if (selItem)
             {
                 wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(selItem);
-            }            
+            }
         }
         break;
     case ctAllSaved:
@@ -176,37 +171,37 @@ void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj)
             treeCtrl->DeleteAllItems();
             wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(NULL);
             break;
-        }        
+        }
     case ctValueChanged:
         {
             // ctConfigItem& ti = *(ctConfigItem *)hint->m_item;
             wxGetApp().GetMainFrame()->GetPropertyEditor()->ShowItem(selItem);
-        }                      
+        }
         break;
-        
+
     default:
         break;
     }
 }
 
 // Clean up windows used for displaying the view.
-bool ctConfigToolView::OnClose(bool deleteWindow)
+bool ctConfigToolView::OnClose(bool WXUNUSED(deleteWindow))
 {
     if (!GetDocument()->Close())
-        return FALSE;
+        return false;
 
     ctConfigToolHint hint(NULL, ctClear);
     GetDocument()->UpdateAllViews (NULL, & hint);
 
-    wxGetApp().GetDocManager()->ActivateView(this, FALSE);
+    wxGetApp().GetDocManager()->ActivateView(this, false);
+
+    Activate(false);
 
-    Activate(FALSE);
-    
     wxGetApp().GetMainFrame()->SetDocument(NULL);
     wxGetApp().GetMainFrame()->GetSetupPage()->SetDocument(NULL) ;
     wxGetApp().GetMainFrame()->GetConfigurePage()->SetDocument(NULL) ;
 
-    return TRUE;
+    return true;
 }
 
 void ctConfigToolView::OnChangeFilename()
@@ -235,12 +230,12 @@ void ctConfigToolView::OnChangeFilename()
 // General disabler
 void ctConfigToolView::OnUpdateDisable(wxUpdateUIEvent& event)
 {
-    event.Enable( FALSE );
+    event.Enable( false );
 }
 
 void ctConfigToolView::OnUpdateAddItem(wxUpdateUIEvent& event)
 {
-    event.Enable( TRUE );
+    event.Enable( true );
 }
 
 /// Add item and its children to the tree
@@ -349,7 +344,7 @@ void ctConfigToolView::OnIconLeftDown(ctConfigTreeCtrl* treeControl, ctConfigIte
 
         item->Enable(!item->IsEnabled());
 
-        GetDocument()->Modify(TRUE);
+        GetDocument()->Modify(true);
         OnChangeFilename();
 
         SyncItem(treeControl, item);
@@ -387,37 +382,37 @@ ctConfigItem* ctConfigToolView::GetSelection()
 }
 
 /// Add a checkbox item
-void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& event)
+void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& WXUNUSED(event))
 {
     AddItem(ctTypeBoolCheck, _("New checkbox item"));
 }
 
 /// Add a radiobutton item
-void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& event)
+void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& WXUNUSED(event))
 {
     AddItem(ctTypeBoolRadio, _("New radio button item"));
 }
 
 /// Add a group item
-void ctConfigToolView::OnAddGroupItem(wxCommandEvent& event)
+void ctConfigToolView::OnAddGroupItem(wxCommandEvent& WXUNUSED(event))
 {
     AddItem(ctTypeGroup, _("New group item"));
 }
 
 /// Add a group option item
-void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& event)
+void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& WXUNUSED(event))
 {
     AddItem(ctTypeCheckGroup, _("New check group item"));
 }
 
 /// Add a group option item
-void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& event)
+void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& WXUNUSED(event))
 {
     AddItem(ctTypeRadioGroup, _("New radio group item"));
 }
 
 /// Add a string item
-void ctConfigToolView::OnAddStringItem(wxCommandEvent& event)
+void ctConfigToolView::OnAddStringItem(wxCommandEvent& WXUNUSED(event))
 {
     AddItem(ctTypeString, _("New string item"));
 }
@@ -444,7 +439,7 @@ void ctConfigToolView::AddItem(ctConfigType type, const wxString& msg)
                 parent = sel->GetParent();
                 insertBefore = sel->FindNextSibling();
             }
-            
+
             ctConfigItem* newItem = new ctConfigItem(NULL, type, name);
             newItem->InitProperties();
 
@@ -456,7 +451,7 @@ void ctConfigToolView::AddItem(ctConfigType type, const wxString& msg)
 }
 
 /// Delete an item
-void ctConfigToolView::OnDeleteItem(wxCommandEvent& event)
+void ctConfigToolView::OnDeleteItem(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigItem* sel = GetSelection();
     if (sel)
@@ -472,7 +467,7 @@ void ctConfigToolView::OnDeleteItem(wxCommandEvent& event)
 }
 
 /// Rename an item
-void ctConfigToolView::OnRenameItem(wxCommandEvent& event)
+void ctConfigToolView::OnRenameItem(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigItem* sel = GetSelection();
     if (sel)
@@ -491,7 +486,7 @@ void ctConfigToolView::OnRenameItem(wxCommandEvent& event)
 }
 
 /// Copy an item to the clipboard
-void ctConfigToolView::OnCopy(wxCommandEvent& event)
+void ctConfigToolView::OnCopy(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = GetSelection();
@@ -502,7 +497,7 @@ void ctConfigToolView::OnCopy(wxCommandEvent& event)
 }
 
 /// Copy an item to the clipboard and cut the item
-void ctConfigToolView::OnCut(wxCommandEvent& event)
+void ctConfigToolView::OnCut(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = GetSelection();
@@ -517,7 +512,7 @@ void ctConfigToolView::OnCut(wxCommandEvent& event)
 }
 
 /// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnPaste(wxCommandEvent& event)
+void ctConfigToolView::OnPaste(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = GetSelection();
@@ -565,7 +560,7 @@ void ctConfigToolView::OnUpdatePaste(wxUpdateUIEvent& event)
 }
 
 /// Copy an item to the clipboard
-void ctConfigToolView::OnContextCopy(wxCommandEvent& event)
+void ctConfigToolView::OnContextCopy(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
@@ -576,7 +571,7 @@ void ctConfigToolView::OnContextCopy(wxCommandEvent& event)
 }
 
 /// Copy an item to the clipboard and cut the item
-void ctConfigToolView::OnContextCut(wxCommandEvent& event)
+void ctConfigToolView::OnContextCut(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
@@ -591,7 +586,7 @@ void ctConfigToolView::OnContextCut(wxCommandEvent& event)
 }
 
 /// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& event)
+void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
@@ -608,7 +603,7 @@ void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& event)
 }
 
 /// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& event)
+void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
@@ -625,7 +620,7 @@ void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& event)
 }
 
 /// Paste an item from the clipboard to the tree
-void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& event)
+void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
@@ -635,7 +630,7 @@ void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& event)
         {
             ctConfigItem* parent = sel;
             ctConfigItem* insertBefore = NULL;
-            
+
             ctConfigItem* newItem = doc->GetClipboardItem()->DeepClone();
             ctConfigCommand* cmd = new ctConfigCommand(wxT("Paste Config Item"), ctCMD_PASTE,
                 NULL, newItem, parent, insertBefore);
@@ -685,7 +680,7 @@ void ctConfigToolView::OnUpdateContextPasteAsChild(wxUpdateUIEvent& event)
 }
 
 /// Item help
-void ctConfigToolView::OnItemHelp(wxCommandEvent& event)
+void ctConfigToolView::OnItemHelp(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     if ( doc && GetSelection() )
@@ -706,7 +701,7 @@ void ctConfigToolView::OnUpdateItemHelp(wxUpdateUIEvent& event)
 }
 
 /// Add a custom property
-void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event)
+void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = GetSelection();
@@ -714,7 +709,7 @@ void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event)
     if (doc && sel && editor)
     {
         ctCustomPropertyDialog dialog(wxGetApp().GetMainFrame(),
-            -1, _("Add a custom property"));
+            wxID_ANY, _("Add a custom property"));
         if (dialog.ShowModal() == wxID_OK)
         {
             wxString name = dialog.GetPropertyName();
@@ -731,14 +726,14 @@ void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event)
             }
             ctProperty* property = new ctProperty;
             if (type == wxT("bool"))
-                property->GetVariant() = wxVariant((bool) FALSE, name);
+                property->GetVariant() = wxVariant(false, name);
             else if (type == wxT("double"))
                 property->GetVariant() = wxVariant((double) 0.0, name);
             else if (type == wxT("long"))
                 property->GetVariant() = wxVariant((long) 0, name);
             else
                 property->GetVariant() = wxVariant(wxT(""), name);
-            property->SetCustom(TRUE);
+            property->SetCustom(true);
             property->SetDescription(descr);
             property->SetChoices(choices);
             property->SetEditorType(editorType);
@@ -751,7 +746,7 @@ void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event)
 }
 
 /// Edit a custom property
-void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
+void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = GetSelection();
@@ -767,9 +762,9 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
             wxString oldType = property->GetVariant().GetType();
             wxString oldEditorType = property->GetEditorType();
             wxArrayString oldChoices = property->GetChoices();
-            
+
             ctCustomPropertyDialog dialog(wxGetApp().GetMainFrame(),
-                -1, _("Edit custom property"));
+                wxID_ANY, _("Edit custom property"));
             dialog.SetPropertyName(oldName);
             dialog.SetPropertyType(oldType);
             dialog.SetPropertyDescription(oldDescription);
@@ -780,7 +775,7 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
                 wxString editorType = dialog.GetEditorType();
                 wxArrayString choices = dialog.GetChoices();
                 wxString descr = dialog.GetPropertyDescription();
-                
+
                 if (name != oldName && sel->GetProperties().FindProperty(name))
                 {
                     wxMessageBox(_("Sorry, this name already exists."), _T("Add custom property"),
@@ -790,7 +785,7 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
                 if (type != oldType)
                 {
                     if (type == wxT("bool"))
-                        property->GetVariant() = wxVariant((bool) FALSE, name);
+                        property->GetVariant() = wxVariant(false, name);
                     else if (type == wxT("double"))
                         property->GetVariant() = wxVariant((double) 0.0, name);
                     else if (type == wxT("long"))
@@ -810,11 +805,11 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
                 if (name != oldName)
                     property->GetVariant().SetName(name);
 
-                property->SetCustom(TRUE);
+                property->SetCustom(true);
 
                 if (descr != oldDescription)
                     property->SetDescription(descr);
-                
+
                 editor->ShowItem(sel);
                 OnChangeFilename();
             }
@@ -823,7 +818,7 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
 }
 
 /// Delete a custom property
-void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& event)
+void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     ctConfigItem* sel = GetSelection();
@@ -908,7 +903,7 @@ void ctConfigToolView::OnTabSelect(wxNotebookEvent& event)
     }
 }
 
-void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event)
+void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     wxString setupStr = doc->GenerateSetup();
@@ -916,14 +911,14 @@ void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event)
     wxString filename = _T("setup.h");
     wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
     if (path.IsEmpty())
-        path = doc->GetFrameworkDir(FALSE);
+        path = doc->GetFrameworkDir(false);
     wxString wildcard = _T("Header files (*.h)|*.h|All files (*.*)|*.*");
-    
+
     wxFileDialog dialog(wxTheApp->GetTopWindow(),
         _("Save Setup File As"),
         path, filename ,
         wildcard, wxSAVE|wxOVERWRITE_PROMPT);
-    
+
     if (dialog.ShowModal() == wxID_OK)
     {
         wxString fullPath = dialog.GetPath();
@@ -937,10 +932,10 @@ void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event)
         }
 
         stream << setupStr;
-    }    
+    }
 }
 
-void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& event)
+void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     wxString configureStr = doc->GenerateConfigureCommand();
@@ -948,14 +943,14 @@ void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& event)
     wxString filename = _T("configurewx.sh");
     wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
     if (path.IsEmpty())
-        path = doc->GetFrameworkDir(FALSE);
+        path = doc->GetFrameworkDir(false);
     wxString wildcard = _T("Shell script files (*.sh)|*.sh|All files (*.*)|*.*");
-    
+
     wxFileDialog dialog(wxTheApp->GetTopWindow(),
         _("Save Configure Command File As"),
         path, filename ,
         wildcard, wxSAVE|wxOVERWRITE_PROMPT);
-    
+
     if (dialog.ShowModal() == wxID_OK)
     {
         wxString fullPath = dialog.GetPath();
@@ -969,21 +964,21 @@ void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& event)
         }
 
         stream << configureStr;
-    }    
+    }
 }
 
 void ctConfigToolView::OnUpdateSaveSetupFile(wxUpdateUIEvent& event)
 {
-    event.Enable(TRUE);
+    event.Enable(true);
 }
 
 void ctConfigToolView::OnUpdateSaveConfigureCommand(wxUpdateUIEvent& event)
 {
-    event.Enable(TRUE);
+    event.Enable(true);
 }
 
 /// Find text
-void ctConfigToolView::OnFind(wxCommandEvent& event)
+void ctConfigToolView::OnFind(wxCommandEvent& WXUNUSED(event))
 {
     ctFindReplaceDialog* dialog = wxGetApp().GetMainFrame()->GetFindDialog();
     if (dialog)
@@ -1004,18 +999,18 @@ void ctConfigToolView::OnFind(wxCommandEvent& event)
         ctFindReplaceDialog::sm_findData.SetFlags(flags);
 
         dialog = new ctFindReplaceDialog(wxGetApp().GetMainFrame(), caption, style);
-        dialog->Show(TRUE);
+        dialog->Show(true);
     }
 }
 
 /// Update find text
 void ctConfigToolView::OnUpdateFind(wxUpdateUIEvent& event)
 {
-    event.Enable(TRUE);
+    event.Enable(true);
 }
 
 /// Save default file type
-void ctConfigToolView::OnGo(wxCommandEvent& event)
+void ctConfigToolView::OnGo(wxCommandEvent& WXUNUSED(event))
 {
     ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
     wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
@@ -1088,9 +1083,9 @@ void ctConfigToolView::OnUpdateGo(wxUpdateUIEvent& event)
 //----------------------------------------------------------------------------
 
 BEGIN_EVENT_TABLE(ctFindReplaceDialog, wxFindReplaceDialog)
-    EVT_FIND(-1, ctFindReplaceDialog::OnFind)
-    EVT_FIND_NEXT(-1, ctFindReplaceDialog::OnFind)
-    EVT_FIND_CLOSE(-1, ctFindReplaceDialog::OnClose)
+    EVT_FIND(wxID_ANY, ctFindReplaceDialog::OnFind)
+    EVT_FIND_NEXT(wxID_ANY, ctFindReplaceDialog::OnFind)
+    EVT_FIND_CLOSE(wxID_ANY, ctFindReplaceDialog::OnClose)
 END_EVENT_TABLE()
 
 wxFindReplaceData ctFindReplaceDialog::sm_findData;
@@ -1125,7 +1120,7 @@ bool ctFindReplaceDialog::DoFind(const wxString& textToFind, bool matchCase, boo
 {
     ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
     if (!doc)
-        return FALSE;
+        return false;
     ctConfigToolView* view = (ctConfigToolView*) doc->GetFirstView();
 
     ctConfigItem* currentItem = NULL;
@@ -1134,7 +1129,7 @@ bool ctFindReplaceDialog::DoFind(const wxString& textToFind, bool matchCase, boo
     {
         focusItem = doc->GetTopItem();
         if (!focusItem)
-            return FALSE;
+            return false;
     }
 
     if (!sm_currentItem.IsEmpty())
@@ -1151,14 +1146,14 @@ bool ctFindReplaceDialog::DoFind(const wxString& textToFind, bool matchCase, boo
     {
         sm_currentItem = currentItem->GetName();
         wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->SelectItem(currentItem->GetTreeItemId());
-        return TRUE;
+        return true;
     }
     else
     {
         sm_currentItem = wxEmptyString;
     }
 
-    return FALSE;
+    return false;
 }
 
 ctConfigItem* ctFindReplaceDialog::FindNextItem(ctConfigToolDoc* doc,