From 9757cd64e19209484333ff8d07aa86fcccaf22f6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 10 Mar 2010 14:04:36 +0200 Subject: fixed EXT-4872 'Loading...' message remains in ad-hoc IM floated opened by 'Start IM' button added timing out of session initialization (after 30 seconds) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 77e3012d26..1641e2a0e2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -80,6 +80,9 @@ const static std::string ADHOC_NAME_SUFFIX(" Conference"); const static std::string NEARBY_P2P_BY_OTHER("nearby_P2P_by_other"); const static std::string NEARBY_P2P_BY_AGENT("nearby_P2P_by_agent"); +/** Timeout of outgoing session initialization (in seconds) */ +const static U32 SESSION_INITIALIZATION_TIMEOUT = 30; + std::string LLCallDialogManager::sPreviousSessionlName = ""; LLIMModel::LLIMSession::SType LLCallDialogManager::sPreviousSessionType = LLIMModel::LLIMSession::P2P_SESSION; std::string LLCallDialogManager::sCurrentSessionlName = ""; @@ -91,6 +94,19 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141 // LLIMMgr* gIMMgr = NULL; + +BOOL LLSessionTimeoutTimer::tick() +{ + if (mSessionId.isNull()) return TRUE; + + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); + if (session && !session->mSessionInitialized) + { + gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId); + } + return TRUE; +} + void toast_callback(const LLSD& msg){ // do not show toast in busy mode or it goes from agent if (gAgent.getBusy() || gAgent.getID() == msg["from_id"]) @@ -214,6 +230,11 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& //so we're already initialized mSessionInitialized = true; } + else + { + //tick returns TRUE - timer will be deleted after the tick + new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT); + } if (IM_NOTHING_SPECIAL == type) { -- cgit v1.2.3 From 3f3c9c7e255e090c7f09dafd08ec20f2d8a09c6d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 26 Mar 2010 17:08:32 +0200 Subject: Fixed normal bug EXT-5116 (Voice notification should display on top of IM window, not under.) Replaced sending voice notifications to front (in floater view) with adding them to popup view. In this case Voice Notifications are shown on top even IM window has focus. And Resident can continue enter the text when Voice notification is shown. Reviewad by Vadim at https://codereview.productengine.com/secondlife/r/120/ --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 288895be8c..389917a6f7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1559,6 +1559,11 @@ LLCallDialog::LLCallDialog(const LLSD& payload) setDocked(true); } +LLCallDialog::~LLCallDialog() +{ + LLUI::removePopup(this); +} + void LLCallDialog::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectScaled(); @@ -1612,7 +1617,7 @@ void LLCallDialog::onOpen(const LLSD& key) LLDockableFloater::onOpen(key); // it should be over the all floaters. EXT-5116 - gFloaterView->bringToFront(this, FALSE); + LLUI::addPopup(this); } void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) -- cgit v1.2.3