summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-08-01 10:45:11 -0700
committerRichard Linden <none@none>2012-08-01 10:45:11 -0700
commit4256b54ee78a89dc5e790cc13556451e1a7c43fa (patch)
tree0403d46cd73027b630c98cccc5d2119859b9f213 /indra
parentc3bc6de8ba90216d3687f70e01e92accde956a85 (diff)
build fix
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfolderviewitem.h3
-rw-r--r--indra/newview/llimfloatercontainer.cpp8
-rw-r--r--indra/newview/llimfloatercontainer.h3
3 files changed, 7 insertions, 7 deletions
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index 19caa7f020..4eda02f13f 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -406,15 +406,12 @@ public:
LLFolderViewFolder* getCommonAncestor(LLFolderViewItem* item_a, LLFolderViewItem* item_b, bool& reverse);
void gatherChildRangeExclusive(LLFolderViewItem* start, LLFolderViewItem* end, bool reverse, std::vector<LLFolderViewItem*>& items);
-protected:
- friend void LLFolderViewItem::addToFolder(LLFolderViewFolder*);
// internal functions for tracking folders and items separately
// use addToFolder() virtual method to ensure folders are always added to mFolders
// and not mItems
void addItem(LLFolderViewItem* item);
void addFolder( LLFolderViewFolder* folder);
-public:
//WARNING: do not call directly...use the appropriate LLFolderViewModel-derived class instead
template<typename SORT_FUNC> void sortFolders(const SORT_FUNC& func) { mFolders.sort(func); }
template<typename SORT_FUNC> void sortItems(const SORT_FUNC& func) { mItems.sort(func); }
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 405a2b3255..cc094fcaa1 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -100,7 +100,7 @@ BOOL LLIMFloaterContainer::postBuild()
mConversationsListPanel = getChild<LLPanel>("conversations_list_panel");
// CHUI-98 : View Model for conversations
- LLConversationItem* base_item = new LLConversationItem();
+ LLConversationItem* base_item = new LLConversationItem(this);
LLFolderView::Params p;
p.view_model = &mConversationViewModel;
p.parent_panel = mConversationsListPanel;
@@ -456,7 +456,7 @@ void LLIMFloaterContainer::addConversationListItem(std::string name, const LLUUI
mConversationsWidgets[floaterp] = widget;
// Add a new conversation widget to the root folder of a folder view.
- mConversationsRoot->addItem(widget);
+ widget->addToFolder(mConversationsRoot);
// Add it to the UI
widget->setVisible(TRUE);
@@ -533,6 +533,7 @@ LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversat
// Conversation items
LLConversationItem::LLConversationItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp) :
+ LLFolderViewModelItemCommon(containerp->getRootViewModel()),
mName(name),
mUUID(uuid),
mFloater(floaterp),
@@ -540,7 +541,8 @@ LLConversationItem::LLConversationItem(std::string name, const LLUUID& uuid, LLF
{
}
-LLConversationItem::LLConversationItem() :
+LLConversationItem::LLConversationItem(LLIMFloaterContainer* containerp) :
+ LLFolderViewModelItemCommon(containerp->getRootViewModel()),
mName(""),
mUUID(),
mFloater(NULL),
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index 9b487dd652..b352e8a004 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -57,7 +57,7 @@ class LLConversationItem : public LLFolderViewModelItemCommon
{
public:
LLConversationItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp);
- LLConversationItem();
+ LLConversationItem(LLIMFloaterContainer* containerp);
virtual ~LLConversationItem() {}
// Stub those things we won't really be using in this conversation context
@@ -241,6 +241,7 @@ public:
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id);
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {};
+ LLConversationViewModel& getRootViewModel() { return mConversationViewModel; }
private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;