From b544e125a4015550faf274904ac6d049e5fe5760 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 26 Oct 2009 08:16:20 +0200 Subject: IM minor refactoring: removed unused LLIMMgr::isIMSessionOpen(...) - duplicate of LLIMMgr::hasSession(...) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b631c991ae..8d72ffdfcc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1458,15 +1458,6 @@ BOOL LLIMMgr::getIMReceived() const return mIMReceived; } -// This method returns TRUE if the local viewer has a session -// currently open keyed to the uuid. -BOOL LLIMMgr::isIMSessionOpen(const LLUUID& uuid) -{ - LLFloaterIMPanel* floater = findFloaterBySession(uuid); - if(floater) return TRUE; - return FALSE; -} - LLUUID LLIMMgr::addP2PSession(const std::string& name, const LLUUID& other_participant_id, const std::string& voice_session_handle, -- cgit v1.2.3 From e018754f7e94be57dec9f7f8c341caa39643c277 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 26 Oct 2009 13:05:08 +0200 Subject: IM: removed unused & empty methods and classes, added TODO marks --HG-- branch : product-engine --- indra/newview/llimview.cpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8d72ffdfcc..fa7e1170be 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1114,29 +1114,6 @@ void LLIncomingCallDialog::processCallResponse(S32 response) } } -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLIMViewFriendObserver -// -// Bridge to suport knowing when the inventory has changed. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLIMViewFriendObserver : public LLFriendObserver -{ -public: - LLIMViewFriendObserver(LLIMMgr* tv) : mTV(tv) {} - virtual ~LLIMViewFriendObserver() {} - virtual void changed(U32 mask) - { - if(mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE)) - { - mTV->refresh(); - } - } -protected: - LLIMMgr* mTV; -}; - - bool inviteUserResponse(const LLSD& notification, const LLSD& response) { const LLSD& payload = notification["payload"]; @@ -1237,7 +1214,6 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) // LLIMMgr::LLIMMgr() : - mFriendObserver(NULL), mIMReceived(FALSE) { static bool registered_dialog = false; @@ -1246,21 +1222,11 @@ LLIMMgr::LLIMMgr() : LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); registered_dialog = true; } - - mFriendObserver = new LLIMViewFriendObserver(this); - LLAvatarTracker::instance().addObserver(mFriendObserver); mPendingInvitations = LLSD::emptyMap(); mPendingAgentListUpdates = LLSD::emptyMap(); } -LLIMMgr::~LLIMMgr() -{ - LLAvatarTracker::instance().removeObserver(mFriendObserver); - delete mFriendObserver; - // Children all cleaned up by default view destructor. -} - // Add a message to a session. void LLIMMgr::addMessage( const LLUUID& session_id, @@ -1714,10 +1680,6 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri } } -void LLIMMgr::refresh() -{ -} - void LLIMMgr::disconnectAllSessions() { LLFloaterIMPanel* floater = NULL; -- cgit v1.2.3 From d81b8884109cbeacf211282b0a08aa3aea425294 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 26 Oct 2009 16:41:47 +0200 Subject: IM: fixed remove session logic, got rid of "being session removed" field --HG-- branch : product-engine --- indra/newview/llimview.cpp | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fa7e1170be..593f3a1e82 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1405,10 +1405,7 @@ S32 LLIMMgr::getNumberOfUnreadIM() S32 num = 0; for(it = LLIMModel::sSessionsMap.begin(); it != LLIMModel::sSessionsMap.end(); ++it) { - if((*it).first != mBeingRemovedSessionID) - { - num += (*it).second->mNumUnread; - } + num += (*it).second->mNumUnread; } return num; @@ -1517,41 +1514,25 @@ bool LLIMMgr::leaveSession(const LLUUID& session_id) return true; } -// This removes the panel referenced by the uuid, and then restores -// internal consistency. The internal pointer is not deleted? Did you mean -// a pointer to the corresponding LLIMSession? Session data is cleared now. -// Put a copy of UUID to avoid problem when passed reference becames invalid -// if it has been come from the object removed in observer. -void LLIMMgr::removeSession(LLUUID session_id) +// Removes data associated with a particular session specified by session_id +void LLIMMgr::removeSession(const LLUUID& session_id) { - if (mBeingRemovedSessionID == session_id) - { - return; - } + llassert_always(hasSession(session_id)); + //*TODO remove this floater thing when Communicate Floater is being deleted (IB) LLFloaterIMPanel* floater = findFloaterBySession(session_id); if(floater) { mFloaters.erase(floater->getHandle()); LLFloaterChatterBox::getInstance()->removeFloater(floater); - //mTabContainer->removeTabPanel(floater); - - clearPendingInvitation(session_id); - clearPendingAgentListUpdates(session_id); } - // for some purposes storing ID of a sessios that is being removed - mBeingRemovedSessionID = session_id; - notifyObserverSessionRemoved(session_id); + clearPendingInvitation(session_id); + clearPendingAgentListUpdates(session_id); - //if we don't clear session data on removing the session - //we can't use LLBottomTray as observer of session creation/delettion and - //creating chiclets only on session created even, we need to handle chiclets creation - //the same way as LLFloaterIMPanels were managed. LLIMModel::getInstance()->clearSession(session_id); - // now this session is completely removed - mBeingRemovedSessionID.setNull(); + notifyObserverSessionRemoved(session_id); } void LLIMMgr::inviteToSession( -- cgit v1.2.3 From f22f829b8642d59cb5953eb33f5297a1da90fadd Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 26 Oct 2009 17:14:32 +0200 Subject: Fixed normal bugs EXT-1628 ([BSI] - New IM system isn't sending typing notifications anymore) and EXT-1629 ([BSI] - add hint in IM window when Resident is typing) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fa7e1170be..f8d794e967 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1991,6 +1991,12 @@ void LLIMMgr::processIMTypingCore(const LLIMInfo* im_info, BOOL typing) { floater->processIMTyping(im_info, typing); } + + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + if ( im_floater ) + { + im_floater->processIMTyping(im_info, typing); + } } class LLViewerChatterBoxSessionStartReply : public LLHTTPNode -- cgit v1.2.3 From e931d2d6f1a7d981bebf07b1d089fa4751096830 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 26 Oct 2009 17:33:28 +0200 Subject: IM refac.: replaced passing copies by passing references, moved some IMModel private, added documentation --HG-- branch : product-engine --- indra/newview/llimview.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 593f3a1e82..439f0b3d1e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -272,7 +272,8 @@ void LLIMModel::testMessages() } -bool LLIMModel::newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id, const std::vector& ids) +bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, + const LLUUID& other_participant_id, const std::vector& ids) { if (is_in_map(sSessionsMap, session_id)) { @@ -289,7 +290,7 @@ bool LLIMModel::newSession(LLUUID session_id, std::string name, EInstantMessage } -bool LLIMModel::clearSession(LLUUID session_id) +bool LLIMModel::clearSession(const LLUUID& session_id) { if (sSessionsMap.find(session_id) == sSessionsMap.end()) return false; delete (sSessionsMap[session_id]); @@ -297,16 +298,13 @@ bool LLIMModel::clearSession(LLUUID session_id) return true; } -//*TODO remake it, instead of returing the list pass it as as parameter (IB) -std::list LLIMModel::getMessages(LLUUID session_id, int start_index) +void LLIMModel::getMessages(const LLUUID& session_id, std::list& messages, int start_index) { - std::list return_list; - LLIMSession* session = findIMSession(session_id); if (!session) { llwarns << "session " << session_id << "does not exist " << llendl; - return return_list; + return; } int i = session->mMsgs.size() - start_index; @@ -317,7 +315,7 @@ std::list LLIMModel::getMessages(LLUUID session_id, int start_index) { LLSD msg; msg = *iter; - return_list.push_back(*iter); + messages.push_back(*iter); i--; } @@ -327,14 +325,9 @@ std::list LLIMModel::getMessages(LLUUID session_id, int start_index) arg["session_id"] = session_id; arg["num_unread"] = 0; mNoUnreadMsgsSignal(arg); - - // TODO: in the future is there a more efficient way to return these - //of course there is - return as parameter (IB) - return return_list; - } -bool LLIMModel::addToHistory(LLUUID session_id, std::string from, LLUUID from_id, std::string utf8_text) { +bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { LLIMSession* session = findIMSession(session_id); @@ -383,8 +376,8 @@ bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, con return false; } -//*TODO add const qualifier and pass by references (IB) -bool LLIMModel::addMessage(LLUUID session_id, std::string from, LLUUID from_id, std::string utf8_text, bool log2file /* = true */) { +bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file /* = true */) { LLIMSession* session = findIMSession(session_id); if (!session) @@ -506,7 +499,7 @@ void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, gAgent.sendReliableMessage(); } -void LLIMModel::sendLeaveSession(LLUUID session_id, LLUUID other_participant_id) +void LLIMModel::sendLeaveSession(const LLUUID& session_id, const LLUUID& other_participant_id) { if(session_id.notNull()) { -- cgit v1.2.3 From e874fbc8f052e3a7a16d4b4d61a35a4c49dab1cd Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 26 Oct 2009 18:05:00 +0200 Subject: IM: got rid of old im floater dependency in LLIMMgr::addMessage(...) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 7414ebbbad..59cd9cec86 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1258,7 +1258,8 @@ void LLIMMgr::addMessage( fixed_session_name = session_name; } - if (!LLIMModel::getInstance()->findIMSession(new_session_id)) + bool new_session = !hasSession(session_id); + if (new_session) { LLIMModel::getInstance()->newSession(session_id, fixed_session_name, dialog, other_participant_id); } @@ -1277,15 +1278,16 @@ void LLIMMgr::addMessage( // create IM window as necessary if(!floater) { - - floater = createFloater( new_session_id, other_participant_id, fixed_session_name, dialog, FALSE); + } + if (new_session) + { // When we get a new IM, and if you are a god, display a bit // of information about the source. This is to help liaisons // when answering questions. @@ -1295,7 +1297,7 @@ void LLIMMgr::addMessage( std::ostringstream bonus_info; bonus_info << LLTrans::getString("***")+ " "+ LLTrans::getString("IMParentEstate") + ":" + " " << parent_estate_id - << ((parent_estate_id == 1) ? "," + LLTrans::getString("IMMainland") : "") + << ((parent_estate_id == 1) ? "," + LLTrans::getString("IMMainland") : "") << ((parent_estate_id == 5) ? "," + LLTrans::getString ("IMTeen") : ""); // once we have web-services (or something) which returns -- cgit v1.2.3 From 6222149487d7e241ad7b009dae1f2fa6f69adc5d Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 27 Oct 2009 13:16:44 +0200 Subject: IM refactoring: moved voice channel related classes to its own llvoicechannel.* files from dying llimpanel.* files --HG-- branch : product-engine --- indra/newview/llimview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 59cd9cec86..164da4136f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -70,6 +70,7 @@ #include "llviewerwindow.h" #include "llnotify.h" #include "llviewerregion.h" +#include "llvoicechannel.h" #include "lltrans.h" #include "llrecentpeople.h" -- cgit v1.2.3 From bfc9445563c5ad200ed609bc8ff3edecb2398d28 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 27 Oct 2009 14:29:18 +0200 Subject: Implemented major task EXT-1717 (IM related server responses processing stuff should use new IM floater along with the old one) sub-task of EXT-96 (Viewer 2009: Group IM detail). --HG-- branch : product-engine --- indra/newview/llimview.cpp | 149 +++++++++++++++++++++++++++++++++------------ 1 file changed, 111 insertions(+), 38 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 164da4136f..91891fd98e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -884,20 +884,11 @@ public: { gIMMgr->clearPendingAgentListUpdates(mSessionID); gIMMgr->clearPendingInvitation(mSessionID); - - LLFloaterIMPanel* floaterp = - gIMMgr->findFloaterBySession(mSessionID); - - if ( floaterp ) + if ( 404 == statusNum ) { - if ( 404 == statusNum ) - { - std::string error_string; - error_string = "does not exist"; - - floaterp->showSessionStartError( - error_string); - } + std::string error_string; + error_string = "does not exist"; + gIMMgr->showSessionStartError(error_string, mSessionID); } } } @@ -949,6 +940,106 @@ LLUUID LLIMMgr::computeSessionID( return session_id; } +inline LLFloater* getFloaterBySessionID(const LLUUID session_id) +{ + LLFloater* floater = NULL; + if ( gIMMgr ) + { + floater = dynamic_cast < LLFloater* > + ( gIMMgr->findFloaterBySession(session_id) ); + } + if ( !floater ) + { + floater = dynamic_cast < LLFloater* > + ( LLIMFloater::findInstance(session_id) ); + } + return floater; +} + +void +LLIMMgr::showSessionStartError( + const std::string& error_string, + const LLUUID session_id) +{ + const LLFloater* floater = getFloaterBySessionID (session_id); + if (!floater) return; + + LLSD args; + args["REASON"] = LLTrans::getString(error_string); + args["RECIPIENT"] = floater->getTitle(); + + LLSD payload; + payload["session_id"] = session_id; + + LLNotifications::instance().add( + "ChatterBoxSessionStartError", + args, + payload, + LLIMMgr::onConfirmForceCloseError); +} + +void +LLIMMgr::showSessionEventError( + const std::string& event_string, + const std::string& error_string, + const LLUUID session_id) +{ + const LLFloater* floater = getFloaterBySessionID (session_id); + if (!floater) return; + + LLSD args; + args["REASON"] = + LLTrans::getString(error_string); + args["EVENT"] = + LLTrans::getString(event_string); + args["RECIPIENT"] = floater->getTitle(); + + LLNotifications::instance().add( + "ChatterBoxSessionEventError", + args); +} + +void +LLIMMgr::showSessionForceClose( + const std::string& reason_string, + const LLUUID session_id) +{ + const LLFloater* floater = getFloaterBySessionID (session_id); + if (!floater) return; + + LLSD args; + + args["NAME"] = floater->getTitle(); + args["REASON"] = LLTrans::getString(reason_string); + + LLSD payload; + payload["session_id"] = session_id; + + LLNotifications::instance().add( + "ForceCloseChatterBoxSession", + args, + payload, + LLIMMgr::onConfirmForceCloseError); +} + +//static +bool +LLIMMgr::onConfirmForceCloseError( + const LLSD& notification, + const LLSD& response) +{ + //only 1 option really + LLUUID session_id = notification["payload"]["session_id"]; + + LLFloater* floater = getFloaterBySessionID (session_id); + if ( floater ) + { + floater->closeFloater(FALSE); + } + return false; +} + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIncomingCallDialog //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -2027,15 +2118,8 @@ public: } else { - //throw an error dialog and close the temp session's - //floater - LLFloaterIMPanel* floater = - gIMMgr->findFloaterBySession(temp_session_id); - - if ( floater ) - { - floater->showSessionStartError(body["error"].asString()); - } + //throw an error dialog and close the temp session's floater + gIMMgr->showSessionStartError(body["error"].asString(), temp_session_id); } gIMMgr->clearPendingAgentListUpdates(session_id); @@ -2068,15 +2152,10 @@ public: if ( !success ) { //throw an error dialog - LLFloaterIMPanel* floater = - gIMMgr->findFloaterBySession(session_id); - - if (floater) - { - floater->showSessionEventError( - body["event"].asString(), - body["error"].asString()); - } + gIMMgr->showSessionEventError( + body["event"].asString(), + body["error"].asString(), + session_id); } } }; @@ -2094,13 +2173,7 @@ public: session_id = input["body"]["session_id"].asUUID(); reason = input["body"]["reason"].asString(); - LLFloaterIMPanel* floater = - gIMMgr ->findFloaterBySession(session_id); - - if ( floater ) - { - floater->showSessionForceClose(reason); - } + gIMMgr->showSessionForceClose(reason, session_id); } }; -- cgit v1.2.3 From 3eb7f84b10832d77d8765ea9550108c67c462bcb Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 27 Oct 2009 18:01:41 +0200 Subject: IM: implemented task EXT-1905 (Add "Call" and "End Call" functionality to new IIM Floater) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 164da4136f..8792713423 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -145,7 +145,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mInitialTargetIDs(ids), mVoiceChannel(NULL), mSpeakers(NULL), - mSessionInitialized(false) + mSessionInitialized(false), + mCallBackEnabled(true) { if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { @@ -169,6 +170,11 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& //so we're already initialized mSessionInitialized = true; } + + if (IM_NOTHING_SPECIAL == type) + { + mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID); + } } LLIMModel::LLIMSession::~LLIMSession() -- cgit v1.2.3 From 33af464c441717db855651b70acc4b3636c649a0 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 28 Oct 2009 14:21:36 +0200 Subject: Implemented major sub-task EXT-1904 (New IM floater should handle Session Update) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2e5e23c845..a716145590 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2120,6 +2120,15 @@ public: } } + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + if ( im_floater ) + { + if ( body.has("session_info") ) + { + im_floater->processSessionUpdate(body["session_info"]); + } + } + gIMMgr->clearPendingAgentListUpdates(session_id); } else @@ -2217,11 +2226,17 @@ public: const LLSD& context, const LLSD& input) const { - LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(input["body"]["session_id"].asUUID()); + LLUUID session_id = input["body"]["session_id"].asUUID(); + LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(session_id); if (floaterp) { floaterp->processSessionUpdate(input["body"]["info"]); } + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + if ( im_floater ) + { + im_floater->processSessionUpdate(input["body"]["info"]); + } } }; -- cgit v1.2.3 From a999e50a8ebb3ab641490294d67dbbd6eb0c8898 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 28 Oct 2009 16:14:52 +0200 Subject: Implemented major sub-task EXT-1912 ( Add handling restrictions of PSTN P2P calls in new IM Floaters ) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a716145590..b429ae8cf4 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -146,7 +146,9 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mVoiceChannel(NULL), mSpeakers(NULL), mSessionInitialized(false), - mCallBackEnabled(true) + mCallBackEnabled(true), + mTextIMPossible(true), + mProfileButtonEnabled(true) { if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { @@ -174,6 +176,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& if (IM_NOTHING_SPECIAL == type) { mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID); + mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID); + mProfileButtonEnabled = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionID); } } -- cgit v1.2.3 From 4ca9e28f91446c2da413cc1089105278b60c8453 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 28 Oct 2009 18:44:31 +0200 Subject: No ticket, just renamed mProfileButtonEnabled to mOtherParticipantIsAvatar --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 b429ae8cf4..a2b6ef6aa5 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -148,7 +148,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mSessionInitialized(false), mCallBackEnabled(true), mTextIMPossible(true), - mProfileButtonEnabled(true) + mOtherParticipantIsAvatar(true) { if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { @@ -177,7 +177,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& { mCallBackEnabled = LLVoiceClient::getInstance()->isSessionCallBackPossible(mSessionID); mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID); - mProfileButtonEnabled = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionID); + mOtherParticipantIsAvatar = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionID); } } -- cgit v1.2.3 From e8e5dfeb369d13509bd7631230373dda0c3c7b6a Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 28 Oct 2009 20:12:48 +0200 Subject: Fixed critical bug EXT-1918 - [BSI] Region Messages crash the sender and anyone set busy. NOTE - this is temporary workaround to fix the crash. --HG-- branch : product-engine --- indra/newview/llimview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b429ae8cf4..6af6ff8705 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1363,7 +1363,12 @@ void LLIMMgr::addMessage( bool new_session = !hasSession(session_id); if (new_session) { - LLIMModel::getInstance()->newSession(session_id, fixed_session_name, dialog, other_participant_id); + // *NOTE dzaporozhan + // Workaround for critical bug EXT-1918 + + // *TODO + // Investigate cases when session_id == NULL and find solution to handle those cases + LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id); } floater = findFloaterBySession(new_session_id); -- cgit v1.2.3