summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2009-12-18 13:24:29 -0600
committerDave Parks <davep@lindenlab.com>2009-12-18 13:24:29 -0600
commit6aa71844a8949ab3c75b6cbe1a5f8cb811aa27b8 (patch)
treee73b1d2847a33c7568688f85265913a69d1711a2 /indra/newview/llavataractions.cpp
parent5015886e1763887f534321790d56b6cee5a75dfa (diff)
parentd5b53eb483ec042d83859ec957dce7699c7469aa (diff)
Merge with viewer-2-0
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 5f90a7627f..c5a1ffdcb3 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)
@@ -210,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");
@@ -238,15 +237,12 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& 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);
@@ -265,6 +261,21 @@ bool LLAvatarActions::isCalling(const LLUUID &id)
return (LLIMModel::getInstance()->findIMSession(session_id) != NULL);
}
+//static
+bool LLAvatarActions::canCall(const LLUUID &id)
+{
+ // For now we do not need to check whether passed UUID is ID of agent's friend.
+ // Use common check of Voice Client state.
+ {
+ // 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<LLUUID>& ids)
{