fixed EXT-4764 “Forbid connecting to different voice channels at once”,

removed redundant call status notifications: ringing, connected, hang_up,
unavailable, answering;

--HG--
branch : product-engine
meow-7.2.2
Alexei Arabadji 2010-02-03 16:15:34 +02:00
parent a9aa9f4118
commit 6ebbc5edf6
4 changed files with 12 additions and 59 deletions

View File

@ -2985,48 +2985,6 @@ public:
}
};
LLCallInfoDialog::LLCallInfoDialog(const LLSD& payload) : LLCallDialog(payload)
{
}
BOOL LLCallInfoDialog::postBuild()
{
// init notification's lifetime
std::istringstream ss( getString("lifetime") );
if (!(ss >> mLifetime))
{
mLifetime = DEFAULT_LIFETIME;
}
return LLCallDialog::postBuild();
}
void LLCallInfoDialog::onOpen(const LLSD& key)
{
if(key.has("msg"))
{
std::string msg = key["msg"];
getChild<LLTextBox>("msg")->setValue(msg);
}
mLifetimeTimer.start();
}
void LLCallInfoDialog::show(const std::string& status_name, const LLSD& args)
{
LLUIString message = LLTrans::getString(status_name);
message.setArgs(args);
LLSD payload;
payload["msg"] = message;
LLFloater* inst = LLFloaterReg::findInstance("call_info");
// avoid recreate instance with the same message
if (inst == NULL || message.getString() != inst->getChild<LLTextBox>("msg")->getValue())
{
LLFloaterReg::showInstance("call_info", payload);
}
}
LLHTTPRegistration<LLViewerChatterBoxSessionStartReply>
gHTTPRegistrationMessageChatterboxsessionstartreply(
"/message/ChatterBoxSessionStartReply");

View File

@ -530,16 +530,6 @@ private:
void hideAllText();
};
class LLCallInfoDialog : public LLCallDialog
{
public:
LLCallInfoDialog(const LLSD& payload);
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
static void show(const std::string& status_name, const LLSD& args);
};
// Globals
extern LLIMMgr *gIMMgr;

View File

@ -200,7 +200,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>);
LLFloaterReg::add("call_info", "floater_call_info.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallInfoDialog>);
LLFloaterReg::add("parcel_info", "floater_preview_url.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterParcelInfo>);
LLFloaterPayUtil::registerFloater();

View File

@ -389,13 +389,16 @@ void LLVoiceChannel::setState(EState state)
switch(state)
{
case STATE_RINGING:
LLCallInfoDialog::show("ringing", mNotifyArgs);
//TODO: remove or redirect this call status notification
// LLCallInfoDialog::show("ringing", mNotifyArgs);
break;
case STATE_CONNECTED:
LLCallInfoDialog::show("connected", mNotifyArgs);
//TODO: remove or redirect this call status notification
// LLCallInfoDialog::show("connected", mNotifyArgs);
break;
case STATE_HUNG_UP:
LLCallInfoDialog::show("hang_up", mNotifyArgs);
//TODO: remove or redirect this call status notification
// LLCallInfoDialog::show("hang_up", mNotifyArgs);
break;
default:
break;
@ -635,7 +638,8 @@ void LLVoiceChannelGroup::setState(EState state)
case STATE_RINGING:
if ( !mIsRetrying )
{
LLCallInfoDialog::show("ringing", mNotifyArgs);
//TODO: remove or redirect this call status notification
// LLCallInfoDialog::show("ringing", mNotifyArgs);
}
doSetState(state);
@ -701,7 +705,8 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status)
//skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749)
if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking())
{
LLCallInfoDialog::show("unavailable", mNotifyArgs);
//TODO: remove or redirect this call status notification
// LLCallInfoDialog::show("unavailable", mNotifyArgs);
}
return;
default:
@ -901,7 +906,8 @@ void LLVoiceChannelP2P::setState(EState state)
// so provide a special purpose message here
if (mReceivedCall && state == STATE_RINGING)
{
LLCallInfoDialog::show("answering", mNotifyArgs);
//TODO: remove or redirect this call status notification
// LLCallInfoDialog::show("answering", mNotifyArgs);
doSetState(state);
return;
}