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 )
41 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42 frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
43 intResult = GetLastInt(&ContactEditorData.GeneralNicknamesList);
44 frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
45 &ContactEditorData.GeneralNicknamesListAltID,
46 &ContactEditorData.GeneralNicknamesListPID,
47 &ContactEditorData.GeneralNicknamesListType,
48 &ContactEditorData.GeneralNicknamesListLanguage,
49 &ContactEditorData.GeneralNicknamesListTokens,
50 &ContactEditorData.GeneralNicknamesListPref,
53 frameCENickname->ShowModal();
54 delete frameCENickname;
55 frameCENickname = NULL;
59 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
62 long longSelected = -1;
63 int intSelectedData = 0;
65 if (!GetSelectedItem(lboNicknames,
71 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
72 frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
73 &ContactEditorData.GeneralNicknamesListAltID,
74 &ContactEditorData.GeneralNicknamesListPID,
75 &ContactEditorData.GeneralNicknamesListType,
76 &ContactEditorData.GeneralNicknamesListLanguage,
77 &ContactEditorData.GeneralNicknamesListTokens,
78 &ContactEditorData.GeneralNicknamesListPref,
81 frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
82 frameCENickname->ShowModal();
83 delete frameCENickname;
84 frameCENickname = NULL;
88 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
91 long longSelected = -1;
92 int intSelectedData = 0;
94 if (!GetSelectedItem(lboNicknames,
100 lboNicknames->DeleteItem(longSelected);
102 DeleteMapData(intSelectedData,
103 &ContactEditorData.GeneralNicknamesList,
104 &ContactEditorData.GeneralNicknamesListLanguage,
105 &ContactEditorData.GeneralNicknamesListAltID,
106 &ContactEditorData.GeneralNicknamesListPID,
107 &ContactEditorData.GeneralNicknamesListTokens,
108 &ContactEditorData.GeneralNicknamesListType,
109 &ContactEditorData.GeneralNicknamesListPref);
113 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
118 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
119 frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
120 intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
121 frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
122 &ContactEditorData.GeneralAddressListTown,
123 &ContactEditorData.GeneralAddressListCounty,
124 &ContactEditorData.GeneralAddressListPostCode,
125 &ContactEditorData.GeneralAddressListCountry,
126 &ContactEditorData.GeneralAddressListLabel,
127 &ContactEditorData.GeneralAddressListLang,
128 &ContactEditorData.GeneralAddressListAltID,
129 &ContactEditorData.GeneralAddressListPID,
130 &ContactEditorData.GeneralAddressListTokens,
131 &ContactEditorData.GeneralAddressListGeo,
132 &ContactEditorData.GeneralAddressListTimezone,
133 &ContactEditorData.GeneralAddressListType,
134 &ContactEditorData.GeneralAddressListMediatype,
135 &ContactEditorData.GeneralAddressListPref,
138 frameCEAddress->ShowModal();
139 delete frameCEAddress;
140 frameCEAddress = NULL;
144 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
147 long longSelected = -1;
148 int intSelectedData = 0;
150 if (!GetSelectedItem(lboAddresses,
158 if (longSelected == -1){
164 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
165 frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
166 &ContactEditorData.GeneralAddressListTown,
167 &ContactEditorData.GeneralAddressListCounty,
168 &ContactEditorData.GeneralAddressListPostCode,
169 &ContactEditorData.GeneralAddressListCountry,
170 &ContactEditorData.GeneralAddressListLabel,
171 &ContactEditorData.GeneralAddressListLang,
172 &ContactEditorData.GeneralAddressListAltID,
173 &ContactEditorData.GeneralAddressListPID,
174 &ContactEditorData.GeneralAddressListTokens,
175 &ContactEditorData.GeneralAddressListGeo,
176 &ContactEditorData.GeneralAddressListTimezone,
177 &ContactEditorData.GeneralAddressListType,
178 &ContactEditorData.GeneralAddressListMediatype,
179 &ContactEditorData.GeneralAddressListPref,
182 frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
183 frameCEAddress->ShowModal();
184 delete frameCEAddress;
185 frameCEAddress = NULL;
189 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
192 long longSelected = -1;
193 int intSelectedData = 0;
195 if (!GetSelectedItem(lboAddresses,
203 lboAddresses->DeleteItem(longSelected);
205 DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
206 &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
207 &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
208 &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
209 &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
210 &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
211 &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
212 &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
213 &ContactEditorData.GeneralAddressListPref);
217 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
222 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
223 frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
224 intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
225 frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
226 &ContactEditorData.GeneralEmailListAltID,
227 &ContactEditorData.GeneralEmailListPID,
228 &ContactEditorData.GeneralEmailListType,
229 &ContactEditorData.GeneralEmailListTokens,
230 &ContactEditorData.GeneralEmailListPref,
233 frameCEEmail->ShowModal();
239 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
242 long longSelected = -1;
243 int intSelectedData = 0;
245 if (!GetSelectedItem(lboEmails,
253 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
254 frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
255 &ContactEditorData.GeneralEmailListAltID,
256 &ContactEditorData.GeneralEmailListPID,
257 &ContactEditorData.GeneralEmailListType,
258 &ContactEditorData.GeneralEmailListTokens,
259 &ContactEditorData.GeneralEmailListPref,
262 frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
263 frameCEEmail->ShowModal();
269 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
272 long longSelected = -1;
273 int intSelectedData = 0;
275 if (!GetSelectedItem(lboEmails,
283 lboEmails->DeleteItem(longSelected);
285 DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
286 &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
287 &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
288 &ContactEditorData.GeneralEmailListPref);
292 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
297 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
298 frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
299 intResult = GetLastInt(&ContactEditorData.GeneralIMList);
300 frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
301 &ContactEditorData.GeneralIMListAltID,
302 &ContactEditorData.GeneralIMListPID,
303 &ContactEditorData.GeneralIMListType,
304 &ContactEditorData.GeneralIMListTypeInfo,
305 &ContactEditorData.GeneralIMListTokens,
306 &ContactEditorData.GeneralIMListMediatype,
307 &ContactEditorData.GeneralIMListPref,
310 frameCEIM->ShowModal();
316 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
319 long longSelected = -1;
320 int intSelectedData = 0;
322 if (!GetSelectedItem(lboIM,
330 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
331 frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
332 &ContactEditorData.GeneralIMListAltID,
333 &ContactEditorData.GeneralIMListPID,
334 &ContactEditorData.GeneralIMListType,
335 &ContactEditorData.GeneralIMListTypeInfo,
336 &ContactEditorData.GeneralIMListTokens,
337 &ContactEditorData.GeneralIMListMediatype,
338 &ContactEditorData.GeneralIMListPref,
341 frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
342 frameCEIM->ShowModal();
348 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
351 long longSelected = -1;
352 int intSelectedData = 0;
354 if (!GetSelectedItem(lboIM,
361 lboIM->DeleteItem(longSelected);
363 DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
364 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
365 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
366 &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype,
367 &ContactEditorData.GeneralIMListPref);
371 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
376 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
377 frameCETel->SetEditorMode(FALSE, CE_GENERAL);
378 intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList);
379 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
380 &ContactEditorData.GeneralTelephoneListAltID,
381 &ContactEditorData.GeneralTelephoneListPID,
382 &ContactEditorData.GeneralTelephoneListType,
383 &ContactEditorData.GeneralTelephoneListTypeInfo,
384 &ContactEditorData.GeneralTelephoneListTokens,
385 &ContactEditorData.GeneralTelephoneListPref,
388 frameCETel->ShowModal();
394 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
397 long longSelected = -1;
398 int intSelectedData = 0;
400 if (!GetSelectedItem(lboTelephone,
408 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
409 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
410 &ContactEditorData.GeneralTelephoneListAltID,
411 &ContactEditorData.GeneralTelephoneListPID,
412 &ContactEditorData.GeneralTelephoneListType,
413 &ContactEditorData.GeneralTelephoneListTypeInfo,
414 &ContactEditorData.GeneralTelephoneListTokens,
415 &ContactEditorData.GeneralTelephoneListPref,
418 frameCETel->SetEditorMode(TRUE, CE_GENERAL);
419 frameCETel->ShowModal();
425 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
428 long longSelected = -1;
429 int intSelectedData = 0;
431 if (!GetSelectedItem(lboTelephone,
439 lboTelephone->DeleteItem(longSelected);
441 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
442 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
443 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
444 &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
448 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
453 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
454 frameCELang->SetEditorMode(FALSE, CE_GENERAL);
455 intResult = GetLastInt(&ContactEditorData.GeneralLanguageList);
456 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
457 &ContactEditorData.GeneralLanguageListAltID,
458 &ContactEditorData.GeneralLanguageListPID,
459 &ContactEditorData.GeneralLanguageListType,
460 &ContactEditorData.GeneralLanguageListTokens,
461 &ContactEditorData.GeneralLanguageListPref,
464 frameCELang->ShowModal();
470 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
473 long longSelected = -1;
474 int intSelectedData = 0;
476 if (!GetSelectedItem(lboLanguages,
484 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
485 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
486 &ContactEditorData.GeneralLanguageListAltID,
487 &ContactEditorData.GeneralLanguageListPID,
488 &ContactEditorData.GeneralLanguageListType,
489 &ContactEditorData.GeneralLanguageListTokens,
490 &ContactEditorData.GeneralLanguageListPref,
493 frameCELang->SetEditorMode(TRUE, CE_GENERAL);
494 frameCELang->ShowModal();
500 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
503 long longSelected = -1;
504 int intSelectedData = 0;
506 if (!GetSelectedItem(lboLanguages,
513 lboLanguages->DeleteItem(longSelected);
515 DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
516 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
517 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
518 &ContactEditorData.GeneralLanguageListPref);
522 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
527 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
528 frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
529 intResult = GetLastInt(&ContactEditorData.GeneralTZList);
530 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
531 &ContactEditorData.GeneralTZListAltID,
532 &ContactEditorData.GeneralTZListPID,
533 &ContactEditorData.GeneralTZListType,
534 &ContactEditorData.GeneralTZListTokens,
535 &ContactEditorData.GeneralTZListMediatype,
536 &ContactEditorData.GeneralTZListPref,
539 frameCETZ->ShowModal();
545 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
548 long longSelected = -1;
549 int intSelectedData = 0;
551 if (!GetSelectedItem(lboTimezones,
558 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
559 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
560 &ContactEditorData.GeneralTZListAltID,
561 &ContactEditorData.GeneralTZListPID,
562 &ContactEditorData.GeneralTZListType,
563 &ContactEditorData.GeneralTZListTokens,
564 &ContactEditorData.GeneralTZListMediatype,
565 &ContactEditorData.GeneralTZListPref,
568 frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
569 frameCETZ->ShowModal();
575 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
578 long longSelected = -1;
579 int intSelectedData = 0;
581 if (!GetSelectedItem(lboTimezones,
589 lboTimezones->DeleteItem(longSelected);
591 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
592 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
593 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
594 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
598 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
603 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
604 frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
605 intResult = GetLastInt(&ContactEditorData.GeneralGeographyList);
606 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
607 &ContactEditorData.GeneralGeographyListAltID,
608 &ContactEditorData.GeneralGeographyListPID,
609 &ContactEditorData.GeneralGeographyListType,
610 &ContactEditorData.GeneralGeographyListDataType,
611 &ContactEditorData.GeneralGeographyListTokens,
612 &ContactEditorData.GeneralGeographyListMediatype,
613 &ContactEditorData.GeneralGeographyListPref,
616 frameCEGeo->ShowModal();
622 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
625 long longSelected = -1;
626 int intSelectedData = 0;
628 if (!GetSelectedItem(lboGeoposition,
636 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
637 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
638 &ContactEditorData.GeneralGeographyListAltID,
639 &ContactEditorData.GeneralGeographyListPID,
640 &ContactEditorData.GeneralGeographyListType,
641 &ContactEditorData.GeneralGeographyListDataType,
642 &ContactEditorData.GeneralGeographyListTokens,
643 &ContactEditorData.GeneralGeographyListMediatype,
644 &ContactEditorData.GeneralGeographyListPref,
648 frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
649 frameCEGeo->ShowModal();
655 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
658 long longSelected = -1;
659 int intSelectedData = 0;
661 if (!GetSelectedItem(lboGeoposition,
669 lboGeoposition->DeleteItem(longSelected);
671 DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
672 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
673 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
674 &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype,
675 &ContactEditorData.GeneralGeographyListPref);
679 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
684 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
685 frameCERel->SetEditorMode(FALSE, CE_GENERAL);
686 intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
687 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
688 &ContactEditorData.GeneralRelatedListRelType,
689 &ContactEditorData.GeneralRelatedListAltID,
690 &ContactEditorData.GeneralRelatedListPID,
691 &ContactEditorData.GeneralRelatedListType,
692 &ContactEditorData.GeneralRelatedListTokens,
693 &ContactEditorData.GeneralRelatedListPref,
696 frameCERel->ShowModal();
702 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
705 long longSelected = -1;
706 int intSelectedData = 0;
708 if (!GetSelectedItem(lboRelated,
716 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
717 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
718 &ContactEditorData.GeneralRelatedListRelType,
719 &ContactEditorData.GeneralRelatedListAltID,
720 &ContactEditorData.GeneralRelatedListPID,
721 &ContactEditorData.GeneralRelatedListType,
722 &ContactEditorData.GeneralRelatedListTokens,
723 &ContactEditorData.GeneralRelatedListPref,
726 frameCERel->SetEditorMode(TRUE, CE_GENERAL);
727 frameCERel->ShowModal();
733 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
736 long longSelected = -1;
737 int intSelectedData = 0;
739 if (!GetSelectedItem(lboRelated,
747 lboRelated->DeleteItem(longSelected);
749 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
750 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
751 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
752 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
756 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
761 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
762 frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
763 intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
764 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
765 &ContactEditorData.GeneralWebsiteListAltID,
766 &ContactEditorData.GeneralWebsiteListPID,
767 &ContactEditorData.GeneralWebsiteListType,
768 &ContactEditorData.GeneralWebsiteListTokens,
769 &ContactEditorData.GeneralWebsiteListMediatype,
770 &ContactEditorData.GeneralWebsiteListPref,
773 frameCEWeb->ShowModal();
779 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
782 long longSelected = -1;
783 int intSelectedData = 0;
785 if (!GetSelectedItem(lboWebsites,
793 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
794 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
795 &ContactEditorData.GeneralWebsiteListAltID,
796 &ContactEditorData.GeneralWebsiteListPID,
797 &ContactEditorData.GeneralWebsiteListType,
798 &ContactEditorData.GeneralWebsiteListTokens,
799 &ContactEditorData.GeneralWebsiteListMediatype,
800 &ContactEditorData.GeneralWebsiteListPref,
803 frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
804 frameCEWeb->ShowModal();
810 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
813 long longSelected = -1;
814 int intSelectedData = 0;
816 if (!GetSelectedItem(lboWebsites,
824 lboWebsites->DeleteItem(longSelected);
826 DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
827 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
828 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
829 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
833 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
838 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
839 frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
840 intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
841 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
842 &ContactEditorData.GeneralTitleListLanguage,
843 &ContactEditorData.GeneralTitleListAltID,
844 &ContactEditorData.GeneralTitleListPID,
845 &ContactEditorData.GeneralTitleListType,
846 &ContactEditorData.GeneralTitleListTokens,
847 &ContactEditorData.GeneralTitleListPref,
850 frameCETitle->ShowModal();
856 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
859 long longSelected = -1;
860 int intSelectedData = 0;
862 if (!GetSelectedItem(lboTitles,
870 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
871 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
872 &ContactEditorData.GeneralTitleListLanguage,
873 &ContactEditorData.GeneralTitleListAltID,
874 &ContactEditorData.GeneralTitleListPID,
875 &ContactEditorData.GeneralTitleListType,
876 &ContactEditorData.GeneralTitleListTokens,
877 &ContactEditorData.GeneralTitleListPref,
880 frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
881 frameCETitle->ShowModal();
887 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
890 long longSelected = -1;
891 int intSelectedData = 0;
893 if (!GetSelectedItem(lboTitles,
901 lboTitles->DeleteItem(longSelected);
903 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
904 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
905 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
906 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
910 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
915 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
916 frameCERole->SetEditorMode(FALSE, CE_GENERAL);
917 intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
918 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
919 &ContactEditorData.GeneralRoleListLanguage,
920 &ContactEditorData.GeneralRoleListAltID,
921 &ContactEditorData.GeneralRoleListPID,
922 &ContactEditorData.GeneralRoleListType,
923 &ContactEditorData.GeneralRoleListTokens,
924 &ContactEditorData.GeneralRoleListPref,
927 frameCERole->ShowModal();
933 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
936 long longSelected = -1;
937 int intSelectedData = 0;
939 if (!GetSelectedItem(lboRoles,
947 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
948 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
949 &ContactEditorData.GeneralRoleListLanguage,
950 &ContactEditorData.GeneralRoleListAltID,
951 &ContactEditorData.GeneralRoleListPID,
952 &ContactEditorData.GeneralRoleListType,
953 &ContactEditorData.GeneralRoleListTokens,
954 &ContactEditorData.GeneralRoleListPref,
957 frameCERole->SetEditorMode(TRUE, CE_GENERAL);
958 frameCERole->ShowModal();
964 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
967 long longSelected = -1;
968 int intSelectedData = 0;
970 if (!GetSelectedItem(lboRoles,
978 lboRoles->DeleteItem(longSelected);
980 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
981 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
982 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
983 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
987 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
992 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
993 frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
994 intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
995 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
996 &ContactEditorData.GeneralOrganisationsListLanguage,
997 &ContactEditorData.GeneralOrganisationsListSortAs,
998 &ContactEditorData.GeneralOrganisationsListAltID,
999 &ContactEditorData.GeneralOrganisationsListPID,
1000 &ContactEditorData.GeneralOrganisationsListType,
1001 &ContactEditorData.GeneralOrganisationsListTokens,
1002 &ContactEditorData.GeneralOrganisationsListPref,
1005 frameCEOrg->ShowModal();
1011 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
1014 long longSelected = -1;
1015 int intSelectedData = 0;
1017 if (!GetSelectedItem(lboOrganisations,
1025 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1026 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1027 &ContactEditorData.GeneralOrganisationsListLanguage,
1028 &ContactEditorData.GeneralOrganisationsListSortAs,
1029 &ContactEditorData.GeneralOrganisationsListAltID,
1030 &ContactEditorData.GeneralOrganisationsListPID,
1031 &ContactEditorData.GeneralOrganisationsListType,
1032 &ContactEditorData.GeneralOrganisationsListTokens,
1033 &ContactEditorData.GeneralOrganisationsListPref,
1036 frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
1037 frameCEOrg->ShowModal();
1043 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
1046 long longSelected = -1;
1047 int intSelectedData = 0;
1049 if (!GetSelectedItem(lboOrganisations,
1057 lboOrganisations->DeleteItem(longSelected);
1059 DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
1060 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
1061 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
1062 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
1063 &ContactEditorData.GeneralOrganisationsListPref);
1067 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
1072 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1073 frameCENote->SetEditorMode(FALSE, CE_GENERAL);
1074 intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
1075 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1076 &ContactEditorData.GeneralNoteListLanguage,
1077 &ContactEditorData.GeneralNoteListAltID,
1078 &ContactEditorData.GeneralNoteListPID,
1079 &ContactEditorData.GeneralNoteListType,
1080 &ContactEditorData.GeneralNoteListTokens,
1081 &ContactEditorData.GeneralNoteListPref,
1084 frameCENote->ShowModal();
1090 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
1093 long longSelected = -1;
1094 int intSelectedData = 0;
1096 if (!GetSelectedItem(lboNotes,
1104 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1105 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1106 &ContactEditorData.GeneralNoteListLanguage,
1107 &ContactEditorData.GeneralNoteListAltID,
1108 &ContactEditorData.GeneralNoteListPID,
1109 &ContactEditorData.GeneralNoteListType,
1110 &ContactEditorData.GeneralNoteListTokens,
1111 &ContactEditorData.GeneralNoteListPref,
1114 frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1115 frameCENote->ShowModal();
1121 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1124 long longSelected = -1;
1125 int intSelectedData = 0;
1127 if (!GetSelectedItem(lboNotes,
1134 lboNotes->DeleteItem(longSelected);
1136 DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1137 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1138 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1139 &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);