summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-07-09 11:49:43 -0700
committerMerov Linden <merov@lindenlab.com>2012-07-09 11:49:43 -0700
commitb490266226ac79cc7570ff7ee921506e941cce16 (patch)
treea55eeed29b8320e9aa615d609652d610e17b53ee
parentec15ff6350c0997421cf2884e40aa9feaa070d4d (diff)
CHUI-98 : WIP. Clean up conversation list data structure and comments
-rw-r--r--indra/newview/llimfloatercontainer.cpp14
-rw-r--r--indra/newview/llimfloatercontainer.h10
2 files changed, 12 insertions, 12 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index be38eddbaf..d343c8be24 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -49,7 +49,7 @@
LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
: LLMultiFloater(seed),
mExpandCollapseBtn(NULL),
- mFolders(NULL)
+ mConversationsRoot(NULL)
{
// Firstly add our self to IMSession observers, so we catch session events
LLIMMgr::getInstance()->addSessionObserver(this);
@@ -91,17 +91,17 @@ BOOL LLIMFloaterContainer::postBuild()
mConversationsListPanel = getChild<LLPanel>("conversations_list_panel");
- mRoot = new LLConversationItem();
- LLFolderView::Params p;
// CHUI-98 : View Model for conversations
+ LLConversationItem* base_item = new LLConversationItem();
+ LLFolderView::Params p;
p.view_model = &mConversationViewModel;
p.parent_panel = mConversationsListPanel;
p.rect = mConversationsListPanel->getLocalRect();
p.follows.flags = FOLLOWS_ALL;
- p.listener = mRoot;
+ p.listener = base_item;
- mFolders = LLUICtrlFactory::create<LLFolderView>(p);
- mConversationsListPanel->addChild(mFolders);
+ mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);
+ mConversationsListPanel->addChild(mConversationsRoot);
mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn");
mExpandCollapseBtn->setClickedCallback(boost::bind(&LLIMFloaterContainer::onExpandCollapseButtonClicked, this));
@@ -525,7 +525,7 @@ LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversat
//params.icon = bridge->getIcon();
//params.icon_open = bridge->getOpenIcon();
//params.creation_date = bridge->getCreationDate();
- params.root = mFolders;
+ params.root = mConversationsRoot;
params.listener = item;
params.rect = LLRect (0, 0, 0, 0);
params.tool_tip = params.name;
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index f146e65897..8f0ec27905 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -264,20 +264,20 @@ private:
LLLayoutPanel* mConversationsPane;
LLLayoutStack* mConversationsStack;
- // CHUI-137 : Temporary implementation of conversations list
+ // Conversation list implementation
public:
void removeConversationListItem(LLFloater* floaterp, bool change_focus = true);
void addConversationListItem(std::string name, const LLUUID& uuid, LLFloater* floaterp);
LLFloater* findConversationItem(LLUUID& uuid);
private:
- LLConversationViewModel mConversationViewModel;
- LLConversationItem* mRoot;
LLFolderViewItem* createConversationItemWidget(LLConversationItem* item);
+
// Conversation list data
- LLPanel* mConversationsListPanel; // This is the widget we add items to (i.e. clickable title for each conversation)
+ LLPanel* mConversationsListPanel; // This is the main widget we add conversation widget to
conversations_items_map mConversationsItems;
conversations_widgets_map mConversationsWidgets;
- LLFolderView* mFolders;
+ LLConversationViewModel mConversationViewModel;
+ LLFolderView* mConversationsRoot;
};
#endif // LL_LLIMFLOATERCONTAINER_H