summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-12-10 14:05:17 +0000
committerLynx Linden <lynx@lindenlab.com>2009-12-10 14:05:17 +0000
commit9b4d09471cca6922257a27ba9cb70498ab81fd94 (patch)
treeb04547e53d051a0e4f082f9d89e1f1043ff081fe /indra/newview/llavataractions.cpp
parent3497f64b12f0527f9922e3f09d380559b4e97d11 (diff)
DEV-41317 DEV-42311: Improved auto-call implementation.
Improved the implementation for auto-connecting an adhoc call. This involved having the controller (LLIMMgr) set a flag in the model (LLIMModel) to autoconnect on initialize. Now all of the view code (LLPanelChatControlPanel) and the signal/callback infrastructure that I added earlier can be removed as it violated MVP separation. Ah! Much nicer. Thanks to PE folk for the suggestion.
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 5af023f565..5f90a7627f 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -62,9 +62,6 @@
#include "llimfloater.h"
#include "lltrans.h"
-// callback connection to auto-call when the IM floater initializes
-boost::signals2::connection gAdhocAutoCall;
-
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
{
@@ -250,8 +247,8 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids)
// always open IM window when connecting to voice
LLIMFloater::show(session_id);
- // start the call once the floater has fully initialized
- gAdhocAutoCall = LLIMModel::getInstance()->addSessionInitializedCallback(callbackAutoStartCall);
+ // start the call once the session has fully initialized
+ gIMMgr->autoStartCallOnStartup(session_id);
make_ui_sound("UISndStartIM");
}
@@ -467,17 +464,6 @@ bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& re
}
// static
-void LLAvatarActions::callbackAutoStartCall(const LLSD& data)
-{
- // start the adhoc voice call now the IM panel has initialized
- LLUUID session_id = data["session_id"].asUUID();
- gIMMgr->startCall(session_id);
-
- // and deschedule this callback as its work is done now
- gAdhocAutoCall.disconnect();
-}
-
-// static
void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message)
{
const LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD);