LoadMember(&ContactEditorData.GroupsList);
- // Process the address (ADR) (frmContactEditor-LoadAddress.cpp)
+ // Process the addresses (ADR) (frmContactEditor-LoadAddress.cpp)
LoadAddress(&ContactEditorData.GeneralAddressList,
&ContactEditorData.GeneralAddressListTown,
&ContactEditorData.BusinessAddressListPref,
&ADRCount);
- // Process the timezone (TZ) (frmContactEditor-LoadTimeZone.cpp)
+ // Process the timezones (TZ) (frmContactEditor-LoadTimeZone.cpp)
LoadTimeZone(&ContactEditorData.GeneralTZList,
&ContactEditorData.GeneralTZListPref,
&ContactEditorData.BusinessTZList,
&ContactEditorData.BusinessTZListPref,
&TZCount);
+
+ // Process the emails (frmContactEditor-LoadEmail.cpp)
+
+ LoadEmail(&ContactEditorData.GeneralEmailList,
+ &ContactEditorData.GeneralEmailListPref,
+ &ContactEditorData.HomeEmailList,
+ &ContactEditorData.HomeEmailListPref,
+ &ContactEditorData.BusinessEmailList,
+ &ContactEditorData.BusinessEmailListPref,
+ &EmailCount);
for (std::map<int,wxString>::iterator iter = ContactFileLines.begin();
iter != ContactFileLines.end(); ++iter){
LoadADR(wxSPropertySeg1, wxSPropertySeg2, &ADRCount);
- }*/ else if (wxSProperty == wxT("EMAIL")){
+ } else if (wxSProperty == wxT("EMAIL")){
// See frmContactEditor-LoadEmail.cpp
LoadEmail(wxSPropertySeg1, wxSPropertySeg2, &EmailCount);
- } else if (wxSProperty == wxT("IMPP")){
+ }*/ else if (wxSProperty == wxT("IMPP")){
// See frmContactEditor-LoadIM.cpp
#include "frmContactEditor.h"
+void frmContactEditor::LoadEmail(std::map<int, wxString> *GeneralEmailListPtr,
+ std::map<int, int> *GeneralEmailListPrefPtr,
+ std::map<int, wxString> *HomeEmailListPtr,
+ std::map<int, int> *HomeEmailListPrefPtr,
+ std::map<int, wxString> *BusinessEmailListPtr,
+ std::map<int, int> *BusinessEmailListPrefPtr,
+ int *EmailCount){
+
+ long ListCtrlIndex = -1;
+
+ // Deal with the general addresses.
+
+ for (std::map<int,wxString>::iterator Iter = GeneralEmailListPtr->begin();
+ Iter != GeneralEmailListPtr->end();
+ Iter++){
+
+ wxListItem coldata;
+
+ coldata.SetId(*EmailCount);
+ coldata.SetData(*EmailCount);
+ coldata.SetText(Iter->second);
+
+ ListCtrlIndex = lboEmails->InsertItem(coldata);
+
+ if (MapDataExists(EmailCount, GeneralEmailListPrefPtr)){
+
+ lboEmails->SetItem(ListCtrlIndex, 1, wxString::Format("%i", GeneralEmailListPrefPtr->find(*EmailCount)->second));
+
+ }
+
+ (*EmailCount)++;
+
+ }
+
+ // Deal with the home addresses.
+
+ for (std::map<int,wxString>::iterator Iter = HomeEmailListPtr->begin();
+ Iter != HomeEmailListPtr->end();
+ Iter++){
+
+ wxListItem coldata;
+
+ coldata.SetId(*EmailCount);
+ coldata.SetData(*EmailCount);
+ coldata.SetText(Iter->second);
+
+ ListCtrlIndex = lboHomeEmails->InsertItem(coldata);
+
+ if (MapDataExists(EmailCount, HomeEmailListPrefPtr)){
+
+ lboHomeEmails->SetItem(ListCtrlIndex, 1, wxString::Format("%i", HomeEmailListPrefPtr->find(*EmailCount)->second));
+
+ }
+
+ (*EmailCount)++;
+
+ }
+
+ // Deal with the work addresses.
+
+ for (std::map<int,wxString>::iterator Iter = BusinessEmailListPtr->begin();
+ Iter != BusinessEmailListPtr->end();
+ Iter++){
+
+ wxListItem coldata;
+
+ coldata.SetId(*EmailCount);
+ coldata.SetData(*EmailCount);
+ coldata.SetText(Iter->second);
+
+ ListCtrlIndex = lboBusinessEmail->InsertItem(coldata);
+
+ if (MapDataExists(EmailCount, BusinessEmailListPrefPtr)){
+
+ lboBusinessEmail->SetItem(ListCtrlIndex, 1, wxString::Format("%i", BusinessEmailListPrefPtr->find(*EmailCount)->second));
+
+ }
+
+ (*EmailCount)++;
+
+ }
+
+}
+
void frmContactEditor::LoadEmail(wxString wxSPropertySeg1, wxString wxSPropertySeg2, int *EmailCount){
size_t intPropertyLen = wxSPropertySeg1.Len();
std::map<int, wxString> *BusinessTZListPtr,
std::map<int, int> *BusinessTZListPrefPtr,
int *TZCount);
+ void LoadEmail(std::map<int, wxString> *GeneralEmailListPtr,
+ std::map<int, int> *GeneralEmailListPrefPtr,
+ std::map<int, wxString> *HomeEmailListPtr,
+ std::map<int, int> *HomeEmailListPrefPtr,
+ std::map<int, wxString> *BusinessEmailListPtr,
+ std::map<int, int> *BusinessEmailListPrefPtr,
+ int *EmailCount);
int intValueSeek = 1;
bool IsGroup = FALSE;