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.GeneralIMListTypeInfo,
286 &ContactEditorData.GeneralIMListTokens,
287 &ContactEditorData.GeneralIMListMediatype,
288 &ContactEditorData.GeneralIMListPref,
291 frameCEIM->ShowModal();
296 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
298 long longSelected = -1;
299 int intSelectedData = 0;
301 if (!GetSelectedItem(lboIM,
307 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
308 frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
309 &ContactEditorData.GeneralIMListAltID,
310 &ContactEditorData.GeneralIMListPID,
311 &ContactEditorData.GeneralIMListType,
312 &ContactEditorData.GeneralIMListTypeInfo,
313 &ContactEditorData.GeneralIMListTokens,
314 &ContactEditorData.GeneralIMListMediatype,
315 &ContactEditorData.GeneralIMListPref,
318 frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
319 frameCEIM->ShowModal();
324 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
326 long longSelected = -1;
327 int intSelectedData = 0;
329 if (!GetSelectedItem(lboIM,
335 lboIM->DeleteItem(longSelected);
337 DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
338 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
339 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
340 &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype,
341 &ContactEditorData.GeneralIMListPref);
345 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
349 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
350 frameCETel->SetEditorMode(FALSE, CE_GENERAL);
351 intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList);
352 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
353 &ContactEditorData.GeneralTelephoneListAltID,
354 &ContactEditorData.GeneralTelephoneListPID,
355 &ContactEditorData.GeneralTelephoneListType,
356 &ContactEditorData.GeneralTelephoneListTypeInfo,
357 &ContactEditorData.GeneralTelephoneListTokens,
358 &ContactEditorData.GeneralTelephoneListPref,
361 frameCETel->ShowModal();
366 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
368 long longSelected = -1;
369 int intSelectedData = 0;
371 if (!GetSelectedItem(lboTelephone,
377 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
378 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
379 &ContactEditorData.GeneralTelephoneListAltID,
380 &ContactEditorData.GeneralTelephoneListPID,
381 &ContactEditorData.GeneralTelephoneListType,
382 &ContactEditorData.GeneralTelephoneListTypeInfo,
383 &ContactEditorData.GeneralTelephoneListTokens,
384 &ContactEditorData.GeneralTelephoneListPref,
387 frameCETel->SetEditorMode(TRUE, CE_GENERAL);
388 frameCETel->ShowModal();
393 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
395 long longSelected = -1;
396 int intSelectedData = 0;
398 if (!GetSelectedItem(lboTelephone,
404 lboTelephone->DeleteItem(longSelected);
406 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
407 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
408 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
409 &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
413 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
417 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
418 frameCELang->SetEditorMode(FALSE, CE_GENERAL);
419 intResult = GetLastInt(&ContactEditorData.GeneralLanguageList);
420 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
421 &ContactEditorData.GeneralLanguageListAltID,
422 &ContactEditorData.GeneralLanguageListPID,
423 &ContactEditorData.GeneralLanguageListType,
424 &ContactEditorData.GeneralLanguageListTokens,
425 &ContactEditorData.GeneralLanguageListPref,
428 frameCELang->ShowModal();
433 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
435 long longSelected = -1;
436 int intSelectedData = 0;
438 if (!GetSelectedItem(lboLanguages,
444 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
445 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
446 &ContactEditorData.GeneralLanguageListAltID,
447 &ContactEditorData.GeneralLanguageListPID,
448 &ContactEditorData.GeneralLanguageListType,
449 &ContactEditorData.GeneralLanguageListTokens,
450 &ContactEditorData.GeneralLanguageListPref,
453 frameCELang->SetEditorMode(TRUE, CE_GENERAL);
454 frameCELang->ShowModal();
459 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
461 long longSelected = -1;
462 int intSelectedData = 0;
464 if (!GetSelectedItem(lboLanguages,
470 lboLanguages->DeleteItem(longSelected);
472 DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
473 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
474 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
475 &ContactEditorData.GeneralLanguageListPref);
479 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
483 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
484 frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
485 intResult = GetLastInt(&ContactEditorData.GeneralTZList);
486 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
487 &ContactEditorData.GeneralTZListAltID,
488 &ContactEditorData.GeneralTZListPID,
489 &ContactEditorData.GeneralTZListType,
490 &ContactEditorData.GeneralTZListTokens,
491 &ContactEditorData.GeneralTZListMediatype,
492 &ContactEditorData.GeneralTZListPref,
495 frameCETZ->ShowModal();
500 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
502 long longSelected = -1;
503 int intSelectedData = 0;
505 if (!GetSelectedItem(lboTimezones,
511 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
512 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
513 &ContactEditorData.GeneralTZListAltID,
514 &ContactEditorData.GeneralTZListPID,
515 &ContactEditorData.GeneralTZListType,
516 &ContactEditorData.GeneralTZListTokens,
517 &ContactEditorData.GeneralTZListMediatype,
518 &ContactEditorData.GeneralTZListPref,
521 frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
522 frameCETZ->ShowModal();
527 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
529 long longSelected = -1;
530 int intSelectedData = 0;
532 if (!GetSelectedItem(lboTimezones,
538 lboTimezones->DeleteItem(longSelected);
540 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
541 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
542 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
543 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
547 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
551 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
552 frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
553 intResult = GetLastInt(&ContactEditorData.GeneralGeographyList);
554 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
555 &ContactEditorData.GeneralGeographyListAltID,
556 &ContactEditorData.GeneralGeographyListPID,
557 &ContactEditorData.GeneralGeographyListType,
558 &ContactEditorData.GeneralGeographyListDataType,
559 &ContactEditorData.GeneralGeographyListTokens,
560 &ContactEditorData.GeneralGeographyListMediatype,
561 &ContactEditorData.GeneralGeographyListPref,
564 frameCEGeo->ShowModal();
569 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
571 long longSelected = -1;
572 int intSelectedData = 0;
574 if (!GetSelectedItem(lboGeoposition,
580 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
581 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
582 &ContactEditorData.GeneralGeographyListAltID,
583 &ContactEditorData.GeneralGeographyListPID,
584 &ContactEditorData.GeneralGeographyListType,
585 &ContactEditorData.GeneralGeographyListDataType,
586 &ContactEditorData.GeneralGeographyListTokens,
587 &ContactEditorData.GeneralGeographyListMediatype,
588 &ContactEditorData.GeneralGeographyListPref,
591 frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
592 frameCEGeo->ShowModal();
597 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
599 long longSelected = -1;
600 int intSelectedData = 0;
602 if (!GetSelectedItem(lboGeoposition,
608 lboGeoposition->DeleteItem(longSelected);
610 DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
611 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
612 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
613 &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype,
614 &ContactEditorData.GeneralGeographyListPref);
618 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
622 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
623 frameCERel->SetEditorMode(FALSE, CE_GENERAL);
624 intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
625 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
626 &ContactEditorData.GeneralRelatedListRelType,
627 &ContactEditorData.GeneralRelatedListAltID,
628 &ContactEditorData.GeneralRelatedListPID,
629 &ContactEditorData.GeneralRelatedListType,
630 &ContactEditorData.GeneralRelatedListTokens,
631 &ContactEditorData.GeneralRelatedListPref,
634 frameCERel->ShowModal();
639 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
641 long longSelected = -1;
642 int intSelectedData = 0;
644 if (!GetSelectedItem(lboRelated,
650 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
651 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
652 &ContactEditorData.GeneralRelatedListRelType,
653 &ContactEditorData.GeneralRelatedListAltID,
654 &ContactEditorData.GeneralRelatedListPID,
655 &ContactEditorData.GeneralRelatedListType,
656 &ContactEditorData.GeneralRelatedListTokens,
657 &ContactEditorData.GeneralRelatedListPref,
660 frameCERel->SetEditorMode(TRUE, CE_GENERAL);
661 frameCERel->ShowModal();
666 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
668 long longSelected = -1;
669 int intSelectedData = 0;
671 if (!GetSelectedItem(lboRelated,
677 lboRelated->DeleteItem(longSelected);
679 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
680 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
681 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
682 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
686 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
690 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
691 frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
692 intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
693 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
694 &ContactEditorData.GeneralWebsiteListAltID,
695 &ContactEditorData.GeneralWebsiteListPID,
696 &ContactEditorData.GeneralWebsiteListType,
697 &ContactEditorData.GeneralWebsiteListTokens,
698 &ContactEditorData.GeneralWebsiteListMediatype,
699 &ContactEditorData.GeneralWebsiteListPref,
702 frameCEWeb->ShowModal();
707 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
709 long longSelected = -1;
710 int intSelectedData = 0;
712 if (!GetSelectedItem(lboWebsites,
718 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
719 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
720 &ContactEditorData.GeneralWebsiteListAltID,
721 &ContactEditorData.GeneralWebsiteListPID,
722 &ContactEditorData.GeneralWebsiteListType,
723 &ContactEditorData.GeneralWebsiteListTokens,
724 &ContactEditorData.GeneralWebsiteListMediatype,
725 &ContactEditorData.GeneralWebsiteListPref,
728 frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
729 frameCEWeb->ShowModal();
734 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
736 long longSelected = -1;
737 int intSelectedData = 0;
739 if (!GetSelectedItem(lboWebsites,
745 lboWebsites->DeleteItem(longSelected);
747 DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
748 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
749 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
750 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
754 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
758 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
759 frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
760 intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
761 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
762 &ContactEditorData.GeneralTitleListLanguage,
763 &ContactEditorData.GeneralTitleListAltID,
764 &ContactEditorData.GeneralTitleListPID,
765 &ContactEditorData.GeneralTitleListType,
766 &ContactEditorData.GeneralTitleListTokens,
767 &ContactEditorData.GeneralTitleListPref,
770 frameCETitle->ShowModal();
775 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
777 long longSelected = -1;
778 int intSelectedData = 0;
780 if (!GetSelectedItem(lboTitles,
786 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
787 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
788 &ContactEditorData.GeneralTitleListLanguage,
789 &ContactEditorData.GeneralTitleListAltID,
790 &ContactEditorData.GeneralTitleListPID,
791 &ContactEditorData.GeneralTitleListType,
792 &ContactEditorData.GeneralTitleListTokens,
793 &ContactEditorData.GeneralTitleListPref,
796 frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
797 frameCETitle->ShowModal();
802 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
804 long longSelected = -1;
805 int intSelectedData = 0;
807 if (!GetSelectedItem(lboTitles,
813 lboTitles->DeleteItem(longSelected);
815 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
816 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
817 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
818 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
822 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
826 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
827 frameCERole->SetEditorMode(FALSE, CE_GENERAL);
828 intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
829 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
830 &ContactEditorData.GeneralRoleListLanguage,
831 &ContactEditorData.GeneralRoleListAltID,
832 &ContactEditorData.GeneralRoleListPID,
833 &ContactEditorData.GeneralRoleListType,
834 &ContactEditorData.GeneralRoleListTokens,
835 &ContactEditorData.GeneralRoleListPref,
838 frameCERole->ShowModal();
843 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
845 long longSelected = -1;
846 int intSelectedData = 0;
848 if (!GetSelectedItem(lboRoles,
854 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
855 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
856 &ContactEditorData.GeneralRoleListLanguage,
857 &ContactEditorData.GeneralRoleListAltID,
858 &ContactEditorData.GeneralRoleListPID,
859 &ContactEditorData.GeneralRoleListType,
860 &ContactEditorData.GeneralRoleListTokens,
861 &ContactEditorData.GeneralRoleListPref,
864 frameCERole->SetEditorMode(TRUE, CE_GENERAL);
865 frameCERole->ShowModal();
870 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
872 long longSelected = -1;
873 int intSelectedData = 0;
875 if (!GetSelectedItem(lboRoles,
881 lboRoles->DeleteItem(longSelected);
883 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
884 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
885 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
886 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
890 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
894 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
895 frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
896 intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
897 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
898 &ContactEditorData.GeneralOrganisationsListLanguage,
899 &ContactEditorData.GeneralOrganisationsListSortAs,
900 &ContactEditorData.GeneralOrganisationsListAltID,
901 &ContactEditorData.GeneralOrganisationsListPID,
902 &ContactEditorData.GeneralOrganisationsListType,
903 &ContactEditorData.GeneralOrganisationsListTokens,
904 &ContactEditorData.GeneralOrganisationsListPref,
907 frameCEOrg->ShowModal();
912 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
914 long longSelected = -1;
915 int intSelectedData = 0;
917 if (!GetSelectedItem(lboOrganisations,
923 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
924 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
925 &ContactEditorData.GeneralOrganisationsListLanguage,
926 &ContactEditorData.GeneralOrganisationsListSortAs,
927 &ContactEditorData.GeneralOrganisationsListAltID,
928 &ContactEditorData.GeneralOrganisationsListPID,
929 &ContactEditorData.GeneralOrganisationsListType,
930 &ContactEditorData.GeneralOrganisationsListTokens,
931 &ContactEditorData.GeneralOrganisationsListPref,
934 frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
935 frameCEOrg->ShowModal();
940 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
942 long longSelected = -1;
943 int intSelectedData = 0;
945 if (!GetSelectedItem(lboOrganisations,
951 lboOrganisations->DeleteItem(longSelected);
953 DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
954 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
955 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
956 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
957 &ContactEditorData.GeneralOrganisationsListPref);
961 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
965 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
966 frameCENote->SetEditorMode(FALSE, CE_GENERAL);
967 intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
968 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
969 &ContactEditorData.GeneralNoteListLanguage,
970 &ContactEditorData.GeneralNoteListAltID,
971 &ContactEditorData.GeneralNoteListPID,
972 &ContactEditorData.GeneralNoteListType,
973 &ContactEditorData.GeneralNoteListTokens,
974 &ContactEditorData.GeneralNoteListPref,
977 frameCENote->ShowModal();
982 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
984 long longSelected = -1;
985 int intSelectedData = 0;
987 if (!GetSelectedItem(lboNotes,
993 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
994 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
995 &ContactEditorData.GeneralNoteListLanguage,
996 &ContactEditorData.GeneralNoteListAltID,
997 &ContactEditorData.GeneralNoteListPID,
998 &ContactEditorData.GeneralNoteListType,
999 &ContactEditorData.GeneralNoteListTokens,
1000 &ContactEditorData.GeneralNoteListPref,
1003 frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1004 frameCENote->ShowModal();
1009 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1011 long longSelected = -1;
1012 int intSelectedData = 0;
1014 if (!GetSelectedItem(lboNotes,
1020 lboNotes->DeleteItem(longSelected);
1022 DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1023 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1024 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1025 &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);