SOCIAL-389 FIX Stop button in Web Content panel does not stop page content from loading or progress bar

So many things wrong here it wasn't funny - button not enabled, button not connected to function, wrong call to stop browser etc.
meow-7.2.2
callum 2010-12-15 18:02:01 -08:00
parent 27708009f1
commit 179b434d89
2 changed files with 9 additions and 2 deletions

View File

@ -45,6 +45,7 @@ LLFloaterWebContent::LLFloaterWebContent( const LLSD& key )
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this ));
mCommitCallbackRegistrar.add( "WebContent.Reload", boost::bind( &LLFloaterWebContent::onClickReload, this ));
mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this ));
mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this ));
mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind( &LLFloaterWebContent::onPopExternal, this ));
}
@ -338,7 +339,13 @@ void LLFloaterWebContent::onClickReload()
void LLFloaterWebContent::onClickStop()
{
if( mWebBrowser->getMediaPlugin() )
mWebBrowser->getMediaPlugin()->stop();
mWebBrowser->getMediaPlugin()->browse_stop();
// still should happen when we catch the navigate complete event
// but sometimes (don't know why) that event isn't sent from Qt
// and we getto a point where the stop button stays active.
getChildView("reload")->setVisible( true );
getChildView("stop")->setVisible( false );
}
void LLFloaterWebContent::onEnterAddress()

View File

@ -75,7 +75,7 @@
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
tool_tip="Stop navigation"
enabled="false"
enabled="true"
follows="left|top"
height="22"
layout="topleft"