From b23f445060a4285fc456aa6a70cd1e577f931d5d Mon Sep 17 00:00:00 2001 From: Arrehn Date: Tue, 30 Nov 2010 14:58:38 -0500 Subject: [PATCH] Initial support for a unified tabbed comm window with both nearby chat and IMs. A bit hackish, and room for improvement, but it works and is a huge leap forward for many. --- FIRESTORM-FEATURETABLE.txt | 4 +- indra/newview/llimfloatercontainer.cpp | 15 +++ indra/newview/llnearbychat.cpp | 37 +++++- indra/newview/llnearbychat.h | 1 + .../default/xui/en/floater_im_container.xml | 5 +- .../default/xui/en/floater_im_session.xml | 2 +- .../default/xui/en/floater_nearby_chat.xml | 112 +++++++++++------- .../default/xui/en/panel_nearby_chat_bar.xml | 2 +- 8 files changed, 124 insertions(+), 54 deletions(-) diff --git a/FIRESTORM-FEATURETABLE.txt b/FIRESTORM-FEATURETABLE.txt index 293d158477..ccb00900f6 100644 --- a/FIRESTORM-FEATURETABLE.txt +++ b/FIRESTORM-FEATURETABLE.txt @@ -3,6 +3,7 @@ Please keep this updated with major user-facing features we add to firestorm bey FEATURE LICENSE DePatronizedMenus LGPL +AppalachianStarlight LGPL RLVa LGPL WornItems LGPL VerticalTabIms LGPL @@ -13,4 +14,5 @@ ViewerTagBroadcast LGPL LargeProfile LGPL ImprovedPrefs LGPL WindlightExtraSettings LGPL -WindlightServerProtocol LGPL +WindlightParcelProtocol LGPL +UnifiedCommWindow LGPL diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 33cb3a54a7..413b362e4b 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -35,6 +35,9 @@ #include "llagent.h" #include "lltransientfloatermgr.h" +#include "llnearbychat.h" +#include "llfloater.h" + // // LLIMFloaterContainer // @@ -60,7 +63,19 @@ BOOL LLIMFloaterContainer::postBuild() void LLIMFloaterContainer::onOpen(const LLSD& key) { + LLMultiFloater::onOpen(key); + + + // If we're using multitabs, and we open up for the first time + // Add localchat by default if it's not already on the screen somewhere else. -AO + LLFloater* floater = LLNearbyChat::getInstance(); + if (! LLFloater::isVisible(floater)) + { + LLMultiFloater::showFloater(floater, LLTabContainer::START); + } + + /* if (key.isDefined()) { diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 180695e40b..c6f7340c64 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -55,6 +55,12 @@ #include "llfloaterreg.h" #include "lltrans.h" +// IM +#include "llbutton.h" +#include "lllayoutstack.h" + +#include "llimfloatercontainer.h" + static const S32 RESIZE_BAR_THICKNESS = 3; LLNearbyChat::LLNearbyChat(const LLSD& key) @@ -68,6 +74,7 @@ LLNearbyChat::~LLNearbyChat() { } + BOOL LLNearbyChat::postBuild() { //menu @@ -84,8 +91,19 @@ BOOL LLNearbyChat::postBuild() gSavedSettings.declareS32("nearbychat_showicons_and_names",2,"NearByChat header settings",true); + /* Imish things */ + + LLButton* slide_left = getChild("slide_left_btn"); + slide_left->setVisible(false); + LLButton* slide_right = getChild("slide_right_btn"); + slide_right->setVisible(false); + + /****************/ + mChatHistory = getChild("chat_history"); - + return LLFloater::postBuild(); + + /* if(!LLDockableFloater::postBuild()) return false; @@ -104,6 +122,7 @@ BOOL LLNearbyChat::postBuild() mDragHandle->setTitleVisible(TRUE); return true; + */ } @@ -218,6 +237,18 @@ bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata) return false; } +void LLNearbyChat::openFloater(const LLSD& key) +{ + // We override this to put nearbychat in the IM floater. -AO + LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); + if (floater_container) + { + floater_container->showFloater(this, LLTabContainer::START); + } + + LLFloater::openFloater(key); +} + void LLNearbyChat::setVisible(BOOL visible) { if(visible) @@ -228,15 +259,17 @@ void LLNearbyChat::setVisible(BOOL visible) chat_channel->removeToastsFromChannel(); } } - LLDockableFloater::setVisible(visible); } void LLNearbyChat::onOpen(const LLSD& key ) { + llinfos << "onOPEN called..." << llendl; LLDockableFloater::onOpen(key); } + + void LLNearbyChat::setRect (const LLRect &rect) { LLDockableFloater::setRect(rect); diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 1e62910385..2fb5649ec7 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -56,6 +56,7 @@ public: /*virtual*/ void onOpen (const LLSD& key); /*virtual*/ void setVisible(BOOL visible); + void openFloater(const LLSD& key); virtual void setRect (const LLRect &rect); diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index fd9fcedb34..2ff322ef95 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -1,12 +1,11 @@ + - - + visible="false" + width="394" + can_resize="true" + min_width="250" + min_height="190"> + + + +