diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-03 10:49:07 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-03 10:49:07 +0100 |
commit | d3060e64a2aee975320e10a6c240387f04dc973c (patch) | |
tree | 7e775a7964d7574cf2cbe462137675ad1ee23ed6 /indra/newview/llpanelimcontrolpanel.cpp | |
parent | b8daec6144bfe064eb9b43e776ec21f997de2923 (diff) | |
parent | daec4f6bb75634c6355f58d9fa5ef60f50a2e73f (diff) |
merge from PE's viewer-release. conflicts resolved.
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 709bb83fe4..b79a4f359a 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -37,6 +37,7 @@ #include "llpanelimcontrolpanel.h" #include "llagent.h" +#include "llappviewer.h" // for gDisconnected #include "llavataractions.h" #include "llavatariconctrl.h" #include "llbutton.h" @@ -163,7 +164,7 @@ BOOL LLPanelIMControlPanel::postBuild() childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this)); childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId())); - + setFocusReceivedCallback(boost::bind(&LLPanelIMControlPanel::onFocusReceived, this)); return LLPanelChatControlPanel::postBuild(); } @@ -194,6 +195,15 @@ void LLPanelIMControlPanel::onShareButtonClicked() LLAvatarActions::share(mAvatarID); } +void LLPanelIMControlPanel::onFocusReceived() +{ + // Disable all the buttons (Call, Teleport, etc) if disconnected. + if (gDisconnected) + { + setAllChildrenEnabled(FALSE); + } +} + void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) { LLPanelChatControlPanel::setSessionId(session_id); |