diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-29 18:03:39 +0300 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-29 18:03:39 +0300 |
commit | 6a463a41fec89c7f1eadb77c16eeae169ff777d0 (patch) | |
tree | f297c32418eb139eded752ce99b418773328e458 /indra/newview/llnearbychat.cpp | |
parent | c44db34a15abd2e96b8fd461e9fb3e217fe648cc (diff) | |
parent | 71ed326f51770b215ba5dd2ac8d159c3b764c2d2 (diff) |
Merge sergeylproductengine/viewer-experience-fui with richard/viewer-experience-fui
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r-- | indra/newview/llnearbychat.cpp | 78 |
1 files changed, 15 insertions, 63 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 44c29fe05e..a16ea0e7d3 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -58,11 +58,13 @@ static const S32 RESIZE_BAR_THICKNESS = 3; -LLNearbyChat::LLNearbyChat(const LLSD& key) - : LLDockableFloater(NULL, false, false, key) + +static LLRegisterPanelClassWrapper<LLNearbyChat> t_panel_nearby_chat("panel_nearby_chat"); + +LLNearbyChat::LLNearbyChat() + : LLPanel() ,mChatHistory(NULL) { - } LLNearbyChat::~LLNearbyChat() @@ -87,54 +89,12 @@ BOOL LLNearbyChat::postBuild() mChatHistory = getChild<LLChatHistory>("chat_history"); - if(!LLDockableFloater::postBuild()) + if(!LLPanel::postBuild()) return false; - - if (getDockControl() == NULL) - { - setDockControl(new LLDockControl( - LLBottomTray::getInstance()->getNearbyChatBar(), this, - getDockTongue(), LLDockControl::TOP, boost::bind(&LLNearbyChat::getAllowedRect, this, _1))); - } - - //fix for EXT-4621 - //chrome="true" prevents floater from stilling capture - setIsChrome(true); - //chrome="true" hides floater caption - if (mDragHandle) - mDragHandle->setTitleVisible(TRUE); - + return true; } - -void LLNearbyChat::applySavedVariables() -{ - if (mRectControl.size() > 1) - { - const LLRect& rect = LLFloater::getControlGroup()->getRect(mRectControl); - if(!rect.isEmpty() && rect.isValid()) - { - reshape(rect.getWidth(), rect.getHeight()); - setRect(rect); - } - } - - - if(!LLFloater::getControlGroup()->controlExists(mDocStateControl)) - { - setDocked(true); - } - else - { - if (mDocStateControl.size() > 1) - { - bool dockState = LLFloater::getControlGroup()->getBOOL(mDocStateControl); - setDocked(dockState); - } - } -} - std::string appendTime() { time_t utc_time; @@ -230,18 +190,9 @@ void LLNearbyChat::setVisible(BOOL visible) } } - LLDockableFloater::setVisible(visible); + LLPanel::setVisible(visible); } -void LLNearbyChat::onOpen(const LLSD& key ) -{ - LLDockableFloater::onOpen(key); -} - -void LLNearbyChat::setRect (const LLRect &rect) -{ - LLDockableFloater::setRect(rect); -} void LLNearbyChat::getAllowedRect(LLRect& rect) { @@ -264,9 +215,9 @@ void LLNearbyChat::updateChatHistoryStyle() //static void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue) { - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); - if(nearby_chat) - nearby_chat->updateChatHistoryStyle(); + //LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); + //if(nearby_chat) + // nearby_chat->updateChatHistoryStyle(); } bool isWordsName(const std::string& name) @@ -340,7 +291,8 @@ void LLNearbyChat::loadHistory() //static LLNearbyChat* LLNearbyChat::getInstance() { - return LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); + LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar"); + return chat_bar->findChild<LLNearbyChat>("nearby_chat"); } //////////////////////////////////////////////////////////////////////////////// @@ -368,7 +320,7 @@ BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask) if(mChatHistory) mChatHistory->setFocus(TRUE); - return LLDockableFloater::handleMouseDown(x, y, mask); + return LLPanel::handleMouseDown(x, y, mask); } void LLNearbyChat::draw() @@ -381,5 +333,5 @@ void LLNearbyChat::draw() setTransparencyType(hasFocus() ? TT_ACTIVE : TT_INACTIVE); } - LLDockableFloater::draw(); + LLPanel::draw(); } |