From: Steve Brokenshire Date: Sun, 13 Mar 2016 15:45:15 +0000 (+0000) Subject: Indented code properly contacteditor/frmContactEditor-General.cpp X-Git-Tag: release-0.11~67 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=c6694e56236cca9741afafb6c62ce5e11053cefc Indented code properly contacteditor/frmContactEditor-General.cpp --- diff --git a/source/contacteditor/frmContactEditor-General.cpp b/source/contacteditor/frmContactEditor-General.cpp index 2fe3b1d..75ececb 100644 --- a/source/contacteditor/frmContactEditor-General.cpp +++ b/source/contacteditor/frmContactEditor-General.cpp @@ -35,993 +35,1107 @@ void frmContactEditor::AddGeneralNickname( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this ); - frameCENickname->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralNicknamesList); - frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList, - &ContactEditorData.GeneralNicknamesListAltID, - &ContactEditorData.GeneralNicknamesListPID, - &ContactEditorData.GeneralNicknamesListType, - &ContactEditorData.GeneralNicknamesListLanguage, - &ContactEditorData.GeneralNicknamesListTokens, - &ContactEditorData.GeneralNicknamesListPref, - lboNicknames, - (intValueSeek)); - frameCENickname->ShowModal(); - delete frameCENickname; - frameCENickname = NULL; + + int intResult = 0; + + frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this ); + frameCENickname->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralNicknamesList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboNicknames, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboNicknames, + &longSelected, + &intSelectedData)){ + return; + } - lboNicknames->DeleteItem(longSelected); + lboNicknames->DeleteItem(longSelected); - DeleteMapData(intSelectedData, - &ContactEditorData.GeneralNicknamesList, - &ContactEditorData.GeneralNicknamesListLanguage, - &ContactEditorData.GeneralNicknamesListAltID, - &ContactEditorData.GeneralNicknamesListPID, - &ContactEditorData.GeneralNicknamesListTokens, - &ContactEditorData.GeneralNicknamesListType, - &ContactEditorData.GeneralNicknamesListPref); + DeleteMapData(intSelectedData, + &ContactEditorData.GeneralNicknamesList, + &ContactEditorData.GeneralNicknamesListLanguage, + &ContactEditorData.GeneralNicknamesListAltID, + &ContactEditorData.GeneralNicknamesListPID, + &ContactEditorData.GeneralNicknamesListTokens, + &ContactEditorData.GeneralNicknamesListType, + &ContactEditorData.GeneralNicknamesListPref); } void frmContactEditor::AddGeneralAddress( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this ); - frameCEAddress->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralAddressList); - 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; + int intResult = 0; + + frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this ); + frameCEAddress->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralAddressList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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); + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - int intResult = 0; - - frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this ); - frameCEEmail->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralAddressList); - frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList, - &ContactEditorData.GeneralEmailListAltID, - &ContactEditorData.GeneralEmailListPID, - &ContactEditorData.GeneralEmailListType, - &ContactEditorData.GeneralEmailListTokens, - &ContactEditorData.GeneralEmailListPref, - lboEmails, - (intValueSeek)); - frameCEEmail->ShowModal(); - delete frameCEEmail; - frameCEEmail = NULL; + + int intResult = 0; + + frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this ); + frameCEEmail->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralAddressList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!GetSelectedItem(lboEmails, - &longSelected, - &intSelectedData)){ - return; - } - - lboEmails->DeleteItem(longSelected); - - DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList, - &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID, - &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens, - &ContactEditorData.GeneralEmailListPref); - + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - int intResult = 0; - - frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this ); - frameCEIM->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralIMList); - 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; + + int intResult = 0; + + frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this ); + frameCEIM->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralIMList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboIM, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboIM, + &longSelected, + &intSelectedData)){ + + return; + } - lboIM->DeleteItem(longSelected); + lboIM->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList, - &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID, - &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo, - &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, - &ContactEditorData.GeneralIMListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList, + &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID, + &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo, + &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, + &ContactEditorData.GeneralIMListPref); } void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this ); - frameCETel->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList); - frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList, - &ContactEditorData.GeneralTelephoneListAltID, - &ContactEditorData.GeneralTelephoneListPID, - &ContactEditorData.GeneralTelephoneListType, - &ContactEditorData.GeneralTelephoneListTypeInfo, - &ContactEditorData.GeneralTelephoneListTokens, - &ContactEditorData.GeneralTelephoneListPref, - lboTelephone, - (intValueSeek)); - frameCETel->ShowModal(); - delete frameCETel; - frameCETel = NULL; + + int intResult = 0; + + frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this ); + frameCETel->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboTelephone, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboTelephone, + &longSelected, + &intSelectedData)){ + + return; + + } - lboTelephone->DeleteItem(longSelected); + lboTelephone->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList, - &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID, - &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo, - &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList, + &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID, + &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo, + &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref); } void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this ); - frameCELang->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralLanguageList); - frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList, - &ContactEditorData.GeneralLanguageListAltID, - &ContactEditorData.GeneralLanguageListPID, - &ContactEditorData.GeneralLanguageListType, - &ContactEditorData.GeneralLanguageListTokens, - &ContactEditorData.GeneralLanguageListPref, - lboLanguages, - (intValueSeek)); - frameCELang->ShowModal(); - delete frameCELang; - frameCELang = NULL; + + int intResult = 0; + + frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this ); + frameCELang->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralLanguageList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboLanguages, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboLanguages, + &longSelected, + &intSelectedData)){ + + return; + } - lboLanguages->DeleteItem(longSelected); + lboLanguages->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList, - &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID, - &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens, - &ContactEditorData.GeneralLanguageListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList, + &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID, + &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens, + &ContactEditorData.GeneralLanguageListPref); } void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this ); - frameCETZ->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralTZList); - frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList, - &ContactEditorData.GeneralTZListAltID, - &ContactEditorData.GeneralTZListPID, - &ContactEditorData.GeneralTZListType, - &ContactEditorData.GeneralTZListTokens, - &ContactEditorData.GeneralTZListMediatype, - &ContactEditorData.GeneralTZListPref, - lboTimezones, - (intValueSeek)); - frameCETZ->ShowModal(); - delete frameCETZ; - frameCETZ = NULL; + + int intResult = 0; + + frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this ); + frameCETZ->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralTZList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboTimezones, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboTimezones, + &longSelected, + &intSelectedData)){ + + return; + + } - lboTimezones->DeleteItem(longSelected); + lboTimezones->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList, - &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID, - &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens, - &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList, + &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID, + &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens, + &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref); } void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this ); - frameCEGeo->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralGeographyList); - 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; + + int intResult = 0; + + frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this ); + frameCEGeo->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralGeographyList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboGeoposition, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboGeoposition, + &longSelected, + &intSelectedData)){ + + return; + + } - lboGeoposition->DeleteItem(longSelected); + lboGeoposition->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList, - &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID, - &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType, - &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, - &ContactEditorData.GeneralGeographyListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList, + &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID, + &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType, + &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, + &ContactEditorData.GeneralGeographyListPref); } void frmContactEditor::AddGeneralRelated( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this ); - frameCERel->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralRelatedList); - frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList, - &ContactEditorData.GeneralRelatedListRelType, - &ContactEditorData.GeneralRelatedListAltID, - &ContactEditorData.GeneralRelatedListPID, - &ContactEditorData.GeneralRelatedListType, - &ContactEditorData.GeneralRelatedListTokens, - &ContactEditorData.GeneralRelatedListPref, - lboRelated, - (intValueSeek)); - frameCERel->ShowModal(); - delete frameCERel; - frameCERel = NULL; + + int intResult = 0; + + frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this ); + frameCERel->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralRelatedList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboRelated, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboRelated, + &longSelected, + &intSelectedData)){ + + return; + + } - lboRelated->DeleteItem(longSelected); + lboRelated->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList, - &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID, - &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType, - &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList, + &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID, + &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType, + &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref); } void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this ); - frameCEWeb->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList); - frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList, - &ContactEditorData.GeneralWebsiteListAltID, - &ContactEditorData.GeneralWebsiteListPID, - &ContactEditorData.GeneralWebsiteListType, - &ContactEditorData.GeneralWebsiteListTokens, - &ContactEditorData.GeneralWebsiteListMediatype, - &ContactEditorData.GeneralWebsiteListPref, - lboWebsites, - (intValueSeek)); - frameCEWeb->ShowModal(); - delete frameCEWeb; - frameCEWeb = NULL; + + int intResult = 0; + + frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this ); + frameCEWeb->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboWebsites, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboWebsites, + &longSelected, + &intSelectedData)){ + + return; + + } - lboWebsites->DeleteItem(longSelected); + lboWebsites->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList, - &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID, - &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens, - &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList, + &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID, + &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens, + &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref); } void frmContactEditor::AddGeneralTitle( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this ); - frameCETitle->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralTitleList); - frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList, - &ContactEditorData.GeneralTitleListLanguage, - &ContactEditorData.GeneralTitleListAltID, - &ContactEditorData.GeneralTitleListPID, - &ContactEditorData.GeneralTitleListType, - &ContactEditorData.GeneralTitleListTokens, - &ContactEditorData.GeneralTitleListPref, - lboTitles, - (intValueSeek)); - frameCETitle->ShowModal(); - delete frameCETitle; - frameCETitle = NULL; + + int intResult = 0; + + frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this ); + frameCETitle->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralTitleList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboTitles, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboTitles, + &longSelected, + &intSelectedData)){ + + return; + + } - lboTitles->DeleteItem(longSelected); + lboTitles->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList, - &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID, - &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType, - &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList, + &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID, + &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType, + &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref); } void frmContactEditor::AddGeneralRole( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this ); - frameCERole->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralRoleList); - frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList, - &ContactEditorData.GeneralRoleListLanguage, - &ContactEditorData.GeneralRoleListAltID, - &ContactEditorData.GeneralRoleListPID, - &ContactEditorData.GeneralRoleListType, - &ContactEditorData.GeneralRoleListTokens, - &ContactEditorData.GeneralRoleListPref, - lboRoles, - (intValueSeek)); - frameCERole->ShowModal(); - delete frameCERole; - frameCERole = NULL; + + int intResult = 0; + + frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this ); + frameCERole->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralRoleList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboRoles, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboRoles, + &longSelected, + &intSelectedData)){ + + return; + + } - lboRoles->DeleteItem(longSelected); + lboRoles->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList, - &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID, - &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType, - &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList, + &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID, + &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType, + &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref); } void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this ); - frameCEOrg->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList); - 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; + + int intResult = 0; + + frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this ); + frameCEOrg->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; + + long longSelected = -1; + int intSelectedData = 0; - if (!GetSelectedItem(lboOrganisations, - &longSelected, - &intSelectedData)){ - return; - } + if (!GetSelectedItem(lboOrganisations, + &longSelected, + &intSelectedData)){ + + return; + + } - lboOrganisations->DeleteItem(longSelected); + lboOrganisations->DeleteItem(longSelected); - DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList, - &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs, - &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID, - &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens, - &ContactEditorData.GeneralOrganisationsListPref); + DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList, + &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs, + &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID, + &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens, + &ContactEditorData.GeneralOrganisationsListPref); } void frmContactEditor::AddGeneralNote( wxCommandEvent& event ) { - int intResult = 0; - - frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this ); - frameCENote->SetEditorMode(FALSE, CE_GENERAL); - intResult = GetLastInt(&ContactEditorData.GeneralNoteList); - frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList, - &ContactEditorData.GeneralNoteListLanguage, - &ContactEditorData.GeneralNoteListAltID, - &ContactEditorData.GeneralNoteListPID, - &ContactEditorData.GeneralNoteListType, - &ContactEditorData.GeneralNoteListTokens, - &ContactEditorData.GeneralNoteListPref, - lboNotes, - (intValueSeek)); - frameCENote->ShowModal(); - delete frameCENote; - frameCENote = NULL; + + int intResult = 0; + + frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this ); + frameCENote->SetEditorMode(FALSE, CE_GENERAL); + intResult = GetLastInt(&ContactEditorData.GeneralNoteList); + 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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!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; + + long longSelected = -1; + int intSelectedData = 0; + + if (!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 ) { - long longSelected = -1; - int intSelectedData = 0; - - if (!GetSelectedItem(lboNotes, - &longSelected, - &intSelectedData)){ - return; - } - - lboNotes->DeleteItem(longSelected); - - DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList, - &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID, - &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType, - &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref); - + + long longSelected = -1; + int intSelectedData = 0; + + if (!GetSelectedItem(lboNotes, + &longSelected, + &intSelectedData)){ + + return; + } + + lboNotes->DeleteItem(longSelected); + + DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList, + &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID, + &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType, + &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref); + }