From ca05511e3e4c9a64c80505c4dd92d42d27e9f414 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 20 Jul 2012 19:37:44 +0200 Subject: Add log textctrl --- dialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dialog.cpp') diff --git a/dialog.cpp b/dialog.cpp index cc46719..634c9b0 100644 --- a/dialog.cpp +++ b/dialog.cpp @@ -12,6 +12,8 @@ Dialog::Dialog(wxWindow *parent) : DialogUI(parent) { + m_log = new wxLogTextCtrl(m_textctrl); + wxLog::SetActiveTarget(m_log); RefreshDrives(); } @@ -88,5 +90,10 @@ void Dialog::SetProgress(size_t current, size_t total, const char *filename ) { if (m_gauge->GetRange() != total) m_gauge->SetRange(total); - m_gauge->SetValue(current); + if (m_gauge->GetValue() != current) + m_gauge->SetValue(current); + if (filename != NULL) { + wxString msg = wxString::FromAscii(filename); + wxLogMessage(msg); + } } -- cgit v1.2.3