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.HomeGeographyListTokens,
551 &ContactEditorData.HomeGeographyListMediatype,
552 &ContactEditorData.HomeGeographyListPref,
555 frameCEGeo->ShowModal();
560 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
562 long longSelected = -1;
563 int intSelectedData = 0;
565 if (!GetSelectedItem(lboHomeGeoposition,
571 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
572 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
573 &ContactEditorData.HomeGeographyListAltID,
574 &ContactEditorData.HomeGeographyListPID,
575 &ContactEditorData.HomeGeographyListType,
576 &ContactEditorData.HomeGeographyListTokens,
577 &ContactEditorData.HomeGeographyListMediatype,
578 &ContactEditorData.HomeGeographyListPref,
581 frameCEGeo->SetEditorMode(TRUE, CE_HOME);
582 frameCEGeo->ShowModal();
587 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
589 long longSelected = -1;
590 int intSelectedData = 0;
592 if (!GetSelectedItem(lboHomeGeoposition,
598 lboHomeGeoposition->DeleteItem(longSelected);
600 DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
601 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
602 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
603 &ContactEditorData.HomeGeographyListMediatype, &ContactEditorData.HomeGeographyListPref);
607 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
611 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
612 frameCEWeb->SetEditorMode(FALSE, CE_HOME);
613 intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
614 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
615 &ContactEditorData.HomeWebsiteListAltID,
616 &ContactEditorData.HomeWebsiteListPID,
617 &ContactEditorData.HomeWebsiteListType,
618 &ContactEditorData.HomeWebsiteListTokens,
619 &ContactEditorData.HomeWebsiteListMediatype,
620 &ContactEditorData.HomeWebsiteListPref,
623 frameCEWeb->ShowModal();
628 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
630 long longSelected = -1;
631 int intSelectedData = 0;
633 if (!GetSelectedItem(lboHomeWebsites,
639 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
640 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
641 &ContactEditorData.HomeWebsiteListAltID,
642 &ContactEditorData.HomeWebsiteListPID,
643 &ContactEditorData.HomeWebsiteListType,
644 &ContactEditorData.HomeWebsiteListTokens,
645 &ContactEditorData.HomeWebsiteListMediatype,
646 &ContactEditorData.HomeWebsiteListPref,
649 frameCEWeb->SetEditorMode(TRUE, CE_HOME);
650 frameCEWeb->ShowModal();
655 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
657 long longSelected = -1;
658 int intSelectedData = 0;
660 if (!GetSelectedItem(lboHomeWebsites,
666 lboHomeWebsites->DeleteItem(longSelected);
668 DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
669 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
670 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
671 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
675 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
679 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
680 frameCETitle->SetEditorMode(FALSE, CE_HOME);
681 intResult = GetLastInt(&ContactEditorData.HomeTitleList);
682 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
683 &ContactEditorData.HomeTitleListLanguage,
684 &ContactEditorData.HomeTitleListAltID,
685 &ContactEditorData.HomeTitleListPID,
686 &ContactEditorData.HomeTitleListType,
687 &ContactEditorData.HomeTitleListTokens,
688 &ContactEditorData.HomeTitleListPref,
691 frameCETitle->ShowModal();
696 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
698 long longSelected = -1;
699 int intSelectedData = 0;
701 if (!GetSelectedItem(lboHomeTitles,
707 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
708 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
709 &ContactEditorData.HomeTitleListLanguage,
710 &ContactEditorData.HomeTitleListAltID,
711 &ContactEditorData.HomeTitleListPID,
712 &ContactEditorData.HomeTitleListType,
713 &ContactEditorData.HomeTitleListTokens,
714 &ContactEditorData.HomeTitleListPref,
717 frameCETitle->SetEditorMode(TRUE, CE_HOME);
718 frameCETitle->ShowModal();
723 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
725 long longSelected = -1;
726 int intSelectedData = 0;
728 if (!GetSelectedItem(lboHomeTitles,
734 lboHomeTitles->DeleteItem(longSelected);
736 DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
737 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
738 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
739 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
743 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
747 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
748 frameCERole->SetEditorMode(FALSE, CE_HOME);
749 intResult = GetLastInt(&ContactEditorData.HomeRoleList);
750 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
751 &ContactEditorData.HomeRoleListLanguage,
752 &ContactEditorData.HomeRoleListAltID,
753 &ContactEditorData.HomeRoleListPID,
754 &ContactEditorData.HomeRoleListType,
755 &ContactEditorData.HomeRoleListTokens,
756 &ContactEditorData.HomeRoleListPref,
759 frameCERole->ShowModal();
764 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
766 long longSelected = -1;
767 int intSelectedData = 0;
769 if (!GetSelectedItem(lboHomeRoles,
775 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
776 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
777 &ContactEditorData.HomeRoleListLanguage,
778 &ContactEditorData.HomeRoleListAltID,
779 &ContactEditorData.HomeRoleListPID,
780 &ContactEditorData.HomeRoleListType,
781 &ContactEditorData.HomeRoleListTokens,
782 &ContactEditorData.HomeRoleListPref,
785 frameCERole->SetEditorMode(TRUE, CE_HOME);
786 frameCERole->ShowModal();
791 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
793 long longSelected = -1;
794 int intSelectedData = 0;
796 if (!GetSelectedItem(lboHomeRoles,
802 lboHomeRoles->DeleteItem(longSelected);
804 DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
805 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
806 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
807 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
811 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
815 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
816 frameCEOrg->SetEditorMode(FALSE, CE_HOME);
817 intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
818 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
819 &ContactEditorData.HomeOrganisationsListLanguage,
820 &ContactEditorData.HomeOrganisationsListSortAs,
821 &ContactEditorData.HomeOrganisationsListAltID,
822 &ContactEditorData.HomeOrganisationsListPID,
823 &ContactEditorData.HomeOrganisationsListType,
824 &ContactEditorData.HomeOrganisationsListTokens,
825 &ContactEditorData.HomeOrganisationsListPref,
826 lboHomeOrganisations,
828 frameCEOrg->ShowModal();
833 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
835 long longSelected = -1;
836 int intSelectedData = 0;
838 if (!GetSelectedItem(lboHomeOrganisations,
844 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
845 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
846 &ContactEditorData.HomeOrganisationsListLanguage,
847 &ContactEditorData.HomeOrganisationsListSortAs,
848 &ContactEditorData.HomeOrganisationsListAltID,
849 &ContactEditorData.HomeOrganisationsListPID,
850 &ContactEditorData.HomeOrganisationsListType,
851 &ContactEditorData.HomeOrganisationsListTokens,
852 &ContactEditorData.HomeOrganisationsListPref,
853 lboHomeOrganisations,
855 frameCEOrg->SetEditorMode(TRUE, CE_HOME);
856 frameCEOrg->ShowModal();
861 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
863 long longSelected = -1;
864 int intSelectedData = 0;
866 if (!GetSelectedItem(lboHomeOrganisations,
872 lboHomeOrganisations->DeleteItem(longSelected);
874 DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
875 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
876 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
877 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
878 &ContactEditorData.HomeOrganisationsListPref);
882 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
886 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
887 frameCENote->SetEditorMode(FALSE, CE_HOME);
888 intResult = GetLastInt(&ContactEditorData.HomeNoteList);
889 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
890 &ContactEditorData.HomeNoteListLanguage,
891 &ContactEditorData.HomeNoteListAltID,
892 &ContactEditorData.HomeNoteListPID,
893 &ContactEditorData.HomeNoteListType,
894 &ContactEditorData.HomeNoteListTokens,
895 &ContactEditorData.HomeNoteListPref,
898 frameCENote->ShowModal();
903 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
905 long longSelected = -1;
906 int intSelectedData = 0;
908 if (!GetSelectedItem(lboHomeNotes,
914 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
915 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
916 &ContactEditorData.HomeNoteListLanguage,
917 &ContactEditorData.HomeNoteListAltID,
918 &ContactEditorData.HomeNoteListPID,
919 &ContactEditorData.HomeNoteListType,
920 &ContactEditorData.HomeNoteListTokens,
921 &ContactEditorData.HomeNoteListPref,
924 frameCENote->SetEditorMode(TRUE, CE_HOME);
925 frameCENote->ShowModal();
930 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
932 long longSelected = -1;
933 int intSelectedData = 0;
935 if (!GetSelectedItem(lboHomeNotes,
941 lboNotes->DeleteItem(longSelected);
943 DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
944 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
945 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
946 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);