From 694b0838bc80efc152e7ecda09ffdc7a944b7079 Mon Sep 17 00:00:00 2001 From: Dave SIMmONs Date: Wed, 1 Jun 2011 11:36:25 -0700 Subject: ER-949: Chat using '/me' style text displayed incorrectly. Reviewed by Kelly --- indra/newview/llnearbychathandler.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 11dc496311..f157b20592 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -472,7 +472,8 @@ void LLNearbyChatHandler::initChannel() -void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) +void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not really const, see hack below changing chat_msg.mText + const LLSD &args) { if(chat_msg.mMuted == TRUE) return; @@ -480,7 +481,17 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) if(chat_msg.mText.empty()) return;//don't process empty messages + // Handle irc styled messages for toast panel + // HACK ALERT - changes mText, stripping out IRC style "/me" prefixes LLChat& tmp_chat = const_cast(chat_msg); + std::string original_message = tmp_chat.mText; // Save un-modified version of chat text + if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) + { + if(!tmp_chat.mFromName.empty()) + tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3); + else + tmp_chat.mText = tmp_chat.mText.substr(3); + } LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); { @@ -531,7 +542,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) LLViewerChat::getChatColor(chat_msg,txt_color); - LLFloaterScriptDebug::addScriptLine(chat_msg.mText, + LLFloaterScriptDebug::addScriptLine(original_message, // Send full message with "/me" style prefix chat_msg.mFromName, txt_color, chat_msg.mFromID); @@ -562,15 +573,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode return;//no need in toast if chat is visible or if bubble chat is enabled - // Handle irc styled messages for toast panel - if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) - { - if(!tmp_chat.mFromName.empty()) - tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3); - else - tmp_chat.mText = tmp_chat.mText.substr(3); - } - // arrange a channel on a screen if(!mChannel->getVisible()) { -- cgit v1.2.3 From 786da1eb383502a268f71938e16b525a72e01abe Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Sat, 11 Jun 2011 18:10:19 -0400 Subject: VWR-25480 Worldmap: Partial region name search UI bug Patch converted and tested by Jonathan Yap --- indra/newview/llfloaterworldmap.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index f8a4ce7ad0..b3910982d1 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -1527,17 +1527,24 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) mCompletingRegionName = ""; } - // if match found, highlight it and go - if (!match.isUndefined()) + if (num_results > 0) { - list->selectByValue(match); + // if match found, highlight it and go + if (!match.isUndefined()) + { + list->selectByValue(match); + } + // else select first found item + else + { + list->selectFirstItem(); + } getChild("search_results")->setFocus(TRUE); onCommitSearchResult(); } - - // if we found nothing, say "none" - if (num_results == 0) + else { + // if we found nothing, say "none" list->setCommentText(LLTrans::getString("worldmap_results_none_found")); list->operateOnAll(LLCtrlListInterface::OP_DESELECT); } -- cgit v1.2.3 From d6f6b640e473de946467af71cdbda2b88301608f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 13 Jun 2011 16:05:17 -0700 Subject: EXP-885 FIX v2.7.1 Release Viewer Update Available splash prompts the user to donwload the v2.7.2 Beta Backed out changeset: 3a391669629d --- indra/newview/llpanellogin.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d0810d0772..27f341b4f6 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -34,7 +34,6 @@ #include "llmd5.h" #include "llsecondlifeurls.h" #include "v4color.h" -#include "llversionviewer.h" #include "llappviewer.h" #include "llbutton.h" @@ -748,20 +747,12 @@ void LLPanelLogin::loadLoginPage() LLVersionInfo::getShortVersion().c_str(), LLVersionInfo::getBuild()); - char* curl_channel ; + char* curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0); char* curl_version = curl_escape(version.c_str(), 0); - if(strcmp(LLVersionInfo::getChannel().c_str(), LL_CHANNEL)) - { - curl_channel = curl_escape(LLVersionInfo::getChannel().c_str(), 0); - } - else //if LL_CHANNEL, direct it to "Second Life Beta Viewer". - { - curl_channel = curl_escape("Second Life Beta Viewer", 0); - } oStr << "&channel=" << curl_channel; oStr << "&version=" << curl_version; - + curl_free(curl_channel); curl_free(curl_version); -- cgit v1.2.3 From e2a531791ed2c311e6e95061175ce2a9151ccf9d Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 15 Jun 2011 07:02:28 -0400 Subject: STORM-1334 Console debug data scrolls away too quickly and is hard to read --- indra/llui/llconsole.cpp | 13 +++++++------ indra/newview/lldebugview.cpp | 4 +++- indra/newview/skins/default/xui/en/main_view.xml | 15 ++++++++------- 3 files changed, 18 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 06bad1f371..04040200d0 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -132,6 +132,9 @@ void LLConsole::setFontSize(S32 size_index) void LLConsole::draw() { + // Units in pixels + static const F32 padding_horizontal = 10; + static const F32 padding_vertical = 3; LLGLSUIDefault gls_ui; // skip lines added more than mLinePersistTime ago @@ -176,11 +179,9 @@ void LLConsole::draw() // draw remaining lines F32 y_pos = 0.f; - LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); + LLUIImagePtr imagep = LLUI::getUIImage("transparent"); -// F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); -// LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground"); color.mV[VALPHA] *= console_opacity; @@ -188,8 +189,8 @@ void LLConsole::draw() for(paragraph_it = mParagraphs.rbegin(); paragraph_it != mParagraphs.rend(); paragraph_it++) { - S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + 8); - S32 target_width = llfloor( (*paragraph_it).mMaxWidth +15); + S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + padding_vertical); + S32 target_width = llfloor( (*paragraph_it).mMaxWidth + padding_horizontal); y_pos += ((*paragraph_it).mLines.size()) * line_height; imagep->drawSolid(-14, (S32)(y_pos + line_height - target_height), target_width, target_height, color); @@ -234,7 +235,7 @@ void LLConsole::draw() y_off += line_height; } } - y_pos += 8; + y_pos += padding_vertical; } } diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index b6d67899f8..aa5d4fc922 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -59,10 +59,12 @@ LLDebugView::LLDebugView(const LLDebugView::Params& p) void LLDebugView::init() { + // Horizontal percentage of screen (not window) to draw debug data in + static const F32 debug_console_percentage = 0.75; LLRect r; LLRect rect = getLocalRect(); - r.set(10, rect.getHeight() - 100, rect.getWidth()/2, 100); + r.set(10, rect.getHeight() - 100, rect.getWidth() * debug_console_percentage, 100); LLConsole::Params cp; cp.name("debug console"); cp.max_lines(20); diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 3ead67ca57..a7d1aa963c 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -135,6 +135,14 @@ name="login_panel_holder" width="1024"/> + + - Date: Wed, 15 Jun 2011 09:23:46 -0700 Subject: Fix VWR-24099: warn user when trying to send too many teleport offers at one time. --- indra/newview/llviewermessage.cpp | 9 +++++++++ indra/newview/skins/default/xui/en/notifications.xml | 13 +++++++++++++ 2 files changed, 22 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3832be727f..435b2e063d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6266,6 +6266,15 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { + if(notification["payload"]["ids"].size() > 250) + { + // More than 250 targets will overload the message. + LLSD args; + args["OFFERS"] = notification["payload"]["ids"].size(); + LLNotificationsUtil::add("TooManyTeleportOffers", args); + return false; + } + std::string text = response["message"].asString(); LLSLURL slurl; LLAgentUI::buildSLURL(slurl); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ce96c488b4..21680772ba 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3696,6 +3696,19 @@ Join me in [REGION] + +You attempted to make [OFFERS] teleport offers; +250 are the most that can be done at one time + group + fail + + + Date: Wed, 15 Jun 2011 15:12:42 -0700 Subject: Fix VWR-24099: disable teleport button when too many friends are selected; we keep the warning dialog as a failsafe. --- indra/newview/llavataractions.cpp | 4 ++++ indra/newview/llviewermessage.cpp | 7 +++++-- indra/newview/skins/default/xui/en/notifications.xml | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index cbbdcb2983..955f19c82c 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -773,6 +773,10 @@ bool LLAvatarActions::canOfferTeleport(const LLUUID& id) // static bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids) { + // We can't send more than 250 lures in a single message, so disable this + // button when there are too many id's selected. + if(ids.size() > 250) return false; + bool result = true; for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 435b2e063d..ae36a2292f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6266,11 +6266,14 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { - if(notification["payload"]["ids"].size() > 250) + static const unsigned OFFER_RECIPIENT_LIMIT = 250; + if(notification["payload"]["ids"].size() > OFFER_RECIPIENT_LIMIT) { - // More than 250 targets will overload the message. + // More than OFFER_RECIPIENT_LIMIT targets will overload the message + // producing an llerror. LLSD args; args["OFFERS"] = notification["payload"]["ids"].size(); + args["LIMIT"] = static_cast(OFFER_RECIPIENT_LIMIT); LLNotificationsUtil::add("TooManyTeleportOffers", args); return false; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 21680772ba..6707a09ddf 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3700,8 +3700,8 @@ Join me in [REGION] icon="alertmodal.tga" name="TooManyTeleportOffers" type="alertmodal"> -You attempted to make [OFFERS] teleport offers; -250 are the most that can be done at one time +You attempted to make [OFFERS] teleport offers +which exceeds the limit of [LIMIT]. group fail Date: Thu, 16 Jun 2011 23:53:41 +0300 Subject: STORM-1352 WIP Attempting to fix a crash in LLNearbyChatScreenChannel::showToastsBottom(). Apparently, a nearby chat toast got somehow destroyed while still remaining in the list of active toasts. Attempt to sort active toasts in showToastsBottom() then triggered the crash. I don't know how to reproduce the crash, i.e. force destroying a toast in a way that its onClose() method (which would remove references to the toast) isn't called. So we'll just remove references to the toast whenever it's destroyed. --- indra/newview/llnearbychathandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 11dc496311..ae44c76038 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -268,6 +268,9 @@ bool LLNearbyChatScreenChannel::createPoolToast() toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1)); + // If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352). + toast->setOnToastDestroyedCallback(boost::bind(&LLNearbyChatScreenChannel::onToastDestroyed, this, _1, false)); + LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl; m_toast_pool.push_back(toast->getHandle()); return true; @@ -371,6 +374,8 @@ void LLNearbyChatScreenChannel::arrangeToasts() int sort_toasts_predicate(LLHandle first, LLHandle second) { + if (!first.get() || !second.get()) return 0; // STORM-1352 + F32 v1 = first.get()->getTimeLeftToLive(); F32 v2 = second.get()->getTimeLeftToLive(); return v1 > v2; -- cgit v1.2.3 From 274266badcddc3733c9dc145b2df57dab0455858 Mon Sep 17 00:00:00 2001 From: LanceCorrimal Date: Fri, 17 Jun 2011 09:19:42 +0200 Subject: Changed popups for accepting inv offers from SystemMessage to SystemMessageTip: STORM-323 --- indra/newview/llviewermessage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 01a5cb18db..743e4e1469 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1502,7 +1502,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessageTip", args); } break; @@ -1676,7 +1676,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessageTip", args); } // we will want to open this item when it comes back. @@ -1727,7 +1727,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const LLSD args; args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessageTip", args); } if (busy && (!mFromGroup && !mFromObject)) -- cgit v1.2.3 From f86a488231dc9a629d44a9f6aa6bfc9aa0eb57b4 Mon Sep 17 00:00:00 2001 From: Squire Date: Fri, 17 Jun 2011 11:05:31 -0700 Subject: CHOP-662 - initial fix to problems with regex characters in Group names causing the LLDirIterator to crash the viewer when opening chat logs --- indra/llvfs/CMakeLists.txt | 1 + indra/llvfs/lldiriterator.cpp | 21 ++++++++--- indra/llvfs/tests/lldiriterator_test.cpp | 62 ++++++++++++++++++++++++++++++++ indra/newview/lllogchat.cpp | 2 +- 4 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 indra/llvfs/tests/lldiriterator_test.cpp (limited to 'indra') diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index b6d1ce61e5..f89da4d6c5 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -80,6 +80,7 @@ if (LL_TESTS) # UNIT TESTS SET(llvfs_TEST_SOURCE_FILES # none so far + lldiriterator.cpp ) LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}") diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp index 041436ed92..3b132862ad 100644 --- a/indra/llvfs/lldiriterator.cpp +++ b/indra/llvfs/lldiriterator.cpp @@ -121,6 +121,14 @@ bool LLDirIterator::Impl::next(std::string &fname) return found; } +/* +converts the incoming glob into a regex. This involves +converting incoming glob expressions to regex equivilents and +at the same time, escaping any regex meaningful characters which +do not have glob meaning, i.e. + .()+|^$ +in the input +*/ std::string glob_to_regex(const std::string& glob) { std::string regex; @@ -135,9 +143,6 @@ std::string glob_to_regex(const std::string& glob) switch (c) { - case '.': - regex+="\\."; - break; case '*': if (glob.begin() == i) { @@ -170,7 +175,15 @@ std::string glob_to_regex(const std::string& glob) case '!': regex+= square_brace_open ? '^' : c; break; - default: + case '.': // This collection have different regex meaning + case '^': // And so need escaping + case '(': + case ')': + case '+': + case '|': + case '$': + regex+='\\'; + default: regex+=c; break; } diff --git a/indra/llvfs/tests/lldiriterator_test.cpp b/indra/llvfs/tests/lldiriterator_test.cpp new file mode 100644 index 0000000000..7c2cd49e41 --- /dev/null +++ b/indra/llvfs/tests/lldiriterator_test.cpp @@ -0,0 +1,62 @@ +/** + * @file lldiriterator_test.cpp + * @date 2011-06 + * @brief LLDirIterator test cases. + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only., + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" +#include "lltut.h" +#include "../lldiriterator.h" + + +namespace tut +{ + + struct LLDirIteratorFixture + { + LLDirIteratorFixture() + { + } + }; + typedef test_group LLDirIteratorTest_factory; + typedef LLDirIteratorTest_factory::object LLDirIteratorTest_t; + LLDirIteratorTest_factory tf("LLDirIterator"); + + /* + CHOP-662 was originally introduced to deal with crashes deleting files from + a directory (VWR-25500). However, this introduced a crash looking for + old chat logs as the glob_to_regex function in lldiriterator wasn't escaping lots of regexp characters + */ + void test_chop_662(void) + { + LLDirIterator iter(".","+bad-group-name]+??-??.*"); + } + + template<> template<> + void LLDirIteratorTest_t::test<1>() + { + test_chop_662(); + } + +} \ No newline at end of file diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index efc4e23838..ebb5912ace 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -230,7 +230,7 @@ std::string LLLogChat::makeLogFileName(std::string filename) std::string LLLogChat::cleanFileName(std::string filename) { - std::string invalidChars = "\"\'\\/?*:.<>|"; + std::string invalidChars = "\"\'\\/?*:.<>|[]{}~"; // Cannot match glob or illegal filename chars std::string::size_type position = filename.find_first_of(invalidChars); while (position != filename.npos) { -- cgit v1.2.3 From 29f1b466e66fd5a98926ac7318287c22f74e32bf Mon Sep 17 00:00:00 2001 From: Squire Date: Fri, 17 Jun 2011 14:13:01 -0700 Subject: COP-662 Added newline at end of file for Linux build --- indra/llvfs/tests/lldiriterator_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llvfs/tests/lldiriterator_test.cpp b/indra/llvfs/tests/lldiriterator_test.cpp index 7c2cd49e41..0e7017f59f 100644 --- a/indra/llvfs/tests/lldiriterator_test.cpp +++ b/indra/llvfs/tests/lldiriterator_test.cpp @@ -59,4 +59,4 @@ namespace tut test_chop_662(); } -} \ No newline at end of file +} -- cgit v1.2.3 From 3a25753bcf46cc8d36bcf3d3bf21d9d0d94dbd34 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Fri, 17 Jun 2011 16:16:01 -0700 Subject: STORM-1368 Code more defensively around notecard upload. --- indra/newview/llpreviewnotecard.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 9f3ee6ac5d..4974dde282 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -401,15 +401,14 @@ struct LLSaveNotecardInfo bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) { - if(!gAssetStorage) + LLViewerTextEditor* editor = getChild("Notecard Editor"); + + if(!editor) { - llwarns << "Not connected to an asset storage system." << llendl; + llwarns << "Cannot get handle to the notecard editor." << llendl; return false; } - - LLViewerTextEditor* editor = getChild("Notecard Editor"); - if(!editor->isPristine()) { // We need to update the asset information @@ -436,8 +435,15 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) // save it out to database if (item) { - std::string agent_url = gAgent.getRegion()->getCapability("UpdateNotecardAgentInventory"); - std::string task_url = gAgent.getRegion()->getCapability("UpdateNotecardTaskInventory"); + const LLViewerRegion* region = gAgent.getRegion(); + if (!region) + { + llwarns << "Not connected to a region, cannot save notecard." << llendl; + return false; + } + std::string agent_url = region->getCapability("UpdateNotecardAgentInventory"); + std::string task_url = region->getCapability("UpdateNotecardTaskInventory"); + if (mObjectUUID.isNull() && !agent_url.empty()) { // Saving into agent inventory @@ -472,6 +478,11 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) (void*)info, FALSE); } + else // !gAssetStorage + { + llwarns << "Not connected to an asset storage system." << llendl; + return false; + } } } return true; -- cgit v1.2.3 From c0971cd0a196dfcf9bd1be9fc2c77c817438c24a Mon Sep 17 00:00:00 2001 From: Squire Date: Fri, 17 Jun 2011 16:46:31 -0700 Subject: CHOP-662 Added booost library to unittest for lldiriterator.cpp --- indra/llvfs/CMakeLists.txt | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index f89da4d6c5..2c581cf8d6 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -62,11 +62,15 @@ list(APPEND llvfs_SOURCE_FILES ${llvfs_HEADER_FILES}) add_library (llvfs ${llvfs_SOURCE_FILES}) -target_link_libraries(llvfs +set(vfs_BOOST_LIBRARIES ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ) +target_link_libraries(llvfs + ${vfs_BOOST_LIBRARIES} + ) + if (DARWIN) include(CMakeFindFrameworks) find_library(CARBON_LIBRARY Carbon) @@ -76,16 +80,21 @@ endif (DARWIN) # Add tests if (LL_TESTS) - include(LLAddBuildTest) - # UNIT TESTS - SET(llvfs_TEST_SOURCE_FILES - # none so far - lldiriterator.cpp - ) - LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}") - - # INTEGRATION TESTS - set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) - # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. - LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}") + include(LLAddBuildTest) + # UNIT TESTS + SET(llvfs_TEST_SOURCE_FILES + lldiriterator.cpp + ) + + set_source_files_properties(lldiriterator.cpp + PROPERTIES + LL_TEST_ADDITIONAL_LIBRARIES "${vfs_BOOST_LIBRARIES}" + ) + LL_ADD_PROJECT_UNIT_TESTS(llvfs "${llvfs_TEST_SOURCE_FILES}") + + # INTEGRATION TESTS + set(test_libs llmath llcommon llvfs ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + + # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. + LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}") endif (LL_TESTS) -- cgit v1.2.3 From b91205ccf041df02323519bfdf86784a13d05748 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 18 Jun 2011 07:00:55 -0400 Subject: STORM-1392 Add Nearby Voice to the Communicate menu --- indra/newview/llbottomtray.cpp | 3 ++- indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 01d19c5ba0..79e6c7b66b 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -386,6 +386,7 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b { bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); getChild("speak_flyout_btn")->setEnabled(voice_status); + gMenuBarView->getChild("Nearby Voice")->setEnabled(voice_status); if (voice_status) { LLFirstUse::speak(true); @@ -570,7 +571,7 @@ BOOL LLBottomTray::postBuild() // it takes some time between logging in to world and connecting to voice channel. getChild("speak_btn")->setEnabled(false); getChild("speak_flyout_btn")->setEnabled(false); - + gMenuBarView->getChild("Nearby Voice")->setEnabled(false); // Registering Chat Bar to receive Voice client status change notifications. LLVoiceClient::getInstance()->addObserver(this); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 81046e99a0..a0d0c8625e 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -232,6 +232,16 @@ function="SideTray.PanelPeopleTab" parameter="nearby_panel" /> + + + + Date: Sun, 19 Jun 2011 07:07:31 -0400 Subject: STORM-1396 Storm-787 (mute gestures) also mutes sounds from objects --- indra/newview/llviewermessage.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7ab335314a..c3665f8128 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4326,8 +4326,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **) } // Don't play sounds from gestures if they are not enabled. - if (!gSavedSettings.getBOOL("EnableGestureSounds")) return; - + if (object_id == owner_id && !gSavedSettings.getBOOL("EnableGestureSounds")) + { + return; + } + gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global); } -- cgit v1.2.3 From 6fa808db363b6d6e06e3b31d4acf4258497fb5ee Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 20 Jun 2011 16:56:52 +0300 Subject: STORM-1352 WIP Changed sort functor return type to bool. --- indra/newview/llnearbychathandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index ae44c76038..2f4621a600 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -372,9 +372,9 @@ void LLNearbyChatScreenChannel::arrangeToasts() } } -int sort_toasts_predicate(LLHandle first, LLHandle second) +static bool sort_toasts_predicate(LLHandle first, LLHandle second) { - if (!first.get() || !second.get()) return 0; // STORM-1352 + if (!first.get() || !second.get()) return false; // STORM-1352 F32 v1 = first.get()->getTimeLeftToLive(); F32 v2 = second.get()->getTimeLeftToLive(); -- cgit v1.2.3 From edc0e31bc29f77a821f5ff8a0cb6cf9ba982eb7d Mon Sep 17 00:00:00 2001 From: Wolfpup Lowenhar Date: Mon, 20 Jun 2011 11:55:46 -0400 Subject: STORM-1393 : Correction for loss of object/prim counts in the Build floater for non-mesh objects. --- indra/newview/llfloatertools.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 0d798afdcc..33b7777d2e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -424,8 +424,7 @@ void LLFloaterTools::refresh() // Refresh object and prim count labels LLLocale locale(LLLocale::USER_LOCALE); -#if 0 - if (gMeshRepo.meshRezEnabled()) + if (!gMeshRepo.meshRezEnabled()) { std::string obj_count_string; LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()); @@ -449,7 +448,6 @@ void LLFloaterTools::refresh() getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost); } else -#endif { // Get the number of objects selected std::string root_object_count_string; -- cgit v1.2.3 From 306759835d8aed3a041a59dafaa20a8c708e2dd4 Mon Sep 17 00:00:00 2001 From: Squire Date: Mon, 20 Jun 2011 11:07:17 -0700 Subject: Added more tests to cover the common examples in the crash logs --- indra/llvfs/tests/lldiriterator_test.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/llvfs/tests/lldiriterator_test.cpp b/indra/llvfs/tests/lldiriterator_test.cpp index 0e7017f59f..aacc5a616a 100644 --- a/indra/llvfs/tests/lldiriterator_test.cpp +++ b/indra/llvfs/tests/lldiriterator_test.cpp @@ -50,7 +50,10 @@ namespace tut */ void test_chop_662(void) { + // Check a selection of bad group names from the crash reports LLDirIterator iter(".","+bad-group-name]+??-??.*"); + LLDirIterator iter(".","))--@---bad-group-name2((??-??.*\.txt"); + LLDirIterator iter(".","__^v--x)Cuide d sua vida(x--v^__??-??.*"); } template<> template<> -- cgit v1.2.3 From 47c49b5bc564675b4e4b5c21f3c5ea0005980ae6 Mon Sep 17 00:00:00 2001 From: eli_linden Date: Mon, 20 Jun 2011 11:22:02 -0700 Subject: sync with viewer-development --- .../skins/default/xui/en/floater_model_preview.xml | 16 ++++++++++++++++ .../skins/default/xui/en/floater_model_wizard.xml | 4 +++- indra/newview/skins/default/xui/en/floater_tools.xml | 11 ++++------- indra/newview/skins/default/xui/en/notifications.xml | 4 +++- 4 files changed, 26 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index dce55dae12..f58595b3c5 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -4,9 +4,11 @@ name="Model Preview" title="Upload Model" width="620"> Idle + Dae parsing issue - see log for details. Loading... Generating Meshes... Error: Vertex number is more than 65534, aborted! + Error: element is invalid High Medium Low @@ -83,6 +85,20 @@ + + + I confirm that I have the appropriate rights to the material contained in this model. [secondlife:///app/floater/learn_more Learn more] [STATUS] diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index 47b2e5fd79..8603682e3a 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -1019,9 +1019,11 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se Idle + Dae parsing issue - see log for details. Loading... Generating Meshes... - Error: Vertex number is more than 65534, aborted! + Error: Vertex number is more than 65534, aborted! + Error: element is invalid High Medium Low diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 40bf7bfed7..7441b2cd9c 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2098,11 +2098,7 @@ even though the user gets a free copy. label="Cylinder" name="Cylinder" value="Cylinder" /> - - + - [LABEL] failed to upload: [MESSAGE] [IDENTIFIER] [INVALIDITY_IDENTIFIER] + [LABEL] failed to upload: [MESSAGE] [IDENTIFIER] + +See the log file for details. Date: Mon, 20 Jun 2011 12:17:25 -0700 Subject: CHOP-662 Coupl of fixes to extended unit-test --- indra/llvfs/tests/lldiriterator_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llvfs/tests/lldiriterator_test.cpp b/indra/llvfs/tests/lldiriterator_test.cpp index aacc5a616a..505d86faa7 100644 --- a/indra/llvfs/tests/lldiriterator_test.cpp +++ b/indra/llvfs/tests/lldiriterator_test.cpp @@ -52,8 +52,8 @@ namespace tut { // Check a selection of bad group names from the crash reports LLDirIterator iter(".","+bad-group-name]+??-??.*"); - LLDirIterator iter(".","))--@---bad-group-name2((??-??.*\.txt"); - LLDirIterator iter(".","__^v--x)Cuide d sua vida(x--v^__??-??.*"); + LLDirIterator iter1(".","))--@---bad-group-name2((??-??.*\\.txt"); + LLDirIterator iter2(".","__^v--x)Cuide d sua vida(x--v^__??-??.*"); } template<> template<> -- cgit v1.2.3 From d95cc1712f1fd9eb0ab06534b54be9e5449f66ba Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 21 Jun 2011 01:22:32 +0300 Subject: STORM-1352 WIP Issue a warning if a NULL chat toast is encountered. --- indra/newview/llnearbychathandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 2f4621a600..68c8d5854e 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -401,7 +401,11 @@ void LLNearbyChatScreenChannel::showToastsBottom() for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { LLToast* toast = it->get(); - if (!toast) continue; + if (!toast) + { + llwarns << "NULL found in the active chat toasts list!" << llendl; + continue; + } S32 toast_top = bottom + toast->getRect().getHeight() + margin; -- cgit v1.2.3 From fae829c8eface8cf356b63cbb82587d6950bdd79 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 21 Jun 2011 08:54:34 -0700 Subject: Fix EXP-825: check for null gAgentAvatarp to prevent crash (hopefully). --- indra/newview/lltoolpie.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9ec4d33036..c38c8bad80 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -639,6 +639,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) if (click_action == CLICK_ACTION_NONE // not doing 1-click action && gSavedSettings.getBOOL("ClickToWalk") // click to walk enabled && !gAgent.getFlying() // don't auto-navigate while flying until that works + && gAgentAvatarp && !gAgentAvatarp->isSitting() && !mBlockClickToWalk // another behavior hasn't cancelled click to walk && !mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick -- cgit v1.2.3 From 6977c09a88f5591c135df2f8f37eaa544402e69a Mon Sep 17 00:00:00 2001 From: eli_linden Date: Tue, 21 Jun 2011 11:58:54 -0700 Subject: FIX VWR-25071 --- .../newview/skins/default/xui/ja/floater_tools.xml | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index b29f744a68..f7d77d351e 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -74,8 +74,8 @@ 両側を延ばす - - + + @@ -137,7 +137,7 @@ 料金: [COST] / [PHYSICS] - + 譲渡 @@ -379,22 +379,22 @@ オブジェクトの特徴を編集: - - - - - - - - + + + + + + + + - + - + - + - + 実像の種類: @@ -496,18 +496,18 @@ - -- cgit v1.2.3 From 44308a50c2389b3d021d5f6bfa125b06f1b643d1 Mon Sep 17 00:00:00 2001 From: eli_linden Date: Fri, 24 Jun 2011 11:09:26 -0700 Subject: sync with viewer-development --- indra/newview/skins/default/xui/en/panel_cof_wearables.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index bbeb592e96..9e70706603 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -52,7 +52,7 @@ multi_select="true" name="list_attachments" top="0" - width="311"> + width="311"/> Date: Sat, 25 Jun 2011 11:08:36 -0400 Subject: STORM-1326 [ALL LANGS] (Spanish) [HARDCODED] Selling land, advice with "Anyone" in English. --- indra/newview/llfloaterauction.cpp | 3 ++- indra/newview/llfloatersellland.cpp | 3 ++- indra/newview/skins/default/xui/en/strings.xml | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index c95b046707..c6743ca13b 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -55,6 +55,7 @@ #include "llrender.h" #include "llsdutil.h" #include "llsdutil_math.h" +#include "lltrans.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -457,7 +458,7 @@ void LLFloaterAuction::onClickSellToAnyone(void* data) LLSD args; args["LAND_SIZE"] = llformat("%d", area); args["SALE_PRICE"] = llformat("%d", sale_price); - args["NAME"] = "Anyone"; + args["NAME"] = LLTrans::getString("Anyone"); LLNotification::Params params("ConfirmLandSaleChange"); // Re-use existing dialog params.substitutions(args) diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 8558a1277c..3434841d09 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -41,6 +41,7 @@ #include "llviewerparcelmgr.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include "lltrans.h" class LLAvatarName; @@ -451,7 +452,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) // Do a confirmation S32 sale_price = self->getChild("price")->getValue(); S32 area = parcel->getArea(); - std::string authorizedBuyerName = "Anyone"; + std::string authorizedBuyerName = LLTrans::getString("Anyone"); bool sell_to_anyone = true; if ("user" == self->getChild("sell_to")->getValue().asString()) { diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 71f48c833d..143a989d32 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2250,6 +2250,9 @@ Returns a string with the requested data about the region mainland teen + + anyone + error -- cgit v1.2.3 From 9a40b84beded2bb0d0d2adb062b1611bdeb756ed Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 25 Jun 2011 16:37:10 -0400 Subject: STORM-1302 (all langs) [TRANSLATED BUT IN ENG] (Spanish) Side Menu > Gente tab > MIS AMIGOS tab > buttons "Call", "Share" and "Teleport" and their tooltips --- indra/newview/skins/default/xui/da/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/de/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/en/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/es/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/fr/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/it/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/ja/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/pl/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/pt/panel_people.xml | 8 ++++---- indra/newview/skins/default/xui/zh/panel_people.xml | 8 ++++---- 10 files changed, 40 insertions(+), 40 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml index 925492b2d7..66a128cd13 100644 --- a/indra/newview/skins/default/xui/da/panel_people.xml +++ b/indra/newview/skins/default/xui/da/panel_people.xml @@ -66,16 +66,16 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap Verd