summaryrefslogtreecommitdiff
path: root/indra/newview/llimconversation.cpp
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-06-12 21:56:00 +0300
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-06-12 21:56:00 +0300
commit9993fa550ab3716e583a6d5699f27974c3a95eb9 (patch)
tree4dd507bb4d482fdb0bf4d49b4833afcb5923d07a /indra/newview/llimconversation.cpp
parentec726c3a3ecbefd34008cd735f455c7947b67246 (diff)
CHUI-119 WIP Suppressed of the warnings (XML corrected); fixed the torn-off button's states
Diffstat (limited to 'indra/newview/llimconversation.cpp')
-rw-r--r--indra/newview/llimconversation.cpp40
1 files changed, 16 insertions, 24 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index c2621938e1..99b28255cd 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));
@@ -210,30 +210,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)
{