From: Włodzimierz Skiba Date: Fri, 11 Jun 2004 14:45:09 +0000 (+0000) Subject: wxUSE_PROGRESSDLG is optional. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3511e024050f51f4a28f983c9765bac94b84dfac wxUSE_PROGRESSDLG is optional. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 9e952b723a..ece0c36d9a 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -715,21 +715,29 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword, m_SearchWholeWords->GetValue(), book); +#if wxUSE_PROGRESSDLG wxProgressDialog progress(_("Searching..."), _("No matching page found yet"), status.GetMaxIndex(), this, wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE); +#endif int curi; while (status.IsActive()) { curi = status.GetCurIndex(); - if (curi % 32 == 0 && progress.Update(curi) == FALSE) + if (curi % 32 == 0 +#if wxUSE_PROGRESSDLG + && progress.Update(curi) == FALSE +#endif + ) break; if (status.Search()) { foundstr.Printf(_("Found %i matches"), ++foundcnt); +#if wxUSE_PROGRESSDLG progress.Update(status.GetCurIndex(), foundstr); +#endif m_SearchList->Append(status.GetName(), status.GetContentsItem()); } }