// frmContactEditor-General.cpp - frmContactEditor General tab subroutines. // // (c) 2012-2015 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 ) { int intResult = 0; frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this ); frameCENickname->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralNicknamesList); frameCENickname->SetupPointers(&GeneralNicknamesList, &GeneralNicknamesListAltID, &GeneralNicknamesListPID, &GeneralNicknamesListType, &GeneralNicknamesListLanguage, &GeneralNicknamesListTokens, &GeneralNicknamesListPref, lboNicknames, (intValueSeek)); frameCENickname->ShowModal(); delete frameCENickname; frameCENickname = NULL; } void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboNicknames, &longSelected, &intSelectedData)){ return; } frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this ); frameCENickname->SetupPointers(&GeneralNicknamesList, &GeneralNicknamesListAltID, &GeneralNicknamesListPID, &GeneralNicknamesListType, &GeneralNicknamesListLanguage, &GeneralNicknamesListTokens, &GeneralNicknamesListPref, lboNicknames, intSelectedData); frameCENickname->SetEditorMode(TRUE, CE_GENERAL); frameCENickname->ShowModal(); delete frameCENickname; frameCENickname = NULL; } void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboNicknames, &longSelected, &intSelectedData)){ return; } lboNicknames->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralNicknamesList, &GeneralNicknamesListLanguage, &GeneralNicknamesListAltID, &GeneralNicknamesListPID, &GeneralNicknamesListTokens, &GeneralNicknamesListType, &GeneralNicknamesListPref); } void frmContactEditor::AddGeneralAddress( wxCommandEvent& event ) { int intResult = 0; frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this ); frameCEAddress->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralAddressList); frameCEAddress->SetupPointers(&GeneralAddressList, &GeneralAddressListTown, &GeneralAddressListCounty, &GeneralAddressListPostCode, &GeneralAddressListCountry, &GeneralAddressListLabel, &GeneralAddressListLang, &GeneralAddressListAltID, &GeneralAddressListPID, &GeneralAddressListTokens, &GeneralAddressListGeo, &GeneralAddressListTimezone, &GeneralAddressListType, &GeneralAddressListMediatype, &GeneralAddressListPref, lboAddresses, (intValueSeek)); frameCEAddress->ShowModal(); delete frameCEAddress; frameCEAddress = NULL; } void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboAddresses, &longSelected, &intSelectedData)){ return; } if (longSelected == -1){ return; } frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this ); frameCEAddress->SetupPointers(&GeneralAddressList, &GeneralAddressListTown, &GeneralAddressListCounty, &GeneralAddressListPostCode, &GeneralAddressListCountry, &GeneralAddressListLabel, &GeneralAddressListLang, &GeneralAddressListAltID, &GeneralAddressListPID, &GeneralAddressListTokens, &GeneralAddressListGeo, &GeneralAddressListTimezone, &GeneralAddressListType, &GeneralAddressListMediatype, &GeneralAddressListPref, lboAddresses, intSelectedData); frameCEAddress->SetEditorMode(TRUE, CE_GENERAL); frameCEAddress->ShowModal(); delete frameCEAddress; frameCEAddress = NULL; } void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboAddresses, &longSelected, &intSelectedData)){ return; } lboAddresses->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralAddressList, &GeneralAddressListTown, &GeneralAddressListCounty, &GeneralAddressListPostCode, &GeneralAddressListCountry, &GeneralAddressList, &GeneralAddressListLabel, &GeneralAddressListLang, &GeneralAddressListAltID, &GeneralAddressListPID, &GeneralAddressListTokens, &GeneralAddressListGeo, &GeneralAddressListTimezone, &GeneralAddressListType, &GeneralAddressListMediatype, &GeneralAddressListPref); } void frmContactEditor::AddGeneralEmail( wxCommandEvent& event ) { int intResult = 0; frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this ); frameCEEmail->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralAddressList); frameCEEmail->SetupPointers(&GeneralEmailList, &GeneralEmailListAltID, &GeneralEmailListPID, &GeneralEmailListType, &GeneralEmailListTokens, &GeneralEmailListPref, lboEmails, (intValueSeek)); frameCEEmail->ShowModal(); delete frameCEEmail; frameCEEmail = NULL; } void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboEmails, &longSelected, &intSelectedData)){ return; } frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this ); frameCEEmail->SetupPointers(&GeneralEmailList, &GeneralEmailListAltID, &GeneralEmailListPID, &GeneralEmailListType, &GeneralEmailListTokens, &GeneralEmailListPref, lboEmails, intSelectedData); frameCEEmail->SetEditorMode(TRUE, CE_GENERAL); frameCEEmail->ShowModal(); delete frameCEEmail; frameCEEmail = NULL; } void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboEmails, &longSelected, &intSelectedData)){ return; } lboEmails->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralEmailList, &GeneralEmailListAltID, &GeneralEmailListPID, &GeneralEmailListType, &GeneralEmailListTokens, &GeneralEmailListPref); } void frmContactEditor::AddGeneralIM( wxCommandEvent& event ) { int intResult = 0; frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this ); frameCEIM->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralIMList); frameCEIM->SetupPointers(&GeneralIMList, &GeneralIMListAltID, &GeneralIMListPID, &GeneralIMListType, &GeneralIMListTokens, &GeneralIMListMediatype, &GeneralIMListPref, lboIM, (intValueSeek)); frameCEIM->ShowModal(); delete frameCEIM; frameCEIM = NULL; } void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboIM, &longSelected, &intSelectedData)){ return; } frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this ); frameCEIM->SetupPointers(&GeneralIMList, &GeneralIMListAltID, &GeneralIMListPID, &GeneralIMListType, &GeneralIMListTokens, &GeneralIMListMediatype, &GeneralIMListPref, lboIM, intSelectedData); frameCEIM->SetEditorMode(TRUE, CE_GENERAL); frameCEIM->ShowModal(); delete frameCEIM; frameCEIM = NULL; } void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboIM, &longSelected, &intSelectedData)){ return; } lboIM->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralIMList, &GeneralIMListAltID, &GeneralIMListPID, &GeneralIMListType, &GeneralIMListTokens, &GeneralIMListMediatype, &GeneralIMListPref); } void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event ) { int intResult = 0; frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this ); frameCETel->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralTelephoneList); frameCETel->SetupPointers(&GeneralTelephoneList, &GeneralTelephoneListAltID, &GeneralTelephoneListPID, &GeneralTelephoneListType, &GeneralTelephoneListTokens, &GeneralTelephoneListPref, lboTelephone, (intValueSeek)); frameCETel->ShowModal(); delete frameCETel; frameCETel = NULL; } void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboTelephone, &longSelected, &intSelectedData)){ return; } frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this ); frameCETel->SetupPointers(&GeneralTelephoneList, &GeneralTelephoneListAltID, &GeneralTelephoneListPID, &GeneralTelephoneListType, &GeneralTelephoneListTokens, &GeneralTelephoneListPref, lboTelephone, intSelectedData); frameCETel->SetEditorMode(TRUE, CE_GENERAL); frameCETel->ShowModal(); delete frameCETel; frameCETel = NULL; } void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboTelephone, &longSelected, &intSelectedData)){ return; } lboTelephone->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralTelephoneList, &GeneralTelephoneListAltID, &GeneralTelephoneListPID, &GeneralTelephoneListType, &GeneralTelephoneListTokens, &GeneralTelephoneListPref); } void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event ) { int intResult = 0; frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this ); frameCELang->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralLanguageList); frameCELang->SetupPointers(&GeneralLanguageList, &GeneralLanguageListAltID, &GeneralLanguageListPID, &GeneralLanguageListType, &GeneralLanguageListTokens, &GeneralLanguageListPref, lboLanguages, (intValueSeek)); frameCELang->ShowModal(); delete frameCELang; frameCELang = NULL; } void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboLanguages, &longSelected, &intSelectedData)){ return; } frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this ); frameCELang->SetupPointers(&GeneralLanguageList, &GeneralLanguageListAltID, &GeneralLanguageListPID, &GeneralLanguageListType, &GeneralLanguageListTokens, &GeneralLanguageListPref, lboLanguages, intSelectedData); frameCELang->SetEditorMode(TRUE, CE_GENERAL); frameCELang->ShowModal(); delete frameCELang; frameCELang = NULL; } void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboLanguages, &longSelected, &intSelectedData)){ return; } lboLanguages->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralLanguageList, &GeneralLanguageListAltID, &GeneralLanguageListPID, &GeneralLanguageListType, &GeneralLanguageListTokens, &GeneralLanguageListPref); } void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event ) { int intResult = 0; frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this ); frameCETZ->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralTZList); frameCETZ->SetupPointers(&GeneralTZList, &GeneralTZListAltID, &GeneralTZListPID, &GeneralTZListType, &GeneralTZListTokens, &GeneralTZListMediatype, &GeneralTZListPref, lboTimezones, (intValueSeek)); frameCETZ->ShowModal(); delete frameCETZ; frameCETZ = NULL; } void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboTimezones, &longSelected, &intSelectedData)){ return; } frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this ); frameCETZ->SetupPointers(&GeneralTZList, &GeneralTZListAltID, &GeneralTZListPID, &GeneralTZListType, &GeneralTZListTokens, &GeneralTZListMediatype, &GeneralTZListPref, lboTimezones, intSelectedData); frameCETZ->SetEditorMode(TRUE, CE_GENERAL); frameCETZ->ShowModal(); delete frameCETZ; frameCETZ = NULL; } void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboTimezones, &longSelected, &intSelectedData)){ return; } lboTimezones->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralTZList, &GeneralTZListAltID, &GeneralTZListPID, &GeneralTZListType, &GeneralTZListTokens, &GeneralTZListMediatype, &GeneralTZListPref); } void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event ) { int intResult = 0; frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this ); frameCEGeo->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralGeographyList); frameCEGeo->SetupPointers(&GeneralGeographyList, &GeneralGeographyListAltID, &GeneralGeographyListPID, &GeneralGeographyListType, &GeneralGeographyListTokens, &GeneralGeographyListMediatype, &GeneralGeographyListPref, lboGeoposition, (intValueSeek)); frameCEGeo->ShowModal(); delete frameCEGeo; frameCEGeo = NULL; } void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboGeoposition, &longSelected, &intSelectedData)){ return; } frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this ); frameCEGeo->SetupPointers(&GeneralGeographyList, &GeneralGeographyListAltID, &GeneralGeographyListPID, &GeneralGeographyListType, &GeneralGeographyListTokens, &GeneralGeographyListMediatype, &GeneralGeographyListPref, lboGeoposition, intSelectedData); frameCEGeo->SetEditorMode(TRUE, CE_GENERAL); frameCEGeo->ShowModal(); delete frameCEGeo; frameCEGeo = NULL; } void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboGeoposition, &longSelected, &intSelectedData)){ return; } lboGeoposition->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralGeographyList, &GeneralGeographyListAltID, &GeneralGeographyListPID, &GeneralGeographyListType, &GeneralGeographyListTokens, &GeneralGeographyListMediatype, &GeneralGeographyListPref); } void frmContactEditor::AddGeneralRelated( wxCommandEvent& event ) { int intResult = 0; frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this ); frameCERel->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralRelatedList); frameCERel->SetupPointers(&GeneralRelatedList, &GeneralRelatedListRelType, &GeneralRelatedListAltID, &GeneralRelatedListPID, &GeneralRelatedListType, &GeneralRelatedListTokens, &GeneralRelatedListPref, lboRelated, (intValueSeek)); frameCERel->ShowModal(); delete frameCERel; frameCERel = NULL; } void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboRelated, &longSelected, &intSelectedData)){ return; } frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this ); frameCERel->SetupPointers(&GeneralRelatedList, &GeneralRelatedListRelType, &GeneralRelatedListAltID, &GeneralRelatedListPID, &GeneralRelatedListType, &GeneralRelatedListTokens, &GeneralRelatedListPref, lboRelated, intSelectedData); frameCERel->SetEditorMode(TRUE, CE_GENERAL); frameCERel->ShowModal(); delete frameCERel; frameCERel = NULL; } void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboRelated, &longSelected, &intSelectedData)){ return; } lboRelated->DeleteItem(longSelected); GeneralRelatedList.erase(intSelectedData); GeneralRelatedListRelType.erase(intSelectedData); GeneralRelatedListAltID.erase(intSelectedData); GeneralRelatedListPID.erase(intSelectedData); GeneralRelatedListType.erase(intSelectedData); GeneralRelatedListTokens.erase(intSelectedData); GeneralRelatedListPref.erase(intSelectedData); } void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event ) { int intResult = 0; frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this ); frameCEWeb->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralWebsiteList); frameCEWeb->SetupPointers(&GeneralWebsiteList, &GeneralWebsiteListAltID, &GeneralWebsiteListPID, &GeneralWebsiteListType, &GeneralWebsiteListTokens, &GeneralWebsiteListMediatype, &GeneralWebsiteListPref, lboWebsites, (intValueSeek)); frameCEWeb->ShowModal(); delete frameCEWeb; frameCEWeb = NULL; } void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboWebsites, &longSelected, &intSelectedData)){ return; } frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this ); frameCEWeb->SetupPointers(&GeneralWebsiteList, &GeneralWebsiteListAltID, &GeneralWebsiteListPID, &GeneralWebsiteListType, &GeneralWebsiteListTokens, &GeneralWebsiteListMediatype, &GeneralWebsiteListPref, lboWebsites, intSelectedData); frameCEWeb->SetEditorMode(TRUE, CE_GENERAL); frameCEWeb->ShowModal(); delete frameCEWeb; frameCEWeb = NULL; } void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboWebsites, &longSelected, &intSelectedData)){ return; } lboWebsites->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralWebsiteList, &GeneralWebsiteListAltID, &GeneralWebsiteListPID, &GeneralWebsiteListType, &GeneralWebsiteListTokens, &GeneralWebsiteListMediatype, &GeneralWebsiteListPref); } void frmContactEditor::AddGeneralTitle( wxCommandEvent& event ) { int intResult = 0; frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this ); frameCETitle->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralTitleList); frameCETitle->SetupPointers(&GeneralTitleList, &GeneralTitleListLanguage, &GeneralTitleListAltID, &GeneralTitleListPID, &GeneralTitleListType, &GeneralTitleListTokens, &GeneralTitleListPref, lboTitles, (intValueSeek)); frameCETitle->ShowModal(); delete frameCETitle; frameCETitle = NULL; } void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboTitles, &longSelected, &intSelectedData)){ return; } frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this ); frameCETitle->SetupPointers(&GeneralTitleList, &GeneralTitleListLanguage, &GeneralTitleListAltID, &GeneralTitleListPID, &GeneralTitleListType, &GeneralTitleListTokens, &GeneralTitleListPref, lboTitles, intSelectedData); frameCETitle->SetEditorMode(TRUE, CE_GENERAL); frameCETitle->ShowModal(); delete frameCETitle; frameCETitle = NULL; } void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboTitles, &longSelected, &intSelectedData)){ return; } lboTitles->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralTitleList, &GeneralTitleListLanguage, &GeneralTitleListAltID, &GeneralTitleListPID, &GeneralTitleListType, &GeneralTitleListTokens, &GeneralTitleListPref); } void frmContactEditor::AddGeneralRole( wxCommandEvent& event ) { int intResult = 0; frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this ); frameCERole->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralRoleList); frameCERole->SetupPointers(&GeneralRoleList, &GeneralRoleListLanguage, &GeneralRoleListAltID, &GeneralRoleListPID, &GeneralRoleListType, &GeneralRoleListTokens, &GeneralRoleListPref, lboRoles, (intValueSeek)); frameCERole->ShowModal(); delete frameCERole; frameCERole = NULL; } void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboRoles, &longSelected, &intSelectedData)){ return; } frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this ); frameCERole->SetupPointers(&GeneralRoleList, &GeneralRoleListLanguage, &GeneralRoleListAltID, &GeneralRoleListPID, &GeneralRoleListType, &GeneralRoleListTokens, &GeneralRoleListPref, lboRoles, intSelectedData); frameCERole->SetEditorMode(TRUE, CE_GENERAL); frameCERole->ShowModal(); delete frameCERole; frameCERole = NULL; } void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboRoles, &longSelected, &intSelectedData)){ return; } lboRoles->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralRoleList, &GeneralRoleListLanguage, &GeneralRoleListAltID, &GeneralRoleListPID, &GeneralRoleListType, &GeneralRoleListTokens, &GeneralRoleListPref); } void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event ) { int intResult = 0; frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this ); frameCEOrg->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralOrganisationsList); frameCEOrg->SetupPointers(&GeneralOrganisationsList, &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs, &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID, &GeneralOrganisationsListType, &GeneralOrganisationsListTokens, &GeneralOrganisationsListPref, lboOrganisations, (intValueSeek)); frameCEOrg->ShowModal(); delete frameCEOrg; frameCEOrg = NULL; } void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboOrganisations, &longSelected, &intSelectedData)){ return; } frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this ); frameCEOrg->SetupPointers(&GeneralOrganisationsList, &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs, &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID, &GeneralOrganisationsListType, &GeneralOrganisationsListTokens, &GeneralOrganisationsListPref, lboOrganisations, intSelectedData); frameCEOrg->SetEditorMode(TRUE, CE_GENERAL); frameCEOrg->ShowModal(); delete frameCEOrg; frameCEOrg = NULL; } void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboOrganisations, &longSelected, &intSelectedData)){ return; } lboOrganisations->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralOrganisationsList, &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs, &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID, &GeneralOrganisationsListType, &GeneralOrganisationsListTokens, &GeneralOrganisationsListPref); } void frmContactEditor::AddGeneralNote( wxCommandEvent& event ) { int intResult = 0; frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this ); frameCENote->SetEditorMode(FALSE, CE_GENERAL); intResult = GetLastInt(&GeneralNoteList); frameCENote->SetupPointers(&GeneralNoteList, &GeneralNoteListLanguage, &GeneralNoteListAltID, &GeneralNoteListPID, &GeneralNoteListType, &GeneralNoteListTokens, &GeneralNoteListPref, lboNotes, (intValueSeek)); frameCENote->ShowModal(); delete frameCENote; frameCENote = NULL; } void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboNotes, &longSelected, &intSelectedData)){ return; } frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this ); frameCENote->SetupPointers(&GeneralNoteList, &GeneralNoteListLanguage, &GeneralNoteListAltID, &GeneralNoteListPID, &GeneralNoteListType, &GeneralNoteListTokens, &GeneralNoteListPref, lboNotes, intSelectedData); frameCENote->SetEditorMode(TRUE, CE_GENERAL); frameCENote->ShowModal(); delete frameCENote; frameCENote = NULL; } void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboNotes, &longSelected, &intSelectedData)){ return; } lboNotes->DeleteItem(longSelected); DeleteMapData(intSelectedData, &GeneralNoteList, &GeneralNoteListLanguage, &GeneralNoteListAltID, &GeneralNoteListPID, &GeneralNoteListType, &GeneralNoteListTokens, &GeneralNoteListPref); }