diff options
author | Merov Linden <merov@lindenlab.com> | 2012-06-06 19:37:59 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-06-06 19:37:59 -0700 |
commit | 85e553638e51994824683497bd9ccc964c7cc1fc (patch) | |
tree | 28c927f88d425179277a21b5cf9b55cb72f5b053 /indra/newview/llimfloatercontainer.cpp | |
parent | 30a6da68bcee5b871fd0a18dab703fe20271d83c (diff) |
CHUI-137 : Implement temporary conversations list (not working yet)
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 79 |
1 files changed, 79 insertions, 0 deletions
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<LLLayoutStack>("conversations_stack"); mConversationsPane = getChild<LLLayoutPanel>("conversations_layout_panel"); mMessagesPane = getChild<LLLayoutPanel>("messages_layout_panel"); + + mConversationsListPanel = getChild<LLPanel>("conversations_list_panel"); mExpandCollapseBtn = getChild<LLButton>("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<LLView>("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<LLFolderViewItem>(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 |