In "plugins\compilergcc\compilergcc.cpp", function "CompilerGCC::OnJobEnd()", starting at line 2974:
if (!m_CommandQueue.LastCommandWasRun())
{
m_Log->GetTextControl()->SetDefaultStyle(wxTextAttr(COLOUR_NAVY));
wxString msg = wxString::Format(_("%d errors, %d warnings"), m_Errors.GetCount(cltError), m_Errors.GetCount(cltWarning));
Manager::Get()->GetMessageManager()->Log(m_PageIndex, msg);
Manager::Get()->GetMessageManager()->LogToStdOut(msg + _T('\n'));
LogWarningOrError(cltNormal, 0, wxEmptyString, wxEmptyString, wxString::Format(_("=== Build finished: %s ==="), msg.c_str()));
}
This is a possible solution for the "file not found" error:
if (!m_CommandQueue.LastCommandWasRun())
{
m_Log->GetTextControl()->SetDefaultStyle(wxTextAttr(COLOUR_NAVY));
// --> New code
int errors = m_Errors.GetCount(cltError);
int warnings = m_Errors.GetCount(cltWarning);
if (exitCode != 0 && errors == 0 && warnings == 0)
wxString msg = wxString::Format(_("errors found"));
else
wxString msg = wxString::Format(_("%d errors, %d warnings"), errors, warnings);
// --> End of new code
Manager::Get()->GetMessageManager()->Log(m_PageIndex, msg);
Manager::Get()->GetMessageManager()->LogToStdOut(msg + _T('\n'));
LogWarningOrError(cltNormal, 0, wxEmptyString, wxEmptyString, wxString::Format(_("=== Build finished: %s ==="), msg.c_str()));
}
For the "Abort" button I have to investigate more.
[EDIT]
The "Abort" button, calls "CompilerGCC::KillProcess()", same file as before, line 2273; I don't know if something in that function is useful for the "OnJobEnd()" function to know that we are in the "Aborting status". Else we could add a bool for that (both functions are in same class, so it needs only a member variable).
I produced that code without knowing wxWidgets very well.
I noticed now that I left a "wxString::Format" that is not required (I just did copy-paste) because there is nothing to insert in the string.
Wrong line
wxString msg = wxString::Format(_("errors found"));
It should work, but it is not needed.