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 GeneralRelatedList.erase(intSelectedData);
672 GeneralRelatedListRelType.erase(intSelectedData);
673 GeneralRelatedListAltID.erase(intSelectedData);
674 GeneralRelatedListPID.erase(intSelectedData);
675 GeneralRelatedListType.erase(intSelectedData);
676 GeneralRelatedListTokens.erase(intSelectedData);
677 GeneralRelatedListPref.erase(intSelectedData);
680 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
684 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
685 frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
686 intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
687 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
688 &ContactEditorData.GeneralWebsiteListAltID,
689 &ContactEditorData.GeneralWebsiteListPID,
690 &ContactEditorData.GeneralWebsiteListType,
691 &ContactEditorData.GeneralWebsiteListTokens,
692 &ContactEditorData.GeneralWebsiteListMediatype,
693 &ContactEditorData.GeneralWebsiteListPref,
696 frameCEWeb->ShowModal();
701 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
703 long longSelected = -1;
704 int intSelectedData = 0;
706 if (!GetSelectedItem(lboWebsites,
712 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
713 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
714 &ContactEditorData.GeneralWebsiteListAltID,
715 &ContactEditorData.GeneralWebsiteListPID,
716 &ContactEditorData.GeneralWebsiteListType,
717 &ContactEditorData.GeneralWebsiteListTokens,
718 &ContactEditorData.GeneralWebsiteListMediatype,
719 &ContactEditorData.GeneralWebsiteListPref,
722 frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
723 frameCEWeb->ShowModal();
728 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
730 long longSelected = -1;
731 int intSelectedData = 0;
733 if (!GetSelectedItem(lboWebsites,
739 lboWebsites->DeleteItem(longSelected);
741 DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
742 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
743 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
744 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
748 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
752 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
753 frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
754 intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
755 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
756 &ContactEditorData.GeneralTitleListLanguage,
757 &ContactEditorData.GeneralTitleListAltID,
758 &ContactEditorData.GeneralTitleListPID,
759 &ContactEditorData.GeneralTitleListType,
760 &ContactEditorData.GeneralTitleListTokens,
761 &ContactEditorData.GeneralTitleListPref,
764 frameCETitle->ShowModal();
769 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
771 long longSelected = -1;
772 int intSelectedData = 0;
774 if (!GetSelectedItem(lboTitles,
780 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
781 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
782 &ContactEditorData.GeneralTitleListLanguage,
783 &ContactEditorData.GeneralTitleListAltID,
784 &ContactEditorData.GeneralTitleListPID,
785 &ContactEditorData.GeneralTitleListType,
786 &ContactEditorData.GeneralTitleListTokens,
787 &ContactEditorData.GeneralTitleListPref,
790 frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
791 frameCETitle->ShowModal();
796 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
798 long longSelected = -1;
799 int intSelectedData = 0;
801 if (!GetSelectedItem(lboTitles,
807 lboTitles->DeleteItem(longSelected);
809 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
810 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
811 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
812 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
816 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
820 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
821 frameCERole->SetEditorMode(FALSE, CE_GENERAL);
822 intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
823 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
824 &ContactEditorData.GeneralRoleListLanguage,
825 &ContactEditorData.GeneralRoleListAltID,
826 &ContactEditorData.GeneralRoleListPID,
827 &ContactEditorData.GeneralRoleListType,
828 &ContactEditorData.GeneralRoleListTokens,
829 &ContactEditorData.GeneralRoleListPref,
832 frameCERole->ShowModal();
837 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
839 long longSelected = -1;
840 int intSelectedData = 0;
842 if (!GetSelectedItem(lboRoles,
848 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
849 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
850 &ContactEditorData.GeneralRoleListLanguage,
851 &ContactEditorData.GeneralRoleListAltID,
852 &ContactEditorData.GeneralRoleListPID,
853 &ContactEditorData.GeneralRoleListType,
854 &ContactEditorData.GeneralRoleListTokens,
855 &ContactEditorData.GeneralRoleListPref,
858 frameCERole->SetEditorMode(TRUE, CE_GENERAL);
859 frameCERole->ShowModal();
864 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
866 long longSelected = -1;
867 int intSelectedData = 0;
869 if (!GetSelectedItem(lboRoles,
875 lboRoles->DeleteItem(longSelected);
877 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
878 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
879 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
880 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
884 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
888 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
889 frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
890 intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
891 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
892 &ContactEditorData.GeneralOrganisationsListLanguage,
893 &ContactEditorData.GeneralOrganisationsListSortAs,
894 &ContactEditorData.GeneralOrganisationsListAltID,
895 &ContactEditorData.GeneralOrganisationsListPID,
896 &ContactEditorData.GeneralOrganisationsListType,
897 &ContactEditorData.GeneralOrganisationsListTokens,
898 &ContactEditorData.GeneralOrganisationsListPref,
901 frameCEOrg->ShowModal();
906 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
908 long longSelected = -1;
909 int intSelectedData = 0;
911 if (!GetSelectedItem(lboOrganisations,
917 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
918 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
919 &ContactEditorData.GeneralOrganisationsListLanguage,
920 &ContactEditorData.GeneralOrganisationsListSortAs,
921 &ContactEditorData.GeneralOrganisationsListAltID,
922 &ContactEditorData.GeneralOrganisationsListPID,
923 &ContactEditorData.GeneralOrganisationsListType,
924 &ContactEditorData.GeneralOrganisationsListTokens,
925 &ContactEditorData.GeneralOrganisationsListPref,
928 frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
929 frameCEOrg->ShowModal();
934 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
936 long longSelected = -1;
937 int intSelectedData = 0;
939 if (!GetSelectedItem(lboOrganisations,
945 lboOrganisations->DeleteItem(longSelected);
947 DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
948 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
949 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
950 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
951 &ContactEditorData.GeneralOrganisationsListPref);
955 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
959 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
960 frameCENote->SetEditorMode(FALSE, CE_GENERAL);
961 intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
962 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
963 &ContactEditorData.GeneralNoteListLanguage,
964 &ContactEditorData.GeneralNoteListAltID,
965 &ContactEditorData.GeneralNoteListPID,
966 &ContactEditorData.GeneralNoteListType,
967 &ContactEditorData.GeneralNoteListTokens,
968 &ContactEditorData.GeneralNoteListPref,
971 frameCENote->ShowModal();
976 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
978 long longSelected = -1;
979 int intSelectedData = 0;
981 if (!GetSelectedItem(lboNotes,
987 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
988 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
989 &ContactEditorData.GeneralNoteListLanguage,
990 &ContactEditorData.GeneralNoteListAltID,
991 &ContactEditorData.GeneralNoteListPID,
992 &ContactEditorData.GeneralNoteListType,
993 &ContactEditorData.GeneralNoteListTokens,
994 &ContactEditorData.GeneralNoteListPref,
997 frameCENote->SetEditorMode(TRUE, CE_GENERAL);
998 frameCENote->ShowModal();
1003 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1005 long longSelected = -1;
1006 int intSelectedData = 0;
1008 if (!GetSelectedItem(lboNotes,
1014 lboNotes->DeleteItem(longSelected);
1016 DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1017 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1018 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1019 &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);