summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaxim@mnikolenko <maxim@mnikolenko>2012-12-26 11:46:29 +0200
committermaxim@mnikolenko <maxim@mnikolenko>2012-12-26 11:46:29 +0200
commitd05df4087c334fe30a9d0fe5224a828c677d0244 (patch)
tree3c14d65e05076ee695af63cb09cbd60224b5ce65 /indra
parent12466171b149ebe94b20cc8c74b7c9b1163fdc33 (diff)
CHUI-617 FIXED Update Gear button state after initing session.
mConversationsRoot creation is moved to postBuild().
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterimsession.cpp4
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp44
2 files changed, 20 insertions, 28 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index ff07ddfcbf..d36b138c21 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -86,7 +86,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&LLFloaterIMSession::GearDoToSelected, this, _2));
mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&LLFloaterIMSession::checkGearMenuItem, this, _2));
- setDocked(true);
+ setDocked(true);
}
@@ -754,7 +754,7 @@ void LLFloaterIMSession::sessionInitReplyReceived(const LLUUID& im_session_id)
}
initIMFloater();
-
+ LLFloaterIMSessionTab::updateGearBtn();
//*TODO here we should remove "starting session..." warning message if we added it in postBuild() (IB)
//need to send delayed messages collected while waiting for session initialization
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 53d2f31b79..f5b657fa60 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -240,7 +240,24 @@ BOOL LLFloaterIMSessionTab::postBuild()
result = LLDockableFloater::postBuild();
}
- // Now ready to build the conversation and participants list
+ // Create the root using an ad-hoc base item
+ LLConversationItem* base_item = new LLConversationItem(mSessionID, mConversationViewModel);
+ LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>());
+ p.rect = LLRect(0, 0, getRect().getWidth(), 0);
+ p.parent_panel = mParticipantListPanel;
+ p.listener = base_item;
+ p.view_model = &mConversationViewModel;
+ p.root = NULL;
+ p.use_ellipses = true;
+ p.options_menu = "menu_conversation.xml";
+ mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);
+ mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
+ // Attach that root to the scroller
+ mScroller->addChild(mConversationsRoot);
+ mConversationsRoot->setScrollContainer(mScroller);
+ mConversationsRoot->setFollowsAll();
+ mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox);
+
buildConversationViewParticipant();
refreshConversation();
@@ -388,31 +405,6 @@ void LLFloaterIMSessionTab::buildConversationViewParticipant()
return;
}
- // Create or recreate the root folder: this is a dummy folder (not shown) but required by the LLFolderView architecture
- // We need to redo this when rebuilding as the session id (mSessionID) *may* have changed
- if (mConversationsRoot)
- {
- // Remove the old root if any
- mScroller->removeChild(mConversationsRoot);
- }
- // Create the root using an ad-hoc base item
- LLConversationItem* base_item = new LLConversationItem(mSessionID, mConversationViewModel);
- LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>());
- p.rect = LLRect(0, 0, getRect().getWidth(), 0);
- p.parent_panel = mParticipantListPanel;
- p.listener = base_item;
- p.view_model = &mConversationViewModel;
- p.root = NULL;
- p.use_ellipses = true;
- p.options_menu = "menu_conversation.xml";
- mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);
- mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);
- // Attach that root to the scroller
- mScroller->addChild(mConversationsRoot);
- mConversationsRoot->setScrollContainer(mScroller);
- mConversationsRoot->setFollowsAll();
- mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox);
-
// Create the participants widgets now
LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin();
LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd();