From 658ccc3e85487f9f24ff3b5926e60d6cce7f42e0 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Apr 2010 11:08:04 -0700 Subject: Re-insert backed out SLE checkin so we can fix it --- indra/newview/llimview.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e0f155a6a9..5201f92dbc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -344,13 +344,13 @@ LLIMModel::LLIMSession::~LLIMSession() mSpeakers = NULL; // End the text IM session if necessary - if(gVoiceClient && mOtherParticipantID.notNull()) + if(LLVoiceClient::getInstance() && mOtherParticipantID.notNull()) { switch(mType) { case IM_NOTHING_SPECIAL: case IM_SESSION_P2P_INVITE: - gVoiceClient->endUserIMSession(mOtherParticipantID); + LLVoiceClient::getInstance()->endUserIMSession(mOtherParticipantID); break; default: @@ -925,7 +925,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id))) { // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice. - sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text); + sent = LLVoiceClient::getInstance()->sendTextMessage(other_participant_id, utf8_text); } if(!sent) @@ -1717,7 +1717,7 @@ void LLOutgoingCallDialog::show(const LLSD& key) // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) - bool voice_works = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + bool voice_works = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); @@ -1843,7 +1843,11 @@ LLCallDialog(payload) void LLIncomingCallDialog::onLifetimeExpired() { // check whether a call is valid or not - if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) + LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mPayload["session_id"].asUUID()); + if(channelp && + (channelp->getState() != LLVoiceChannel::STATE_NO_CHANNEL_INFO) && + (channelp->getState() != LLVoiceChannel::STATE_ERROR) && + (channelp->getState() != LLVoiceChannel::STATE_HUNG_UP)) { // restart notification's timer if call is still valid mLifetimeTimer.start(); @@ -2077,10 +2081,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) + if(LLVoiceClient::getInstance()) { std::string s = mPayload["session_handle"].asString(); - gVoiceClient->declineInvite(s); + LLVoiceClient::getInstance()->declineInvite(s); } } else @@ -2168,11 +2172,8 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) { if (type == IM_SESSION_P2P_INVITE) { - if(gVoiceClient) - { - std::string s = payload["session_handle"].asString(); - gVoiceClient->declineInvite(s); - } + std::string s = payload["session_handle"].asString(); + LLVoiceClient::getInstance()->declineInvite(s); } else { @@ -3078,7 +3079,7 @@ public: return; } - if(!LLVoiceClient::voiceEnabled()) + if(!LLVoiceClient::getInstance()->voiceEnabled()) { // Don't display voice invites unless the user has voice enabled. return; -- cgit v1.2.3 From d66c242fea8a846f087562d5ae2b32c50a3f5ef1 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 14 Apr 2010 17:21:44 -0700 Subject: DEV-48904 - p2p acceptance dialog vanishes too quickly DEV-48903 - malformed names in p2p dialogs for Diamondware In the merge there were some changes that didn't get propagated that resulted in some failures with respect to diamondware name processing. THe determination as to whether a p2p session was with an avatar or with an alcatel (pbx) wasn't propagated into the diamondware code. I fixed that by merging the changes to the vivox module with respect to that into the diamondware module. Also, the acceptance dialog was vanishing too quickly as the determination as to whether there was still a p2p invite pending was not updated when the calling code was updated. The calling code initially was changed to look into vivox state which isn't really valid. that was changed in the 'trunk' to another mechanism, but that still assumed visibility into the voice code. I fixed that by creating an API call to ask whether a call was pending. CR: Karina --- indra/newview/llimview.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cf83d02b09..247f5b879a 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1847,12 +1847,8 @@ LLCallDialog(payload) void LLIncomingCallDialog::onLifetimeExpired() { - // check whether a call is valid or not - LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mPayload["session_id"].asUUID()); - if(channelp && - (channelp->getState() != LLVoiceChannel::STATE_NO_CHANNEL_INFO) && - (channelp->getState() != LLVoiceChannel::STATE_ERROR) && - (channelp->getState() != LLVoiceChannel::STATE_HUNG_UP)) + std::string session_handle = mPayload["session_handle"].asString(); + if (LLVoiceClient::getInstance()->invitePending(session_handle)) { // restart notification's timer if call is still valid mLifetimeTimer.start(); -- cgit v1.2.3 From 6823879c1ad2260e553bc6a641975ca478848f3b Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 19 Apr 2010 12:52:43 -0700 Subject: CR Changes from Aimee --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 247f5b879a..109090a75a 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1848,7 +1848,7 @@ LLCallDialog(payload) void LLIncomingCallDialog::onLifetimeExpired() { std::string session_handle = mPayload["session_handle"].asString(); - if (LLVoiceClient::getInstance()->invitePending(session_handle)) + if (LLVoiceClient::getInstance()->isValidChannel(session_handle)) { // restart notification's timer if call is still valid mLifetimeTimer.start(); -- cgit v1.2.3 From 09a58b804bfcc055ce7722bf5aa8a05bfd6ed890 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 19 May 2010 01:20:39 +0300 Subject: EXT-7158 FIXED Moved lltextutil from newview to llui library. Reviewed by Richard Nelson and Mike Antipov at https://codereview.productengine.com/secondlife/r/363/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c143ac9dea..039df69454 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -43,6 +43,7 @@ #include "llhttpclient.h" #include "llsdutil_math.h" #include "llstring.h" +#include "lltextutil.h" #include "lltrans.h" #include "lluictrlfactory.h" @@ -65,7 +66,6 @@ #include "llnearbychat.h" #include "llspeakers.h" //for LLIMSpeakerMgr #include "lltextbox.h" -#include "lltextutil.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" -- cgit v1.2.3 From a1b973fc2a5d28e64dcf010e3652beda78745d35 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 28 May 2010 00:03:08 +0300 Subject: EXT-7118 FIXED Changed text in group call invite. - Changed group invite string from "has joined a Voice Chat call with the group [GROUP]" to "just joined '[GROUP]' voice channel." - Added special string for group invite question saying "Would you like to leave [CURRENT_CHAT] and join the call with '[GROUP]'"? - Hooked up this string in code. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/458/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 039df69454..2c1983b6d2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1941,15 +1941,24 @@ void LLIncomingCallDialog::onOpen(const LLSD& key) { LLCallDialog::onOpen(key); + LLStringUtil::format_map_t args; + LLGroupData data; + // if it's a group call, retrieve group name to use it in question + if (gAgent.getGroupData(key["session_id"].asUUID(), data)) + { + args["[GROUP]"] = data.mName; + } // tell the user which voice channel they would be leaving LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel(); if (voice && !voice->getSessionName().empty()) { - childSetTextArg("question", "[CURRENT_CHAT]", voice->getSessionName()); + args["[CURRENT_CHAT]"] = voice->getSessionName(); + childSetText("question", getString(key["question_type"].asString(), args)); } else { - childSetTextArg("question", "[CURRENT_CHAT]", getString("localchat")); + args["[CURRENT_CHAT]"] = getString("localchat"); + childSetText("question", getString(key["question_type"].asString(), args)); } } @@ -2480,6 +2489,8 @@ void LLIMMgr::inviteToSession( } std::string notify_box_type; + // voice invite question is different from default only for group call (EXT-7118) + std::string question_type = "VoiceInviteQuestionDefault"; BOOL ad_hoc_invite = FALSE; if(type == IM_SESSION_P2P_INVITE) @@ -2491,6 +2502,7 @@ void LLIMMgr::inviteToSession( { //only really old school groups have voice invitations notify_box_type = "VoiceInviteGroup"; + question_type = "VoiceInviteQuestionGroup"; } else if ( inv_type == INVITATION_TYPE_VOICE ) { @@ -2515,6 +2527,7 @@ void LLIMMgr::inviteToSession( payload["session_handle"] = session_handle; payload["session_uri"] = session_uri; payload["notify_box_type"] = notify_box_type; + payload["question_type"] = question_type; LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id); if (channelp && channelp->callStarted()) -- cgit v1.2.3 From 129da72326e0a314717652650ef6f4378d7794a0 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 18 Jun 2010 17:52:54 +0300 Subject: EXT-6710 FIXED Corrected 'ItemsShared' notification message and provided logging of 'item shared' message instead of spawning IM session and add message to it. Details: 1 Corrected 'ItemsShared' notification message. 2 Avoided spawning session on item shared event. 3 Provided logging of item shared message. 4 Provided logging of 'IMSystemMessageTip' notification without opened related IM session. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/612/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2c1983b6d2..ddfcd68e38 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2311,12 +2311,20 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess } else // going to IM session { + message = LLTrans::getString(message_name + "-im"); + message.setArgs(args); if (hasSession(session_id)) { - message = LLTrans::getString(message_name + "-im"); - message.setArgs(args); gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString()); } + // log message to file + else + { + std::string session_name; + // since we select user to share item with - his name is already in cache + gCacheName->getFullName(args["user_id"], session_name); + LLIMModel::instance().logToFile(session_name, SYSTEM_FROM, LLUUID::null, message.getString()); + } } } -- cgit v1.2.3 From 2112f333bd07fa9e036bb4c2745a7199e4025e73 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 25 Jun 2010 19:43:03 +0300 Subject: EXT-4872 FIXED hiding Start IM button for ad-hoc call invitation Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/658/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ddfcd68e38..6d3998bb96 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1898,8 +1898,6 @@ BOOL LLIncomingCallDialog::postBuild() // check to see if this is an Avaline call bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); - childSetVisible("Start IM", is_avatar); // no IM for avaline - if (caller_name == "anonymous") { caller_name = getString("anonymous"); @@ -1931,6 +1929,10 @@ BOOL LLIncomingCallDialog::postBuild() mLifetimeTimer.stop(); } + //it's not possible to connect to existing Ad-Hoc chat through incoming ad-hoc call + //and no IM for avaline + childSetVisible("Start IM", is_avatar && notify_box_type != "VoiceInviteAdHoc"); + setCanDrag(FALSE); return TRUE; -- cgit v1.2.3 From 8e7fd534aa27a3cd4b63b60fbc7a7dbb41f109cb Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 30 Jun 2010 18:46:25 +0300 Subject: EXT-8065 FIXED added hiding Start IM button on a group call invitation dialog Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/675/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6d3998bb96..a2b72e7d74 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1929,9 +1929,9 @@ BOOL LLIncomingCallDialog::postBuild() mLifetimeTimer.stop(); } - //it's not possible to connect to existing Ad-Hoc chat through incoming ad-hoc call + //it's not possible to connect to existing Ad-Hoc/Group chat through incoming ad-hoc call //and no IM for avaline - childSetVisible("Start IM", is_avatar && notify_box_type != "VoiceInviteAdHoc"); + childSetVisible("Start IM", is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); setCanDrag(FALSE); -- cgit v1.2.3 From d8e26b7b73b734e1745795788c844f6aab3360fe Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 12 Jul 2010 11:28:51 +0300 Subject: EXT-8246 FIXED Disabling an adding of items into Recent People list in case of incoming ad-hoc chat. REASON: it was implemented in EXT-5694 to add all ad-hoc participants when user send a message to session created himself. Participants IDs are known in this case. But in case of incoming ad-hoc chat those IDs are not known. Container used to get IDs contains only Ad-hoc Session ID. So, (???) is expected in this case in Recent People Panel. FIX: disabling adding of items into Recent People list in case of incoming ad-hoc chat. Note: participants will be added to the list once they send a message to chat. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/724/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a2b72e7d74..21313f9df7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1022,6 +1022,14 @@ void LLIMModel::sendMessage(const std::string& utf8_text, } else { + // IM_SESSION_INVITE means that this is an Ad-hoc incoming chat + // (it can be also Group chat but it is checked above) + // In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added + // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. + // Concrete participants will be added into this list once they sent message in chat. + if (IM_SESSION_INVITE == dialog) return; + + // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it!=session->mInitialTargetIDs.end();++it) { -- cgit v1.2.3 From 5d85dad85f07ea23b3a2892276d8ac591a966864 Mon Sep 17 00:00:00 2001 From: Dessie Linden Date: Thu, 15 Jul 2010 12:31:08 -0700 Subject: Reverted changeset 2bb10eae42bf --- indra/newview/llimview.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 21313f9df7..a2b72e7d74 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1022,14 +1022,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text, } else { - // IM_SESSION_INVITE means that this is an Ad-hoc incoming chat - // (it can be also Group chat but it is checked above) - // In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added - // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. - // Concrete participants will be added into this list once they sent message in chat. - if (IM_SESSION_INVITE == dialog) return; - - // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it!=session->mInitialTargetIDs.end();++it) { -- cgit v1.2.3 From e730c677499842d00dd0afd613ab14b83ed14552 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 29 Jul 2010 10:29:23 +0300 Subject: EXT-8429 FIXED Added a workaround to localize server hardcoded "Conference" string for incoming ad-hoc chats. Added a new string "conference-title-incoming" to strings.xml For now the "Conference" word is localized wherever this session name is shown: * IM window title * Voice notifications Further Localization is out of scope of this ticket and will be done in a separate localization cycle. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/816/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 21313f9df7..9d88c156d3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -237,6 +237,25 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT); } + // *WORKAROUND: for server hard-coded string in indra\newsim\llsimchatterbox.cpp + if (isAdHocSessionType() && IM_SESSION_INVITE == type) + { + // For an ad-hoc incoming chat name is received from the server and is in a form of " Conference" + // Lets update it to localize the "Conference" word. See EXT-8429. + S32 separator_index = mName.rfind(" "); + std::string name = mName.substr(0, separator_index); + ++separator_index; + std::string conference_word = mName.substr(separator_index, mName.length()); + + // additional check that session name is what we expected + if ("Conference" == conference_word) + { + LLStringUtil::format_map_t args; + args["[AGENT_NAME]"] = name; + LLTrans::findString(mName, "conference-title-incoming", args); + } + } + if (IM_NOTHING_SPECIAL == type) { mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID); -- cgit v1.2.3 From 566e3969f98c7ac10fe151ba119a78ac5eda2e3c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 30 Jul 2010 10:02:30 -0700 Subject: deprecated LLPanel::child*() methods --- indra/newview/llimview.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 21313f9df7..d2bddfdd9a 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1709,12 +1709,12 @@ void LLOutgoingCallDialog::show(const LLSD& key) old_caller_name = LLTextUtil::formatPhoneNumber(old_caller_name); } - childSetTextArg("leaving", "[CURRENT_CHAT]", old_caller_name); + getChild("leaving")->setTextArg("[CURRENT_CHAT]", old_caller_name); show_oldchannel = true; } else { - childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); + getChild("leaving")->setTextArg("[CURRENT_CHAT]", getString("localchat")); } if (!mPayload["disconnected_channel_name"].asString().empty()) @@ -1724,16 +1724,16 @@ void LLOutgoingCallDialog::show(const LLSD& key) { channel_name = LLTextUtil::formatPhoneNumber(channel_name); } - childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name); + getChild("nearby")->setTextArg("[VOICE_CHANNEL_NAME]", channel_name); // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) bool voice_works = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); - childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); + getChild("nearby")->setTextArg("[RECONNECT_NEARBY]", reconnect_nearby); const std::string& nearby_str = mPayload["ended_by_agent"] ? NEARBY_P2P_BY_AGENT : NEARBY_P2P_BY_OTHER; - childSetTextArg(nearby_str, "[RECONNECT_NEARBY]", reconnect_nearby); + getChild(nearby_str)->setTextArg("[RECONNECT_NEARBY]", reconnect_nearby); } std::string callee_name = mPayload["session_name"].asString(); @@ -1753,8 +1753,8 @@ void LLOutgoingCallDialog::show(const LLSD& key) setTitle(callee_name); LLSD callee_id = mPayload["other_user_id"]; - childSetTextArg("calling", "[CALLEE_NAME]", callee_name); - childSetTextArg("connecting", "[CALLEE_NAME]", callee_name); + getChild("calling")->setTextArg("[CALLEE_NAME]", callee_name); + getChild("connecting")->setTextArg("[CALLEE_NAME]", callee_name); // for outgoing group calls callee_id == group id == session id setIcon(callee_id, callee_id); @@ -1939,7 +1939,7 @@ BOOL LLIncomingCallDialog::postBuild() //it's not possible to connect to existing Ad-Hoc/Group chat through incoming ad-hoc call //and no IM for avaline - childSetVisible("Start IM", is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); + getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); setCanDrag(FALSE); @@ -1963,12 +1963,12 @@ void LLIncomingCallDialog::onOpen(const LLSD& key) if (voice && !voice->getSessionName().empty()) { args["[CURRENT_CHAT]"] = voice->getSessionName(); - childSetText("question", getString(key["question_type"].asString(), args)); + getChild("question")->setValue(getString(key["question_type"].asString(), args)); } else { args["[CURRENT_CHAT]"] = getString("localchat"); - childSetText("question", getString(key["question_type"].asString(), args)); + getChild("question")->setValue(getString(key["question_type"].asString(), args)); } } -- cgit v1.2.3 From 15247f086989a43881d79c1ee5416bb00721eb68 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Jul 2010 14:22:14 -0700 Subject: Backed out changeset: 58571b4e704b --- indra/newview/llimview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a2b72e7d74..21313f9df7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1022,6 +1022,14 @@ void LLIMModel::sendMessage(const std::string& utf8_text, } else { + // IM_SESSION_INVITE means that this is an Ad-hoc incoming chat + // (it can be also Group chat but it is checked above) + // In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added + // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. + // Concrete participants will be added into this list once they sent message in chat. + if (IM_SESSION_INVITE == dialog) return; + + // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it!=session->mInitialTargetIDs.end();++it) { -- cgit v1.2.3 From 06b0d72efa96b6a0ed665f7cd46f358c48929e7b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Aug 2010 07:24:57 -0400 Subject: Change license from GPL to LGPL (version 2.1) --- indra/newview/llimview.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 21313f9df7..f748603bfa 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2,31 +2,25 @@ * @file LLIMMgr.cpp * @brief Container for Instant Messaging * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3 From b091125a0e53bef47bd968be78b55150807595ed Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 19 Aug 2010 15:11:37 +0300 Subject: EXT-8658 FIXED Made only online participants of Adhoc chat to be shown shown in Recent Tab. Used previously commented code which adds only online paricipants instead of current code that added all. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/860/ --HG-- branch : product-engine --- indra/newview/llimview.cpp | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cd35ec5d39..41e505cc58 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1021,19 +1021,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if (is_not_group_id) { - -#if 0 - //use this code to add only online members - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); - LLSpeakerMgr::speaker_list_t speaker_list; - speaker_mgr->getSpeakerList(&speaker_list, true); - for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) - { - const LLPointer& speakerp = *it; - - LLRecentPeople::instance().add(speakerp->mID); - } -#else LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(im_session_id); if( session == 0)//??? shouldn't really happen { @@ -1048,16 +1035,20 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; - // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. - for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); - it!=session->mInitialTargetIDs.end();++it) + // Add only online members to recent (EXT-8658) + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); + LLSpeakerMgr::speaker_list_t speaker_list; + if(speaker_mgr != NULL) + { + speaker_mgr->getSpeakerList(&speaker_list, true); + } + for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { - const LLUUID id = *it; + const LLPointer& speakerp = *it; - LLRecentPeople::instance().add(id); + LLRecentPeople::instance().add(speakerp->mID); } } -#endif } -- cgit v1.2.3 From 98cc2365034a93c69704daa69efb389799cc9627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 18:44:39 +0100 Subject: Backed out changeset a62bf7c0af21 Backing out this merge that I pushed (prematurely) to the wrong place. --- indra/newview/llimview.cpp | 68 ++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 39 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b00a663a9a..f748603bfa 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -231,25 +231,6 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT); } - // *WORKAROUND: for server hard-coded string in indra\newsim\llsimchatterbox.cpp - if (isAdHocSessionType() && IM_SESSION_INVITE == type) - { - // For an ad-hoc incoming chat name is received from the server and is in a form of " Conference" - // Lets update it to localize the "Conference" word. See EXT-8429. - S32 separator_index = mName.rfind(" "); - std::string name = mName.substr(0, separator_index); - ++separator_index; - std::string conference_word = mName.substr(separator_index, mName.length()); - - // additional check that session name is what we expected - if ("Conference" == conference_word) - { - LLStringUtil::format_map_t args; - args["[AGENT_NAME]"] = name; - LLTrans::findString(mName, "conference-title-incoming", args); - } - } - if (IM_NOTHING_SPECIAL == type) { mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID); @@ -1015,6 +996,19 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if (is_not_group_id) { + +#if 0 + //use this code to add only online members + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); + LLSpeakerMgr::speaker_list_t speaker_list; + speaker_mgr->getSpeakerList(&speaker_list, true); + for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) + { + const LLPointer& speakerp = *it; + + LLRecentPeople::instance().add(speakerp->mID); + } +#else LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(im_session_id); if( session == 0)//??? shouldn't really happen { @@ -1029,20 +1023,16 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; - // Add only online members to recent (EXT-8658) - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); - LLSpeakerMgr::speaker_list_t speaker_list; - if(speaker_mgr != NULL) - { - speaker_mgr->getSpeakerList(&speaker_list, true); - } - for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) + // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. + for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); + it!=session->mInitialTargetIDs.end();++it) { - const LLPointer& speakerp = *it; + const LLUUID id = *it; - LLRecentPeople::instance().add(speakerp->mID); + LLRecentPeople::instance().add(id); } } +#endif } @@ -1713,12 +1703,12 @@ void LLOutgoingCallDialog::show(const LLSD& key) old_caller_name = LLTextUtil::formatPhoneNumber(old_caller_name); } - getChild("leaving")->setTextArg("[CURRENT_CHAT]", old_caller_name); + childSetTextArg("leaving", "[CURRENT_CHAT]", old_caller_name); show_oldchannel = true; } else { - getChild("leaving")->setTextArg("[CURRENT_CHAT]", getString("localchat")); + childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); } if (!mPayload["disconnected_channel_name"].asString().empty()) @@ -1728,16 +1718,16 @@ void LLOutgoingCallDialog::show(const LLSD& key) { channel_name = LLTextUtil::formatPhoneNumber(channel_name); } - getChild("nearby")->setTextArg("[VOICE_CHANNEL_NAME]", channel_name); + childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name); // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) bool voice_works = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); - getChild("nearby")->setTextArg("[RECONNECT_NEARBY]", reconnect_nearby); + childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); const std::string& nearby_str = mPayload["ended_by_agent"] ? NEARBY_P2P_BY_AGENT : NEARBY_P2P_BY_OTHER; - getChild(nearby_str)->setTextArg("[RECONNECT_NEARBY]", reconnect_nearby); + childSetTextArg(nearby_str, "[RECONNECT_NEARBY]", reconnect_nearby); } std::string callee_name = mPayload["session_name"].asString(); @@ -1757,8 +1747,8 @@ void LLOutgoingCallDialog::show(const LLSD& key) setTitle(callee_name); LLSD callee_id = mPayload["other_user_id"]; - getChild("calling")->setTextArg("[CALLEE_NAME]", callee_name); - getChild("connecting")->setTextArg("[CALLEE_NAME]", callee_name); + childSetTextArg("calling", "[CALLEE_NAME]", callee_name); + childSetTextArg("connecting", "[CALLEE_NAME]", callee_name); // for outgoing group calls callee_id == group id == session id setIcon(callee_id, callee_id); @@ -1943,7 +1933,7 @@ BOOL LLIncomingCallDialog::postBuild() //it's not possible to connect to existing Ad-Hoc/Group chat through incoming ad-hoc call //and no IM for avaline - getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); + childSetVisible("Start IM", is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); setCanDrag(FALSE); @@ -1967,12 +1957,12 @@ void LLIncomingCallDialog::onOpen(const LLSD& key) if (voice && !voice->getSessionName().empty()) { args["[CURRENT_CHAT]"] = voice->getSessionName(); - getChild("question")->setValue(getString(key["question_type"].asString(), args)); + childSetText("question", getString(key["question_type"].asString(), args)); } else { args["[CURRENT_CHAT]"] = getString("localchat"); - getChild("question")->setValue(getString(key["question_type"].asString(), args)); + childSetText("question", getString(key["question_type"].asString(), args)); } } -- cgit v1.2.3