From 5e1d22ce3c6b42be0b5f7e78bc21415ad1636bf1 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 14 Mar 2016 22:12:05 +0000 Subject: [PATCH] Added comments to describe functions in search/frmSearch.cpp --- source/search/frmSearch.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/source/search/frmSearch.cpp b/source/search/frmSearch.cpp index 46d7d1e..6d3b891 100644 --- a/source/search/frmSearch.cpp +++ b/source/search/frmSearch.cpp @@ -59,6 +59,8 @@ frmSearch::frmSearch( wxWindow* parent ) frmSearchADT( parent ) { + // Setup the search window. + XABSearchPanel *InitPanel = new XABSearchPanel( tabSearch ); InitPanel->EnableButtons(TRUE, FALSE); InitPanel->SetupPointers(this); @@ -302,13 +304,13 @@ void frmSearch::AddSearchSetting( wxCommandEvent& event ) void frmSearch::RemoveSearchSetting( wxCommandEvent& event ) { + // Remove a search setting frame from the list. + // Get the integer from the event. std::map::iterator iter; iter = SearchFrames.find(event.GetInt()); - // Remove a search setting frame from the list. - XABSearchPanel *XABSPPtr; XABSPPtr = static_cast(iter->second); @@ -361,7 +363,9 @@ void frmSearch::ReloadAccountList( wxCommandEvent& event ){ } void frmSearch::SearchBarUpdate( wxCommandEvent& event ){ - + + // Update the status bar. + wxString *SBData = (wxString*)event.GetClientData(); stbBottom->SetStatusText(*SBData, 0); @@ -373,6 +377,9 @@ void frmSearch::SearchBarUpdate( wxCommandEvent& event ){ void frmSearch::SearchFinished( wxCommandEvent& event ){ + // Reset the search button and unlock the search + // panel buttons. + StopMode = FALSE; btnSearch->SetLabel(_("Search")); DisableAllSearchSettings(FALSE); @@ -480,18 +487,24 @@ void frmSearch::CloseWindow( wxCloseEvent& event ){ void frmSearch::CloseWindow( wxCommandEvent& event ){ + // Close this window. + this->Close(); } void frmSearch::SetUID(int UID){ + // Set the UID of the search window. + SearchUID = UID; } void frmSearch::SetSearchMode(bool SearchModeIn){ + // Set the search mode of the window. + SearchMode = SearchModeIn; if (SearchMode == TRUE){ -- 2.39.5