From fe0da9bf7b81d24a9614f95d9f91012796eabf77 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Mon, 14 Dec 2009 19:53:54 +0200 Subject: Fixed low bug EXT - 3255 (Call button is enabled in the People & Profile panels while voice is disabled) --HG-- branch : product-engine --- indra/newview/llavataractions.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 5f90a7627f..33dc7ee2c8 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -61,6 +61,7 @@ #include "llviewerregion.h" #include "llimfloater.h" #include "lltrans.h" +#include "llcallingcard.h" // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) @@ -265,6 +266,24 @@ bool LLAvatarActions::isCalling(const LLUUID &id) return (LLIMModel::getInstance()->findIMSession(session_id) != NULL); } +//static +bool LLAvatarActions::canCall(const LLUUID &id) +{ + if(isFriend(id)) + { + return LLAvatarTracker::instance().isBuddyOnline(id) && LLVoiceClient::voiceEnabled(); + } + else + { + // don't need to check online/offline status because "usual resident" (resident that is not a friend) + // can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual + // resident" it automatically means that the resident is ONLINE. So to make a call to the "usual resident" + // we need to check only that "our" voice is enabled. + return LLVoiceClient::voiceEnabled(); + } + +} + // static void LLAvatarActions::startConference(const std::vector& ids) { -- cgit v1.2.3 From 9dd2b290318f657b3dca81278f597cc702a6e149 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 16 Dec 2009 15:30:33 +0200 Subject: fixed EXT-2884 Initiation of a voice call should not bring text chat (p2p, ad-hoc, group) Added flag to an LLIMSession which indicated whether it has been created for a voice call. --HG-- branch : product-engine --- indra/newview/llavataractions.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'indra/newview/llavataractions.cpp') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 33dc7ee2c8..636b1de4d4 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -211,11 +211,9 @@ void LLAvatarActions::startCall(const LLUUID& id) std::string name; gCacheName->getFullName(id, name); - LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); + LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id, true); if (session_id != LLUUID::null) { - // always open IM window when connecting to voice - LLIMFloater::show(session_id); gIMMgr->startCall(session_id); } make_ui_sound("UISndStartIM"); @@ -239,15 +237,12 @@ void LLAvatarActions::startAdhocCall(const std::vector& ids) // create the new ad hoc voice session const std::string title = LLTrans::getString("conference-title"); LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, - ids[0], id_array); + ids[0], id_array, true); if (session_id == LLUUID::null) { return; } - // always open IM window when connecting to voice - LLIMFloater::show(session_id); - // start the call once the session has fully initialized gIMMgr->autoStartCallOnStartup(session_id); -- cgit v1.2.3