// frmContactEditor-General.cpp - frmContactEditor General tab subroutines. // // (c) 2012-2016 Xestia Software Development. // // This file is part of Xestia Address Book. // // Xestia Address Book is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by the // Free Software Foundation, version 3 of the license. // // Xestia Address Book is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along // with Xestia Address Book. If not, see #include "frmContactEditor.h" #include "frmContactEditorNickname.h" #include "frmContactEditorAddress.h" #include "frmContactEditorEmail.h" #include "frmContactEditorIM.h" #include "frmContactEditorTelephone.h" #include "frmContactEditorLanguages.h" #include "frmContactEditorTimezones.h" #include "frmContactEditorRelated.h" #include "frmContactEditorWebsites.h" #include "frmContactEditorTitles.h" #include "frmContactEditorRoles.h" #include "frmContactEditorGeoposition.h" #include "frmContactEditorGroups.h" #include "frmContactEditorOrganisations.h" #include "frmContactEditorNotes.h" void frmContactEditor::AddGeneralNickname( wxCommandEvent& event ) { // Bring up the window for adding a nickname. frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this ); frameCENickname->SetEditorMode(FALSE, CE_GENERAL); frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList, &ContactEditorData.GeneralNicknamesListAltID, &ContactEditorData.GeneralNicknamesListPID, &ContactEditorData.GeneralNicknamesListType, &ContactEditorData.GeneralNicknamesListLanguage, &ContactEditorData.GeneralNicknamesListTokens, &ContactEditorData.GeneralNicknamesListPref, lboNicknames, (intValueSeek)); frameCENickname->ShowModal(); delete frameCENickname; frameCENickname = NULL; } void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event ) { // Bring up the window for modifying a nickname. long longSelected = -1; int intSelectedData = 0; if (lboNicknames->GetItemCount() == 0 || !GetSelectedItem(lboNicknames, &longSelected, &intSelectedData)){ return; } frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this ); frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList, &ContactEditorData.GeneralNicknamesListAltID, &ContactEditorData.GeneralNicknamesListPID, &ContactEditorData.GeneralNicknamesListType, &ContactEditorData.GeneralNicknamesListLanguage, &ContactEditorData.GeneralNicknamesListTokens, &ContactEditorData.GeneralNicknamesListPref, lboNicknames, intSelectedData); frameCENickname->SetEditorMode(TRUE, CE_GENERAL); frameCENickname->ShowModal(); delete frameCENickname; frameCENickname = NULL; } void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event ) { // Bring up the window for deleting a nickname. long longSelected = -1; int intSelectedData = 0; if (lboNicknames->GetItemCount() == 0 || !GetSelectedItem(lboNicknames, &longSelected, &intSelectedData)){ return; } lboNicknames->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralNicknamesList, &ContactEditorData.GeneralNicknamesListLanguage, &ContactEditorData.GeneralNicknamesListAltID, &ContactEditorData.GeneralNicknamesListPID, &ContactEditorData.GeneralNicknamesListTokens, &ContactEditorData.GeneralNicknamesListType, &ContactEditorData.GeneralNicknamesListPref); } void frmContactEditor::AddGeneralAddress( wxCommandEvent& event ) { // Bring up the window for adding an address. frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this ); frameCEAddress->SetEditorMode(FALSE, CE_GENERAL); frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty, &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry, &ContactEditorData.GeneralAddressListLabel, &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID, &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens, &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone, &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype, &ContactEditorData.GeneralAddressListPref, lboAddresses, (intValueSeek)); frameCEAddress->ShowModal(); delete frameCEAddress; frameCEAddress = NULL; } void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event ) { // Bring up the window for editing an address. long longSelected = -1; int intSelectedData = 0; if (lboAddresses->GetItemCount() == 0 || !GetSelectedItem(lboAddresses, &longSelected, &intSelectedData)){ return; } if (longSelected == -1){ return; } frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this ); frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty, &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry, &ContactEditorData.GeneralAddressListLabel, &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID, &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens, &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone, &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype, &ContactEditorData.GeneralAddressListPref, lboAddresses, intSelectedData); frameCEAddress->SetEditorMode(TRUE, CE_GENERAL); frameCEAddress->ShowModal(); delete frameCEAddress; frameCEAddress = NULL; } void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event ) { // Bring up the window for deleting a nickname. long longSelected = -1; int intSelectedData = 0; if (lboAddresses->GetItemCount() == 0 || !GetSelectedItem(lboAddresses, &longSelected, &intSelectedData)){ return; } lboAddresses->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty, &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry, &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel, &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID, &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens, &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone, &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype, &ContactEditorData.GeneralAddressListPref); } void frmContactEditor::AddGeneralEmail( wxCommandEvent& event ) { // Bring up the window for adding an email. frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this ); frameCEEmail->SetEditorMode(FALSE, CE_GENERAL); frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList, &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID, &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens, &ContactEditorData.GeneralEmailListPref, lboEmails, (intValueSeek)); frameCEEmail->ShowModal(); delete frameCEEmail; frameCEEmail = NULL; } void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event ) { // Bring up the window for modifying an email. long longSelected = -1; int intSelectedData = 0; if (lboEmails->GetItemCount() == 0 || !GetSelectedItem(lboEmails, &longSelected, &intSelectedData)){ return; } frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this ); frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList, &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID, &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens, &ContactEditorData.GeneralEmailListPref, lboEmails, intSelectedData); frameCEEmail->SetEditorMode(TRUE, CE_GENERAL); frameCEEmail->ShowModal(); delete frameCEEmail; frameCEEmail = NULL; } void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event ) { // Bring up the window for deleting an email. long longSelected = -1; int intSelectedData = 0; if (lboEmails->GetItemCount() == 0 || !GetSelectedItem(lboEmails, &longSelected, &intSelectedData)){ return; } lboEmails->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList, &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID, &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens, &ContactEditorData.GeneralEmailListPref); } void frmContactEditor::AddGeneralIM( wxCommandEvent& event ) { // Bring up the window for adding a IM address. frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this ); frameCEIM->SetEditorMode(FALSE, CE_GENERAL); frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList, &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID, &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo, &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, &ContactEditorData.GeneralIMListPref, lboIM, (intValueSeek)); frameCEIM->ShowModal(); delete frameCEIM; frameCEIM = NULL; } void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event ) { // Bring up the window for editing a IM address. long longSelected = -1; int intSelectedData = 0; if (lboIM->GetItemCount() == 0 || !GetSelectedItem(lboIM, &longSelected, &intSelectedData)){ return; } frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this ); frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList, &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID, &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo, &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, &ContactEditorData.GeneralIMListPref, lboIM, intSelectedData); frameCEIM->SetEditorMode(TRUE, CE_GENERAL); frameCEIM->ShowModal(); delete frameCEIM; frameCEIM = NULL; } void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event ) { // Bring up the window for deleting an IM address. long longSelected = -1; int intSelectedData = 0; if (lboIM->GetItemCount() == 0 || !GetSelectedItem(lboIM, &longSelected, &intSelectedData)){ return; } lboIM->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList, &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID, &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo, &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, &ContactEditorData.GeneralIMListPref); } void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event ) { // Bring up the window for adding a telephone. frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this ); frameCETel->SetEditorMode(FALSE, CE_GENERAL); frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList, &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID, &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo, &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref, lboTelephone, (intValueSeek)); frameCETel->ShowModal(); delete frameCETel; frameCETel = NULL; } void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event ) { // Bring up the window for editing a telephone. long longSelected = -1; int intSelectedData = 0; if (lboTelephone->GetItemCount() == 0 || !GetSelectedItem(lboTelephone, &longSelected, &intSelectedData)){ return; } frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this ); frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList, &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID, &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo, &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref, lboTelephone, intSelectedData); frameCETel->SetEditorMode(TRUE, CE_GENERAL); frameCETel->ShowModal(); delete frameCETel; frameCETel = NULL; } void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event ) { // Bring up the window for deleting a telephone. long longSelected = -1; int intSelectedData = 0; if (lboTelephone->GetItemCount() == 0 || !GetSelectedItem(lboTelephone, &longSelected, &intSelectedData)){ return; } lboTelephone->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList, &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID, &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo, &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref); } void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event ) { // Bring up the window for adding a language. frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this ); frameCELang->SetEditorMode(FALSE, CE_GENERAL); frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList, &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID, &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens, &ContactEditorData.GeneralLanguageListPref, lboLanguages, (intValueSeek)); frameCELang->ShowModal(); delete frameCELang; frameCELang = NULL; } void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event ) { // Bring up the window for modifying a language. long longSelected = -1; int intSelectedData = 0; if (lboLanguages->GetItemCount() == 0 || !GetSelectedItem(lboLanguages, &longSelected, &intSelectedData)){ return; } frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this ); frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList, &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID, &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens, &ContactEditorData.GeneralLanguageListPref, lboLanguages, intSelectedData); frameCELang->SetEditorMode(TRUE, CE_GENERAL); frameCELang->ShowModal(); delete frameCELang; frameCELang = NULL; } void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event ) { // Bring up the window for deleting a language. long longSelected = -1; int intSelectedData = 0; if (lboLanguages->GetItemCount() == 0 || !GetSelectedItem(lboLanguages, &longSelected, &intSelectedData)){ return; } lboLanguages->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList, &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID, &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens, &ContactEditorData.GeneralLanguageListPref); } void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event ) { // Bring up the window for adding a timezone. frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this ); frameCETZ->SetEditorMode(FALSE, CE_GENERAL); frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList, &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID, &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens, &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref, lboTimezones, (intValueSeek)); frameCETZ->ShowModal(); delete frameCETZ; frameCETZ = NULL; } void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event ) { // Bring up a window for editing a timezone. long longSelected = -1; int intSelectedData = 0; if (lboTimezones->GetItemCount() == 0 || !GetSelectedItem(lboTimezones, &longSelected, &intSelectedData)){ return; } frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this ); frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList, &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID, &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens, &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref, lboTimezones, intSelectedData); frameCETZ->SetEditorMode(TRUE, CE_GENERAL); frameCETZ->ShowModal(); delete frameCETZ; frameCETZ = NULL; } void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event ) { // Bring up the window for deleting a timezone. long longSelected = -1; int intSelectedData = 0; if (lboTimezones->GetItemCount() == 0 || !GetSelectedItem(lboTimezones, &longSelected, &intSelectedData)){ return; } lboTimezones->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList, &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID, &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens, &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref); } void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event ) { // Bring up the window for adding a geoposition location. frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this ); frameCEGeo->SetEditorMode(FALSE, CE_GENERAL); frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList, &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID, &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType, &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, &ContactEditorData.GeneralGeographyListPref, lboGeoposition, (intValueSeek)); frameCEGeo->ShowModal(); delete frameCEGeo; frameCEGeo = NULL; } void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event ) { // Bring up the window for editing a geoposition location. long longSelected = -1; int intSelectedData = 0; if (lboGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboGeoposition, &longSelected, &intSelectedData)){ return; } frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this ); frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList, &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID, &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType, &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, &ContactEditorData.GeneralGeographyListPref, lboGeoposition, intSelectedData); frameCEGeo->SetEditorMode(TRUE, CE_GENERAL); frameCEGeo->ShowModal(); delete frameCEGeo; frameCEGeo = NULL; } void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event ) { // Bring up the window for deleting a geoposition location. long longSelected = -1; int intSelectedData = 0; if (lboGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboGeoposition, &longSelected, &intSelectedData)){ return; } lboGeoposition->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList, &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID, &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType, &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, &ContactEditorData.GeneralGeographyListPref); } void frmContactEditor::AddGeneralRelated( wxCommandEvent& event ) { // Bring up the window for adding a relation. frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this ); frameCERel->SetEditorMode(FALSE, CE_GENERAL); frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList, &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID, &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType, &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref, lboRelated, (intValueSeek)); frameCERel->ShowModal(); delete frameCERel; frameCERel = NULL; } void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event ) { // Bring up the window for editing a relation. long longSelected = -1; int intSelectedData = 0; if (lboRelated->GetItemCount() == 0 || !GetSelectedItem(lboRelated, &longSelected, &intSelectedData)){ return; } frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this ); frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList, &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID, &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType, &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref, lboRelated, intSelectedData); frameCERel->SetEditorMode(TRUE, CE_GENERAL); frameCERel->ShowModal(); delete frameCERel; frameCERel = NULL; } void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event ) { // Bring up a window for deleting a relation. long longSelected = -1; int intSelectedData = 0; if (lboRelated->GetItemCount() == 0 || !GetSelectedItem(lboRelated, &longSelected, &intSelectedData)){ return; } lboRelated->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList, &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID, &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType, &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref); } void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event ) { // Bring up a window for adding a website. frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this ); frameCEWeb->SetEditorMode(FALSE, CE_GENERAL); frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList, &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID, &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens, &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref, lboWebsites, (intValueSeek)); frameCEWeb->ShowModal(); delete frameCEWeb; frameCEWeb = NULL; } void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event ) { // Bring up a window for editing a website. long longSelected = -1; int intSelectedData = 0; if (lboWebsites->GetItemCount() == 0 || !GetSelectedItem(lboWebsites, &longSelected, &intSelectedData)){ return; } frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this ); frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList, &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID, &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens, &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref, lboWebsites, intSelectedData); frameCEWeb->SetEditorMode(TRUE, CE_GENERAL); frameCEWeb->ShowModal(); delete frameCEWeb; frameCEWeb = NULL; } void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event ) { // Bring up a window for deleting a website. long longSelected = -1; int intSelectedData = 0; if (lboWebsites->GetItemCount() == 0 || !GetSelectedItem(lboWebsites, &longSelected, &intSelectedData)){ return; } lboWebsites->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList, &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID, &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens, &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref); } void frmContactEditor::AddGeneralTitle( wxCommandEvent& event ) { // Bring up the window for adding a title. frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this ); frameCETitle->SetEditorMode(FALSE, CE_GENERAL); frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList, &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID, &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType, &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref, lboTitles, (intValueSeek)); frameCETitle->ShowModal(); delete frameCETitle; frameCETitle = NULL; } void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event ) { // Bring up the window for editing a title. long longSelected = -1; int intSelectedData = 0; if (lboTitles->GetItemCount() == 0 || !GetSelectedItem(lboTitles, &longSelected, &intSelectedData)){ return; } frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this ); frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList, &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID, &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType, &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref, lboTitles, intSelectedData); frameCETitle->SetEditorMode(TRUE, CE_GENERAL); frameCETitle->ShowModal(); delete frameCETitle; frameCETitle = NULL; } void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event ) { // Bring up the window for deleting a title. long longSelected = -1; int intSelectedData = 0; if (lboTitles->GetItemCount() == 0 || !GetSelectedItem(lboTitles, &longSelected, &intSelectedData)){ return; } lboTitles->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList, &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID, &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType, &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref); } void frmContactEditor::AddGeneralRole( wxCommandEvent& event ) { // Bring up the window for adding a role. frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this ); frameCERole->SetEditorMode(FALSE, CE_GENERAL); frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList, &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID, &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType, &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref, lboRoles, (intValueSeek)); frameCERole->ShowModal(); delete frameCERole; frameCERole = NULL; } void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event ) { // Bring up the window for editing a role. long longSelected = -1; int intSelectedData = 0; if (lboRoles->GetItemCount() == 0 || !GetSelectedItem(lboRoles, &longSelected, &intSelectedData)){ return; } frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this ); frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList, &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID, &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType, &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref, lboRoles, intSelectedData); frameCERole->SetEditorMode(TRUE, CE_GENERAL); frameCERole->ShowModal(); delete frameCERole; frameCERole = NULL; } void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event ) { // Bring up the window for deleting a role. long longSelected = -1; int intSelectedData = 0; if (lboRoles->GetItemCount() == 0 || !GetSelectedItem(lboRoles, &longSelected, &intSelectedData)){ return; } lboRoles->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList, &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID, &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType, &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref); } void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event ) { // Bring up the window for adding an organisation. frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this ); frameCEOrg->SetEditorMode(FALSE, CE_GENERAL); frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList, &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs, &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID, &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens, &ContactEditorData.GeneralOrganisationsListPref, lboOrganisations, (intValueSeek)); frameCEOrg->ShowModal(); delete frameCEOrg; frameCEOrg = NULL; } void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event ) { // Bring up the window for editing an organisation. long longSelected = -1; int intSelectedData = 0; if (lboOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboOrganisations, &longSelected, &intSelectedData)){ return; } frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this ); frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList, &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs, &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID, &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens, &ContactEditorData.GeneralOrganisationsListPref, lboOrganisations, intSelectedData); frameCEOrg->SetEditorMode(TRUE, CE_GENERAL); frameCEOrg->ShowModal(); delete frameCEOrg; frameCEOrg = NULL; } void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event ) { // Bring up the window for deleting an organisation. long longSelected = -1; int intSelectedData = 0; if (lboOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboOrganisations, &longSelected, &intSelectedData)){ return; } lboOrganisations->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList, &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs, &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID, &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens, &ContactEditorData.GeneralOrganisationsListPref); } void frmContactEditor::AddGeneralNote( wxCommandEvent& event ) { // Bring up the window for adding a note. frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this ); frameCENote->SetEditorMode(FALSE, CE_GENERAL); frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList, &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID, &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType, &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref, lboNotes, (intValueSeek)); frameCENote->ShowModal(); delete frameCENote; frameCENote = NULL; } void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event ) { // Bring up the window for editing a note. long longSelected = -1; int intSelectedData = 0; if (lboNotes->GetItemCount() == 0 || !GetSelectedItem(lboNotes, &longSelected, &intSelectedData)){ return; } frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this ); frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList, &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID, &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType, &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref, lboNotes, intSelectedData); frameCENote->SetEditorMode(TRUE, CE_GENERAL); frameCENote->ShowModal(); delete frameCENote; frameCENote = NULL; } void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event ) { // Bring up a window for deleting a note. long longSelected = -1; int intSelectedData = 0; if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboNotes, &longSelected, &intSelectedData)){ return; } lboNotes->DeleteItem(longSelected); DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList, &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID, &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType, &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref); }