summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llfolderview.cpp4
-rw-r--r--indra/llui/llfolderviewitem.h2
-rw-r--r--indra/newview/llimfloatercontainer.cpp17
-rw-r--r--indra/newview/llimfloatercontainer.h1
4 files changed, 18 insertions, 6 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 0d3bc44ae4..990b79a30b 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1798,8 +1798,8 @@ void LLFolderView::update()
BOOL filter_finished = getViewModelItem()->passedFilter()
&& mViewModel->contentsReady();
if (filter_finished
- || gFocusMgr.childHasKeyboardFocus(getParent()) // assume we are inside a scroll container
- || gFocusMgr.childHasMouseCapture(getParent()))
+ || gFocusMgr.childHasKeyboardFocus(mParentPanel)
+ || gFocusMgr.childHasMouseCapture(mParentPanel))
{
// finishing the filter process, giving focus to the folder view, or dragging the scrollbar all stop the auto select process
mNeedsAutoSelect = FALSE;
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index 9cb885066a..50d3e0580e 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -53,7 +53,7 @@ public:
{
Optional<LLUIImage*> folder_arrow_image,
selection_image;
- Optional<LLFolderView*> root;
+ Mandatory<LLFolderView*> root;
Mandatory<LLFolderViewModelItem*> listener;
Optional<S32> folder_indentation, // pixels
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 261b5f33a2..2b943df48f 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -47,8 +47,9 @@
// LLIMFloaterContainer
//
LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
-: LLMultiFloater(seed)
- ,mExpandCollapseBtn(NULL)
+: LLMultiFloater(seed),
+ mExpandCollapseBtn(NULL),
+ mFolders(NULL)
{
// Firstly add our self to IMSession observers, so we catch session events
LLIMMgr::getInstance()->addSessionObserver(this);
@@ -90,6 +91,16 @@ BOOL LLIMFloaterContainer::postBuild()
mConversationsListPanel = getChild<LLPanel>("conversations_list_panel");
+ LLFolderView::Params p;
+ //TODO RN: define view model for conversations
+ //p.view_model = ?;
+ p.parent_panel = mConversationsListPanel;
+ p.rect = mConversationsListPanel->getLocalRect();
+ p.follows.flags = FOLLOWS_ALL;
+
+ mFolders = LLUICtrlFactory::create<LLFolderView>(p);
+ mConversationsListPanel->addChild(mFolders);
+
mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn");
mExpandCollapseBtn->setClickedCallback(boost::bind(&LLIMFloaterContainer::onExpandCollapseButtonClicked, this));
@@ -512,7 +523,7 @@ LLFolderViewItem* LLIMFloaterContainer::createConversationItemWidget(LLConversat
//params.icon = bridge->getIcon();
//params.icon_open = bridge->getOpenIcon();
//params.creation_date = bridge->getCreationDate();
- //params.root = mFolderRoot;
+ params.root = mFolders;
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 f68cf07d8c..890a115a04 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -194,6 +194,7 @@ private:
LLPanel* mConversationsListPanel; // This is the widget we add items to (i.e. clickable title for each conversation)
conversations_items_map mConversationsItems;
conversations_widgets_map mConversationsWidgets;
+ LLFolderView* mFolders;
};
#endif // LL_LLIMFLOATERCONTAINER_H