From 484cbc524fd6c182fff6b0f5089b542be3a0174b Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 1 Feb 2010 15:37:24 +0200 Subject: fixed EXT-4775 Plain text mode broken in IM windows --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 9e52d4c6c2..1839a1ef86 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -585,6 +585,9 @@ void LLIMFloater::updateMessages() { // LLUIColor chat_color = LLUIColorTable::instance().getColor("IMChatColor"); + LLSD chat_args; + chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history; + std::ostringstream message; std::list::const_reverse_iterator iter = messages.rbegin(); std::list::const_reverse_iterator iter_end = messages.rend(); @@ -614,7 +617,7 @@ void LLIMFloater::updateMessages() chat.mText = message; } - mChatHistory->appendMessage(chat, use_plain_text_chat_history); + mChatHistory->appendMessage(chat, chat_args); mLastMessageIndex = msg["index"].asInteger(); } } -- cgit v1.2.3 From 379762d2c1dd4e0804dd6ab1b930f525e1a60189 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 1 Feb 2010 15:37:03 +0200 Subject: Fixed normal bug EXT-4772 - No new IM notification when in tabbed IM mode. --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 14 ++++++++++++++ indra/newview/llimfloater.h | 1 + 2 files changed, 15 insertions(+) (limited to 'indra') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 1839a1ef86..4a18c8640f 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -510,6 +510,20 @@ void LLIMFloater::setVisible(BOOL visible) } } +BOOL LLIMFloater::getVisible() +{ + if(isChatMultiTab()) + { + LLIMFloaterContainer* im_container = LLIMFloaterContainer::getInstance(); + // Tabbed IM window is "visible" when we minimize it. + return !im_container->isMinimized() && im_container->getVisible(); + } + else + { + return LLTransientDockableFloater::getVisible(); + } +} + //static bool LLIMFloater::toggle(const LLUUID& session_id) { diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 9552b30737..2f034d02b8 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -58,6 +58,7 @@ public: // LLView overrides /*virtual*/ BOOL postBuild(); /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ BOOL getVisible(); // Check typing timeout timer. /*virtual*/ void draw(); -- cgit v1.2.3 From 3650ef0d9ff937aeb1081817158021adb3f081d2 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Mon, 1 Feb 2010 16:30:48 +0200 Subject: fix for normal EXT-4512 [BSI] Can't minimize Mini-Map actually this has nothing with original bug description so...fix map and text pos on map resize --HG-- branch : product-engine --- indra/newview/llfloatermap.cpp | 4 +-- indra/newview/skins/default/xui/en/floater_map.xml | 40 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 568f4b254e..051ab585e2 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -142,8 +142,8 @@ void LLFloaterMap::setDirectionPos( LLTextBox* text_box, F32 rotation ) // Rotation is in radians. // Rotation of 0 means x = 1, y = 0 on the unit circle. - F32 map_half_height = (F32)(getRect().getHeight() / 2); - F32 map_half_width = (F32)(getRect().getWidth() / 2); + F32 map_half_height = (F32)(getRect().getHeight() / 2) - getHeaderHeight()/2; + F32 map_half_width = (F32)(getRect().getWidth() / 2) ; F32 text_half_height = (F32)(text_box->getRect().getHeight() / 2); F32 text_half_width = (F32)(text_box->getRect().getWidth() / 2); F32 radius = llmin( map_half_height - text_half_height, map_half_width - text_half_width ); diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index 3ddb7bc349..1903e7c714 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -6,7 +6,7 @@ center_horiz="true" center_vert="true" follows="top|right" - height="225" + height="218" layout="topleft" min_height="60" min_width="174" @@ -55,116 +55,116 @@ + width="200" + height="200" + top="18"/> + top="209"> N + top="209"> E + top="195"> W + top="209"> S + top="209"> SE + top="209"> NE + top="209"> SW + top="209"> NW -- cgit v1.2.3 From e43d0f18150ee2fae4c1533e643ace5d7e5813f2 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 1 Feb 2010 16:51:34 +0200 Subject: fixed EXT-4779 Notifications about objects are saved into ".txt" or "{nobody}.txt" instead of "chat.txt" file --HG-- branch : product-engine --- indra/newview/llnotificationhandlerutil.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 16218f6d53..e2a748a1c5 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -153,7 +153,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi { const std::string name = LLHandlerUtil::getSubstitutionName(notification); - const std::string session_name = notification->getPayload().has( + std::string session_name = notification->getPayload().has( "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; // don't create IM p2p session with objects, it's necessary condition to log @@ -162,6 +162,12 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi { LLUUID from_id = notification->getPayload()["from_id"]; + //*HACK for ServerObjectMessage the sesson name is really weird, see EXT-4779 + if (SERVER_OBJECT_MESSAGE == notification->getName()) + { + session_name = "chat"; + } + if(to_file_only) { logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(), -- cgit v1.2.3 From c8621274eef9b4ef2a9a4bf2a3f338ddc141935a Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Mon, 1 Feb 2010 17:23:25 +0200 Subject: fix low EXT-3807 ABOUT LAND/OBJECTS: (i) icon is badly positioned --HG-- branch : product-engine --- indra/newview/llnamelistctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 9f04558d50..8c875c9b63 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -162,7 +162,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) localRectToScreen(cell_rect, &sticky_rect); // Spawn at right side of cell - LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop ); + LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop + (sticky_rect.getHeight()-16)/2 ); LLPointer icon = LLUI::getUIImage("Info_Small"); // Should we show a group or an avatar inspector? -- cgit v1.2.3 From d5e97617c661dd3518ef1caa6903867ad044df8d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 1 Feb 2010 17:48:25 +0200 Subject: Fixed major bug EXT-4782 (Viewer crashes if end ad-hoc voice chat by 'End session' context commant of chiclet) - reason: indicator on ad-hoc chiclets is changed its speaker UUID that leads to registering the same instances several times in the SpeakingIndicatorManager. This leads to crash after instance is destroyed because the only one (specified by UUID in unregisterSpeakingIndicator()) is removed from the map. So, using stored deleted pointer leads to crash. See EXT-4782. - fix: prevent regestering the same instance of indicator by removing existing one in LLOutputMonitorCtrl::setSpeakerId. Also added check in SpeakingIndicatorManager to prevent such situation in the future with an appropriate warning & assert. --HG-- branch : product-engine --- indra/newview/lloutputmonitorctrl.cpp | 5 ++++ indra/newview/llspeakingindicatormanager.cpp | 41 +++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index f816dc589d..388fdeea7a 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -251,6 +251,11 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) { if (speaker_id.isNull() || speaker_id == mSpeakerId) return; + if (mSpeakerId.notNull()) + { + // Unregister previous registration to avoid crash. EXT-4782. + LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this); + } mSpeakerId = speaker_id; LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 5e1d408e8d..d33c050ee4 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -113,6 +113,13 @@ private: */ void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on); + /** + * Ensures that passed instance of Speaking Indicator does not exist among registered ones. + * If yes, it will be removed. + */ + void ensureInstanceDoesNotExist(LLSpeakingIndicator* const speaking_indicator); + + /** * Multimap with all registered speaking indicators */ @@ -135,7 +142,11 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i { // do not exclude agent's indicators. They should be processed in the same way as others. See EXT-3889. - LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << LL_ENDL; + LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << "|"<< speaking_indicator << LL_ENDL; + + + ensureInstanceDoesNotExist(speaking_indicator); + speaking_indicator_value_t value_type(speaker_id, speaking_indicator); mSpeakingIndicators.insert(value_type); @@ -148,12 +159,14 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i void SpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator) { + LL_DEBUGS("SpeakingIndicator") << "Unregistering indicator: " << speaker_id << "|"<< speaking_indicator << LL_ENDL; speaking_indicators_mmap_t::iterator it; it = mSpeakingIndicators.find(speaker_id); for (;it != mSpeakingIndicators.end(); ++it) { if (it->second == speaking_indicator) { + LL_DEBUGS("SpeakingIndicator") << "Unregistered." << LL_ENDL; mSpeakingIndicators.erase(it); break; } @@ -231,6 +244,32 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea } } +void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* const speaking_indicator) +{ + LL_DEBUGS("SpeakingIndicator") << "Searching for an registered indicator instance: " << speaking_indicator << LL_ENDL; + speaking_indicators_mmap_t::iterator it = mSpeakingIndicators.begin(); + for (;it != mSpeakingIndicators.end(); ++it) + { + if (it->second == speaking_indicator) + { + LL_DEBUGS("SpeakingIndicator") << "Found" << LL_ENDL; + break; + } + } + + // It is possible with LLOutputMonitorCtrl the same instance of indicator is registered several + // times with different UUIDs. This leads to crash after instance is destroyed because the + // only one (specified by UUID in unregisterSpeakingIndicator()) is removed from the map. + // So, using stored deleted pointer leads to crash. See EXT-4782. + if (it != mSpeakingIndicators.end()) + { + llwarns << "The same instance of indicator has already been registered, removing it: " << it->first << "|"<< speaking_indicator << llendl; + llassert(it == mSpeakingIndicators.end()); + mSpeakingIndicators.erase(it); + } +} + + /************************************************************************/ /* LLSpeakingIndicatorManager namespace implementation */ /************************************************************************/ -- cgit v1.2.3 From 7bcba326b32e1aca678edfb4495d1e2d4d44cb71 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 1 Feb 2010 18:25:58 +0200 Subject: Fixed major bug EXT-4798 (Voice notifications steal keyboard focus by default) --HG-- branch : product-engine --- indra/llui/lldockablefloater.cpp | 2 +- indra/llui/llfloater.h | 1 + indra/newview/llimview.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 74438b184a..57baf28dab 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -146,7 +146,7 @@ void LLDockableFloater::setVisible(BOOL visible) if (visible) { - LLFloater::setFrontmost(TRUE); + LLFloater::setFrontmost(getAutoFocus()); } LLFloater::setVisible(visible); } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 8c9dacbd20..2166d8db8a 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -301,6 +301,7 @@ protected: const LLRect& getExpandedRect() const { return mExpandedRect; } void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened + BOOL getAutoFocus() const { return mAutoFocus; } LLDragHandle* getDragHandle() const { return mDragHandle; } void destroy() { die(); } // Don't call this directly. You probably want to call closeFloater() diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b7d4db853e..db6b2041f8 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1467,6 +1467,7 @@ LLCallDialog::LLCallDialog(const LLSD& payload) mPayload(payload), mLifetime(DEFAULT_LIFETIME) { + setAutoFocus(FALSE); } void LLCallDialog::getAllowedRect(LLRect& rect) @@ -1794,7 +1795,7 @@ BOOL LLIncomingCallDialog::postBuild() childSetAction("Accept", onAccept, this); childSetAction("Reject", onReject, this); childSetAction("Start IM", onStartIM, this); - childSetFocus("Accept"); + setDefaultBtn("Accept"); std::string notify_box_type = mPayload["notify_box_type"].asString(); if(notify_box_type != "VoiceInviteGroup" && notify_box_type != "VoiceInviteAdHoc") @@ -2424,7 +2425,7 @@ void LLIMMgr::inviteToSession( } else { - LLFloaterReg::showInstance("incoming_call", payload, TRUE); + LLFloaterReg::showInstance("incoming_call", payload, FALSE); } mPendingInvitations[session_id.asString()] = LLSD(); } @@ -2437,7 +2438,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri std::string notify_box_type = payload["notify_box_type"].asString(); - LLFloaterReg::showInstance("incoming_call", payload, TRUE); + LLFloaterReg::showInstance("incoming_call", payload, FALSE); } //*TODO disconnects all sessions -- cgit v1.2.3