Commits

Scott Lawrence committed 7fe6d32 Merge

merge changes for web profiles

Comments (0)

Files changed (8)

doc/contributions.txt

 	STORM-679
 	STORM-737
 	STORM-726
+	STORM-812
 	VWR-17801
 	STORM-785
 Kage Pixel

indra/newview/llagent.cpp

 	mFirstLogin(FALSE),
 	mGenderChosen(FALSE),
 
-	mAppearanceSerialNum(0)
+	mAppearanceSerialNum(0),
+
+	mMouselookModeInSignal(NULL),
+	mMouselookModeOutSignal(NULL)
 {
 	for (U32 i = 0; i < TOTAL_CONTROLS; i++)
 	{
 {
 	cleanup();
 
+	delete mMouselookModeInSignal;
+	delete mMouselookModeOutSignal;
+
 	// *Note: this is where LLViewerCamera::getInstance() used to be deleted.
 }
 
 
 		LLFloaterCamera::onLeavingMouseLook();
 
+		if (mMouselookModeOutSignal)
+		{
+			(*mMouselookModeOutSignal)();
+		}
+
 		// Only pop if we have pushed...
 		if (TRUE == mViewsPushed)
 		{
 
 		mViewsPushed = TRUE;
 
+		if (mMouselookModeInSignal)
+		{
+			(*mMouselookModeInSignal)();
+		}
+
 		// hide all floaters except the mini map
 
 #if 0 // Use this once all floaters are registered
 				}
 			}
 		}
-
 	}
 	else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
 	{
 	gAgentCamera.updateLastCamera();
 }
 
+boost::signals2::connection LLAgent::setMouselookModeInCallback( const camera_signal_t::slot_type& cb )
+{
+	if (!mMouselookModeInSignal) mMouselookModeInSignal = new camera_signal_t();
+	return mMouselookModeInSignal->connect(cb);
+}
+
+boost::signals2::connection LLAgent::setMouselookModeOutCallback( const camera_signal_t::slot_type& cb )
+{
+	if (!mMouselookModeOutSignal) mMouselookModeOutSignal = new camera_signal_t();
+	return mMouselookModeOutSignal->connect(cb);
+}
+
 //-----------------------------------------------------------------------------
 // heardChat()
 //-----------------------------------------------------------------------------

indra/newview/llagent.h

 #include "llvoavatardefines.h"
 #include "llslurl.h"
 
+#include <boost/signals2.hpp>
+
 extern const BOOL 	ANIMATE;
 extern const U8 	AGENT_STATE_TYPING;  // Typing indication
 extern const U8 	AGENT_STATE_EDITING; // Set when agent has objects selected
 	BOOL			getCustomAnim() const { return mCustomAnim; }
 	void			setCustomAnim(BOOL anim) { mCustomAnim = anim; }
 	
+	typedef boost::signals2::signal<void ()> camera_signal_t;
+	boost::signals2::connection setMouselookModeInCallback( const camera_signal_t::slot_type& cb );
+	boost::signals2::connection setMouselookModeOutCallback( const camera_signal_t::slot_type& cb );
+
 private:
+	camera_signal_t* mMouselookModeInSignal;
+	camera_signal_t* mMouselookModeOutSignal;
 	BOOL            mCustomAnim; 		// Current animation is ANIM_AGENT_CUSTOMIZE ?
 	LLAnimPauseRequest mPauseRequest;
 	BOOL			mViewsPushed; 		// Keep track of whether or not we have pushed views

indra/newview/llinventorypanel.cpp

 {
 	S32 z_min = S32_MAX;
 	LLInventoryPanel* res = NULL;
+	LLFloater* active_inv_floaterp = NULL;
+
 	// A. If the inventory side panel is open, use that preferably.
 	if (is_inventorysp_active())
 	{
 		{
 			res = inventorySP->getActivePanel();
 			z_min = gFloaterView->getZOrder(inv_floater);
+			active_inv_floaterp = inv_floater;
 		}
 		else
 		{
 			{
 				res = iv->getPanel();
 				z_min = z_order;
+				active_inv_floaterp = iv;
 			}
 		}
 	}
-	if (res) return res;
+
+	if (res)
+	{
+		// Make sure the floater is not minimized (STORM-438).
+		if (active_inv_floaterp && active_inv_floaterp->isMinimized())
+			active_inv_floaterp->setMinimized(FALSE);
+
+		return res;
+	}
 		
 	// C. If no panels are open and we don't want to force open a panel, then just abort out.
 	if (!auto_open) return NULL;

indra/newview/llpanelprimmediacontrols.cpp

 	mZoomObjectID(LLUUID::null),
 	mZoomObjectFace(0),
 	mVolumeSliderVisible(0),
-	mWindowShade(NULL)
+	mWindowShade(NULL),
+	mHideImmediately(false)
 {
 	mCommitCallbackRegistrar.add("MediaCtrl.Close",		boost::bind(&LLPanelPrimMediaControls::onClickClose, this));
 	mCommitCallbackRegistrar.add("MediaCtrl.Back",		boost::bind(&LLPanelPrimMediaControls::onClickBack, this));
 		
 	mMediaAddress->setFocusReceivedCallback(boost::bind(&LLPanelPrimMediaControls::onInputURL, _1, this ));
 	
+	gAgent.setMouselookModeInCallback(boost::bind(&LLPanelPrimMediaControls::onMouselookModeIn, this));
+
 	LLWindowShade::Params window_shade_params;
 	window_shade_params.name = "window_shade";
 
 	}
 
 	F32 alpha = getDrawContext().mAlpha;
-	if(mFadeTimer.getStarted())
+	if(mHideImmediately)
+	{
+		//hide this panel
+		clearFaceOnFade();
+
+		mHideImmediately = false;
+	}
+	else if(mFadeTimer.getStarted())
 	{
 		F32 time = mFadeTimer.getElapsedTimeF32();
 		alpha *= llmax(lerp(1.0, 0.0, time / mControlFadeTime), 0.0f);
 
 		if(time >= mControlFadeTime)
 		{
-			if(mClearFaceOnFade)
-			{
-				// Hiding this object makes scroll events go missing after it fades out 
-				// (see DEV-41755 for a full description of the train wreck).
-				// Only hide the controls when we're untargeting.
-				setVisible(FALSE);
-
-				mClearFaceOnFade = false;
-				mVolumeSliderVisible = 0;
-				mTargetImplID = LLUUID::null;
-				mTargetObjectID = LLUUID::null;
-				mTargetObjectFace = 0;
-			}
+			//hide this panel
+			clearFaceOnFade();
 		}
 	}
 	
 	return mVolumeSliderVisible > 0;
 }
 
+
+void LLPanelPrimMediaControls::clearFaceOnFade()
+{
+	if(mClearFaceOnFade)
+	{
+		// Hiding this object makes scroll events go missing after it fades out
+		// (see DEV-41755 for a full description of the train wreck).
+		// Only hide the controls when we're untargeting.
+		setVisible(FALSE);
+
+		mClearFaceOnFade = false;
+		mVolumeSliderVisible = 0;
+		mTargetImplID = LLUUID::null;
+		mTargetObjectID = LLUUID::null;
+		mTargetObjectFace = 0;
+	}
+}
+
+void LLPanelPrimMediaControls::onMouselookModeIn()
+{
+	LLViewerMediaFocus::getInstance()->clearHover();
+	mHideImmediately = true;
+}
+
 void LLPanelPrimMediaControls::showNotification(LLNotificationPtr notify)
 {
 	delete mWindowShade;

indra/newview/llpanelprimmediacontrols.h

 	void showNotification(LLNotificationPtr notify);
 	void hideNotification();
 
+
 	enum EZoomLevel
 	{
 		ZOOM_NONE = 0,
 	LLPluginClassMedia* getTargetMediaPlugin();
 	
 private:
-	
+
+	void clearFaceOnFade();
+
+	void onMouselookModeIn();
+
 	LLView *mMediaRegion;
 	LLUICtrl *mBackCtrl;
 	LLUICtrl *mFwdCtrl;
 	bool mPauseFadeout;
 	bool mUpdateSlider;
 	bool mClearFaceOnFade;
+	bool mHideImmediately;
 
 	LLMatrix4 mLastCameraMat;
 	EZoomLevel mCurrentZoom;

indra/newview/llsidepaneltaskinfo.cpp

 	*/
 
 	LLSafeHandle<LLObjectSelection> object_selection = LLSelectMgr::getInstance()->getSelection();
-	const BOOL multi_select = (object_selection->getNumNodes() > 1);
+	const BOOL any_selected = (object_selection->getNumNodes() > 0);
 
-	mOpenBtn->setVisible(!multi_select);
-	mPayBtn->setVisible(!multi_select);
-	mBuyBtn->setVisible(!multi_select);
-	mDetailsBtn->setVisible(multi_select);
-	mDetailsBtn->setEnabled(multi_select);
+	mOpenBtn->setVisible(true);
+	mPayBtn->setVisible(true);
+	mBuyBtn->setVisible(true);
+	mDetailsBtn->setVisible(true);
 
 	mOpenBtn->setEnabled(enable_object_open());
 	mPayBtn->setEnabled(enable_pay_object());
 	mBuyBtn->setEnabled(enable_buy_object());
+	mDetailsBtn->setEnabled(any_selected);
 }
 
 void LLSidepanelTaskInfo::onOpenButtonClicked()

indra/newview/skins/default/xui/en/sidepanel_task_info.xml

 		     left="5"
 		     name="open_btn"
 		     top="0"
-		     width="100" />
+		     width="73" />
 	    <button
 		     follows="bottom|left"
 		     height="23"
 		     left_pad="5"
 		     name="pay_btn"
 		     top="0"
-		     width="100" />
+		     width="73" />
 	    <button
 		     follows="bottom|left"
 		     height="23"
 		     left_pad="5"
 		     name="buy_btn"
 		     top="0"
-		     width="100" />
+		     width="73" />
         <button
 		     follows="bottom|left"
 		     height="23"
 		     label="Details"
 		     layout="topleft"
-		     left="5"
+		     left_pad="5"
 		     name="details_btn"
 		     top="0"
-		     width="100"
-			 visible="false" />
+		     width="74" />
 
 	</panel>
 </panel>