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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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 93c4a7a18f81ec6fe526d636492f0a7ee11a10db Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 10 Feb 2010 17:16:38 -0800 Subject: Finish up EXT-3908 Remove code for aspect ratio controls from LLFloaterPreference. (The XUI had already been removed.) Reviewed by Richard. --- indra/newview/llfloaterpreference.cpp | 132 ---------------------------------- indra/newview/llfloaterpreference.h | 3 - 2 files changed, 135 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 3c9f7492a2..43111d76f7 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -110,8 +110,6 @@ const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; -const S32 ASPECT_RATIO_STR_LEN = 100; - class LLVoiceSetKeyDialog : public LLModalDialog { public: @@ -283,7 +281,6 @@ void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator) } // static std::string LLFloaterPreference::sSkin = ""; -F32 LLFloaterPreference::sAspectRatio = 0.0; ////////////////////////////////////////////// // LLFloaterPreference @@ -324,11 +321,9 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this)); mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this)); mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2)); - mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this)); mCommitCallbackRegistrar.add("Pref.ParcelMediaAutoPlayEnable", boost::bind(&LLFloaterPreference::onCommitParcelMediaAutoPlayEnable, this)); mCommitCallbackRegistrar.add("Pref.MediaEnabled", boost::bind(&LLFloaterPreference::onCommitMediaEnabled, this)); mCommitCallbackRegistrar.add("Pref.MusicEnabled", boost::bind(&LLFloaterPreference::onCommitMusicEnabled, this)); - mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this)); mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2)); mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2)); @@ -359,12 +354,7 @@ BOOL LLFloaterPreference::postBuild() LLFloaterPreference::~LLFloaterPreference() { // clean up user data - LLComboBox* ctrl_aspect_ratio = getChild( "aspect_ratio"); LLComboBox* ctrl_window_size = getChild("windowsize combo"); - for (S32 i = 0; i < ctrl_aspect_ratio->getItemCount(); i++) - { - ctrl_aspect_ratio->setCurrentByIndex(i); - } for (S32 i = 0; i < ctrl_window_size->getItemCount(); i++) { ctrl_window_size->setCurrentByIndex(i); @@ -514,8 +504,6 @@ void LLFloaterPreference::cancel() LLFloaterReg::hideInstance("pref_voicedevicesettings"); - gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio); - } void LLFloaterPreference::onOpen(const LLSD& key) @@ -968,37 +956,6 @@ void LLFloaterPreference::disableUnavailableSettings() } } -void LLFloaterPreference::onCommitAutoDetectAspect() -{ - BOOL auto_detect = getChild("aspect_auto_detect")->get(); - F32 ratio; - - if (auto_detect) - { - S32 numerator = 0; - S32 denominator = 0; - - // clear any aspect ratio override - gViewerWindow->mWindow->setNativeAspectRatio(0.f); - fractionFromDecimal(gViewerWindow->mWindow->getNativeAspectRatio(), numerator, denominator); - - std::string aspect; - if (numerator != 0) - { - aspect = llformat("%d:%d", numerator, denominator); - } - else - { - aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio()); - } - - getChild( "aspect_ratio")->setLabel(aspect); - - ratio = gViewerWindow->mWindow->getNativeAspectRatio(); - gSavedSettings.setF32("FullScreenAspectRatio", ratio); - } -} - void LLFloaterPreference::onCommitParcelMediaAutoPlayEnable() { BOOL autoplay = getChild("autoplay_enabled")->get(); @@ -1266,56 +1223,9 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b } } -void LLFloaterPreference::onKeystrokeAspectRatio() -{ - getChild("aspect_auto_detect")->set(FALSE); -} - void LLFloaterPreference::applyResolution() { - LLComboBox* ctrl_aspect_ratio = getChild( "aspect_ratio"); gGL.flush(); - char aspect_ratio_text[ASPECT_RATIO_STR_LEN]; /*Flawfinder: ignore*/ - if (ctrl_aspect_ratio->getCurrentIndex() == -1) - { - // *Can't pass const char* from c_str() into strtok - strncpy(aspect_ratio_text, ctrl_aspect_ratio->getSimple().c_str(), sizeof(aspect_ratio_text) -1); /*Flawfinder: ignore*/ - aspect_ratio_text[sizeof(aspect_ratio_text) -1] = '\0'; - char *element = strtok(aspect_ratio_text, ":/\\"); - if (!element) - { - sAspectRatio = 0.f; // will be clamped later - } - else - { - LLLocale locale(LLLocale::USER_LOCALE); - sAspectRatio = (F32)atof(element); - } - - // look for denominator - element = strtok(NULL, ":/\\"); - if (element) - { - LLLocale locale(LLLocale::USER_LOCALE); - - F32 denominator = (F32)atof(element); - if (denominator != 0.f) - { - sAspectRatio /= denominator; - } - } - } - else - { - sAspectRatio = (F32)ctrl_aspect_ratio->getValue().asReal(); - } - - // presumably, user entered a non-numeric value if aspect_ratio == 0.f - if (sAspectRatio != 0.f) - { - sAspectRatio = llclamp(sAspectRatio, 0.2f, 5.f); - gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio); - } // Screen resolution S32 num_resolutions; @@ -1393,48 +1303,6 @@ BOOL LLPanelPreference::postBuild() childSetText("email_address",getString("log_in_to_change") ); // childSetText("busy_response", getString("log_in_to_change")); } - - - if(hasChild("aspect_ratio")) - { - // We used to set up fullscreen resolution and window size - // controls here, see LLFloaterWindowSize::initWindowSizeControls() - - if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio")) - { - LLFloaterPreference::sAspectRatio = gViewerWindow->getDisplayAspectRatio(); - } - else - { - LLFloaterPreference::sAspectRatio = gSavedSettings.getF32("FullScreenAspectRatio"); - } - - getChild("aspect_ratio")->setTextEntryCallback(boost::bind(&LLPanelPreference::setControlFalse, this, LLSD("FullScreenAutoDetectAspectRatio") )); - - - S32 numerator = 0; - S32 denominator = 0; - fractionFromDecimal(LLFloaterPreference::sAspectRatio, numerator, denominator); - - LLUIString aspect_ratio_text = getString("aspect_ratio_text"); - if (numerator != 0) - { - aspect_ratio_text.setArg("[NUM]", llformat("%d", numerator)); - aspect_ratio_text.setArg("[DEN]", llformat("%d", denominator)); - } - else - { - aspect_ratio_text = llformat("%.3f", LLFloaterPreference::sAspectRatio); - } - - LLComboBox* ctrl_aspect_ratio = getChild( "aspect_ratio"); - //mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio, this); - // add default aspect ratios - ctrl_aspect_ratio->add(aspect_ratio_text, &LLFloaterPreference::sAspectRatio, ADD_TOP); - ctrl_aspect_ratio->setCurrentByIndex(0); - - refresh(); - } //////////////////////PanelPrivacy /////////////////// if (hasChild("media_enabled")) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 0827c7c2b2..93b39d72bc 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -128,10 +128,8 @@ public: void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box); void onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name); - void onKeystrokeAspectRatio(); // void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator); - void onCommitAutoDetectAspect(); void onCommitParcelMediaAutoPlayEnable(); void onCommitMediaEnabled(); void onCommitMusicEnabled(); @@ -142,7 +140,6 @@ public: void buildPopupLists(); static void refreshSkin(void* data); static void cleanupBadSetting(); - static F32 sAspectRatio; private: static std::string sSkin; bool mGotPersonalInfo; -- cgit v1.2.3 From 60cb3f8fd29b4b978d5f9cbeae4a966ec6160a41 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 10 Feb 2010 18:08:00 -0800 Subject: fix for EXT-4632: LLViewerMediaTexture::getMaxVirtualSize() sometimes returns bad values. --- indra/newview/llface.cpp | 50 ++++++++++++++++++++++++++++++++++----- indra/newview/llface.h | 5 +++- indra/newview/llviewertexture.cpp | 14 +++++++---- 3 files changed, 58 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index d12fd48ffb..c0a3eb1316 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1327,6 +1327,21 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, return TRUE; } +//check if the face has a media +BOOL LLFace::hasMedia() const +{ + if(mHasMedia) + { + return TRUE ; + } + if(mTexture.notNull()) + { + return mTexture->hasParcelMedia() ; //if has a parcel media + } + + return FALSE ; //no media. +} + const F32 LEAST_IMPORTANCE = 0.05f ; const F32 LEAST_IMPORTANCE_FOR_LARGE_IMAGE = 0.3f ; @@ -1336,7 +1351,7 @@ F32 LLFace::getTextureVirtualSize() F32 cos_angle_to_view_dir; mPixelArea = calcPixelArea(cos_angle_to_view_dir, radius); - if (mPixelArea <= 0) + if (mPixelArea < 0.0001f) { return 0.f; } @@ -1381,14 +1396,38 @@ F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) { //get area of circle around face LLVector3 center = getPositionAgent(); - LLVector3 size = (mExtents[1] - mExtents[0]) * 0.5f; - + LLVector3 size = (mExtents[1] - mExtents[0]) * 0.5f; LLViewerCamera* camera = LLViewerCamera::getInstance(); + + //if has media, check if the face is out of the view frustum. + BOOL has_media = hasMedia() ; + if(has_media && !camera->AABBInFrustum(center, size)) + { + mImportanceToCamera = 0.f ; + return 0.f ; + } + + F32 size_squared = size.lengthSquared() ; LLVector3 lookAt = center - camera->getOrigin(); F32 dist = lookAt.normVec() ; + cos_angle_to_view_dir = lookAt * camera->getXAxis() ; + if(has_media) + { + if(cos_angle_to_view_dir > camera->getCosHalfFov()) //the center is within the view frustum + { + cos_angle_to_view_dir = 1.0f ; + } + else + { + if(dist * dist * (lookAt - camera->getXAxis()).lengthSquared() < size_squared) + { + cos_angle_to_view_dir = 1.0f ; + } + } + } //get area of circle around node - F32 app_angle = atanf(size.length()/dist); + F32 app_angle = atanf(fsqrtf(size_squared) / dist); radius = app_angle*LLDrawable::sCurPixelAngle; F32 face_area = radius*radius * 3.14159f; @@ -1398,8 +1437,7 @@ F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) mImportanceToCamera = 1.0f ; } else - { - cos_angle_to_view_dir = lookAt * camera->getXAxis() ; + { mImportanceToCamera = LLFace::calcImportanceToCamera(cos_angle_to_view_dir, dist) ; } diff --git a/indra/newview/llface.h b/indra/newview/llface.h index e12b64a2f2..bf658dc00c 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -194,6 +194,9 @@ public: F32 getTextureVirtualSize() ; F32 getImportanceToCamera()const {return mImportanceToCamera ;} + void setHasMedia(bool has_media) { mHasMedia = has_media ;} + BOOL hasMedia() const ; + //for atlas LLTextureAtlasSlot* getAtlasInfo() ; void setAtlasInUse(BOOL flag); @@ -262,7 +265,7 @@ private: //based on the distance from the face to the view point and the angle from the face center to the view direction. F32 mImportanceToCamera ; F32 mBoundingSphereRadius ; - + bool mHasMedia ; //atlas LLPointer mAtlasInfop ; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9893eb5dce..984f003411 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2995,6 +2995,10 @@ void LLViewerMediaTexture::initVirtualSize() void LLViewerMediaTexture::addMediaToFace(LLFace* facep) { + if(facep) + { + facep->setHasMedia(true) ; + } if(!mIsPlaying) { return ; //no need to add the face because the media is not in playing. @@ -3005,14 +3009,16 @@ void LLViewerMediaTexture::addMediaToFace(LLFace* facep) void LLViewerMediaTexture::removeMediaFromFace(LLFace* facep) { - if(!mIsPlaying) - { - return ; //no need to remove the face because the media is not in playing. - } if(!facep) { return ; } + facep->setHasMedia(false) ; + + if(!mIsPlaying) + { + return ; //no need to remove the face because the media is not in playing. + } mIsPlaying = FALSE ; //set to remove the media from the face. switchTexture(facep) ; -- cgit v1.2.3 From 8bc4dcc85524a23924d3a810502503cc946ce1c1 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 10 Feb 2010 18:13:02 -0800 Subject: EXT-5321 - llinfos from non ui threads is not thread safe reviewed by Mani --- indra/newview/llviewerwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 4a86e1ca41..b76a2e150f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2463,6 +2463,8 @@ void LLViewerWindow::updateUI() { static std::string last_handle_msg; + LLConsole::updateClass(); + // animate layout stacks so we have up to date rect for world view LLLayoutStack::updateClass(); -- 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/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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:47:47 +0200 Subject: Fixed normal bug EXT-5207 - Region Maturity level not displayed on nav bar when coordinates are enabled and parcel got no name. Added maturity rating to full location string in case parcel name is empty. --HG-- branch : product-engine --- indra/newview/llagentui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 7404fe5bc4..72ab9235cf 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -150,11 +150,17 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const sim_access_string.c_str()); break; case LOCATION_FORMAT_NO_MATURITY: - case LOCATION_FORMAT_FULL: buffer = llformat("%s (%d, %d, %d)", region_name.c_str(), pos_x, pos_y, pos_z); break; + case LOCATION_FORMAT_FULL: + buffer = llformat("%s (%d, %d, %d)%s%s", + region_name.c_str(), + pos_x, pos_y, pos_z, + sim_access_string.empty() ? "" : " - ", + sim_access_string.c_str()); + break; } } else -- cgit v1.2.3 From cf18a1d22c7a4c315a651bc39085bc6d723e8e7d Mon Sep 17 00:00:00 2001 From: "Paul Guslisty pguslisty@productengine.com" Date: Thu, 11 Feb 2010 12:52:26 +0200 Subject: EXT - 2753 (Implement Avatar icons on IM multifloater tabs) refactoring: - Deleted unnecessary parameters (UIButtonImageTopPadding, UIButtonImageBottomPadding) from settings.xml and their usage in LLTabContainer - Deleted triggers (LLIMFloaterContainer::processProperties and LLIMFloaterContainer::changed) due to LLIMFloaterContainer no more Observer - Renamed class LLParticularGroupMgrObserver to LLParticularGroupObserver as the last one's name is more self explanatory --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 22 ---------------------- indra/newview/llgroupmgr.cpp | 6 +++--- indra/newview/llgroupmgr.h | 10 +++++----- indra/newview/llimfloatercontainer.cpp | 30 ------------------------------ indra/newview/llimfloatercontainer.h | 5 +---- 5 files changed, 9 insertions(+), 64 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index db4e0b5afd..48205370ef 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9948,28 +9948,6 @@ S32 Value 15 - - UIButtonImageTopPadding - - Comment - Button Overlay Image Top Padding - Persist - 1 - Type - S32 - Value - 2 - - UIButtonImageBottomPadding - - Comment - Button Overlay Image Bottom Padding - Persist - 1 - Type - S32 - Value - 2 UploadBakedTexOld diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 4c1019a882..e65990a095 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -762,7 +762,7 @@ void LLGroupMgr::addObserver(LLGroupMgrObserver* observer) mObservers.insert(std::pair(observer->getID(), observer)); } -void LLGroupMgr::addObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer) +void LLGroupMgr::addObserver(const LLUUID& group_id, LLParticularGroupObserver* observer) { if(group_id.notNull() && observer) { @@ -792,7 +792,7 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer) } } -void LLGroupMgr::removeObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer) +void LLGroupMgr::removeObserver(const LLUUID& group_id, LLParticularGroupObserver* observer) { if(group_id.isNull() || !observer) { @@ -1364,7 +1364,7 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc) gi->second->mChanged = FALSE; - // notify LLParticularGroupMgrObserver + // notify LLParticularGroupObserver observer_map_t::iterator obs_it = mParticularObservers.find(group_id); if(obs_it == mParticularObservers.end()) return; diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 588b4a9034..2c86de8b97 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -53,10 +53,10 @@ protected: LLUUID mID; }; -class LLParticularGroupMgrObserver +class LLParticularGroupObserver { public: - virtual ~LLParticularGroupMgrObserver(){} + virtual ~LLParticularGroupObserver(){} virtual void changed(const LLUUID& group_id, LLGroupChange gc) = 0; }; @@ -313,9 +313,9 @@ public: ~LLGroupMgr(); void addObserver(LLGroupMgrObserver* observer); - void addObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer); + void addObserver(const LLUUID& group_id, LLParticularGroupObserver* observer); void removeObserver(LLGroupMgrObserver* observer); - void removeObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer); + void removeObserver(const LLUUID& group_id, LLParticularGroupObserver* observer); LLGroupMgrGroupData* getGroupData(const LLUUID& id); void sendGroupPropertiesRequest(const LLUUID& group_id); @@ -374,7 +374,7 @@ private: typedef std::map group_map_t; group_map_t mGroups; - typedef std::set observer_set_t; + typedef std::set observer_set_t; typedef std::map observer_map_t; observer_map_t mParticularObservers; }; diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index ba034609e9..7162386d08 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -121,36 +121,6 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id) mSessions.erase(id); } -void LLIMFloaterContainer::processProperties(void* data, enum EAvatarProcessorType type) -{ - if (APT_PROPERTIES == type) - { - LLAvatarData* avatar_data = static_cast(data); - if (avatar_data) - { - LLUUID avatar_id = avatar_data->avatar_id; - LLUUID* cached_avatarId = LLAvatarIconIDCache::getInstance()->get(avatar_id); - if(cached_avatarId && cached_avatarId->notNull() && avatar_data->image_id != *cached_avatarId) - { - LLAvatarIconIDCache::getInstance()->add(avatar_id,avatar_data->image_id); - mTabContainer->setTabImage(get_ptr_in_map(mSessions, avatar_id), avatar_data->image_id); - } - } - } -} - -void LLIMFloaterContainer::changed(const LLUUID& group_id, LLGroupChange gc) -{ - if (GC_PROPERTIES == gc) - { - LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(group_id); - if (group_data && group_data->mInsigniaID.notNull()) - { - mTabContainer->setTabImage(get_ptr_in_map(mSessions, group_id), group_data->mInsigniaID); - } - } -} - void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) { LLUUID session_id = data["from_id"].asUUID(); diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index b07ef2d71d..46c0617c01 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -43,7 +43,7 @@ class LLTabContainer; -class LLIMFloaterContainer : public LLMultiFloater, public LLAvatarPropertiesObserver, public LLParticularGroupMgrObserver +class LLIMFloaterContainer : public LLMultiFloater { public: LLIMFloaterContainer(const LLSD& seed); @@ -57,9 +57,6 @@ public: BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); - void processProperties(void* data, EAvatarProcessorType type); - void changed(const LLUUID& group_id, LLGroupChange gc); - static LLFloater* getCurrentVoiceFloater(); static LLIMFloaterContainer* findInstance(); -- cgit v1.2.3 From 0133b3d3f95a6f1c07d695ef9f64d736c15d88e4 Mon Sep 17 00:00:00 2001 From: "Paul Guslisty pguslisty@productengine.com" Date: Thu, 11 Feb 2010 13:55:13 +0200 Subject: Fixed low bug EXT - 5197 (Change default help text in my Picks to \"You haven't created any Picks or Classifieds. Click the Plus button below to create a Pick or Classified.\") - Replaced old default help text in settings.xml with new one --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_picks.xml | 1 + indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 887a89d518..9ef3649d9c 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -24,6 +24,7 @@ bg_opaque_color="DkGray2" layout="topleft" left="6" name="picks_panel_text" + wrap="true" top="10" width="313"/> (will update after publish) - There are no picks/classifieds here + You haven't created any Picks or Classifieds. Click the Plus button below to create a Pick or Classified. Loading... -- cgit v1.2.3 From 23bc796a7f8cbe3163041c4a81018b1d89008cc2 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 11 Feb 2010 13:57:48 +0200 Subject: Fixed normal bug EXT-5289 ("Cancel" button is missing if call started when voice notification exists). - Added setting "Cancel" button visible when call is started. --HG-- branch : product-engine --- indra/newview/llimview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 0965cbd0dc..5a6c6ebbee 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1665,6 +1665,7 @@ void LLOutgoingCallDialog::show(const LLSD& key) { case LLVoiceChannel::STATE_CALL_STARTED : getChild("calling")->setVisible(true); + getChild("Cancel")->setVisible(true); if(show_oldchannel) { getChild("leaving")->setVisible(true); -- cgit v1.2.3 From 9919e6f3394699594644ddc7555a113aed2d12eb Mon Sep 17 00:00:00 2001 From: Tofu Linden 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(+) (limited to 'indra/newview') 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(+) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(+) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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(-) (limited to 'indra/newview') 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 From c3d262cc6d7cabce1f8eb7b43e8c6fc3a46b8246 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 11 Feb 2010 15:18:10 +0200 Subject: Backed out changeset bc651a97431f. This changeset broke fix for EXT-4212 (There's an ability to send non-latin group notices but they turn to '????...' in group profile page.) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_notices.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') 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 5f46ad7860..1f16aea2ef 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -159,6 +159,7 @@ 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 c53e587170d5c6dfeb5fa418a8b4eda964ee8a91 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 13:32:50 +0000 Subject: CID-115 Checker: MISSING_BREAK Function: LLGroupMgrGroupData::sendRoleChanges() File: /indra/newview/llgroupmgr.cpp not a bug. --- indra/newview/llgroupmgr.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 4c1019a882..c813c8b2f9 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -677,9 +677,12 @@ void LLGroupMgrGroupData::sendRoleChanges() break; } case RC_UPDATE_ALL: + // fall through case RC_UPDATE_POWERS: need_power_recalc = true; + // fall through case RC_UPDATE_DATA: + // fall through default: { LLGroupRoleData* group_role_data = (*role_it).second; -- cgit v1.2.3 From 641b44fc8357289d12ff165b689d941a52af5d27 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:14:21 +0000 Subject: CID-63 Checker: FORWARD_NULL Function: LLFloaterProperties::dirtyAll() File: /indra/newview/llfloaterproperties.cpp --- indra/newview/llfloaterproperties.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index bde86a4034..5c0593ad29 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -880,7 +880,11 @@ void LLFloaterProperties::dirtyAll() iter != inst_list.end(); ++iter) { LLFloaterProperties* floater = dynamic_cast(*iter); - floater->dirty(); + llassert(floater); // else cast failed - wrong type D: + if (floater) + { + floater->dirty(); + } } } -- cgit v1.2.3 From 63e421d3b30dffa518fe9011ce501e9aeaa78b7c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:15:41 +0000 Subject: CID-64 Checker: FORWARD_NULL Function: LLFeatureManager::loadFeatureTables() File: /indra/newview/llfeaturemanager.cpp not a bug. --- indra/newview/llfeaturemanager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index fb724f30e0..fbb90c69f3 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -287,6 +287,7 @@ BOOL LLFeatureManager::loadFeatureTables() if (!flp) { LL_ERRS("RenderInit") << "Specified parameter before keyword!" << LL_ENDL; + return FALSE; } S32 available; F32 recommended; -- cgit v1.2.3 From 4307d45a30324636cb8f1bb4f2634c2d5570f7f4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:17:08 +0000 Subject: CID-66 Checker: FORWARD_NULL Function: LLVOAvatar::parseSkeletonFile(const std::basic_string, std::allocator>&) File: /indra/newview/llvoavatar.cpp not a bug. --- indra/newview/llvoavatar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cf0808ea5b..2235618573 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1492,9 +1492,9 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) //------------------------------------------------------------------------- // parse the file //------------------------------------------------------------------------- - BOOL success = sSkeletonXMLTree.parseFile( filename, FALSE ); + BOOL parsesuccess = sSkeletonXMLTree.parseFile( filename, FALSE ); - if (!success) + if (!parsesuccess) { llerrs << "Can't parse skeleton file: " << filename << llendl; return FALSE; @@ -1505,11 +1505,13 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) if (!root) { llerrs << "No root node found in avatar skeleton file: " << filename << llendl; + return FALSE; } if( !root->hasName( "linden_skeleton" ) ) { llerrs << "Invalid avatar skeleton file header: " << filename << llendl; + return FALSE; } std::string version; @@ -1517,6 +1519,7 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << llendl; + return FALSE; } return TRUE; -- cgit v1.2.3 From 03d7153e557cf0021cc44dde3310caca2df76b8f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:18:54 +0000 Subject: CID-67 Checker: FORWARD_NULL Function: LLFloaterTools::updatePopup(LLCoordGL, unsigned int) File: /indra/newview/llfloatertools.cpp --- indra/newview/llfloatertools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 4edd09b02c..e2b083a29b 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -666,8 +666,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckCopyCenters) mCheckCopyCenters ->setVisible( create_visible ); if (mCheckCopyRotates) mCheckCopyRotates ->setVisible( create_visible ); - if (mCheckCopyCenters) mCheckCopyCenters->setEnabled( mCheckCopySelection->get() ); - if (mCheckCopyRotates) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); + if (mCheckCopyCenters && mCheckCopySelection) mCheckCopyCenters->setEnabled( mCheckCopySelection->get() ); + if (mCheckCopyRotates && mCheckCopySelection) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); // Land buttons BOOL land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() ); -- cgit v1.2.3 From a1e2ce7fa29be3faca8e58d8df25ea05dcb8a4a5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:21:59 +0000 Subject: CID-153 Checker: NULL_RETURNS Function: LLAgentWearables::makeNewOutfit(const std::basic_string, std::allocator>&, const LLDynamicArray &, const LLDynamicArray &, int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 40 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6620780b27..6078620e87 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1290,25 +1290,29 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, j, new_wearable, todo); - if (isWearableCopyable((EWearableType)type, j)) + llassert(item); + if (item) { - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - folder_id, - new_name, - cb); - } - else - { - move_inventory_item( - gAgent.getID(), - gAgent.getSessionID(), - item->getUUID(), - folder_id, - new_name, - cb); + if (isWearableCopyable((EWearableType)type, j)) + { + copy_inventory_item( + gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + folder_id, + new_name, + cb); + } + else + { + move_inventory_item( + gAgent.getID(), + gAgent.getSessionID(), + item->getUUID(), + folder_id, + new_name, + cb); + } } } } -- cgit v1.2.3 From 7aa169bd1663c35b7a299091172c6fc7cc527966 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:23:06 +0000 Subject: CID-151 Checker: NULL_RETURNS Function: LLFavoritesBarCtrl::insertBeforeItem(LLDynamicArray, (int)32> &, const LLUUID &, LLViewerInventoryItem *) File: /indra/newview/llfavoritesbar.cpp --- indra/newview/llfavoritesbar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 1e8a739d78..bf7c735488 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1264,8 +1264,11 @@ LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLIn void LLFavoritesBarCtrl::insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem) { LLViewerInventoryItem* beforeItem = gInventory.getItem(beforeItemId); - - items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem); + llassert(beforeItem); + if (beforeItem) + { + items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem); + } } // EOF -- cgit v1.2.3 From d56525aaec271775d7fa4ffb162b1316850161e5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:24:38 +0000 Subject: CID-150 Checker: NULL_RETURNS Function: LLFloaterGesture::onCopyPasteAction(const LLSD &) File: /indra/newview/llfloatergesture.cpp --- indra/newview/llfloatergesture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index b684e1f985..60a5fb6aba 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -510,6 +510,7 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command) if(ids.empty() || !gInventory.isCategoryComplete(mGestureFolderID)) return; LLInventoryCategory* gesture_dir = gInventory.getCategory(mGestureFolderID); + llassert(gesture_dir); LLPointer cb = new GestureCopiedCallback(this); for(LLDynamicArray::iterator it = ids.begin(); it != ids.end(); it++) @@ -517,7 +518,7 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command) LLInventoryItem* item = gInventory.getItem(*it); LLStringUtil::format_map_t string_args; string_args["[COPY_NAME]"] = item->getName(); - if(item && item->getInventoryType() == LLInventoryType::IT_GESTURE) + if(gesture_dir && item && item->getInventoryType() == LLInventoryType::IT_GESTURE) { LL_DEBUGS("Gesture")<< "Copying gesture " << item->getName() << " "<< item->getUUID() << " into " << gesture_dir->getName() << " "<< gesture_dir->getUUID() << LL_ENDL; -- cgit v1.2.3 From dd360d05dcae2d11343b585a9d6e6a564aa2bca7 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:26:21 +0000 Subject: CID-149 Checker: NULL_RETURNS Function: LLFloaterGesture::onCopyPasteAction(const LLSD &) File: /indra/newview/llfloatergesture.cpp --- indra/newview/llfloatergesture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 60a5fb6aba..af6386b8b6 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -516,10 +516,10 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command) for(LLDynamicArray::iterator it = ids.begin(); it != ids.end(); it++) { LLInventoryItem* item = gInventory.getItem(*it); - LLStringUtil::format_map_t string_args; - string_args["[COPY_NAME]"] = item->getName(); if(gesture_dir && item && item->getInventoryType() == LLInventoryType::IT_GESTURE) { + LLStringUtil::format_map_t string_args; + string_args["[COPY_NAME]"] = item->getName(); LL_DEBUGS("Gesture")<< "Copying gesture " << item->getName() << " "<< item->getUUID() << " into " << gesture_dir->getName() << " "<< gesture_dir->getUUID() << LL_ENDL; copy_inventory_item(gAgent.getID(), item->getPermissions().getOwner(), item->getUUID(), -- cgit v1.2.3 From e747e9a3da3166de88dea1af213a36694135b820 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 11 Feb 2010 22:27:49 +0800 Subject: EXT-4837 [NUX] When filter results in null state, provide a message suggesting the user try global search. --- indra/newview/llfolderview.cpp | 26 ++++++++++++++++++---- indra/newview/llfolderview.h | 5 ++++- indra/newview/llinventorypanel.cpp | 1 + indra/newview/llplacesinventorypanel.cpp | 1 + .../skins/default/xui/en/panel_main_inventory.xml | 8 +++---- .../newview/skins/default/xui/en/panel_people.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 2 +- 7 files changed, 34 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 57c7ba8e27..8dbdfff635 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -195,7 +195,8 @@ LLFolderView::LLFolderView(const Params& p) mCallbackRegistrar(NULL), mParentPanel(p.parent_panel), mUseEllipses(false), - mDraggingOverItem(NULL) + mDraggingOverItem(NULL), + mStatusTextBox(NULL) { LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); @@ -231,6 +232,18 @@ LLFolderView::LLFolderView(const Params& p) mRenamer = LLUICtrlFactory::create (params); addChild(mRenamer); + // Textbox + LLTextBox::Params text_p; + LLRect new_r(5, 13-50, 300, 0-50); + text_p.name(std::string(p.name)); + text_p.rect(new_r); + text_p.font(getLabelFontForStyle(mLabelStyle)); + text_p.visible(false); + text_p.allow_html(true); + mStatusTextBox = LLUICtrlFactory::create (text_p); + //addChild(mStatusTextBox); + + // make the popup menu available LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (!menu) @@ -253,6 +266,7 @@ LLFolderView::~LLFolderView( void ) mScrollContainer = NULL; mRenameItem = NULL; mRenamer = NULL; + mStatusTextBox = NULL; if( gEditMenuHandler == this ) { @@ -874,7 +888,7 @@ void LLFolderView::draw() LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } - LLFontGL* font = getLabelFontForStyle(mLabelStyle); + //LLFontGL* font = getLabelFontForStyle(mLabelStyle); // if cursor has moved off of me during drag and drop // close all auto opened folders @@ -911,19 +925,23 @@ void LLFolderView::draw() || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS) { mStatusText.clear(); + mStatusTextBox->setVisible( FALSE ); } else { if (gInventory.backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) { mStatusText = LLTrans::getString("Searching"); - font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } else { mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage()); - font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } + mStatusTextBox->setValue(mStatusText); + mStatusTextBox->setVisible( TRUE ); + } LLFolderViewFolder::draw(); diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 56ebdfcf79..faf6a9cf23 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -62,6 +62,7 @@ class LLLineEditor; class LLMenuGL; class LLScrollContainer; class LLUICtrl; +class LLTextBox; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFolderViewFunctor @@ -327,7 +328,7 @@ protected: LLUUID mSelectThisID; // if non null, select this item - LLPanel* mParentPanel; + LLPanel* mParentPanel; /** * Is used to determine if we need to cut text In LLFolderViewItem to avoid horizontal scroll. @@ -344,6 +345,8 @@ protected: public: static F32 sAutoOpenTime; + LLTextBox* mStatusTextBox; + }; bool sort_item_name(LLFolderViewItem* a, LLFolderViewItem* b); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 467255d1a7..ca9b942629 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -143,6 +143,7 @@ BOOL LLInventoryPanel::postBuild() addChild(mScroller); mScroller->addChild(mFolders); mFolders->setScrollContainer(mScroller); + mFolders->addChild(mFolders->mStatusTextBox); } // Set up the callbacks from the inventory we're viewing, and then build everything. diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 6c6eb7c719..f1e450a083 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -118,6 +118,7 @@ BOOL LLPlacesInventoryPanel::postBuild() mScroller->addChild(mFolders); mFolders->setScrollContainer(mScroller); + mFolders->addChild(mFolders->mStatusTextBox); // cut subitems diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 4030c7184a..c6a4233c9c 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -37,7 +37,7 @@ halign="center" top_pad="4" width="305">