X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor.cpp;h=4d7bde21c4b0b80843e363def29c2b213335bd20;hp=22de53591ebb324baf14adc9452e2db9e403ab2a;hb=HEAD;hpb=76db3d7ee9939904c8a275fc6f7f62c75bc3fb80 diff --git a/source/contacteditor/frmContactEditor.cpp b/source/contacteditor/frmContactEditor.cpp index 22de535..4d7bde2 100644 --- a/source/contacteditor/frmContactEditor.cpp +++ b/source/contacteditor/frmContactEditor.cpp @@ -58,18 +58,13 @@ #include "../version.h" #include "../vcard/vcard.h" #include "../vcard/vcard34conv.h" -#include "../bitmaps.h" +#include "../Bitmaps.h" #include "../common/base64.h" #include "../common/textprocessing.h" #include "../common/preferences.h" #include "../common/uuid.h" #include "../common/dirs.h" -// TODO: Investigate problems with SFML & PulseAudio - CPU usage problems when -// not being used. - -// Replace intResult with intValueSeek. - BEGIN_EVENT_TABLE(frmContactEditor, wxFrame) EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, frmContactEditor::ContactFileChanged) END_EVENT_TABLE() @@ -105,6 +100,19 @@ frmContactEditorADT( parent ) } +frmContactEditor::~frmContactEditor() +{ + + if (AudioStreamPlaybackPointer != nullptr) + { + + delete AudioStreamPlaybackPointer; + AudioStreamPlaybackPointer = nullptr; + + } + +} + void frmContactEditor::CloseContact( wxCommandEvent& event ) { @@ -159,20 +167,14 @@ void frmContactEditor::SetupContact( wxString AccountName ) } +void frmContactEditor::SetupAccountData(bool UnsupportedAccount){ + + boolUnsupportedAccount = UnsupportedAccount; + +} + int frmContactEditor::GetLastInt(std::map *MapData){ - /* - int intResult = 0; - - std::map::iterator iwxsit; - - for( iwxsit=(*MapData).begin(); iwxsit != (*MapData).end(); iwxsit++){ - intResult = (*iwxsit).first; - } - - return intResult; - */ - intValueSeek++; return intValueSeek; @@ -180,14 +182,6 @@ int frmContactEditor::GetLastInt(std::map *MapData){ int frmContactEditor::GetLastInt(std::map *MapData){ - /* int intResult = 0; - - std::map::iterator iwxsit; - - for( iwxsit=(*MapData).begin(); iwxsit != (*MapData).end(); iwxsit++){ - intResult = (*iwxsit).first; - }*/ - intValueSeek++; return intValueSeek; @@ -204,14 +198,14 @@ bool frmContactEditor::GetSelectedItem(wxListCtrl *ListCtrlPtr, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); - *intSelectedData = (int)ListCtrlPtr->GetItemData(*longSelected); - if (*longSelected == -1){ return FALSE; - } else { - return TRUE; } + *intSelectedData = (int)ListCtrlPtr->GetItemData(*longSelected); + + return TRUE; + } void frmContactEditor::DeleteMapDataProcess(int IndexNum, std::map* MapData){ @@ -486,8 +480,16 @@ void frmContactEditor::ProcessSaveDataStrProc( wxString PropName, strIter = MapData->find(intIterVal); + if (strIter == MapData->end()){ + + // Ignore this section and return. + + return; + + } + wxString strPropValue; - + if (strIter->first == intIterVal){ strPropValue = strIter->second; @@ -653,4 +655,4 @@ void frmContactEditor::SetMode(bool StartupEditModeIn){ StartupEditMode = StartupEditModeIn; -} \ No newline at end of file +}