1 // frmContactEditor-General.cpp - frmContactEditor General 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::AddGeneralNickname( wxCommandEvent& event )
40 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41 frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
42 intResult = GetLastInt(&ContactEditorData.GeneralNicknamesList);
43 frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
44 &ContactEditorData.GeneralNicknamesListAltID,
45 &ContactEditorData.GeneralNicknamesListPID,
46 &ContactEditorData.GeneralNicknamesListType,
47 &ContactEditorData.GeneralNicknamesListLanguage,
48 &ContactEditorData.GeneralNicknamesListTokens,
49 &ContactEditorData.GeneralNicknamesListPref,
52 frameCENickname->ShowModal();
53 delete frameCENickname;
54 frameCENickname = NULL;
57 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
60 long longSelected = -1;
61 int intSelectedData = 0;
63 if (!GetSelectedItem(lboNicknames,
69 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
70 frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
71 &ContactEditorData.GeneralNicknamesListAltID,
72 &ContactEditorData.GeneralNicknamesListPID,
73 &ContactEditorData.GeneralNicknamesListType,
74 &ContactEditorData.GeneralNicknamesListLanguage,
75 &ContactEditorData.GeneralNicknamesListTokens,
76 &ContactEditorData.GeneralNicknamesListPref,
79 frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
80 frameCENickname->ShowModal();
81 delete frameCENickname;
82 frameCENickname = NULL;
86 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
89 long longSelected = -1;
90 int intSelectedData = 0;
92 if (!GetSelectedItem(lboNicknames,
98 lboNicknames->DeleteItem(longSelected);
100 DeleteMapData(intSelectedData,
101 &ContactEditorData.GeneralNicknamesList,
102 &ContactEditorData.GeneralNicknamesListLanguage,
103 &ContactEditorData.GeneralNicknamesListAltID,
104 &ContactEditorData.GeneralNicknamesListPID,
105 &ContactEditorData.GeneralNicknamesListTokens,
106 &ContactEditorData.GeneralNicknamesListType,
107 &ContactEditorData.GeneralNicknamesListPref);
111 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
116 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
117 frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
118 intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
119 frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
120 &ContactEditorData.GeneralAddressListTown,
121 &ContactEditorData.GeneralAddressListCounty,
122 &ContactEditorData.GeneralAddressListPostCode,
123 &ContactEditorData.GeneralAddressListCountry,
124 &ContactEditorData.GeneralAddressListLabel,
125 &ContactEditorData.GeneralAddressListLang,
126 &ContactEditorData.GeneralAddressListAltID,
127 &ContactEditorData.GeneralAddressListPID,
128 &ContactEditorData.GeneralAddressListTokens,
129 &ContactEditorData.GeneralAddressListGeo,
130 &ContactEditorData.GeneralAddressListTimezone,
131 &ContactEditorData.GeneralAddressListType,
132 &ContactEditorData.GeneralAddressListMediatype,
133 &ContactEditorData.GeneralAddressListPref,
136 frameCEAddress->ShowModal();
137 delete frameCEAddress;
138 frameCEAddress = NULL;
141 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
144 long longSelected = -1;
145 int intSelectedData = 0;
147 if (!GetSelectedItem(lboAddresses,
153 if (longSelected == -1){
157 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
158 frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
159 &ContactEditorData.GeneralAddressListTown,
160 &ContactEditorData.GeneralAddressListCounty,
161 &ContactEditorData.GeneralAddressListPostCode,
162 &ContactEditorData.GeneralAddressListCountry,
163 &ContactEditorData.GeneralAddressListLabel,
164 &ContactEditorData.GeneralAddressListLang,
165 &ContactEditorData.GeneralAddressListAltID,
166 &ContactEditorData.GeneralAddressListPID,
167 &ContactEditorData.GeneralAddressListTokens,
168 &ContactEditorData.GeneralAddressListGeo,
169 &ContactEditorData.GeneralAddressListTimezone,
170 &ContactEditorData.GeneralAddressListType,
171 &ContactEditorData.GeneralAddressListMediatype,
172 &ContactEditorData.GeneralAddressListPref,
175 frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
176 frameCEAddress->ShowModal();
177 delete frameCEAddress;
178 frameCEAddress = NULL;
182 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
185 long longSelected = -1;
186 int intSelectedData = 0;
188 if (!GetSelectedItem(lboAddresses,
194 lboAddresses->DeleteItem(longSelected);
196 DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
197 &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
198 &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
199 &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
200 &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
201 &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
202 &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
203 &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
204 &ContactEditorData.GeneralAddressListPref);
208 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
212 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
213 frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
214 intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
215 frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
216 &ContactEditorData.GeneralEmailListAltID,
217 &ContactEditorData.GeneralEmailListPID,
218 &ContactEditorData.GeneralEmailListType,
219 &ContactEditorData.GeneralEmailListTokens,
220 &ContactEditorData.GeneralEmailListPref,
223 frameCEEmail->ShowModal();
228 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
230 long longSelected = -1;
231 int intSelectedData = 0;
233 if (!GetSelectedItem(lboEmails,
239 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
240 frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
241 &ContactEditorData.GeneralEmailListAltID,
242 &ContactEditorData.GeneralEmailListPID,
243 &ContactEditorData.GeneralEmailListType,
244 &ContactEditorData.GeneralEmailListTokens,
245 &ContactEditorData.GeneralEmailListPref,
248 frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
249 frameCEEmail->ShowModal();
254 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
256 long longSelected = -1;
257 int intSelectedData = 0;
259 if (!GetSelectedItem(lboEmails,
265 lboEmails->DeleteItem(longSelected);
267 DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
268 &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
269 &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
270 &ContactEditorData.GeneralEmailListPref);
274 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
278 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
279 frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
280 intResult = GetLastInt(&ContactEditorData.GeneralIMList);
281 frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
282 &ContactEditorData.GeneralIMListAltID,
283 &ContactEditorData.GeneralIMListPID,
284 &ContactEditorData.GeneralIMListType,
285 &ContactEditorData.GeneralIMListTokens,
286 &ContactEditorData.GeneralIMListMediatype,
287 &ContactEditorData.GeneralIMListPref,
290 frameCEIM->ShowModal();
295 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
297 long longSelected = -1;
298 int intSelectedData = 0;
300 if (!GetSelectedItem(lboIM,
306 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
307 frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
308 &ContactEditorData.GeneralIMListAltID,
309 &ContactEditorData.GeneralIMListPID,
310 &ContactEditorData.GeneralIMListType,
311 &ContactEditorData.GeneralIMListTokens,
312 &ContactEditorData.GeneralIMListMediatype,
313 &ContactEditorData.GeneralIMListPref,
316 frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
317 frameCEIM->ShowModal();
322 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
324 long longSelected = -1;
325 int intSelectedData = 0;
327 if (!GetSelectedItem(lboIM,
333 lboIM->DeleteItem(longSelected);
335 DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
336 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
337 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTokens,
338 &ContactEditorData.GeneralIMListMediatype, &ContactEditorData.GeneralIMListPref);
342 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
346 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
347 frameCETel->SetEditorMode(FALSE, CE_GENERAL);
348 intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList);
349 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
350 &ContactEditorData.GeneralTelephoneListAltID,
351 &ContactEditorData.GeneralTelephoneListPID,
352 &ContactEditorData.GeneralTelephoneListType,
353 &ContactEditorData.GeneralTelephoneListTokens,
354 &ContactEditorData.GeneralTelephoneListPref,
357 frameCETel->ShowModal();
362 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
364 long longSelected = -1;
365 int intSelectedData = 0;
367 if (!GetSelectedItem(lboTelephone,
373 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
374 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
375 &ContactEditorData.GeneralTelephoneListAltID,
376 &ContactEditorData.GeneralTelephoneListPID,
377 &ContactEditorData.GeneralTelephoneListType,
378 &ContactEditorData.GeneralTelephoneListTokens,
379 &ContactEditorData.GeneralTelephoneListPref,
382 frameCETel->SetEditorMode(TRUE, CE_GENERAL);
383 frameCETel->ShowModal();
388 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
390 long longSelected = -1;
391 int intSelectedData = 0;
393 if (!GetSelectedItem(lboTelephone,
399 lboTelephone->DeleteItem(longSelected);
401 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
402 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
403 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTokens,
404 &ContactEditorData.GeneralTelephoneListPref);
408 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
412 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
413 frameCELang->SetEditorMode(FALSE, CE_GENERAL);
414 intResult = GetLastInt(&ContactEditorData.GeneralLanguageList);
415 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
416 &ContactEditorData.GeneralLanguageListAltID,
417 &ContactEditorData.GeneralLanguageListPID,
418 &ContactEditorData.GeneralLanguageListType,
419 &ContactEditorData.GeneralLanguageListTokens,
420 &ContactEditorData.GeneralLanguageListPref,
423 frameCELang->ShowModal();
428 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
430 long longSelected = -1;
431 int intSelectedData = 0;
433 if (!GetSelectedItem(lboLanguages,
439 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
440 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
441 &ContactEditorData.GeneralLanguageListAltID,
442 &ContactEditorData.GeneralLanguageListPID,
443 &ContactEditorData.GeneralLanguageListType,
444 &ContactEditorData.GeneralLanguageListTokens,
445 &ContactEditorData.GeneralLanguageListPref,
448 frameCELang->SetEditorMode(TRUE, CE_GENERAL);
449 frameCELang->ShowModal();
454 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
456 long longSelected = -1;
457 int intSelectedData = 0;
459 if (!GetSelectedItem(lboLanguages,
465 lboLanguages->DeleteItem(longSelected);
467 DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
468 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
469 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
470 &ContactEditorData.GeneralLanguageListPref);
474 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
478 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
479 frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
480 intResult = GetLastInt(&ContactEditorData.GeneralTZList);
481 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
482 &ContactEditorData.GeneralTZListAltID,
483 &ContactEditorData.GeneralTZListPID,
484 &ContactEditorData.GeneralTZListType,
485 &ContactEditorData.GeneralTZListTokens,
486 &ContactEditorData.GeneralTZListMediatype,
487 &ContactEditorData.GeneralTZListPref,
490 frameCETZ->ShowModal();
495 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
497 long longSelected = -1;
498 int intSelectedData = 0;
500 if (!GetSelectedItem(lboTimezones,
506 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
507 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
508 &ContactEditorData.GeneralTZListAltID,
509 &ContactEditorData.GeneralTZListPID,
510 &ContactEditorData.GeneralTZListType,
511 &ContactEditorData.GeneralTZListTokens,
512 &ContactEditorData.GeneralTZListMediatype,
513 &ContactEditorData.GeneralTZListPref,
516 frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
517 frameCETZ->ShowModal();
522 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
524 long longSelected = -1;
525 int intSelectedData = 0;
527 if (!GetSelectedItem(lboTimezones,
533 lboTimezones->DeleteItem(longSelected);
535 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
536 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
537 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
538 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
542 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
546 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
547 frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
548 intResult = GetLastInt(&ContactEditorData.GeneralGeographyList);
549 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
550 &ContactEditorData.GeneralGeographyListAltID,
551 &ContactEditorData.GeneralGeographyListPID,
552 &ContactEditorData.GeneralGeographyListType,
553 &ContactEditorData.GeneralGeographyListTokens,
554 &ContactEditorData.GeneralGeographyListMediatype,
555 &ContactEditorData.GeneralGeographyListPref,
558 frameCEGeo->ShowModal();
563 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
565 long longSelected = -1;
566 int intSelectedData = 0;
568 if (!GetSelectedItem(lboGeoposition,
574 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
575 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
576 &ContactEditorData.GeneralGeographyListAltID,
577 &ContactEditorData.GeneralGeographyListPID,
578 &ContactEditorData.GeneralGeographyListType,
579 &ContactEditorData.GeneralGeographyListTokens,
580 &ContactEditorData.GeneralGeographyListMediatype,
581 &ContactEditorData.GeneralGeographyListPref,
584 frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
585 frameCEGeo->ShowModal();
590 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
592 long longSelected = -1;
593 int intSelectedData = 0;
595 if (!GetSelectedItem(lboGeoposition,
601 lboGeoposition->DeleteItem(longSelected);
603 DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
604 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
605 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListTokens,
606 &ContactEditorData.GeneralGeographyListMediatype, &ContactEditorData.GeneralGeographyListPref);
610 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
614 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
615 frameCERel->SetEditorMode(FALSE, CE_GENERAL);
616 intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
617 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
618 &ContactEditorData.GeneralRelatedListRelType,
619 &ContactEditorData.GeneralRelatedListAltID,
620 &ContactEditorData.GeneralRelatedListPID,
621 &ContactEditorData.GeneralRelatedListType,
622 &ContactEditorData.GeneralRelatedListTokens,
623 &ContactEditorData.GeneralRelatedListPref,
626 frameCERel->ShowModal();
631 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
633 long longSelected = -1;
634 int intSelectedData = 0;
636 if (!GetSelectedItem(lboRelated,
642 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
643 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
644 &ContactEditorData.GeneralRelatedListRelType,
645 &ContactEditorData.GeneralRelatedListAltID,
646 &ContactEditorData.GeneralRelatedListPID,
647 &ContactEditorData.GeneralRelatedListType,
648 &ContactEditorData.GeneralRelatedListTokens,
649 &ContactEditorData.GeneralRelatedListPref,
652 frameCERel->SetEditorMode(TRUE, CE_GENERAL);
653 frameCERel->ShowModal();
658 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
660 long longSelected = -1;
661 int intSelectedData = 0;
663 if (!GetSelectedItem(lboRelated,
669 lboRelated->DeleteItem(longSelected);
671 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
672 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
673 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
674 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
678 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
682 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
683 frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
684 intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
685 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
686 &ContactEditorData.GeneralWebsiteListAltID,
687 &ContactEditorData.GeneralWebsiteListPID,
688 &ContactEditorData.GeneralWebsiteListType,
689 &ContactEditorData.GeneralWebsiteListTokens,
690 &ContactEditorData.GeneralWebsiteListMediatype,
691 &ContactEditorData.GeneralWebsiteListPref,
694 frameCEWeb->ShowModal();
699 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
701 long longSelected = -1;
702 int intSelectedData = 0;
704 if (!GetSelectedItem(lboWebsites,
710 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
711 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
712 &ContactEditorData.GeneralWebsiteListAltID,
713 &ContactEditorData.GeneralWebsiteListPID,
714 &ContactEditorData.GeneralWebsiteListType,
715 &ContactEditorData.GeneralWebsiteListTokens,
716 &ContactEditorData.GeneralWebsiteListMediatype,
717 &ContactEditorData.GeneralWebsiteListPref,
720 frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
721 frameCEWeb->ShowModal();
726 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
728 long longSelected = -1;
729 int intSelectedData = 0;
731 if (!GetSelectedItem(lboWebsites,
737 lboWebsites->DeleteItem(longSelected);
739 DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
740 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
741 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
742 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
746 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
750 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
751 frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
752 intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
753 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
754 &ContactEditorData.GeneralTitleListLanguage,
755 &ContactEditorData.GeneralTitleListAltID,
756 &ContactEditorData.GeneralTitleListPID,
757 &ContactEditorData.GeneralTitleListType,
758 &ContactEditorData.GeneralTitleListTokens,
759 &ContactEditorData.GeneralTitleListPref,
762 frameCETitle->ShowModal();
767 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
769 long longSelected = -1;
770 int intSelectedData = 0;
772 if (!GetSelectedItem(lboTitles,
778 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
779 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
780 &ContactEditorData.GeneralTitleListLanguage,
781 &ContactEditorData.GeneralTitleListAltID,
782 &ContactEditorData.GeneralTitleListPID,
783 &ContactEditorData.GeneralTitleListType,
784 &ContactEditorData.GeneralTitleListTokens,
785 &ContactEditorData.GeneralTitleListPref,
788 frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
789 frameCETitle->ShowModal();
794 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
796 long longSelected = -1;
797 int intSelectedData = 0;
799 if (!GetSelectedItem(lboTitles,
805 lboTitles->DeleteItem(longSelected);
807 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
808 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
809 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
810 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
814 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
818 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
819 frameCERole->SetEditorMode(FALSE, CE_GENERAL);
820 intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
821 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
822 &ContactEditorData.GeneralRoleListLanguage,
823 &ContactEditorData.GeneralRoleListAltID,
824 &ContactEditorData.GeneralRoleListPID,
825 &ContactEditorData.GeneralRoleListType,
826 &ContactEditorData.GeneralRoleListTokens,
827 &ContactEditorData.GeneralRoleListPref,
830 frameCERole->ShowModal();
835 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
837 long longSelected = -1;
838 int intSelectedData = 0;
840 if (!GetSelectedItem(lboRoles,
846 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
847 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
848 &ContactEditorData.GeneralRoleListLanguage,
849 &ContactEditorData.GeneralRoleListAltID,
850 &ContactEditorData.GeneralRoleListPID,
851 &ContactEditorData.GeneralRoleListType,
852 &ContactEditorData.GeneralRoleListTokens,
853 &ContactEditorData.GeneralRoleListPref,
856 frameCERole->SetEditorMode(TRUE, CE_GENERAL);
857 frameCERole->ShowModal();
862 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
864 long longSelected = -1;
865 int intSelectedData = 0;
867 if (!GetSelectedItem(lboRoles,
873 lboRoles->DeleteItem(longSelected);
875 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
876 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
877 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
878 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
882 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
886 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
887 frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
888 intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
889 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
890 &ContactEditorData.GeneralOrganisationsListLanguage,
891 &ContactEditorData.GeneralOrganisationsListSortAs,
892 &ContactEditorData.GeneralOrganisationsListAltID,
893 &ContactEditorData.GeneralOrganisationsListPID,
894 &ContactEditorData.GeneralOrganisationsListType,
895 &ContactEditorData.GeneralOrganisationsListTokens,
896 &ContactEditorData.GeneralOrganisationsListPref,
899 frameCEOrg->ShowModal();
904 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
906 long longSelected = -1;
907 int intSelectedData = 0;
909 if (!GetSelectedItem(lboOrganisations,
915 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
916 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
917 &ContactEditorData.GeneralOrganisationsListLanguage,
918 &ContactEditorData.GeneralOrganisationsListSortAs,
919 &ContactEditorData.GeneralOrganisationsListAltID,
920 &ContactEditorData.GeneralOrganisationsListPID,
921 &ContactEditorData.GeneralOrganisationsListType,
922 &ContactEditorData.GeneralOrganisationsListTokens,
923 &ContactEditorData.GeneralOrganisationsListPref,
926 frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
927 frameCEOrg->ShowModal();
932 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
934 long longSelected = -1;
935 int intSelectedData = 0;
937 if (!GetSelectedItem(lboOrganisations,
943 lboOrganisations->DeleteItem(longSelected);
945 DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
946 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
947 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
948 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
949 &ContactEditorData.GeneralOrganisationsListPref);
953 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
957 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
958 frameCENote->SetEditorMode(FALSE, CE_GENERAL);
959 intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
960 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
961 &ContactEditorData.GeneralNoteListLanguage,
962 &ContactEditorData.GeneralNoteListAltID,
963 &ContactEditorData.GeneralNoteListPID,
964 &ContactEditorData.GeneralNoteListType,
965 &ContactEditorData.GeneralNoteListTokens,
966 &ContactEditorData.GeneralNoteListPref,
969 frameCENote->ShowModal();
974 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
976 long longSelected = -1;
977 int intSelectedData = 0;
979 if (!GetSelectedItem(lboNotes,
985 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
986 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
987 &ContactEditorData.GeneralNoteListLanguage,
988 &ContactEditorData.GeneralNoteListAltID,
989 &ContactEditorData.GeneralNoteListPID,
990 &ContactEditorData.GeneralNoteListType,
991 &ContactEditorData.GeneralNoteListTokens,
992 &ContactEditorData.GeneralNoteListPref,
995 frameCENote->SetEditorMode(TRUE, CE_GENERAL);
996 frameCENote->ShowModal();
1001 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1003 long longSelected = -1;
1004 int intSelectedData = 0;
1006 if (!GetSelectedItem(lboNotes,
1012 lboNotes->DeleteItem(longSelected);
1014 DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1015 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1016 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1017 &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);