X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Logo.cpp;h=ce5649abd0818ffb1c8252bf330c31edcb7d5a34;hb=bfe817b5bfae33a1eb666c463643ec119cd1d66d;hp=cf9e3f448bb871cf2d7f4a0aa8cdac1ed8e43f7d;hpb=79cd2c822bc89d6d671069cf591bb4759192ddd0;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Logo.cpp b/source/contacteditor/frmContactEditor-Logo.cpp index cf9e3f4..ce5649a 100644 --- a/source/contacteditor/frmContactEditor-Logo.cpp +++ b/source/contacteditor/frmContactEditor-Logo.cpp @@ -28,7 +28,7 @@ void frmContactEditor::LoadLogo( wxListEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboLogos, + if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos, &longSelected, &intSelectedData)){ return; @@ -46,8 +46,7 @@ void frmContactEditor::LoadLogo( wxListEvent& event ) wxMemoryInputStream istream(base64dec.c_str(), (size_t)base64dec.size()); wxImage photo; - //wxMemoryInputStream istream(base64dec, (size_t)base64dec.size()); - + if (pictypeiter->second == wxT("image/jpeg")){ if (!photo.LoadFile(istream, wxBITMAP_TYPE_JPEG)){ @@ -87,12 +86,9 @@ void frmContactEditor::AddLogo( wxCommandEvent& event ) { // Bring up the window to add a logo. - - int intResult = 0; - + frmContactEditorPicture *frameCELogo = new frmContactEditorPicture ( this ); frameCELogo->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.LogosList); frameCELogo->SetupPointers(&ContactEditorData.LogosList, &ContactEditorData.LogosListAltID, &ContactEditorData.LogosListPID, @@ -119,7 +115,7 @@ void frmContactEditor::ModifyLogo( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboLogos, + if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos, &longSelected, &intSelectedData)){ return; @@ -153,7 +149,7 @@ void frmContactEditor::DeleteLogo( wxCommandEvent& event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboLogos, + if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos, &longSelected, &intSelectedData)){ return; @@ -182,7 +178,7 @@ void frmContactEditor::SaveLogo( wxCommandEvent &event ) long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboLogos, + if (lboLogos->GetItemCount() == 0 || !GetSelectedItem(lboLogos, &longSelected, &intSelectedData)){