--HG--
branch : Firestorm_2.4.1
meow-7.2.2
Arrehn 2011-01-27 13:31:17 -05:00
commit 7c2eabbf36
1 changed files with 0 additions and 34 deletions

View File

@ -307,7 +307,6 @@ void LLIMFloater::sendMsg()
LLIMFloater::~LLIMFloater()
{
llinfos << "~LLIMFLoater, instance exists is: " << ((LLTransientFloaterMgr::getInstance()) == NULL) << llendl;
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, (LLView*)this);
mVoiceChannelStateChangeConnection.disconnect();
if(LLVoiceClient::instanceExists())
@ -327,60 +326,49 @@ LLIMFloater::~LLIMFloater()
void LLIMFloater::onViewProfileButtonClicked()
{
llinfos << "LLIMFloater::onViewProfileButtonClicked" << llendl;
LLAvatarActions::showProfile(mOtherParticipantUUID);
}
void LLIMFloater::onAddFriendButtonClicked()
{
llinfos << "LLIMFloater::onAddFriendButtonClicked" << llendl;
LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon");
std::string full_name = avatar_icon->getFullName();
LLAvatarActions::requestFriendshipDialog(mOtherParticipantUUID, full_name);
}
void LLIMFloater::onShareButtonClicked()
{
llinfos << "LLIMFloater::onShareButtonClicked" << llendl;
LLAvatarActions::share(mOtherParticipantUUID);
}
void LLIMFloater::onTeleportButtonClicked()
{
llinfos << "LLIMFloater::onTeleportButtonClicked" << llendl;
LLAvatarActions::offerTeleport(mOtherParticipantUUID);
}
void LLIMFloater::onPayButtonClicked()
{
llinfos << "LLIMFloater::onPayButtonClicked" << llendl;
LLAvatarActions::pay(mOtherParticipantUUID);
}
void LLIMFloater::onGroupInfoButtonClicked()
{
llinfos << "LLIMFloater::onGroupInfoButtonClicked" << llendl;
LLGroupActions::show(mSessionID);
}
void LLIMFloater::onCallButtonClicked()
{
llinfos << "LLIMFloater::onCallButtonClicked" << llendl;
gIMMgr->startCall(mSessionID);
}
void LLIMFloater::onEndCallButtonClicked()
{
llinfos << "LLIMFloater::onEndCallButtonClicked" << llendl;
gIMMgr->endCall(mSessionID);
}
void LLIMFloater::onOpenVoiceControlsClicked()
{
llinfos << "LLIMFloater::onOpenVoiceControlsClicked" << llendl;
LLFloaterReg::showInstance("voice_controls");
}
void LLIMFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
llinfos << "LLIMFloater::onVoiceChannelStateChanged" << llendl;
updateButtons(new_state >= LLVoiceChannel::STATE_CALL_STARTED);
}
void LLIMFloater::onChange(EStatusType status, const std::string &channelURI, bool proximal)
{
llinfos << "LLIMFloater::onChange" << llendl;
if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL)
{
return;
@ -391,7 +379,6 @@ void LLIMFloater::onChange(EStatusType status, const std::string &channelURI, bo
void LLIMFloater::updateCallButton()
{
llinfos << "LLIMFloater::updateCallButton" << llendl;
// hide/show call button
bool voice_enabled = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID);
@ -413,7 +400,6 @@ void LLIMFloater::updateCallButton()
void LLIMFloater::updateButtons(bool is_call_started)
{
llinfos << "LLIMFloater::updateButtons" << llendl;
getChild<LLLayoutStack>("ls_control_panel")->reshape(240,20,true);
getChildView("end_call_btn_panel")->setVisible( is_call_started);
getChildView("voice_ctrls_btn_panel")->setVisible( is_call_started);
@ -421,7 +407,6 @@ void LLIMFloater::updateButtons(bool is_call_started)
updateCallButton();
// AO: force resize the widget because llpanels don't resize properly on vis change.
llinfos << "force resize the widget" << llendl;
LLIMModel::LLIMSession* pIMSession = LLIMModel::instance().findIMSession(mSessionID);
switch (pIMSession->mSessionType)
{
@ -448,7 +433,6 @@ void LLIMFloater::updateButtons(bool is_call_started)
void LLIMFloater::changed(U32 mask)
{
llinfos << "LLIMFloater::changed(U32 mask)" << llendl;
getChild<LLButton>("call_btn")->setEnabled(!LLAvatarActions::isFriend(mOtherParticipantUUID));
// Disable "Teleport" button if friend is offline
@ -478,13 +462,10 @@ BOOL LLIMFloater::postBuild()
mControlPanel->setSessionId(mSessionID);
// AO: always hide the control panel to start.
llinfos << "mControlPanel->getParent()" << mControlPanel->getParent() << llendl;
mControlPanel->getParent()->setVisible(false);
//mControlPanel->getParent()->setVisible(gSavedSettings.getBOOL("IMShowControlPanel"));
llinfos << "buttons setup in IM start" << llendl;
LLButton* slide_left = getChild<LLButton>("slide_left_btn");
slide_left->setVisible(mControlPanel->getParent()->getVisible());
slide_left->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this));
@ -522,9 +503,6 @@ BOOL LLIMFloater::postBuild()
// extra icon controls -AO
LLButton* transl = getChild<LLButton>("translate_btn");
//TT
llinfos << "transl" << (transl == NULL) << llendl;
if (transl != NULL)
transl->setVisible(true);
// type-specfic controls
@ -535,7 +513,6 @@ BOOL LLIMFloater::postBuild()
{
case LLIMModel::LLIMSession::P2P_SESSION: // One-on-one IM
{
llinfos << "LLIMModel::LLIMSession::P2P_SESSION" << llendl;
getChild<LLLayoutPanel>("slide_panel")->setVisible(false);
getChild<LLLayoutPanel>("gprofile_panel")->setVisible(false);
getChild<LLLayoutPanel>("end_call_btn_panel")->setVisible(false);
@ -547,20 +524,17 @@ BOOL LLIMFloater::postBuild()
LLAvatarTracker::instance().addParticularFriendObserver(mOtherParticipantUUID, this);
// Disable "Add friend" button for friends.
llinfos << "add_friend_btn check start" << llendl;
getChild<LLButton>("add_friend_btn")->setEnabled(!LLAvatarActions::isFriend(mOtherParticipantUUID));
// Disable "Teleport" button if friend is offline
if(LLAvatarActions::isFriend(mOtherParticipantUUID))
{
llinfos << "LLAvatarActions::isFriend - tp button" << llendl;
getChild<LLButton>("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID));
}
break;
}
case LLIMModel::LLIMSession::GROUP_SESSION: // Group chat
{
llinfos << "LLIMModel::LLIMSession::GROUP_SESSION start" << llendl;
getChild<LLLayoutPanel>("profile_panel")->setVisible(false);
getChild<LLLayoutPanel>("friend_panel")->setVisible(false);
getChild<LLLayoutPanel>("tp_panel")->setVisible(false);
@ -569,13 +543,10 @@ BOOL LLIMFloater::postBuild()
getChild<LLLayoutPanel>("end_call_btn_panel")->setVisible(false);
getChild<LLLayoutPanel>("voice_ctrls_btn_panel")->setVisible(false);
getChild<LLLayoutStack>("ls_control_panel")->reshape(120,20,true);
llinfos << "LLIMModel::LLIMSession::GROUP_SESSION end" << llendl;
break;
}
case LLIMModel::LLIMSession::ADHOC_SESSION: // Conference chat
{
llinfos << "LLIMModel::LLIMSession::ADHOC_SESSION start" << llendl;
getChild<LLLayoutPanel>("profile_panel")->setVisible(false);
getChild<LLLayoutPanel>("gprofile_panel")->setVisible(false);
getChild<LLLayoutPanel>("friend_panel")->setVisible(false);
@ -585,26 +556,21 @@ BOOL LLIMFloater::postBuild()
getChild<LLLayoutPanel>("end_call_btn_panel")->setVisible(false);
getChild<LLLayoutPanel>("voice_ctrls_btn_panel")->setVisible(false);
getChild<LLLayoutStack>("ls_control_panel")->reshape(100,20,true);
llinfos << "LLIMModel::LLIMSession::ADHOC_SESSION end" << llendl;
break;
}
default:
llinfos << "default buttons start" << llendl;
getChild<LLLayoutPanel>("end_call_btn_panel")->setVisible(false);
getChild<LLLayoutPanel>("voice_ctrls_btn_panel")->setVisible(false);
llinfos << "default buttons end" << llendl;
break;
}
}
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
if(voice_channel)
{
llinfos << "voice_channel start" << llendl;
mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLIMFloater::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);
llinfos << "voice_channel end" << llendl;
}
LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this);