From 088f9a08a93b0b45e785d5aa5619678997a83303 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 13 Mar 2016 12:18:57 +0000 Subject: [PATCH] Added comments to describe functions in contacteditor/frmContactEditor-Load.cpp --- .../contacteditor/frmContactEditor-Load.cpp | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/source/contacteditor/frmContactEditor-Load.cpp b/source/contacteditor/frmContactEditor-Load.cpp index 92990a9..5f10c46 100644 --- a/source/contacteditor/frmContactEditor-Load.cpp +++ b/source/contacteditor/frmContactEditor-Load.cpp @@ -859,6 +859,8 @@ void frmContactEditor::SplitValues(wxString *PropertyLine, std::map *SplitLength, int intSize){ + // Split the values. + size_t intPropertyLen = PropertyLine->Len(); int intSplitsFound = 0; int intSplitSize = 0; @@ -916,6 +918,9 @@ void frmContactEditor::LoadData(std::map *GeneralList, wxListCtrl *BusinessListCtrl, int *DataCount){ + // Load data into the controls (first section of data and preference + // only). + long ListCtrlIndex = -1; // Deal with the general items. @@ -1006,6 +1011,9 @@ void frmContactEditor::LoadData(std::map *GeneralList, wxListCtrl *BusinessListCtrl, int *DataCount){ + // Load data into the controls (first section of data, + // type and preference). + long ListCtrlIndex = -1; // Deal with the general items. @@ -1106,6 +1114,8 @@ void frmContactEditor::LoadData(std::map *ItemList, wxListCtrl *ItemCtrl, int *DataCount){ + // Load the data (name and preference only). + long ListCtrlIndex = -1; for (std::map::iterator Iter = ItemList->begin(); @@ -1138,6 +1148,8 @@ void frmContactEditor::LoadData(std::map *ItemList, wxListCtrl *ItemCtrl, int *DataCount){ + // Load the data (name, preference and type). + long ListCtrlIndex = -1; for (std::map::iterator Iter = ItemList->begin(); @@ -1178,6 +1190,8 @@ void frmContactEditor::LoadData(wxString ItemName, wxListCtrl *ItemCtrl, int *DataCount){ + // Load data (name, preference, type and data type). + long ListCtrlIndex = -1; for (std::map::iterator Iter = ItemList->begin(); @@ -1246,6 +1260,8 @@ void frmContactEditor::LoadPictureData(wxString ItemName, wxListCtrl *ItemCtrl, int *DataCount){ + // Load the picture data. + long ListCtrlIndex = -1; for (std::map::iterator Iter = ItemList->begin(); @@ -1307,7 +1323,9 @@ void frmContactEditor::LoadVendorData(std::map *ItemListPEN, std::map *ItemListElement, wxListCtrl *ItemCtrl, int *DataCount){ - + + // Load the vendor data. + long ListCtrlIndex = -1; wxString ItemValue; @@ -1340,6 +1358,8 @@ void frmContactEditor::LoadXTokenData(std::map *ItemListTokens, wxListCtrl *ItemCtrl, int *DataCount){ + // Load the X-Token data. + long ListCtrlIndex = -1; wxString ItemValue; @@ -1369,6 +1389,8 @@ void frmContactEditor::LoadXTokenData(std::map *ItemListTokens, void frmContactEditor::LoadData(std::map *ItemList, wxComboBox *ItemCtrl){ + // Load data into a wxComboBox. + int ItemIndex = 0; if (MapDataExists(&ItemIndex, ItemList)){ @@ -1385,6 +1407,8 @@ void frmContactEditor::LoadRelatedData(std::map *ItemList, wxListCtrl *ItemCtrl, int *DataCount){ + // Load related data (name, preference and type). + long ListCtrlIndex = -1; wxString RelatedType; @@ -1515,6 +1539,8 @@ void frmContactEditor::LoadRelatedData(std::map *ItemList, void frmContactEditor::LoadKind(ContactKindType *KindType){ + // Load contact kind. + switch (*KindType){ case CONTACTKIND_INDIVIDUAL: cmbType->SetSelection(1); @@ -1541,6 +1567,8 @@ void frmContactEditor::LoadKind(ContactKindType *KindType){ void frmContactEditor::LoadBirthday(wxString *BirthdayData, bool *BirthdayText){ + // Load Birthday. + if (BirthdayData->IsEmpty()){ return; } @@ -1580,6 +1608,8 @@ void frmContactEditor::LoadBirthday(wxString *BirthdayData, bool *BirthdayText){ void frmContactEditor::LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText){ + // Load Anniversary. + if (AnniversaryData->IsEmpty()){ return; } @@ -1619,6 +1649,8 @@ void frmContactEditor::LoadAnniversary(wxString *AnniversaryData, bool *Annivers void frmContactEditor::LoadGender(wxString *GenderComponent, wxString *GenderIdentity){ + // Load Gender. + // Deal with the Gender Component. if (*GenderComponent == wxT("M")){ @@ -1663,6 +1695,8 @@ void frmContactEditor::LoadName(wxString *NameTitle, wxString *NameForename, wxString *NameSurname, wxString *NameOtherNames, wxString *NameSuffix){ + // Load Name. + txtTitle->SetValue(*NameTitle); txtForename->SetValue(*NameForename); txtSurname->SetValue(*NameSurname); @@ -1673,6 +1707,8 @@ void frmContactEditor::LoadName(wxString *NameTitle, wxString *NameForename, void frmContactEditor::LoadMember(std::map *GroupList){ + // Load group data. + // Go through the list of contacts for the account and find the matching UID. // If contact with UID doesn't match then say (unknown contact). @@ -1878,6 +1914,8 @@ void frmContactEditor::LoadAddress(std::map *GeneralAddressList, std::map *BusinessAddressListPref, int *AddressCount){ + // Load address. + long ListCtrlIndex = -1; // Deal with the general addresses. -- 2.39.5