summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-11-11 18:06:44 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2009-11-11 18:06:44 +0000
commitcc864d86ce91cd26edc3796acbd9580de4fafbc8 (patch)
tree1da263cbc194207836ee78c85963c220f2141b1e /indra
parenta0dd5b825be7ec31ab69894c3e4fc81ba6aacdd4 (diff)
outgoing call dialog. doesn't do anything and is ugly/wrong, but it exists. WIP.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimview.cpp32
-rw-r--r--indra/newview/llimview.h3
-rw-r--r--indra/newview/llvoicechannel.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/floater_outgoing_call.xml22
4 files changed, 31 insertions, 31 deletions
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<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)
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
</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>