From 179b434d89d91e849ebdbf1e73811389c7afe24a Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 15 Dec 2010 18:02:01 -0800 Subject: 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. --- indra/newview/llfloaterwebcontent.cpp | 9 ++++++++- indra/newview/skins/default/xui/en/floater_web_content.xml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index a244c8d281..ca8533abc5 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -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() diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml index 34462d7548..2ad46824c2 100644 --- a/indra/newview/skins/default/xui/en/floater_web_content.xml +++ b/indra/newview/skins/default/xui/en/floater_web_content.xml @@ -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" -- cgit v1.2.3