From cc864d86ce91cd26edc3796acbd9580de4fafbc8 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 11 Nov 2009 18:06:44 +0000 Subject: outgoing call dialog. doesn't do anything and is ugly/wrong, but it exists. WIP. --- indra/newview/llimview.cpp | 32 ++++++++++------------ indra/newview/llimview.h | 3 +- indra/newview/llvoicechannel.cpp | 5 +++- .../skins/default/xui/en/floater_outgoing_call.xml | 22 +++++++-------- 4 files changed, 31 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 33bd483367..bd3ee51c15 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -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("caller name"); - caller_name_widget->setValue(caller_name + " " + call_type); + LLUICtrl* callee_name_widget = getChild("callee name"); + // *TODO: substitute callee name properly + callee_name_widget->setValue(calling_str + " " + callee_name); LLAvatarIconCtrl* icon = getChild("avatar_icon"); - icon->setValue(caller_id); + icon->setValue(callee_id); //childSetAction("Reject", onReject, this); - return TRUE; + return success; } void LLOutgoingCallDialog::processCallResponse(S32 response) diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 942a8f96d0..105ff8dcbb 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -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); diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 04ae44e08d..b0ea07946c 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -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: diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 3838fe4bc7..fd936232c9 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -15,8 +15,8 @@ anonymous - is calling. + name="calling"> + Calling [CALLEE] @@ -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" />