From 6ddfc8031c73f342cf8459445a20cd50ceb3efba Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Tue, 12 Nov 2013 11:42:06 -0800
Subject: [PATCH] BUILDFIX - miscellaneous stuff missed in the merge

---
 indra/llui/llmodaldialog.cpp                      |  2 +-
 indra/llui/llmultifloater.cpp                     | 13 ++++++-------
 indra/llui/llmultifloater.h                       |  2 +-
 indra/llxml/llcontrol.h                           | 11 ++++++++++-
 indra/newview/llfasttimerview.cpp                 | 11 ++++++-----
 indra/newview/llfasttimerview.h                   |  2 +-
 indra/newview/llfloaterimcontainer.cpp            |  9 +--------
 indra/newview/llpersistentnotificationstorage.cpp |  6 +++---
 indra/newview/llscenemonitor.cpp                  |  2 +-
 indra/newview/llscenemonitor.h                    |  2 +-
 indra/newview/llsceneview.cpp                     |  2 +-
 indra/newview/llsceneview.h                       |  2 +-
 indra/newview/llvoavatar.cpp                      |  8 ++++----
 13 files changed, 37 insertions(+), 35 deletions(-)

diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 47cdd098fa7..d83028ec4aa 100755
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -195,7 +195,7 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask)
 	if( childrenHandleHover(x, y, mask) == NULL )
 	{
 		getWindow()->setCursor(UI_CURSOR_ARROW);
-		LL_DEBUGS(LLERR_USER_INPUT) << "hover handled by " << getName() << LL_ENDL;		
+		LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL;		
 	}
 
 	LLView* popup_menu = LLMenuGL::sMenuContainer->getVisibleMenu();
diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp
index 48b5b08c1b5..d1a597511ef 100755
--- a/indra/llui/llmultifloater.cpp
+++ b/indra/llui/llmultifloater.cpp
@@ -67,14 +67,13 @@ void LLMultiFloater::buildTabContainer()
 	}
 }
 
-void LLMultiFloater::onOpen(const LLSD& key)
+void LLMultiFloater::onClose(bool app_quitting)
 {
-// 	if (mTabContainer->getTabCount() <= 0)
-// 	{
-// 		// for now, don't allow multifloaters
-// 		// without any child floaters
-// 		closeFloater();
-// 	}
+	if(isMinimized())
+	{
+		setMinimized(FALSE);
+	}
+	LLFloater::onClose(app_quitting);
 }
 
 void LLMultiFloater::draw()
diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h
index c1b1a357edc..c106a625274 100755
--- a/indra/llui/llmultifloater.h
+++ b/indra/llui/llmultifloater.h
@@ -44,7 +44,7 @@ class LLMultiFloater : public LLFloater
 	void buildTabContainer();
 	
 	virtual BOOL postBuild();
-	/*virtual*/ void onOpen(const LLSD& key);
+	/*virtual*/ void onClose(bool app_quitting);
 	virtual void draw();
 	virtual void setVisible(BOOL visible);
 	/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 8a8479f90f3..04575d81e09 100755
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -395,7 +395,6 @@ class LLCachedControl
 public:
 	LLCachedControl(LLControlGroup& group,
 					const std::string& name,
-
 					const T& default_value, 
 					const std::string& comment = "Declared In Code")
 	{
@@ -406,6 +405,16 @@ class LLCachedControl
 		}
 	}
 
+	LLCachedControl(LLControlGroup& group,
+					const std::string& name)
+	{
+		mCachedControlPtr = LLControlCache<T>::getInstance(name);
+		if (mCachedControlPtr.isNull())
+		{
+			mCachedControlPtr = new LLControlCache<T>(group, name);
+		}
+	}
+
 	operator const T&() const { return mCachedControlPtr->getValue(); }
 	operator boost::function<const T&()> () const { return boost::function<const T&()>(*this); }
 	const T& operator()() { return mCachedControlPtr->getValue(); }
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index bc075195066..76c37439abd 100755
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -413,7 +413,7 @@ void LLFastTimerView::draw()
 	mAllTimeMax = llmax(mAllTimeMax, mRecording.getLastRecording().getSum(FTM_FRAME));
 	mHoverID = NULL;
 	mHoverBarIndex = -1;
-					}
+}
 
 void LLFastTimerView::onOpen(const LLSD& key)
 {
@@ -429,6 +429,10 @@ void LLFastTimerView::onOpen(const LLSD& key)
 	}
 }
 										
+void LLFastTimerView::onClose(bool app_quitting)
+{
+	setVisible(FALSE);
+}
 
 void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch)
 {
@@ -936,10 +940,7 @@ void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::
 		return ;
 	}
 }
-void	LLFastTimerView::onClickCloseBtn(bool)
-{
-	setVisible(false);
-}
+
 
 void LLFastTimerView::printLineStats()
 {
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index d7d87c85229..3e30bd86ba8 100755
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -62,10 +62,10 @@ class LLFastTimerView : public LLFloater
 	virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
 	virtual void draw();
 	virtual void onOpen(const LLSD& key);
+	virtual void onClose(bool app_quitting);
 	LLTrace::BlockTimerStatHandle* getLegendID(S32 y);
 
 private:	
-	virtual	void	onClickCloseBtn(bool app_quitting = false);
 	void drawTicks();
 	void drawLineGraph();
 	void drawLegend();
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 7bd449b8b6e..12006a31ba7 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -2133,14 +2133,7 @@ BOOL LLFloaterIMContainer::isFrontmost()
 // This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater.
 void LLFloaterIMContainer::onClickCloseBtn(bool app_quitting/* = false*/)
 {
-	// Always unminimize before trying to close.
-	// Most of the time the user will never see this state.
-	if(isMinimized())
-	{
-		LLMultiFloater::setMinimized(FALSE);
-	}
-
-	LLFloater::closeFloater(app_quitting);
+	LLMultiFloater::closeFloater(app_quitting);
 }
 
 void LLFloaterIMContainer::closeHostedFloater()
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index ea3cd9e78ea..ce4b2d543b4 100755
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -79,9 +79,9 @@ void LLPersistentNotificationStorage::saveNotifications()
 		data.append(notification->asLLSD(true));
 		if (data.size() >= gSavedSettings.getS32("MaxPersistentNotifications"))
 		{
-			llwarns << "Too many persistent notifications."
+			LL_WARNS() << "Too many persistent notifications."
 					<< " Saved " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << history_channel->size()
-					<< " persistent notifications." << llendl;
+					<< " persistent notifications." << LL_ENDL;
 			break;
 		}
 
@@ -147,7 +147,7 @@ void LLPersistentNotificationStorage::loadNotifications()
 		if (processed_notifications >= gSavedSettings.getS32("MaxPersistentNotifications"))
 		{
 			llwarns << "Too many persistent notifications."
-					<< " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << llendl;
+					<< " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << LL_ENDL;
 		    break;
 		}
 	}
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 6c35ae26720..44ab35420b3 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -699,7 +699,7 @@ LLSceneMonitorView::LLSceneMonitorView(const LLRect& rect)
 	setCanClose(true);
 }
 
-void LLSceneMonitorView::onClickCloseBtn()
+void LLSceneMonitorView::onClose(bool app_quitting)
 {
 	setVisible(false);	
 }
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index c99ec1e8249..e9ceb2aa2ab 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -115,7 +115,7 @@ class LLSceneMonitorView : public LLFloater
 	virtual void onVisibilityChange(BOOL visible);
 
 protected:
-	virtual void onClickCloseBtn();
+	virtual void onClose(bool app_quitting=false);
 };
 
 extern LLSceneMonitorView* gSceneMonitorView;
diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp
index cbd8bee9d57..32f327b7620 100755
--- a/indra/newview/llsceneview.cpp
+++ b/indra/newview/llsceneview.cpp
@@ -51,7 +51,7 @@ LLSceneView::LLSceneView(const LLRect& rect)
 	setCanClose(true);
 }
 
-void LLSceneView::onClickCloseBtn(bool)
+void LLSceneView::onClose(bool)
 {
 	setVisible(false);
 }
diff --git a/indra/newview/llsceneview.h b/indra/newview/llsceneview.h
index 1fceecb9e1a..6d839bcf081 100755
--- a/indra/newview/llsceneview.h
+++ b/indra/newview/llsceneview.h
@@ -38,7 +38,7 @@ class LLSceneView : public LLFloater
 	virtual void draw();
 	
 protected:
-	virtual void onClickCloseBtn(bool app_qutting = false);
+	virtual void onClose(bool app_qutting = false);
 
 
 };
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index bccb0d46cf0..3652e422c51 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5517,10 +5517,10 @@ void LLVOAvatar::addChild(LLViewerObject *childp)
 	{
 		if (!attachObject(childp))
 		{
-			llwarns << "addChild() failed for " 
+			LL_WARNS() << "addChild() failed for " 
 					<< childp->getID()
 					<< " item " << childp->getAttachmentItemID()
-					<< llendl;
+					<< LL_ENDL;
 			// MAINT-3312 backout
 			// mPendingAttachment.push_back(childp);
 		}
@@ -5652,10 +5652,10 @@ void LLVOAvatar::lazyAttach()
 		{
 			if (!attachObject(cur_attachment))
 			{	// Drop it
-				llwarns << "attachObject() failed for " 
+				LL_WARNS() << "attachObject() failed for " 
 					<< cur_attachment->getID()
 					<< " item " << cur_attachment->getAttachmentItemID()
-					<< llendl;
+					<< LL_ENDL;
 				// MAINT-3312 backout
 				//still_pending.push_back(cur_attachment);
 			}
-- 
GitLab