Added reload button to web-based search and showcase, since a page failing to load shouldn't require a client restart in order to try it again.

This commit is contained in:
Shyotl
2011-03-15 02:32:14 -05:00
parent 62d7f3d59f
commit ef4c050e35
3 changed files with 21 additions and 3 deletions

View File

@@ -109,6 +109,7 @@ BOOL LLPanelDirFind::postBuild()
childSetAction("back_btn", onClickBack, this);
childSetAction("home_btn", onClickHome, this);
childSetAction("forward_btn", onClickForward, this);
childSetAction("reload_btn", onClickRefresh, this);
childSetCommitCallback("search_editor", onCommitSearch, this);
childSetAction("search_btn", onClickSearch, this);
childSetAction("?", onClickHelp, this);
@@ -177,6 +178,7 @@ void LLPanelDirFind::draw()
bool enable_forward = mWebBrowser->canNavigateForward();
childSetEnabled( "forward_btn", enable_forward );
childSetEnabled( "reload_btn", TRUE );
}
// showcase doesn't have maturity flags -- it's all PG
@@ -464,6 +466,16 @@ void LLPanelDirFind::onClickHome( void* data )
}
}
// static
void LLPanelDirFind::onClickRefresh( void* data )
{
LLPanelDirFind* self = ( LLPanelDirFind* )data;
if ( self->mWebBrowser )
{
self->mWebBrowser->navigateTo(self->mWebBrowser->getCurrentNavUrl());
}
}
// static
void LLPanelDirFind::onCommitSearch(LLUICtrl*, void* data)
{