diff options
author | Merov Linden <merov@lindenlab.com> | 2012-06-11 17:25:17 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-06-11 17:25:17 -0700 |
commit | db67c21f901800d27c9dd2ea2ce6134dc3bd33f1 (patch) | |
tree | 2b2a47c37eb90a129419769ffedc294fe256fe91 /indra/newview/llimfloatercontainer.cpp | |
parent | e286330365576e67fa9b59166f6019e89f09f3cf (diff) |
CHUI-137 : Implemented switch conversation in the conversation list
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index cd19105860..9c6cee6cb5 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -85,6 +85,7 @@ BOOL LLIMFloaterContainer::postBuild() void LLIMFloaterContainer::onOpen(const LLSD& key) { + llinfos << "Merov debug : onOpen, key = " << key.asUUID() << llendl; LLMultiFloater::onOpen(key); /* if (key.isDefined()) @@ -114,9 +115,11 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); + LLUUID session_id = floaterp->getKey(); + // CHUI-137 // Create a conversation item - LLConversationItem* item = new LLConversationItem(floaterp->getTitle()); + LLConversationItem* item = new LLConversationItem(floaterp->getTitle(),session_id, floaterp, this); mConversationsItems.push_back(item); // Create a widget from it LLFolderViewItem* widget = createConversationItemWidget(item); @@ -139,8 +142,6 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, // so reshape floater contents to occupy the header space floater_contents->setShape(floaterp->getRect()); - LLUUID session_id = floaterp->getKey(); - LLIconCtrl* icon = 0; if(gAgent.isInGroup(session_id, TRUE)) @@ -164,6 +165,8 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); } mTabContainer->setTabImage(floaterp, icon); + + llinfos << "Merov debug : addFloater, title = " << floaterp->getTitle() << ", uuid = " << session_id << llendl; } // virtual @@ -171,7 +174,7 @@ void LLIMFloaterContainer::removeFloater(LLFloater* floaterp) { LLMultiFloater::removeFloater(floaterp); - llinfos << "Merov debug : removeFloater, title = " << floaterp->getTitle() << llendl; + llinfos << "Merov debug : removeFloater, title = " << floaterp->getTitle() << ", uuid = " << floaterp->getKey() << llendl; LLRect contents_rect = floaterp->getRect(); @@ -355,9 +358,11 @@ LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversat } // Conversation items -LLConversationItem::LLConversationItem(std::string name) : +LLConversationItem::LLConversationItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp) : mName(name), - mUUID(LLUUID::null) + mUUID(uuid), + mFloater(floaterp), + mContainer(containerp) { if (name == "") mName = "Nearby Chat"; @@ -386,7 +391,8 @@ void LLConversationItem::previewItem( void ) void LLConversationItem::selectItem(void) { - llinfos << "Merov debug : selectItem, title = " << mName << llendl; + llinfos << "Merov debug : selectItem, title = " << mName << ", uuid = " << mUUID << llendl; + mContainer->selectFloater(mFloater); } void LLConversationItem::showProperties(void) |