Skip to content

Commit

Permalink
Make progress bar cancelable
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Aug 18, 2024
1 parent 1baaab8 commit f5221a8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void I18NFrame::InitControls()
//------------------------------------------------------
void I18NFrame::OnNew([[maybe_unused]] wxCommandEvent& event)
{
std::wstring inputFolder = L"C:\\Users\\madin\\source\\wxWidgets\\samples";
std::wstring inputFolder;
// paths being ignored
const auto excludedInfo =
i18n_check::get_paths_files_to_exclude(inputFolder, std::vector<std::wstring>{});
Expand Down Expand Up @@ -155,11 +155,12 @@ void I18NFrame::OnNew([[maybe_unused]] wxCommandEvent& event)
wxNumberFormatter::ToString(fileCount, 0,
wxNumberFormatter::Style::Style_NoTrailingZeroes |
wxNumberFormatter::Style::Style_WithThousandsSep)));
if (!progressDlg.Update(currentFileIndex,
wxString::Format(_(L"Reviewing %s"), file.c_str())))
if (!progressDlg.Update(currentFileIndex, wxString::Format(_(L"Reviewing %s..."),
wxFileName{ file }.GetFullName())))
{
return;
return false;
}
return true;
});

const std::wstringstream report = format_results(cpp, rc, po, filesThatShouldBeConvertedToUTF8,
Expand Down

0 comments on commit f5221a8

Please sign in to comment.