diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-12 15:35:08 +0000 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-12 15:35:08 +0000 |
| commit | 64c1146213a1f1313bd061229a962e4d827cb16d (patch) | |
| tree | 61914e8a5300ad30d3cac49b07278e2de7181806 /indra/newview/llimview.cpp | |
| parent | c2b227c93973edc786c3f42772e06cd1760b610e (diff) | |
add Cancel button to outgoing call dialog, make it work (perhaps), make the name of the departing voice session more accurate (perhaps). WIP.
Diffstat (limited to 'indra/newview/llimview.cpp')
| -rw-r--r-- | indra/newview/llimview.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 9175d0c91c..a94254e17e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1108,11 +1108,10 @@ void LLOutgoingCallDialog::getAllowedRect(LLRect& rect) void LLOutgoingCallDialog::onOpen(const LLSD& key) { - // prepare to tell the user which voice channel they would be leaving - LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel(); - if (voice && !voice->getSessionName().empty()) + // tell the user which voice channel they are leaving + if (!mPayload["old_channel_name"].asString().empty()) { - childSetTextArg("leaving", "[CURRENT_CHAT]", voice->getSessionName()); + childSetTextArg("leaving", "[CURRENT_CHAT]", mPayload["old_channel_name"].asString()); } else { @@ -1138,11 +1137,27 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) boost::bind(&LLOutgoingCallDialog::getAllowedRect, this, _1))); } + +//static +void LLOutgoingCallDialog::onCancel(void* user_data) +{ + LLOutgoingCallDialog* self = (LLOutgoingCallDialog*)user_data; + + if (!gIMMgr) + return; + + LLUUID session_id = self->mPayload["session_id"].asUUID(); + gIMMgr->endCall(session_id); + + self->closeFloater(); +} + + BOOL LLOutgoingCallDialog::postBuild() { BOOL success = LLDockableFloater::postBuild(); - //childSetAction("Reject", onReject, this); + childSetAction("Cancel", onCancel, this); return success; } |
