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 )
41 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42 frameCENickname->SetEditorMode(FALSE, CE_HOME);
43 intResult = GetLastInt(&ContactEditorData.HomeNicknamesList);
44 frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
45 &ContactEditorData.HomeNicknamesListAltID,
46 &ContactEditorData.HomeNicknamesListPID,
47 &ContactEditorData.HomeNicknamesListType,
48 &ContactEditorData.HomeNicknamesListLanguage,
49 &ContactEditorData.HomeNicknamesListTokens,
50 &ContactEditorData.HomeNicknamesListPref,
53 frameCENickname->ShowModal();
54 delete frameCENickname;
55 frameCENickname = NULL;
59 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
62 long longSelected = -1;
63 int intSelectedData = 0;
65 if (!GetSelectedItem(lboHomeNicknames,
71 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
72 frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
73 &ContactEditorData.HomeNicknamesListAltID,
74 &ContactEditorData.HomeNicknamesListPID,
75 &ContactEditorData.HomeNicknamesListType,
76 &ContactEditorData.HomeNicknamesListLanguage,
77 &ContactEditorData.HomeNicknamesListTokens,
78 &ContactEditorData.HomeNicknamesListPref,
81 frameCENickname->SetEditorMode(TRUE, CE_HOME);
82 frameCENickname->ShowModal();
83 delete frameCENickname;
84 frameCENickname = NULL;
88 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
91 long longSelected = -1;
92 int intSelectedData = 0;
94 if (!GetSelectedItem(lboHomeNicknames,
100 lboHomeNicknames->DeleteItem(longSelected);
102 DeleteMapData(intSelectedData,
103 &ContactEditorData.HomeNicknamesList,
104 &ContactEditorData.HomeNicknamesListLanguage,
105 &ContactEditorData.HomeNicknamesListAltID,
106 &ContactEditorData.HomeNicknamesListPID,
107 &ContactEditorData.HomeNicknamesListTokens,
108 &ContactEditorData.HomeNicknamesListType,
109 &ContactEditorData.HomeNicknamesListPref);
113 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
118 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
119 frameCEAddress->SetEditorMode(FALSE, CE_HOME);
120 intResult = GetLastInt(&ContactEditorData.HomeAddressList);
121 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
122 &ContactEditorData.HomeAddressListTown,
123 &ContactEditorData.HomeAddressListCounty,
124 &ContactEditorData.HomeAddressListPostCode,
125 &ContactEditorData.HomeAddressListCountry,
126 &ContactEditorData.HomeAddressListLabel,
127 &ContactEditorData.HomeAddressListLang,
128 &ContactEditorData.HomeAddressListAltID,
129 &ContactEditorData.HomeAddressListPID,
130 &ContactEditorData.HomeAddressListTokens,
131 &ContactEditorData.HomeAddressListGeo,
132 &ContactEditorData.HomeAddressListTimezone,
133 &ContactEditorData.HomeAddressListType,
134 &ContactEditorData.HomeAddressListMediatype,
135 &ContactEditorData.HomeAddressListPref,
138 frameCEAddress->ShowModal();
139 delete frameCEAddress;
140 frameCEAddress = NULL;
144 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
147 long longSelected = -1;
148 int intSelectedData = 0;
150 if (!GetSelectedItem(lboHomeAddresses,
156 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
157 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
158 &ContactEditorData.HomeAddressListTown,
159 &ContactEditorData.HomeAddressListCounty,
160 &ContactEditorData.HomeAddressListPostCode,
161 &ContactEditorData.HomeAddressListCountry,
162 &ContactEditorData.HomeAddressListLabel,
163 &ContactEditorData.HomeAddressListLang,
164 &ContactEditorData.HomeAddressListAltID,
165 &ContactEditorData.HomeAddressListPID,
166 &ContactEditorData.HomeAddressListTokens,
167 &ContactEditorData.HomeAddressListGeo,
168 &ContactEditorData.HomeAddressListTimezone,
169 &ContactEditorData.HomeAddressListType,
170 &ContactEditorData.HomeAddressListMediatype,
171 &ContactEditorData.HomeAddressListPref,
174 frameCEAddress->SetEditorMode(TRUE, CE_HOME);
175 frameCEAddress->ShowModal();
176 delete frameCEAddress;
177 frameCEAddress = NULL;
181 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
184 long longSelected = -1;
185 int intSelectedData = 0;
187 if (!GetSelectedItem(lboHomeAddresses,
193 lboHomeAddresses->DeleteItem(longSelected);
195 DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
196 &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
197 &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
198 &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
199 &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
200 &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
201 &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
202 &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
203 &ContactEditorData.HomeAddressListPref);
207 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
212 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
213 frameCEEmail->SetEditorMode(FALSE, CE_HOME);
214 intResult = GetLastInt(&ContactEditorData.HomeAddressList);
215 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
216 &ContactEditorData.HomeEmailListAltID,
217 &ContactEditorData.HomeEmailListPID,
218 &ContactEditorData.HomeEmailListType,
219 &ContactEditorData.HomeEmailListTokens,
220 &ContactEditorData.HomeEmailListPref,
223 frameCEEmail->ShowModal();
229 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
232 long longSelected = -1;
233 int intSelectedData = 0;
235 if (!GetSelectedItem(lboHomeEmails,
241 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
242 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
243 &ContactEditorData.HomeEmailListAltID,
244 &ContactEditorData.HomeEmailListPID,
245 &ContactEditorData.HomeEmailListType,
246 &ContactEditorData.HomeEmailListTokens,
247 &ContactEditorData.HomeEmailListPref,
250 frameCEEmail->SetEditorMode(TRUE, CE_HOME);
251 frameCEEmail->ShowModal();
258 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
261 long longSelected = -1;
262 int intSelectedData = 0;
264 if (!GetSelectedItem(lboHomeEmails,
270 lboHomeEmails->DeleteItem(longSelected);
272 DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
273 &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
274 &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
275 &ContactEditorData.HomeEmailListPref);
280 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
285 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
286 frameCEIM->SetEditorMode(FALSE, CE_HOME);
287 intResult = GetLastInt(&ContactEditorData.HomeIMList);
288 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
289 &ContactEditorData.HomeIMListAltID,
290 &ContactEditorData.HomeIMListPID,
291 &ContactEditorData.HomeIMListType,
292 &ContactEditorData.HomeIMListTypeInfo,
293 &ContactEditorData.HomeIMListTokens,
294 &ContactEditorData.HomeIMListMediatype,
295 &ContactEditorData.HomeIMListPref,
298 frameCEIM->ShowModal();
304 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
307 long longSelected = -1;
308 int intSelectedData = 0;
310 if (!GetSelectedItem(lboHomeIM,
316 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
317 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
318 &ContactEditorData.HomeIMListAltID,
319 &ContactEditorData.HomeIMListPID,
320 &ContactEditorData.HomeIMListType,
321 &ContactEditorData.HomeIMListTypeInfo,
322 &ContactEditorData.HomeIMListTokens,
323 &ContactEditorData.HomeIMListMediatype,
324 &ContactEditorData.HomeIMListPref,
327 frameCEIM->SetEditorMode(TRUE, CE_HOME);
328 frameCEIM->ShowModal();
334 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
337 long longSelected = -1;
338 int intSelectedData = 0;
340 if (!GetSelectedItem(lboHomeIM,
346 lboHomeIM->DeleteItem(longSelected);
348 DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
349 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
350 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
351 &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype,
352 &ContactEditorData.HomeIMListPref);
356 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
361 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
362 frameCETel->SetEditorMode(FALSE, CE_HOME);
363 intResult = GetLastInt(&ContactEditorData.HomeTelephoneList);
364 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
365 &ContactEditorData.HomeTelephoneListAltID,
366 &ContactEditorData.HomeTelephoneListPID,
367 &ContactEditorData.HomeTelephoneListType,
368 &ContactEditorData.HomeTelephoneListTypeInfo,
369 &ContactEditorData.HomeTelephoneListTokens,
370 &ContactEditorData.HomeTelephoneListPref,
373 frameCETel->ShowModal();
379 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
382 long longSelected = -1;
383 int intSelectedData = 0;
385 if (!GetSelectedItem(lboHomeTelephone,
391 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
392 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
393 &ContactEditorData.HomeTelephoneListAltID,
394 &ContactEditorData.HomeTelephoneListPID,
395 &ContactEditorData.HomeTelephoneListType,
396 &ContactEditorData.HomeTelephoneListTypeInfo,
397 &ContactEditorData.HomeTelephoneListTokens,
398 &ContactEditorData.HomeTelephoneListPref,
401 frameCETel->SetEditorMode(TRUE, CE_HOME);
402 frameCETel->ShowModal();
408 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
411 long longSelected = -1;
412 int intSelectedData = 0;
414 if (!GetSelectedItem(lboHomeTelephone,
420 lboHomeTelephone->DeleteItem(longSelected);
422 DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
423 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
424 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
425 &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
429 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
433 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
434 frameCELang->SetEditorMode(FALSE, CE_HOME);
435 intResult = GetLastInt(&ContactEditorData.HomeLanguageList);
437 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
438 &ContactEditorData.HomeLanguageListAltID,
439 &ContactEditorData.HomeLanguageListPID,
440 &ContactEditorData.HomeLanguageListType,
441 &ContactEditorData.HomeLanguageListTokens,
442 &ContactEditorData.HomeLanguageListPref,
445 frameCELang->ShowModal();
451 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
454 long longSelected = -1;
455 int intSelectedData = 0;
457 if (!GetSelectedItem(lboHomeLanguages,
463 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
464 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
465 &ContactEditorData.HomeLanguageListAltID,
466 &ContactEditorData.HomeLanguageListPID,
467 &ContactEditorData.HomeLanguageListType,
468 &ContactEditorData.HomeLanguageListTokens,
469 &ContactEditorData.HomeLanguageListPref,
472 frameCELang->SetEditorMode(TRUE, CE_HOME);
473 frameCELang->ShowModal();
479 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
482 long longSelected = -1;
483 int intSelectedData = 0;
485 if (!GetSelectedItem(lboHomeLanguages,
491 lboHomeLanguages->DeleteItem(longSelected);
493 DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
494 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
495 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
496 &ContactEditorData.HomeLanguageListPref);
500 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
505 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
506 frameCETZ->SetEditorMode(FALSE, CE_HOME);
507 intResult = GetLastInt(&ContactEditorData.HomeTZList);
508 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
509 &ContactEditorData.HomeTZListAltID,
510 &ContactEditorData.HomeTZListPID,
511 &ContactEditorData.HomeTZListType,
512 &ContactEditorData.HomeTZListTokens,
513 &ContactEditorData.HomeTZListMediatype,
514 &ContactEditorData.HomeTZListPref,
517 frameCETZ->ShowModal();
523 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
526 long longSelected = -1;
527 int intSelectedData = 0;
529 if (!GetSelectedItem(lboHomeTimezones,
535 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
536 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
537 &ContactEditorData.HomeTZListAltID,
538 &ContactEditorData.HomeTZListPID,
539 &ContactEditorData.HomeTZListType,
540 &ContactEditorData.HomeTZListTokens,
541 &ContactEditorData.HomeTZListMediatype,
542 &ContactEditorData.HomeTZListPref,
545 frameCETZ->SetEditorMode(TRUE, CE_HOME);
546 frameCETZ->ShowModal();
552 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
554 long longSelected = -1;
555 int intSelectedData = 0;
557 if (!GetSelectedItem(lboHomeTimezones,
563 lboHomeTimezones->DeleteItem(longSelected);
565 DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
566 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
567 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
568 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
572 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
577 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
578 frameCEGeo->SetEditorMode(FALSE, CE_HOME);
579 intResult = GetLastInt(&ContactEditorData.HomeGeographyList);
580 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
581 &ContactEditorData.HomeGeographyListAltID,
582 &ContactEditorData.HomeGeographyListPID,
583 &ContactEditorData.HomeGeographyListType,
584 &ContactEditorData.HomeGeographyListDataType,
585 &ContactEditorData.HomeGeographyListTokens,
586 &ContactEditorData.HomeGeographyListMediatype,
587 &ContactEditorData.HomeGeographyListPref,
590 frameCEGeo->ShowModal();
596 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
599 long longSelected = -1;
600 int intSelectedData = 0;
602 if (!GetSelectedItem(lboHomeGeoposition,
608 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
609 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
610 &ContactEditorData.HomeGeographyListAltID,
611 &ContactEditorData.HomeGeographyListPID,
612 &ContactEditorData.HomeGeographyListType,
613 &ContactEditorData.HomeGeographyListDataType,
614 &ContactEditorData.HomeGeographyListTokens,
615 &ContactEditorData.HomeGeographyListMediatype,
616 &ContactEditorData.HomeGeographyListPref,
619 frameCEGeo->SetEditorMode(TRUE, CE_HOME);
620 frameCEGeo->ShowModal();
626 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
629 long longSelected = -1;
630 int intSelectedData = 0;
632 if (!GetSelectedItem(lboHomeGeoposition,
638 lboHomeGeoposition->DeleteItem(longSelected);
640 DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
641 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
642 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
643 &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype,
644 &ContactEditorData.HomeGeographyListPref);
648 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
653 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
654 frameCEWeb->SetEditorMode(FALSE, CE_HOME);
655 intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
656 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
657 &ContactEditorData.HomeWebsiteListAltID,
658 &ContactEditorData.HomeWebsiteListPID,
659 &ContactEditorData.HomeWebsiteListType,
660 &ContactEditorData.HomeWebsiteListTokens,
661 &ContactEditorData.HomeWebsiteListMediatype,
662 &ContactEditorData.HomeWebsiteListPref,
665 frameCEWeb->ShowModal();
671 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
674 long longSelected = -1;
675 int intSelectedData = 0;
677 if (!GetSelectedItem(lboHomeWebsites,
683 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
684 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
685 &ContactEditorData.HomeWebsiteListAltID,
686 &ContactEditorData.HomeWebsiteListPID,
687 &ContactEditorData.HomeWebsiteListType,
688 &ContactEditorData.HomeWebsiteListTokens,
689 &ContactEditorData.HomeWebsiteListMediatype,
690 &ContactEditorData.HomeWebsiteListPref,
693 frameCEWeb->SetEditorMode(TRUE, CE_HOME);
694 frameCEWeb->ShowModal();
700 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
703 long longSelected = -1;
704 int intSelectedData = 0;
706 if (!GetSelectedItem(lboHomeWebsites,
712 lboHomeWebsites->DeleteItem(longSelected);
714 DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
715 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
716 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
717 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
721 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
726 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
727 frameCETitle->SetEditorMode(FALSE, CE_HOME);
728 intResult = GetLastInt(&ContactEditorData.HomeTitleList);
729 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
730 &ContactEditorData.HomeTitleListLanguage,
731 &ContactEditorData.HomeTitleListAltID,
732 &ContactEditorData.HomeTitleListPID,
733 &ContactEditorData.HomeTitleListType,
734 &ContactEditorData.HomeTitleListTokens,
735 &ContactEditorData.HomeTitleListPref,
738 frameCETitle->ShowModal();
744 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
747 long longSelected = -1;
748 int intSelectedData = 0;
750 if (!GetSelectedItem(lboHomeTitles,
756 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
757 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
758 &ContactEditorData.HomeTitleListLanguage,
759 &ContactEditorData.HomeTitleListAltID,
760 &ContactEditorData.HomeTitleListPID,
761 &ContactEditorData.HomeTitleListType,
762 &ContactEditorData.HomeTitleListTokens,
763 &ContactEditorData.HomeTitleListPref,
766 frameCETitle->SetEditorMode(TRUE, CE_HOME);
767 frameCETitle->ShowModal();
773 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
776 long longSelected = -1;
777 int intSelectedData = 0;
779 if (!GetSelectedItem(lboHomeTitles,
785 lboHomeTitles->DeleteItem(longSelected);
787 DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
788 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
789 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
790 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
794 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
799 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
800 frameCERole->SetEditorMode(FALSE, CE_HOME);
801 intResult = GetLastInt(&ContactEditorData.HomeRoleList);
802 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
803 &ContactEditorData.HomeRoleListLanguage,
804 &ContactEditorData.HomeRoleListAltID,
805 &ContactEditorData.HomeRoleListPID,
806 &ContactEditorData.HomeRoleListType,
807 &ContactEditorData.HomeRoleListTokens,
808 &ContactEditorData.HomeRoleListPref,
811 frameCERole->ShowModal();
817 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
820 long longSelected = -1;
821 int intSelectedData = 0;
823 if (!GetSelectedItem(lboHomeRoles,
829 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
830 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
831 &ContactEditorData.HomeRoleListLanguage,
832 &ContactEditorData.HomeRoleListAltID,
833 &ContactEditorData.HomeRoleListPID,
834 &ContactEditorData.HomeRoleListType,
835 &ContactEditorData.HomeRoleListTokens,
836 &ContactEditorData.HomeRoleListPref,
839 frameCERole->SetEditorMode(TRUE, CE_HOME);
840 frameCERole->ShowModal();
846 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
849 long longSelected = -1;
850 int intSelectedData = 0;
852 if (!GetSelectedItem(lboHomeRoles,
858 lboHomeRoles->DeleteItem(longSelected);
860 DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
861 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
862 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
863 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
867 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
872 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
873 frameCEOrg->SetEditorMode(FALSE, CE_HOME);
874 intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
875 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
876 &ContactEditorData.HomeOrganisationsListLanguage,
877 &ContactEditorData.HomeOrganisationsListSortAs,
878 &ContactEditorData.HomeOrganisationsListAltID,
879 &ContactEditorData.HomeOrganisationsListPID,
880 &ContactEditorData.HomeOrganisationsListType,
881 &ContactEditorData.HomeOrganisationsListTokens,
882 &ContactEditorData.HomeOrganisationsListPref,
883 lboHomeOrganisations,
885 frameCEOrg->ShowModal();
891 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
894 long longSelected = -1;
895 int intSelectedData = 0;
897 if (!GetSelectedItem(lboHomeOrganisations,
903 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
904 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
905 &ContactEditorData.HomeOrganisationsListLanguage,
906 &ContactEditorData.HomeOrganisationsListSortAs,
907 &ContactEditorData.HomeOrganisationsListAltID,
908 &ContactEditorData.HomeOrganisationsListPID,
909 &ContactEditorData.HomeOrganisationsListType,
910 &ContactEditorData.HomeOrganisationsListTokens,
911 &ContactEditorData.HomeOrganisationsListPref,
912 lboHomeOrganisations,
914 frameCEOrg->SetEditorMode(TRUE, CE_HOME);
915 frameCEOrg->ShowModal();
921 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
924 long longSelected = -1;
925 int intSelectedData = 0;
927 if (!GetSelectedItem(lboHomeOrganisations,
933 lboHomeOrganisations->DeleteItem(longSelected);
935 DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
936 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
937 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
938 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
939 &ContactEditorData.HomeOrganisationsListPref);
943 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
948 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
949 frameCENote->SetEditorMode(FALSE, CE_HOME);
950 intResult = GetLastInt(&ContactEditorData.HomeNoteList);
951 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
952 &ContactEditorData.HomeNoteListLanguage,
953 &ContactEditorData.HomeNoteListAltID,
954 &ContactEditorData.HomeNoteListPID,
955 &ContactEditorData.HomeNoteListType,
956 &ContactEditorData.HomeNoteListTokens,
957 &ContactEditorData.HomeNoteListPref,
960 frameCENote->ShowModal();
966 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
969 long longSelected = -1;
970 int intSelectedData = 0;
972 if (!GetSelectedItem(lboHomeNotes,
978 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
979 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
980 &ContactEditorData.HomeNoteListLanguage,
981 &ContactEditorData.HomeNoteListAltID,
982 &ContactEditorData.HomeNoteListPID,
983 &ContactEditorData.HomeNoteListType,
984 &ContactEditorData.HomeNoteListTokens,
985 &ContactEditorData.HomeNoteListPref,
988 frameCENote->SetEditorMode(TRUE, CE_HOME);
989 frameCENote->ShowModal();
995 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
998 long longSelected = -1;
999 int intSelectedData = 0;
1001 if (!GetSelectedItem(lboHomeNotes,
1007 lboNotes->DeleteItem(longSelected);
1009 DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
1010 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
1011 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
1012 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);