summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2009-11-06 19:31:45 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2009-11-06 19:31:45 +0200
commit8f679595d5cbcc29a5c9576b04df034aa0c2157f (patch)
tree48bbde155d34027fae238a5a17691901c9ad3ad7 /indra/newview
parent01c83aa21e616777adf9e1ab0319f95e656e4f7a (diff)
parent8a4e36a9bdd94ebd183d1f315aa51c6c52d0abbd (diff)
Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llavataractions.cpp11
-rw-r--r--indra/newview/llavatariconctrl.cpp7
-rw-r--r--indra/newview/llgroupactions.cpp7
-rw-r--r--indra/newview/llimview.cpp16
-rw-r--r--indra/newview/llinventorybridge.cpp7
-rw-r--r--indra/newview/llinventorypanel.cpp7
-rw-r--r--indra/newview/llnotificationofferhandler.cpp4
-rw-r--r--indra/newview/llviewermenu.cpp7
8 files changed, 57 insertions, 9 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 67ffe54b7e..3fc37aa3d5 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -178,7 +178,10 @@ void LLAvatarActions::startIM(const LLUUID& id)
std::string name;
gCacheName->getFullName(id, name);
LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
- LLIMFloater::show(session_id);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
make_ui_sound("UISndStartIM");
}
@@ -191,7 +194,11 @@ void LLAvatarActions::startConference(const std::vector<LLUUID>& ids)
{
id_array.push_back(*it);
}
- gIMMgr->addSession("Friends Conference", IM_SESSION_CONFERENCE_START, ids[0], id_array);
+ LLUUID session_id = gIMMgr->addSession("Friends Conference", IM_SESSION_CONFERENCE_START, ids[0], id_array);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
make_ui_sound("UISndStartIM");
}
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index b56e8d1ec2..0ee3e78409 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -44,6 +44,7 @@
#include "llcachename.h"
#include "llagentdata.h"
+#include "llimfloater.h"
#define MENU_ITEM_VIEW_PROFILE 0
#define MENU_ITEM_SEND_IM 1
@@ -354,7 +355,11 @@ void LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked(const LLSD& userdata)
name.append(" ");
name.append(getLastName());
- gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
+ LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
}
else if (level == "add")
{
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index c46eedbef2..e60bde9fd8 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -43,6 +43,7 @@
#include "llimview.h" // for gIMMgr
#include "llsidetray.h"
#include "llstatusbar.h" // can_afford_transaction()
+#include "llimfloater.h"
//
// Globals
@@ -279,10 +280,14 @@ void LLGroupActions::startChat(const LLUUID& group_id)
LLGroupData group_data;
if (gAgent.getGroupData(group_id, group_data))
{
- gIMMgr->addSession(
+ LLUUID session_id = gIMMgr->addSession(
group_data.mName,
IM_SESSION_GROUP_START,
group_id);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
make_ui_sound("UISndStartIM");
}
else
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index ac5bd719e2..fdf119fbee 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1192,10 +1192,14 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
}
else
{
- gIMMgr->addSession(
+ 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");
@@ -1279,10 +1283,14 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
}
else
{
- gIMMgr->addSession(
+ LLUUID session_id = gIMMgr->addSession(
payload["session_name"].asString(),
type,
session_id);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
std::string url = gAgent.getRegion()->getCapability(
"ChatSessionRequest");
@@ -1548,6 +1556,10 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name,
const std::string& caller_uri)
{
LLUUID session_id = addSession(name, IM_NOTHING_SPECIAL, other_participant_id);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id);
if (speaker_mgr)
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index b9a25d5dc7..ef61c45d4d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -97,6 +97,7 @@
#include "llfloateropenobject.h"
#include "lltrans.h"
#include "llappearancemgr.h"
+#include "llimfloater.h"
using namespace LLOldEvents;
@@ -3347,7 +3348,11 @@ void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel*
{
std::string callingcard_name;
gCacheName->getFullName(item->getCreatorUUID(), callingcard_name);
- gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
+ LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
}
}
else if ("lure" == action)
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 178e7d0823..80710610d4 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -86,6 +86,7 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llwearablelist.h"
+#include "llimfloater.h"
static LLDefaultChildRegistry::Register<LLInventoryPanel> r("inventory_panel");
@@ -800,7 +801,11 @@ bool LLInventoryPanel::beginIMSession()
name = llformat("Session %d", session_num++);
}
- gIMMgr->addSession(name, type, members[0], members);
+ LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
return true;
}
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 8e3a44682c..75ef5208e7 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -99,6 +99,10 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
session_id = LLIMMgr::instance().addSession(
notification->getSubstitutions()["NAME"], IM_NOTHING_SPECIAL,
notification->getPayload()["from_id"]);
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
}
LLIMMgr::instance().addMessage(session_id, LLUUID(),
notification->getSubstitutions()["NAME"],
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 300ebf4e24..053a8d19e5 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -210,6 +210,7 @@
#include "lltexlayer.h"
#include "llappearancemgr.h"
+#include "llimfloater.h"
using namespace LLVOAvatarDefines;
@@ -6265,9 +6266,13 @@ class LLAvatarSendIM : public view_listener_t
//EInstantMessage type = have_agent_callingcard(gLastHitObjectID)
// ? IM_SESSION_ADD : IM_SESSION_CARDLESS_START;
- gIMMgr->addSession(name,
+ LLUUID session_id = gIMMgr->addSession(name,
IM_NOTHING_SPECIAL,
avatar->getID());
+ if (session_id != LLUUID::null)
+ {
+ LLIMFloater::show(session_id);
+ }
}
return true;
}