diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-07-23 17:12:53 -0700 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-07-23 17:12:53 -0700 | 
| commit | 05c2e087153a9816de2c6218c2509cbdb935ccf0 (patch) | |
| tree | 6c3a390190eef6b39db8e6389119d94bb3199701 | |
| parent | 6df15cb0908dab240e85b5db1433726ee09ad9bf (diff) | |
ACME-734 : MoaP : Move the secure lock icon to the left on Media on Prim address bar
| -rwxr-xr-x | indra/newview/llpanelprimmediacontrols.cpp | 18 | ||||
| -rwxr-xr-x | indra/newview/llpanelprimmediacontrols.h | 1 | ||||
| -rwxr-xr-x | indra/newview/skins/default/xui/en/panel_prim_media_controls.xml | 26 | 
3 files changed, 23 insertions, 22 deletions
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 76d38f067d..9504f22a1d 100755 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -94,7 +94,8 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :  	mZoomObjectFace(0),  	mVolumeSliderVisible(0),  	mWindowShade(NULL), -	mHideImmediately(false) +	mHideImmediately(false), +    mSecureURL(false)  {  	mCommitCallbackRegistrar.add("MediaCtrl.Close",		boost::bind(&LLPanelPrimMediaControls::onClickClose, this));  	mCommitCallbackRegistrar.add("MediaCtrl.Back",		boost::bind(&LLPanelPrimMediaControls::onClickBack, this)); @@ -345,7 +346,7 @@ void LLPanelPrimMediaControls::updateShape()  		// Disable zoom if HUD  		mZoomCtrl->setEnabled(!is_hud);  		mUnzoomCtrl->setEnabled(!is_hud); -		mSecureLockIcon->setVisible(false); +        mSecureURL = false;  		mCurrentURL = media_impl->getCurrentMediaURL();  		mBackCtrl->setEnabled((media_impl != NULL) && media_impl->canNavigateBack() && can_navigate); @@ -382,7 +383,7 @@ void LLPanelPrimMediaControls::updateShape()  			mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible());  			mWhitelistIcon->setVisible(false); -			mSecureLockIcon->setVisible(false); +            mSecureURL = false;  			if (mMediaPanelScroll)  			{  				mMediaPanelScroll->setVisible(false); @@ -416,7 +417,7 @@ void LLPanelPrimMediaControls::updateShape()  				mMediaPlaySliderCtrl->setEnabled(true);  			} -			// video vloume +			// video volume  			if(volume <= 0.0)  			{  				mMuteBtn->setToggleState(true); @@ -492,10 +493,8 @@ void LLPanelPrimMediaControls::updateShape()  			std::string prefix =  std::string("https://");  			std::string test_prefix = mCurrentURL.substr(0, prefix.length());  			LLStringUtil::toLower(test_prefix); -			if(test_prefix == prefix) -			{ -				mSecureLockIcon->setVisible(has_focus); -			} +            mSecureURL = has_focus && (test_prefix == prefix); +            mCurrentURL = (mSecureURL ? "      " + mCurrentURL : mCurrentURL);  			if(mCurrentURL!=mPreviousURL)  			{ @@ -746,6 +745,9 @@ void LLPanelPrimMediaControls::draw()  			clearFaceOnFade();  		}  	} + +    // Show/hide the lock icon for secure browsing +    mSecureLockIcon->setVisible(mSecureURL && !mMediaAddress->hasFocus());  	// Build rect for icon area in coord system of this panel  	// Assumes layout_stack is a direct child of this panel diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index eeb433e306..6d2eb3430e 100755 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -191,6 +191,7 @@ private:  	bool mUpdateSlider;  	bool mClearFaceOnFade;  	bool mHideImmediately; +    bool mSecureURL;  	LLMatrix4 mLastCameraMat;  	EZoomLevel mCurrentZoom; diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 198ccd6e2f..8f90521bb2 100755 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -315,7 +315,18 @@  		<line_editor.commit_callback  			function="MediaCtrl.CommitURL"/>  	  </line_editor> -	  <layout_stack +        <icon +        name="media_secure_lock_flag" +        height="16" +        follows="top|left" +        image_name="Lock2" +        layout="topleft" +        left_delta="2" +        top_delta="2" +        visible="false" +        tool_tip="Secured Browsing" +        width="16" /> +        <layout_stack  		  name="media_address_url_icons"  		  animate="false"  		  follows="top|right" @@ -340,19 +351,6 @@  			  tool_tip="White List enabled"  			  width="16" />  		</layout_panel> -		<layout_panel -			layout="topleft" -			width="16" -			mouse_opaque="false" -			auto_resize="false"> -		  <icon -			  name="media_secure_lock_flag" -			  height="16" -			  image_name="Lock2" -			  layout="topleft" -			  tool_tip="Secured Browsing" -			  width="16" /> -		</layout_panel>  	  </layout_stack>  	</layout_panel>  	<layout_panel  | 
