X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8efab359f7a198a5ba4607199bb5d98051735556..6a54cc2a1156229f1db27ec816c9be84e8da2ee3:/utils/tex2rtf/src/tex2rtf.cpp diff --git a/utils/tex2rtf/src/tex2rtf.cpp b/utils/tex2rtf/src/tex2rtf.cpp index 55f736ae0d..0e44e16304 100644 --- a/utils/tex2rtf/src/tex2rtf.cpp +++ b/utils/tex2rtf/src/tex2rtf.cpp @@ -665,7 +665,16 @@ void MyFrame::OnGo(wxCommandEvent& event) Tex2RTFYield(TRUE); Go(); - if (runTwice) + if (stopRunning) + { + SetStatusText("Build aborted!"); + wxString errBuf; + errBuf.Printf("\nErrors encountered during this pass: %lu\n", errorCount); + OnInform((char *)errBuf.c_str()); + } + + + if (runTwice && !stopRunning) { Tex2RTFYield(TRUE); Go(); @@ -907,7 +916,7 @@ bool Go(void) ChooseOutputFile(); #endif - if (!InputFile || !OutputFile) + if (!InputFile || !OutputFile || stopRunning) return FALSE; #ifndef NO_GUI @@ -981,6 +990,12 @@ bool Go(void) OnInform("Reading LaTeX file..."); TexLoadFile(InputFile); + if (stopRunning) + { + OkToClose = TRUE; + return FALSE; + } + switch (convertMode) { case TEX_RTF: @@ -1005,6 +1020,7 @@ bool Go(void) OnInform("*** Aborted by user."); success = FALSE; stopRunning = FALSE; + OkToClose = TRUE; } if (success) @@ -1312,7 +1328,7 @@ char *Tex2RTFConnection::OnRequest(const wxString& topic, const wxString& item, #ifndef NO_GUI #ifndef __WXGTK__ -//void wxObject::Dump(ostream& str) +//void wxObject::Dump(wxSTD ostream& str) //{ // if (GetClassInfo() && GetClassInfo()->GetClassName()) // str << GetClassInfo()->GetClassName();