summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp12
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);