X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fimport%2Fimport.cpp;h=b85c4f6b11c2bb88f450b3482e86874e5d22cd62;hb=54ca9b53d5c442288b8104086348e5b0035625e9;hp=948f83ff3f6738aa92393a02401139783b34a950;hpb=12cb154b8acff8a1c0f23cb2a93b9ac725d700a5;p=xestiaab%2F.git diff --git a/source/import/import.cpp b/source/import/import.cpp index 948f83f..b85c4f6 100644 --- a/source/import/import.cpp +++ b/source/import/import.cpp @@ -104,6 +104,18 @@ void ImportRun(frmMain *frmMainPtrInc){ AccountName = frmIC->GetAccount(); AccountType = frmIC->GetAccountType(); + if (frmIC->GetDialogResult() == FALSE){ + + // User decided not to import. Clean up the + // dialog. + + delete frmIC; + frmIC = NULL; + frmMainPtrInc->ResumeAllTimers(); + return; + + } + delete frmIC; frmIC = NULL; @@ -289,10 +301,14 @@ void ImportRun(frmMain *frmMainPtrInc){ if (AccountType != wxT("Local") && AccountType != wxT("local")){ - wxString *AccNamePostEventPtr = new wxString; + wxString AccNamePostEvent; + + AccNamePostEvent.Clear(); + AccNamePostEvent.Append(AccountName); + AccNamePostEvent.Trim(); wxCommandEvent accevent(SYNCACCOUNT); - accevent.SetClientData(AccNamePostEventPtr); + accevent.SetString(AccNamePostEvent); wxPostEvent(frmMainPtrInc, accevent);