1 // frmContactEditor-Home.cpp - frmContactEditor Home tab subroutines.
3 // (c) 2012-2016 Xestia Software Development.
5 // This file is part of Xestia Address Book.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include "frmContactEditor.h"
20 #include "frmContactEditorNickname.h"
21 #include "frmContactEditorAddress.h"
22 #include "frmContactEditorEmail.h"
23 #include "frmContactEditorIM.h"
24 #include "frmContactEditorTelephone.h"
25 #include "frmContactEditorLanguages.h"
26 #include "frmContactEditorTimezones.h"
27 #include "frmContactEditorRelated.h"
28 #include "frmContactEditorWebsites.h"
29 #include "frmContactEditorTitles.h"
30 #include "frmContactEditorRoles.h"
31 #include "frmContactEditorGeoposition.h"
32 #include "frmContactEditorGroups.h"
33 #include "frmContactEditorOrganisations.h"
34 #include "frmContactEditorNotes.h"
36 void frmContactEditor::AddHomeNickname( wxCommandEvent& event )
40 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41 frameCENickname->SetEditorMode(FALSE, CE_HOME);
42 intResult = GetLastInt(&ContactEditorData.HomeNicknamesList);
43 frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
44 &ContactEditorData.HomeNicknamesListAltID,
45 &ContactEditorData.HomeNicknamesListPID,
46 &ContactEditorData.HomeNicknamesListType,
47 &ContactEditorData.HomeNicknamesListLanguage,
48 &ContactEditorData.HomeNicknamesListTokens,
49 &ContactEditorData.HomeNicknamesListPref,
52 frameCENickname->ShowModal();
53 delete frameCENickname;
54 frameCENickname = NULL;
57 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
59 long longSelected = -1;
60 int intSelectedData = 0;
62 if (!GetSelectedItem(lboHomeNicknames,
68 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
69 frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
70 &ContactEditorData.HomeNicknamesListAltID,
71 &ContactEditorData.HomeNicknamesListPID,
72 &ContactEditorData.HomeNicknamesListType,
73 &ContactEditorData.HomeNicknamesListLanguage,
74 &ContactEditorData.HomeNicknamesListTokens,
75 &ContactEditorData.HomeNicknamesListPref,
78 frameCENickname->SetEditorMode(TRUE, CE_HOME);
79 frameCENickname->ShowModal();
80 delete frameCENickname;
81 frameCENickname = NULL;
84 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
87 long longSelected = -1;
88 int intSelectedData = 0;
90 if (!GetSelectedItem(lboHomeNicknames,
96 lboHomeNicknames->DeleteItem(longSelected);
98 DeleteMapData(intSelectedData,
99 &ContactEditorData.HomeNicknamesList,
100 &ContactEditorData.HomeNicknamesListLanguage,
101 &ContactEditorData.HomeNicknamesListAltID,
102 &ContactEditorData.HomeNicknamesListPID,
103 &ContactEditorData.HomeNicknamesListTokens,
104 &ContactEditorData.HomeNicknamesListType,
105 &ContactEditorData.HomeNicknamesListPref);
109 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
113 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
114 frameCEAddress->SetEditorMode(FALSE, CE_HOME);
115 intResult = GetLastInt(&ContactEditorData.HomeAddressList);
116 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
117 &ContactEditorData.HomeAddressListTown,
118 &ContactEditorData.HomeAddressListCounty,
119 &ContactEditorData.HomeAddressListPostCode,
120 &ContactEditorData.HomeAddressListCountry,
121 &ContactEditorData.HomeAddressListLabel,
122 &ContactEditorData.HomeAddressListLang,
123 &ContactEditorData.HomeAddressListAltID,
124 &ContactEditorData.HomeAddressListPID,
125 &ContactEditorData.HomeAddressListTokens,
126 &ContactEditorData.HomeAddressListGeo,
127 &ContactEditorData.HomeAddressListTimezone,
128 &ContactEditorData.HomeAddressListType,
129 &ContactEditorData.HomeAddressListMediatype,
130 &ContactEditorData.HomeAddressListPref,
133 frameCEAddress->ShowModal();
134 delete frameCEAddress;
135 frameCEAddress = NULL;
138 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
140 long longSelected = -1;
141 int intSelectedData = 0;
143 if (!GetSelectedItem(lboHomeAddresses,
149 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
150 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
151 &ContactEditorData.HomeAddressListTown,
152 &ContactEditorData.HomeAddressListCounty,
153 &ContactEditorData.HomeAddressListPostCode,
154 &ContactEditorData.HomeAddressListCountry,
155 &ContactEditorData.HomeAddressListLabel,
156 &ContactEditorData.HomeAddressListLang,
157 &ContactEditorData.HomeAddressListAltID,
158 &ContactEditorData.HomeAddressListPID,
159 &ContactEditorData.HomeAddressListTokens,
160 &ContactEditorData.HomeAddressListGeo,
161 &ContactEditorData.HomeAddressListTimezone,
162 &ContactEditorData.HomeAddressListType,
163 &ContactEditorData.HomeAddressListMediatype,
164 &ContactEditorData.HomeAddressListPref,
167 frameCEAddress->SetEditorMode(TRUE, CE_HOME);
168 frameCEAddress->ShowModal();
169 delete frameCEAddress;
170 frameCEAddress = NULL;
173 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
176 long longSelected = -1;
177 int intSelectedData = 0;
179 if (!GetSelectedItem(lboHomeAddresses,
185 lboHomeAddresses->DeleteItem(longSelected);
187 DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
188 &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
189 &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
190 &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
191 &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
192 &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
193 &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
194 &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
195 &ContactEditorData.HomeAddressListPref);
199 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
203 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
204 frameCEEmail->SetEditorMode(FALSE, CE_HOME);
205 intResult = GetLastInt(&ContactEditorData.HomeAddressList);
206 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
207 &ContactEditorData.HomeEmailListAltID,
208 &ContactEditorData.HomeEmailListPID,
209 &ContactEditorData.HomeEmailListType,
210 &ContactEditorData.HomeEmailListTokens,
211 &ContactEditorData.HomeEmailListPref,
214 frameCEEmail->ShowModal();
219 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
221 long longSelected = -1;
222 int intSelectedData = 0;
224 if (!GetSelectedItem(lboHomeEmails,
230 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
231 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
232 &ContactEditorData.HomeEmailListAltID,
233 &ContactEditorData.HomeEmailListPID,
234 &ContactEditorData.HomeEmailListType,
235 &ContactEditorData.HomeEmailListTokens,
236 &ContactEditorData.HomeEmailListPref,
239 frameCEEmail->SetEditorMode(TRUE, CE_HOME);
240 frameCEEmail->ShowModal();
246 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
248 long longSelected = -1;
249 int intSelectedData = 0;
251 if (!GetSelectedItem(lboHomeEmails,
257 lboHomeEmails->DeleteItem(longSelected);
259 DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
260 &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
261 &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
262 &ContactEditorData.HomeEmailListPref);
266 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
270 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
271 frameCEIM->SetEditorMode(FALSE, CE_HOME);
272 intResult = GetLastInt(&ContactEditorData.HomeIMList);
273 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
274 &ContactEditorData.HomeIMListAltID,
275 &ContactEditorData.HomeIMListPID,
276 &ContactEditorData.HomeIMListType,
277 &ContactEditorData.HomeIMListTypeInfo,
278 &ContactEditorData.HomeIMListTokens,
279 &ContactEditorData.HomeIMListMediatype,
280 &ContactEditorData.HomeIMListPref,
283 frameCEIM->ShowModal();
288 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
290 long longSelected = -1;
291 int intSelectedData = 0;
293 if (!GetSelectedItem(lboHomeIM,
299 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
300 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
301 &ContactEditorData.HomeIMListAltID,
302 &ContactEditorData.HomeIMListPID,
303 &ContactEditorData.HomeIMListType,
304 &ContactEditorData.HomeIMListTypeInfo,
305 &ContactEditorData.HomeIMListTokens,
306 &ContactEditorData.HomeIMListMediatype,
307 &ContactEditorData.HomeIMListPref,
310 frameCEIM->SetEditorMode(TRUE, CE_HOME);
311 frameCEIM->ShowModal();
316 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
318 long longSelected = -1;
319 int intSelectedData = 0;
321 if (!GetSelectedItem(lboHomeIM,
327 lboHomeIM->DeleteItem(longSelected);
329 DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
330 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
331 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
332 &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype,
333 &ContactEditorData.HomeIMListPref);
337 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
341 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
342 frameCETel->SetEditorMode(FALSE, CE_HOME);
343 intResult = GetLastInt(&ContactEditorData.HomeTelephoneList);
344 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
345 &ContactEditorData.HomeTelephoneListAltID,
346 &ContactEditorData.HomeTelephoneListPID,
347 &ContactEditorData.HomeTelephoneListType,
348 &ContactEditorData.HomeTelephoneListTypeInfo,
349 &ContactEditorData.HomeTelephoneListTokens,
350 &ContactEditorData.HomeTelephoneListPref,
353 frameCETel->ShowModal();
358 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
360 long longSelected = -1;
361 int intSelectedData = 0;
363 if (!GetSelectedItem(lboHomeTelephone,
369 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
370 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
371 &ContactEditorData.HomeTelephoneListAltID,
372 &ContactEditorData.HomeTelephoneListPID,
373 &ContactEditorData.HomeTelephoneListType,
374 &ContactEditorData.HomeTelephoneListTypeInfo,
375 &ContactEditorData.HomeTelephoneListTokens,
376 &ContactEditorData.HomeTelephoneListPref,
379 frameCETel->SetEditorMode(TRUE, CE_HOME);
380 frameCETel->ShowModal();
385 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
387 long longSelected = -1;
388 int intSelectedData = 0;
390 if (!GetSelectedItem(lboHomeTelephone,
396 lboHomeTelephone->DeleteItem(longSelected);
398 DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
399 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
400 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
401 &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
405 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
409 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
410 frameCELang->SetEditorMode(FALSE, CE_HOME);
411 intResult = GetLastInt(&ContactEditorData.HomeLanguageList);
412 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
413 &ContactEditorData.HomeLanguageListAltID,
414 &ContactEditorData.HomeLanguageListPID,
415 &ContactEditorData.HomeLanguageListType,
416 &ContactEditorData.HomeLanguageListTokens,
417 &ContactEditorData.HomeLanguageListPref,
420 frameCELang->ShowModal();
425 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
427 long longSelected = -1;
428 int intSelectedData = 0;
430 if (!GetSelectedItem(lboHomeLanguages,
436 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
437 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
438 &ContactEditorData.HomeLanguageListAltID,
439 &ContactEditorData.HomeLanguageListPID,
440 &ContactEditorData.HomeLanguageListType,
441 &ContactEditorData.HomeLanguageListTokens,
442 &ContactEditorData.HomeLanguageListPref,
445 frameCELang->SetEditorMode(TRUE, CE_HOME);
446 frameCELang->ShowModal();
451 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
453 long longSelected = -1;
454 int intSelectedData = 0;
456 if (!GetSelectedItem(lboHomeLanguages,
462 lboHomeLanguages->DeleteItem(longSelected);
464 DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
465 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
466 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
467 &ContactEditorData.HomeLanguageListPref);
471 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
475 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
476 frameCETZ->SetEditorMode(FALSE, CE_HOME);
477 intResult = GetLastInt(&ContactEditorData.HomeTZList);
478 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
479 &ContactEditorData.HomeTZListAltID,
480 &ContactEditorData.HomeTZListPID,
481 &ContactEditorData.HomeTZListType,
482 &ContactEditorData.HomeTZListTokens,
483 &ContactEditorData.HomeTZListMediatype,
484 &ContactEditorData.HomeTZListPref,
487 frameCETZ->ShowModal();
492 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
494 long longSelected = -1;
495 int intSelectedData = 0;
497 if (!GetSelectedItem(lboHomeTimezones,
503 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
504 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
505 &ContactEditorData.HomeTZListAltID,
506 &ContactEditorData.HomeTZListPID,
507 &ContactEditorData.HomeTZListType,
508 &ContactEditorData.HomeTZListTokens,
509 &ContactEditorData.HomeTZListMediatype,
510 &ContactEditorData.HomeTZListPref,
513 frameCETZ->SetEditorMode(TRUE, CE_HOME);
514 frameCETZ->ShowModal();
519 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
521 long longSelected = -1;
522 int intSelectedData = 0;
524 if (!GetSelectedItem(lboHomeTimezones,
530 lboHomeTimezones->DeleteItem(longSelected);
532 DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
533 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
534 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
535 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
539 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
543 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
544 frameCEGeo->SetEditorMode(FALSE, CE_HOME);
545 intResult = GetLastInt(&ContactEditorData.HomeGeographyList);
546 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
547 &ContactEditorData.HomeGeographyListAltID,
548 &ContactEditorData.HomeGeographyListPID,
549 &ContactEditorData.HomeGeographyListType,
550 &ContactEditorData.HomeGeographyListDataType,
551 &ContactEditorData.HomeGeographyListTokens,
552 &ContactEditorData.HomeGeographyListMediatype,
553 &ContactEditorData.HomeGeographyListPref,
556 frameCEGeo->ShowModal();
561 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
563 long longSelected = -1;
564 int intSelectedData = 0;
566 if (!GetSelectedItem(lboHomeGeoposition,
572 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
573 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
574 &ContactEditorData.HomeGeographyListAltID,
575 &ContactEditorData.HomeGeographyListPID,
576 &ContactEditorData.HomeGeographyListType,
577 &ContactEditorData.HomeGeographyListDataType,
578 &ContactEditorData.HomeGeographyListTokens,
579 &ContactEditorData.HomeGeographyListMediatype,
580 &ContactEditorData.HomeGeographyListPref,
583 frameCEGeo->SetEditorMode(TRUE, CE_HOME);
584 frameCEGeo->ShowModal();
589 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
591 long longSelected = -1;
592 int intSelectedData = 0;
594 if (!GetSelectedItem(lboHomeGeoposition,
600 lboHomeGeoposition->DeleteItem(longSelected);
602 DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
603 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
604 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
605 &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype,
606 &ContactEditorData.HomeGeographyListPref);
610 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
614 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
615 frameCEWeb->SetEditorMode(FALSE, CE_HOME);
616 intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
617 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
618 &ContactEditorData.HomeWebsiteListAltID,
619 &ContactEditorData.HomeWebsiteListPID,
620 &ContactEditorData.HomeWebsiteListType,
621 &ContactEditorData.HomeWebsiteListTokens,
622 &ContactEditorData.HomeWebsiteListMediatype,
623 &ContactEditorData.HomeWebsiteListPref,
626 frameCEWeb->ShowModal();
631 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
633 long longSelected = -1;
634 int intSelectedData = 0;
636 if (!GetSelectedItem(lboHomeWebsites,
642 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
643 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
644 &ContactEditorData.HomeWebsiteListAltID,
645 &ContactEditorData.HomeWebsiteListPID,
646 &ContactEditorData.HomeWebsiteListType,
647 &ContactEditorData.HomeWebsiteListTokens,
648 &ContactEditorData.HomeWebsiteListMediatype,
649 &ContactEditorData.HomeWebsiteListPref,
652 frameCEWeb->SetEditorMode(TRUE, CE_HOME);
653 frameCEWeb->ShowModal();
658 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
660 long longSelected = -1;
661 int intSelectedData = 0;
663 if (!GetSelectedItem(lboHomeWebsites,
669 lboHomeWebsites->DeleteItem(longSelected);
671 DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
672 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
673 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
674 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
678 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
682 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
683 frameCETitle->SetEditorMode(FALSE, CE_HOME);
684 intResult = GetLastInt(&ContactEditorData.HomeTitleList);
685 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
686 &ContactEditorData.HomeTitleListLanguage,
687 &ContactEditorData.HomeTitleListAltID,
688 &ContactEditorData.HomeTitleListPID,
689 &ContactEditorData.HomeTitleListType,
690 &ContactEditorData.HomeTitleListTokens,
691 &ContactEditorData.HomeTitleListPref,
694 frameCETitle->ShowModal();
699 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
701 long longSelected = -1;
702 int intSelectedData = 0;
704 if (!GetSelectedItem(lboHomeTitles,
710 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
711 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
712 &ContactEditorData.HomeTitleListLanguage,
713 &ContactEditorData.HomeTitleListAltID,
714 &ContactEditorData.HomeTitleListPID,
715 &ContactEditorData.HomeTitleListType,
716 &ContactEditorData.HomeTitleListTokens,
717 &ContactEditorData.HomeTitleListPref,
720 frameCETitle->SetEditorMode(TRUE, CE_HOME);
721 frameCETitle->ShowModal();
726 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
728 long longSelected = -1;
729 int intSelectedData = 0;
731 if (!GetSelectedItem(lboHomeTitles,
737 lboHomeTitles->DeleteItem(longSelected);
739 DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
740 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
741 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
742 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
746 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
750 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
751 frameCERole->SetEditorMode(FALSE, CE_HOME);
752 intResult = GetLastInt(&ContactEditorData.HomeRoleList);
753 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
754 &ContactEditorData.HomeRoleListLanguage,
755 &ContactEditorData.HomeRoleListAltID,
756 &ContactEditorData.HomeRoleListPID,
757 &ContactEditorData.HomeRoleListType,
758 &ContactEditorData.HomeRoleListTokens,
759 &ContactEditorData.HomeRoleListPref,
762 frameCERole->ShowModal();
767 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
769 long longSelected = -1;
770 int intSelectedData = 0;
772 if (!GetSelectedItem(lboHomeRoles,
778 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
779 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
780 &ContactEditorData.HomeRoleListLanguage,
781 &ContactEditorData.HomeRoleListAltID,
782 &ContactEditorData.HomeRoleListPID,
783 &ContactEditorData.HomeRoleListType,
784 &ContactEditorData.HomeRoleListTokens,
785 &ContactEditorData.HomeRoleListPref,
788 frameCERole->SetEditorMode(TRUE, CE_HOME);
789 frameCERole->ShowModal();
794 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
796 long longSelected = -1;
797 int intSelectedData = 0;
799 if (!GetSelectedItem(lboHomeRoles,
805 lboHomeRoles->DeleteItem(longSelected);
807 DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
808 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
809 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
810 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
814 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
818 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
819 frameCEOrg->SetEditorMode(FALSE, CE_HOME);
820 intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
821 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
822 &ContactEditorData.HomeOrganisationsListLanguage,
823 &ContactEditorData.HomeOrganisationsListSortAs,
824 &ContactEditorData.HomeOrganisationsListAltID,
825 &ContactEditorData.HomeOrganisationsListPID,
826 &ContactEditorData.HomeOrganisationsListType,
827 &ContactEditorData.HomeOrganisationsListTokens,
828 &ContactEditorData.HomeOrganisationsListPref,
829 lboHomeOrganisations,
831 frameCEOrg->ShowModal();
836 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
838 long longSelected = -1;
839 int intSelectedData = 0;
841 if (!GetSelectedItem(lboHomeOrganisations,
847 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
848 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
849 &ContactEditorData.HomeOrganisationsListLanguage,
850 &ContactEditorData.HomeOrganisationsListSortAs,
851 &ContactEditorData.HomeOrganisationsListAltID,
852 &ContactEditorData.HomeOrganisationsListPID,
853 &ContactEditorData.HomeOrganisationsListType,
854 &ContactEditorData.HomeOrganisationsListTokens,
855 &ContactEditorData.HomeOrganisationsListPref,
856 lboHomeOrganisations,
858 frameCEOrg->SetEditorMode(TRUE, CE_HOME);
859 frameCEOrg->ShowModal();
864 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
866 long longSelected = -1;
867 int intSelectedData = 0;
869 if (!GetSelectedItem(lboHomeOrganisations,
875 lboHomeOrganisations->DeleteItem(longSelected);
877 DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
878 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
879 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
880 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
881 &ContactEditorData.HomeOrganisationsListPref);
885 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
889 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
890 frameCENote->SetEditorMode(FALSE, CE_HOME);
891 intResult = GetLastInt(&ContactEditorData.HomeNoteList);
892 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
893 &ContactEditorData.HomeNoteListLanguage,
894 &ContactEditorData.HomeNoteListAltID,
895 &ContactEditorData.HomeNoteListPID,
896 &ContactEditorData.HomeNoteListType,
897 &ContactEditorData.HomeNoteListTokens,
898 &ContactEditorData.HomeNoteListPref,
901 frameCENote->ShowModal();
906 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
908 long longSelected = -1;
909 int intSelectedData = 0;
911 if (!GetSelectedItem(lboHomeNotes,
917 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
918 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
919 &ContactEditorData.HomeNoteListLanguage,
920 &ContactEditorData.HomeNoteListAltID,
921 &ContactEditorData.HomeNoteListPID,
922 &ContactEditorData.HomeNoteListType,
923 &ContactEditorData.HomeNoteListTokens,
924 &ContactEditorData.HomeNoteListPref,
927 frameCENote->SetEditorMode(TRUE, CE_HOME);
928 frameCENote->ShowModal();
933 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
935 long longSelected = -1;
936 int intSelectedData = 0;
938 if (!GetSelectedItem(lboHomeNotes,
944 lboNotes->DeleteItem(longSelected);
946 DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
947 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
948 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
949 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);