From 9cf11a52159bebe69e6b97c5f6dff05c894c0495 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 21 Mar 2014 13:06:38 +0100 Subject: [PATCH] Let FSFloaterNearbyChat derive from LLFloater directly - it's not that kind of floater that's going to dock to any chiclet --- indra/newview/fsfloaternearbychat.cpp | 28 ++++++--------------------- indra/newview/fsfloaternearbychat.h | 6 +----- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index 604c296650..8dd1db7f6f 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -90,7 +90,7 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { }; FSFloaterNearbyChat::FSFloaterNearbyChat(const LLSD& key) - : LLDockableFloater(NULL, false, false, key) + : LLFloater(key) ,mChatHistory(NULL) ,mInputEditor(NULL) // Optional muted chat history @@ -177,7 +177,7 @@ BOOL FSFloaterNearbyChat::postBuild() FSUseNearbyChatConsole = gSavedSettings.getBOOL("FSUseNearbyChatConsole"); gSavedSettings.getControl("FSUseNearbyChatConsole")->getSignal()->connect(boost::bind(&FSFloaterNearbyChat::updateFSUseNearbyChatConsole, this, _2)); - return LLDockableFloater::postBuild(); + return LLFloater::postBuild(); } std::string appendTime() @@ -388,16 +388,13 @@ void FSFloaterNearbyChat::setVisible(BOOL visible) { removeScreenChat(); } - LLDockableFloater::setVisible(visible); + LLFloater::setVisible(visible); // Support for chat console static LLCachedControl chatHistoryTornOff(gSavedSettings, "ChatHistoryTornOff"); if (FSUseNearbyChatConsole) { - // [FS communication UI] - //LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); FSFloaterIMContainer* floater_container = FSFloaterIMContainer::getInstance(); - // [FS communication UI] if (floater_container && !chatHistoryTornOff && !floater_container->getVisible()) { // In case the nearby chat is docked into the IM floater and the @@ -465,17 +462,7 @@ void FSFloaterNearbyChat::onOpen(const LLSD& key ) setVisible(TRUE); } - LLDockableFloater::onOpen(key); -} - -void FSFloaterNearbyChat::setRect(const LLRect &rect) -{ - LLDockableFloater::setRect(rect); -} - -void FSFloaterNearbyChat::getAllowedRect(LLRect& rect) -{ - rect = gViewerWindow->getWorldViewRectScaled(); + LLFloater::onOpen(key); } // exported here for "clrchat" command line -Zi @@ -669,10 +656,7 @@ BOOL FSFloaterNearbyChat::getVisible() { if (isChatMultiTab()) { - // [FS communication UI] - //LLIMFloaterContainer* im_container = LLIMFloaterContainer::getInstance(); FSFloaterIMContainer* im_container = FSFloaterIMContainer::getInstance(); - // [FS communication UI] // Treat inactive floater as invisible. bool is_active = im_container->getActiveFloater() == this; @@ -680,7 +664,7 @@ BOOL FSFloaterNearbyChat::getVisible() //torn off floater is always inactive if (!is_active && getHost() != im_container) { - return LLDockableFloater::getVisible(); + return LLFloater::getVisible(); } // getVisible() returns TRUE when Tabbed IM window is minimized. @@ -688,7 +672,7 @@ BOOL FSFloaterNearbyChat::getVisible() } else { - return LLDockableFloater::getVisible(); + return LLFloater::getVisible(); } } diff --git a/indra/newview/fsfloaternearbychat.h b/indra/newview/fsfloaternearbychat.h index 39f308b2c2..62582cb471 100644 --- a/indra/newview/fsfloaternearbychat.h +++ b/indra/newview/fsfloaternearbychat.h @@ -40,7 +40,7 @@ class FSChatHistory; #include "llchatentry.h" #include "lllayoutstack.h" -class FSFloaterNearbyChat: public LLDockableFloater +class FSFloaterNearbyChat: public LLFloater { public: FSFloaterNearbyChat(const LLSD& key); @@ -58,8 +58,6 @@ public: /*virtual*/ void setVisible(BOOL visible); void openFloater(const LLSD& key); - virtual void setRect (const LLRect &rect); - void clearChatHistory(); virtual void updateChatHistoryStyle(); @@ -116,8 +114,6 @@ protected: static S32 sLastSpecialChatChannel; private: - void getAllowedRect (LLRect& rect); - void onNearbySpeakers (); private: