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;
59 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
62 // Bring up window to modify nickname.
64 long longSelected = -1;
65 int intSelectedData = 0;
67 if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
73 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
74 frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
75 &ContactEditorData.HomeNicknamesListAltID,
76 &ContactEditorData.HomeNicknamesListPID,
77 &ContactEditorData.HomeNicknamesListType,
78 &ContactEditorData.HomeNicknamesListLanguage,
79 &ContactEditorData.HomeNicknamesListTokens,
80 &ContactEditorData.HomeNicknamesListPref,
83 frameCENickname->SetEditorMode(TRUE, CE_HOME);
84 frameCENickname->ShowModal();
85 delete frameCENickname;
86 frameCENickname = NULL;
90 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
93 // Bring up window to delete nickname.
95 long longSelected = -1;
96 int intSelectedData = 0;
98 if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
104 lboHomeNicknames->DeleteItem(longSelected);
106 DeleteMapData(intSelectedData,
107 &ContactEditorData.HomeNicknamesList,
108 &ContactEditorData.HomeNicknamesListLanguage,
109 &ContactEditorData.HomeNicknamesListAltID,
110 &ContactEditorData.HomeNicknamesListPID,
111 &ContactEditorData.HomeNicknamesListTokens,
112 &ContactEditorData.HomeNicknamesListType,
113 &ContactEditorData.HomeNicknamesListPref);
117 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
120 // Bring up window to add address.
122 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
123 frameCEAddress->SetEditorMode(FALSE, CE_HOME);
124 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
125 &ContactEditorData.HomeAddressListTown,
126 &ContactEditorData.HomeAddressListCounty,
127 &ContactEditorData.HomeAddressListPostCode,
128 &ContactEditorData.HomeAddressListCountry,
129 &ContactEditorData.HomeAddressListLabel,
130 &ContactEditorData.HomeAddressListLang,
131 &ContactEditorData.HomeAddressListAltID,
132 &ContactEditorData.HomeAddressListPID,
133 &ContactEditorData.HomeAddressListTokens,
134 &ContactEditorData.HomeAddressListGeo,
135 &ContactEditorData.HomeAddressListTimezone,
136 &ContactEditorData.HomeAddressListType,
137 &ContactEditorData.HomeAddressListMediatype,
138 &ContactEditorData.HomeAddressListPref,
141 frameCEAddress->ShowModal();
142 delete frameCEAddress;
143 frameCEAddress = NULL;
148 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
151 // Bring up window to modify address.
153 long longSelected = -1;
154 int intSelectedData = 0;
156 if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
162 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
163 frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
164 &ContactEditorData.HomeAddressListTown,
165 &ContactEditorData.HomeAddressListCounty,
166 &ContactEditorData.HomeAddressListPostCode,
167 &ContactEditorData.HomeAddressListCountry,
168 &ContactEditorData.HomeAddressListLabel,
169 &ContactEditorData.HomeAddressListLang,
170 &ContactEditorData.HomeAddressListAltID,
171 &ContactEditorData.HomeAddressListPID,
172 &ContactEditorData.HomeAddressListTokens,
173 &ContactEditorData.HomeAddressListGeo,
174 &ContactEditorData.HomeAddressListTimezone,
175 &ContactEditorData.HomeAddressListType,
176 &ContactEditorData.HomeAddressListMediatype,
177 &ContactEditorData.HomeAddressListPref,
180 frameCEAddress->SetEditorMode(TRUE, CE_HOME);
181 frameCEAddress->ShowModal();
182 delete frameCEAddress;
183 frameCEAddress = NULL;
187 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
190 // Bring up window to delete address.
192 long longSelected = -1;
193 int intSelectedData = 0;
195 if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
201 lboHomeAddresses->DeleteItem(longSelected);
203 DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
204 &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
205 &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
206 &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
207 &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
208 &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
209 &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
210 &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
211 &ContactEditorData.HomeAddressListPref);
215 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
218 // Bring up window to add email.
220 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
221 frameCEEmail->SetEditorMode(FALSE, CE_HOME);
222 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
223 &ContactEditorData.HomeEmailListAltID,
224 &ContactEditorData.HomeEmailListPID,
225 &ContactEditorData.HomeEmailListType,
226 &ContactEditorData.HomeEmailListTokens,
227 &ContactEditorData.HomeEmailListPref,
230 frameCEEmail->ShowModal();
237 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
240 // Bring up window to modify email.
242 long longSelected = -1;
243 int intSelectedData = 0;
245 if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
251 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
252 frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
253 &ContactEditorData.HomeEmailListAltID,
254 &ContactEditorData.HomeEmailListPID,
255 &ContactEditorData.HomeEmailListType,
256 &ContactEditorData.HomeEmailListTokens,
257 &ContactEditorData.HomeEmailListPref,
260 frameCEEmail->SetEditorMode(TRUE, CE_HOME);
261 frameCEEmail->ShowModal();
268 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
271 // Bring up window to delete email.
273 long longSelected = -1;
274 int intSelectedData = 0;
276 if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
282 lboHomeEmails->DeleteItem(longSelected);
284 DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
285 &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
286 &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
287 &ContactEditorData.HomeEmailListPref);
292 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
295 // Bring up window to add IM.
297 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
298 frameCEIM->SetEditorMode(FALSE, CE_HOME);
299 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
300 &ContactEditorData.HomeIMListAltID,
301 &ContactEditorData.HomeIMListPID,
302 &ContactEditorData.HomeIMListType,
303 &ContactEditorData.HomeIMListTypeInfo,
304 &ContactEditorData.HomeIMListTokens,
305 &ContactEditorData.HomeIMListMediatype,
306 &ContactEditorData.HomeIMListPref,
309 frameCEIM->ShowModal();
316 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
319 // Bring up window to modify IM.
321 long longSelected = -1;
322 int intSelectedData = 0;
324 if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
330 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
331 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
332 &ContactEditorData.HomeIMListAltID,
333 &ContactEditorData.HomeIMListPID,
334 &ContactEditorData.HomeIMListType,
335 &ContactEditorData.HomeIMListTypeInfo,
336 &ContactEditorData.HomeIMListTokens,
337 &ContactEditorData.HomeIMListMediatype,
338 &ContactEditorData.HomeIMListPref,
341 frameCEIM->SetEditorMode(TRUE, CE_HOME);
342 frameCEIM->ShowModal();
348 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
351 // Bring up window to delete IM.
353 long longSelected = -1;
354 int intSelectedData = 0;
356 if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
362 lboHomeIM->DeleteItem(longSelected);
364 DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
365 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
366 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
367 &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype,
368 &ContactEditorData.HomeIMListPref);
372 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
375 // Bring up window to add telephone.
377 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
378 frameCETel->SetEditorMode(FALSE, CE_HOME);
379 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
380 &ContactEditorData.HomeTelephoneListAltID,
381 &ContactEditorData.HomeTelephoneListPID,
382 &ContactEditorData.HomeTelephoneListType,
383 &ContactEditorData.HomeTelephoneListTypeInfo,
384 &ContactEditorData.HomeTelephoneListTokens,
385 &ContactEditorData.HomeTelephoneListPref,
388 frameCETel->ShowModal();
395 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
398 // Bring up window to modify telephone.
400 long longSelected = -1;
401 int intSelectedData = 0;
403 if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
409 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
410 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
411 &ContactEditorData.HomeTelephoneListAltID,
412 &ContactEditorData.HomeTelephoneListPID,
413 &ContactEditorData.HomeTelephoneListType,
414 &ContactEditorData.HomeTelephoneListTypeInfo,
415 &ContactEditorData.HomeTelephoneListTokens,
416 &ContactEditorData.HomeTelephoneListPref,
419 frameCETel->SetEditorMode(TRUE, CE_HOME);
420 frameCETel->ShowModal();
426 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
429 // Bring up window to delete telephone.
431 long longSelected = -1;
432 int intSelectedData = 0;
434 if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
440 lboHomeTelephone->DeleteItem(longSelected);
442 DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
443 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
444 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
445 &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
449 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
452 // Bring up window to add language.
454 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
455 frameCELang->SetEditorMode(FALSE, CE_HOME);
456 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
457 &ContactEditorData.HomeLanguageListAltID,
458 &ContactEditorData.HomeLanguageListPID,
459 &ContactEditorData.HomeLanguageListType,
460 &ContactEditorData.HomeLanguageListTokens,
461 &ContactEditorData.HomeLanguageListPref,
464 frameCELang->ShowModal();
471 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
474 // Bring up window to modify language.
476 long longSelected = -1;
477 int intSelectedData = 0;
479 if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
485 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
486 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
487 &ContactEditorData.HomeLanguageListAltID,
488 &ContactEditorData.HomeLanguageListPID,
489 &ContactEditorData.HomeLanguageListType,
490 &ContactEditorData.HomeLanguageListTokens,
491 &ContactEditorData.HomeLanguageListPref,
494 frameCELang->SetEditorMode(TRUE, CE_HOME);
495 frameCELang->ShowModal();
501 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
504 // Bring up window to delete language.
506 long longSelected = -1;
507 int intSelectedData = 0;
509 if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
515 lboHomeLanguages->DeleteItem(longSelected);
517 DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
518 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
519 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
520 &ContactEditorData.HomeLanguageListPref);
524 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
527 // Bring up window to add timezone.
529 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
530 frameCETZ->SetEditorMode(FALSE, CE_HOME);
531 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
532 &ContactEditorData.HomeTZListAltID,
533 &ContactEditorData.HomeTZListPID,
534 &ContactEditorData.HomeTZListType,
535 &ContactEditorData.HomeTZListTokens,
536 &ContactEditorData.HomeTZListMediatype,
537 &ContactEditorData.HomeTZListPref,
540 frameCETZ->ShowModal();
547 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
550 // Bring up window to modify timezone.
552 long longSelected = -1;
553 int intSelectedData = 0;
555 if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
561 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
562 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
563 &ContactEditorData.HomeTZListAltID,
564 &ContactEditorData.HomeTZListPID,
565 &ContactEditorData.HomeTZListType,
566 &ContactEditorData.HomeTZListTokens,
567 &ContactEditorData.HomeTZListMediatype,
568 &ContactEditorData.HomeTZListPref,
571 frameCETZ->SetEditorMode(TRUE, CE_HOME);
572 frameCETZ->ShowModal();
578 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
581 // Bring up window to delete timezone.
583 long longSelected = -1;
584 int intSelectedData = 0;
586 if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
592 lboHomeTimezones->DeleteItem(longSelected);
594 DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
595 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
596 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
597 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
601 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
604 // Bring up window to add geoposition.
606 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
607 frameCEGeo->SetEditorMode(FALSE, CE_HOME);
608 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
609 &ContactEditorData.HomeGeographyListAltID,
610 &ContactEditorData.HomeGeographyListPID,
611 &ContactEditorData.HomeGeographyListType,
612 &ContactEditorData.HomeGeographyListDataType,
613 &ContactEditorData.HomeGeographyListTokens,
614 &ContactEditorData.HomeGeographyListMediatype,
615 &ContactEditorData.HomeGeographyListPref,
618 frameCEGeo->ShowModal();
625 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
628 // Bring up window to modify geoposition.
630 long longSelected = -1;
631 int intSelectedData = 0;
633 if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
639 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
640 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
641 &ContactEditorData.HomeGeographyListAltID,
642 &ContactEditorData.HomeGeographyListPID,
643 &ContactEditorData.HomeGeographyListType,
644 &ContactEditorData.HomeGeographyListDataType,
645 &ContactEditorData.HomeGeographyListTokens,
646 &ContactEditorData.HomeGeographyListMediatype,
647 &ContactEditorData.HomeGeographyListPref,
650 frameCEGeo->SetEditorMode(TRUE, CE_HOME);
651 frameCEGeo->ShowModal();
657 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
660 // Bring up window to delete geoposition.
662 long longSelected = -1;
663 int intSelectedData = 0;
665 if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
671 lboHomeGeoposition->DeleteItem(longSelected);
673 DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
674 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
675 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
676 &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype,
677 &ContactEditorData.HomeGeographyListPref);
681 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
684 // Bring up window to add website.
686 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
687 frameCEWeb->SetEditorMode(FALSE, CE_HOME);
688 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
689 &ContactEditorData.HomeWebsiteListAltID,
690 &ContactEditorData.HomeWebsiteListPID,
691 &ContactEditorData.HomeWebsiteListType,
692 &ContactEditorData.HomeWebsiteListTokens,
693 &ContactEditorData.HomeWebsiteListMediatype,
694 &ContactEditorData.HomeWebsiteListPref,
697 frameCEWeb->ShowModal();
704 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
707 // Bring up window to modify website.
709 long longSelected = -1;
710 int intSelectedData = 0;
712 if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
718 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
719 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
720 &ContactEditorData.HomeWebsiteListAltID,
721 &ContactEditorData.HomeWebsiteListPID,
722 &ContactEditorData.HomeWebsiteListType,
723 &ContactEditorData.HomeWebsiteListTokens,
724 &ContactEditorData.HomeWebsiteListMediatype,
725 &ContactEditorData.HomeWebsiteListPref,
728 frameCEWeb->SetEditorMode(TRUE, CE_HOME);
729 frameCEWeb->ShowModal();
735 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
738 // Bring up window to delete website.
740 long longSelected = -1;
741 int intSelectedData = 0;
743 if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
749 lboHomeWebsites->DeleteItem(longSelected);
751 DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
752 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
753 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
754 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
758 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
761 // Bring up window to add title.
763 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
764 frameCETitle->SetEditorMode(FALSE, CE_HOME);
765 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
766 &ContactEditorData.HomeTitleListLanguage,
767 &ContactEditorData.HomeTitleListAltID,
768 &ContactEditorData.HomeTitleListPID,
769 &ContactEditorData.HomeTitleListType,
770 &ContactEditorData.HomeTitleListTokens,
771 &ContactEditorData.HomeTitleListPref,
774 frameCETitle->ShowModal();
781 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
784 // Bring up window to modify title.
786 long longSelected = -1;
787 int intSelectedData = 0;
789 if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
795 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
796 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
797 &ContactEditorData.HomeTitleListLanguage,
798 &ContactEditorData.HomeTitleListAltID,
799 &ContactEditorData.HomeTitleListPID,
800 &ContactEditorData.HomeTitleListType,
801 &ContactEditorData.HomeTitleListTokens,
802 &ContactEditorData.HomeTitleListPref,
805 frameCETitle->SetEditorMode(TRUE, CE_HOME);
806 frameCETitle->ShowModal();
812 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
815 // Bring up window to delete title.
817 long longSelected = -1;
818 int intSelectedData = 0;
820 if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
826 lboHomeTitles->DeleteItem(longSelected);
828 DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
829 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
830 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
831 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
835 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
838 // Bring up window to add role.
840 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
841 frameCERole->SetEditorMode(FALSE, CE_HOME);
842 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
843 &ContactEditorData.HomeRoleListLanguage,
844 &ContactEditorData.HomeRoleListAltID,
845 &ContactEditorData.HomeRoleListPID,
846 &ContactEditorData.HomeRoleListType,
847 &ContactEditorData.HomeRoleListTokens,
848 &ContactEditorData.HomeRoleListPref,
851 frameCERole->ShowModal();
858 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
861 // Bring up window to modify role.
863 long longSelected = -1;
864 int intSelectedData = 0;
866 if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
872 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
873 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
874 &ContactEditorData.HomeRoleListLanguage,
875 &ContactEditorData.HomeRoleListAltID,
876 &ContactEditorData.HomeRoleListPID,
877 &ContactEditorData.HomeRoleListType,
878 &ContactEditorData.HomeRoleListTokens,
879 &ContactEditorData.HomeRoleListPref,
882 frameCERole->SetEditorMode(TRUE, CE_HOME);
883 frameCERole->ShowModal();
889 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
892 // Bring up window to delete role.
894 long longSelected = -1;
895 int intSelectedData = 0;
897 if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
903 lboHomeRoles->DeleteItem(longSelected);
905 DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
906 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
907 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
908 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
912 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
915 // Bring up window to add organisation.
917 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
918 frameCEOrg->SetEditorMode(FALSE, CE_HOME);
919 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
920 &ContactEditorData.HomeOrganisationsListLanguage,
921 &ContactEditorData.HomeOrganisationsListSortAs,
922 &ContactEditorData.HomeOrganisationsListAltID,
923 &ContactEditorData.HomeOrganisationsListPID,
924 &ContactEditorData.HomeOrganisationsListType,
925 &ContactEditorData.HomeOrganisationsListTokens,
926 &ContactEditorData.HomeOrganisationsListPref,
927 lboHomeOrganisations,
929 frameCEOrg->ShowModal();
936 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
939 // Bring up window to modify organisation.
941 long longSelected = -1;
942 int intSelectedData = 0;
944 if (lboHomeOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboHomeOrganisations,
950 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
951 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
952 &ContactEditorData.HomeOrganisationsListLanguage,
953 &ContactEditorData.HomeOrganisationsListSortAs,
954 &ContactEditorData.HomeOrganisationsListAltID,
955 &ContactEditorData.HomeOrganisationsListPID,
956 &ContactEditorData.HomeOrganisationsListType,
957 &ContactEditorData.HomeOrganisationsListTokens,
958 &ContactEditorData.HomeOrganisationsListPref,
959 lboHomeOrganisations,
961 frameCEOrg->SetEditorMode(TRUE, CE_HOME);
962 frameCEOrg->ShowModal();
968 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
971 // Bring up window to delete organisation.
973 long longSelected = -1;
974 int intSelectedData = 0;
976 if (lboHomeOrganisations->GetItemCount() == 0 ||!GetSelectedItem(lboHomeOrganisations,
982 lboHomeOrganisations->DeleteItem(longSelected);
984 DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
985 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
986 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
987 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
988 &ContactEditorData.HomeOrganisationsListPref);
992 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
995 // Bring up window to add note.
997 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
998 frameCENote->SetEditorMode(FALSE, CE_HOME);
999 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1000 &ContactEditorData.HomeNoteListLanguage,
1001 &ContactEditorData.HomeNoteListAltID,
1002 &ContactEditorData.HomeNoteListPID,
1003 &ContactEditorData.HomeNoteListType,
1004 &ContactEditorData.HomeNoteListTokens,
1005 &ContactEditorData.HomeNoteListPref,
1008 frameCENote->ShowModal();
1015 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
1018 // Bring up window to modify note.
1020 long longSelected = -1;
1021 int intSelectedData = 0;
1023 if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1029 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1030 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1031 &ContactEditorData.HomeNoteListLanguage,
1032 &ContactEditorData.HomeNoteListAltID,
1033 &ContactEditorData.HomeNoteListPID,
1034 &ContactEditorData.HomeNoteListType,
1035 &ContactEditorData.HomeNoteListTokens,
1036 &ContactEditorData.HomeNoteListPref,
1039 frameCENote->SetEditorMode(TRUE, CE_HOME);
1040 frameCENote->ShowModal();
1046 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
1049 // Bring up window to delete note.
1051 long longSelected = -1;
1052 int intSelectedData = 0;
1054 if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1060 lboHomeNotes->DeleteItem(longSelected);
1062 DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
1063 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
1064 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
1065 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);