From 3036f10e38b6e1529095b4b550e85e003243ce62 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 10 Feb 2010 16:26:28 +0200 Subject: fixed for plain text chat history EXT-5279 Resident Names should Appear in Selected URL Color --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 2 +- indra/newview/llstylemap.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 13a5df353d..3d2ba36959 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -647,7 +647,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() ) { LLStyle::Params link_params(style_params); - link_params.fillFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); + link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); // Convert the name to a hotlink and add to message. mEditor->appendText(chat.mFromName + delimiter, false, link_params); } diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp index 2485563cbc..61705c4eb3 100644 --- a/indra/newview/llstylemap.cpp +++ b/indra/newview/llstylemap.cpp @@ -49,6 +49,7 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source) if (source != LLUUID::null && source != gAgent.getID() ) { style_params.color.control = "HTMLLinkColor"; + style_params.readonly_color.control = "HTMLLinkColor"; style_params.link_href = LLSLURL::buildCommand("agent", source, "inspect"); } @@ -56,6 +57,7 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source) { // Make the resident's own name white and don't make the name clickable. style_params.color = LLColor4::white; + style_params.readonly_color = LLColor4::white; } mMap[source] = style_params; @@ -75,11 +77,13 @@ const LLStyle::Params &LLStyleMap::lookup(const LLUUID& id, const std::string& l if (id != LLUUID::null && !link.empty()) { style_params.color.control = "HTMLLinkColor"; + style_params.readonly_color.control = "HTMLLinkColor"; style_params.link_href = link; } else { style_params.color = LLColor4::white; + style_params.readonly_color = LLColor4::white; } mMap[id] = style_params; } -- cgit v1.2.3 From a1384019635c63df7eef27887f5ad0ccc26937a6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 10 Feb 2010 16:56:12 +0200 Subject: implemented graying out chat history from log - EXT-5102 IM chat from previous sessions should be grayed out --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 3d2ba36959..7a5d8be84a 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -66,6 +66,8 @@ static LLDefaultChildRegistry::Register r("chat_history"); const static std::string NEW_LINE(rawstr_to_utf8("\n")); +const static U32 LENGTH_OF_TIME_STR = std::string("12:00").length(); + // support for secondlife:///app/objectim/{UUID}/ SLapps class LLObjectIMHandler : public LLCommandHandler { @@ -544,6 +546,7 @@ void LLChatHistory::clear() void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params) { bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); @@ -609,6 +612,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL style_params.font.style = "ITALIC"; } + //*HACK we graying out chat history by graying out messages that contains full date in a time string + bool message_from_log = chat.mTimeStr.length() > LENGTH_OF_TIME_STR; + if (message_from_log) + { + style_params.color(LLColor4::grey); + style_params.readonly_color(LLColor4::grey); + } + if (use_plain_text_chat_history) { mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params); @@ -644,7 +655,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mEditor->appendText("" + chat.mFromName + "" + delimiter, false, link_params); } - else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() ) + else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log) { LLStyle::Params link_params(style_params); link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); -- cgit v1.2.3 From 87ec59bf4d8ec41798158e468de0ebfccfdfe66f Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 10 Feb 2010 17:27:39 +0200 Subject: fixed EXT-4953 'i' near resident name in the IM toast opens group inspector --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 7ae2404203..ce4c2bb9d6 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -141,32 +141,6 @@ BOOL LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask) return LLToastPanel::handleToolTip(x, y, mask); } -void LLToastIMPanel::showInspector() -{ - LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionID); - if(!im_session) - { - llwarns << "Invalid IM session" << llendl; - return; - } - - switch(im_session->mSessionType) - { - case LLIMModel::LLIMSession::P2P_SESSION: - LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarID)); - break; - case LLIMModel::LLIMSession::GROUP_SESSION: - LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", mSessionID)); - break; - case LLIMModel::LLIMSession::ADHOC_SESSION: - LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", im_session->mOtherParticipantID)); - break; - default: - llwarns << "Unknown IM session type" << llendl; - break; - } -} - void LLToastIMPanel::spawnNameToolTip() { // Spawn at right side of the name textbox. @@ -176,7 +150,7 @@ void LLToastIMPanel::spawnNameToolTip() LLToolTip::Params params; params.background_visible(false); - params.click_callback(boost::bind(&LLToastIMPanel::showInspector, this)); + params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), FALSE)); params.delay_time(0.0f); // spawn instantly on hover params.image(LLUI::getUIImage("Info_Small")); params.message(""); @@ -201,7 +175,7 @@ void LLToastIMPanel::spawnGroupIconToolTip() LLInspector::Params params; params.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); - params.click_callback(boost::bind(&LLToastIMPanel::showInspector, this)); + params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), FALSE)); params.delay_time(0.100f); params.image(LLUI::getUIImage("Info_Small")); params.message(g_data.mName); -- cgit v1.2.3 From d7140c95e3a667ea5d659802956bc0aa5acfda41 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 10 Feb 2010 17:40:56 +0200 Subject: Fixed low bug EXT-5057 (Warning Message in console on every Group Chat Message recieved) - removed getting an icon commented out in xml. It does not make sense witout image name. --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 7 +++---- indra/newview/skins/default/xui/en/panel_instant_message.xml | 10 ---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index ce4c2bb9d6..cb43beb819 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -188,16 +188,15 @@ void LLToastIMPanel::spawnGroupIconToolTip() void LLToastIMPanel::initIcon() { - LLIconCtrl* sys_msg_icon = getChild("sys_msg_icon"); - mAvatarIcon->setVisible(FALSE); mGroupIcon->setVisible(FALSE); - sys_msg_icon->setVisible(FALSE); mAdhocIcon->setVisible(FALSE); if(mAvatarName->getValue().asString() == SYSTEM_FROM) { - sys_msg_icon->setVisible(TRUE); + // "sys_msg_icon" was disabled by Erica in the changeset: 5109 (85181bc92cbe) + // and "dummy widget" warnings appeared in log. + // It does not make sense to have such image with empty name. Removed for EXT-5057. } else { diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml index a0ad38cf76..34fd3352a3 100644 --- a/indra/newview/skins/default/xui/en/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml @@ -56,16 +56,6 @@ name="adhoc_icon" top="3" width="18" /> - Date: Wed, 10 Feb 2010 20:03:20 +0200 Subject: zmg fix for normal EXT-5245 Cannot create a new line in group notice creation with enter key --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_notices.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 1f16aea2ef..5f46ad7860 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -159,7 +159,6 @@ Maximum 200 per group daily left_pad="3" max_length="511" name="create_message" - text_type="ascii" top_delta="0" width="220" word_wrap="true" /> -- cgit v1.2.3 From 7403d53e68550159cb56e44cc898e337cf672aae Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Wed, 10 Feb 2010 21:42:39 +0200 Subject: Fixed normal bug EXT-4566 ([BSI] private chat end floater reports incorrectly who ended the call) - Added flag to voicechannel which is true when call is ended by agent. - It is sent to imview via signal and used to properly customize text in outgoing call floater. --HG-- branch : product-engine --- indra/newview/llimview.cpp | 20 ++++++++++++++------ indra/newview/llimview.h | 2 +- indra/newview/llvoicechannel.cpp | 11 ++++++++--- indra/newview/llvoicechannel.h | 4 +++- .../skins/default/xui/en/floater_outgoing_call.xml | 13 ++++++++++++- 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 32482a065c..0965cbd0dc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -77,6 +77,9 @@ const static std::string IM_FROM_ID("from_id"); const static std::string NO_SESSION("(IM Session Doesn't Exist)"); 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"); + std::string LLCallDialogManager::sPreviousSessionlName = ""; LLIMModel::LLIMSession::SType LLCallDialogManager::sPreviousSessionType = LLIMModel::LLIMSession::P2P_SESSION; std::string LLCallDialogManager::sCurrentSessionlName = ""; @@ -1372,7 +1375,7 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) } sSession = session; - sSession->mVoiceChannel->setStateChangedCallback(boost::bind(LLCallDialogManager::onVoiceChannelStateChanged, _1, _2, _3)); + sSession->mVoiceChannel->setStateChangedCallback(boost::bind(LLCallDialogManager::onVoiceChannelStateChanged, _1, _2, _3, _4)); if(sCurrentSessionlName != session->mName) { sPreviousSessionlName = sCurrentSessionlName; @@ -1403,7 +1406,7 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) } -void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) +void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction, bool ended_by_agent) { LLSD mCallDialogPayload; LLOutgoingCallDialog* ocd = NULL; @@ -1423,6 +1426,7 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat mCallDialogPayload["state"] = new_state; mCallDialogPayload["disconnected_channel_name"] = sSession->mName; mCallDialogPayload["session_type"] = sSession->mSessionType; + mCallDialogPayload["ended_by_agent"] = ended_by_agent; switch(new_state) { @@ -1618,14 +1622,16 @@ void LLOutgoingCallDialog::show(const LLSD& key) channel_name = LLTextUtil::formatPhoneNumber(channel_name); } childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name); - childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + childSetTextArg("nearby_P2P_by_other", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); // 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(); std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string(); childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby); - childSetTextArg("nearby_P2P", "[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); } std::string callee_name = mPayload["session_name"].asString(); @@ -1680,7 +1686,8 @@ void LLOutgoingCallDialog::show(const LLSD& key) case LLVoiceChannel::STATE_HUNG_UP : if (mPayload["session_type"].asInteger() == LLIMModel::LLIMSession::P2P_SESSION) { - getChild("nearby_P2P")->setVisible(true); + const std::string& nearby_str = mPayload["ended_by_agent"] ? NEARBY_P2P_BY_AGENT : NEARBY_P2P_BY_OTHER; + getChild(nearby_str)->setVisible(true); } else { @@ -1699,7 +1706,8 @@ void LLOutgoingCallDialog::hideAllText() getChild("calling")->setVisible(false); getChild("leaving")->setVisible(false); getChild("connecting")->setVisible(false); - getChild("nearby_P2P")->setVisible(false); + getChild("nearby_P2P_by_other")->setVisible(false); + getChild("nearby_P2P_by_agent")->setVisible(false); getChild("nearby")->setVisible(false); getChild("noanswer")->setVisible(false); } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 21c7626109..ad6cede727 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -452,7 +452,7 @@ public: static void initClass(); static void onVoiceChannelChanged(const LLUUID &session_id); - static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); + static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction, bool ended_by_agent); protected: static std::string sPreviousSessionlName; diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index bb09a18cc3..dfd67d0c38 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -122,7 +122,8 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess mState(STATE_NO_CHANNEL_INFO), mSessionName(session_name), mCallDirection(OUTGOING_CALL), - mIgnoreNextSessionLeave(FALSE) + mIgnoreNextSessionLeave(FALSE), + mCallEndedByAgent(false) { mNotifyArgs["VOICE_CHANNEL_NAME"] = mSessionName; @@ -412,7 +413,7 @@ void LLVoiceChannel::doSetState(const EState& new_state) EState old_state = mState; mState = new_state; if (!mStateChangedCallback.empty()) - mStateChangedCallback(old_state, mState, mCallDirection); + mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent); } //static @@ -779,7 +780,8 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) } else { - // other user hung up + // other user hung up, so we didn't end the call + mCallEndedByAgent = false; } deactivate(); } @@ -810,6 +812,9 @@ void LLVoiceChannelP2P::activate() { if (callStarted()) return; + //call will be counted as ended by user unless this variable is changed in handleStatusChange() + mCallEndedByAgent = true; + LLVoiceChannel::activate(); if (callStarted()) diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index cb86671305..941cccacc3 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -58,7 +58,7 @@ public: OUTGOING_CALL } EDirection; - typedef boost::signals2::signal state_changed_signal_t; + typedef boost::signals2::signal state_changed_signal_t; // on current channel changed signal typedef boost::function channel_changed_callback_t; @@ -122,6 +122,8 @@ protected: std::string mSessionName; LLSD mNotifyArgs; LLSD mCallDialogPayload; + // true if call was ended by agent + bool mCallEndedByAgent; BOOL mIgnoreNextSessionLeave; LLHandle mLoginNotificationHandle; diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index cc9afe4474..2bafd1bdef 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -96,12 +96,23 @@ No Answer. Please try again later. height="40" layout="topleft" left="77" - name="nearby_P2P" + name="nearby_P2P_by_other" top="27" width="315" word_wrap="true"> [VOICE_CHANNEL_NAME] has ended the call. [RECONNECT_NEARBY] + + You have ended the call. [RECONNECT_NEARBY] + Date: Wed, 10 Feb 2010 22:05:37 +0200 Subject: Fixed normal bug (EXT-5111) Mysterious disabled arrow widget on Places tab. --HG-- branch : product-engine --- indra/newview/llpanelplaces.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index c0491cc00f..0855e5ca28 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -1047,14 +1047,13 @@ void LLPanelPlaces::updateVerbs() mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); - mOverflowBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn); + mOverflowBtn->setVisible(is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn); mEditBtn->setVisible(mPlaceInfoType == LANDMARK_INFO_TYPE && !isLandmarkEditModeOn); mSaveBtn->setVisible(isLandmarkEditModeOn); mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); - mOverflowBtn->setEnabled(is_place_info_visible && !is_create_landmark_visible); if (is_place_info_visible) { -- cgit v1.2.3 From 6961a1501f6381ac62cc3b6dee2eff47a5fbf0d6 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 10 Feb 2010 18:40:15 -0800 Subject: build fix --- indra/llui/llconsole.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 331d78da8c..a4f69e7ac1 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -376,7 +376,9 @@ LLConsole::Paragraph::Paragraph (LLWString str, const LLColor4 &color, F32 add_t // static void LLConsole::updateClass() { - for (instance_iter it = beginInstances(); it != endInstances(); ++it) + LLInstanceTrackerScopedGuard guard; + + for (instance_iter it = guard.beginInstances(); it != guard.endInstances(); ++it) { it->update(); } -- cgit v1.2.3 From abae31cb4a26500012663cdc2a06a290ac4e46c9 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 10 Feb 2010 18:31:39 -0800 Subject: Provisional fix for EXT-2939 Restored the call to updateMotions(LLCharacter::HIDDEN_UPDATE) in LLVOAvatar::updateCharacter(). Added a specific fast timer for hidden updates in LLCharacter::updateMotions() to assess how much this will impact performance. Reviewed by Richard. --- indra/llcharacter/llcharacter.cpp | 4 +++- indra/newview/llvoavatar.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 528a7bb4a5..40a9752268 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -181,16 +181,18 @@ void LLCharacter::requestStopMotion( LLMotion* motion) // updateMotions() //----------------------------------------------------------------------------- static LLFastTimer::DeclareTimer FTM_UPDATE_ANIMATION("Update Animation"); +static LLFastTimer::DeclareTimer FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); void LLCharacter::updateMotions(e_update_t update_type) { - LLFastTimer t(FTM_UPDATE_ANIMATION); if (update_type == HIDDEN_UPDATE) { + LLFastTimer t(FTM_UPDATE_HIDDEN_ANIMATION); mMotionController.updateMotionsMinimal(); } else { + LLFastTimer t(FTM_UPDATE_ANIMATION); // unpause if the number of outstanding pause requests has dropped to the initial one if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index afe325856b..cf0808ea5b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3079,7 +3079,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) if (!visible) { - //updateMotions(LLCharacter::HIDDEN_UPDATE); + updateMotions(LLCharacter::HIDDEN_UPDATE); return FALSE; } -- cgit v1.2.3 From 0e035fd9b8090c59cc7388809ebe0bf25b54cd9d Mon Sep 17 00:00:00 2001 From: "Paul Guslisty pguslisty@productengine.com" Date: Thu, 11 Feb 2010 09:41:20 +0200 Subject: Fixed normal bug EXT - 5104 (Remove names from below Profile image in IM windows) - removed LLTextBox containing avatar name from IM control panel(panel_im_control_panel.xml) and corresponding code in LLPanelIMControlPanel --- indra/newview/llpanelimcontrolpanel.cpp | 21 --------------------- indra/newview/llpanelimcontrolpanel.h | 3 --- .../skins/default/xui/en/panel_im_control_panel.xml | 11 +---------- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index cbd6f64a48..8e305a5674 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -224,14 +224,6 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("share_btn", FALSE); childSetEnabled("teleport_btn", FALSE); childSetEnabled("pay_btn", FALSE); - - getChild("avatar_name")->setValue(im_session->mName); - getChild("avatar_name")->setToolTip(im_session->mName); - } - else - { - // If the participant is an avatar, fetch the currect name - gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4)); } } @@ -247,19 +239,6 @@ void LLPanelIMControlPanel::changed(U32 mask) } } -void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) -{ - if ( id == mAvatarID ) - { - std::string avatar_name; - avatar_name.assign(first); - avatar_name.append(" "); - avatar_name.append(last); - getChild("avatar_name")->setValue(avatar_name); - getChild("avatar_name")->setToolTip(avatar_name); - } -} - LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id): mParticipantList(NULL) { diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 3ab505a084..ce8fc58e56 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -89,9 +89,6 @@ public: // LLFriendObserver trigger virtual void changed(U32 mask); -protected: - void nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); - private: void onViewProfileButtonClicked(); void onAddFriendButtonClicked(); diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index c7e5b25e06..28c4adf67c 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -11,15 +11,6 @@ name="avatar_icon" top="-5" width="105"/> - Date: Thu, 11 Feb 2010 12:48:48 +0000 Subject: CID-68 Checker: FORWARD_NULL Function: LLPipeline::updateMoveNormalAsync(LLDrawable *) File: /indra/newview/pipeline.cpp not a bug. --- indra/newview/pipeline.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bd22fc5f2e..dd9634a234 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1355,6 +1355,7 @@ void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) if (!drawablep) { llerrs << "updateMove called with NULL drawablep" << llendl; + return; } if (drawablep->isState(LLDrawable::EARLY_MOVE)) { -- cgit v1.2.3 From 8d3d389fc76d4bf4bf7a27c7ee1bdefc2399137b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 12:52:22 +0000 Subject: CID-73 Checker: FORWARD_NULL Function: LLToolPie::pickRightMouseDownCallback() File: /indra/newview/lltoolpie.cpp --- indra/newview/lltoolpie.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index bf1e307d71..fdf9e1df2e 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1485,6 +1485,12 @@ BOOL LLToolPie::pickRightMouseDownCallback() while( object && object->isAttachment()) { object = (LLViewerObject*)object->getParent(); + llassert(object); + } + + if (!object) + { + return TRUE; // unexpected, but escape } // Object is an avatar, so check for mute by id. -- cgit v1.2.3 From 0fba252b657b3ba1bb9d4d4372947247620250fb Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 12:55:41 +0000 Subject: CIT-76 Checker: FORWARD_NULL Function: upload_done_callback(const LLUUID &, void *, int, int) File: /indra/newview/llviewermenufile.cpp --- indra/newview/llviewermenufile.cpp | 130 +++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 6bad8843fd..84b270f8cc 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -796,84 +796,88 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt //LLAssetType::EType pref_loc = data->mPreferredLocation; BOOL is_balance_sufficient = TRUE; - if(result >= 0) + if(data) { - LLFolderType::EType dest_loc = (data->mPreferredLocation == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(data->mAssetInfo.mType) : data->mPreferredLocation; - - if (LLAssetType::AT_SOUND == data->mAssetInfo.mType || - LLAssetType::AT_TEXTURE == data->mAssetInfo.mType || - LLAssetType::AT_ANIMATION == data->mAssetInfo.mType) + if (result >= 0) { - // Charge the user for the upload. - LLViewerRegion* region = gAgent.getRegion(); - - if(!(can_afford_transaction(expected_upload_cost))) - { - LLFloaterBuyCurrency::buyCurrency( - llformat(LLTrans::getString("UploadingCosts").c_str(), - data->mAssetInfo.getName().c_str()), - expected_upload_cost); - is_balance_sufficient = FALSE; - } - else if(region) + LLFolderType::EType dest_loc = (data->mPreferredLocation == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(data->mAssetInfo.mType) : data->mPreferredLocation; + + if (LLAssetType::AT_SOUND == data->mAssetInfo.mType || + LLAssetType::AT_TEXTURE == data->mAssetInfo.mType || + LLAssetType::AT_ANIMATION == data->mAssetInfo.mType) { - // Charge user for upload - gStatusBar->debitBalance(expected_upload_cost); + // Charge the user for the upload. + LLViewerRegion* region = gAgent.getRegion(); - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_MoneyTransferRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_MoneyData); - msg->addUUIDFast(_PREHASH_SourceID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_DestID, LLUUID::null); - msg->addU8("Flags", 0); - // we tell the sim how much we were expecting to pay so it - // can respond to any discrepancy - msg->addS32Fast(_PREHASH_Amount, expected_upload_cost); - msg->addU8Fast(_PREHASH_AggregatePermNextOwner, (U8)LLAggregatePermissions::AP_EMPTY); - msg->addU8Fast(_PREHASH_AggregatePermInventory, (U8)LLAggregatePermissions::AP_EMPTY); - msg->addS32Fast(_PREHASH_TransactionType, TRANS_UPLOAD_CHARGE); - msg->addStringFast(_PREHASH_Description, NULL); - msg->sendReliable(region->getHost()); + if(!(can_afford_transaction(expected_upload_cost))) + { + LLFloaterBuyCurrency::buyCurrency( + llformat(LLTrans::getString("UploadingCosts").c_str(), + data->mAssetInfo.getName().c_str()), + expected_upload_cost); + is_balance_sufficient = FALSE; + } + else if(region) + { + // Charge user for upload + gStatusBar->debitBalance(expected_upload_cost); + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_MoneyTransferRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_MoneyData); + msg->addUUIDFast(_PREHASH_SourceID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_DestID, LLUUID::null); + msg->addU8("Flags", 0); + // we tell the sim how much we were expecting to pay so it + // can respond to any discrepancy + msg->addS32Fast(_PREHASH_Amount, expected_upload_cost); + msg->addU8Fast(_PREHASH_AggregatePermNextOwner, (U8)LLAggregatePermissions::AP_EMPTY); + msg->addU8Fast(_PREHASH_AggregatePermInventory, (U8)LLAggregatePermissions::AP_EMPTY); + msg->addS32Fast(_PREHASH_TransactionType, TRANS_UPLOAD_CHARGE); + msg->addStringFast(_PREHASH_Description, NULL); + msg->sendReliable(region->getHost()); + } } - } - if(is_balance_sufficient) - { - // Actually add the upload to inventory - llinfos << "Adding " << uuid << " to inventory." << llendl; - const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc); - if(folder_id.notNull()) + if(is_balance_sufficient) { - U32 next_owner_perms = data->mNextOwnerPerm; - if(PERM_NONE == next_owner_perms) + // Actually add the upload to inventory + llinfos << "Adding " << uuid << " to inventory." << llendl; + const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc); + if(folder_id.notNull()) { - next_owner_perms = PERM_MOVE | PERM_TRANSFER; + U32 next_owner_perms = data->mNextOwnerPerm; + if(PERM_NONE == next_owner_perms) + { + next_owner_perms = PERM_MOVE | PERM_TRANSFER; + } + create_inventory_item(gAgent.getID(), gAgent.getSessionID(), + folder_id, data->mAssetInfo.mTransactionID, data->mAssetInfo.getName(), + data->mAssetInfo.getDescription(), data->mAssetInfo.mType, + data->mInventoryType, NOT_WEARABLE, next_owner_perms, + LLPointer(NULL)); + } + else + { + llwarns << "Can't find a folder to put it in" << llendl; } - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - folder_id, data->mAssetInfo.mTransactionID, data->mAssetInfo.getName(), - data->mAssetInfo.getDescription(), data->mAssetInfo.mType, - data->mInventoryType, NOT_WEARABLE, next_owner_perms, - LLPointer(NULL)); - } - else - { - llwarns << "Can't find a folder to put it in" << llendl; } } - } - else // if(result >= 0) - { - LLSD args; - args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType); - args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); - LLNotificationsUtil::add("CannotUploadReason", args); + else // if(result >= 0) + { + LLSD args; + args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType); + args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); + LLNotificationsUtil::add("CannotUploadReason", args); + } } LLUploadDialog::modalUploadFinished(); delete data; + data = NULL; // *NOTE: This is a pretty big hack. What this does is check the // file picker if there are any more pending uploads. If so, -- cgit v1.2.3 From d0183207eb28dc4764200c3ad4603a40ede0ce55 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 12:58:06 +0000 Subject: CID-79 Checker: FORWARD_NULL Function: LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem *) File: /indra/newview/llsidepaneliteminfo.cpp --- indra/newview/llsidepaneliteminfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 44348ba429..3d5120b18c 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -231,6 +231,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // PERMISSIONS LOOKUP // //////////////////////// + llassert(item); + if (!item) return; + // do not enable the UI for incomplete items. BOOL is_complete = item->isComplete(); const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); -- cgit v1.2.3 From d74fe63645242648d2ff972364b0531a67f58c7b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 12:59:04 +0000 Subject: CID-79 cleanup --- indra/newview/llsidepaneliteminfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 3d5120b18c..0275736f6d 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -240,14 +240,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); const LLPermissions& perm = item->getPermissions(); const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, - GP_OBJECT_MANIPULATE); + GP_OBJECT_MANIPULATE); const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, - GP_OBJECT_SET_SALE) && + GP_OBJECT_SET_SALE) && !cannot_restrict_permissions; const BOOL is_link = item->getIsLinkType(); const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - bool not_in_trash = item && (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); + bool not_in_trash = (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); // You need permission to modify the object to modify an inventory // item in it. -- cgit v1.2.3 From ca1e4d99a21e7445aede214a8faf6d631749d65b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 13:00:18 +0000 Subject: CID-81 Checker: FORWARD_NULL Function: LLScriptEdCore::onBtnDynamicHelp() File: /indra/newview/llpreviewscript.cpp --- indra/newview/llpreviewscript.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index a8feaf690d..3221745fa3 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -661,7 +661,9 @@ void LLScriptEdCore::onBtnDynamicHelp() live_help_floater = new LLFloater(LLSD()); LLUICtrlFactory::getInstance()->buildFloater(live_help_floater, "floater_lsl_guide.xml", NULL); LLFloater* parent = dynamic_cast(getParent()); - parent->addDependentFloater(live_help_floater, TRUE); + llassert(parent); + if (parent) + parent->addDependentFloater(live_help_floater, TRUE); live_help_floater->childSetCommitCallback("lock_check", onCheckLock, this); live_help_floater->childSetValue("lock_check", gSavedSettings.getBOOL("ScriptHelpFollowsCursor")); live_help_floater->childSetCommitCallback("history_combo", onHelpComboCommit, this); -- cgit v1.2.3 From a94ae7766e3ec946539556dc2442353da526ea20 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 13:03:14 +0000 Subject: CID-83 Checker: FORWARD_NULL Function: LLPanelLandmarkInfo::populateFoldersList() File: /indra/newview/llpanellandmarkinfo.cpp --- indra/newview/llpanellandmarkinfo.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 36a542cfa0..1a3a44f608 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -406,20 +406,23 @@ void LLPanelLandmarkInfo::populateFoldersList() // Put the "Landmarks" folder first in list. LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - const LLViewerInventoryCategory* cat = gInventory.getCategory(landmarks_id); - if (!cat) + const LLViewerInventoryCategory* lmcat = gInventory.getCategory(landmarks_id); + if (!lmcat) { llwarns << "Cannot find the landmarks folder" << llendl; } - std::string cat_full_name = getFullFolderName(cat); - mFolderCombo->add(cat_full_name, cat->getUUID()); + else + { + std::string cat_full_name = getFullFolderName(lmcat); + mFolderCombo->add(cat_full_name, cat->getUUID()); + } typedef std::vector folder_vec_t; folder_vec_t folders; // Sort the folders by their full name. for (S32 i = 0; i < cats.count(); i++) { - cat = cats.get(i); + const LLViewerInventoryCategory* cat = cats.get(i); cat_full_name = getFullFolderName(cat); folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name)); } -- cgit v1.2.3 From e7e414e8d2a768d788a6115aa27986844b3426a5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 13:04:38 +0000 Subject: CID-84 Checker: FORWARD_NULL Function: LLPanelPicks::onPanelClassifiedClose(LLPanelClassifiedInfo *) File: /indra/newview/llpanelpicks.cpp --- indra/newview/llpanelpicks.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index ada65c98a4..8eb0b69491 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -843,10 +843,13 @@ void LLPanelPicks::onPanelClassifiedClose(LLPanelClassifiedInfo* panel) { LLClassifiedItem* c_item = dynamic_cast( mClassifiedsList->getItemByValue(values[n])); - - c_item->setClassifiedName(panel->getClassifiedName()); - c_item->setDescription(panel->getDescription()); - c_item->setSnapshotId(panel->getSnapshotId()); + llassert(c_item); + if (c_item) + { + c_item->setClassifiedName(panel->getClassifiedName()); + c_item->setDescription(panel->getDescription()); + c_item->setSnapshotId(panel->getSnapshotId()); + } } } } -- cgit v1.2.3 From 69bed1f123f35b6124f4e3255df156b7fe82418b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 13:07:57 +0000 Subject: CID-83 follow-up --- indra/newview/llpanellandmarkinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 1a3a44f608..cd6c727b5c 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -414,7 +414,7 @@ void LLPanelLandmarkInfo::populateFoldersList() else { std::string cat_full_name = getFullFolderName(lmcat); - mFolderCombo->add(cat_full_name, cat->getUUID()); + mFolderCombo->add(cat_full_name, lmcat->getUUID()); } typedef std::vector folder_vec_t; @@ -423,7 +423,7 @@ void LLPanelLandmarkInfo::populateFoldersList() for (S32 i = 0; i < cats.count(); i++) { const LLViewerInventoryCategory* cat = cats.get(i); - cat_full_name = getFullFolderName(cat); + std::string cat_full_name = getFullFolderName(cat); folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name)); } sort(folders.begin(), folders.end(), cmp_folders); -- cgit v1.2.3