1 // frmContactEditor-General.cpp - frmContactEditor General tab subroutines.
3 // (c) 2012-2015 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(&GeneralNicknamesList);
43 frameCENickname->SetupPointers(&GeneralNicknamesList,
44 &GeneralNicknamesListAltID,
45 &GeneralNicknamesListPID,
46 &GeneralNicknamesListType,
47 &GeneralNicknamesListLanguage,
48 &GeneralNicknamesListTokens,
49 &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(&GeneralNicknamesList,
71 &GeneralNicknamesListAltID,
72 &GeneralNicknamesListPID,
73 &GeneralNicknamesListType,
74 &GeneralNicknamesListLanguage,
75 &GeneralNicknamesListTokens,
76 &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 &GeneralNicknamesList,
102 &GeneralNicknamesListLanguage,
103 &GeneralNicknamesListAltID,
104 &GeneralNicknamesListPID,
105 &GeneralNicknamesListTokens,
106 &GeneralNicknamesListType,
107 &GeneralNicknamesListPref);
111 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
116 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
117 frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
118 intResult = GetLastInt(&GeneralAddressList);
119 frameCEAddress->SetupPointers(&GeneralAddressList,
120 &GeneralAddressListTown,
121 &GeneralAddressListCounty,
122 &GeneralAddressListPostCode,
123 &GeneralAddressListCountry,
124 &GeneralAddressListLabel,
125 &GeneralAddressListLang,
126 &GeneralAddressListAltID,
127 &GeneralAddressListPID,
128 &GeneralAddressListTokens,
129 &GeneralAddressListGeo,
130 &GeneralAddressListTimezone,
131 &GeneralAddressListType,
132 &GeneralAddressListMediatype,
133 &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(&GeneralAddressList,
159 &GeneralAddressListTown,
160 &GeneralAddressListCounty,
161 &GeneralAddressListPostCode,
162 &GeneralAddressListCountry,
163 &GeneralAddressListLabel,
164 &GeneralAddressListLang,
165 &GeneralAddressListAltID,
166 &GeneralAddressListPID,
167 &GeneralAddressListTokens,
168 &GeneralAddressListGeo,
169 &GeneralAddressListTimezone,
170 &GeneralAddressListType,
171 &GeneralAddressListMediatype,
172 &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, &GeneralAddressList,
197 &GeneralAddressListTown, &GeneralAddressListCounty,
198 &GeneralAddressListPostCode, &GeneralAddressListCountry,
199 &GeneralAddressList, &GeneralAddressListLabel,
200 &GeneralAddressListLang, &GeneralAddressListAltID,
201 &GeneralAddressListPID, &GeneralAddressListTokens,
202 &GeneralAddressListGeo, &GeneralAddressListTimezone,
203 &GeneralAddressListType, &GeneralAddressListMediatype,
204 &GeneralAddressListPref);
208 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
212 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
213 frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
214 intResult = GetLastInt(&GeneralAddressList);
215 frameCEEmail->SetupPointers(&GeneralEmailList,
216 &GeneralEmailListAltID,
217 &GeneralEmailListPID,
218 &GeneralEmailListType,
219 &GeneralEmailListTokens,
220 &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(&GeneralEmailList,
241 &GeneralEmailListAltID,
242 &GeneralEmailListPID,
243 &GeneralEmailListType,
244 &GeneralEmailListTokens,
245 &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, &GeneralEmailList,
268 &GeneralEmailListAltID, &GeneralEmailListPID,
269 &GeneralEmailListType, &GeneralEmailListTokens,
270 &GeneralEmailListPref);
274 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
278 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
279 frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
280 intResult = GetLastInt(&GeneralIMList);
281 frameCEIM->SetupPointers(&GeneralIMList,
285 &GeneralIMListTokens,
286 &GeneralIMListMediatype,
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(&GeneralIMList,
311 &GeneralIMListTokens,
312 &GeneralIMListMediatype,
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, &GeneralIMList,
336 &GeneralIMListAltID, &GeneralIMListPID,
337 &GeneralIMListType, &GeneralIMListTokens,
338 &GeneralIMListMediatype, &GeneralIMListPref);
342 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
346 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
347 frameCETel->SetEditorMode(FALSE, CE_GENERAL);
348 intResult = GetLastInt(&GeneralTelephoneList);
349 frameCETel->SetupPointers(&GeneralTelephoneList,
350 &GeneralTelephoneListAltID,
351 &GeneralTelephoneListPID,
352 &GeneralTelephoneListType,
353 &GeneralTelephoneListTokens,
354 &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(&GeneralTelephoneList,
375 &GeneralTelephoneListAltID,
376 &GeneralTelephoneListPID,
377 &GeneralTelephoneListType,
378 &GeneralTelephoneListTokens,
379 &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, &GeneralTelephoneList,
402 &GeneralTelephoneListAltID, &GeneralTelephoneListPID,
403 &GeneralTelephoneListType, &GeneralTelephoneListTokens,
404 &GeneralTelephoneListPref);
408 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
412 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
413 frameCELang->SetEditorMode(FALSE, CE_GENERAL);
414 intResult = GetLastInt(&GeneralLanguageList);
415 frameCELang->SetupPointers(&GeneralLanguageList,
416 &GeneralLanguageListAltID,
417 &GeneralLanguageListPID,
418 &GeneralLanguageListType,
419 &GeneralLanguageListTokens,
420 &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(&GeneralLanguageList,
441 &GeneralLanguageListAltID,
442 &GeneralLanguageListPID,
443 &GeneralLanguageListType,
444 &GeneralLanguageListTokens,
445 &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, &GeneralLanguageList,
468 &GeneralLanguageListAltID, &GeneralLanguageListPID,
469 &GeneralLanguageListType, &GeneralLanguageListTokens,
470 &GeneralLanguageListPref);
474 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
478 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
479 frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
480 intResult = GetLastInt(&GeneralTZList);
481 frameCETZ->SetupPointers(&GeneralTZList,
485 &GeneralTZListTokens,
486 &GeneralTZListMediatype,
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(&GeneralTZList,
511 &GeneralTZListTokens,
512 &GeneralTZListMediatype,
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, &GeneralTZList,
536 &GeneralTZListAltID, &GeneralTZListPID,
537 &GeneralTZListType, &GeneralTZListTokens,
538 &GeneralTZListMediatype, &GeneralTZListPref);
542 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
546 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
547 frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
548 intResult = GetLastInt(&GeneralGeographyList);
549 frameCEGeo->SetupPointers(&GeneralGeographyList,
550 &GeneralGeographyListAltID,
551 &GeneralGeographyListPID,
552 &GeneralGeographyListType,
553 &GeneralGeographyListTokens,
554 &GeneralGeographyListMediatype,
555 &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(&GeneralGeographyList,
576 &GeneralGeographyListAltID,
577 &GeneralGeographyListPID,
578 &GeneralGeographyListType,
579 &GeneralGeographyListTokens,
580 &GeneralGeographyListMediatype,
581 &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, &GeneralGeographyList,
604 &GeneralGeographyListAltID, &GeneralGeographyListPID,
605 &GeneralGeographyListType, &GeneralGeographyListTokens,
606 &GeneralGeographyListMediatype, &GeneralGeographyListPref);
610 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
614 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
615 frameCERel->SetEditorMode(FALSE, CE_GENERAL);
616 intResult = GetLastInt(&GeneralRelatedList);
617 frameCERel->SetupPointers(&GeneralRelatedList,
618 &GeneralRelatedListRelType,
619 &GeneralRelatedListAltID,
620 &GeneralRelatedListPID,
621 &GeneralRelatedListType,
622 &GeneralRelatedListTokens,
623 &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(&GeneralRelatedList,
644 &GeneralRelatedListRelType,
645 &GeneralRelatedListAltID,
646 &GeneralRelatedListPID,
647 &GeneralRelatedListType,
648 &GeneralRelatedListTokens,
649 &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(&GeneralWebsiteList);
687 frameCEWeb->SetupPointers(&GeneralWebsiteList,
688 &GeneralWebsiteListAltID,
689 &GeneralWebsiteListPID,
690 &GeneralWebsiteListType,
691 &GeneralWebsiteListTokens,
692 &GeneralWebsiteListMediatype,
693 &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(&GeneralWebsiteList,
714 &GeneralWebsiteListAltID,
715 &GeneralWebsiteListPID,
716 &GeneralWebsiteListType,
717 &GeneralWebsiteListTokens,
718 &GeneralWebsiteListMediatype,
719 &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, &GeneralWebsiteList,
742 &GeneralWebsiteListAltID, &GeneralWebsiteListPID,
743 &GeneralWebsiteListType, &GeneralWebsiteListTokens,
744 &GeneralWebsiteListMediatype, &GeneralWebsiteListPref);
748 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
752 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
753 frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
754 intResult = GetLastInt(&GeneralTitleList);
755 frameCETitle->SetupPointers(&GeneralTitleList,
756 &GeneralTitleListLanguage,
757 &GeneralTitleListAltID,
758 &GeneralTitleListPID,
759 &GeneralTitleListType,
760 &GeneralTitleListTokens,
761 &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(&GeneralTitleList,
782 &GeneralTitleListLanguage,
783 &GeneralTitleListAltID,
784 &GeneralTitleListPID,
785 &GeneralTitleListType,
786 &GeneralTitleListTokens,
787 &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, &GeneralTitleList,
810 &GeneralTitleListLanguage, &GeneralTitleListAltID,
811 &GeneralTitleListPID, &GeneralTitleListType,
812 &GeneralTitleListTokens, &GeneralTitleListPref);
816 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
820 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
821 frameCERole->SetEditorMode(FALSE, CE_GENERAL);
822 intResult = GetLastInt(&GeneralRoleList);
823 frameCERole->SetupPointers(&GeneralRoleList,
824 &GeneralRoleListLanguage,
825 &GeneralRoleListAltID,
827 &GeneralRoleListType,
828 &GeneralRoleListTokens,
829 &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(&GeneralRoleList,
850 &GeneralRoleListLanguage,
851 &GeneralRoleListAltID,
853 &GeneralRoleListType,
854 &GeneralRoleListTokens,
855 &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, &GeneralRoleList,
878 &GeneralRoleListLanguage, &GeneralRoleListAltID,
879 &GeneralRoleListPID, &GeneralRoleListType,
880 &GeneralRoleListTokens, &GeneralRoleListPref);
884 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
888 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
889 frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
890 intResult = GetLastInt(&GeneralOrganisationsList);
891 frameCEOrg->SetupPointers(&GeneralOrganisationsList,
892 &GeneralOrganisationsListLanguage,
893 &GeneralOrganisationsListSortAs,
894 &GeneralOrganisationsListAltID,
895 &GeneralOrganisationsListPID,
896 &GeneralOrganisationsListType,
897 &GeneralOrganisationsListTokens,
898 &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(&GeneralOrganisationsList,
919 &GeneralOrganisationsListLanguage,
920 &GeneralOrganisationsListSortAs,
921 &GeneralOrganisationsListAltID,
922 &GeneralOrganisationsListPID,
923 &GeneralOrganisationsListType,
924 &GeneralOrganisationsListTokens,
925 &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, &GeneralOrganisationsList,
948 &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs,
949 &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID,
950 &GeneralOrganisationsListType, &GeneralOrganisationsListTokens,
951 &GeneralOrganisationsListPref);
955 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
959 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
960 frameCENote->SetEditorMode(FALSE, CE_GENERAL);
961 intResult = GetLastInt(&GeneralNoteList);
962 frameCENote->SetupPointers(&GeneralNoteList,
963 &GeneralNoteListLanguage,
964 &GeneralNoteListAltID,
966 &GeneralNoteListType,
967 &GeneralNoteListTokens,
968 &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(&GeneralNoteList,
989 &GeneralNoteListLanguage,
990 &GeneralNoteListAltID,
992 &GeneralNoteListType,
993 &GeneralNoteListTokens,
994 &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, &GeneralNoteList,
1017 &GeneralNoteListLanguage, &GeneralNoteListAltID,
1018 &GeneralNoteListPID, &GeneralNoteListType,
1019 &GeneralNoteListTokens, &GeneralNoteListPref);