wxUSE_PROGRESSDLG is optional.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -715,21 +715,29 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword,
|
|||||||
m_SearchWholeWords->GetValue(),
|
m_SearchWholeWords->GetValue(),
|
||||||
book);
|
book);
|
||||||
|
|
||||||
|
#if wxUSE_PROGRESSDLG
|
||||||
wxProgressDialog progress(_("Searching..."),
|
wxProgressDialog progress(_("Searching..."),
|
||||||
_("No matching page found yet"),
|
_("No matching page found yet"),
|
||||||
status.GetMaxIndex(), this,
|
status.GetMaxIndex(), this,
|
||||||
wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE);
|
wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE);
|
||||||
|
#endif
|
||||||
|
|
||||||
int curi;
|
int curi;
|
||||||
while (status.IsActive())
|
while (status.IsActive())
|
||||||
{
|
{
|
||||||
curi = status.GetCurIndex();
|
curi = status.GetCurIndex();
|
||||||
if (curi % 32 == 0 && progress.Update(curi) == FALSE)
|
if (curi % 32 == 0
|
||||||
|
#if wxUSE_PROGRESSDLG
|
||||||
|
&& progress.Update(curi) == FALSE
|
||||||
|
#endif
|
||||||
|
)
|
||||||
break;
|
break;
|
||||||
if (status.Search())
|
if (status.Search())
|
||||||
{
|
{
|
||||||
foundstr.Printf(_("Found %i matches"), ++foundcnt);
|
foundstr.Printf(_("Found %i matches"), ++foundcnt);
|
||||||
|
#if wxUSE_PROGRESSDLG
|
||||||
progress.Update(status.GetCurIndex(), foundstr);
|
progress.Update(status.GetCurIndex(), foundstr);
|
||||||
|
#endif
|
||||||
m_SearchList->Append(status.GetName(), status.GetContentsItem());
|
m_SearchList->Append(status.GetName(), status.GetContentsItem());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user