From: Steve Brokenshire Date: Mon, 14 Mar 2016 22:12:05 +0000 (+0000) Subject: Added comments to describe functions in search/frmSearch.cpp X-Git-Tag: release-0.11~57^2~4 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=5e1d22ce3c6b42be0b5f7e78bc21415ad1636bf1 Added comments to describe functions in search/frmSearch.cpp --- 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){