X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorOrganisations.cpp;h=fa0ca456e821a13996138f96a2ec43a8eb315215;hb=56eff3f03cf38a27161b3279318c474e0421111c;hp=9aa5f503c7c10d06504630a3fd8125675325ccdf;hpb=13f15009712742722a3210c92dd296a2cb514879;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditorOrganisations.cpp b/source/contacteditor/frmContactEditorOrganisations.cpp index 9aa5f50..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 @@ -253,7 +268,7 @@ void frmContactEditorOrganisations::SetEditorMode(bool EditMode, SectionType Sec intiter = OrganisationListPrefPtr->find(OrganisationListIndex); if (intiter->first == OrganisationListIndex && intiter->second > 0 && - striter != OrganisationListPrefPtr->end()){ + intiter != OrganisationListPrefPtr->end()){ sliPriority->SetValue(intiter->second); sliPriority->Enable(); @@ -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;