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.GeneralGeographyListTokens,
559 &ContactEditorData.GeneralGeographyListMediatype,
560 &ContactEditorData.GeneralGeographyListPref,
563 frameCEGeo->ShowModal();
568 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
570 long longSelected = -1;
571 int intSelectedData = 0;
573 if (!GetSelectedItem(lboGeoposition,
579 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
580 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
581 &ContactEditorData.GeneralGeographyListAltID,
582 &ContactEditorData.GeneralGeographyListPID,
583 &ContactEditorData.GeneralGeographyListType,
584 &ContactEditorData.GeneralGeographyListTokens,
585 &ContactEditorData.GeneralGeographyListMediatype,
586 &ContactEditorData.GeneralGeographyListPref,
589 frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
590 frameCEGeo->ShowModal();
595 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
597 long longSelected = -1;
598 int intSelectedData = 0;
600 if (!GetSelectedItem(lboGeoposition,
606 lboGeoposition->DeleteItem(longSelected);
608 DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
609 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
610 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListTokens,
611 &ContactEditorData.GeneralGeographyListMediatype, &ContactEditorData.GeneralGeographyListPref);
615 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
619 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
620 frameCERel->SetEditorMode(FALSE, CE_GENERAL);
621 intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
622 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
623 &ContactEditorData.GeneralRelatedListRelType,
624 &ContactEditorData.GeneralRelatedListAltID,
625 &ContactEditorData.GeneralRelatedListPID,
626 &ContactEditorData.GeneralRelatedListType,
627 &ContactEditorData.GeneralRelatedListTokens,
628 &ContactEditorData.GeneralRelatedListPref,
631 frameCERel->ShowModal();
636 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
638 long longSelected = -1;
639 int intSelectedData = 0;
641 if (!GetSelectedItem(lboRelated,
647 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
648 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
649 &ContactEditorData.GeneralRelatedListRelType,
650 &ContactEditorData.GeneralRelatedListAltID,
651 &ContactEditorData.GeneralRelatedListPID,
652 &ContactEditorData.GeneralRelatedListType,
653 &ContactEditorData.GeneralRelatedListTokens,
654 &ContactEditorData.GeneralRelatedListPref,
657 frameCERel->SetEditorMode(TRUE, CE_GENERAL);
658 frameCERel->ShowModal();
663 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
665 long longSelected = -1;
666 int intSelectedData = 0;
668 if (!GetSelectedItem(lboRelated,
674 lboRelated->DeleteItem(longSelected);
676 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
677 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
678 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
679 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
683 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
687 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
688 frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
689 intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
690 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
691 &ContactEditorData.GeneralWebsiteListAltID,
692 &ContactEditorData.GeneralWebsiteListPID,
693 &ContactEditorData.GeneralWebsiteListType,
694 &ContactEditorData.GeneralWebsiteListTokens,
695 &ContactEditorData.GeneralWebsiteListMediatype,
696 &ContactEditorData.GeneralWebsiteListPref,
699 frameCEWeb->ShowModal();
704 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
706 long longSelected = -1;
707 int intSelectedData = 0;
709 if (!GetSelectedItem(lboWebsites,
715 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
716 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
717 &ContactEditorData.GeneralWebsiteListAltID,
718 &ContactEditorData.GeneralWebsiteListPID,
719 &ContactEditorData.GeneralWebsiteListType,
720 &ContactEditorData.GeneralWebsiteListTokens,
721 &ContactEditorData.GeneralWebsiteListMediatype,
722 &ContactEditorData.GeneralWebsiteListPref,
725 frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
726 frameCEWeb->ShowModal();
731 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
733 long longSelected = -1;
734 int intSelectedData = 0;
736 if (!GetSelectedItem(lboWebsites,
742 lboWebsites->DeleteItem(longSelected);
744 DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
745 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
746 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
747 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
751 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
755 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
756 frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
757 intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
758 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
759 &ContactEditorData.GeneralTitleListLanguage,
760 &ContactEditorData.GeneralTitleListAltID,
761 &ContactEditorData.GeneralTitleListPID,
762 &ContactEditorData.GeneralTitleListType,
763 &ContactEditorData.GeneralTitleListTokens,
764 &ContactEditorData.GeneralTitleListPref,
767 frameCETitle->ShowModal();
772 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
774 long longSelected = -1;
775 int intSelectedData = 0;
777 if (!GetSelectedItem(lboTitles,
783 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
784 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
785 &ContactEditorData.GeneralTitleListLanguage,
786 &ContactEditorData.GeneralTitleListAltID,
787 &ContactEditorData.GeneralTitleListPID,
788 &ContactEditorData.GeneralTitleListType,
789 &ContactEditorData.GeneralTitleListTokens,
790 &ContactEditorData.GeneralTitleListPref,
793 frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
794 frameCETitle->ShowModal();
799 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
801 long longSelected = -1;
802 int intSelectedData = 0;
804 if (!GetSelectedItem(lboTitles,
810 lboTitles->DeleteItem(longSelected);
812 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
813 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
814 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
815 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
819 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
823 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
824 frameCERole->SetEditorMode(FALSE, CE_GENERAL);
825 intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
826 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
827 &ContactEditorData.GeneralRoleListLanguage,
828 &ContactEditorData.GeneralRoleListAltID,
829 &ContactEditorData.GeneralRoleListPID,
830 &ContactEditorData.GeneralRoleListType,
831 &ContactEditorData.GeneralRoleListTokens,
832 &ContactEditorData.GeneralRoleListPref,
835 frameCERole->ShowModal();
840 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
842 long longSelected = -1;
843 int intSelectedData = 0;
845 if (!GetSelectedItem(lboRoles,
851 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
852 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
853 &ContactEditorData.GeneralRoleListLanguage,
854 &ContactEditorData.GeneralRoleListAltID,
855 &ContactEditorData.GeneralRoleListPID,
856 &ContactEditorData.GeneralRoleListType,
857 &ContactEditorData.GeneralRoleListTokens,
858 &ContactEditorData.GeneralRoleListPref,
861 frameCERole->SetEditorMode(TRUE, CE_GENERAL);
862 frameCERole->ShowModal();
867 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
869 long longSelected = -1;
870 int intSelectedData = 0;
872 if (!GetSelectedItem(lboRoles,
878 lboRoles->DeleteItem(longSelected);
880 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
881 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
882 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
883 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
887 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
891 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
892 frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
893 intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
894 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
895 &ContactEditorData.GeneralOrganisationsListLanguage,
896 &ContactEditorData.GeneralOrganisationsListSortAs,
897 &ContactEditorData.GeneralOrganisationsListAltID,
898 &ContactEditorData.GeneralOrganisationsListPID,
899 &ContactEditorData.GeneralOrganisationsListType,
900 &ContactEditorData.GeneralOrganisationsListTokens,
901 &ContactEditorData.GeneralOrganisationsListPref,
904 frameCEOrg->ShowModal();
909 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
911 long longSelected = -1;
912 int intSelectedData = 0;
914 if (!GetSelectedItem(lboOrganisations,
920 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
921 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
922 &ContactEditorData.GeneralOrganisationsListLanguage,
923 &ContactEditorData.GeneralOrganisationsListSortAs,
924 &ContactEditorData.GeneralOrganisationsListAltID,
925 &ContactEditorData.GeneralOrganisationsListPID,
926 &ContactEditorData.GeneralOrganisationsListType,
927 &ContactEditorData.GeneralOrganisationsListTokens,
928 &ContactEditorData.GeneralOrganisationsListPref,
931 frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
932 frameCEOrg->ShowModal();
937 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
939 long longSelected = -1;
940 int intSelectedData = 0;
942 if (!GetSelectedItem(lboOrganisations,
948 lboOrganisations->DeleteItem(longSelected);
950 DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
951 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
952 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
953 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
954 &ContactEditorData.GeneralOrganisationsListPref);
958 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
962 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
963 frameCENote->SetEditorMode(FALSE, CE_GENERAL);
964 intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
965 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
966 &ContactEditorData.GeneralNoteListLanguage,
967 &ContactEditorData.GeneralNoteListAltID,
968 &ContactEditorData.GeneralNoteListPID,
969 &ContactEditorData.GeneralNoteListType,
970 &ContactEditorData.GeneralNoteListTokens,
971 &ContactEditorData.GeneralNoteListPref,
974 frameCENote->ShowModal();
979 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
981 long longSelected = -1;
982 int intSelectedData = 0;
984 if (!GetSelectedItem(lboNotes,
990 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
991 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
992 &ContactEditorData.GeneralNoteListLanguage,
993 &ContactEditorData.GeneralNoteListAltID,
994 &ContactEditorData.GeneralNoteListPID,
995 &ContactEditorData.GeneralNoteListType,
996 &ContactEditorData.GeneralNoteListTokens,
997 &ContactEditorData.GeneralNoteListPref,
1000 frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1001 frameCENote->ShowModal();
1006 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1008 long longSelected = -1;
1009 int intSelectedData = 0;
1011 if (!GetSelectedItem(lboNotes,
1017 lboNotes->DeleteItem(longSelected);
1019 DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1020 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1021 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1022 &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);