// with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
#include "frmContactEditor.h"
-
+
+void frmContactEditor::LoadTimeZone(std::map<int, wxString> *GeneralTZListPtr,
+ std::map<int, int> *GeneralTZListPrefPtr,
+ std::map<int, wxString> *HomeTZListPtr,
+ std::map<int, int> *HomeTZListPrefPtr,
+ std::map<int, wxString> *BusinessTZListPtr,
+ std::map<int, int> *BusinessTZListPrefPtr,
+ int *TZCount){
+
+ long ListCtrlIndex = -1;
+
+ // Deal with the general addresses.
+
+ for (std::map<int,wxString>::iterator Iter = GeneralTZListPtr->begin();
+ Iter != GeneralTZListPtr->end();
+ Iter++){
+
+ wxListItem coldata;
+
+ coldata.SetId(*TZCount);
+ coldata.SetData(*TZCount);
+ coldata.SetText(Iter->second);
+
+ ListCtrlIndex = lboTimezones->InsertItem(coldata);
+
+ if (MapDataExists(TZCount, GeneralTZListPrefPtr)){
+
+ lboTimezones->SetItem(ListCtrlIndex, 1, wxString::Format("%i", GeneralTZListPrefPtr->find(*TZCount)->second));
+
+ }
+
+ (*TZCount)++;
+
+ }
+
+ // Deal with the home addresses.
+
+ for (std::map<int,wxString>::iterator Iter = HomeTZListPtr->begin();
+ Iter != HomeTZListPtr->end();
+ Iter++){
+
+ wxListItem coldata;
+
+ coldata.SetId(*TZCount);
+ coldata.SetData(*TZCount);
+ coldata.SetText(Iter->second);
+
+ ListCtrlIndex = lboHomeTimezones->InsertItem(coldata);
+
+ if (MapDataExists(TZCount, HomeTZListPrefPtr)){
+
+ lboHomeTimezones->SetItem(ListCtrlIndex, 1, wxString::Format("%i", HomeTZListPrefPtr->find(*TZCount)->second));
+
+ }
+
+ (*TZCount)++;
+
+ }
+
+ // Deal with the work addresses.
+
+ for (std::map<int,wxString>::iterator Iter = BusinessTZListPtr->begin();
+ Iter != BusinessTZListPtr->end();
+ Iter++){
+
+ wxListItem coldata;
+
+ coldata.SetId(*TZCount);
+ coldata.SetData(*TZCount);
+ coldata.SetText(Iter->second);
+
+ ListCtrlIndex = lboBusinessTimezones->InsertItem(coldata);
+
+ if (MapDataExists(TZCount, BusinessTZListPrefPtr)){
+
+ lboBusinessTimezones->SetItem(ListCtrlIndex, 1, wxString::Format("%i", BusinessTZListPrefPtr->find(*TZCount)->second));
+
+ }
+
+ (*TZCount)++;
+
+ }
+
+}
+
void frmContactEditor::LoadTimeZone(wxString wxSPropertySeg1, wxString wxSPropertySeg2, int *TZCount){
size_t intPropertyLen = wxSPropertySeg1.Len();