Removed old orphaned code from fspanelimcontrolpanel.cpp/h
parent
6bbdc5423c
commit
56c4dfde2f
|
|
@ -43,7 +43,6 @@
|
|||
#include "llimview.h"
|
||||
#include "llvoicechannel.h"
|
||||
#include "llspeakers.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
void FSPanelChatControlPanel::onCallButtonClicked()
|
||||
{
|
||||
|
|
@ -107,27 +106,14 @@ void FSPanelChatControlPanel::updateButtons(LLVoiceChannel::EState state)
|
|||
getChildView("volume_ctrl_panel")->setVisible(state == LLVoiceChannel::STATE_CONNECTED);
|
||||
|
||||
updateCallButton();
|
||||
|
||||
}
|
||||
|
||||
FSPanelChatControlPanel::~FSPanelChatControlPanel()
|
||||
{
|
||||
// AO: Now handled by main im floater
|
||||
//mVoiceChannelStateChangeConnection.disconnect();
|
||||
//if(LLVoiceClient::instanceExists())
|
||||
//{
|
||||
// LLVoiceClient::getInstance()->removeObserver(this);
|
||||
//}
|
||||
}
|
||||
|
||||
BOOL FSPanelChatControlPanel::postBuild()
|
||||
{
|
||||
// AO: Now handled by main im floater
|
||||
//childSetAction("call_btn", boost::bind(&LLPanelChatControlPanel::onCallButtonClicked, this));
|
||||
//childSetAction("end_call_btn", boost::bind(&LLPanelChatControlPanel::onEndCallButtonClicked, this));
|
||||
//childSetAction("voice_ctrls_btn", boost::bind(&LLPanelChatControlPanel::onOpenVoiceControlsClicked, this));
|
||||
//LLVoiceClient::getInstance()->addObserver(this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -135,16 +121,6 @@ void FSPanelChatControlPanel::setSessionId(const LLUUID& session_id)
|
|||
{
|
||||
//Method is called twice for AdHoc and Group chat. Second time when server init reply received
|
||||
mSessionId = session_id;
|
||||
|
||||
// AO: Now handled by main im floater
|
||||
//LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionId);
|
||||
//if(voice_channel)
|
||||
//{
|
||||
// mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));
|
||||
//
|
||||
// //call (either p2p, group or ad-hoc) can be already in started state
|
||||
// updateButtons(voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
|
||||
//}
|
||||
}
|
||||
|
||||
FSPanelIMControlPanel::FSPanelIMControlPanel()
|
||||
|
|
@ -153,28 +129,16 @@ FSPanelIMControlPanel::FSPanelIMControlPanel()
|
|||
|
||||
FSPanelIMControlPanel::~FSPanelIMControlPanel()
|
||||
{
|
||||
// AO: Now handled by main im floater
|
||||
//LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this);
|
||||
}
|
||||
|
||||
BOOL FSPanelIMControlPanel::postBuild()
|
||||
{
|
||||
// AO: Now handled by main im floater
|
||||
//childSetAction("view_profile_btn", boost::bind(&LLPanelIMControlPanel::onViewProfileButtonClicked, this));
|
||||
//childSetAction("add_friend_btn", boost::bind(&LLPanelIMControlPanel::onAddFriendButtonClicked, this));
|
||||
//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()));
|
||||
|
||||
childSetAction("mute_btn", boost::bind(&FSPanelIMControlPanel::onClickMuteVolume, this));
|
||||
childSetAction("block_btn", boost::bind(&FSPanelIMControlPanel::onClickBlock, this));
|
||||
childSetAction("unblock_btn", boost::bind(&FSPanelIMControlPanel::onClickUnblock, this));
|
||||
|
||||
getChild<LLUICtrl>("volume_slider")->setCommitCallback(boost::bind(&FSPanelIMControlPanel::onVolumeChange, this, _2));
|
||||
|
||||
// getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId()));
|
||||
|
||||
setFocusReceivedCallback(boost::bind(&FSPanelIMControlPanel::onFocusReceived, this));
|
||||
|
||||
return FSPanelChatControlPanel::postBuild();
|
||||
|
|
@ -253,32 +217,6 @@ void FSPanelIMControlPanel::onVolumeChange(const LLSD& data)
|
|||
LLVoiceClient::getInstance()->setUserVolume(mAvatarID, volume);
|
||||
}
|
||||
|
||||
void FSPanelIMControlPanel::onTeleportButtonClicked()
|
||||
{
|
||||
LLAvatarActions::offerTeleport(mAvatarID);
|
||||
}
|
||||
void FSPanelIMControlPanel::onPayButtonClicked()
|
||||
{
|
||||
LLAvatarActions::pay(mAvatarID);
|
||||
}
|
||||
|
||||
void FSPanelIMControlPanel::onViewProfileButtonClicked()
|
||||
{
|
||||
LLAvatarActions::showProfile(mAvatarID);
|
||||
}
|
||||
|
||||
void FSPanelIMControlPanel::onAddFriendButtonClicked()
|
||||
{
|
||||
LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon");
|
||||
std::string full_name = avatar_icon->getFullName();
|
||||
LLAvatarActions::requestFriendshipDialog(mAvatarID, full_name);
|
||||
}
|
||||
|
||||
void FSPanelIMControlPanel::onShareButtonClicked()
|
||||
{
|
||||
LLAvatarActions::share(mAvatarID);
|
||||
}
|
||||
|
||||
void FSPanelIMControlPanel::onFocusReceived()
|
||||
{
|
||||
// Disable all the buttons (Call, Teleport, etc) if disconnected.
|
||||
|
|
@ -294,44 +232,7 @@ void FSPanelIMControlPanel::setSessionId(const LLUUID& session_id)
|
|||
|
||||
LLIMModel& im_model = LLIMModel::instance();
|
||||
|
||||
// AO: Now handled by main im floater
|
||||
//LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this);
|
||||
mAvatarID = im_model.getOtherParticipantID(session_id);
|
||||
//LLAvatarTracker::instance().addParticularFriendObserver(mAvatarID, this);
|
||||
|
||||
// Disable "Add friend" button for friends.
|
||||
//getChildView("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(mAvatarID));
|
||||
|
||||
// Disable "Teleport" button if friend is offline
|
||||
//if(LLAvatarActions::isFriend(mAvatarID))
|
||||
//{
|
||||
// getChildView("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
|
||||
//}
|
||||
|
||||
//getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID);
|
||||
|
||||
// Disable most profile buttons if the participant is
|
||||
// not really an SL avatar (e.g., an Avaline caller).
|
||||
//LLIMModel::LLIMSession* im_session =
|
||||
// im_model.findIMSession(session_id);
|
||||
//if( im_session && !im_session->mOtherParticipantIsAvatar )
|
||||
//{
|
||||
// getChildView("view_profile_btn")->setEnabled(FALSE);
|
||||
// getChildView("add_friend_btn")->setEnabled(FALSE);
|
||||
|
||||
// getChildView("share_btn")->setEnabled(FALSE);
|
||||
// getChildView("teleport_btn")->setEnabled(FALSE);
|
||||
// getChildView("pay_btn")->setEnabled(FALSE);
|
||||
|
||||
// getChild<LLTextBox>("avatar_name")->setValue(im_session->mName);
|
||||
// getChild<LLTextBox>("avatar_name")->setToolTip(im_session->mName);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// // If the participant is an avatar, fetch the currect name
|
||||
// gCacheName->get(mAvatarID, false,
|
||||
// boost::bind(&LLPanelIMControlPanel::onNameCache, this, _1, _2, _3));
|
||||
//}
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
@ -366,8 +267,6 @@ mParticipantList(NULL)
|
|||
|
||||
BOOL FSPanelGroupControlPanel::postBuild()
|
||||
{
|
||||
//childSetAction("group_info_btn", boost::bind(&LLPanelGroupControlPanel::onGroupInfoButtonClicked, this));
|
||||
|
||||
return FSPanelChatControlPanel::postBuild();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,11 +89,6 @@ protected:
|
|||
void onNameCache(const LLUUID& id, const std::string& full_name, bool is_group);
|
||||
|
||||
private:
|
||||
void onViewProfileButtonClicked();
|
||||
void onAddFriendButtonClicked();
|
||||
void onShareButtonClicked();
|
||||
void onTeleportButtonClicked();
|
||||
void onPayButtonClicked();
|
||||
void onFocusReceived();
|
||||
|
||||
void onClickMuteVolume();
|
||||
|
|
|
|||
Loading…
Reference in New Issue