diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-12 13:33:54 +0000 | 
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-12 13:33:54 +0000 | 
| commit | 095a3d4372bd755c2fbe6bccf1bc25255d59b5ca (patch) | |
| tree | bb17d377f758ac5fda4f80679cc55b38af5f9d43 /indra | |
| parent | 438db7bbacb10687389401e839adbc390927cdc3 (diff) | |
more mimicking of the good parts of the incoming_floater!
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llimview.cpp | 117 | ||||
| -rw-r--r-- | indra/newview/llimview.h | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_outgoing_call.xml | 2 | 
3 files changed, 18 insertions, 104 deletions
| diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 23767d119d..969e887a89 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1096,14 +1096,27 @@ LLIMMgr::onConfirmForceCloseError(  // Class LLOutgoingCallDialog  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  LLOutgoingCallDialog::LLOutgoingCallDialog(const LLSD& payload) : -	LLDockableFloater(NULL, payload), +	LLDockableFloater(NULL, false, payload),  	mPayload(payload)  {  } +void LLOutgoingCallDialog::getAllowedRect(LLRect& rect) +{ +	rect = gViewerWindow->getWorldViewRectRaw(); +} + +void LLOutgoingCallDialog::onOpen(const LLSD& key) +{ +	// dock the dialog to the sys well, where other sys messages appear +	setDockControl(new LLDockControl(LLBottomTray::getInstance()->getSysWell(), +					 this, getDockTongue(), LLDockControl::TOP, +					 boost::bind(&LLOutgoingCallDialog::getAllowedRect, this, _1))); +} +  BOOL LLOutgoingCallDialog::postBuild()  { -	BOOL success = LLFloater::postBuild(); +	BOOL success = LLDockableFloater::postBuild();  	LLSD callee_id = mPayload["session_id"];//mPayload["caller_id"]; @@ -1127,106 +1140,6 @@ BOOL LLOutgoingCallDialog::postBuild()  	return success;  } -void LLOutgoingCallDialog::processCallResponse(S32 response) -{ -	if (!gIMMgr) -		return; - -	LLUUID session_id = mPayload["session_id"].asUUID(); -	EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger(); -	LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)mPayload["inv_type"].asInteger(); -	bool voice = true; -	switch(response) -	{ -	case 2: // start IM: just don't start the voice chat -	{ -		voice = false; -		/* FALLTHROUGH */ -	} -	case 0: // accept -	{ -		if (type == IM_SESSION_P2P_INVITE) -		{ -			// create a normal IM session -			session_id = gIMMgr->addP2PSession( -				mPayload["session_name"].asString(), -				mPayload["caller_id"].asUUID(), -				mPayload["session_handle"].asString()); - -			if (voice) -			{ -				if (gIMMgr->startCall(session_id)) -				{ -					// always open IM window when connecting to voice -					LLIMFloater::show(session_id); -				} -			} - -			gIMMgr->clearPendingAgentListUpdates(session_id); -			gIMMgr->clearPendingInvitation(session_id); -		} -		else -		{ -			LLUUID session_id = gIMMgr->addSession( -				mPayload["session_name"].asString(), -				type, -				session_id); -			if (session_id != LLUUID::null) -			{ -				LLIMFloater::show(session_id); -			} - -			std::string url = gAgent.getRegion()->getCapability( -				"ChatSessionRequest"); - -			if (voice) -			{ -				LLSD data; -				data["method"] = "accept invitation"; -				data["session-id"] = session_id; -				LLHTTPClient::post( -					url, -					data, -					new LLViewerChatterBoxInvitationAcceptResponder( -						session_id, -						inv_type)); -			} -		} -		if (voice) -		{ -			break; -		} -	} -	case 1: // decline -	{ -		if (type == IM_SESSION_P2P_INVITE) -		{ -			if(gVoiceClient) -			{ -				std::string s = mPayload["session_handle"].asString(); -				gVoiceClient->declineInvite(s); -			} -		} -		else -		{ -			std::string url = gAgent.getRegion()->getCapability( -				"ChatSessionRequest"); - -			LLSD data; -			data["method"] = "decline invitation"; -			data["session-id"] = session_id; -			LLHTTPClient::post( -				url, -				data, -				NULL); -		} -	} - -	gIMMgr->clearPendingAgentListUpdates(session_id); -	gIMMgr->clearPendingInvitation(session_id); -	} -} -  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index b6e0c87dcf..510b5b8b69 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -428,9 +428,10 @@ public:  	LLOutgoingCallDialog(const LLSD& payload);  	/*virtual*/ BOOL postBuild(); +	/*virtual*/ void onOpen(const LLSD& key);  private: -	void processCallResponse(S32 response); +	void getAllowedRect(LLRect& rect);  	LLSD mPayload;  }; 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 c30814c881..3433d95914 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -44,7 +44,7 @@       height="20"       layout="topleft"       left="77" -     name="caller name" +     name="callee name"       top="27"       width="315"       word_wrap="true" /> | 
