summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-24 18:44:39 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-24 18:44:39 +0100
commit98cc2365034a93c69704daa69efb389799cc9627 (patch)
tree4c3ec75b78a26a736f18a2153af025040ae05a4b /indra/newview/llpanelimcontrolpanel.cpp
parent6ba23344c95157793af9e4154933ae8df61630e8 (diff)
Backed out changeset a62bf7c0af21
Backing out this merge that I pushed (prematurely) to the wrong place.
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 7489c02d8d..9dc31f770f 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -83,7 +83,7 @@ void LLPanelChatControlPanel::updateCallButton()
if (!session)
{
- getChildView("call_btn")->setEnabled(false);
+ childSetEnabled("call_btn", false);
return;
}
@@ -93,14 +93,14 @@ void LLPanelChatControlPanel::updateCallButton()
BOOL enable_connect = session_initialized
&& voice_enabled
&& callback_enabled;
- getChildView("call_btn")->setEnabled(enable_connect);
+ childSetEnabled("call_btn", enable_connect);
}
void LLPanelChatControlPanel::updateButtons(bool is_call_started)
{
- getChildView("end_call_btn_panel")->setVisible( is_call_started);
- getChildView("voice_ctrls_btn_panel")->setVisible( is_call_started);
- getChildView("call_btn_panel")->setVisible( ! is_call_started);
+ childSetVisible("end_call_btn_panel", is_call_started);
+ childSetVisible("voice_ctrls_btn_panel", is_call_started);
+ childSetVisible("call_btn_panel", ! is_call_started);
updateCallButton();
}
@@ -156,7 +156,7 @@ BOOL LLPanelIMControlPanel::postBuild()
childSetAction("share_btn", boost::bind(&LLPanelIMControlPanel::onShareButtonClicked, this));
childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this));
childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this));
- getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId()));
+ childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId()));
setFocusReceivedCallback(boost::bind(&LLPanelIMControlPanel::onFocusReceived, this));
@@ -209,12 +209,12 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
LLAvatarTracker::instance().addParticularFriendObserver(mAvatarID, this);
// Disable "Add friend" button for friends.
- getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(mAvatarID));
+ childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
// Disable "Teleport" button if friend is offline
if(LLAvatarActions::isFriend(mAvatarID))
{
- getChildView("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
+ childSetEnabled("teleport_btn", LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
}
getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID);
@@ -225,24 +225,24 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
im_model.findIMSession(session_id);
if( im_session && !im_session->mOtherParticipantIsAvatar )
{
- getChildView("view_profile_btn")->setEnabled(FALSE);
- getChildView("add_friend_btn")->setEnabled(FALSE);
+ childSetEnabled("view_profile_btn", FALSE);
+ childSetEnabled("add_friend_btn", FALSE);
- getChildView("share_btn")->setEnabled(FALSE);
- getChildView("teleport_btn")->setEnabled(FALSE);
- getChildView("pay_btn")->setEnabled(FALSE);
+ childSetEnabled("share_btn", FALSE);
+ childSetEnabled("teleport_btn", FALSE);
+ childSetEnabled("pay_btn", FALSE);
}
}
//virtual
void LLPanelIMControlPanel::changed(U32 mask)
{
- getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(mAvatarID));
+ childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
// Disable "Teleport" button if friend is offline
if(LLAvatarActions::isFriend(mAvatarID))
{
- getChildView("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
+ childSetEnabled("teleport_btn", LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
}
}