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 | |
parent | e286330365576e67fa9b59166f6019e89f09f3cf (diff) |
CHUI-137 : Implemented switch conversation in the conversation list
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.h | 5 |
3 files changed, 21 insertions, 8 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index d7d5195c14..8ae779326c 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -387,6 +387,10 @@ void LLFolderViewItem::setSelectionFromRoot(LLFolderViewItem* selection, { getRoot()->setSelection(selection, openitem, take_keyboard_focus); } + else if (mListener) + { + mListener->selectItem(); + } } // helper function to change the selection from the root. 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) diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 84b1c864cc..afb65671ae 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -45,6 +45,7 @@ class LLTabContainer; // CHUI-137 : Temporary implementation of conversations list class LLConversationItem; +class LLIMFloaterContainer; typedef std::list<LLConversationItem*> conversations_items_list_t; typedef std::list<LLFolderViewItem*> conversations_widgets_list_t; @@ -54,7 +55,7 @@ typedef std::list<LLFolderViewItem*> conversations_widgets_list_t; class LLConversationItem : public LLFolderViewEventListener { public: - LLConversationItem(std::string name); + LLConversationItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp); virtual ~LLConversationItem() {} // Stub those things we won't really be using in this conversation context @@ -111,6 +112,8 @@ public: private: std::string mName; const LLUUID mUUID; + LLFloater* mFloater; + LLIMFloaterContainer* mContainer; }; // CHUI-137 : End |