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 )
39 // Bring up the window for adding a nickname.
41 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42 frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
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;
58 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
61 // Bring up the window for modifying a nickname.
63 long longSelected = -1;
64 int intSelectedData = 0;
66 if (!GetSelectedItem(lboNicknames,
72 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
73 frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
74 &ContactEditorData.GeneralNicknamesListAltID,
75 &ContactEditorData.GeneralNicknamesListPID,
76 &ContactEditorData.GeneralNicknamesListType,
77 &ContactEditorData.GeneralNicknamesListLanguage,
78 &ContactEditorData.GeneralNicknamesListTokens,
79 &ContactEditorData.GeneralNicknamesListPref,
82 frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
83 frameCENickname->ShowModal();
84 delete frameCENickname;
85 frameCENickname = NULL;
89 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
92 // Bring up the window for deleting a nickname.
94 long longSelected = -1;
95 int intSelectedData = 0;
97 if (!GetSelectedItem(lboNicknames,
103 lboNicknames->DeleteItem(longSelected);
105 DeleteMapData(intSelectedData,
106 &ContactEditorData.GeneralNicknamesList,
107 &ContactEditorData.GeneralNicknamesListLanguage,
108 &ContactEditorData.GeneralNicknamesListAltID,
109 &ContactEditorData.GeneralNicknamesListPID,
110 &ContactEditorData.GeneralNicknamesListTokens,
111 &ContactEditorData.GeneralNicknamesListType,
112 &ContactEditorData.GeneralNicknamesListPref);
116 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
119 // Bring up the window for adding an address.
121 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
122 frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
123 frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
124 &ContactEditorData.GeneralAddressListTown,
125 &ContactEditorData.GeneralAddressListCounty,
126 &ContactEditorData.GeneralAddressListPostCode,
127 &ContactEditorData.GeneralAddressListCountry,
128 &ContactEditorData.GeneralAddressListLabel,
129 &ContactEditorData.GeneralAddressListLang,
130 &ContactEditorData.GeneralAddressListAltID,
131 &ContactEditorData.GeneralAddressListPID,
132 &ContactEditorData.GeneralAddressListTokens,
133 &ContactEditorData.GeneralAddressListGeo,
134 &ContactEditorData.GeneralAddressListTimezone,
135 &ContactEditorData.GeneralAddressListType,
136 &ContactEditorData.GeneralAddressListMediatype,
137 &ContactEditorData.GeneralAddressListPref,
140 frameCEAddress->ShowModal();
141 delete frameCEAddress;
142 frameCEAddress = NULL;
146 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
149 // Bring up the window for editing an address.
151 long longSelected = -1;
152 int intSelectedData = 0;
154 if (!GetSelectedItem(lboAddresses,
162 if (longSelected == -1){
168 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
169 frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
170 &ContactEditorData.GeneralAddressListTown,
171 &ContactEditorData.GeneralAddressListCounty,
172 &ContactEditorData.GeneralAddressListPostCode,
173 &ContactEditorData.GeneralAddressListCountry,
174 &ContactEditorData.GeneralAddressListLabel,
175 &ContactEditorData.GeneralAddressListLang,
176 &ContactEditorData.GeneralAddressListAltID,
177 &ContactEditorData.GeneralAddressListPID,
178 &ContactEditorData.GeneralAddressListTokens,
179 &ContactEditorData.GeneralAddressListGeo,
180 &ContactEditorData.GeneralAddressListTimezone,
181 &ContactEditorData.GeneralAddressListType,
182 &ContactEditorData.GeneralAddressListMediatype,
183 &ContactEditorData.GeneralAddressListPref,
186 frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
187 frameCEAddress->ShowModal();
188 delete frameCEAddress;
189 frameCEAddress = NULL;
193 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
196 // Bring up the window for deleting a nickname.
198 long longSelected = -1;
199 int intSelectedData = 0;
201 if (!GetSelectedItem(lboAddresses,
209 lboAddresses->DeleteItem(longSelected);
211 DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
212 &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
213 &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
214 &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
215 &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
216 &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
217 &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
218 &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
219 &ContactEditorData.GeneralAddressListPref);
223 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
226 // Bring up the window for adding an email.
228 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
229 frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
230 frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
231 &ContactEditorData.GeneralEmailListAltID,
232 &ContactEditorData.GeneralEmailListPID,
233 &ContactEditorData.GeneralEmailListType,
234 &ContactEditorData.GeneralEmailListTokens,
235 &ContactEditorData.GeneralEmailListPref,
238 frameCEEmail->ShowModal();
244 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
247 // Bring up the window for modifying an email.
249 long longSelected = -1;
250 int intSelectedData = 0;
252 if (!GetSelectedItem(lboEmails,
260 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
261 frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
262 &ContactEditorData.GeneralEmailListAltID,
263 &ContactEditorData.GeneralEmailListPID,
264 &ContactEditorData.GeneralEmailListType,
265 &ContactEditorData.GeneralEmailListTokens,
266 &ContactEditorData.GeneralEmailListPref,
269 frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
270 frameCEEmail->ShowModal();
276 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
279 // Bring up the window for deleting an email.
281 long longSelected = -1;
282 int intSelectedData = 0;
284 if (!GetSelectedItem(lboEmails,
292 lboEmails->DeleteItem(longSelected);
294 DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
295 &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
296 &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
297 &ContactEditorData.GeneralEmailListPref);
301 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
304 // Bring up the window for adding a IM address.
306 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
307 frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
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->ShowModal();
324 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
327 // Bring up the window for editing a IM address.
329 long longSelected = -1;
330 int intSelectedData = 0;
332 if (!GetSelectedItem(lboIM,
340 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
341 frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
342 &ContactEditorData.GeneralIMListAltID,
343 &ContactEditorData.GeneralIMListPID,
344 &ContactEditorData.GeneralIMListType,
345 &ContactEditorData.GeneralIMListTypeInfo,
346 &ContactEditorData.GeneralIMListTokens,
347 &ContactEditorData.GeneralIMListMediatype,
348 &ContactEditorData.GeneralIMListPref,
351 frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
352 frameCEIM->ShowModal();
358 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
361 // Bring up the window for deleting an IM address.
363 long longSelected = -1;
364 int intSelectedData = 0;
366 if (!GetSelectedItem(lboIM,
373 lboIM->DeleteItem(longSelected);
375 DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
376 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
377 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
378 &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype,
379 &ContactEditorData.GeneralIMListPref);
383 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
386 // Bring up the window for adding a telephone.
388 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
389 frameCETel->SetEditorMode(FALSE, CE_GENERAL);
390 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
391 &ContactEditorData.GeneralTelephoneListAltID,
392 &ContactEditorData.GeneralTelephoneListPID,
393 &ContactEditorData.GeneralTelephoneListType,
394 &ContactEditorData.GeneralTelephoneListTypeInfo,
395 &ContactEditorData.GeneralTelephoneListTokens,
396 &ContactEditorData.GeneralTelephoneListPref,
399 frameCETel->ShowModal();
405 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
408 // Bring up the window for editing a telephone.
410 long longSelected = -1;
411 int intSelectedData = 0;
413 if (!GetSelectedItem(lboTelephone,
421 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
422 frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
423 &ContactEditorData.GeneralTelephoneListAltID,
424 &ContactEditorData.GeneralTelephoneListPID,
425 &ContactEditorData.GeneralTelephoneListType,
426 &ContactEditorData.GeneralTelephoneListTypeInfo,
427 &ContactEditorData.GeneralTelephoneListTokens,
428 &ContactEditorData.GeneralTelephoneListPref,
431 frameCETel->SetEditorMode(TRUE, CE_GENERAL);
432 frameCETel->ShowModal();
438 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
441 // Bring up the window for deleting a telephone.
443 long longSelected = -1;
444 int intSelectedData = 0;
446 if (!GetSelectedItem(lboTelephone,
454 lboTelephone->DeleteItem(longSelected);
456 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
457 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
458 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
459 &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
463 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
466 // Bring up the window for adding a language.
468 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
469 frameCELang->SetEditorMode(FALSE, CE_GENERAL);
470 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
471 &ContactEditorData.GeneralLanguageListAltID,
472 &ContactEditorData.GeneralLanguageListPID,
473 &ContactEditorData.GeneralLanguageListType,
474 &ContactEditorData.GeneralLanguageListTokens,
475 &ContactEditorData.GeneralLanguageListPref,
478 frameCELang->ShowModal();
484 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
487 // Bring up the window for modifying a language.
489 long longSelected = -1;
490 int intSelectedData = 0;
492 if (!GetSelectedItem(lboLanguages,
500 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
501 frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
502 &ContactEditorData.GeneralLanguageListAltID,
503 &ContactEditorData.GeneralLanguageListPID,
504 &ContactEditorData.GeneralLanguageListType,
505 &ContactEditorData.GeneralLanguageListTokens,
506 &ContactEditorData.GeneralLanguageListPref,
509 frameCELang->SetEditorMode(TRUE, CE_GENERAL);
510 frameCELang->ShowModal();
516 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
519 // Bring up the window for deleting a language.
521 long longSelected = -1;
522 int intSelectedData = 0;
524 if (!GetSelectedItem(lboLanguages,
531 lboLanguages->DeleteItem(longSelected);
533 DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
534 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
535 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
536 &ContactEditorData.GeneralLanguageListPref);
540 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
543 // Bring up the window for adding a timezone.
545 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
546 frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
547 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
548 &ContactEditorData.GeneralTZListAltID,
549 &ContactEditorData.GeneralTZListPID,
550 &ContactEditorData.GeneralTZListType,
551 &ContactEditorData.GeneralTZListTokens,
552 &ContactEditorData.GeneralTZListMediatype,
553 &ContactEditorData.GeneralTZListPref,
556 frameCETZ->ShowModal();
562 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
565 // Bring up a window for editing a timezone.
567 long longSelected = -1;
568 int intSelectedData = 0;
570 if (!GetSelectedItem(lboTimezones,
577 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
578 frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
579 &ContactEditorData.GeneralTZListAltID,
580 &ContactEditorData.GeneralTZListPID,
581 &ContactEditorData.GeneralTZListType,
582 &ContactEditorData.GeneralTZListTokens,
583 &ContactEditorData.GeneralTZListMediatype,
584 &ContactEditorData.GeneralTZListPref,
587 frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
588 frameCETZ->ShowModal();
594 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
597 // Bring up the window for deleting a timezone.
599 long longSelected = -1;
600 int intSelectedData = 0;
602 if (!GetSelectedItem(lboTimezones,
610 lboTimezones->DeleteItem(longSelected);
612 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
613 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
614 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
615 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
619 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
622 // Bring up the window for adding a geoposition location.
624 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
625 frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
626 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
627 &ContactEditorData.GeneralGeographyListAltID,
628 &ContactEditorData.GeneralGeographyListPID,
629 &ContactEditorData.GeneralGeographyListType,
630 &ContactEditorData.GeneralGeographyListDataType,
631 &ContactEditorData.GeneralGeographyListTokens,
632 &ContactEditorData.GeneralGeographyListMediatype,
633 &ContactEditorData.GeneralGeographyListPref,
636 frameCEGeo->ShowModal();
642 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
645 // Bring up the window for editing a geoposition location.
647 long longSelected = -1;
648 int intSelectedData = 0;
650 if (!GetSelectedItem(lboGeoposition,
658 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
659 frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
660 &ContactEditorData.GeneralGeographyListAltID,
661 &ContactEditorData.GeneralGeographyListPID,
662 &ContactEditorData.GeneralGeographyListType,
663 &ContactEditorData.GeneralGeographyListDataType,
664 &ContactEditorData.GeneralGeographyListTokens,
665 &ContactEditorData.GeneralGeographyListMediatype,
666 &ContactEditorData.GeneralGeographyListPref,
670 frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
671 frameCEGeo->ShowModal();
677 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
680 // Bring up the window for deleting a geoposition location.
682 long longSelected = -1;
683 int intSelectedData = 0;
685 if (!GetSelectedItem(lboGeoposition,
693 lboGeoposition->DeleteItem(longSelected);
695 DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
696 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
697 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
698 &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype,
699 &ContactEditorData.GeneralGeographyListPref);
703 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
706 // Bring up the window for adding a relation.
708 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
709 frameCERel->SetEditorMode(FALSE, CE_GENERAL);
710 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
711 &ContactEditorData.GeneralRelatedListRelType,
712 &ContactEditorData.GeneralRelatedListAltID,
713 &ContactEditorData.GeneralRelatedListPID,
714 &ContactEditorData.GeneralRelatedListType,
715 &ContactEditorData.GeneralRelatedListTokens,
716 &ContactEditorData.GeneralRelatedListPref,
719 frameCERel->ShowModal();
725 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
728 // Bring up the window for editing a relation.
730 long longSelected = -1;
731 int intSelectedData = 0;
733 if (!GetSelectedItem(lboRelated,
741 frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
742 frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
743 &ContactEditorData.GeneralRelatedListRelType,
744 &ContactEditorData.GeneralRelatedListAltID,
745 &ContactEditorData.GeneralRelatedListPID,
746 &ContactEditorData.GeneralRelatedListType,
747 &ContactEditorData.GeneralRelatedListTokens,
748 &ContactEditorData.GeneralRelatedListPref,
751 frameCERel->SetEditorMode(TRUE, CE_GENERAL);
752 frameCERel->ShowModal();
758 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
761 // Bring up a window for deleting a relation.
763 long longSelected = -1;
764 int intSelectedData = 0;
766 if (!GetSelectedItem(lboRelated,
774 lboRelated->DeleteItem(longSelected);
776 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
777 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
778 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
779 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
783 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
786 // Bring up a window for adding a website.
788 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
789 frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
790 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
791 &ContactEditorData.GeneralWebsiteListAltID,
792 &ContactEditorData.GeneralWebsiteListPID,
793 &ContactEditorData.GeneralWebsiteListType,
794 &ContactEditorData.GeneralWebsiteListTokens,
795 &ContactEditorData.GeneralWebsiteListMediatype,
796 &ContactEditorData.GeneralWebsiteListPref,
799 frameCEWeb->ShowModal();
805 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
808 // Bring up a window for editing a website.
810 long longSelected = -1;
811 int intSelectedData = 0;
813 if (!GetSelectedItem(lboWebsites,
821 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
822 frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
823 &ContactEditorData.GeneralWebsiteListAltID,
824 &ContactEditorData.GeneralWebsiteListPID,
825 &ContactEditorData.GeneralWebsiteListType,
826 &ContactEditorData.GeneralWebsiteListTokens,
827 &ContactEditorData.GeneralWebsiteListMediatype,
828 &ContactEditorData.GeneralWebsiteListPref,
831 frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
832 frameCEWeb->ShowModal();
838 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
841 // Bring up a window for deleting a website.
843 long longSelected = -1;
844 int intSelectedData = 0;
846 if (!GetSelectedItem(lboWebsites,
854 lboWebsites->DeleteItem(longSelected);
856 DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
857 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
858 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
859 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
863 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
866 // Bring up the window for adding a title.
868 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
869 frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
870 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
871 &ContactEditorData.GeneralTitleListLanguage,
872 &ContactEditorData.GeneralTitleListAltID,
873 &ContactEditorData.GeneralTitleListPID,
874 &ContactEditorData.GeneralTitleListType,
875 &ContactEditorData.GeneralTitleListTokens,
876 &ContactEditorData.GeneralTitleListPref,
879 frameCETitle->ShowModal();
885 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
888 // Bring up the window for editing a title.
890 long longSelected = -1;
891 int intSelectedData = 0;
893 if (!GetSelectedItem(lboTitles,
901 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
902 frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
903 &ContactEditorData.GeneralTitleListLanguage,
904 &ContactEditorData.GeneralTitleListAltID,
905 &ContactEditorData.GeneralTitleListPID,
906 &ContactEditorData.GeneralTitleListType,
907 &ContactEditorData.GeneralTitleListTokens,
908 &ContactEditorData.GeneralTitleListPref,
911 frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
912 frameCETitle->ShowModal();
918 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
921 // Bring up the window for deleting a title.
923 long longSelected = -1;
924 int intSelectedData = 0;
926 if (!GetSelectedItem(lboTitles,
934 lboTitles->DeleteItem(longSelected);
936 DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
937 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
938 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
939 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
943 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
946 // Bring up the window for adding a role.
948 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
949 frameCERole->SetEditorMode(FALSE, CE_GENERAL);
950 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
951 &ContactEditorData.GeneralRoleListLanguage,
952 &ContactEditorData.GeneralRoleListAltID,
953 &ContactEditorData.GeneralRoleListPID,
954 &ContactEditorData.GeneralRoleListType,
955 &ContactEditorData.GeneralRoleListTokens,
956 &ContactEditorData.GeneralRoleListPref,
959 frameCERole->ShowModal();
965 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
968 // Bring up the window for editing a role.
970 long longSelected = -1;
971 int intSelectedData = 0;
973 if (!GetSelectedItem(lboRoles,
981 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
982 frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
983 &ContactEditorData.GeneralRoleListLanguage,
984 &ContactEditorData.GeneralRoleListAltID,
985 &ContactEditorData.GeneralRoleListPID,
986 &ContactEditorData.GeneralRoleListType,
987 &ContactEditorData.GeneralRoleListTokens,
988 &ContactEditorData.GeneralRoleListPref,
991 frameCERole->SetEditorMode(TRUE, CE_GENERAL);
992 frameCERole->ShowModal();
998 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
1001 // Bring up the window for deleting a role.
1003 long longSelected = -1;
1004 int intSelectedData = 0;
1006 if (!GetSelectedItem(lboRoles,
1014 lboRoles->DeleteItem(longSelected);
1016 DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
1017 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
1018 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
1019 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
1023 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
1026 // Bring up the window for adding an organisation.
1028 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1029 frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
1030 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1031 &ContactEditorData.GeneralOrganisationsListLanguage,
1032 &ContactEditorData.GeneralOrganisationsListSortAs,
1033 &ContactEditorData.GeneralOrganisationsListAltID,
1034 &ContactEditorData.GeneralOrganisationsListPID,
1035 &ContactEditorData.GeneralOrganisationsListType,
1036 &ContactEditorData.GeneralOrganisationsListTokens,
1037 &ContactEditorData.GeneralOrganisationsListPref,
1040 frameCEOrg->ShowModal();
1046 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
1049 // Bring up the window for editing an organisation.
1051 long longSelected = -1;
1052 int intSelectedData = 0;
1054 if (!GetSelectedItem(lboOrganisations,
1062 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1063 frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1064 &ContactEditorData.GeneralOrganisationsListLanguage,
1065 &ContactEditorData.GeneralOrganisationsListSortAs,
1066 &ContactEditorData.GeneralOrganisationsListAltID,
1067 &ContactEditorData.GeneralOrganisationsListPID,
1068 &ContactEditorData.GeneralOrganisationsListType,
1069 &ContactEditorData.GeneralOrganisationsListTokens,
1070 &ContactEditorData.GeneralOrganisationsListPref,
1073 frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
1074 frameCEOrg->ShowModal();
1080 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
1083 // Bring up the window for deleting an organisation.
1085 long longSelected = -1;
1086 int intSelectedData = 0;
1088 if (!GetSelectedItem(lboOrganisations,
1096 lboOrganisations->DeleteItem(longSelected);
1098 DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
1099 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
1100 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
1101 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
1102 &ContactEditorData.GeneralOrganisationsListPref);
1106 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
1109 // Bring up the window for adding a note.
1111 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1112 frameCENote->SetEditorMode(FALSE, CE_GENERAL);
1113 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1114 &ContactEditorData.GeneralNoteListLanguage,
1115 &ContactEditorData.GeneralNoteListAltID,
1116 &ContactEditorData.GeneralNoteListPID,
1117 &ContactEditorData.GeneralNoteListType,
1118 &ContactEditorData.GeneralNoteListTokens,
1119 &ContactEditorData.GeneralNoteListPref,
1122 frameCENote->ShowModal();
1128 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
1131 // Bring up the window for editing a note.
1133 long longSelected = -1;
1134 int intSelectedData = 0;
1136 if (!GetSelectedItem(lboNotes,
1144 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1145 frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1146 &ContactEditorData.GeneralNoteListLanguage,
1147 &ContactEditorData.GeneralNoteListAltID,
1148 &ContactEditorData.GeneralNoteListPID,
1149 &ContactEditorData.GeneralNoteListType,
1150 &ContactEditorData.GeneralNoteListTokens,
1151 &ContactEditorData.GeneralNoteListPref,
1154 frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1155 frameCENote->ShowModal();
1161 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1164 // Bring up a window for deleting a note.
1166 long longSelected = -1;
1167 int intSelectedData = 0;
1169 if (!GetSelectedItem(lboNotes,
1176 lboNotes->DeleteItem(longSelected);
1178 DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1179 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1180 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1181 &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);