summaryrefslogtreecommitdiff
path: root/indra/newview/llimconversation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimconversation.cpp')
-rw-r--r--indra/newview/llimconversation.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index ef3b4f7404..216c5bbd70 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -148,7 +148,7 @@ BOOL LLIMConversation::postBuild()
updateHeaderAndToolbar();
- mSaveRect = !getHost();
+ mSaveRect = isTornOff();
initRectControl();
if (isChatMultiTab())
@@ -349,11 +349,11 @@ void LLIMConversation::hideOrShowTitle()
LLView* floater_contents = getChild<LLView>("contents_view");
LLRect floater_rect = getLocalRect();
- S32 top_border_of_contents = floater_rect.mTop - (getHost()? 0 : floater_header_size);
+ S32 top_border_of_contents = floater_rect.mTop - (isTornOff()? floater_header_size : 0);
LLRect handle_rect (0, floater_rect.mTop, floater_rect.mRight, top_border_of_contents);
LLRect contents_rect (0, top_border_of_contents, floater_rect.mRight, floater_rect.mBottom);
mDragHandle->setShape(handle_rect);
- mDragHandle->setVisible(!getHost());
+ mDragHandle->setVisible(isTornOff());
floater_contents->setShape(contents_rect);
}
@@ -371,8 +371,8 @@ void LLIMConversation::hideAllStandardButtons()
void LLIMConversation::updateHeaderAndToolbar()
{
- bool is_hosted = !!getHost();
- if (is_hosted)
+ bool is_torn_off = !getHost();
+ if (!is_torn_off)
{
hideAllStandardButtons();
}
@@ -381,7 +381,7 @@ void LLIMConversation::updateHeaderAndToolbar()
// Participant list should be visible only in torn off floaters.
bool is_participant_list_visible =
- !is_hosted
+ is_torn_off
&& gSavedSettings.getBOOL("IMShowControlPanel")
&& !mIsP2PChat;
@@ -389,21 +389,21 @@ void LLIMConversation::updateHeaderAndToolbar()
// 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_participant_list_visible;
+ bool is_expanded = !is_torn_off || is_participant_list_visible;
mExpandCollapseBtn->setImageOverlay(getString(is_expanded ? "collapse_icon" : "expand_icon"));
// toggle floater's drag handle and title visibility
if (mDragHandle)
{
- mDragHandle->setTitleVisible(!is_hosted);
+ mDragHandle->setTitleVisible(is_torn_off);
}
// The button (>>) should be disabled for torn off P2P conversations.
- mExpandCollapseBtn->setEnabled(is_hosted || !mIsP2PChat);
+ mExpandCollapseBtn->setEnabled(!is_torn_off || !mIsP2PChat);
- mTearOffBtn->setImageOverlay(getString(is_hosted? "tear_off_icon" : "return_icon"));
+ mTearOffBtn->setImageOverlay(getString(is_torn_off? "return_icon" : "tear_off_icon"));
- mCloseBtn->setVisible(is_hosted && !mIsNearbyChat);
+ mCloseBtn->setVisible(!is_torn_off && !mIsNearbyChat);
enableDisableCallBtn();
@@ -440,7 +440,7 @@ void LLIMConversation::processChatHistoryStyleUpdate()
}
}
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat");
+ LLNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat");
if (nearby_chat)
{
nearby_chat->reloadMessages();
@@ -510,8 +510,8 @@ void LLIMConversation::onClose(bool app_quitting)
void LLIMConversation::onTearOffClicked()
{
- setFollows(getHost()? FOLLOWS_NONE : FOLLOWS_ALL);
- mSaveRect = !getHost();
+ setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE);
+ mSaveRect = isTornOff();
initRectControl();
LLFloater::onClickTearOff(this);
updateHeaderAndToolbar();