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 )
39 // Bring up window to add nickname.
41 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42 frameCENickname->SetEditorMode(FALSE, CE_HOME);
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;
58 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
61 // Bring up window to modify nickname.
63 long longSelected = -1;
64 int intSelectedData = 0;
66 if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
72 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
73 frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
74 &ContactEditorData.HomeNicknamesListAltID,
75 &ContactEditorData.HomeNicknamesListPID,
76 &ContactEditorData.HomeNicknamesListType,
77 &ContactEditorData.HomeNicknamesListLanguage,
78 &ContactEditorData.HomeNicknamesListTokens,
79 &ContactEditorData.HomeNicknamesListPref,
82 frameCENickname->SetEditorMode(TRUE, CE_HOME);
83 frameCENickname->ShowModal();
84 delete frameCENickname;
85 frameCENickname = NULL;
89 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
92 // Bring up window to delete nickname.
94 long longSelected = -1;
95 int intSelectedData = 0;
97 if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
103 lboHomeNicknames->DeleteItem(longSelected);
105 DeleteMapData(intSelectedData,
106 &ContactEditorData.HomeNicknamesList,
107 &ContactEditorData.HomeNicknamesListLanguage,
108 &ContactEditorData.HomeNicknamesListAltID,
109 &ContactEditorData.HomeNicknamesListPID,
110 &ContactEditorData.HomeNicknamesListTokens,
111 &ContactEditorData.HomeNicknamesListType,
112 &ContactEditorData.HomeNicknamesListPref);
116 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
119 // Bring up window to add address.
121 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
122 frameCEAddress->SetEditorMode(FALSE, CE_HOME);
123 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
124 &ContactEditorData.HomeAddressListTown,
125 &ContactEditorData.HomeAddressListCounty,
126 &ContactEditorData.HomeAddressListPostCode,
127 &ContactEditorData.HomeAddressListCountry,
128 &ContactEditorData.HomeAddressListLabel,
129 &ContactEditorData.HomeAddressListLang,
130 &ContactEditorData.HomeAddressListAltID,
131 &ContactEditorData.HomeAddressListPID,
132 &ContactEditorData.HomeAddressListTokens,
133 &ContactEditorData.HomeAddressListGeo,
134 &ContactEditorData.HomeAddressListTimezone,
135 &ContactEditorData.HomeAddressListType,
136 &ContactEditorData.HomeAddressListMediatype,
137 &ContactEditorData.HomeAddressListPref,
140 frameCEAddress->ShowModal();
141 delete frameCEAddress;
142 frameCEAddress = NULL;
146 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
149 // Bring up window to modify address.
151 long longSelected = -1;
152 int intSelectedData = 0;
154 if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
160 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
161 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
162 &ContactEditorData.HomeAddressListTown,
163 &ContactEditorData.HomeAddressListCounty,
164 &ContactEditorData.HomeAddressListPostCode,
165 &ContactEditorData.HomeAddressListCountry,
166 &ContactEditorData.HomeAddressListLabel,
167 &ContactEditorData.HomeAddressListLang,
168 &ContactEditorData.HomeAddressListAltID,
169 &ContactEditorData.HomeAddressListPID,
170 &ContactEditorData.HomeAddressListTokens,
171 &ContactEditorData.HomeAddressListGeo,
172 &ContactEditorData.HomeAddressListTimezone,
173 &ContactEditorData.HomeAddressListType,
174 &ContactEditorData.HomeAddressListMediatype,
175 &ContactEditorData.HomeAddressListPref,
178 frameCEAddress->SetEditorMode(TRUE, CE_HOME);
179 frameCEAddress->ShowModal();
180 delete frameCEAddress;
181 frameCEAddress = NULL;
185 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
188 // Bring up window to delete address.
190 long longSelected = -1;
191 int intSelectedData = 0;
193 if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
199 lboHomeAddresses->DeleteItem(longSelected);
201 DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
202 &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
203 &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
204 &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
205 &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
206 &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
207 &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
208 &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
209 &ContactEditorData.HomeAddressListPref);
213 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
216 // Bring up window to add email.
218 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
219 frameCEEmail->SetEditorMode(FALSE, CE_HOME);
220 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
221 &ContactEditorData.HomeEmailListAltID,
222 &ContactEditorData.HomeEmailListPID,
223 &ContactEditorData.HomeEmailListType,
224 &ContactEditorData.HomeEmailListTokens,
225 &ContactEditorData.HomeEmailListPref,
228 frameCEEmail->ShowModal();
234 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
237 // Bring up window to modify email.
239 long longSelected = -1;
240 int intSelectedData = 0;
242 if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
248 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
249 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
250 &ContactEditorData.HomeEmailListAltID,
251 &ContactEditorData.HomeEmailListPID,
252 &ContactEditorData.HomeEmailListType,
253 &ContactEditorData.HomeEmailListTokens,
254 &ContactEditorData.HomeEmailListPref,
257 frameCEEmail->SetEditorMode(TRUE, CE_HOME);
258 frameCEEmail->ShowModal();
265 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
268 // Bring up window to delete email.
270 long longSelected = -1;
271 int intSelectedData = 0;
273 if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
279 lboHomeEmails->DeleteItem(longSelected);
281 DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
282 &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
283 &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
284 &ContactEditorData.HomeEmailListPref);
289 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
292 // Bring up window to add IM.
294 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
295 frameCEIM->SetEditorMode(FALSE, CE_HOME);
296 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
297 &ContactEditorData.HomeIMListAltID,
298 &ContactEditorData.HomeIMListPID,
299 &ContactEditorData.HomeIMListType,
300 &ContactEditorData.HomeIMListTypeInfo,
301 &ContactEditorData.HomeIMListTokens,
302 &ContactEditorData.HomeIMListMediatype,
303 &ContactEditorData.HomeIMListPref,
306 frameCEIM->ShowModal();
312 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
315 // Bring up window to modify IM.
317 long longSelected = -1;
318 int intSelectedData = 0;
320 if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
326 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
327 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
328 &ContactEditorData.HomeIMListAltID,
329 &ContactEditorData.HomeIMListPID,
330 &ContactEditorData.HomeIMListType,
331 &ContactEditorData.HomeIMListTypeInfo,
332 &ContactEditorData.HomeIMListTokens,
333 &ContactEditorData.HomeIMListMediatype,
334 &ContactEditorData.HomeIMListPref,
337 frameCEIM->SetEditorMode(TRUE, CE_HOME);
338 frameCEIM->ShowModal();
344 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
347 // Bring up window to delete IM.
349 long longSelected = -1;
350 int intSelectedData = 0;
352 if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
358 lboHomeIM->DeleteItem(longSelected);
360 DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
361 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
362 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
363 &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype,
364 &ContactEditorData.HomeIMListPref);
368 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
371 // Bring up window to add telephone.
373 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
374 frameCETel->SetEditorMode(FALSE, CE_HOME);
375 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
376 &ContactEditorData.HomeTelephoneListAltID,
377 &ContactEditorData.HomeTelephoneListPID,
378 &ContactEditorData.HomeTelephoneListType,
379 &ContactEditorData.HomeTelephoneListTypeInfo,
380 &ContactEditorData.HomeTelephoneListTokens,
381 &ContactEditorData.HomeTelephoneListPref,
384 frameCETel->ShowModal();
390 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
393 // Bring up window to modify telephone.
395 long longSelected = -1;
396 int intSelectedData = 0;
398 if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
404 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
405 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
406 &ContactEditorData.HomeTelephoneListAltID,
407 &ContactEditorData.HomeTelephoneListPID,
408 &ContactEditorData.HomeTelephoneListType,
409 &ContactEditorData.HomeTelephoneListTypeInfo,
410 &ContactEditorData.HomeTelephoneListTokens,
411 &ContactEditorData.HomeTelephoneListPref,
414 frameCETel->SetEditorMode(TRUE, CE_HOME);
415 frameCETel->ShowModal();
421 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
424 // Bring up window to delete telephone.
426 long longSelected = -1;
427 int intSelectedData = 0;
429 if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
435 lboHomeTelephone->DeleteItem(longSelected);
437 DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
438 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
439 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
440 &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
444 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
447 // Bring up window to add language.
449 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
450 frameCELang->SetEditorMode(FALSE, CE_HOME);
451 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
452 &ContactEditorData.HomeLanguageListAltID,
453 &ContactEditorData.HomeLanguageListPID,
454 &ContactEditorData.HomeLanguageListType,
455 &ContactEditorData.HomeLanguageListTokens,
456 &ContactEditorData.HomeLanguageListPref,
459 frameCELang->ShowModal();
465 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
468 // Bring up window to modify language.
470 long longSelected = -1;
471 int intSelectedData = 0;
473 if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
479 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
480 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
481 &ContactEditorData.HomeLanguageListAltID,
482 &ContactEditorData.HomeLanguageListPID,
483 &ContactEditorData.HomeLanguageListType,
484 &ContactEditorData.HomeLanguageListTokens,
485 &ContactEditorData.HomeLanguageListPref,
488 frameCELang->SetEditorMode(TRUE, CE_HOME);
489 frameCELang->ShowModal();
495 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
498 // Bring up window to delete language.
500 long longSelected = -1;
501 int intSelectedData = 0;
503 if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
509 lboHomeLanguages->DeleteItem(longSelected);
511 DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
512 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
513 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
514 &ContactEditorData.HomeLanguageListPref);
518 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
521 // Bring up window to add timezone.
523 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
524 frameCETZ->SetEditorMode(FALSE, CE_HOME);
525 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
526 &ContactEditorData.HomeTZListAltID,
527 &ContactEditorData.HomeTZListPID,
528 &ContactEditorData.HomeTZListType,
529 &ContactEditorData.HomeTZListTokens,
530 &ContactEditorData.HomeTZListMediatype,
531 &ContactEditorData.HomeTZListPref,
534 frameCETZ->ShowModal();
540 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
543 // Bring up window to modify timezone.
545 long longSelected = -1;
546 int intSelectedData = 0;
548 if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
554 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
555 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
556 &ContactEditorData.HomeTZListAltID,
557 &ContactEditorData.HomeTZListPID,
558 &ContactEditorData.HomeTZListType,
559 &ContactEditorData.HomeTZListTokens,
560 &ContactEditorData.HomeTZListMediatype,
561 &ContactEditorData.HomeTZListPref,
564 frameCETZ->SetEditorMode(TRUE, CE_HOME);
565 frameCETZ->ShowModal();
571 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
574 // Bring up window to delete timezone.
576 long longSelected = -1;
577 int intSelectedData = 0;
579 if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
585 lboHomeTimezones->DeleteItem(longSelected);
587 DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
588 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
589 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
590 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
594 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
597 // Bring up window to add geoposition.
599 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
600 frameCEGeo->SetEditorMode(FALSE, CE_HOME);
601 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
602 &ContactEditorData.HomeGeographyListAltID,
603 &ContactEditorData.HomeGeographyListPID,
604 &ContactEditorData.HomeGeographyListType,
605 &ContactEditorData.HomeGeographyListDataType,
606 &ContactEditorData.HomeGeographyListTokens,
607 &ContactEditorData.HomeGeographyListMediatype,
608 &ContactEditorData.HomeGeographyListPref,
611 frameCEGeo->ShowModal();
617 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
620 // Bring up window to modify geoposition.
622 long longSelected = -1;
623 int intSelectedData = 0;
625 if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
631 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
632 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
633 &ContactEditorData.HomeGeographyListAltID,
634 &ContactEditorData.HomeGeographyListPID,
635 &ContactEditorData.HomeGeographyListType,
636 &ContactEditorData.HomeGeographyListDataType,
637 &ContactEditorData.HomeGeographyListTokens,
638 &ContactEditorData.HomeGeographyListMediatype,
639 &ContactEditorData.HomeGeographyListPref,
642 frameCEGeo->SetEditorMode(TRUE, CE_HOME);
643 frameCEGeo->ShowModal();
649 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
652 // Bring up window to delete geoposition.
654 long longSelected = -1;
655 int intSelectedData = 0;
657 if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
663 lboHomeGeoposition->DeleteItem(longSelected);
665 DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
666 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
667 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
668 &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype,
669 &ContactEditorData.HomeGeographyListPref);
673 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
676 // Bring up window to add website.
678 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
679 frameCEWeb->SetEditorMode(FALSE, CE_HOME);
680 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
681 &ContactEditorData.HomeWebsiteListAltID,
682 &ContactEditorData.HomeWebsiteListPID,
683 &ContactEditorData.HomeWebsiteListType,
684 &ContactEditorData.HomeWebsiteListTokens,
685 &ContactEditorData.HomeWebsiteListMediatype,
686 &ContactEditorData.HomeWebsiteListPref,
689 frameCEWeb->ShowModal();
695 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
698 // Bring up window to modify website.
700 long longSelected = -1;
701 int intSelectedData = 0;
703 if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
709 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
710 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
711 &ContactEditorData.HomeWebsiteListAltID,
712 &ContactEditorData.HomeWebsiteListPID,
713 &ContactEditorData.HomeWebsiteListType,
714 &ContactEditorData.HomeWebsiteListTokens,
715 &ContactEditorData.HomeWebsiteListMediatype,
716 &ContactEditorData.HomeWebsiteListPref,
719 frameCEWeb->SetEditorMode(TRUE, CE_HOME);
720 frameCEWeb->ShowModal();
726 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
729 // Bring up window to delete website.
731 long longSelected = -1;
732 int intSelectedData = 0;
734 if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
740 lboHomeWebsites->DeleteItem(longSelected);
742 DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
743 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
744 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
745 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
749 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
752 // Bring up window to add title.
754 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
755 frameCETitle->SetEditorMode(FALSE, CE_HOME);
756 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
757 &ContactEditorData.HomeTitleListLanguage,
758 &ContactEditorData.HomeTitleListAltID,
759 &ContactEditorData.HomeTitleListPID,
760 &ContactEditorData.HomeTitleListType,
761 &ContactEditorData.HomeTitleListTokens,
762 &ContactEditorData.HomeTitleListPref,
765 frameCETitle->ShowModal();
771 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
774 // Bring up window to modify title.
776 long longSelected = -1;
777 int intSelectedData = 0;
779 if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
785 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
786 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
787 &ContactEditorData.HomeTitleListLanguage,
788 &ContactEditorData.HomeTitleListAltID,
789 &ContactEditorData.HomeTitleListPID,
790 &ContactEditorData.HomeTitleListType,
791 &ContactEditorData.HomeTitleListTokens,
792 &ContactEditorData.HomeTitleListPref,
795 frameCETitle->SetEditorMode(TRUE, CE_HOME);
796 frameCETitle->ShowModal();
802 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
805 // Bring up window to delete title.
807 long longSelected = -1;
808 int intSelectedData = 0;
810 if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
816 lboHomeTitles->DeleteItem(longSelected);
818 DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
819 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
820 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
821 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
825 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
828 // Bring up window to add role.
830 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
831 frameCERole->SetEditorMode(FALSE, CE_HOME);
832 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
833 &ContactEditorData.HomeRoleListLanguage,
834 &ContactEditorData.HomeRoleListAltID,
835 &ContactEditorData.HomeRoleListPID,
836 &ContactEditorData.HomeRoleListType,
837 &ContactEditorData.HomeRoleListTokens,
838 &ContactEditorData.HomeRoleListPref,
841 frameCERole->ShowModal();
847 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
850 // Bring up window to modify role.
852 long longSelected = -1;
853 int intSelectedData = 0;
855 if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
861 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
862 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
863 &ContactEditorData.HomeRoleListLanguage,
864 &ContactEditorData.HomeRoleListAltID,
865 &ContactEditorData.HomeRoleListPID,
866 &ContactEditorData.HomeRoleListType,
867 &ContactEditorData.HomeRoleListTokens,
868 &ContactEditorData.HomeRoleListPref,
871 frameCERole->SetEditorMode(TRUE, CE_HOME);
872 frameCERole->ShowModal();
878 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
881 // Bring up window to delete role.
883 long longSelected = -1;
884 int intSelectedData = 0;
886 if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
892 lboHomeRoles->DeleteItem(longSelected);
894 DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
895 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
896 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
897 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
901 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
904 // Bring up window to add organisation.
906 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
907 frameCEOrg->SetEditorMode(FALSE, CE_HOME);
908 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
909 &ContactEditorData.HomeOrganisationsListLanguage,
910 &ContactEditorData.HomeOrganisationsListSortAs,
911 &ContactEditorData.HomeOrganisationsListAltID,
912 &ContactEditorData.HomeOrganisationsListPID,
913 &ContactEditorData.HomeOrganisationsListType,
914 &ContactEditorData.HomeOrganisationsListTokens,
915 &ContactEditorData.HomeOrganisationsListPref,
916 lboHomeOrganisations,
918 frameCEOrg->ShowModal();
924 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
927 // Bring up window to modify organisation.
929 long longSelected = -1;
930 int intSelectedData = 0;
932 if (lboHomeOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboHomeOrganisations,
938 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
939 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
940 &ContactEditorData.HomeOrganisationsListLanguage,
941 &ContactEditorData.HomeOrganisationsListSortAs,
942 &ContactEditorData.HomeOrganisationsListAltID,
943 &ContactEditorData.HomeOrganisationsListPID,
944 &ContactEditorData.HomeOrganisationsListType,
945 &ContactEditorData.HomeOrganisationsListTokens,
946 &ContactEditorData.HomeOrganisationsListPref,
947 lboHomeOrganisations,
949 frameCEOrg->SetEditorMode(TRUE, CE_HOME);
950 frameCEOrg->ShowModal();
956 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
959 // Bring up window to delete organisation.
961 long longSelected = -1;
962 int intSelectedData = 0;
964 if (lboHomeOrganisations->GetItemCount() == 0 ||!GetSelectedItem(lboHomeOrganisations,
970 lboHomeOrganisations->DeleteItem(longSelected);
972 DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
973 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
974 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
975 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
976 &ContactEditorData.HomeOrganisationsListPref);
980 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
983 // Bring up window to add note.
985 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
986 frameCENote->SetEditorMode(FALSE, CE_HOME);
987 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
988 &ContactEditorData.HomeNoteListLanguage,
989 &ContactEditorData.HomeNoteListAltID,
990 &ContactEditorData.HomeNoteListPID,
991 &ContactEditorData.HomeNoteListType,
992 &ContactEditorData.HomeNoteListTokens,
993 &ContactEditorData.HomeNoteListPref,
996 frameCENote->ShowModal();
1002 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
1005 // Bring up window to modify note.
1007 long longSelected = -1;
1008 int intSelectedData = 0;
1010 if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1016 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1017 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1018 &ContactEditorData.HomeNoteListLanguage,
1019 &ContactEditorData.HomeNoteListAltID,
1020 &ContactEditorData.HomeNoteListPID,
1021 &ContactEditorData.HomeNoteListType,
1022 &ContactEditorData.HomeNoteListTokens,
1023 &ContactEditorData.HomeNoteListPref,
1026 frameCENote->SetEditorMode(TRUE, CE_HOME);
1027 frameCENote->ShowModal();
1033 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
1036 // Bring up window to delete note.
1038 long longSelected = -1;
1039 int intSelectedData = 0;
1041 if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1047 lboHomeNotes->DeleteItem(longSelected);
1049 DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
1050 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
1051 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
1052 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);