From d57eb3c2b61f79f2b1052b98ba3e745499ede1c4 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 13 Mar 2016 10:30:14 +0000 Subject: [PATCH] Added comments to describe functions for frmContactEditorOrganisations --- .../frmContactEditorOrganisations.cpp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/contacteditor/frmContactEditorOrganisations.cpp b/source/contacteditor/frmContactEditorOrganisations.cpp index 8763710..fa0ca45 100644 --- a/source/contacteditor/frmContactEditorOrganisations.cpp +++ b/source/contacteditor/frmContactEditorOrganisations.cpp @@ -24,13 +24,19 @@ frmContactEditorOrganisations::frmContactEditorOrganisations( wxWindow* parent ) : frmContactEditorOrganisationsADT( parent ) { + + // Setup the window. + EditorMode = FALSE; sliPriority->Disable(); + } void frmContactEditorOrganisations::UpdateSortAs( wxCommandEvent& event ) { + // Update the predefined SortAs listings. + // Clear out the options for the combo box. cmbSortAs->Clear(); @@ -69,16 +75,22 @@ void frmContactEditorOrganisations::UpdateSortAs( wxCommandEvent& event ) void frmContactEditorOrganisations::EnablePriority( wxCommandEvent& event ) { + + // Enable/disable the priority setting. + if (chkUsePref->IsChecked()){ sliPriority->Enable(); } else { sliPriority->Disable(); } + } void frmContactEditorOrganisations::ProcessAction( wxCommandEvent& event ) { + // Process action. + long ListCtrlIndex; if (EditorMode == FALSE){ @@ -199,6 +211,9 @@ void frmContactEditorOrganisations::ProcessAction( wxCommandEvent& event ) void frmContactEditorOrganisations::SetEditorMode(bool EditMode, SectionType SectType) { + + // Set the editor mode. + // Set if the editor is adding or editing an address. // FALSE = Add // TRUE = Edit @@ -269,7 +284,11 @@ void frmContactEditorOrganisations::SetEditorMode(bool EditMode, SectionType Sec void frmContactEditorOrganisations::CloseWindow( wxCommandEvent& event ) { + + // Close the window. + this->Close(); + } void frmContactEditorOrganisations::SetupPointers(std::map *OrganisationList, @@ -284,6 +303,8 @@ void frmContactEditorOrganisations::SetupPointers(std::map *Organ int OrganisationIndex ) { + // Setup the pointers. + OrganisationListPtr = OrganisationList; OrganisationListLanguagePtr = OrganisationListLanguage; OrganisationListSortAsPtr = OrganisationListSortAs; -- 2.39.5