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.HomeIMListTokens,
278 &ContactEditorData.HomeIMListMediatype,
279 &ContactEditorData.HomeIMListPref,
282 frameCEIM->ShowModal();
287 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
289 long longSelected = -1;
290 int intSelectedData = 0;
292 if (!GetSelectedItem(lboHomeIM,
298 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
299 frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
300 &ContactEditorData.HomeIMListAltID,
301 &ContactEditorData.HomeIMListPID,
302 &ContactEditorData.HomeIMListType,
303 &ContactEditorData.HomeIMListTokens,
304 &ContactEditorData.HomeIMListMediatype,
305 &ContactEditorData.HomeIMListPref,
308 frameCEIM->SetEditorMode(TRUE, CE_HOME);
309 frameCEIM->ShowModal();
314 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
316 long longSelected = -1;
317 int intSelectedData = 0;
319 if (!GetSelectedItem(lboHomeIM,
325 lboHomeIM->DeleteItem(longSelected);
327 DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
328 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
329 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTokens,
330 &ContactEditorData.HomeIMListMediatype, &ContactEditorData.HomeIMListPref);
334 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
338 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
339 frameCETel->SetEditorMode(FALSE, CE_HOME);
340 intResult = GetLastInt(&ContactEditorData.HomeTelephoneList);
341 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
342 &ContactEditorData.HomeTelephoneListAltID,
343 &ContactEditorData.HomeTelephoneListPID,
344 &ContactEditorData.HomeTelephoneListType,
345 &ContactEditorData.HomeTelephoneListTokens,
346 &ContactEditorData.HomeTelephoneListPref,
349 frameCETel->ShowModal();
354 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
356 long longSelected = -1;
357 int intSelectedData = 0;
359 if (!GetSelectedItem(lboHomeTelephone,
365 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
366 frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
367 &ContactEditorData.HomeTelephoneListAltID,
368 &ContactEditorData.HomeTelephoneListPID,
369 &ContactEditorData.HomeTelephoneListType,
370 &ContactEditorData.HomeTelephoneListTokens,
371 &ContactEditorData.HomeTelephoneListPref,
374 frameCETel->SetEditorMode(TRUE, CE_HOME);
375 frameCETel->ShowModal();
380 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
382 long longSelected = -1;
383 int intSelectedData = 0;
385 if (!GetSelectedItem(lboHomeTelephone,
391 lboHomeTelephone->DeleteItem(longSelected);
393 DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
394 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
395 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTokens,
396 &ContactEditorData.HomeTelephoneListPref);
400 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
404 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
405 frameCELang->SetEditorMode(FALSE, CE_HOME);
406 intResult = GetLastInt(&ContactEditorData.HomeLanguageList);
407 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
408 &ContactEditorData.HomeLanguageListAltID,
409 &ContactEditorData.HomeLanguageListPID,
410 &ContactEditorData.HomeLanguageListType,
411 &ContactEditorData.HomeLanguageListTokens,
412 &ContactEditorData.HomeLanguageListPref,
415 frameCELang->ShowModal();
420 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
422 long longSelected = -1;
423 int intSelectedData = 0;
425 if (!GetSelectedItem(lboHomeLanguages,
431 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
432 frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
433 &ContactEditorData.HomeLanguageListAltID,
434 &ContactEditorData.HomeLanguageListPID,
435 &ContactEditorData.HomeLanguageListType,
436 &ContactEditorData.HomeLanguageListTokens,
437 &ContactEditorData.HomeLanguageListPref,
440 frameCELang->SetEditorMode(TRUE, CE_HOME);
441 frameCELang->ShowModal();
446 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
448 long longSelected = -1;
449 int intSelectedData = 0;
451 if (!GetSelectedItem(lboHomeLanguages,
457 lboHomeLanguages->DeleteItem(longSelected);
459 DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
460 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
461 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
462 &ContactEditorData.HomeLanguageListPref);
466 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
470 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
471 frameCETZ->SetEditorMode(FALSE, CE_HOME);
472 intResult = GetLastInt(&ContactEditorData.HomeTZList);
473 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
474 &ContactEditorData.HomeTZListAltID,
475 &ContactEditorData.HomeTZListPID,
476 &ContactEditorData.HomeTZListType,
477 &ContactEditorData.HomeTZListTokens,
478 &ContactEditorData.HomeTZListMediatype,
479 &ContactEditorData.HomeTZListPref,
482 frameCETZ->ShowModal();
487 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
489 long longSelected = -1;
490 int intSelectedData = 0;
492 if (!GetSelectedItem(lboHomeTimezones,
498 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
499 frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
500 &ContactEditorData.HomeTZListAltID,
501 &ContactEditorData.HomeTZListPID,
502 &ContactEditorData.HomeTZListType,
503 &ContactEditorData.HomeTZListTokens,
504 &ContactEditorData.HomeTZListMediatype,
505 &ContactEditorData.HomeTZListPref,
508 frameCETZ->SetEditorMode(TRUE, CE_HOME);
509 frameCETZ->ShowModal();
514 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
516 long longSelected = -1;
517 int intSelectedData = 0;
519 if (!GetSelectedItem(lboHomeTimezones,
525 lboHomeTimezones->DeleteItem(longSelected);
527 DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
528 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
529 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
530 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
534 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
538 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
539 frameCEGeo->SetEditorMode(FALSE, CE_HOME);
540 intResult = GetLastInt(&ContactEditorData.HomeGeographyList);
541 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
542 &ContactEditorData.HomeGeographyListAltID,
543 &ContactEditorData.HomeGeographyListPID,
544 &ContactEditorData.HomeGeographyListType,
545 &ContactEditorData.HomeGeographyListTokens,
546 &ContactEditorData.HomeGeographyListMediatype,
547 &ContactEditorData.HomeGeographyListPref,
550 frameCEGeo->ShowModal();
555 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
557 long longSelected = -1;
558 int intSelectedData = 0;
560 if (!GetSelectedItem(lboHomeGeoposition,
566 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
567 frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
568 &ContactEditorData.HomeGeographyListAltID,
569 &ContactEditorData.HomeGeographyListPID,
570 &ContactEditorData.HomeGeographyListType,
571 &ContactEditorData.HomeGeographyListTokens,
572 &ContactEditorData.HomeGeographyListMediatype,
573 &ContactEditorData.HomeGeographyListPref,
576 frameCEGeo->SetEditorMode(TRUE, CE_HOME);
577 frameCEGeo->ShowModal();
582 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
584 long longSelected = -1;
585 int intSelectedData = 0;
587 if (!GetSelectedItem(lboHomeGeoposition,
593 lboHomeGeoposition->DeleteItem(longSelected);
595 DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
596 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
597 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
598 &ContactEditorData.HomeGeographyListMediatype, &ContactEditorData.HomeGeographyListPref);
602 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
606 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
607 frameCEWeb->SetEditorMode(FALSE, CE_HOME);
608 intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
609 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
610 &ContactEditorData.HomeWebsiteListAltID,
611 &ContactEditorData.HomeWebsiteListPID,
612 &ContactEditorData.HomeWebsiteListType,
613 &ContactEditorData.HomeWebsiteListTokens,
614 &ContactEditorData.HomeWebsiteListMediatype,
615 &ContactEditorData.HomeWebsiteListPref,
618 frameCEWeb->ShowModal();
623 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
625 long longSelected = -1;
626 int intSelectedData = 0;
628 if (!GetSelectedItem(lboHomeWebsites,
634 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
635 frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
636 &ContactEditorData.HomeWebsiteListAltID,
637 &ContactEditorData.HomeWebsiteListPID,
638 &ContactEditorData.HomeWebsiteListType,
639 &ContactEditorData.HomeWebsiteListTokens,
640 &ContactEditorData.HomeWebsiteListMediatype,
641 &ContactEditorData.HomeWebsiteListPref,
644 frameCEWeb->SetEditorMode(TRUE, CE_HOME);
645 frameCEWeb->ShowModal();
650 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
652 long longSelected = -1;
653 int intSelectedData = 0;
655 if (!GetSelectedItem(lboHomeWebsites,
661 lboHomeWebsites->DeleteItem(longSelected);
663 DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
664 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
665 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
666 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
670 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
674 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
675 frameCETitle->SetEditorMode(FALSE, CE_HOME);
676 intResult = GetLastInt(&ContactEditorData.HomeTitleList);
677 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
678 &ContactEditorData.HomeTitleListLanguage,
679 &ContactEditorData.HomeTitleListAltID,
680 &ContactEditorData.HomeTitleListPID,
681 &ContactEditorData.HomeTitleListType,
682 &ContactEditorData.HomeTitleListTokens,
683 &ContactEditorData.HomeTitleListPref,
686 frameCETitle->ShowModal();
691 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
693 long longSelected = -1;
694 int intSelectedData = 0;
696 if (!GetSelectedItem(lboHomeTitles,
702 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
703 frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
704 &ContactEditorData.HomeTitleListLanguage,
705 &ContactEditorData.HomeTitleListAltID,
706 &ContactEditorData.HomeTitleListPID,
707 &ContactEditorData.HomeTitleListType,
708 &ContactEditorData.HomeTitleListTokens,
709 &ContactEditorData.HomeTitleListPref,
712 frameCETitle->SetEditorMode(TRUE, CE_HOME);
713 frameCETitle->ShowModal();
718 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
720 long longSelected = -1;
721 int intSelectedData = 0;
723 if (!GetSelectedItem(lboHomeTitles,
729 lboHomeTitles->DeleteItem(longSelected);
731 DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
732 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
733 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
734 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
738 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
742 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
743 frameCERole->SetEditorMode(FALSE, CE_HOME);
744 intResult = GetLastInt(&ContactEditorData.HomeRoleList);
745 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
746 &ContactEditorData.HomeRoleListLanguage,
747 &ContactEditorData.HomeRoleListAltID,
748 &ContactEditorData.HomeRoleListPID,
749 &ContactEditorData.HomeRoleListType,
750 &ContactEditorData.HomeRoleListTokens,
751 &ContactEditorData.HomeRoleListPref,
754 frameCERole->ShowModal();
759 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
761 long longSelected = -1;
762 int intSelectedData = 0;
764 if (!GetSelectedItem(lboHomeRoles,
770 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
771 frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
772 &ContactEditorData.HomeRoleListLanguage,
773 &ContactEditorData.HomeRoleListAltID,
774 &ContactEditorData.HomeRoleListPID,
775 &ContactEditorData.HomeRoleListType,
776 &ContactEditorData.HomeRoleListTokens,
777 &ContactEditorData.HomeRoleListPref,
780 frameCERole->SetEditorMode(TRUE, CE_HOME);
781 frameCERole->ShowModal();
786 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
788 long longSelected = -1;
789 int intSelectedData = 0;
791 if (!GetSelectedItem(lboHomeRoles,
797 lboHomeRoles->DeleteItem(longSelected);
799 DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
800 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
801 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
802 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
806 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
810 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
811 frameCEOrg->SetEditorMode(FALSE, CE_HOME);
812 intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
813 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
814 &ContactEditorData.HomeOrganisationsListLanguage,
815 &ContactEditorData.HomeOrganisationsListSortAs,
816 &ContactEditorData.HomeOrganisationsListAltID,
817 &ContactEditorData.HomeOrganisationsListPID,
818 &ContactEditorData.HomeOrganisationsListType,
819 &ContactEditorData.HomeOrganisationsListTokens,
820 &ContactEditorData.HomeOrganisationsListPref,
821 lboHomeOrganisations,
823 frameCEOrg->ShowModal();
828 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
830 long longSelected = -1;
831 int intSelectedData = 0;
833 if (!GetSelectedItem(lboHomeOrganisations,
839 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
840 frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
841 &ContactEditorData.HomeOrganisationsListLanguage,
842 &ContactEditorData.HomeOrganisationsListSortAs,
843 &ContactEditorData.HomeOrganisationsListAltID,
844 &ContactEditorData.HomeOrganisationsListPID,
845 &ContactEditorData.HomeOrganisationsListType,
846 &ContactEditorData.HomeOrganisationsListTokens,
847 &ContactEditorData.HomeOrganisationsListPref,
848 lboHomeOrganisations,
850 frameCEOrg->SetEditorMode(TRUE, CE_HOME);
851 frameCEOrg->ShowModal();
856 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
858 long longSelected = -1;
859 int intSelectedData = 0;
861 if (!GetSelectedItem(lboHomeOrganisations,
867 lboHomeOrganisations->DeleteItem(longSelected);
869 DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
870 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
871 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
872 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
873 &ContactEditorData.HomeOrganisationsListPref);
877 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
881 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
882 frameCENote->SetEditorMode(FALSE, CE_HOME);
883 intResult = GetLastInt(&ContactEditorData.HomeNoteList);
884 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
885 &ContactEditorData.HomeNoteListLanguage,
886 &ContactEditorData.HomeNoteListAltID,
887 &ContactEditorData.HomeNoteListPID,
888 &ContactEditorData.HomeNoteListType,
889 &ContactEditorData.HomeNoteListTokens,
890 &ContactEditorData.HomeNoteListPref,
893 frameCENote->ShowModal();
898 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
900 long longSelected = -1;
901 int intSelectedData = 0;
903 if (!GetSelectedItem(lboHomeNotes,
909 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
910 frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
911 &ContactEditorData.HomeNoteListLanguage,
912 &ContactEditorData.HomeNoteListAltID,
913 &ContactEditorData.HomeNoteListPID,
914 &ContactEditorData.HomeNoteListType,
915 &ContactEditorData.HomeNoteListTokens,
916 &ContactEditorData.HomeNoteListPref,
919 frameCENote->SetEditorMode(TRUE, CE_HOME);
920 frameCENote->ShowModal();
925 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
927 long longSelected = -1;
928 int intSelectedData = 0;
930 if (!GetSelectedItem(lboHomeNotes,
936 lboNotes->DeleteItem(longSelected);
938 DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
939 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
940 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
941 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);