From 85e553638e51994824683497bd9ccc964c7cc1fc Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 6 Jun 2012 19:37:59 -0700 Subject: CHUI-137 : Implement temporary conversations list (not working yet) --- indra/newview/llimfloatercontainer.cpp | 79 ++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) (limited to 'indra/newview/llimfloatercontainer.cpp') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 3b6240de44..134d345148 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -71,6 +71,8 @@ BOOL LLIMFloaterContainer::postBuild() mConversationsStack = getChild("conversations_stack"); mConversationsPane = getChild("conversations_layout_panel"); mMessagesPane = getChild("messages_layout_panel"); + + mConversationsListPanel = getChild("conversations_list_panel"); mExpandCollapseBtn = getChild("expand_collapse_btn"); mExpandCollapseBtn->setClickedCallback(boost::bind(&LLIMFloaterContainer::onExpandCollapseButtonClicked, this)); @@ -112,6 +114,22 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); + // CHUI-137 + llinfos << "Merov debug : addFloater, title = " << floaterp->getTitle() << llendl; + // Create a conversation item + LLConversationItem item(floaterp->getTitle()); + // Add it to the list + mConversationsItems.push_back(item); + // Create a widget from it + LLFolderViewItem* widget = createConversationItemWidget(&item); + // Add it to the list of widgets + mConversationsWidgets.push_back(widget); + // Add it to the UI + widget->setVisible(TRUE); + mConversationsListPanel->addChild(widget); + // Reposition it... + // CHUI-137 : end + LLView* floater_contents = floaterp->getChild("contents_view"); // we don't show the header when the floater is hosted, @@ -150,6 +168,8 @@ void LLIMFloaterContainer::removeFloater(LLFloater* floaterp) { LLMultiFloater::removeFloater(floaterp); + llinfos << "Merov debug : removeFloater, title = " << floaterp->getTitle() << llendl; + LLRect contents_rect = floaterp->getRect(); // reduce the floater contents height by header height @@ -313,4 +333,63 @@ void LLIMFloaterContainer::updateState(bool collapse, S32 delta_width) setCanMinimize(is_left_pane_expanded || is_right_pane_expanded); } +// CHUI-137 : Temp implementation of conversations list +LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversationItem* item) +{ + LLFolderViewItem::Params params; + + params.name = item->getDisplayName(); + //params.icon = bridge->getIcon(); + //params.icon_open = bridge->getOpenIcon(); + + //params.creation_date = bridge->getCreationDate(); + //params.root = mFolderRoot; + params.listener = item; + params.rect = LLRect (0, 0, 0, 0); + params.tool_tip = params.name; + + return LLUICtrlFactory::create(params); +} + +// Conversation items +LLConversationItem::LLConversationItem(std::string name) : + mName(name), + mUUID(LLUUID::null) +{ + if (name == "") + mName = "Nearby Chat"; +} + +// Virtual action callbacks +void LLConversationItem::performAction(LLInventoryModel* model, std::string action) +{ + llinfos << "Merov debug : performAction, title = " << mName << ", action = " << action << llendl; +} + +void LLConversationItem::openItem( void ) +{ + llinfos << "Merov debug : openItem, title = " << mName << llendl; +} + +void LLConversationItem::closeItem( void ) +{ + llinfos << "Merov debug : closeItem, title = " << mName << llendl; +} + +void LLConversationItem::previewItem( void ) +{ + llinfos << "Merov debug : previewItem, title = " << mName << llendl; +} + +void LLConversationItem::selectItem(void) +{ + llinfos << "Merov debug : selectItem, title = " << mName << llendl; +} + +void LLConversationItem::showProperties(void) +{ + llinfos << "Merov debug : showProperties, title = " << mName << llendl; +} + + // EOF -- cgit v1.2.3