outgoing call dialog. doesn't do anything and is ugly/wrong, but it exists. WIP.

meow-7.2.2
Tofu Linden 2009-11-11 18:06:44 +00:00
parent a0dd5b825b
commit cc864d86ce
4 changed files with 31 additions and 31 deletions

View File

@ -1103,39 +1103,35 @@ LLIMMgr::onConfirmForceCloseError(
// Class LLOutgoingCallDialog
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LLOutgoingCallDialog::LLOutgoingCallDialog(const LLSD& payload) :
LLModalDialog(payload),
LLDockableFloater(NULL, payload),
mPayload(payload)
{
}
BOOL LLOutgoingCallDialog::postBuild()
{
LLSD caller_id = mPayload["caller_id"];
EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger();
BOOL success = LLFloater::postBuild();
std::string call_type = getString("VoiceInviteP2P");
std::string caller_name = mPayload["caller_name"].asString();
if (caller_name == "anonymous")
LLSD callee_id = mPayload["session_id"];//mPayload["caller_id"];
std::string calling_str = getString("calling");
std::string callee_name = mPayload["session_name"].asString();//mPayload["caller_name"].asString();
if (callee_name == "anonymous")
{
caller_name = getString("anonymous");
callee_name = getString("anonymous");
}
setTitle(caller_name + " " + call_type);
// If it is not a P2P invite, then it's an AdHoc invite
if ( type != IM_SESSION_P2P_INVITE )
{
call_type = getString("VoiceInviteAdHoc");
}
setTitle(callee_name);
LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name");
caller_name_widget->setValue(caller_name + " " + call_type);
LLUICtrl* callee_name_widget = getChild<LLUICtrl>("callee name");
// *TODO: substitute callee name properly
callee_name_widget->setValue(calling_str + " " + callee_name);
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
icon->setValue(caller_id);
icon->setValue(callee_id);
//childSetAction("Reject", onReject, this);
return TRUE;
return success;
}
void LLOutgoingCallDialog::processCallResponse(S32 response)

View File

@ -37,6 +37,7 @@
#include "llspeakers.h" //for LLIMSpeakerMgr
#include "llimpanel.h" //for voice channels
#include "llmodaldialog.h"
#include "lldockablefloater.h"
#include "llinstantmessage.h"
#include "lluuid.h"
#include "llmultifloater.h"
@ -418,7 +419,7 @@ private:
LLSD mPayload;
};
class LLOutgoingCallDialog : public LLModalDialog
class LLOutgoingCallDialog : public LLDockableFloater
{
public:
LLOutgoingCallDialog(const LLSD& payload);

View File

@ -385,8 +385,11 @@ void LLVoiceChannel::setState(EState state)
switch(state)
{
case STATE_RINGING:
LLFloaterReg::showInstance("outgoing_call", payload, TRUE);
llinfos << "RINGINGGGGGGGG " << mSessionName << llendl;
if (!mSessionName.empty())
{
LLFloaterReg::showInstance("outgoing_call", payload, TRUE);
}
gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs);
break;
case STATE_CONNECTED:

View File

@ -15,8 +15,8 @@
anonymous
</floater.string>
<floater.string
name="VoiceInviteP2P">
is calling.
name="calling">
Calling [CALLEE]
</floater.string>
<floater.string
name="VoiceInviteAdHoc">
@ -38,35 +38,35 @@
layout="topleft"
left="77"
max_length="2147483647"
name="caller name"
name="callee name"
read_only="true"
top="21"
width="163"
word_wrap="true" />
<button
height="24"
label="Accept"
label_selected="Accept"
label="Bar"
label_selected="Bar"
layout="topleft"
left="70"
name="Accept"
name="Bar"
top="92"
width="100" />
<button
height="24"
label="Reject"
label_selected="Reject"
label="Foo"
label_selected="Foo"
layout="topleft"
left_delta="0"
name="Reject"
name="Foo"
top_pad="12"
width="100" />
<button
height="24"
label="Start IM"
label="Baz"
layout="topleft"
left_delta="0"
name="Start IM"
name="Baz"
top_pad="12"
width="100" />
</floater>