diff options
author | Merov Linden <merov@lindenlab.com> | 2012-06-14 16:59:05 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-06-14 16:59:05 -0700 |
commit | 22133d281d0c70f13f63d0db2083d6d3cbf002da (patch) | |
tree | 7f964f3817091833ca337c5b40a5526e0fb883dd /indra/newview/llimconversation.cpp | |
parent | c238027dd9917b1633ff5f16911fbdbe437f9a55 (diff) | |
parent | d34746b596bad717f7d0c10e263700738a06aa43 (diff) |
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/newview/llimconversation.cpp')
-rw-r--r-- | indra/newview/llimconversation.cpp | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index c2621938e1..b45fc63825 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -85,11 +85,11 @@ BOOL LLIMConversation::postBuild() mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel"); // Show the participants list in torn off floaters only. - mParticipantListPanel->setVisible(gSavedSettings.getBOOL("IMShowControlPanel") - && !mIsNearbyChat); // *TODO: temporarily disabled for Nearby chat - mExpandCollapseBtn->setImageOverlay( - getString(mParticipantListPanel->getVisible() ? "collapse_icon" : "expand_icon")); - mExpandCollapseBtn->setEnabled(!mIsP2PChat); +// mParticipantListPanel->setVisible(gSavedSettings.getBOOL("IMShowControlPanel") +// && !mIsNearbyChat); // *TODO: temporarily disabled for Nearby chat +// mExpandCollapseBtn->setImageOverlay( +// getString(mParticipantListPanel->getVisible() ? "collapse_icon" : "expand_icon")); +// mExpandCollapseBtn->setEnabled(!mIsP2PChat); mTearOffBtn = getChild<LLButton>("tear_off_btn"); mTearOffBtn->setCommitCallback(boost::bind(&LLIMConversation::onTearOffClicked, this)); @@ -114,6 +114,10 @@ BOOL LLIMConversation::postBuild() BOOL LLIMConversation::tick() { + // This check is needed until LLFloaterReg::removeInstance() is synchronized with deleting the floater + // via LLMortician::updateClass(), to avoid calling dead instances. See LLFloater::destroy(). + if (isDead()) return false; + // Need to resort the participant list if it's in sort by recent speaker order. if (mParticipantList) { @@ -210,30 +214,22 @@ void LLIMConversation::updateHeaderAndToolbar() } } - bool is_control_panel_visible = false; - // Control panel should be visible only in torn off floaters. - is_control_panel_visible = !is_hosted && gSavedSettings.getBOOL("IMShowControlPanel"); - mParticipantListPanel->setVisible(!mIsP2PChat && is_control_panel_visible - && !mIsNearbyChat); // *TODO: temporarily disabled for Nearby chat + // Participant list should be visible only in torn off floaters. + bool is_participant_list_visible = + !is_hosted + && gSavedSettings.getBOOL("IMShowControlPanel") + && !mIsP2PChat + && !mIsNearbyChat; // *TODO: temporarily disabled for Nearby chat + + mParticipantListPanel->setVisible(is_participant_list_visible); // Display collapse image (<<) if the floater is hosted // or if it is torn off but has an open control panel. - bool is_expanded = is_hosted || is_control_panel_visible; + bool is_expanded = is_hosted || is_participant_list_visible; mExpandCollapseBtn->setImageOverlay(getString(is_expanded ? "collapse_icon" : "expand_icon")); - LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID); - if (session) - { - // The button (>>) should be disabled for torn off P2P conversations. - mExpandCollapseBtn->setEnabled(is_hosted || !session->isP2PSessionType()); - } - else - { - if (!mIsNearbyChat) - { - llwarns << "IM session not found." << llendl; - } - } + // The button (>>) should be disabled for torn off P2P conversations. + mExpandCollapseBtn->setEnabled(is_hosted || !mIsP2PChat && !mIsNearbyChat); if (mDragHandle) { |