Commits

Scott Lawrence committed df1c808 Merge

Automated merge with file:///Users/oz/Work/viewer-development

Comments (0)

Files changed (6)

indra/newview/app_settings/settings.xml

     <key>ToastGap</key>
     <map>
       <key>Comment</key>
-      <string>Gap between toasts on a screen</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>5</integer>
+      <string>Gap between toasts on a screen (min. value is 5)</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>S32</string>
+      <key>Value</key>
+      <integer>7</integer>
     </map>
     <key>ToastButtonWidth</key>
     <map>

indra/newview/llscreenchannel.cpp

 	if(mControlHovering)
 	{
 		new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
-		new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopFadingToasts, this));
-		new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startFadingToasts, this));
+		new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopFadingToast, this, new_toast_elem.toast));
+		new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startFadingToast, this, new_toast_elem.toast));
 	}
 	
 	if(show_toast)
 	if(mHoveredToast == toast)
 	{
 		mHoveredToast  = NULL;
-		startFadingToasts();
 	}
 
 	// close the toast
 	}
 }
 
-void LLNotificationsUI::LLScreenChannel::stopFadingToasts()
+void LLNotificationsUI::LLScreenChannel::stopFadingToast(LLToast* toast)
 {
-	if (!mToastList.size()) return;
+	if (!toast || toast != mHoveredToast) return;
 
-	if (!mHoveredToast) return;
-
-	std::vector<ToastElem>::iterator it = mToastList.begin();
-	while (it != mToastList.end())
-	{
-		ToastElem& elem = *it;
-		elem.toast->stopFading();
-		++it;
-	}
+	// Pause fade timer of the hovered toast.
+	toast->stopFading();
 }
 
-void LLNotificationsUI::LLScreenChannel::startFadingToasts()
+void LLNotificationsUI::LLScreenChannel::startFadingToast(LLToast* toast)
 {
-	if (!mToastList.size()) return;
+	if (!toast || toast == mHoveredToast)
+	{
+		return;
+	}
 
-	//because onMouseLeave is processed after onMouseEnter
-	if (isHovering()) return;
-
-	std::vector<ToastElem>::iterator it = mToastList.begin();
-	while (it != mToastList.end())
-	{
-		ToastElem& elem = *it;
-		if (elem.toast->getVisible())
-		{
-			elem.toast->startFading();
-		}
-		++it;
-	}
+	// Reset its fade timer.
+	toast->startFading();
 }
 
 //--------------------------------------------------------------------------

indra/newview/llscreenchannel.h

 	void		closeStartUpToast();
 
 
-	/** Stop fading all toasts */
-	virtual void stopFadingToasts();
+	/** Stop fading given toast */
+	virtual void stopFadingToast(LLToast* toast);
 
-	/** Start fading all toasts */
-	virtual void startFadingToasts();
+	/** Start fading given toast */
+	virtual void startFadingToast(LLToast* toast);
 
 	// get StartUp Toast's state
 	static bool	getStartUpToastShown() { return mWasStartUpToastShown; }

indra/newview/lltoast.cpp

 	if(!p.on_delete_toast().empty())
 		mOnDeleteToastSignal.connect(p.on_delete_toast());
 
+	// *TODO: This signal doesn't seem to be used at all.
 	if(!p.on_mouse_enter().empty())
 		mOnMouseEnterSignal.connect(p.on_mouse_enter());
 }

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

 	 visiblity_control="ShowAdvancedGraphicsSettings"
      border="false"
 	 follows="top|left"
-     height="283"
+     height="300"
      label="CustomGraphics"
      layout="topleft"
      left="5"

indra/newview/skins/default/xui/en/widgets/chat_history.xml

   font="SansSerif">
   <more_chat_text
     mouse_opaque="true" 
+    parse_urls="false"
     word_wrap="true"
     />
 </chat_history>