summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt3
-rwxr-xr-x[-rw-r--r--]indra/cmake/LLAddBuildTest.cmake2
-rw-r--r--indra/cmake/LLCommon.cmake2
-rw-r--r--indra/cmake/NVAPI.cmake16
-rw-r--r--indra/linux_updater/CMakeLists.txt51
-rw-r--r--indra/linux_updater/linux_updater.cpp926
-rw-r--r--indra/llcharacter/llbvhconsts.h2
-rw-r--r--indra/llcharacter/llmotioncontroller.cpp5
-rw-r--r--indra/llcharacter/llmotioncontroller.h6
-rw-r--r--indra/llcharacter/llvisualparam.h3
-rw-r--r--indra/llcommon/llfasttimer.cpp54
-rw-r--r--indra/llcommon/llinitparam.h181
-rw-r--r--indra/llimage/llimage.cpp2
-rw-r--r--[-rwxr-xr-x]indra/llimage/llimagej2c.cpp0
-rw-r--r--indra/llinventory/llparcel.cpp2
-rw-r--r--indra/llinventory/llparcel.h1
-rw-r--r--[-rwxr-xr-x]indra/llkdu/tests/llimagej2ckdu_test.cpp0
-rw-r--r--indra/llmath/lloctree.h2
-rw-r--r--indra/llmath/tests/alignment_test.cpp6
-rw-r--r--indra/llmessage/llurlrequest.cpp7
-rw-r--r--indra/llmessage/llxfermanager.cpp13
-rw-r--r--[-rwxr-xr-x]indra/llprimitive/llprimitive.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llrender/llimagegl.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llrender/llimagegl.h0
-rw-r--r--indra/llui/llnotifications.cpp7
-rw-r--r--indra/llui/llnotifications.h1
-rw-r--r--indra/llui/lltoolbar.cpp10
-rw-r--r--indra/llui/lltoolbar.h3
-rw-r--r--indra/llwindow/llwindow.cpp7
-rw-r--r--indra/llwindow/llwindow.h2
-rw-r--r--indra/llwindow/llwindowsdl.cpp17
-rw-r--r--indra/llxml/llcontrol.h1
-rw-r--r--indra/media_plugins/webkit/windows_volume_catcher.cpp52
-rw-r--r--[-rwxr-xr-x]indra/newview/CMakeLists.txt3
-rw-r--r--[-rwxr-xr-x]indra/newview/app_settings/settings.xml12
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/previewF.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/previewV.glsl57
-rw-r--r--indra/newview/llagentcamera.cpp6
-rw-r--r--indra/newview/llappviewer.cpp19
-rw-r--r--indra/newview/llappviewer.h2
-rw-r--r--indra/newview/llappviewerwin32.cpp123
-rw-r--r--indra/newview/llchathistory.cpp13
-rw-r--r--indra/newview/lldebugview.cpp2
-rw-r--r--indra/newview/lldrawable.cpp72
-rw-r--r--indra/newview/lldrawable.h20
-rw-r--r--indra/newview/lldriverparam.h5
-rw-r--r--[-rwxr-xr-x]indra/newview/llface.cpp4
-rw-r--r--indra/newview/llfasttimerview.cpp4
-rw-r--r--indra/newview/llfasttimerview.h16
-rw-r--r--indra/newview/llfeaturemanager.cpp1
-rw-r--r--indra/newview/llfeaturemanager.h5
-rw-r--r--indra/newview/llflexibleobject.cpp8
-rw-r--r--indra/newview/llfloaterbuycontents.cpp22
-rw-r--r--indra/newview/llfloatercolorpicker.cpp2
-rw-r--r--indra/newview/llfloaterimagepreview.cpp4
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp95
-rw-r--r--indra/newview/llfloatermodelpreview.h9
-rw-r--r--indra/newview/llfloatertools.cpp11
-rw-r--r--indra/newview/llfloatertools.h2
-rw-r--r--indra/newview/llfloaterurlentry.cpp3
-rw-r--r--indra/newview/llinventorybridge.cpp6
-rw-r--r--indra/newview/llmanip.cpp9
-rw-r--r--indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp1
-rwxr-xr-xindra/newview/llmeshrepository.cpp131
-rw-r--r--indra/newview/llmeshrepository.h8
-rw-r--r--indra/newview/llmoveview.cpp15
-rw-r--r--indra/newview/llmoveview.h2
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp3
-rw-r--r--indra/newview/llnotificationstorage.cpp56
-rw-r--r--indra/newview/llpaneleditwearable.cpp2
-rw-r--r--indra/newview/llpanelmaininventory.cpp2
-rw-r--r--indra/newview/llpaneloutfitedit.cpp14
-rw-r--r--indra/newview/llpanelpermissions.cpp2
-rw-r--r--indra/newview/llpolymesh.cpp2
-rw-r--r--indra/newview/llpolymesh.h7
-rw-r--r--indra/newview/llpolymorph.cpp18
-rw-r--r--indra/newview/llpolymorph.h6
-rw-r--r--indra/newview/llselectmgr.cpp297
-rw-r--r--indra/newview/llselectmgr.h8
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp4
-rw-r--r--indra/newview/llsidepaneltaskinfo.h1
-rw-r--r--indra/newview/llspatialpartition.cpp34
-rw-r--r--indra/newview/llspatialpartition.h16
-rw-r--r--[-rwxr-xr-x]indra/newview/llstartup.cpp2
-rw-r--r--[-rwxr-xr-x]indra/newview/llstartup.h0
-rw-r--r--indra/newview/lltexlayerparams.h18
-rwxr-xr-x[-rw-r--r--]indra/newview/lltexturefetch.cpp332
-rw-r--r--indra/newview/lltexturefetch.h14
-rw-r--r--[-rwxr-xr-x]indra/newview/lltextureview.cpp0
-rw-r--r--indra/newview/lltoolbarview.cpp8
-rw-r--r--indra/newview/lltoolbarview.h4
-rw-r--r--indra/newview/lltoolpie.cpp7
-rw-r--r--indra/newview/llviewercontrol.cpp17
-rw-r--r--indra/newview/llviewermedia.cpp6
-rw-r--r--indra/newview/llviewermenu.cpp125
-rw-r--r--indra/newview/llviewermenu.h3
-rwxr-xr-xindra/newview/llviewermessage.cpp26
-rw-r--r--indra/newview/llviewerobject.cpp48
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerobjectlist.cpp16
-rw-r--r--indra/newview/llviewerregion.cpp20
-rw-r--r--indra/newview/llviewershadermgr.cpp13
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerstats.cpp4
-rw-r--r--indra/newview/llviewerstats.h4
-rw-r--r--indra/newview/llviewerstatsrecorder.cpp8
-rw-r--r--indra/newview/llviewertexture.cpp10
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewertexture.h0
-rw-r--r--indra/newview/llviewertexturelist.cpp6
-rw-r--r--indra/newview/llviewervisualparam.h3
-rwxr-xr-xindra/newview/llviewerwindow.cpp20
-rw-r--r--[-rwxr-xr-x]indra/newview/llvoavatar.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llvoavatarself.cpp4
-rw-r--r--indra/newview/llvovolume.cpp26
-rw-r--r--indra/newview/llworld.cpp4
-rw-r--r--indra/newview/pipeline.cpp29
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_add.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml52
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml1688
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml8
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml1088
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/strings.xml2
-rw-r--r--indra/newview/viewer_manifest.py14
-rw-r--r--indra/viewer_components/updater/scripts/linux/update_install219
125 files changed, 4040 insertions, 2405 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 24c98bfada..001bb4b935 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -82,8 +82,7 @@ if (VIEWER)
if (LINUX)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
- add_subdirectory(${VIEWER_PREFIX}linux_updater)
- add_dependencies(viewer linux-crash-logger-strip-target linux-updater)
+ add_dependencies(viewer linux-crash-logger-strip-target)
elseif (DARWIN)
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
add_subdirectory(${VIEWER_PREFIX}mac_updater)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 21a0c8a9ca..9bb3077797 100644..100755
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -211,7 +211,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
if (WINDOWS)
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname}
PROPERTIES
- LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
+ LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE ""
)
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 8f7bb296ce..c254bf6f05 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -22,7 +22,7 @@ else (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
endif (LINUX)
-add_definitions(${TCMALLOC_FLAG})
+# add_definitions(${TCMALLOC_FLAG})
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
if(LLCOMMON_LINK_SHARED)
diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake
new file mode 100644
index 0000000000..105f442a30
--- /dev/null
+++ b/indra/cmake/NVAPI.cmake
@@ -0,0 +1,16 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+set(NVAPI ON CACHE BOOL "Use NVAPI.")
+
+if (NVAPI)
+ if (WINDOWS)
+ use_prebuilt_binary(nvapi)
+ set(NVAPI_LIBRARY nvapi)
+ else (WINDOWS)
+ set(NVAPI_LIBRARY "")
+ endif (WINDOWS)
+else (NVAPI)
+ set(NVAPI_LIBRARY "")
+endif (NVAPI)
+
diff --git a/indra/linux_updater/CMakeLists.txt b/indra/linux_updater/CMakeLists.txt
deleted file mode 100644
index 4377a6333c..0000000000
--- a/indra/linux_updater/CMakeLists.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- cmake -*-
-
-project(linux_updater)
-
-include(00-Common)
-include(CURL)
-include(CARes)
-include(OpenSSL)
-include(UI)
-include(LLCommon)
-include(LLVFS)
-include(LLXML)
-include(LLUI)
-include(Linking)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLVFS_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- ${LLUI_INCLUDE_DIRS}
- ${CURL_INCLUDE_DIRS}
- ${CARES_INCLUDE_DIRS}
- ${OPENSSL_INCLUDE_DIRS}
- ${UI_INCLUDE_DIRS}
- )
-
-set(linux_updater_SOURCE_FILES linux_updater.cpp)
-
-set(linux_updater_HEADER_FILES CMakeLists.txt)
-
-set_source_files_properties(${linux_updater_HEADER_FILES}
- PROPERTIES HEADER_FILES_ONLY TRUE)
-
-list(APPEND linux_updater_SOURCE_FILES ${linux_updater_HEADER_FILES})
-
-add_executable(linux-updater ${linux_updater_SOURCE_FILES})
-
-target_link_libraries(linux-updater
- ${CURL_LIBRARIES}
- ${CARES_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${UI_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLUI_LIBRARIES}
- ${LLVFS_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- )
-
-add_custom_target(linux-updater-target ALL
- DEPENDS linux-updater)
diff --git a/indra/linux_updater/linux_updater.cpp b/indra/linux_updater/linux_updater.cpp
deleted file mode 100644
index 991dfd9dce..0000000000
--- a/indra/linux_updater/linux_updater.cpp
+++ /dev/null
@@ -1,926 +0,0 @@
-/**
- * @file linux_updater.cpp
- * @author Kyle Ambroff <ambroff@lindenlab.com>, Tofu Linden
- * @brief Viewer update program for unix platforms that support GTK+
- *
- * $LicenseInfo:firstyear=2008&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, 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 <unistd.h>
-#include <signal.h>
-#include <errno.h>
-
-#include "linden_common.h"
-#include "llerrorcontrol.h"
-#include "llfile.h"
-#include "lldir.h"
-#include "lldiriterator.h"
-
-/*==========================================================================*|
-// IQA-490: Use of LLTrans -- by this program at least -- appears to be buggy.
-// With it, the 3.3.2 beta 1 linux-updater.bin crashes; without it seems stable.
-#include "llxmlnode.h"
-#include "lltrans.h"
-|*==========================================================================*/
-
-static class LLTrans
-{
-public:
- LLTrans();
- static std::string getString(const std::string& key);
-
-private:
- std::string _getString(const std::string& key) const;
-
- typedef std::map<std::string, std::string> MessageMap;
- MessageMap mMessages;
-} sLLTransInstance;
-
-#include <curl/curl.h>
-#include <map>
-#include <boost/foreach.hpp>
-
-extern "C" {
-#include <gtk/gtk.h>
-}
-
-const guint UPDATE_PROGRESS_TIMEOUT = 100;
-const guint UPDATE_PROGRESS_TEXT_TIMEOUT = 1000;
-const guint ROTATE_IMAGE_TIMEOUT = 8000;
-
-typedef struct _updater_app_state {
- std::string app_name;
- std::string url;
- std::string file;
- std::string image_dir;
- std::string dest_dir;
- std::string strings_dirs;
- std::string strings_file;
-
- LLDirIterator *image_dir_iter;
-
- GtkWidget *window;
- GtkWidget *progress_bar;
- GtkWidget *image;
-
- double progress_value;
- bool activity_mode;
-
- guint image_rotation_timeout_id;
- guint progress_update_timeout_id;
- guint update_progress_text_timeout_id;
-
- bool failure;
-} UpdaterAppState;
-
-// List of entries from strings.xml to always replace
-static std::set<std::string> default_trans_args;
-void init_default_trans_args()
-{
- default_trans_args.insert("SECOND_LIFE"); // World
- default_trans_args.insert("APP_NAME");
- default_trans_args.insert("SECOND_LIFE_GRID");
- default_trans_args.insert("SUPPORT_SITE");
-}
-
-bool translate_init(std::string comma_delim_path_list,
- std::string base_xml_name)
-{
- return true;
-/*==========================================================================*|
- init_default_trans_args();
-
- // extract paths string vector from comma-delimited flat string
- std::vector<std::string> paths;
- LLStringUtil::getTokens(comma_delim_path_list, paths, ","); // split over ','
-
- for(std::vector<std::string>::iterator it = paths.begin(), end_it = paths.end();
- it != end_it;
- ++it)
- {
- (*it) = gDirUtilp->findSkinnedFilename(*it, base_xml_name);
- }
-
- // suck the translation xml files into memory
- LLXMLNodePtr root;
- bool success = LLXMLNode::getLayeredXMLNode(root, paths);
- if (!success)
- {
- // couldn't load string table XML
- return false;
- }
- else
- {
- // get those strings out of the XML
- LLTrans::parseStrings(root, default_trans_args);
- return true;
- }
-|*==========================================================================*/
-}
-
-
-void updater_app_ui_init(void);
-void updater_app_quit(UpdaterAppState *app_state);
-void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state);
-std::string next_image_filename(std::string& image_path, LLDirIterator& iter);
-void display_error(GtkWidget *parent, std::string title, std::string message);
-BOOL install_package(std::string package_file, std::string destination);
-BOOL spawn_viewer(UpdaterAppState *app_state);
-
-extern "C" {
- void on_window_closed(GtkWidget *sender, GdkEvent *event, gpointer state);
- gpointer worker_thread_cb(gpointer *data);
- int download_progress_cb(gpointer data, double t, double d, double utotal, double ulnow);
- gboolean rotate_image_cb(gpointer data);
- gboolean progress_update_timeout(gpointer data);
- gboolean update_progress_text_timeout(gpointer data);
-}
-
-void updater_app_ui_init(UpdaterAppState *app_state)
-{
- GtkWidget *vbox;
- GtkWidget *summary_label;
- GtkWidget *description_label;
- GtkWidget *frame;
-
- llassert(app_state != NULL);
-
- // set up window and main container
- std::string window_title = LLTrans::getString("UpdaterWindowTitle");
- app_state->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title(GTK_WINDOW(app_state->window),
- window_title.c_str());
- gtk_window_set_resizable(GTK_WINDOW(app_state->window), FALSE);
- gtk_window_set_position(GTK_WINDOW(app_state->window),
- GTK_WIN_POS_CENTER_ALWAYS);
-
- gtk_container_set_border_width(GTK_CONTAINER(app_state->window), 12);
- g_signal_connect(G_OBJECT(app_state->window), "delete-event",
- G_CALLBACK(on_window_closed), app_state);
-
- vbox = gtk_vbox_new(FALSE, 6);
- gtk_container_add(GTK_CONTAINER(app_state->window), vbox);
-
- // set top label
- std::ostringstream label_ostr;
- label_ostr << "<big><b>"
- << LLTrans::getString("UpdaterNowUpdating")
- << "</b></big>";
-
- summary_label = gtk_label_new(NULL);
- gtk_label_set_use_markup(GTK_LABEL(summary_label), TRUE);
- gtk_label_set_markup(GTK_LABEL(summary_label),
- label_ostr.str().c_str());
- gtk_misc_set_alignment(GTK_MISC(summary_label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(vbox), summary_label, FALSE, FALSE, 0);
-
- // create the description label
- description_label = gtk_label_new(LLTrans::getString("UpdaterUpdatingDescriptive").c_str());
- gtk_label_set_line_wrap(GTK_LABEL(description_label), TRUE);
- gtk_misc_set_alignment(GTK_MISC(description_label), 0, 0.5);
- gtk_box_pack_start(GTK_BOX(vbox), description_label, FALSE, FALSE, 0);
-
- // If an image path has been set, load the background images
- if (!app_state->image_dir.empty()) {
- frame = gtk_frame_new(NULL);
- gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
- gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
-
- // load the first image
- app_state->image = gtk_image_new_from_file
- (next_image_filename(app_state->image_dir, *app_state->image_dir_iter).c_str());
- gtk_widget_set_size_request(app_state->image, 340, 310);
- gtk_container_add(GTK_CONTAINER(frame), app_state->image);
-
- // rotate the images every 5 seconds
- app_state->image_rotation_timeout_id = g_timeout_add
- (ROTATE_IMAGE_TIMEOUT, rotate_image_cb, app_state);
- }
-
- // set up progress bar, and update it roughly every 1/10 of a second
- app_state->progress_bar = gtk_progress_bar_new();
- gtk_progress_bar_set_text(GTK_PROGRESS_BAR(app_state->progress_bar),
- LLTrans::getString("UpdaterProgressBarTextWithEllipses").c_str());
- gtk_box_pack_start(GTK_BOX(vbox),
- app_state->progress_bar, FALSE, TRUE, 0);
- app_state->progress_update_timeout_id = g_timeout_add
- (UPDATE_PROGRESS_TIMEOUT, progress_update_timeout, app_state);
- app_state->update_progress_text_timeout_id = g_timeout_add
- (UPDATE_PROGRESS_TEXT_TIMEOUT, update_progress_text_timeout, app_state);
-
- gtk_widget_show_all(app_state->window);
-}
-
-gboolean rotate_image_cb(gpointer data)
-{
- UpdaterAppState *app_state;
- std::string filename;
-
- llassert(data != NULL);
- app_state = (UpdaterAppState *) data;
-
- filename = next_image_filename(app_state->image_dir, *app_state->image_dir_iter);
-
- gdk_threads_enter();
- gtk_image_set_from_file(GTK_IMAGE(app_state->image), filename.c_str());
- gdk_threads_leave();
-
- return TRUE;
-}
-
-std::string next_image_filename(std::string& image_path, LLDirIterator& iter)
-{
- std::string image_filename;
- iter.next(image_filename);
- return gDirUtilp->add(image_path, image_filename);
-}
-
-void on_window_closed(GtkWidget *sender, GdkEvent* event, gpointer data)
-{
- UpdaterAppState *app_state;
-
- llassert(data != NULL);
- app_state = (UpdaterAppState *) data;
-
- updater_app_quit(app_state);
-}
-
-void updater_app_quit(UpdaterAppState *app_state)
-{
- if (app_state != NULL)
- {
- g_source_remove(app_state->progress_update_timeout_id);
-
- if (!app_state->image_dir.empty())
- {
- g_source_remove(app_state->image_rotation_timeout_id);
- }
- }
-
- gtk_main_quit();
-}
-
-void display_error(GtkWidget *parent, std::string title, std::string message)
-{
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new(GTK_WINDOW(parent),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- "%s", message.c_str());
- gtk_window_set_title(GTK_WINDOW(dialog), title.c_str());
- gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
-}
-
-gpointer worker_thread_cb(gpointer data)
-{
- UpdaterAppState *app_state;
- CURL *curl;
- CURLcode result;
- FILE *package_file;
- GError *error = NULL;
- int fd;
-
- //g_return_val_if_fail (data != NULL, NULL);
- app_state = (UpdaterAppState *) data;
-
- try {
-
- if(!app_state->url.empty())
- {
- char* tmp_local_filename = NULL;
- // create temporary file to store the package.
- fd = g_file_open_tmp
- ("secondlife-update-XXXXXX", &tmp_local_filename, &error);
- if (error != NULL)
- {
- llerrs << "Unable to create temporary file: "
- << error->message
- << llendl;
-
- g_error_free(error);
- throw 0;
- }
-
- if(tmp_local_filename != NULL)
- {
- app_state->file = tmp_local_filename;
- g_free(tmp_local_filename);
- }
-
- package_file = fdopen(fd, "wb");
- if (package_file == NULL)
- {
- llerrs << "Failed to create temporary file: "
- << app_state->file.c_str()
- << llendl;
-
- gdk_threads_enter();
- display_error(app_state->window,
- LLTrans::getString("UpdaterFailDownloadTitle"),
- LLTrans::getString("UpdaterFailUpdateDescriptive"));
- gdk_threads_leave();
- throw 0;
- }
-
- // initialize curl and start downloading the package
- llinfos << "Downloading package: " << app_state->url << llendl;
-
- curl = curl_easy_init();
- if (curl == NULL)
- {
- llerrs << "Failed to initialize libcurl" << llendl;
-
- gdk_threads_enter();
- display_error(app_state->window,
- LLTrans::getString("UpdaterFailDownloadTitle"),
- LLTrans::getString("UpdaterFailUpdateDescriptive"));
- gdk_threads_leave();
- throw 0;
- }
-
- curl_easy_setopt(curl, CURLOPT_URL, app_state->url.c_str());
- curl_easy_setopt(curl, CURLOPT_NOSIGNAL, TRUE);
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, TRUE);
- curl_easy_setopt(curl, CURLOPT_WRITEDATA, package_file);
- curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE);
- curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION,
- &download_progress_cb);
- curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, app_state);
-
- result = curl_easy_perform(curl);
- fclose(package_file);
- curl_easy_cleanup(curl);
-
- if (result)
- {
- llerrs << "Failed to download update: "
- << app_state->url
- << llendl;
-
- gdk_threads_enter();
- display_error(app_state->window,
- LLTrans::getString("UpdaterFailDownloadTitle"),
- LLTrans::getString("UpdaterFailUpdateDescriptive"));
- gdk_threads_leave();
-
- throw 0;
- }
- }
-
- // now pulse the progres bar back and forth while the package is
- // being unpacked
- gdk_threads_enter();
- std::string installing_msg = LLTrans::getString("UpdaterNowInstalling");
- gtk_progress_bar_set_text(
- GTK_PROGRESS_BAR(app_state->progress_bar),
- installing_msg.c_str());
- app_state->activity_mode = TRUE;
- gdk_threads_leave();
-
- // *TODO: if the destination is not writable, terminate this
- // thread and show file chooser?
- if (!install_package(app_state->file.c_str(), app_state->dest_dir))
- {
- llwarns << "Failed to install package to destination: "
- << app_state->dest_dir
- << llendl;
-
- gdk_threads_enter();
- display_error(app_state->window,
- LLTrans::getString("UpdaterFailInstallTitle"),
- LLTrans::getString("UpdaterFailUpdateDescriptive"));
- //"Failed to update " + app_state->app_name,
- gdk_threads_leave();
- throw 0;
- }
-
- // try to spawn the new viewer
- if (!spawn_viewer(app_state))
- {
- llwarns << "Viewer was not installed properly in : "
- << app_state->dest_dir
- << llendl;
-
- gdk_threads_enter();
- display_error(app_state->window,
- LLTrans::getString("UpdaterFailStartTitle"),
- LLTrans::getString("UpdaterFailUpdateDescriptive"));
- gdk_threads_leave();
- throw 0;
- }
- }
- catch (...)
- {
- app_state->failure = TRUE;
- }
-
- gdk_threads_enter();
- updater_app_quit(app_state);
- gdk_threads_leave();
-
- return NULL;
-}
-
-
-gboolean less_anal_gspawnsync(gchar **argv,
- gchar **stderr_output,
- gint *child_exit_status,
- GError **spawn_error)
-{
- // store current SIGCHLD handler if there is one, replace with default
- // handler to make glib happy
- struct sigaction sigchld_backup;
- struct sigaction sigchld_appease_glib;
- sigchld_appease_glib.sa_handler = SIG_DFL;
- sigemptyset(&sigchld_appease_glib.sa_mask);
- sigchld_appease_glib.sa_flags = 0;
- sigaction(SIGCHLD, &sigchld_appease_glib, &sigchld_backup);
-
- gboolean rtn = g_spawn_sync(NULL,
- argv,
- NULL,
- (GSpawnFlags) (G_SPAWN_STDOUT_TO_DEV_NULL),
- NULL,
- NULL,
- NULL,
- stderr_output,
- child_exit_status,
- spawn_error);
-
- // restore SIGCHLD handler
- sigaction(SIGCHLD, &sigchld_backup, NULL);
-
- return rtn;
-}
-
-
-// perform a rename, or perform a (prompted) root rename if that fails
-int
-rename_with_sudo_fallback(const std::string& filename, const std::string& newname)
-{
- int rtncode = ::rename(filename.c_str(), newname.c_str());
- lldebugs << "rename result is: " << rtncode << " / " << errno << llendl;
- if (rtncode && (EACCES == errno || EPERM == errno || EXDEV == errno))
- {
- llinfos << "Permission problem in rename, or moving between different mount points. Retrying as a mv under a sudo." << llendl;
- // failed due to permissions, try again as a gksudo or kdesu mv wrapper hack
- char *sudo_cmd = NULL;
- sudo_cmd = g_find_program_in_path("gksudo");
- if (!sudo_cmd)
- {
- sudo_cmd = g_find_program_in_path("kdesu");
- }
- if (sudo_cmd)
- {
- char *mv_cmd = NULL;
- mv_cmd = g_find_program_in_path("mv");
- if (mv_cmd)
- {
- char *src_string_copy = g_strdup(filename.c_str());
- char *dst_string_copy = g_strdup(newname.c_str());
- char* argv[] =
- {
- sudo_cmd,
- mv_cmd,
- src_string_copy,
- dst_string_copy,
- NULL
- };
-
- gchar *stderr_output = NULL;
- gint child_exit_status = 0;
- GError *spawn_error = NULL;
- if (!less_anal_gspawnsync(argv, &stderr_output,
- &child_exit_status, &spawn_error))
- {
- llwarns << "Failed to spawn child process: "
- << spawn_error->message
- << llendl;
- }
- else if (child_exit_status)
- {
- llwarns << "mv command failed: "
- << (stderr_output ? stderr_output : "(no reason given)")
- << llendl;
- }
- else
- {
- // everything looks good, clear the error code
- rtncode = 0;
- }
-
- g_free(src_string_copy);
- g_free(dst_string_copy);
- if (spawn_error) g_error_free(spawn_error);
- }
- }
- }
- return rtncode;
-}
-
-gboolean install_package(std::string package_file, std::string destination)
-{
- char *tar_cmd = NULL;
- std::ostringstream command;
-
- // Find the absolute path to the 'tar' command.
- tar_cmd = g_find_program_in_path("tar");
- if (!tar_cmd)
- {
- llerrs << "`tar' was not found in $PATH" << llendl;
- return FALSE;
- }
- llinfos << "Found tar command: " << tar_cmd << llendl;
-
- // Unpack the tarball in a temporary place first, then move it to
- // its final destination
- std::string tmp_dest_dir = gDirUtilp->getTempFilename();
- if (LLFile::mkdir(tmp_dest_dir, 0744))
- {
- llerrs << "Failed to create directory: "
- << destination
- << llendl;
-
- return FALSE;
- }
-
- char *package_file_string_copy = g_strdup(package_file.c_str());
- char *tmp_dest_dir_string_copy = g_strdup(tmp_dest_dir.c_str());
- gchar *argv[8] = {
- tar_cmd,
- const_cast<gchar*>("--strip"), const_cast<gchar*>("1"),
- const_cast<gchar*>("-xjf"),
- package_file_string_copy,
- const_cast<gchar*>("-C"), tmp_dest_dir_string_copy,
- NULL,
- };
-
- llinfos << "Untarring package: " << package_file << llendl;
-
- // store current SIGCHLD handler if there is one, replace with default
- // handler to make glib happy
- struct sigaction sigchld_backup;
- struct sigaction sigchld_appease_glib;
- sigchld_appease_glib.sa_handler = SIG_DFL;
- sigemptyset(&sigchld_appease_glib.sa_mask);
- sigchld_appease_glib.sa_flags = 0;
- sigaction(SIGCHLD, &sigchld_appease_glib, &sigchld_backup);
-
- gchar *stderr_output = NULL;
- gint child_exit_status = 0;
- GError *untar_error = NULL;
- if (!less_anal_gspawnsync(argv, &stderr_output,
- &child_exit_status, &untar_error))
- {
- llwarns << "Failed to spawn child process: "
- << untar_error->message
- << llendl;
- return FALSE;
- }
-
- if (child_exit_status)
- {
- llwarns << "Untar command failed: "
- << (stderr_output ? stderr_output : "(no reason given)")
- << llendl;
- return FALSE;
- }
-
- g_free(tar_cmd);
- g_free(package_file_string_copy);
- g_free(tmp_dest_dir_string_copy);
- g_free(stderr_output);
- if (untar_error) g_error_free(untar_error);
-
- // move the existing package out of the way if it exists
- if (gDirUtilp->fileExists(destination))
- {
- std::string backup_dir = destination + ".backup";
- int oldcounter = 1;
- while (gDirUtilp->fileExists(backup_dir))
- {
- // find a foo.backup.N folder name that isn't taken yet
- backup_dir = destination + ".backup." + llformat("%d", oldcounter);
- ++oldcounter;
- }
-
- if (rename_with_sudo_fallback(destination, backup_dir))
- {
- llwarns << "Failed to move directory: '"
- << destination << "' -> '" << backup_dir
- << llendl;
- return FALSE;
- }
- }
-
- // The package has been unpacked in a staging directory, now we just
- // need to move it to its destination.
- if (rename_with_sudo_fallback(tmp_dest_dir, destination))
- {
- llwarns << "Failed to move installation to the destination: "
- << destination
- << llendl;
- return FALSE;
- }
-
- // \0/ Success!
- return TRUE;
-}
-
-gboolean progress_update_timeout(gpointer data)
-{
- UpdaterAppState *app_state;
-
- llassert(data != NULL);
-
- app_state = (UpdaterAppState *) data;
-
- gdk_threads_enter();
- if (app_state->activity_mode)
- {
- gtk_progress_bar_pulse
- (GTK_PROGRESS_BAR(app_state->progress_bar));
- }
- else
- {
- gtk_progress_set_value(GTK_PROGRESS(app_state->progress_bar),
- app_state->progress_value);
- }
- gdk_threads_leave();
-
- return TRUE;
-}
-
-gboolean update_progress_text_timeout(gpointer data)
-{
- UpdaterAppState *app_state;
-
- llassert(data != NULL);
- app_state = (UpdaterAppState *) data;
-
- if (app_state->activity_mode == TRUE)
- {
- // We no longer need this timeout, it will be removed.
- return FALSE;
- }
-
- if (!app_state->progress_value)
- {
- return TRUE;
- }
-
- std::string progress_text = llformat((LLTrans::getString("UpdaterProgressBarText")+" (%.0f%%)").c_str(), app_state->progress_value);
-
- gdk_threads_enter();
- gtk_progress_bar_set_text(GTK_PROGRESS_BAR(app_state->progress_bar),
- progress_text.c_str());
- gdk_threads_leave();
-
- return TRUE;
-}
-
-int download_progress_cb(gpointer data,
- double t,
- double d,
- double utotal,
- double ulnow)
-{
- UpdaterAppState *app_state;
-
- llassert(data != NULL);
- app_state = (UpdaterAppState *) data;
-
- if (t <= 0.0)
- {
- app_state->progress_value = 0;
- }
- else
- {
- app_state->progress_value = d * 100.0 / t;
- }
- return 0;
-}
-
-BOOL spawn_viewer(UpdaterAppState *app_state)
-{
- llassert(app_state != NULL);
-
- std::string cmd = app_state->dest_dir + "/secondlife";
- GError *error = NULL;
-
- // We want to spawn the Viewer on the same display as the updater app
- gboolean success = gdk_spawn_command_line_on_screen
- (gtk_widget_get_screen(app_state->window), cmd.c_str(), &error);
-
- if (!success)
- {
- llwarns << "Failed to launch viewer: " << error->message
- << llendl;
- }
-
- if (error) g_error_free(error);
-
- return success;
-}
-
-void show_usage_and_exit()
-{
- std::cout << "Usage: linux-updater <--url URL | --file FILE> --name NAME --dest PATH --stringsdir PATH1,PATH2 --stringsfile FILE"
- << "[--image-dir PATH]"
- << std::endl;
- exit(1);
-}
-
-void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state)
-{
- int i;
-
- for (i = 1; i < argc; i++)
- {
- if ((!strcmp(argv[i], "--url")) && (++i < argc))
- {
- app_state->url = argv[i];
- }
- else if ((!strcmp(argv[i], "--file")) && (++i < argc))
- {
- app_state->file = argv[i];
- }
- else if ((!strcmp(argv[i], "--name")) && (++i < argc))
- {
- app_state->app_name = argv[i];
- }
- else if ((!strcmp(argv[i], "--image-dir")) && (++i < argc))
- {
- app_state->image_dir = argv[i];
- app_state->image_dir_iter = new LLDirIterator(argv[i], "*.jpg");
- }
- else if ((!strcmp(argv[i], "--dest")) && (++i < argc))
- {
- app_state->dest_dir = argv[i];
- }
- else if ((!strcmp(argv[i], "--stringsdir")) && (++i < argc))
- {
- app_state->strings_dirs = argv[i];
- }
- else if ((!strcmp(argv[i], "--stringsfile")) && (++i < argc))
- {
- app_state->strings_file = argv[i];
- }
- else
- {
- // show usage, an invalid option was given.
- show_usage_and_exit();
- }
- }
-
- if (app_state->app_name.empty()
- || (app_state->url.empty() && app_state->file.empty())
- || app_state->dest_dir.empty())
- {
- show_usage_and_exit();
- }
-
- app_state->progress_value = 0.0;
- app_state->activity_mode = FALSE;
- app_state->failure = FALSE;
-
- translate_init(app_state->strings_dirs, app_state->strings_file);
-}
-
-int main(int argc, char **argv)
-{
- UpdaterAppState* app_state = new UpdaterAppState;
- GThread *worker_thread;
-
- parse_args_and_init(argc, argv, app_state);
-
- // Initialize logger, and rename old log file
- gDirUtilp->initAppDirs("SecondLife");
- LLError::initForApplication
- (gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
- std::string old_log_file = gDirUtilp->getExpandedFilename
- (LL_PATH_LOGS, "updater.log.old");
- std::string log_file =
- gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log");
- LLFile::rename(log_file, old_log_file);
- LLError::logToFile(log_file);
-
- // initialize gthreads and gtk+
- if (!g_thread_supported())
- {
- g_thread_init(NULL);
- gdk_threads_init();
- }
-
- gtk_init(&argc, &argv);
-
- // create UI
- updater_app_ui_init(app_state);
-
- //llinfos << "SAMPLE TRANSLATION IS: " << LLTrans::getString("LoginInProgress") << llendl;
-
- // create download thread
- worker_thread = g_thread_create
- (GThreadFunc(worker_thread_cb), app_state, FALSE, NULL);
-
- gdk_threads_enter();
- gtk_main();
- gdk_threads_leave();
-
- // Delete the file only if created from url download.
- if(!app_state->url.empty() && !app_state->file.empty())
- {
- if (gDirUtilp->fileExists(app_state->file))
- {
- LLFile::remove(app_state->file);
- }
- }
-
- bool success = !app_state->failure;
- delete app_state->image_dir_iter;
- delete app_state;
- return success ? 0 : 1;
-}
-
-/*****************************************************************************
-* Dummy LLTrans implementation (IQA-490)
-*****************************************************************************/
-static LLTrans sStaticStrings;
-
-// lookup
-std::string LLTrans::_getString(const std::string& key) const
-{
- MessageMap::const_iterator found = mMessages.find(key);
- if (found != mMessages.end())
- {
- return found->second;
- }
- LL_WARNS("linux_updater") << "No message for key '" << key
- << "' -- add to LLTrans::LLTrans() in linux_updater.cpp"
- << LL_ENDL;
- return key;
-}
-
-// static lookup
-std::string LLTrans::getString(const std::string& key)
-{
- return sLLTransInstance._getString(key);
-}
-
-// initialization
-LLTrans::LLTrans()
-{
- typedef std::pair<const char*, const char*> Pair;
- static const Pair data[] =
- {
- Pair("UpdaterFailDownloadTitle",
- "Failed to download update"),
- Pair("UpdaterFailInstallTitle",
- "Failed to install update"),
- Pair("UpdaterFailStartTitle",
- "Failed to start viewer"),
- Pair("UpdaterFailUpdateDescriptive",
- "An error occurred while updating Second Life. "
- "Please download the latest version from www.secondlife.com."),
- Pair("UpdaterNowInstalling",
- "Installing Second Life..."),
- Pair("UpdaterNowUpdating",
- "Now updating Second Life..."),
- Pair("UpdaterProgressBarText",
- "Downloading update"),
- Pair("UpdaterProgressBarTextWithEllipses",
- "Downloading update..."),
- Pair("UpdaterUpdatingDescriptive",
- "Your Second Life Viewer is being updated to the latest release. "
- "This may take some time, so please be patient."),
- Pair("UpdaterWindowTitle",
- "Second Life Update")
- };
-
- BOOST_FOREACH(Pair pair, data)
- {
- mMessages[pair.first] = pair.second;
- }
-}
diff --git a/indra/llcharacter/llbvhconsts.h b/indra/llcharacter/llbvhconsts.h
index d363a6e595..b06c279b8f 100644
--- a/indra/llcharacter/llbvhconsts.h
+++ b/indra/llcharacter/llbvhconsts.h
@@ -27,7 +27,7 @@
#ifndef LL_LLBVHCONSTS_H
#define LL_LLBVHCONSTS_H
-const F32 MAX_ANIM_DURATION = 30.f;
+const F32 MAX_ANIM_DURATION = 60.f;
typedef enum e_constraint_type
{
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index 5524bba296..d1c605451a 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -28,8 +28,8 @@
// Header Files
//-----------------------------------------------------------------------------
#include "linden_common.h"
-#include "llmotioncontroller.h"
+#include "llmotioncontroller.h"
#include "llfasttimer.h"
#include "llkeyframemotion.h"
#include "llmath.h"
@@ -43,6 +43,7 @@ const U32 MAX_MOTION_INSTANCES = 32;
//-----------------------------------------------------------------------------
// Constants and statics
//-----------------------------------------------------------------------------
+F32 LLMotionController::sCurrentTimeFactor = 1.f;
LLMotionRegistry LLMotionController::sRegistry;
//-----------------------------------------------------------------------------
@@ -126,7 +127,7 @@ LLMotion *LLMotionRegistry::createMotion( const LLUUID &id )
// Class Constructor
//-----------------------------------------------------------------------------
LLMotionController::LLMotionController()
- : mTimeFactor(1.f),
+ : mTimeFactor(sCurrentTimeFactor),
mCharacter(NULL),
mAnimTime(0.f),
mPrevTimerElapsed(0.f),
diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h
index b996f708d2..52eaf557b1 100644
--- a/indra/llcharacter/llmotioncontroller.h
+++ b/indra/llcharacter/llmotioncontroller.h
@@ -168,6 +168,9 @@ public:
const LLFrameTimer& getFrameTimer() { return mTimer; }
+ static F32 getCurrentTimeFactor() { return sCurrentTimeFactor; };
+ static void setCurrentTimeFactor(F32 factor) { sCurrentTimeFactor = factor; };
+
protected:
// internal operations act on motion instances directly
// as there can be duplicate motions per id during blending overlap
@@ -187,7 +190,8 @@ protected:
void deactivateStoppedMotions();
protected:
- F32 mTimeFactor;
+ F32 mTimeFactor; // 1.f for normal speed
+ static F32 sCurrentTimeFactor; // Value to use for initialization
static LLMotionRegistry sRegistry;
LLPoseBlender mPoseBlender;
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 694e27f371..281fb14781 100644
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -89,6 +89,7 @@ protected:
// An interface class for a generalized parametric modification of the avatar mesh
// Contains data that is specific to each Avatar
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLVisualParam
{
public:
@@ -160,6 +161,6 @@ protected:
S32 mID; // id for storing weight/morphtarget compares compactly
LLVisualParamInfo *mInfo;
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLVisualParam_H
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index 5baf049c03..fbffe133f1 100644
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -117,17 +117,17 @@ struct SortTimerByName
};
TimeBlock& TimeBlock::getRootTimeBlock()
-{
+ {
static TimeBlock root_timer("root", true, NULL);
return root_timer;
-}
+ }
void TimeBlock::pushLog(LLSD log)
-{
+ {
LLMutexLock lock(sLogLock);
sLogQueue.push(log);
-}
+ }
void TimeBlock::setLogLock(LLMutex* lock)
{
@@ -149,7 +149,7 @@ U64 TimeBlock::countsPerSecond()
static LLUnit<LLUnits::Hertz, U64> sCPUClockFrequency = LLProcessorInfo().getCPUFrequency();
#else
- // If we're not using RDTSC, each fast timer tick is just a performance counter tick.
+ // If we're not using RDTSC, each fasttimer tick is just a performance counter tick.
// Not redefining the clock frequency itself (in llprocessor.cpp/calculate_cpu_frequency())
// since that would change displayed MHz stats for CPUs
static bool firstcall = true;
@@ -176,9 +176,9 @@ TimeBlockTreeNode& TimeBlock::getTreeNode() const
TimeBlockTreeNode* nodep = LLTrace::get_thread_recorder()->getTimeBlockTreeNode(getIndex());
llassert(nodep);
return *nodep;
-}
+ }
-// static
+//static
void TimeBlock::processTimes()
{
get_clock_count(); // good place to calculate clock frequency
@@ -191,9 +191,9 @@ void TimeBlock::processTimes()
{
TimeBlock& timer = *it;
if (&timer == &TimeBlock::getRootTimeBlock()) continue;
-
- // bootstrap tree construction by attaching to last timer to be on stack
- // when this timer was called
+
+ // bootstrap tree construction by attaching to last timer to be on stack
+ // when this timer was called
if (timer.getParent() == &TimeBlock::getRootTimeBlock())
{
TimeBlockAccumulator* accumulator = timer.getPrimaryAccumulator();
@@ -203,7 +203,7 @@ void TimeBlock::processTimes()
timer.setParent(accumulator->mLastCaller);
accumulator->mParent = accumulator->mLastCaller;
}
- // no need to push up tree on first use, flag can be set spuriously
+ // no need to push up tree on first use, flag can be set spuriously
accumulator->mMoveUpTree = false;
}
}
@@ -230,28 +230,28 @@ void TimeBlock::processTimes()
TimeBlockAccumulator* accumulator = timerp->getPrimaryAccumulator();
if (accumulator->mMoveUpTree)
- {
+ {
// since ancestors have already been visited, re-parenting won't affect tree traversal
- //step up tree, bringing our descendants with us
- LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() <<
- " to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL;
- timerp->setParent(timerp->getParent()->getParent());
+ //step up tree, bringing our descendants with us
+ LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() <<
+ " to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL;
+ timerp->setParent(timerp->getParent()->getParent());
accumulator->mParent = timerp->getParent();
accumulator->mMoveUpTree = false;
- // don't bubble up any ancestors until descendants are done bubbling up
+ // don't bubble up any ancestors until descendants are done bubbling up
// as ancestors may call this timer only on certain paths, so we want to resolve
// child-most block locations before their parents
- it.skipAncestors();
- }
+ it.skipAncestors();
}
}
+}
// walk up stack of active timers and accumulate current time while leaving timing structures active
BlockTimerStackRecord* stack_record = ThreadTimerStack::getInstance();
BlockTimer* cur_timer = stack_record->mActiveTimer;
TimeBlockAccumulator* accumulator = stack_record->mTimeBlock->getPrimaryAccumulator();
-
+
// root defined by parent pointing to self
while(cur_timer && cur_timer->mParentTimerData.mActiveTimer != cur_timer)
{
@@ -286,12 +286,12 @@ void TimeBlock::processTimes()
std::vector<TimeBlock*>::iterator TimeBlock::beginChildren()
-{
+ {
return getTreeNode().mChildren.begin();
-}
+ }
std::vector<TimeBlock*>::iterator TimeBlock::endChildren()
-{
+ {
return getTreeNode().mChildren.end();
}
@@ -300,7 +300,7 @@ std::vector<TimeBlock*>& TimeBlock::getChildren()
return getTreeNode().mChildren;
}
-//static
+// static
void TimeBlock::logStats()
{
// get ready for next frame
@@ -331,7 +331,7 @@ void TimeBlock::logStats()
LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording();
sd[timer.getName()]["Time"] = (LLSD::Real) (frame_recording.getLastRecordingPeriod().getSum(timer).value());
sd[timer.getName()]["Calls"] = (LLSD::Integer) (frame_recording.getLastRecordingPeriod().getSum(timer.callCount()));
-
+
// computing total time here because getting the root timer's getCountHistory
// doesn't work correctly on the first frame
total_time += frame_recording.getLastRecordingPeriod().getSum(timer);
@@ -383,7 +383,7 @@ void TimeBlock::dumpCurTimes()
}
}
-//static
+//static
void TimeBlock::writeLog(std::ostream& os)
{
while (!sLogQueue.empty())
@@ -437,7 +437,7 @@ void TimeBlockAccumulator::reset( const TimeBlockAccumulator* other )
mParent = other->mParent;
}
else
- {
+{
mStartTotalTimeCounter = mTotalTimeCounter;
}
}
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 502f93cbb8..3e18287a6f 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -32,6 +32,7 @@
#include <list>
#include <boost/function.hpp>
#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_enum.hpp>
#include <boost/unordered_map.hpp>
#include "llerror.h"
@@ -210,7 +211,6 @@ namespace LLInitParam
class LL_COMMON_API Parser
{
LOG_CLASS(Parser);
-
public:
typedef std::vector<std::pair<std::string, bool> > name_stack_t;
typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t;
@@ -224,32 +224,81 @@ namespace LLInitParam
typedef std::map<const std::type_info*, parser_write_func_t> parser_write_func_map_t;
typedef std::map<const std::type_info*, parser_inspect_func_t> parser_inspect_func_map_t;
+ private:
+ template<typename T, bool is_enum = boost::is_enum<T>::value>
+ struct ReaderWriter
+ {
+ static bool read(T& param, Parser* parser)
+ {
+ parser_read_func_map_t::iterator found_it = parser->mParserReadFuncs->find(&typeid(T));
+ if (found_it != parser->mParserReadFuncs->end())
+ {
+ return found_it->second(*parser, (void*)&param);
+ }
+ return false;
+ }
+
+ static bool write(const T& param, Parser* parser, name_stack_t& name_stack)
+ {
+ parser_write_func_map_t::iterator found_it = parser->mParserWriteFuncs->find(&typeid(T));
+ if (found_it != parser->mParserWriteFuncs->end())
+ {
+ return found_it->second(*parser, (const void*)&param, name_stack);
+ }
+ return false;
+ }
+ };
+
+ // read enums as ints
+ template<typename T>
+ struct ReaderWriter<T, true>
+ {
+ static bool read(T& param, Parser* parser)
+ {
+ // read all enums as ints
+ parser_read_func_map_t::iterator found_it = parser->mParserReadFuncs->find(&typeid(S32));
+ if (found_it != parser->mParserReadFuncs->end())
+ {
+ S32 value;
+ if (found_it->second(*parser, (void*)&value))
+ {
+ param = (T)value;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ static bool write(const T& param, Parser* parser, name_stack_t& name_stack)
+ {
+ parser_write_func_map_t::iterator found_it = parser->mParserWriteFuncs->find(&typeid(S32));
+ if (found_it != parser->mParserWriteFuncs->end())
+ {
+ return found_it->second(*parser, (const void*)&param, name_stack);
+ }
+ return false;
+ }
+ };
+
+ public:
+
Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)
: mParseSilently(false),
mParserReadFuncs(&read_map),
mParserWriteFuncs(&write_map),
mParserInspectFuncs(&inspect_map)
{}
+
virtual ~Parser();
template <typename T> bool readValue(T& param)
{
- parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T));
- if (found_it != mParserReadFuncs->end())
- {
- return found_it->second(*this, (void*)&param);
- }
- return false;
+ return ReaderWriter<T>::read(param, this);
}
template <typename T> bool writeValue(const T& param, name_stack_t& name_stack)
{
- parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T));
- if (found_it != mParserWriteFuncs->end())
- {
- return found_it->second(*this, (const void*)&param, name_stack);
- }
- return false;
+ return ReaderWriter<T>::write(param, this, name_stack);
}
// dispatch inspection to registered inspection functions, for each parameter in a param block
@@ -880,30 +929,24 @@ namespace LLInitParam
// no further names in stack, attempt to parse value now
if (name_stack_range.first == name_stack_range.second)
{
- if (parser.readValue(typed_param.getValue()))
+ std::string name;
+
+ // try to parse a known named value
+ if(name_value_lookup_t::valueNamesExist()
+ && parser.readValue(name)
+ && name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
- typed_param.clearValueName();
+ typed_param.setValueName(name);
typed_param.setProvided();
return true;
}
-
- // try to parse a known named value
- if(name_value_lookup_t::valueNamesExist())
+ // try to read value directly
+ else if (parser.readValue(typed_param.getValue()))
{
- // try to parse a known named value
- std::string name;
- if (parser.readValue(name))
- {
- // try to parse a per type named value
- if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
- {
- typed_param.setValueName(name);
+ typed_param.clearValueName();
typed_param.setProvided();
return true;
}
-
- }
- }
}
return false;
}
@@ -1040,30 +1083,29 @@ namespace LLInitParam
static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
- // attempt to parse block...
- if(typed_param.deserializeBlock(parser, name_stack_range, new_name))
+
+ if (name_stack_range.first == name_stack_range.second)
+ { // try to parse a known named value
+ std::string name;
+
+ if(name_value_lookup_t::valueNamesExist()
+ && parser.readValue(name)
+ && name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
- typed_param.clearValueName();
+ typed_param.setValueName(name);
typed_param.setProvided();
return true;
}
+ }
- if(name_value_lookup_t::valueNamesExist())
- {
- // try to parse a known named value
- std::string name;
- if (parser.readValue(name))
- {
- // try to parse a per type named value
- if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
- {
- typed_param.setValueName(name);
+ if(typed_param.deserializeBlock(parser, name_stack_range, new_name))
+ { // attempt to parse block...
+ typed_param.clearValueName();
typed_param.setProvided();
return true;
}
- }
- }
+
return false;
}
@@ -1228,30 +1270,22 @@ namespace LLInitParam
// no further names in stack, attempt to parse value now
if (new_name_stack_range.first == new_name_stack_range.second)
{
- // attempt to read value directly
- if (parser.readValue(value))
+ std::string name;
+
+ // try to parse a known named value
+ if(name_value_lookup_t::valueNamesExist()
+ && parser.readValue(name)
+ && name_value_lookup_t::getValueFromName(name, value))
{
typed_param.add(value);
+ typed_param.mValues.back().setValueName(name);
return true;
}
-
- // try to parse a known named value
- if(name_value_lookup_t::valueNamesExist())
- {
- // try to parse a known named value
- std::string name;
- if (parser.readValue(name))
- {
- // try to parse a per type named value
- if (name_value_lookup_t::getValueFromName(name, value))
+ else if (parser.readValue(value)) // attempt to read value directly
{
typed_param.add(value);
- typed_param.mValues.back().setValueName(name);
return true;
}
-
- }
- }
}
return false;
}
@@ -1475,9 +1509,15 @@ namespace LLInitParam
param_value_t& value = typed_param.mValues.back();
- // attempt to parse block...
- if(value.deserializeBlock(parser, new_name_stack_range, new_name))
+ if (new_name_stack_range.first == new_name_stack_range.second)
+ { // try to parse a known named value
+ std::string name;
+
+ if(name_value_lookup_t::valueNamesExist()
+ && parser.readValue(name)
+ && name_value_lookup_t::getValueFromName(name, value.getValue()))
{
+ typed_param.mValues.back().setValueName(name);
typed_param.setProvided();
if (new_array_value)
{
@@ -1485,16 +1525,11 @@ namespace LLInitParam
}
return true;
}
- else if(name_value_lookup_t::valueNamesExist())
- {
- // try to parse a known named value
- std::string name;
- if (parser.readValue(name))
- {
- // try to parse a per type named value
- if (name_value_lookup_t::getValueFromName(name, value.getValue()))
+ }
+
+ // attempt to parse block...
+ if(value.deserializeBlock(parser, name_stack_range, new_name))
{
- typed_param.mValues.back().setValueName(name);
typed_param.setProvided();
if (new_array_value)
{
@@ -1503,8 +1538,6 @@ namespace LLInitParam
return true;
}
- }
- }
if (new_value)
{ // failed to parse new value, pop it off
@@ -1547,7 +1580,7 @@ namespace LLInitParam
}
name_stack.pop_back();
- }
+ }
if (!serialized && predicate_rule.check(ll_make_predicate(EMPTY)))
{
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index f06547ed7d..e7e274ff03 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -158,7 +158,7 @@ void LLImageBase::sanityCheck()
// virtual
void LLImageBase::deleteData()
{
- FREE_MEM(sPrivatePoolp, mData);
+ FREE_MEM(sPrivatePoolp, mData) ;
memDisclaim(mDataSize);
mData = NULL;
mDataSize = 0;
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 5412f98ee5..5412f98ee5 100755..100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index a871bcbb25..37c603348e 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -205,7 +205,7 @@ void LLParcel::init(const LLUUID &owner_id,
mAABBMin.setVec(SOME_BIG_NUMBER, SOME_BIG_NUMBER, SOME_BIG_NUMBER);
mAABBMax.setVec(SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER);
- mLocalID = 0;
+ mLocalID = INVALID_PARCEL_ID;
//mSimWidePrimCorrection = 0;
setMaxPrimCapacity((S32)(sim_object_limit * area / (F32)(REGION_WIDTH_METERS * REGION_WIDTH_METERS)));
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 499f690e76..0279e8bef9 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -97,6 +97,7 @@ const U32 RT_OTHER = 0x1 << 3;
const U32 RT_LIST = 0x1 << 4;
const U32 RT_SELL = 0x1 << 5;
+const S32 INVALID_PARCEL_ID = -1;
// Timeouts for parcels
// default is 21 days * 24h/d * 60m/h * 60s/m *1000000 usec/s = 1814400000000
diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp
index 14fbf344ab..14fbf344ab 100755..100644
--- a/indra/llkdu/tests/llimagej2ckdu_test.cpp
+++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index 4ac1e55cfc..7348904c61 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -78,7 +78,7 @@ public:
typedef LLOctreeTraveler<T> oct_traveler;
typedef LLTreeTraveler<T> tree_traveler;
- typedef std::vector<LLPointer<T> > element_list;
+ typedef std::vector< LLPointer<T> > element_list; // note: don't remove the whitespace between "> >"
typedef LLPointer<T>* element_iter;
typedef const LLPointer<T>* const_element_iter;
typedef typename std::vector<LLTreeListener<T>*>::iterator tree_listener_iter;
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp
index 9105b1c1fd..5ee3c45502 100644
--- a/indra/llmath/tests/alignment_test.cpp
+++ b/indra/llmath/tests/alignment_test.cpp
@@ -79,7 +79,7 @@ template<> template<>
void alignment_test_object_t::test<1>()
{
# ifdef LL_DEBUG
- skip("This test fails on Windows when compiled in debug mode.");
+// skip("This test fails on Windows when compiled in debug mode.");
# endif
const int num_tests = 7;
@@ -116,7 +116,7 @@ template<> template<>
void alignment_test_object_t::test<3>()
{
# ifdef LL_DEBUG
- skip("This test fails on Windows when compiled in debug mode.");
+// skip("This test fails on Windows when compiled in debug mode.");
# endif
const int ARR_SIZE = 7;
@@ -128,12 +128,14 @@ void alignment_test_object_t::test<3>()
}
MyVector4a *veca = new MyVector4a[ARR_SIZE];
+ //std::cout << "veca base is " << (S32) veca << std::endl;
ensure("LLAligment veca base", is_aligned(veca,16));
for(int i=0; i<ARR_SIZE; i++)
{
std::cout << "veca[" << i << "]" << std::endl;
ensure("LLAlignment veca member unaligned", is_aligned(&veca[i],16));
}
+ delete [] veca;
}
}
diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp
index 0e5fe1de08..1264659b62 100644
--- a/indra/llmessage/llurlrequest.cpp
+++ b/indra/llmessage/llurlrequest.cpp
@@ -358,7 +358,8 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
}
}
- while(1)
+ bool keep_looping = true;
+ while(keep_looping)
{
CURLcode result;
@@ -409,8 +410,9 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
case CURLE_FAILED_INIT:
case CURLE_COULDNT_CONNECT:
status = STATUS_NO_CONNECTION;
+ keep_looping = false;
break;
- default:
+ default: // CURLE_URL_MALFORMAT
llwarns << "URLRequest Error: " << result
<< ", "
<< LLCurl::strerror(result)
@@ -418,6 +420,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
<< (mDetail->mURL.empty() ? "<EMPTY URL>" : mDetail->mURL)
<< llendl;
status = STATUS_ERROR;
+ keep_looping = false;
break;
}
}
diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp
index b9cddc8e45..00b9d81611 100644
--- a/indra/llmessage/llxfermanager.cpp
+++ b/indra/llmessage/llxfermanager.cpp
@@ -886,8 +886,17 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user
return;
}
-
- std::string expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename );
+ // If we want to use a special path (e.g. LL_PATH_CACHE), we want to make sure we create the
+ // proper expanded filename.
+ std::string expanded_filename;
+ if (local_path != LL_PATH_NONE)
+ {
+ expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename );
+ }
+ else
+ {
+ expanded_filename = local_filename;
+ }
llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl;
BOOL delete_local_on_completion = FALSE;
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 946251f383..946251f383 100755..100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 751309af20..751309af20 100755..100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 11555e20c4..11555e20c4 100755..100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 137c6efc53..269cb4676a 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1116,6 +1116,11 @@ bool LLNotificationChannel::isEmpty() const
return mItems.empty();
}
+S32 LLNotificationChannel::size() const
+{
+ return mItems.size();
+}
+
LLNotificationChannel::Iterator LLNotificationChannel::begin()
{
return mItems.begin();
@@ -1433,7 +1438,7 @@ bool LLNotifications::loadTemplates()
std::string base_filename = search_paths.front();
LLXMLNodePtr root;
BOOL success = LLXMLNode::getLayeredXMLNode(root, search_paths);
-
+
if (!success || root.isNull() || !root->hasName( "notifications" ))
{
llerrs << "Problem reading XML from UI Notifications file: " << base_filename << llendl;
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 4ae02b943f..d7534c416d 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -813,6 +813,7 @@ public:
std::string getParentChannelName() { return mParent; }
bool isEmpty() const;
+ S32 size() const;
Iterator begin();
Iterator end();
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 2297285c39..13aa21b505 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -117,7 +117,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p)
mButtonEnterSignal(NULL),
mButtonLeaveSignal(NULL),
mButtonRemoveSignal(NULL),
- mDragAndDropTarget(false)
+ mDragAndDropTarget(false),
+ mCaretIcon(NULL)
{
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text;
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon;
@@ -830,7 +831,12 @@ void LLToolBar::draw()
LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom);
// Position the caret
- LLIconCtrl* caret = getChild<LLIconCtrl>("caret");
+ if (!mCaretIcon)
+ {
+ mCaretIcon = getChild<LLIconCtrl>("caret");
+ }
+
+ LLIconCtrl* caret = mCaretIcon;
caret->setVisible(FALSE);
if (mDragAndDropTarget && !mButtonCommands.empty())
{
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 2ffcc8b574..6936cb37f7 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -37,6 +37,7 @@
class LLToolBar;
class LLToolBarButton;
+class LLIconCtrl;
typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t;
typedef boost::function<BOOL (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t;
@@ -284,6 +285,8 @@ private:
button_signal_t* mButtonRemoveSignal;
std::string mButtonTooltipSuffix;
+
+ LLIconCtrl* mCaretIcon;
};
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 5b7424acbb..93b9d36939 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -50,14 +50,15 @@ LLSplashScreen *gSplashScreenp = NULL;
BOOL gDebugClicks = FALSE;
BOOL gDebugWindowProc = FALSE;
-const S32 gURLProtocolWhitelistCount = 3;
-const std::string gURLProtocolWhitelist[] = { "file:", "http:", "https:" };
+const S32 gURLProtocolWhitelistCount = 4;
+const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:", "data:" };
// CP: added a handler list - this is what's used to open the protocol and is based on registry entry
// only meaningful difference currently is that file: protocols are opened using http:
// since no protocol handler exists in registry for file:
// Important - these lists should match - protocol to handler
-const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" };
+// Maestro: This list isn't referenced anywhere that I could find
+//const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" };
S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index f378203a88..c235d77656 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -281,7 +281,7 @@ extern BOOL gDebugWindowProc;
// Protocols, like "http" and "https" we support in URLs
extern const S32 gURLProtocolWhitelistCount;
extern const std::string gURLProtocolWhitelist[];
-extern const std::string gURLProtocolWhitelistHandler[];
+//extern const std::string gURLProtocolWhitelistHandler[];
void simpleEscapeString ( std::string& stringIn );
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 39f8a36a6e..a15114cb9b 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -2516,6 +2516,23 @@ void exec_cmd(const std::string& cmd, const std::string& arg)
// Must begin with protocol identifier.
void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
{
+ bool found = false;
+ S32 i;
+ for (i = 0; i < gURLProtocolWhitelistCount; i++)
+ {
+ if (escaped_url.find(gURLProtocolWhitelist[i]) != std::string::npos)
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ llwarns << "spawn_web_browser called for url with protocol not on whitelist: " << escaped_url << llendl;
+ return;
+ }
+
llinfos << "spawn_web_browser: " << escaped_url << llendl;
#if LL_LINUX || LL_SOLARIS
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 9a3a40e476..ee7d1d50b7 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -254,6 +254,7 @@ public:
else
{
llwarns << "Control " << name << " not found." << llendl;
+ return T();
}
return convert_from_llsd<T>(value, type, name);
}
diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp
index 5fb84756ee..0cfb810906 100644
--- a/indra/media_plugins/webkit/windows_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp
@@ -48,18 +48,37 @@ private:
set_volume_func_t mSetVolumeFunc;
set_mute_func_t mSetMuteFunc;
+ // tests if running on Vista, 7, 8 + once in CTOR
+ bool isWindowsVistaOrHigher();
+
F32 mVolume;
F32 mPan;
+ bool mSystemIsVistaOrHigher;
};
+
+bool VolumeCatcherImpl::isWindowsVistaOrHigher()
+{
+ OSVERSIONINFO osvi;
+ ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&osvi);
+ return osvi.dwMajorVersion >= 6;
+}
+
VolumeCatcherImpl::VolumeCatcherImpl()
-: mVolume(1.0f), // default volume is max
- mPan(0.f) // default pan is centered
+: mVolume(1.0f), // default volume is max
+ mPan(0.f) // default pan is centered
{
- HMODULE handle = ::LoadLibrary(L"winmm.dll");
- if(handle)
+ mSystemIsVistaOrHigher = isWindowsVistaOrHigher();
+
+ if ( ! mSystemIsVistaOrHigher )
{
- mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume");
- mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute");
+ HMODULE handle = ::LoadLibrary(L"winmm.dll");
+ if(handle)
+ {
+ mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume");
+ mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute");
+ }
}
}
@@ -67,18 +86,29 @@ VolumeCatcherImpl::~VolumeCatcherImpl()
{
}
-
void VolumeCatcherImpl::setVolume(F32 volume)
{
mVolume = volume;
- if (mSetMuteFunc)
+ if ( mSystemIsVistaOrHigher )
{
- mSetMuteFunc(volume == 0.f);
+ // set both left/right to same volume
+ // TODO: use pan value to set independently
+ DWORD left_channel = (DWORD)(mVolume * 65535.0f);
+ DWORD right_channel = (DWORD)(mVolume * 65535.0f);
+ DWORD hw_volume = left_channel << 16 | right_channel;
+ ::waveOutSetVolume(NULL, hw_volume);
}
- if (mSetVolumeFunc)
+ else
{
- mSetVolumeFunc(mVolume);
+ if (mSetMuteFunc)
+ {
+ mSetMuteFunc(volume == 0.f);
+ }
+ if (mSetVolumeFunc)
+ {
+ mSetVolumeFunc(mVolume);
+ }
}
}
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 575400941f..718a8c710f 100755..100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -35,6 +35,7 @@ include(LLXML)
include(LScript)
include(Linking)
include(NDOF)
+include(NVAPI)
include(GooglePerfTools)
include(TemplateCheck)
include(UI)
@@ -1821,6 +1822,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLCOREHTTP_LIBRARIES}
${LLCOMMON_LIBRARIES}
${NDOF_LIBRARY}
+ ${NVAPI_LIBRARY}
${HUNSPELL_LIBRARY}
${viewer_LIBRARIES}
${BOOST_PROGRAM_OPTIONS_LIBRARY}
@@ -1869,7 +1871,6 @@ if (LINUX)
set(COPY_INPUT_DEPENDENCIES
${VIEWER_BINARY_NAME}
linux-crash-logger
- linux-updater
SLPlugin
media_plugin_webkit
media_plugin_gstreamer010
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5c0e8d858e..94a8550938 100755..100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14094,6 +14094,18 @@
</array>
</map>
+ <key>HideUIControls</key>
+ <map>
+ <key>Comment</key>
+ <string>Hide all menu items and buttons</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+
<key>SimulateFBOFailure</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/objects/previewF.glsl b/indra/newview/app_settings/shaders/class1/objects/previewF.glsl
new file mode 100644
index 0000000000..284da3d0ac
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/previewF.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file previewF.glsl
+ *
+ * $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$
+ */
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor
+#endif
+
+uniform sampler2D diffuseMap;
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+ frag_color = color;
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
index 5dcfa87066..7f3f84398b 100644
--- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
@@ -32,12 +32,51 @@ ATTRIBUTE vec3 position;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
+uniform vec4 color;
+
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform vec4 light_position[8];
+uniform vec3 light_direction[8];
+uniform vec3 light_attenuation[8];
+uniform vec3 light_diffuse[8];
+
+//===================================================================================================
+//declare these here explicitly to separate them from atmospheric lighting elsewhere to work around
+//drivers that are picky about functions being declared but not defined even if they aren't called
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
+
+float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight)
+{
+ //get light vector
+ vec3 lv = lp.xyz-v;
+
+ //get distance
+ float d = length(lv);
+
+ //normalize light vector
+ lv *= 1.0/d;
+
+ //distance attenuation
+ float da = clamp(1.0/(la * d), 0.0, 1.0);
+
+ // spotlight coefficient.
+ float spot = max(dot(-ln, lv), is_pointlight);
+ da *= spot*spot; // GL_SPOT_EXPONENT=2
+
+ //angular attenuation
+ da *= calcDirectionalLight(n, lv);
+
+ return da;
+}
+//====================================================================================================
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
-void calcAtmospherics(vec3 inPositionEye);
void main()
{
@@ -45,13 +84,15 @@ void main()
vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0));
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
-
+
vec3 norm = normalize(normal_matrix * normal);
- calcAtmospherics(pos.xyz);
-
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
- vertex_color = color;
+ vec4 col = vec4(0,0,0,1);
-
+ // Collect normal lights (need to be divided by two, as we later multiply by 2)
+ col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz);
+ col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
+
+ vertex_color = col*color;
}
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 6648431459..420220d21a 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -35,6 +35,7 @@
#include "llfloaterreg.h"
#include "llhudmanager.h"
#include "lljoystickbutton.h"
+#include "llmoveview.h"
#include "llselectmgr.h"
#include "llsmoothstep.h"
#include "lltoolmgr.h"
@@ -2114,6 +2115,11 @@ void LLAgentCamera::changeCameraToDefault()
{
changeCameraToThirdPerson();
}
+ if (gSavedSettings.getBOOL("HideUIControls"))
+ {
+ gViewerWindow->setUIVisibility(false);
+ LLPanelStandStopFlying::getInstance()->setVisible(false);
+ }
}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0cb7c7b030..3e61787c13 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -735,10 +735,6 @@ bool LLAppViewer::init()
// before consumers (LLTextureFetch).
mAppCoreHttp.init();
-#if LL_RECORD_VIEWER_STATS
- LLViewerStatsRecorder::initClass();
-#endif
-
// *NOTE:Mani - LLCurl::initClass is not thread safe.
// Called before threads are created.
LLCurl::initClass(gSavedSettings.getF32("CurlRequestTimeOut"),
@@ -1034,12 +1030,21 @@ bool LLAppViewer::init()
}
#if LL_WINDOWS
- if (gGLManager.mIsIntel &&
- LLFeatureManager::getInstance()->getGPUClass() > 0 &&
- gGLManager.mGLVersion <= 3.f)
+ if (gGLManager.mGLVersion < LLFeatureManager::getInstance()->getExpectedGLVersion())
+ {
+ if (gGLManager.mIsIntel)
{
LLNotificationsUtil::add("IntelOldDriver");
}
+ else if (gGLManager.mIsNVIDIA)
+ {
+ LLNotificationsUtil::add("NVIDIAOldDriver");
+ }
+ else if (gGLManager.mIsATI)
+ {
+ LLNotificationsUtil::add("AMDOldDriver");
+ }
+ }
#endif
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 58237d573d..85a29925fb 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -178,7 +178,7 @@ public:
// Metrics policy helper statics.
static void metricsUpdateRegion(U64 region_handle);
static void metricsSend(bool enable_reporting);
-
+
// llcorehttp init/shutdown/config information.
LLAppCoreHttp & getAppCoreHttp() { return mAppCoreHttp; }
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index b70c81e84d..8326be433e 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -46,6 +46,11 @@
#include "llviewercontrol.h"
#include "lldxhardware.h"
+#include "nvapi/nvapi.h"
+#include "nvapi/NvApiDriverSettings.h"
+
+#include <stdlib.h>
+
#include "llweb.h"
#include "llsecondlifeurls.h"
@@ -60,6 +65,7 @@
#include "llwindebug.h"
#endif
+
// *FIX:Mani - This hack is to fix a linker issue with libndofdev.lib
// The lib was compiled under VS2005 - in VS2003 we need to remap assert
#ifdef LL_DEBUG
@@ -75,6 +81,20 @@ extern "C" {
const std::string LLAppViewerWin32::sWindowClass = "Second Life";
+/*
+ This function is used to print to the command line a text message
+ describing the nvapi error and quits
+*/
+void nvapi_error(NvAPI_Status status)
+{
+ NvAPI_ShortString szDesc = {0};
+ NvAPI_GetErrorMessage(status, szDesc);
+ llwarns << szDesc << llendl;
+
+ //should always trigger when asserts are enabled
+ llassert(status == NVAPI_OK);
+}
+
// Create app mutex creates a unique global windows object.
// If the object can be created it returns true, otherwise
// it returns false. The false result can be used to determine
@@ -96,6 +116,79 @@ bool create_app_mutex()
return result;
}
+void ll_nvapi_init(NvDRSSessionHandle hSession)
+{
+ // (2) load all the system settings into the session
+ NvAPI_Status status = NvAPI_DRS_LoadSettings(hSession);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+
+ NvAPI_UnicodeString profile_name;
+ std::string app_name = LLTrans::getString("APP_NAME");
+ llutf16string w_app_name = utf8str_to_utf16str(app_name);
+ wsprintf(profile_name, L"%s", w_app_name.c_str());
+ status = NvAPI_DRS_SetCurrentGlobalProfile(hSession, profile_name);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+
+ // (3) Obtain the current profile.
+ NvDRSProfileHandle hProfile = 0;
+ status = NvAPI_DRS_GetCurrentGlobalProfile(hSession, &hProfile);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+
+ // load settings for querying
+ status = NvAPI_DRS_LoadSettings(hSession);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+
+ //get the preferred power management mode for Second Life
+ NVDRS_SETTING drsSetting = {0};
+ drsSetting.version = NVDRS_SETTING_VER;
+ status = NvAPI_DRS_GetSetting(hSession, hProfile, PREFERRED_PSTATE_ID, &drsSetting);
+ if (status == NVAPI_SETTING_NOT_FOUND)
+ { //only override if the user hasn't specifically set this setting
+ // (4) Specify that we want the VSYNC disabled setting
+ // first we fill the NVDRS_SETTING struct, then we call the function
+ drsSetting.version = NVDRS_SETTING_VER;
+ drsSetting.settingId = PREFERRED_PSTATE_ID;
+ drsSetting.settingType = NVDRS_DWORD_TYPE;
+ drsSetting.u32CurrentValue = PREFERRED_PSTATE_PREFER_MAX;
+ status = NvAPI_DRS_SetSetting(hSession, hProfile, &drsSetting);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+ }
+ else if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ return;
+ }
+
+
+
+ // (5) Now we apply (or save) our changes to the system
+ status = NvAPI_DRS_SaveSettings(hSession);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ }
+}
+
//#define DEBUGGING_SEH_FILTER 1
#if DEBUGGING_SEH_FILTER
# define WINMAIN DebuggingWinMain
@@ -165,6 +258,27 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
return -1;
}
+ NvAPI_Status status;
+
+ // Initialize NVAPI
+ status = NvAPI_Initialize();
+ NvDRSSessionHandle hSession = 0;
+
+ if (status == NVAPI_OK)
+ {
+ // Create the session handle to access driver settings
+ status = NvAPI_DRS_CreateSession(&hSession);
+ if (status != NVAPI_OK)
+ {
+ nvapi_error(status);
+ }
+ else
+ {
+ //override driver setting as needed
+ ll_nvapi_init(hSession);
+ }
+ }
+
// Have to wait until after logging is initialized to display LFH info
if (num_heaps > 0)
{
@@ -232,6 +346,15 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
LLAppViewer::sUpdaterInfo = NULL ;
}
+
+
+ // (NVAPI) (6) We clean up. This is analogous to doing a free()
+ if (hSession)
+ {
+ NvAPI_DRS_DestroySession(hSession);
+ hSession = 0;
+ }
+
return 0;
}
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 84e73e96fa..3e1fa1e49b 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -110,7 +110,9 @@ public:
mFrom(),
mSessionID(),
mMinUserNameWidth(0),
- mUserNameFont(NULL)
+ mUserNameFont(NULL),
+ mUserNameTextBox(NULL),
+ mTimeBoxTextBox(NULL)
{}
static LLChatHistoryHeader* createInstance(const std::string& file_name)
@@ -187,6 +189,9 @@ public:
setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this));
setMouseLeaveCallback(boost::bind(&LLChatHistoryHeader::hideInfoCtrl, this));
+ mUserNameTextBox = getChild<LLTextBox>("user_name");
+ mTimeBoxTextBox = getChild<LLTextBox>("time_box");
+
return LLPanel::postBuild();
}
@@ -377,8 +382,8 @@ public:
/*virtual*/ void draw()
{
- LLTextBox* user_name = getChild<LLTextBox>("user_name");
- LLTextBox* time_box = getChild<LLTextBox>("time_box");
+ LLTextBox* user_name = mUserNameTextBox; //getChild<LLTextBox>("user_name");
+ LLTextBox* time_box = mTimeBoxTextBox; //getChild<LLTextBox>("time_box");
LLRect user_name_rect = user_name->getRect();
S32 user_name_width = user_name_rect.getWidth();
@@ -568,6 +573,8 @@ protected:
S32 mMinUserNameWidth;
const LLFontGL* mUserNameFont;
+ LLTextBox* mUserNameTextBox;
+ LLTextBox* mTimeBoxTextBox;
};
LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL;
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 86f0213282..1264f05d77 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -99,7 +99,7 @@ void LLDebugView::init()
gSceneView->setVisible(FALSE);
addChild(gSceneView);
gSceneView->setRect(rect);
-
+
gSceneMonitorView = new LLSceneMonitorView(r);
gSceneMonitorView->setFollowsTop();
gSceneMonitorView->setFollowsLeft();
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index a0c71b0f73..4d72dd1343 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -103,11 +103,11 @@ void LLDrawable::init(bool new_entry)
mParent = NULL;
mRenderType = 0;
mCurrentScale = LLVector3(1,1,1);
- mDistanceWRTCamera = 0.0f;
+ mDistanceWRTCamera = 0.0f;
mState = 0;
-
- // mFaces
- mRadius = 0.f;
+
+ // mFaces
+ mRadius = 0.f;
mGeneration = -1;
mSpatialBridge = NULL;
@@ -132,7 +132,7 @@ void LLDrawable::init(bool new_entry)
{
getRegion()->addVisibleCacheEntry(vo_entry); //to load all children.
}
-
+
getRegion()->addActiveCacheEntry(vo_entry);
}
@@ -192,7 +192,7 @@ void LLDrawable::markDead()
sNumZombieDrawables++;
- // We're dead. Free up all of our references to other objects
+ // We're dead. Free up all of our references to other objects
cleanupReferences();
// sDeadList.put(this);
}
@@ -298,9 +298,17 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
return count;
}
+static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face", true);
+
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
- LLFace *face = new LLFace(this, mVObjp);
+
+ LLFace *face;
+ {
+ LLFastTimer t(FTM_ALLOCATE_FACE);
+ face = new LLFace(this, mVObjp);
+ }
+
if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl;
if (face)
@@ -323,7 +331,11 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
LLFace *face;
+
+ {
+ LLFastTimer t(FTM_ALLOCATE_FACE);
face = new LLFace(this, mVObjp);
+ }
face->setTEOffset(mFaces.size());
face->setTexture(texturep);
@@ -477,7 +489,7 @@ void LLDrawable::makeActive()
//NOTE: linked set will now NEVER become static
mParent->setState(LLDrawable::ACTIVE_CHILD);
}
-
+
llassert(isAvatar() || isRoot() || mParent->isActive());
}
@@ -562,6 +574,7 @@ F32 LLDrawable::updateXform(BOOL undamped)
dist_squared = dist_vec_squared(new_pos, target_pos);
LLQuaternion new_rot = nlerp(lerp_amt, old_rot, target_rot);
+ // FIXME: This can be negative! It is be possible for some rots to 'cancel out' pos or size changes.
dist_squared += (1.f - dot(new_rot, target_rot)) * 10.f;
LLVector3 new_scale = lerp(old_scale, target_scale, lerp_amt);
@@ -585,6 +598,15 @@ F32 LLDrawable::updateXform(BOOL undamped)
}
}
}
+ else
+ {
+ // The following fixes MAINT-1742 but breaks vehicles similar to MAINT-2275
+ // dist_squared = dist_vec_squared(old_pos, target_pos);
+
+ // The following fixes MAINT-2247 but causes MAINT-2275
+ //dist_squared += (1.f - dot(old_rot, target_rot)) * 10.f;
+ //dist_squared += dist_vec_squared(old_scale, target_scale);
+ }
LLVector3 vec = mCurrentScale-target_scale;
@@ -670,7 +692,7 @@ BOOL LLDrawable::updateMove()
{
return FALSE;
}
-
+
makeActive();
BOOL done;
@@ -972,11 +994,11 @@ void LLDrawable::updateUVMinMax()
bool LLDrawable::isVisible() const
{
if (LLViewerOctreeEntryData::isVisible())
- {
+{
return true;
- }
-
- {
+}
+
+{
LLviewerOctreeGroup* group = mEntry->getGroup();
if (group && group->isVisible())
{
@@ -1008,7 +1030,7 @@ bool LLDrawable::isRecentlyVisible() const
}
void LLDrawable::setGroup(LLviewerOctreeGroup *groupp)
-{
+ {
LLSpatialGroup* cur_groupp = (LLSpatialGroup*)getGroup();
//precondition: mGroupp MUST be null or DEAD or mGroupp MUST NOT contain this
@@ -1081,7 +1103,7 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
//virtual
S32 LLDrawable::getMinVisFrameRange() const
{
- const S32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one.
+const S32 MIN_VIS_FRAME_RANGE = 2 ; //two frames:the current one and the last one.
return MIN_VIS_FRAME_RANGE ;
}
@@ -1120,11 +1142,11 @@ LLSpatialBridge::~LLSpatialBridge()
{
if(mEntry)
{
- LLSpatialGroup* group = getSpatialGroup();
- if (group)
- {
- group->mSpatialPartition->remove(this, group);
- }
+ LLSpatialGroup* group = getSpatialGroup();
+ if (group)
+ {
+ group->mSpatialPartition->remove(this, group);
+ }
}
//delete octree here so listeners will still be able to access bridge specific state
@@ -1184,7 +1206,7 @@ void LLSpatialBridge::updateSpatialExtents()
LLVector4a newMin;
LLVector4a newMax;
- newMin = newMax = center;
+ newMin = newMax = center;
for (U32 i = 0; i < 4; i++)
{
LLVector4a delta;
@@ -1198,7 +1220,7 @@ void LLSpatialBridge::updateSpatialExtents()
newMax.setMax(newMax, max);
}
setSpatialExtents(newMin, newMax);
-
+
LLVector4a diagonal;
diagonal.setSub(newMax, newMin);
mRadius = diagonal.getLength3().getF32() * 0.5f;
@@ -1405,7 +1427,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
markDead();
return;
}
-
+
if (gShiftFrame)
{
return;
@@ -1487,7 +1509,7 @@ void LLSpatialBridge::cleanupReferences()
if (mDrawable)
{
mDrawable->setGroup(NULL);
-
+
if (mDrawable->getVObj())
{
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
@@ -1500,8 +1522,8 @@ void LLSpatialBridge::cleanupReferences()
{
drawable->setGroup(NULL);
}
+ }
}
- }
LLDrawable* drawablep = mDrawable;
mDrawable = NULL;
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 3691bbf71b..26796b92d0 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -297,18 +297,18 @@ public:
private:
typedef std::vector<LLFace*> face_list_t;
- U32 mState;
- S32 mRenderType;
- LLPointer<LLViewerObject> mVObjp;
- face_list_t mFaces;
- LLPointer<LLDrawable> mSpatialBridge;
+ U32 mState;
+ S32 mRenderType;
+ LLPointer<LLViewerObject> mVObjp;
+ face_list_t mFaces;
+ LLPointer<LLDrawable> mSpatialBridge;
- F32 mRadius;
- S32 mGeneration;
-
- LLVector3 mCurrentScale;
+ F32 mRadius;
+ S32 mGeneration;
+
+ LLVector3 mCurrentScale;
- static U32 sNumZombieDrawables;
+ static U32 sNumZombieDrawables;
static LLDynamicArrayPtr<LLPointer<LLDrawable> > sDeadList;
} LL_ALIGN_POSTFIX(16);
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index c0976d1d43..216cf003e1 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -75,6 +75,7 @@ protected:
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLDriverParam : public LLViewerVisualParam
{
friend class LLPhysicsMotion; // physics motion needs to access driven params directly.
@@ -126,13 +127,13 @@ protected:
void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake);
- LLVector4a mDefaultVec; // temp holder
+ LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder
typedef std::vector<LLDrivenEntry> entry_list_t;
entry_list_t mDriven;
LLViewerVisualParam* mCurrentDistortionParam;
// Backlink only; don't make this an LLPointer.
LLVOAvatar* mAvatarp;
LLWearable* mWearablep;
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLDRIVERPARAM_H
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 0b3bc2b19a..28e4b32793 100755..100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -166,7 +166,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
//special value to indicate uninitialized position
mIndicesIndex = 0xFFFFFFFF;
-
+
mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
@@ -1058,7 +1058,7 @@ bool LLFace::canRenderAsMask()
{
return false;
}
-
+
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
getTexture()->getIsAlphaMask()) // texture actually qualifies for masking (lazily recalculated but expensive)
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 6caa89a611..80d845c70e 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -394,13 +394,13 @@ static std::map<TimeBlock*, LLColor4> sTimerColors;
void LLFastTimerView::draw()
{
LLFastTimer t(FTM_RENDER_TIMER);
-
+
generateUniqueColors();
// Draw the window background
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gl_rect_2d(getLocalRect(), LLColor4(0.f, 0.f, 0.f, 0.25f));
-
+
S32 y = drawHelp(getRect().getHeight() - MARGIN);
drawLegend(y - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 2));
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index f9ceb4423b..8b9ad290bc 100644
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -113,20 +113,20 @@ private:
ALIGN_COUNT
} ChildAlignment;
- ChildAlignment mDisplayCenter;
+ ChildAlignment mDisplayCenter;
bool mDisplayCalls,
mDisplayHz;
LLUnit<LLUnits::Seconds, F64> mAllTimeMax,
mTotalTimeDisplay;
- LLRect mBarRect;
- S32 mScrollIndex;
+ LLRect mBarRect;
+ S32 mScrollIndex;
LLTrace::TimeBlock* mHoverID;
LLTrace::TimeBlock* mHoverTimer;
- LLRect mToolTipRect;
- S32 mHoverBarIndex;
- LLFrameTimer mHighlightTimer;
- S32 mPrintStats;
- LLRect mGraphRect;
+ LLRect mToolTipRect;
+ S32 mHoverBarIndex;
+ LLFrameTimer mHighlightTimer;
+ S32 mPrintStats;
+ LLRect mGraphRect;
LLTrace::PeriodicRecording* mRecording;
bool mPauseHistory;
};
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 2b39b771e7..a4cadcd5dc 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -479,6 +479,7 @@ void LLFeatureManager::parseGPUTable(std::string filename)
mGPUString = label;
mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10);
mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10);
+ sscanf(expected_gl_version.c_str(), "%f", &mExpectedGLVersion);
}
}
#if LL_EXPORT_GPU_TABLE
diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h
index 6f9d2e49c6..ad72c16743 100644
--- a/indra/newview/llfeaturemanager.h
+++ b/indra/newview/llfeaturemanager.h
@@ -103,7 +103,8 @@ public:
mTableVersion(0),
mSafe(FALSE),
mGPUClass(GPU_CLASS_UNKNOWN),
- mGPUSupported(FALSE)
+ mExpectedGLVersion(0.f),
+ mGPUSupported(FALSE)
{
}
~LLFeatureManager() {cleanupFeatureTables();}
@@ -118,6 +119,7 @@ public:
EGPUClass getGPUClass() { return mGPUClass; }
std::string& getGPUString() { return mGPUString; }
BOOL isGPUSupported() { return mGPUSupported; }
+ F32 getExpectedGLVersion() { return mExpectedGLVersion; }
void cleanupFeatureTables();
@@ -157,6 +159,7 @@ protected:
S32 mTableVersion;
BOOL mSafe; // Reinitialize everything to the "safe" mask
EGPUClass mGPUClass;
+ F32 mExpectedGLVersion; //expected GL version according to gpu table
std::string mGPUString;
BOOL mGPUSupported;
};
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index c6983ef5b3..77a0cdffce 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -66,7 +66,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mSimulateRes = 0;
mFrameNum = 0;
mCollisionSphereRadius = 0.f;
- mRenderRes = 1;
+ mRenderRes = -1;
if(mVO->mDrawable.notNull())
{
@@ -350,16 +350,17 @@ void LLVolumeImplFlexible::doIdleUpdate()
{
bool visible = drawablep->isVisible();
- if ((mSimulateRes == 0) && visible)
+ if (mRenderRes == -1)
{
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+ sUpdateDelay[mInstanceIndex] = 0;
}
else
{
F32 pixel_area = mVO->getPixelArea();
- U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
+ U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1);
// MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
update_period = llclamp(update_period, 0U, 32U);
@@ -650,6 +651,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length;
// Create points
+ llassert(mRenderRes > -1)
S32 num_render_sections = 1<<mRenderRes;
if (path->getPathLength() != num_render_sections+1)
{
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index bca4b5e447..fffd724b22 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -80,6 +80,7 @@ BOOL LLFloaterBuyContents::postBuild()
LLFloaterBuyContents::~LLFloaterBuyContents()
{
+ removeVOInventoryListener();
}
@@ -147,23 +148,26 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
return;
}
- if (!inv)
+ LLScrollListCtrl* item_list = getChild<LLScrollListCtrl>("item_list");
+ if (!item_list)
{
- llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged"
- << llendl;
removeVOInventoryListener();
return;
}
- LLCtrlListInterface *item_list = childGetListInterface("item_list");
- if (!item_list)
+ item_list->deleteAllItems();
+
+ if (!inv)
{
- removeVOInventoryListener();
+ llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged"
+ << llendl;
+
return;
}
// default to turning off the buy button.
- getChildView("buy_btn")->setEnabled(FALSE);
+ LLView* buy_btn = getChildView("buy_btn");
+ buy_btn->setEnabled(FALSE);
LLUUID owner_id;
BOOL is_group_owned;
@@ -204,7 +208,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
// There will be at least one item shown in the display, so go
// ahead and enable the buy button.
- getChildView("buy_btn")->setEnabled(TRUE);
+ buy_btn->setEnabled(TRUE);
// Create the line in the list
LLSD row;
@@ -255,8 +259,6 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
getChildView("wear_check")->setEnabled(TRUE);
getChild<LLUICtrl>("wear_check")->setValue(LLSD(false) );
}
-
- removeVOInventoryListener();
}
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index e2beb272e6..06681f5fd5 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -172,9 +172,9 @@ void LLFloaterColorPicker::createUI ()
//
void LLFloaterColorPicker::showUI ()
{
+ openFloater(getKey());
setVisible ( TRUE );
setFocus ( TRUE );
- openFloater(getKey());
// HACK: if system color picker is required - close the SL one we made and use default system dialog
if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) )
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 6b2492d927..2575f6f817 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -901,11 +901,13 @@ BOOL LLImagePreviewSculpted::render()
{
gObjectPreviewProgram.bind();
}
+ gPipeline.enableLightsPreview();
+
gGL.pushMatrix();
const F32 SCALE = 1.25f;
gGL.scalef(SCALE, SCALE, SCALE);
const F32 BRIGHTNESS = 0.9f;
- gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS);
+ gGL.diffuseColor3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS);
mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
mVertexBuffer->draw(LLRender::TRIANGLES, num_indices, 0);
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index a5e3cd404d..69986f6789 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -735,6 +735,20 @@ void LLFloaterModelPreview::onAutoFillCommit(LLUICtrl* ctrl, void* userdata)
void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
{
mModelPreview->onLODParamCommit(lod, enforce_tri_limit);
+
+ //refresh LoDs that reference this one
+ for (S32 i = lod - 1; i >= 0; --i)
+ {
+ LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[i]);
+ if (lod_source_combo->getCurrentIndex() == LLModelPreview::USE_LOD_ABOVE)
+ {
+ onLoDSourceCommit(i);
+ }
+ else
+ {
+ break;
+ }
+ }
}
@@ -3868,15 +3882,30 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
U32 triangle_count = 0;
- for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
+ U32 instanced_triangle_count = 0;
+
+ //get the triangle count for the whole scene
+ for (LLModelLoader::scene::iterator iter = mBaseScene.begin(), endIter = mBaseScene.end(); iter != endIter; ++iter)
{
- LLModel* mdl = *iter;
- for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i)
+ for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
+ {
+ LLModel* mdl = instance->mModel;
+ if (mdl)
{
- triangle_count += mdl->getVolumeFace(i).mNumIndices/3;
+ instanced_triangle_count += mdl->getNumTriangles();
+ }
}
+ }
+
+ //get the triangle count for the non-instanced set of models
+ for (U32 i = 0; i < mBaseModel.size(); ++i)
+ {
+ triangle_count += mBaseModel[i]->getNumTriangles();
}
+ //get ratio of uninstanced triangles to instanced triangles
+ F32 triangle_ratio = (F32) triangle_count / (F32) instanced_triangle_count;
+
U32 base_triangle_count = triangle_count;
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
@@ -3910,6 +3939,8 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
if (which_lod > -1 && which_lod < NUM_LOD)
{
limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger();
+ //convert from "scene wide" to "non-instanced" triangle limit
+ limit = (S32) ( (F32) limit*triangle_ratio );
}
}
else
@@ -4015,7 +4046,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
U32 actual_verts = 0;
U32 submeshes = 0;
- mRequestedTriangleCount[lod] = triangle_count;
+ mRequestedTriangleCount[lod] = (S32) ( (F32) triangle_count / triangle_ratio );
mRequestedErrorThreshold[lod] = lod_error_threshold;
glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode);
@@ -4197,15 +4228,21 @@ void LLModelPreview::updateStatusMessages()
//initialize total for this lod to 0
total_tris[lod] = total_verts[lod] = total_submeshes[lod] = 0;
- for (U32 i = 0; i < mModel[lod].size(); ++i)
- { //for each model in the lod
+ for (LLModelLoader::scene::iterator iter = mScene[lod].begin(), endIter = mScene[lod].end(); iter != endIter; ++iter)
+ {
+ for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
+ {
+ LLModel* model = instance->mModel;
+ if (model)
+ {
+ //for each model in the lod
S32 cur_tris = 0;
S32 cur_verts = 0;
- S32 cur_submeshes = mModel[lod][i]->getNumVolumeFaces();
+ S32 cur_submeshes = model->getNumVolumeFaces();
for (S32 j = 0; j < cur_submeshes; ++j)
{ //for each submesh (face), add triangles and vertices to current total
- const LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j);
+ const LLVolumeFace& face = model->getVolumeFace(j);
cur_tris += face.mNumIndices/3;
cur_verts += face.mNumVertices;
}
@@ -4221,6 +4258,8 @@ void LLModelPreview::updateStatusMessages()
submeshes[lod].push_back(cur_submeshes);
}
}
+ }
+ }
if (mMaxTriangleLimit == 0)
{
@@ -4395,16 +4434,18 @@ void LLModelPreview::updateStatusMessages()
}
//add up physics triangles etc
- S32 start = 0;
- S32 end = mModel[LLModel::LOD_PHYSICS].size();
-
S32 phys_tris = 0;
S32 phys_hulls = 0;
S32 phys_points = 0;
- for (S32 i = start; i < end; ++i)
- { //add up hulls and points and triangles for selected mesh(es)
- LLModel* model = mModel[LLModel::LOD_PHYSICS][i];
+ //get the triangle count for the whole scene
+ for (LLModelLoader::scene::iterator iter = mScene[LLModel::LOD_PHYSICS].begin(), endIter = mScene[LLModel::LOD_PHYSICS].end(); iter != endIter; ++iter)
+ {
+ for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
+ {
+ LLModel* model = instance->mModel;
+ if (model)
+ {
S32 cur_submeshes = model->getNumVolumeFaces();
LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull;
@@ -4426,6 +4467,8 @@ void LLModelPreview::updateStatusMessages()
}
}
}
+ }
+ }
if (phys_tris > 0)
{
@@ -4586,7 +4629,7 @@ void LLModelPreview::updateLodControls(S32 lod)
if (!lod_combo) return;
S32 lod_mode = lod_combo->getCurrentIndex();
- if (lod_mode == 0) // LoD from file
+ if (lod_mode == LOD_FROM_FILE) // LoD from file
{
fmp->mLODMode[lod] = 0;
for (U32 i = 0; i < num_file_controls; ++i)
@@ -4599,7 +4642,7 @@ void LLModelPreview::updateLodControls(S32 lod)
mFMP->childHide(lod_controls[i] + lod_name[lod]);
}
}
- else if (lod_mode == 2) // use LoD above
+ else if (lod_mode == USE_LOD_ABOVE) // use LoD above
{
fmp->mLODMode[lod] = 2;
for (U32 i = 0; i < num_file_controls; ++i)
@@ -5071,6 +5114,11 @@ BOOL LLModelPreview::render()
refresh();
}
+ if (use_shaders)
+ {
+ gObjectPreviewProgram.bind();
+ }
+
gGL.loadIdentity();
gPipeline.enableLightsPreview();
@@ -5096,11 +5144,6 @@ BOOL LLModelPreview::render()
const U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
- if (use_shaders)
- {
- gObjectPreviewProgram.bind();
- }
-
LLGLEnable normalize(GL_NORMALIZE);
if (!mBaseModel.empty() && mVertexBuffer[5].empty())
@@ -5289,7 +5332,7 @@ BOOL LLModelPreview::render()
hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128));
}
- glColor4ubv(hull_colors[i].mV);
+ gGL.diffuseColor4ubv(hull_colors[i].mV);
LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals);
if (explode > 0.f)
@@ -5760,6 +5803,12 @@ void LLFloaterModelPreview::onLoDSourceCommit(S32 lod)
{
mModelPreview->updateLodControls(lod);
refresh();
+
+ LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[lod]);
+ if (lod_source_combo->getCurrentIndex() == LLModelPreview::GENERATE)
+ { //rebuild LoD to update triangle counts
+ onLODParamCommit(lod, true);
+ }
}
void LLFloaterModelPreview::resetDisplayOptions()
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index ab319c30d5..e588418f7b 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -311,6 +311,15 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
typedef boost::signals2::signal<void (bool)> model_updated_signal_t;
public:
+
+ typedef enum
+ {
+ LOD_FROM_FILE = 0,
+ GENERATE,
+ USE_LOD_ABOVE,
+ } eLoDMode;
+
+public:
LLModelPreview(S32 width, S32 height, LLFloater* fmp);
virtual ~LLModelPreview();
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 48484786f6..1eb7f4469a 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -1055,6 +1055,17 @@ void commit_grid_mode(LLUICtrl *ctrl)
LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
}
+// static
+void LLFloaterTools::setGridMode(S32 mode)
+{
+ LLFloaterTools* tools_floater = LLFloaterReg::getTypedInstance<LLFloaterTools>("build");
+ if (!tools_floater || !tools_floater->mComboGridMode)
+ {
+ return;
+ }
+
+ tools_floater->mComboGridMode->setCurrentByIndex(mode);
+}
void LLFloaterTools::onClickGridOptions()
{
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index 7a19d093a4..ecb0092a6f 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -107,6 +107,8 @@ public:
bool selectedMediaEditable();
void updateLandImpacts();
+ static void setGridMode(S32 mode);
+
private:
void refresh();
void refreshMedia();
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 151cd2a1cd..e85d849c9a 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -219,7 +219,8 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
}
// Discover the MIME type only for "http" scheme.
- if(scheme == "http" || scheme == "https")
+ if(!media_url.empty() &&
+ (scheme == "http" || scheme == "https"))
{
LLHTTPClient::getHeaderOnly( media_url,
new LLMediaTypeResponder(self->getHandle()));
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 87b900da62..949de312be 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2588,12 +2588,12 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{
cat_count = cat_array->count();
}
-
+
// Move to next if current folder empty
if ((item_count == 0) && (cat_count == 0))
- {
+ {
continue;
- }
+ }
uuid_vec_t ids;
LLRightClickInventoryFetchObserver* outfit = NULL;
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 6e0f360cbc..9ec5d7c20c 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -72,7 +72,6 @@ void LLManip::rebuild(LLViewerObject* vobj)
LLDrawable* drawablep = vobj->mDrawable;
if (drawablep && drawablep->getVOVolume())
{
-
gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE);
drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED
drawablep->updateMove();
@@ -82,6 +81,14 @@ void LLManip::rebuild(LLViewerObject* vobj)
group->dirtyGeom();
gPipeline.markRebuild(group, TRUE);
}
+
+ LLViewerObject::const_child_list_t& child_list = vobj->getChildren();
+ for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(), endIter = child_list.end();
+ iter != endIter; ++iter)
+ {
+ LLViewerObject* child = *iter;
+ rebuild(child);
+ }
}
}
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
index bf4f4bceed..2b92b0b3d1 100644
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
@@ -242,3 +242,4 @@ void LLMenuOptionPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrent
LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true);
}
}
+
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 92ac435f08..1223615079 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -204,16 +204,30 @@ class LLMeshHeaderResponder : public LLCurl::Responder
{
public:
LLVolumeParams mMeshParams;
-
+ bool mProcessed;
+
LLMeshHeaderResponder(const LLVolumeParams& mesh_params)
: mMeshParams(mesh_params)
{
- LLMeshRepoThread::sActiveHeaderRequests++;
+ LLMeshRepoThread::incActiveHeaderRequests();
+ mProcessed = false;
}
~LLMeshHeaderResponder()
{
- LLMeshRepoThread::sActiveHeaderRequests--;
+ if (!LLApp::isQuitting())
+ {
+ if (!mProcessed)
+ { //something went wrong, retry
+ llwarns << "Timeout or service unavailable, retrying." << llendl;
+ LLMeshRepository::sHTTPRetryCount++;
+ LLMeshRepoThread::HeaderRequest req(mMeshParams);
+ LLMutexLock lock(gMeshRepo.mThread->mMutex);
+ gMeshRepo.mThread->mHeaderReqQ.push(req);
+ }
+
+ LLMeshRepoThread::decActiveHeaderRequests();
+ }
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -229,16 +243,27 @@ public:
S32 mLOD;
U32 mRequestedBytes;
U32 mOffset;
+ bool mProcessed;
LLMeshLODResponder(const LLVolumeParams& mesh_params, S32 lod, U32 offset, U32 requested_bytes)
: mMeshParams(mesh_params), mLOD(lod), mOffset(offset), mRequestedBytes(requested_bytes)
{
- LLMeshRepoThread::sActiveLODRequests++;
+ LLMeshRepoThread::incActiveLODRequests();
+ mProcessed = false;
}
~LLMeshLODResponder()
{
- LLMeshRepoThread::sActiveLODRequests--;
+ if (!LLApp::isQuitting())
+ {
+ if (!mProcessed)
+ {
+ llwarns << "Killed without being processed, retrying." << llendl;
+ LLMeshRepository::sHTTPRetryCount++;
+ gMeshRepo.mThread->lockAndLoadMeshLOD(mMeshParams, mLOD);
+ }
+ LLMeshRepoThread::decActiveLODRequests();
+ }
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -253,10 +278,17 @@ public:
LLUUID mMeshID;
U32 mRequestedBytes;
U32 mOffset;
+ bool mProcessed;
LLMeshSkinInfoResponder(const LLUUID& id, U32 offset, U32 size)
: mMeshID(id), mRequestedBytes(size), mOffset(offset)
{
+ mProcessed = false;
+ }
+
+ ~LLMeshSkinInfoResponder()
+ {
+ llassert(mProcessed);
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -271,10 +303,17 @@ public:
LLUUID mMeshID;
U32 mRequestedBytes;
U32 mOffset;
+ bool mProcessed;
LLMeshDecompositionResponder(const LLUUID& id, U32 offset, U32 size)
: mMeshID(id), mRequestedBytes(size), mOffset(offset)
{
+ mProcessed = false;
+ }
+
+ ~LLMeshDecompositionResponder()
+ {
+ llassert(mProcessed);
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -289,10 +328,17 @@ public:
LLUUID mMeshID;
U32 mRequestedBytes;
U32 mOffset;
+ bool mProcessed;
LLMeshPhysicsShapeResponder(const LLUUID& id, U32 offset, U32 size)
: mMeshID(id), mRequestedBytes(size), mOffset(offset)
{
+ mProcessed = false;
+ }
+
+ ~LLMeshPhysicsShapeResponder()
+ {
+ llassert(mProcessed);
}
virtual void completedRaw(U32 status, const std::string& reason,
@@ -638,16 +684,24 @@ void LLMeshRepoThread::loadMeshPhysicsShape(const LLUUID& mesh_id)
mPhysicsShapeRequests.insert(mesh_id);
}
+void LLMeshRepoThread::lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
+{
+ if (!LLAppViewer::isQuitting())
+ {
+ loadMeshLOD(mesh_params, lod);
+ }
+}
-void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
-{ //protected by mSignal, no locking needed here
+
+void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
+{ //could be called from any thread
+ LLMutexLock lock(mMutex);
mesh_header_map::iterator iter = mMeshHeader.find(mesh_params.getSculptID());
if (iter != mMeshHeader.end())
{ //if we have the header, request LOD byte range
LODRequest req(mesh_params, lod);
{
- LLMutexLock lock(mMutex);
mLODReqQ.push(req);
LLMeshRepository::sLODProcessing++;
}
@@ -665,7 +719,6 @@ void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
}
else
{ //if no header request is pending, fetch header
- LLMutexLock lock(mMutex);
mHeaderReqQ.push(req);
mPendingLOD[mesh_params].push_back(lod);
}
@@ -945,6 +998,34 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
return ret;
}
+//static
+void LLMeshRepoThread::incActiveLODRequests()
+{
+ LLMutexLock lock(gMeshRepo.mThread->mMutex);
+ ++LLMeshRepoThread::sActiveLODRequests;
+}
+
+//static
+void LLMeshRepoThread::decActiveLODRequests()
+{
+ LLMutexLock lock(gMeshRepo.mThread->mMutex);
+ --LLMeshRepoThread::sActiveLODRequests;
+}
+
+//static
+void LLMeshRepoThread::incActiveHeaderRequests()
+{
+ LLMutexLock lock(gMeshRepo.mThread->mMutex);
+ ++LLMeshRepoThread::sActiveHeaderRequests;
+}
+
+//static
+void LLMeshRepoThread::decActiveHeaderRequests()
+{
+ LLMutexLock lock(gMeshRepo.mThread->mMutex);
+ --LLMeshRepoThread::sActiveHeaderRequests;
+}
+
//return false if failed to get header
bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count)
{
@@ -1821,6 +1902,8 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
+ mProcessed = true;
+
// thread could have already be destroyed during logout
if( !gMeshRepo.mThread )
{
@@ -1838,11 +1921,13 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
{
if (status == 499 || status == 503)
{ //timeout or service unavailable, try again
+ llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD);
}
else
{
+ llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -1881,6 +1966,8 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
+ mProcessed = true;
+
// thread could have already be destroyed during logout
if( !gMeshRepo.mThread )
{
@@ -1898,11 +1985,13 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
{
if (status == 499 || status == 503)
{ //timeout or service unavailable, try again
+ llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
gMeshRepo.mThread->loadMeshSkinInfo(mMeshID);
}
else
{
+ llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -1941,6 +2030,8 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
+ mProcessed = true;
+
if( !gMeshRepo.mThread )
{
return;
@@ -1957,11 +2048,13 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
{
if (status == 499 || status == 503)
{ //timeout or service unavailable, try again
+ llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
gMeshRepo.mThread->loadMeshDecomposition(mMeshID);
}
else
{
+ llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2000,6 +2093,8 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
+ mProcessed = true;
+
// thread could have already be destroyed during logout
if( !gMeshRepo.mThread )
{
@@ -2017,11 +2112,13 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
{
if (status == 499 || status == 503)
{ //timeout or service unavailable, try again
+ llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID);
}
else
{
+ llassert(status == 499 || status == 503); //intentionally trigger a breakpoint
llwarns << "Unhandled status " << status << llendl;
}
return;
@@ -2060,6 +2157,8 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
+ mProcessed = true;
+
// thread could have already be destroyed during logout
if( !gMeshRepo.mThread )
{
@@ -2078,8 +2177,12 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
// TODO*: Add maximum retry logic, exponential backoff
// and (somewhat more optional than the others) retries
// again after some set period of time
+
+ llassert(status == 503 || status == 499);
+
if (status == 503 || status == 499)
{ //retry
+ llwarns << "Timeout or service unavailable, retrying." << llendl;
LLMeshRepository::sHTTPRetryCount++;
LLMeshRepoThread::HeaderRequest req(mMeshParams);
LLMutexLock lock(gMeshRepo.mThread->mMutex);
@@ -2087,6 +2190,10 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
return;
}
+ else
+ {
+ llwarns << "Unhandled status." << llendl;
+ }
}
S32 data_size = buffer->countAfter(channels.in(), NULL);
@@ -2101,7 +2208,11 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
LLMeshRepository::sBytesReceived += llmin(data_size, 4096);
- if (!gMeshRepo.mThread->headerReceived(mMeshParams, data, data_size))
+ bool success = gMeshRepo.mThread->headerReceived(mMeshParams, data, data_size);
+
+ llassert(success);
+
+ if (!success)
{
llwarns
<< "Unable to parse mesh header: "
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 6e301c26a2..8602271f84 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -322,7 +322,9 @@ public:
virtual void run();
+ void lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
void loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
+
bool fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count);
bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count);
bool headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size);
@@ -351,6 +353,10 @@ public:
// (should hold onto mesh_id and try again later if header info does not exist)
bool fetchMeshPhysicsShape(const LLUUID& mesh_id);
+ static void incActiveLODRequests();
+ static void decActiveLODRequests();
+ static void incActiveHeaderRequests();
+ static void decActiveHeaderRequests();
};
@@ -407,7 +413,7 @@ public:
void startRequest() { ++mPendingUploads; }
void stopRequest() { --mPendingUploads; }
-
+
bool finished() { return mFinished; }
virtual void run();
void preStart();
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 93f7146fc8..eb6591eb39 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -698,19 +698,28 @@ void LLPanelStandStopFlying::updatePosition()
S32 y_pos = 0;
S32 bottom_tb_center = 0;
- if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom"))
+ if (LLToolBar* toolbar_bottom = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_BOTTOM))
{
y_pos = toolbar_bottom->getRect().getHeight();
bottom_tb_center = toolbar_bottom->getRect().getCenterX();
}
S32 left_tb_width = 0;
- if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left"))
+ if (LLToolBar* toolbar_left = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_LEFT))
{
left_tb_width = toolbar_left->getRect().getWidth();
}
- if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container"))
+ if (!mStateManagementButtons.get())
+ {
+ LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container");
+ if (panel_ssf_container)
+ {
+ mStateManagementButtons = panel_ssf_container->getHandle();
+ }
+ }
+
+ if(LLPanel* panel_ssf_container = mStateManagementButtons.get())
{
panel_ssf_container->setOrigin(0, y_pos);
}
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index 744dd866d4..c525d9dfdb 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -172,6 +172,8 @@ private:
*/
LLHandle<LLPanel> mOriginalParent;
+ LLHandle<LLPanel> mStateManagementButtons;
+
/**
* True if the panel is currently attached to the movement controls floater.
*
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 16c51138a9..34cb27d5ce 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -353,7 +353,8 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi
if (from_id.isNull())
{
- llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
+ // Normal behavior for system generated messages, don't spam.
+ // llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
return;
}
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index fb1adc7ddf..4cad96fdc7 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -84,6 +84,11 @@ bool LLPersistentNotificationStorage::onPersistentChannelChanged(const LLSD& pay
return false;
}
+// Storing or loading too many persistent notifications will severely hurt
+// viewer load times, possibly to the point of failing to log in. Example case
+// from MAINT-994 is 821 notifications.
+static const S32 MAX_PERSISTENT_NOTIFICATIONS = 250;
+
void LLPersistentNotificationStorage::saveNotifications()
{
// TODO - think about save optimization.
@@ -114,6 +119,13 @@ void LLPersistentNotificationStorage::saveNotifications()
}
data.append(notification->asLLSD());
+
+ if (data.size() >= MAX_PERSISTENT_NOTIFICATIONS)
+ {
+ llwarns << "Too many persistent notifications."
+ << " Saved " << MAX_PERSISTENT_NOTIFICATIONS << " of " << history_channel->size() << " persistent notifications." << llendl;
+ break;
+ }
}
LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
@@ -124,9 +136,6 @@ void LLPersistentNotificationStorage::loadNotifications()
{
LLResponderRegistry::registerResponders();
- LLNotifications::instance().getChannel("Persistent")->
- connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
-
llifstream notify_file(mFileName.c_str());
if (!notify_file.is_open())
{
@@ -158,29 +167,48 @@ void LLPersistentNotificationStorage::loadNotifications()
findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
LLNotifications& instance = LLNotifications::instance();
-
+ S32 processed_notifications = 0;
for (LLSD::array_const_iterator notification_it = data.beginArray();
notification_it != data.endArray();
++notification_it)
{
LLSD notification_params = *notification_it;
- LLNotificationPtr notification(new LLNotification(notification_params));
- LLNotificationResponderPtr responder(LLResponderRegistry::
- createResponder(notification_params["name"], notification_params["responder"]));
- notification->setResponseFunctor(responder);
+ if (instance.templateExists(notification_params["name"].asString()))
+ {
+ LLNotificationPtr notification(new LLNotification(notification_params));
- instance.add(notification);
+ LLNotificationResponderPtr responder(LLResponderRegistry::
+ createResponder(notification_params["name"], notification_params["responder"]));
+ notification->setResponseFunctor(responder);
- // hide script floaters so they don't confuse the user and don't overlap startup toast
- LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false);
+ instance.add(notification);
- if(notification_channel)
+ // hide script floaters so they don't confuse the user and don't overlap startup toast
+ LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false);
+
+ if(notification_channel)
+ {
+ // hide saved toasts so they don't confuse the user
+ notification_channel->hideToast(notification->getID());
+ }
+ }
+ else
+ {
+ llwarns << "Failed to find template for persistent notification " << notification_params["name"].asString() << llendl;
+ }
+
+ ++processed_notifications;
+ if (processed_notifications >= MAX_PERSISTENT_NOTIFICATIONS)
{
- // hide saved toasts so they don't confuse the user
- notification_channel->hideToast(notification->getID());
+ llwarns << "Too many persistent notifications."
+ << " Processed " << MAX_PERSISTENT_NOTIFICATIONS << " of " << data.size() << " persistent notifications." << llendl;
+ break;
}
}
+
+ LLNotifications::instance().getChannel("Persistent")->
+ connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
}
//////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index d42056ef9d..6b9edcb07c 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1186,7 +1186,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis
void LLPanelEditWearable::showDefaultSubpart()
{
- changeCamera(3);
+ changeCamera(0);
}
void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index)
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 28cfb5b282..fabb8daa6e 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1174,6 +1174,8 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "share")
{
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (!current_item) return FALSE;
LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
return parent ? parent->canShare() : FALSE;
}
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 35e2e96bab..36234b9536 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -186,8 +186,11 @@ private:
// Populate the menu with items like "New Skin", "New Pants", etc.
static void populateCreateWearableSubmenus(LLMenuGL* menu)
{
- LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
- LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE);
+ // MAINT-2276...these menus are created as dummies because they are not available
+ // when this function is called. This prevents their parent from popping up later.
+ //
+ //LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
+ //LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE);
for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
{
@@ -200,8 +203,11 @@ private:
p.on_click.function_name = "Wearable.Create";
p.on_click.parameter = LLSD(type_name);
- LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ?
- menu_clothes : menu_bp;
+ //LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;
+ // This is a work-around for MAINT-2276 wherein the parent toggleable menu does not appear
+ // It puts everything under one menu, but that menu appears, which is better than not.
+ //
+ LLView* parent = menu;
LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);
}
}
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 8027783bd8..4e6128018d 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -425,7 +425,7 @@ void LLPanelPermissions::refresh()
}
}
- getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced);
+ getChildView("button set group")->setEnabled(root_selected && owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced);
getChildView("Name:")->setEnabled(TRUE);
LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name");
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index e26fcc74bd..5f5258bbce 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -241,7 +241,7 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
mBaseNormals[i].clear();
mBaseBinormals[i].clear();
mTexCoords[i].clear();
- mWeights[i] = 0.f;
+ mWeights[i] = 0.f;
}
mNumVertices = numVertices;
return TRUE;
diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h
index 850171d169..28da230541 100644
--- a/indra/newview/llpolymesh.h
+++ b/indra/newview/llpolymesh.h
@@ -400,6 +400,8 @@ protected:
// LLPolySkeletalDeformation
// A set of joint scale data for deforming the avatar mesh
//-----------------------------------------------------------------------------
+
+LL_ALIGN_PREFIX(16)
class LLPolySkeletalDistortion : public LLViewerVisualParam
{
public:
@@ -436,13 +438,14 @@ public:
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return NULL;};
protected:
+ LL_ALIGN_16(LLVector4a mDefaultVec);
+
typedef std::map<LLJoint*, LLVector3> joint_vec_map_t;
joint_vec_map_t mJointScales;
joint_vec_map_t mJointOffsets;
- LLVector4a mDefaultVec;
// Backlink only; don't make this an LLPointer.
LLVOAvatar *mAvatar;
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLPOLYMESH_H
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp
index bd96608641..495fdc348c 100644
--- a/indra/newview/llpolymorph.cpp
+++ b/indra/newview/llpolymorph.cpp
@@ -73,9 +73,11 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
{
const S32 numVertices = mNumIndices;
- mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ U32 size = sizeof(LLVector4a)*numVertices;
+
+ mCoords = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
+ mNormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
+ mBinormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
@@ -121,9 +123,13 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
//-------------------------------------------------------------------------
// allocate vertices
//-------------------------------------------------------------------------
- mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
- mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+
+ U32 size = sizeof(LLVector4a)*numVertices;
+
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
+
mTexCoords = new LLVector2[numVertices];
// Actually, we are allocating more space than we need for the skiplist
mVertexIndices = new U32[numVertices];
diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h
index 678599d7e1..24940c52e0 100644
--- a/indra/newview/llpolymorph.h
+++ b/indra/newview/llpolymorph.h
@@ -41,6 +41,7 @@ class LLWearable;
//-----------------------------------------------------------------------------
// LLPolyMorphData()
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLPolyMorphData
{
public:
@@ -75,12 +76,13 @@ public:
F32 mTotalDistortion; // vertex distortion summed over entire morph
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
- LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
+ LL_ALIGN_16(LLVector4a mAvgDistortion); // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
private:
void freeData();
-};
+} LL_ALIGN_POSTFIX(16);
+
//-----------------------------------------------------------------------------
// LLPolyVertexMask()
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index bdbb1bb797..0079b3bab8 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -211,7 +211,6 @@ LLSelectMgr::LLSelectMgr()
mGridMode = GRID_MODE_WORLD;
gSavedSettings.setS32("GridMode", (S32)GRID_MODE_WORLD);
- mGridValid = FALSE;
mSelectedObjects = new LLObjectSelection();
mHoverObjects = new LLObjectSelection();
@@ -1170,7 +1169,6 @@ void LLSelectMgr::setGridMode(EGridMode mode)
mGridMode = mode;
gSavedSettings.setS32("GridMode", mode);
updateSelectionCenter();
- mGridValid = FALSE;
}
void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &scale)
@@ -1271,7 +1269,6 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
origin = mGridOrigin;
rotation = mGridRotation;
scale = mGridScale;
- mGridValid = TRUE;
}
//-----------------------------------------------------------------------------
@@ -2941,248 +2938,241 @@ BOOL LLSelectMgr::selectGetRootsCopy()
return TRUE;
}
-//-----------------------------------------------------------------------------
-// selectGetCreator()
-// Creator information only applies to root objects.
-//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name)
+struct LLSelectGetFirstTest
{
- BOOL identical = TRUE;
- BOOL first = TRUE;
- LLUUID first_id;
- for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
- iter != getSelection()->root_object_end(); iter++ )
+ LLSelectGetFirstTest() : mIdentical(true), mFirst(true) { }
+ virtual ~LLSelectGetFirstTest() { }
+
+ // returns false to break out of the iteration.
+ bool checkMatchingNode(LLSelectNode* node)
{
- LLSelectNode* node = *iter;
- if (!node->mValid)
+ if (!node || !node->mValid)
{
- return FALSE;
+ return false;
}
- if (first)
+ if (mFirst)
{
- first_id = node->mPermissions->getCreator();
- first = FALSE;
+ mFirstValue = getValueFromNode(node);
+ mFirst = false;
}
else
{
- if ( !(first_id == node->mPermissions->getCreator() ) )
+ if ( mFirstValue != getValueFromNode(node) )
{
- identical = FALSE;
- break;
+ mIdentical = false;
+ // stop testing once we know not all selected are identical.
+ return false;
}
}
- }
- if (first_id.isNull())
- {
- name = LLTrans::getString("AvatarNameNobody");
- return FALSE;
+ // continue testing.
+ return true;
}
- result_id = first_id;
+ bool mIdentical;
+ LLUUID mFirstValue;
- if (identical)
- {
- name = LLSLURL("agent", first_id, "inspect").getSLURLString();
- }
- else
- {
- name = LLTrans::getString("AvatarNameMultiple");
- }
-
- return identical;
-}
+protected:
+ virtual const LLUUID& getValueFromNode(LLSelectNode* node) = 0;
+private:
+ bool mFirst;
+};
-//-----------------------------------------------------------------------------
-// selectGetOwner()
-// Owner information only applies to roots.
-//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name)
+void LLSelectMgr::getFirst(LLSelectGetFirstTest* test)
{
- BOOL identical = TRUE;
- BOOL first = TRUE;
- BOOL first_group_owned = FALSE;
- LLUUID first_id;
- for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
- iter != getSelection()->root_object_end(); iter++ )
+ if (gSavedSettings.getBOOL("EditLinkedParts"))
+{
+ for (LLObjectSelection::valid_iterator iter = getSelection()->valid_begin();
+ iter != getSelection()->valid_end(); ++iter )
{
- LLSelectNode* node = *iter;
- if (!node->mValid)
+ if (!test->checkMatchingNode(*iter))
{
- return FALSE;
+ break;
+ }
}
-
- if (first)
- {
- node->mPermissions->getOwnership(first_id, first_group_owned);
- first = FALSE;
}
else
{
- LLUUID owner_id;
- BOOL is_group_owned = FALSE;
- if (!(node->mPermissions->getOwnership(owner_id, is_group_owned))
- || owner_id != first_id || is_group_owned != first_group_owned)
+ for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
+ iter != getSelection()->root_object_end(); ++iter )
+ {
+ if (!test->checkMatchingNode(*iter))
{
- identical = FALSE;
break;
}
}
}
- if (first_id.isNull())
- {
- return FALSE;
}
- result_id = first_id;
-
- if (identical)
+//-----------------------------------------------------------------------------
+// selectGetCreator()
+// Creator information only applies to roots unless editing linked parts.
+//-----------------------------------------------------------------------------
+struct LLSelectGetFirstCreator : public LLSelectGetFirstTest
{
- BOOL public_owner = (first_id.isNull() && !first_group_owned);
- if (first_group_owned)
+protected:
+ virtual const LLUUID& getValueFromNode(LLSelectNode* node)
{
- name = LLSLURL("group", first_id, "inspect").getSLURLString();
+ return node->mPermissions->getCreator();
}
- else if(!public_owner)
+};
+
+BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name)
{
- name = LLSLURL("agent", first_id, "inspect").getSLURLString();
- }
- else
+ LLSelectGetFirstCreator test;
+ getFirst(&test);
+
+ if (test.mFirstValue.isNull())
{
name = LLTrans::getString("AvatarNameNobody");
+ return FALSE;
}
+
+ result_id = test.mFirstValue;
+
+ if (test.mIdentical)
+ {
+ name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString();
}
else
{
name = LLTrans::getString("AvatarNameMultiple");
}
- return identical;
+ return test.mIdentical;
}
-
//-----------------------------------------------------------------------------
-// selectGetLastOwner()
-// Owner information only applies to roots.
+// selectGetOwner()
+// Owner information only applies to roots unless editing linked parts.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name)
-{
- BOOL identical = TRUE;
- BOOL first = TRUE;
- LLUUID first_id;
- for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
- iter != getSelection()->root_object_end(); iter++ )
+struct LLSelectGetFirstOwner : public LLSelectGetFirstTest
{
- LLSelectNode* node = *iter;
- if (!node->mValid)
+protected:
+ virtual const LLUUID& getValueFromNode(LLSelectNode* node)
{
- return FALSE;
+ // Don't use 'getOwnership' since we return a reference, not a copy.
+ // Will return LLUUID::null if unowned (which is not allowed and should never happen.)
+ return node->mPermissions->isGroupOwned() ? node->mPermissions->getGroup() : node->mPermissions->getOwner();
}
+};
- if (first)
- {
- first_id = node->mPermissions->getLastOwner();
- first = FALSE;
- }
- else
+BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name)
{
- if ( !(first_id == node->mPermissions->getLastOwner() ) )
- {
- identical = FALSE;
- break;
- }
- }
- }
- if (first_id.isNull())
+ LLSelectGetFirstOwner test;
+ getFirst(&test);
+
+ if (test.mFirstValue.isNull())
{
return FALSE;
}
- result_id = first_id;
+ result_id = test.mFirstValue;
- if (identical)
+ if (test.mIdentical)
{
- BOOL public_owner = (first_id.isNull());
- if(!public_owner)
+ bool group_owned = selectIsGroupOwned();
+ if (group_owned)
{
- name = LLSLURL("agent", first_id, "inspect").getSLURLString();
+ name = LLSLURL("group", test.mFirstValue, "inspect").getSLURLString();
}
else
{
- name.assign("Public or Group");
+ name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString();
}
}
else
{
- name.assign( "" );
+ name = LLTrans::getString("AvatarNameMultiple");
}
- return identical;
+ return test.mIdentical;
}
-
//-----------------------------------------------------------------------------
-// selectGetGroup()
-// Group information only applies to roots.
+// selectGetLastOwner()
+// Owner information only applies to roots unless editing linked parts.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
+struct LLSelectGetFirstLastOwner : public LLSelectGetFirstTest
{
- BOOL identical = TRUE;
- BOOL first = TRUE;
- LLUUID first_id;
- for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
- iter != getSelection()->root_object_end(); iter++ )
+protected:
+ virtual const LLUUID& getValueFromNode(LLSelectNode* node)
+{
+ return node->mPermissions->getLastOwner();
+ }
+};
+
+BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name)
{
- LLSelectNode* node = *iter;
- if (!node->mValid)
+ LLSelectGetFirstLastOwner test;
+ getFirst(&test);
+
+ if (test.mFirstValue.isNull())
{
return FALSE;
}
- if (first)
+ result_id = test.mFirstValue;
+
+ if (test.mIdentical)
{
- first_id = node->mPermissions->getGroup();
- first = FALSE;
+ name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString();
}
else
{
- if ( !(first_id == node->mPermissions->getGroup() ) )
- {
- identical = FALSE;
- break;
+ name.assign( "" );
}
+
+ return test.mIdentical;
}
+
+//-----------------------------------------------------------------------------
+// selectGetGroup()
+// Group information only applies to roots unless editing linked parts.
+//-----------------------------------------------------------------------------
+struct LLSelectGetFirstGroup : public LLSelectGetFirstTest
+{
+protected:
+ virtual const LLUUID& getValueFromNode(LLSelectNode* node)
+ {
+ return node->mPermissions->getGroup();
}
+};
- result_id = first_id;
+BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
+{
+ LLSelectGetFirstGroup test;
+ getFirst(&test);
- return identical;
+ result_id = test.mFirstValue;
+ return test.mIdentical;
}
//-----------------------------------------------------------------------------
// selectIsGroupOwned()
-// Only operates on root nodes.
-// Returns TRUE if all have valid data and they are all group owned.
+// Only operates on root nodes unless editing linked parts.
+// Returns TRUE if the first selected is group owned.
//-----------------------------------------------------------------------------
-BOOL LLSelectMgr::selectIsGroupOwned()
-{
- BOOL found_one = FALSE;
- for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin();
- iter != getSelection()->root_object_end(); iter++ )
+struct LLSelectGetFirstGroupOwner : public LLSelectGetFirstTest
{
- LLSelectNode* node = *iter;
- if (!node->mValid)
+protected:
+ virtual const LLUUID& getValueFromNode(LLSelectNode* node)
{
- return FALSE;
- }
- found_one = TRUE;
- if (!node->mPermissions->isGroupOwned())
+ if (node->mPermissions->isGroupOwned())
{
- return FALSE;
+ return node->mPermissions->getGroup();
}
+ return LLUUID::null;
}
- return found_one ? TRUE : FALSE;
+};
+
+BOOL LLSelectMgr::selectIsGroupOwned()
+{
+ LLSelectGetFirstGroupOwner test;
+ getFirst(&test);
+
+ return test.mFirstValue.notNull() ? TRUE : FALSE;
}
//-----------------------------------------------------------------------------
@@ -4985,7 +4975,11 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
} func(id);
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func);
- if (node)
+ if (!node)
+ {
+ llwarns << "Couldn't find object " << id << " selected." << llendl;
+ }
+ else
{
if (node->mInventorySerial != inv_serial)
{
@@ -5056,13 +5050,6 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
dialog_refresh_all();
- // silly hack to allow 'save into inventory'
- if(gPopupMenuView->getVisible())
- {
- gPopupMenuView->setItemEnabled(SAVE_INTO_INVENTORY,
- enable_save_into_inventory(NULL));
- }
-
// hack for left-click buy object
LLToolPie::selectionPropertiesReceived();
}
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index ecbb20df1b..cc78e35869 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -343,6 +343,9 @@ typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle;
extern template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance();
#endif
+// For use with getFirstTest()
+struct LLSelectGetFirstTest;
+
class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr>
{
public:
@@ -745,6 +748,9 @@ private:
static void packGodlikeHead(void* user_data);
static bool confirmDelete(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle);
+ // Get the first ID that matches test and whether or not all ids are identical in selected objects.
+ void getFirst(LLSelectGetFirstTest* test);
+
public:
// Observer/callback support for when object selection changes or
// properties are received/updated
@@ -763,8 +769,6 @@ private:
LLVector3 mGridOrigin;
LLVector3 mGridScale;
EGridMode mGridMode;
- BOOL mGridValid;
-
BOOL mTEMode; // render te
LLVector3d mSelectionCenterGlobal;
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 8fb56eb6d8..986ac14140 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -101,6 +101,8 @@ BOOL LLSidepanelTaskInfo::postBuild()
mDetailsBtn = getChild<LLButton>("details_btn");
mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this));
+ mDeedBtn = getChild<LLButton>("button deed");
+
mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this);
@@ -263,7 +265,7 @@ void LLSidepanelTaskInfo::disableAll()
void LLSidepanelTaskInfo::refresh()
{
- LLButton* btn_deed_to_group = getChild<LLButton>("button deed");
+ LLButton* btn_deed_to_group = mDeedBtn;
if (btn_deed_to_group)
{
std::string deedText;
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 124229af06..05edcda5ed 100644
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -113,6 +113,7 @@ private:
LLButton* mPayBtn;
LLButton* mBuyBtn;
LLButton* mDetailsBtn;
+ LLButton* mDeedBtn;
protected:
LLViewerObject* getObject();
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 0e2109c4af..53f5658815 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -274,7 +274,7 @@ LLSpatialGroup::~LLSpatialGroup()
{
llerrs << "Illegal deletion of LLSpatialGroup!" << llendl;
}*/
-
+
if (gDebugGL)
{
gPipeline.checkReferences(this);
@@ -985,7 +985,7 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : LLv
mViewAngle.splat(0.f);
mLastUpdateViewAngle.splat(-1.f);
-
+
sg_assert(mOctreeNode->getListenerCount() == 0);
setState(SG_INITIAL_STATE_MASK);
gPipeline.markRebuild(this, TRUE);
@@ -1175,7 +1175,7 @@ void LLSpatialGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* en
void LLSpatialGroup::handleDestruction(const TreeNode* node)
{
setState(DEAD);
-
+
for (element_iter i = getDataBegin(); i != getDataEnd(); ++i)
{
LLViewerOctreeEntry* entry = *i;
@@ -1186,7 +1186,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
((LLDrawable*)entry->getDrawable())->setGroup(NULL);
}
else
- {
+ {
llerrs << "No Drawable found in the entry." << llendl;
}
}
@@ -1503,14 +1503,14 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
mBufferUsage = buffer_usage;
mDepthMask = FALSE;
mSlopRatio = 0.25f;
- mInfiniteFarClip = FALSE;
+ mInfiniteFarClip = FALSE;
new LLSpatialGroup(mOctree, this);
}
LLSpatialPartition::~LLSpatialPartition()
-{
+{
}
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
@@ -1519,12 +1519,12 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
//keep drawable from being garbage collected
LLPointer<LLDrawable> ptr = drawablep;
-
+
if(!drawablep->getGroup())
{
- assert_octree_valid(mOctree);
+ assert_octree_valid(mOctree);
mOctree->insert(drawablep->getEntry());
- assert_octree_valid(mOctree);
+ assert_octree_valid(mOctree);
}
LLSpatialGroup* group = drawablep->getSpatialGroup();
@@ -1636,7 +1636,7 @@ public:
return false;
}
-
+
virtual S32 frustumCheck(const LLviewerOctreeGroup* group)
{
S32 res = AABBInFrustumNoFarClipGroupBounds(group);
@@ -1831,7 +1831,7 @@ public:
{
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
if(!drawable)
- {
+ {
continue;
}
if (!drawable->isDead())
@@ -2019,8 +2019,6 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera)
S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select)
{
- llassert(results != NULL && for_select);
-
#if LL_OCTREE_PARANOIA_CHECK
((LLSpatialGroup*)mOctree->getListener(0))->checkStates();
#endif
@@ -3143,7 +3141,7 @@ void renderPhysicsShapes(LLSpatialGroup* group)
{
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
if(!drawable)
- {
+ {
continue;
}
LLVOVolume* volume = drawable->getVOVolume();
@@ -3783,10 +3781,10 @@ public:
{
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
if(!drawable)
- {
+ {
continue;
}
-
+
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES))
{
renderBoundingBox(drawable);
@@ -3869,7 +3867,7 @@ public:
{
if (index < 255)
{
- if (facep->mDrawInfo->mTextureList.size()<= index)
+ if (facep->mDrawInfo->mTextureList.size() <= index)
{
llerrs << "Face texture index out of bounds." << llendl;
}
@@ -3979,7 +3977,7 @@ public:
{
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
if(!drawable)
- {
+ {
continue;
}
renderBoundingBox(drawable, FALSE);
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index a2e2bf45d6..b592e73403 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -228,7 +228,7 @@ public:
typedef std::map<U32, drawmap_elem_t > draw_map_t;
typedef std::vector<LLPointer<LLVertexBuffer> > buffer_list_t;
typedef std::map<LLFace*, buffer_list_t> buffer_texture_map_t;
- typedef std::map<U32, buffer_texture_map_t> buffer_map_t;
+ typedef std::map<U32, buffer_texture_map_t> buffer_map_t;
struct CompareDistanceGreater
{
@@ -304,7 +304,7 @@ public:
void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
LLSpatialGroup* getParent();
-
+
BOOL addObject(LLDrawable *drawablep);
BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE);
BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group
@@ -323,7 +323,7 @@ public:
void setState(U32 state) {mState |= state;}
void dirtyGeom() { setState(GEOM_DIRTY); }
- void dirtyMesh() { setState(MESH_DIRTY); }
+ void dirtyMesh() { setState(MESH_DIRTY); }
void drawObjectBox(LLColor4 col);
@@ -332,7 +332,7 @@ public:
virtual void handleRemoval(const TreeNode* node, LLViewerOctreeEntry* face);
virtual void handleDestruction(const TreeNode* node);
virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child);
-
+
//-------------------
//for atlas use
//-------------------
@@ -395,7 +395,7 @@ public:
U32 mBufferUsage;
draw_map_t mDrawMap;
-
+
F32 mDistance;
F32 mDepth;
F32 mLastUpdateDistance;
@@ -464,7 +464,7 @@ public:
void resetVertexBuffers();
BOOL isOcclusionEnabled();
BOOL getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax);
-
+
public:
LLSpatialBridge* mBridge; // NULL for non-LLSpatialBridge instances, otherwise, mBridge == this
// use a pointer instead of making "isBridge" and "asBridge" virtual so it's safe
@@ -478,7 +478,7 @@ public:
U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
U32 mVertexDataMask;
F32 mSlopRatio; //percentage distance must change before drawables receive LOD update (default is 0.25);
- BOOL mDepthMask; //if TRUE, objects in this partition will be written to depth during alpha rendering
+ BOOL mDepthMask; //if TRUE, objects in this partition will be written to depth during alpha rendering
};
// class for creating bridges between spatial partitions
@@ -513,7 +513,7 @@ public:
};
-class LLCullResult
+class LLCullResult
{
public:
LLCullResult();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 2effec7d3a..cf2b491d6c 100755..100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -3303,7 +3303,7 @@ bool process_login_success_response()
// replace the default help URL format
gSavedSettings.setString("HelpURLFormat",text);
}
-
+
std::string home_location = response["home"];
if(!home_location.empty())
{
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 760e38890b..760e38890b 100755..100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index fffe20208f..c812199796 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -58,6 +58,7 @@ protected:
// LLTexLayerParamAlpha
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL_ALIGN_PREFIX(16)
class LLTexLayerParamAlpha : public LLTexLayerParam
{
public:
@@ -65,8 +66,6 @@ public:
LLTexLayerParamAlpha( LLVOAvatar* avatar );
/*virtual*/ ~LLTexLayerParamAlpha();
- /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
-
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
@@ -77,6 +76,8 @@ public:
ll_aligned_free_16(ptr);
}
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
+
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
@@ -104,7 +105,7 @@ private:
LLPointer<LLImageRaw> mStaticImageRaw;
BOOL mNeedsCreateTexture;
BOOL mStaticImageInvalid;
- LLVector4a mAvgDistortionVec;
+ LL_ALIGN_16(LLVector4a mAvgDistortionVec);
F32 mCachedEffectiveWeight;
public:
@@ -114,7 +115,7 @@ public:
typedef std::list< LLTexLayerParamAlpha* > param_alpha_ptr_list_t;
static param_alpha_ptr_list_t sInstances;
-};
+} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo
{
friend class LLTexLayerParamAlpha;
@@ -138,6 +139,8 @@ private:
// LLTexLayerParamColor
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+LL_ALIGN_PREFIX(16)
class LLTexLayerParamColor : public LLTexLayerParam
{
public:
@@ -151,7 +154,6 @@ public:
LLTexLayerParamColor( LLTexLayerInterface* layer );
LLTexLayerParamColor( LLVOAvatar* avatar );
- /* virtual */ ~LLTexLayerParamColor();
void* operator new(size_t size)
{
@@ -163,6 +165,8 @@ public:
ll_aligned_free_16(ptr);
}
+ /* virtual */ ~LLTexLayerParamColor();
+
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
@@ -186,8 +190,8 @@ public:
protected:
virtual void onGlobalColorChanged(bool upload_bake) {}
private:
- LLVector4a mAvgDistortionVec;
-};
+ LL_ALIGN_16(LLVector4a mAvgDistortionVec);
+} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo
{
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 0dc2601e60..8bf7bcc398 100644..100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -353,13 +353,13 @@ public:
// Threads: Tmain
/*virtual*/ bool deleteOK(); // called from update()
-
+
~LLTextureFetchWorker();
// Threads: Ttf
// Locks: Mw
S32 callbackHttpGet(LLCore::HttpResponse * response,
- bool partial, bool success);
+ bool partial, bool success);
// Threads: Ttc
void callbackCacheRead(bool success, LLImageFormatted* image,
@@ -384,7 +384,7 @@ public:
bool getCanUseHTTP() const { return mCanUseHTTP; }
LLTextureFetch & getFetcher() { return *mFetcher; }
-
+
// Inherited from LLCore::HttpHandler
// Threads: Ttf
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
@@ -563,7 +563,7 @@ private:
U8 mImageCodec;
LLViewerAssetStats::duration_t mMetricsStartTime;
-
+
LLCore::HttpHandle mHttpHandle; // Handle of any active request
LLCore::BufferArray * mHttpBufferArray; // Refcounted pointer to response data
int mHttpPolicyClass;
@@ -571,7 +571,7 @@ private:
unsigned int mHttpReplySize; // Actual received data size
unsigned int mHttpReplyOffset; // Actual received data offset
bool mHttpHasResource; // Counts against Fetcher's mHttpSemaphore
-
+
// State history
U32 mCacheReadCount;
U32 mCacheWriteCount;
@@ -1349,16 +1349,16 @@ bool LLTextureFetchWorker::doWork(S32 param)
recordTextureDone(false);
}
else
- {
+ {
mFetcher->addToNetworkQueue(this); // failsafe
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
recordTextureStart(false);
- }
- return false;
}
+ return false;
+ }
if (mState == WAIT_HTTP_RESOURCE)
- {
+ {
// NOTE:
// control the number of the http requests issued for:
// 1, not openning too many file descriptors at the same time;
@@ -1367,19 +1367,19 @@ bool LLTextureFetchWorker::doWork(S32 param)
// If it looks like we're busy, keep this request here.
// Otherwise, advance into the HTTP states.
if (mFetcher->getHttpWaitersCount() || ! acquireHttpSemaphore())
- {
+ {
mState = WAIT_HTTP_RESOURCE2;
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
mFetcher->addHttpWaiter(this->mID);
++mResourceWaitCount;
return false;
- }
+ }
mState = SEND_HTTP_REQ;
// *NOTE: You must invoke releaseHttpSemaphore() if you transition
// to a state other than SEND_HTTP_REQ or WAIT_HTTP_REQ or abort
// the request.
- }
+ }
if (mState == WAIT_HTTP_RESOURCE2)
{
@@ -1395,33 +1395,33 @@ bool LLTextureFetchWorker::doWork(S32 param)
return true; // abort
}
- mFetcher->removeFromNetworkQueue(this, false);
+ mFetcher->removeFromNetworkQueue(this, false);
- S32 cur_size = 0;
- if (mFormattedImage.notNull())
+ S32 cur_size = 0;
+ if (mFormattedImage.notNull())
+ {
+ cur_size = mFormattedImage->getDataSize(); // amount of data we already have
+ if (mFormattedImage->getDiscardLevel() == 0)
{
- cur_size = mFormattedImage->getDataSize(); // amount of data we already have
- if (mFormattedImage->getDiscardLevel() == 0)
+ if (cur_size > 0)
{
- if(cur_size > 0)
- {
- // We already have all the data, just decode it
- mLoadedDiscard = mFormattedImage->getDiscardLevel();
- setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = DECODE_IMAGE;
+ // We already have all the data, just decode it
+ mLoadedDiscard = mFormattedImage->getDiscardLevel();
+ setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ mState = DECODE_IMAGE;
releaseHttpSemaphore();
- return false;
- }
- else
- {
+ return false;
+ }
+ else
+ {
releaseHttpSemaphore();
- return true ; //abort.
- }
+ return true; // abort.
}
}
- mRequestedSize = mDesiredSize;
- mRequestedDiscard = mDesiredDiscard;
- mRequestedSize -= cur_size;
+ }
+ mRequestedSize = mDesiredSize;
+ mRequestedDiscard = mDesiredDiscard;
+ mRequestedSize -= cur_size;
mRequestedOffset = cur_size;
if (mRequestedOffset)
{
@@ -1437,20 +1437,20 @@ bool LLTextureFetchWorker::doWork(S32 param)
mRequestedOffset -= 1;
mRequestedSize += 1;
}
-
+
mHttpHandle = LLCORE_HTTP_HANDLE_INVALID;
- if (!mUrl.empty())
- {
- mRequestedTimer.reset();
- mLoaded = FALSE;
+ if (!mUrl.empty())
+ {
+ mRequestedTimer.reset();
+ mLoaded = FALSE;
mGetStatus = LLCore::HttpStatus();
- mGetReason.clear();
+ mGetReason.clear();
LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << mRequestedOffset
- << " Bytes: " << mRequestedSize
- << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth
- << LL_ENDL;
+ << " Bytes: " << mRequestedSize
+ << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << mFetcher->mMaxBandwidth
+ << LL_ENDL;
- // Will call callbackHttpGet when curl request completes
+ // Will call callbackHttpGet when curl request completes
mHttpHandle = mFetcher->mHttpRequest->requestGetByteRange(mHttpPolicyClass,
mWorkPriority,
mUrl,
@@ -1459,14 +1459,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFetcher->mHttpOptions,
mFetcher->mHttpHeaders,
this);
- }
+ }
if (LLCORE_HTTP_HANDLE_INVALID == mHttpHandle)
- {
- llwarns << "HTTP GET request failed for " << mID << llendl;
- resetFormattedData();
+ {
+ llwarns << "HTTP GET request failed for " << mID << llendl;
+ resetFormattedData();
releaseHttpSemaphore();
- return true; // failed
- }
+ return true; // failed
+ }
mHttpActive = true;
mFetcher->addToHTTPQueue(mID);
@@ -1474,8 +1474,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
mState = WAIT_HTTP_REQ;
- // fall through
- }
+ // fall through
+ }
if (mState == WAIT_HTTP_REQ)
{
@@ -1497,15 +1497,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
llwarns << "Texture missing from server (404): " << mUrl << llendl;
- //roll back to try UDP
- if(mCanUseNET)
+ // roll back to try UDP
+ if (mCanUseNET)
{
- mState = INIT ;
- mCanUseHTTP = false ;
+ mState = INIT;
+ mCanUseHTTP = false;
mUrl.clear();
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
releaseHttpSemaphore();
- return false ;
+ return false;
}
}
else if (http_service_unavail == mGetStatus)
@@ -1525,23 +1525,23 @@ bool LLTextureFetchWorker::doWork(S32 param)
<< llendl;
}
- mUrl.clear();
- if (cur_size > 0)
- {
- // Use available data
- mLoadedDiscard = mFormattedImage->getDiscardLevel();
- setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- mState = DECODE_IMAGE;
+ mUrl.clear();
+ if (cur_size > 0)
+ {
+ // Use available data
+ mLoadedDiscard = mFormattedImage->getDiscardLevel();
+ setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ mState = DECODE_IMAGE;
releaseHttpSemaphore();
- return false;
- }
+ return false;
+ }
// Fail harder
- resetFormattedData();
- mState = DONE;
+ resetFormattedData();
+ mState = DONE;
releaseHttpSemaphore();
- return true; // failed
- }
+ return true; // failed
+ }
// Clear the url since we're done with the fetch
// Note: mUrl is used to check is fetching is required so failure to clear it will force an http fetch
@@ -1550,17 +1550,17 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mUrl.clear();
}
-
+
if (! mHttpBufferArray || ! mHttpBufferArray->size())
{
// no data received.
if (mHttpBufferArray)
- {
+ {
mHttpBufferArray->release();
mHttpBufferArray = NULL;
}
- //abort.
+ // abort.
mState = DONE;
releaseHttpSemaphore();
return true;
@@ -1628,7 +1628,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mLoadedDiscard = mRequestedDiscard;
mState = DECODE_IMAGE;
- if(mWriteToCacheState != NOT_WRITE)
+ if (mWriteToCacheState != NOT_WRITE)
{
mWriteToCacheState = SHOULD_WRITE ;
}
@@ -1655,7 +1655,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
- if(textures_decode_disabled)
+ if (textures_decode_disabled)
{
// for debug use, don't decode
mState = DONE;
@@ -1885,7 +1885,7 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
{
gTotalTextureBytesPerBoostLevel[tex->getBoostLevel()] += data_size ;
}
-}
+ }
mFetcher->removeFromHTTPQueue(mID, data_size);
@@ -2066,7 +2066,7 @@ bool LLTextureFetchWorker::processSimulatorPackets()
// Threads: Ttf
// Locks: Mw
S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
- bool partial, bool success)
+ bool partial, bool success)
{
S32 data_size = 0 ;
@@ -2086,10 +2086,11 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
// get length of stream:
LLCore::BufferArray * body(response->getBody());
data_size = body ? body->size() : 0;
-
+
LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
if (data_size > 0)
{
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
// *TODO: set the formatted image data here directly to avoid the copy
// Hold on to body for later copy
@@ -2164,6 +2165,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
mLoaded = TRUE;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ LLViewerStatsRecorder::instance().log(0.2f);
return data_size ;
}
@@ -2366,7 +2368,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
LLTextureFetch::~LLTextureFetch()
{
- clearDeleteList() ;
+ clearDeleteList();
while (! mCommands.empty())
{
@@ -2374,7 +2376,7 @@ LLTextureFetch::~LLTextureFetch()
mCommands.erase(mCommands.begin());
delete req;
}
-
+
if (mHttpOptions)
{
mHttpOptions->release();
@@ -2650,7 +2652,7 @@ U32 LLTextureFetch::getTotalNumHTTPRequests()
U32 size = mTotalHTTPRequests;
mNetworkQueueMutex.unlock(); // -Mfq
- return size ;
+ return size;
}
// call lockQueue() first!
@@ -2672,7 +2674,7 @@ LLTextureFetchWorker* LLTextureFetch::getWorker(const LLUUID& id)
{
LLMutexLock lock(&mQueueMutex); // +Mfq
- return getWorkerAfterLock(id) ;
+ return getWorkerAfterLock(id);
} // -Mfq
@@ -2830,7 +2832,7 @@ S32 LLTextureFetch::update(F32 max_time_ms)
{
mNetworkQueueMutex.lock(); // +Mfnq
- mMaxBandwidth = band_width ;
+ mMaxBandwidth = band_width;
add(LLStatViewer::TEXTURE_KBIT, mHTTPTextureBits);
mHTTPTextureBits = 0;
@@ -2856,7 +2858,7 @@ S32 LLTextureFetch::update(F32 max_time_ms)
commonUpdate();
}
- if(mFetchDebugger)
+ if (mFetchDebugger)
{
mFetchDebugger->tryToStopDebug(); //check if need to stop debugger.
}
@@ -2864,7 +2866,7 @@ S32 LLTextureFetch::update(F32 max_time_ms)
return res;
}
-//called in the MAIN thread after the TextureCacheThread shuts down.
+// called in the MAIN thread after the TextureCacheThread shuts down.
//
// Threads: Tmain
void LLTextureFetch::shutDownTextureCacheThread()
@@ -2876,7 +2878,7 @@ void LLTextureFetch::shutDownTextureCacheThread()
}
}
-//called in the MAIN thread after the ImageDecodeThread shuts down.
+// called in the MAIN thread after the ImageDecodeThread shuts down.
//
// Threads: Tmain
void LLTextureFetch::shutDownImageDecodeThread()
@@ -2920,7 +2922,7 @@ void LLTextureFetch::threadedUpdate()
#endif
commonUpdate();
-
+
#if 0
const F32 INFO_TIME = 1.0f;
static LLFrameTimer info_timer;
@@ -2965,46 +2967,46 @@ void LLTextureFetch::sendRequestListToSimulators()
work_request_map_t requests;
{
LLMutexLock lock2(&mNetworkQueueMutex); // +Mfnq
- for (queue_t::iterator iter = mNetworkQueue.begin(); iter != mNetworkQueue.end(); )
- {
- queue_t::iterator curiter = iter++;
- LLTextureFetchWorker* req = getWorker(*curiter);
- if (!req)
- {
- mNetworkQueue.erase(curiter);
- continue; // paranoia
- }
- if ((req->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK) &&
- (req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR))
- {
- // We already received our URL, remove from the queue
- llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl;
- mNetworkQueue.erase(curiter);
- continue;
- }
- if (req->mID == mDebugID)
- {
- mDebugCount++; // for setting breakpoints
- }
- if (req->mSentRequest == LLTextureFetchWorker::SENT_SIM &&
- req->mTotalPackets > 0 &&
- req->mLastPacket >= req->mTotalPackets-1)
+ for (queue_t::iterator iter = mNetworkQueue.begin(); iter != mNetworkQueue.end(); )
{
- // We have all the packets... make sure this is high priority
+ queue_t::iterator curiter = iter++;
+ LLTextureFetchWorker* req = getWorker(*curiter);
+ if (!req)
+ {
+ mNetworkQueue.erase(curiter);
+ continue; // paranoia
+ }
+ if ((req->mState != LLTextureFetchWorker::LOAD_FROM_NETWORK) &&
+ (req->mState != LLTextureFetchWorker::LOAD_FROM_SIMULATOR))
+ {
+ // We already received our URL, remove from the queue
+ llwarns << "Worker: " << req->mID << " in mNetworkQueue but in wrong state: " << req->mState << llendl;
+ mNetworkQueue.erase(curiter);
+ continue;
+ }
+ if (req->mID == mDebugID)
+ {
+ mDebugCount++; // for setting breakpoints
+ }
+ if (req->mSentRequest == LLTextureFetchWorker::SENT_SIM &&
+ req->mTotalPackets > 0 &&
+ req->mLastPacket >= req->mTotalPackets-1)
+ {
+ // We have all the packets... make sure this is high priority
// req->setPriority(LLWorkerThread::PRIORITY_HIGH | req->mWorkPriority);
- continue;
- }
- F32 elapsed = req->mRequestedTimer.getElapsedTimeF32();
- {
- F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority);
- if ((req->mSimRequestedDiscard != req->mDesiredDiscard) ||
- (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) ||
- (elapsed >= SIM_LAZY_FLUSH_TIMEOUT))
+ continue;
+ }
+ F32 elapsed = req->mRequestedTimer.getElapsedTimeF32();
{
- requests[req->mHost].insert(req);
+ F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority);
+ if ((req->mSimRequestedDiscard != req->mDesiredDiscard) ||
+ (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) ||
+ (elapsed >= SIM_LAZY_FLUSH_TIMEOUT))
+ {
+ requests[req->mHost].insert(req);
+ }
}
}
- }
} // -Mfnq
for (work_request_map_t::iterator iter1 = requests.begin();
@@ -3086,49 +3088,49 @@ void LLTextureFetch::sendRequestListToSimulators()
// Send cancelations
{
LLMutexLock lock2(&mNetworkQueueMutex); // +Mfnq
- if (gMessageSystem && !mCancelQueue.empty())
- {
- for (cancel_queue_t::iterator iter1 = mCancelQueue.begin();
- iter1 != mCancelQueue.end(); ++iter1)
+ if (gMessageSystem && !mCancelQueue.empty())
{
- LLHost host = iter1->first;
- if (host == LLHost::invalid)
+ for (cancel_queue_t::iterator iter1 = mCancelQueue.begin();
+ iter1 != mCancelQueue.end(); ++iter1)
{
- host = gAgent.getRegionHost();
- }
- S32 request_count = 0;
- for (queue_t::iterator iter2 = iter1->second.begin();
- iter2 != iter1->second.end(); ++iter2)
- {
- if (0 == request_count)
+ LLHost host = iter1->first;
+ if (host == LLHost::invalid)
{
- gMessageSystem->newMessageFast(_PREHASH_RequestImage);
- gMessageSystem->nextBlockFast(_PREHASH_AgentData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ host = gAgent.getRegionHost();
}
- gMessageSystem->nextBlockFast(_PREHASH_RequestImage);
- gMessageSystem->addUUIDFast(_PREHASH_Image, *iter2);
- gMessageSystem->addS8Fast(_PREHASH_DiscardLevel, -1);
- gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0);
- gMessageSystem->addU32Fast(_PREHASH_Packet, 0);
- gMessageSystem->addU8Fast(_PREHASH_Type, 0);
+ S32 request_count = 0;
+ for (queue_t::iterator iter2 = iter1->second.begin();
+ iter2 != iter1->second.end(); ++iter2)
+ {
+ if (0 == request_count)
+ {
+ gMessageSystem->newMessageFast(_PREHASH_RequestImage);
+ gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ }
+ gMessageSystem->nextBlockFast(_PREHASH_RequestImage);
+ gMessageSystem->addUUIDFast(_PREHASH_Image, *iter2);
+ gMessageSystem->addS8Fast(_PREHASH_DiscardLevel, -1);
+ gMessageSystem->addF32Fast(_PREHASH_DownloadPriority, 0);
+ gMessageSystem->addU32Fast(_PREHASH_Packet, 0);
+ gMessageSystem->addU8Fast(_PREHASH_Type, 0);
// llinfos << "CANCELING IMAGE REQUEST: " << (*iter2) << llendl;
- request_count++;
- if (request_count >= IMAGES_PER_REQUEST)
+ request_count++;
+ if (request_count >= IMAGES_PER_REQUEST)
+ {
+ gMessageSystem->sendSemiReliable(host, NULL, NULL);
+ request_count = 0;
+ }
+ }
+ if (request_count > 0 && request_count < IMAGES_PER_REQUEST)
{
gMessageSystem->sendSemiReliable(host, NULL, NULL);
- request_count = 0;
}
}
- if (request_count > 0 && request_count < IMAGES_PER_REQUEST)
- {
- gMessageSystem->sendSemiReliable(host, NULL, NULL);
- }
+ mCancelQueue.clear();
}
- mCancelQueue.clear();
- }
} // -Mfnq
}
@@ -3210,7 +3212,11 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8
return false;
}
- worker->lockWorkMutex(); // +Mw
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
+ LLViewerStatsRecorder::instance().log(0.1f);
+
+ worker->lockWorkMutex();
+
// Copy header data into image object
worker->mImageCodec = codec;
@@ -3258,7 +3264,11 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
return false;
}
- worker->lockWorkMutex(); // +Mw
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
+ LLViewerStatsRecorder::instance().log(0.1f);
+
+ worker->lockWorkMutex();
+
res = worker->insertPacket(packet_num, data, data_size);
@@ -3275,7 +3285,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
removeFromNetworkQueue(worker, true); // failsafe
}
- if(packet_num >= (worker->mTotalPackets - 1))
+ if (packet_num >= (worker->mTotalPackets - 1))
{
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
@@ -3303,7 +3313,7 @@ BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id)
if (worker)
{
worker->lockWorkMutex(); // +Mw
- from_cache = worker->mInLocalCache ;
+ from_cache = worker->mInLocalCache;
worker->unlockWorkMutex(); // -Mw
}
@@ -3762,7 +3772,7 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
if (S32_MAX == ++report_sequence)
report_sequence = 0;
reporting_started = true;
-
+
// Limit the size of the stats report if necessary.
sd["truncated"] = truncate_viewer_metrics(10, sd);
@@ -4092,7 +4102,7 @@ void LLTextureFetchDebugger::tryToStopDebug()
{
mTextureCache->readComplete(mFetchingHistory[i].mCacheHandle, true);
}
- }
+ }
break;
case WRITE_CACHE:
for(S32 i = 0 ; i < size; i++)
@@ -4331,7 +4341,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue()
if (mNbCurlRequests > HTTP_REQUESTS_IN_QUEUE_LOW_WATER)
{
return mNbCurlRequests;
- }
+ }
S32 size = mFetchingHistory.size();
for (S32 i = 0 ; i < size ; i++)
@@ -4348,7 +4358,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue()
requestedSize = llmax(0,requestedSize);
// We request the whole file if the size was set to an absurdly high value (meaning all file)
requestedSize = (requestedSize == 33554432 ? 0 : requestedSize);
-
+
LLCore::HttpHandle handle = mFetcher->getHttpRequest().requestGetByteRange(mHttpPolicyClass,
LLWorkerThread::PRIORITY_LOWBITS,
texture_url,
@@ -4361,7 +4371,7 @@ S32 LLTextureFetchDebugger::fillCurlQueue()
{
mHandleToFetchIndex[handle] = i;
mFetchingHistory[i].mHttpHandle = handle;
- mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS;
+ mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS;
mNbCurlRequests++;
// Hack
if (mNbCurlRequests == HTTP_REQUESTS_IN_QUEUE_HIGH_WATER) // emulate normal pipeline
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 2e398023fe..4dcb9dd4b8 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -65,8 +65,8 @@ public:
class TFRequest;
// Threads: Tmain
- /*virtual*/ S32 update(F32 max_time_ms);
-
+ /*virtual*/ S32 update(F32 max_time_ms);
+
// called in the main thread after the TextureCacheThread shuts down.
// Threads: Tmain
void shutDownTextureCacheThread();
@@ -126,8 +126,8 @@ public:
void dump();
// Threads: T*
- S32 getNumRequests() ;
-
+ S32 getNumRequests();
+
// Threads: T*
S32 getNumHTTPRequests();
@@ -220,7 +220,7 @@ public:
void getStateStats(U32 * cache_read, U32 * cache_write, U32 * res_wait);
// ----------------------------------
-
+
protected:
// Threads: T* (but Ttf in practice)
void addToNetworkQueue(LLTextureFetchWorker* worker);
@@ -240,7 +240,7 @@ protected:
//
// Threads: T*
void removeRequest(LLTextureFetchWorker* worker, bool cancel);
-
+
// Overrides from the LLThread tree
// Locks: Ct
bool runCondition();
@@ -313,7 +313,7 @@ private:
LLTextureCache* mTextureCache;
LLImageDecodeThread* mImageDecodeThread;
-
+
// Map of all requests by UUID
typedef std::map<LLUUID,LLTextureFetchWorker*> map_t;
map_t mRequestMap; // Mfq
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 7a6351c880..7a6351c880 100755..100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index da7b259377..548cb7da7b 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -76,7 +76,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
mShowToolbars(true),
mDragToolbarButton(NULL),
mDragItem(NULL),
- mToolbarsLoaded(false)
+ mToolbarsLoaded(false),
+ mBottomToolbarPanel(NULL)
{
for (S32 i = 0; i < TOOLBAR_COUNT; i++)
{
@@ -100,6 +101,7 @@ BOOL LLToolBarView::postBuild()
mToolbars[TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left");
mToolbars[TOOLBAR_RIGHT] = getChild<LLToolBar>("toolbar_right");
mToolbars[TOOLBAR_BOTTOM] = getChild<LLToolBar>("toolbar_bottom");
+ mBottomToolbarPanel = getChild<LLView>("bottom_toolbar_panel");
for (int i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
{
@@ -535,8 +537,8 @@ void LLToolBarView::draw()
for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
{
mToolbars[i]->getParent()->setVisible(mShowToolbars
- && (mToolbars[i]->hasButtons()
- || isToolDragged()));
+ && (mToolbars[i]->hasButtons()
+ || isToolDragged()));
}
// Draw drop zones if drop of a tool is active
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 9c4194ebed..7125dd9990 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -108,7 +108,8 @@ public:
static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
static void resetDragTool(LLToolBarButton* toolbarButton);
LLInventoryObject* getDragItem();
-
+ LLView* getBottomToolbar() { return mBottomToolbarPanel; }
+ LLToolBar* getToolbar(EToolBarLocation toolbar) { return mToolbars[toolbar]; }
bool isModified() const;
protected:
@@ -133,6 +134,7 @@ private:
LLToolBarButton* mDragToolbarButton;
LLInventoryObject* mDragItem;
bool mShowToolbars;
+ LLView* mBottomToolbarPanel;
};
extern LLToolBarView* gToolBarView;
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 3cd761b73b..a0c12df834 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -125,9 +125,10 @@ BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
mPick.mKeyMask = mask;
// claim not handled so UI focus stays same
-
- handleRightClickPick();
-
+ if(gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ {
+ handleRightClickPick();
+ }
return FALSE;
}
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index dec1615246..051f5f4485 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -72,6 +72,8 @@
#include "llpanellogin.h"
#include "llpaneltopinfobar.h"
#include "llspellcheck.h"
+#include "llslurl.h"
+#include "llstartup.h"
#include "llupdaterservice.h"
// Third party library includes
@@ -496,6 +498,20 @@ bool handleForceShowGrid(const LLSD& newvalue)
return true;
}
+bool handleLoginLocationChanged()
+{
+ /*
+ * This connects the default preference setting to the state of the login
+ * panel if it is displayed; if you open the preferences panel before
+ * logging in, and change the default login location there, the login
+ * panel immediately changes to match your new preference.
+ */
+ std::string new_login_location = gSavedSettings.getString("LoginLocation");
+ LL_DEBUGS("AppInit")<<new_login_location<<LL_ENDL;
+ LLStartUp::setStartSLURL(LLSLURL(new_login_location));
+ return true;
+}
+
bool handleSpellCheckChanged()
{
if (gSavedSettings.getBOOL("SpellCheck"))
@@ -721,6 +737,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2));
gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged));
gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged));
+ gSavedSettings.getControl("LoginLocation")->getSignal()->connect(boost::bind(&handleLoginLocationChanged));
}
#if TEST_CACHED_CONTROL
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 47059b0b8c..2df028de69 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -316,9 +316,13 @@ public:
/* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content)
{
LL_WARNS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL;
- LL_WARNS("MediaAuth") << content << LL_ENDL;
+
+ LLSD stripped_content = content;
+ stripped_content.erase("set-cookie");
+ LL_WARNS("MediaAuth") << stripped_content << LL_ENDL;
std::string cookie = content["set-cookie"].asString();
+ LL_DEBUGS("MediaAuth") << "cookie = " << cookie << LL_ENDL;
LLViewerMedia::getCookieStore()->setCookiesFromHost(cookie, mHost);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 9a0cb432be..25907dcb52 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -167,7 +167,6 @@ LLContextMenu *gMenuAttachmentSelf = NULL;
LLContextMenu *gMenuAttachmentOther = NULL;
LLContextMenu *gMenuLand = NULL;
-const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory");
const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents");
LLMenuGL* gAttachSubMenu = NULL;
@@ -312,7 +311,6 @@ void handle_grab_baked_texture(void*);
BOOL enable_grab_baked_texture(void*);
void handle_dump_region_object_cache(void*);
-BOOL enable_save_into_inventory(void*);
BOOL enable_save_into_task_inventory(void*);
BOOL enable_detach(const LLSD& = LLSD());
@@ -1645,6 +1643,54 @@ class LLAdvancedForceParamsToDefault : public view_listener_t
};
+//////////////////////////
+// ANIMATION SPEED //
+//////////////////////////
+
+// Utility function to set all AV time factors to the same global value
+static void set_all_animation_time_factors(F32 time_factor)
+{
+ LLMotionController::setCurrentTimeFactor(time_factor);
+ for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
+ iter != LLCharacter::sInstances.end(); ++iter)
+ {
+ (*iter)->setAnimTimeFactor(time_factor);
+ }
+}
+
+class LLAdvancedAnimTenFaster : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ //llinfos << "LLAdvancedAnimTenFaster" << llendl;
+ F32 time_factor = LLMotionController::getCurrentTimeFactor();
+ time_factor = llmin(time_factor + 0.1f, 2.f); // Upper limit is 200% speed
+ set_all_animation_time_factors(time_factor);
+ return true;
+ }
+};
+
+class LLAdvancedAnimTenSlower : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ //llinfos << "LLAdvancedAnimTenSlower" << llendl;
+ F32 time_factor = LLMotionController::getCurrentTimeFactor();
+ time_factor = llmax(time_factor - 0.1f, 0.1f); // Lower limit is at 10% of normal speed
+ set_all_animation_time_factors(time_factor);
+ return true;
+ }
+};
+
+class LLAdvancedAnimResetAll : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ set_all_animation_time_factors(1.f);
+ return true;
+ }
+};
+
//////////////////////////
// RELOAD VERTEX SHADER //
@@ -3915,6 +3961,8 @@ class LLViewToggleUI : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
+ if(gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ {
LLNotification::Params params("ConfirmHideUI");
params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2));
LLSD substitutions;
@@ -3924,7 +3972,7 @@ class LLViewToggleUI : public view_listener_t
substitutions["SHORTCUT"] = "Ctrl+Shift+U";
#endif
params.substitutions = substitutions;
- if (gViewerWindow->getUIVisibility())
+ if (!gSavedSettings.getBOOL("HideUIControls"))
{
// hiding, so show notification
LLNotifications::instance().add(params);
@@ -3933,7 +3981,7 @@ class LLViewToggleUI : public view_listener_t
{
LLNotifications::instance().forceResponse(params, 0);
}
-
+ }
return true;
}
@@ -3943,8 +3991,9 @@ class LLViewToggleUI : public view_listener_t
if (option == 0) // OK
{
- gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility());
- LLPanelStandStopFlying::getInstance()->setVisible(gViewerWindow->getUIVisibility());
+ gViewerWindow->setUIVisibility(gSavedSettings.getBOOL("HideUIControls"));
+ LLPanelStandStopFlying::getInstance()->setVisible(gSavedSettings.getBOOL("HideUIControls"));
+ gSavedSettings.setBOOL("HideUIControls",!gSavedSettings.getBOOL("HideUIControls"));
}
}
};
@@ -4773,18 +4822,6 @@ BOOL sitting_on_selection()
return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object);
}
-class LLToolsSaveToInventory : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- if(enable_save_into_inventory(NULL))
- {
- derez_objects(DRD_SAVE_INTO_AGENT_INVENTORY, LLUUID::null);
- }
- return true;
- }
-};
-
class LLToolsSaveToObjectInventory : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -7077,50 +7114,6 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat,
return FALSE;
}
-BOOL enable_save_into_inventory(void*)
-{
- // *TODO: clean this up
- // find the last root
- LLSelectNode* last_node = NULL;
- for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
- iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++)
- {
- last_node = *iter;
- }
-
-#ifdef HACKED_GODLIKE_VIEWER
- return TRUE;
-#else
-# ifdef TOGGLE_HACKED_GODLIKE_VIEWER
- if (!LLGridManager::getInstance()->isInProductionGrid()
- && gAgent.isGodlike())
- {
- return TRUE;
- }
-# endif
- // check all pre-req's for save into inventory.
- if(last_node && last_node->mValid && !last_node->mItemID.isNull()
- && (last_node->mPermissions->getOwner() == gAgent.getID())
- && (gInventory.getItem(last_node->mItemID) != NULL))
- {
- LLViewerObject* obj = last_node->getObject();
- if( obj && !obj->isAttachment() )
- {
- return TRUE;
- }
- }
- return FALSE;
-#endif
-}
-
-class LLToolsEnableSaveToInventory : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- bool new_value = enable_save_into_inventory(NULL);
- return new_value;
- }
-};
BOOL enable_save_into_task_inventory(void*)
{
@@ -7502,6 +7495,7 @@ class LLToolsUseSelectionForGrid : public view_listener_t
} func;
LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func);
LLSelectMgr::getInstance()->setGridMode(GRID_MODE_REF_OBJECT);
+ LLFloaterTools::setGridMode((S32)GRID_MODE_REF_OBJECT);
return true;
}
};
@@ -8312,7 +8306,6 @@ void initialize_menus()
commit.add("Tools.LookAtSelection", boost::bind(&handle_look_at_selection, _2));
commit.add("Tools.BuyOrTake", boost::bind(&handle_buy_or_take));
commit.add("Tools.TakeCopy", boost::bind(&handle_take_copy));
- view_listener_t::addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory");
view_listener_t::addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory");
view_listener_t::addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction");
@@ -8324,7 +8317,6 @@ void initialize_menus()
enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy));
enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object));
enable.add("Tools.VisibleTakeObject", boost::bind(&tools_visible_take_object));
- view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory");
view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding");
@@ -8435,6 +8427,11 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedTestMale(), "Advanced.TestMale");
view_listener_t::addMenu(new LLAdvancedTestFemale(), "Advanced.TestFemale");
+ // Advanced > Character > Animation Speed
+ view_listener_t::addMenu(new LLAdvancedAnimTenFaster(), "Advanced.AnimTenFaster");
+ view_listener_t::addMenu(new LLAdvancedAnimTenSlower(), "Advanced.AnimTenSlower");
+ view_listener_t::addMenu(new LLAdvancedAnimResetAll(), "Advanced.AnimResetAll");
+
// Advanced > Character (toplevel)
view_listener_t::addMenu(new LLAdvancedForceParamsToDefault(), "Advanced.ForceParamsToDefault");
view_listener_t::addMenu(new LLAdvancedReloadVertexShader(), "Advanced.ReloadVertexShader");
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 3515aa4302..2eb458fa02 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -49,7 +49,6 @@ void show_context_menu( S32 x, S32 y, MASK mask );
void show_build_mode_context_menu(S32 x, S32 y, MASK mask);
void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y);
void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y);
-BOOL enable_save_into_inventory(void*);
void handle_reset_view();
void handle_cut(void*);
void handle_copy(void*);
@@ -159,8 +158,6 @@ protected:
LLSafeHandle<LLObjectSelection> mObjectSelection;
};
-extern const std::string SAVE_INTO_INVENTORY;
-
extern LLMenuBarGL* gMenuBarView;
//extern LLView* gMenuBarHolder;
extern LLMenuGL* gEditMenu;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 483e42d296..4b1c9c5574 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4490,7 +4490,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
{
LLFastTimer t(FTM_PROCESS_OBJECTS);
- LLUUID id;
+ LLUUID id;
U32 ip = mesgsys->getSenderIP();
U32 port = mesgsys->getSenderPort();
@@ -4532,22 +4532,22 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
continue;
}
- LLViewerObject *objectp = gObjectList.findObject(id);
- if (objectp)
- {
- // Display green bubble on kill
- if ( gShowObjectUpdates )
+ LLViewerObject *objectp = gObjectList.findObject(id);
+ if (objectp)
{
- LLColor4 color(0.f,1.f,0.f,1.f);
- gPipeline.addDebugBlip(objectp->getPositionAgent(), color);
- }
+ // Display green bubble on kill
+ if ( gShowObjectUpdates )
+ {
+ LLColor4 color(0.f,1.f,0.f,1.f);
+ gPipeline.addDebugBlip(objectp->getPositionAgent(), color);
+ }
- // Do the kill
- gObjectList.killObject(objectp);
- }
+ // Do the kill
+ gObjectList.killObject(objectp);
+ }
if(delete_object)
- {
+ {
regionp->killCacheEntry(local_id);
}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a5bd57145d..61c5a52f98 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -365,7 +365,7 @@ void LLViewerObject::markDead()
childp = mChildList.back();
if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR)
{
- //llinfos << "Marking child " << childp->getLocalID() << " as dead." << llendl;
+ //llinfos << "Marking child " << childp->getLocalID() << " as dead." << llendl;
childp->setParent(NULL); // LLViewerObject::markDead 1
childp->markDead();
}
@@ -938,11 +938,11 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if(mesgsys != NULL)
{
- U16 time_dilation16;
- mesgsys->getU16Fast(_PREHASH_RegionData, _PREHASH_TimeDilation, time_dilation16);
- F32 time_dilation = ((F32) time_dilation16) / 65535.f;
- mTimeDilation = time_dilation;
- mRegionp->setTimeDilation(time_dilation);
+ U16 time_dilation16;
+ mesgsys->getU16Fast(_PREHASH_RegionData, _PREHASH_TimeDilation, time_dilation16);
+ F32 time_dilation = ((F32) time_dilation16) / 65535.f;
+ mTimeDilation = time_dilation;
+ mRegionp->setTimeDilation(time_dilation);
}
// this will be used to determine if we've really changed position
@@ -1255,7 +1255,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
coloru.mV[3] = 255 - coloru.mV[3];
mText->setColor(LLColor4(coloru));
mText->setString(temp_string);
-
+
setChanged(MOVED | SILHOUETTE);
}
else if (mText.notNull())
@@ -1718,14 +1718,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// stores the extended permission info.
if(mesgsys != NULL)
{
- U32 flags;
- mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, block_num);
- // keep local flags and overwrite remote-controlled flags
- mFlags = (mFlags & FLAGS_LOCAL) | flags;
+ U32 flags;
+ mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_UpdateFlags, flags, block_num);
+ // keep local flags and overwrite remote-controlled flags
+ mFlags = (mFlags & FLAGS_LOCAL) | flags;
// ...new objects that should come in selected need to be added to the selected list
- mCreateSelected = ((flags & FLAGS_CREATE_SELECTED) != 0);
- }
+ mCreateSelected = ((flags & FLAGS_CREATE_SELECTED) != 0);
+ }
}
break;
@@ -1756,7 +1756,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if(mesgsys != NULL)
{
- LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ LLViewerObjectList::getUUIDFromLocal(parent_uuid,
parent_id,
mesgsys->getSenderIP(),
mesgsys->getSenderPort());
@@ -1895,7 +1895,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if(mesgsys != NULL)
{
- LLViewerObjectList::getUUIDFromLocal(parent_uuid,
+ LLViewerObjectList::getUUIDFromLocal(parent_uuid,
parent_id,
gMessageSystem->getSenderIP(),
gMessageSystem->getSenderPort());
@@ -2047,14 +2047,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// doing all the parenting, etc above?
if(mesgsys != NULL)
{
- U32 packet_id = mesgsys->getCurrentRecvPacketID();
- if (packet_id < mLatestRecvPacketID &&
- mLatestRecvPacketID - packet_id < 65536)
- {
- //skip application of this message, it's old
- return retval;
- }
- mLatestRecvPacketID = packet_id;
+ U32 packet_id = mesgsys->getCurrentRecvPacketID();
+ if (packet_id < mLatestRecvPacketID &&
+ mLatestRecvPacketID - packet_id < 65536)
+ {
+ //skip application of this message, it's old
+ return retval;
+ }
+ mLatestRecvPacketID = packet_id;
}
// Set the change flags for scale
@@ -2111,7 +2111,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|| (new_angv != old_angv))
{
if (new_rot != mPreviousRotation)
- {
+ {
resetRot();
}
else if (new_angv != old_angv)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index aa30d1c790..933b017aa6 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -635,7 +635,7 @@ public:
LLPointer<LLHUDText> mText;
LLPointer<LLHUDIcon> mIcon;
- static BOOL sUseSharedDrawables;
+ static BOOL sUseSharedDrawables;
static LLTrace::MemStatHandle sMemStat;
protected:
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 176ee49d31..b26be5bc63 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -262,7 +262,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// so that the drawable parent is set properly
if(msg != NULL)
{
- findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
+ findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
}
else
{
@@ -449,9 +449,9 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (compressed)
{
- S32 uncompressed_length = 2048;
- compressed_dp.reset();
-
+ S32 uncompressed_length = 2048;
+ compressed_dp.reset();
+
uncompressed_length = mesgsys->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_Data);
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_Data, compressed_dpbuffer, 0, i);
compressed_dp.assignBuffer(compressed_dpbuffer, uncompressed_length);
@@ -601,12 +601,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if(!(flags & FLAGS_TEMPORARY_ON_REZ))
{
- bCached = true;
- LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
+ bCached = true;
+ LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size);
- }
}
}
+ }
else
{
if (update_type == OUT_FULL)
@@ -1999,7 +1999,7 @@ LLViewerObject *LLViewerObjectList::createObjectFromCache(const LLPCode pcode, L
return objectp;
}
-
+
LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp,
const LLUUID &uuid, const U32 local_id, const LLHost &sender)
{
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 570bf9264c..914a201ffe 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -393,8 +393,8 @@ LLViewerRegion::~LLViewerRegion()
delete mParcelOverlay;
delete mImpl->mLandp;
delete mImpl->mEventPoll;
- LLHTTPSender::clearSender(mImpl->mHost);
-
+ LLHTTPSender::clearSender(mImpl->mHost);
+
std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer());
saveObjectCache();
@@ -1104,8 +1104,8 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
max_update_time -= update_timer.getElapsedTimeF32();
if(max_update_time < 0.f || mImpl->mCacheMap.empty())
{
- return did_update;
- }
+ return did_update;
+}
sCurRegionp = this;
@@ -1704,12 +1704,12 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec
}
LLVOCacheEntry* LLViewerRegion::getCacheEntryForOctree(U32 local_id)
-{
+ {
LLVOCacheEntry* entry = getCacheEntry(local_id);
removeFromVOCacheTree(entry);
-
+
return entry;
-}
+ }
LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id)
{
@@ -1736,7 +1736,7 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U8 &cache_miss_type)
{
// Record a hit
entry->recordHit();
- cache_miss_type = CACHE_MISS_TYPE_NONE;
+ cache_miss_type = CACHE_MISS_TYPE_NONE;
if(entry->getGroup() || !entry->isState(LLVOCacheEntry::INACTIVE))
{
@@ -1749,14 +1749,14 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U8 &cache_miss_type)
else
{
// llinfos << "CRC miss for " << local_id << llendl;
- cache_miss_type = CACHE_MISS_TYPE_CRC;
+ cache_miss_type = CACHE_MISS_TYPE_CRC;
mCacheMissCRC.put(local_id);
}
}
else
{
// llinfos << "Cache miss for " << local_id << llendl;
- cache_miss_type = CACHE_MISS_TYPE_FULL;
+ cache_miss_type = CACHE_MISS_TYPE_FULL;
mCacheMissFull.put(local_id);
}
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 1aa36eafee..28bd02c606 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -2029,18 +2029,19 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
gObjectPreviewProgram.mName = "Simple Shader";
- gObjectPreviewProgram.mFeatures.calculatesLighting = true;
- gObjectPreviewProgram.mFeatures.calculatesAtmospherics = true;
- gObjectPreviewProgram.mFeatures.hasGamma = true;
- gObjectPreviewProgram.mFeatures.hasAtmospherics = true;
- gObjectPreviewProgram.mFeatures.hasLighting = true;
+ gObjectPreviewProgram.mFeatures.calculatesLighting = false;
+ gObjectPreviewProgram.mFeatures.calculatesAtmospherics = false;
+ gObjectPreviewProgram.mFeatures.hasGamma = false;
+ gObjectPreviewProgram.mFeatures.hasAtmospherics = false;
+ gObjectPreviewProgram.mFeatures.hasLighting = false;
gObjectPreviewProgram.mFeatures.mIndexedTextureChannels = 0;
gObjectPreviewProgram.mFeatures.disableTextureIndex = true;
gObjectPreviewProgram.mShaderFiles.clear();
gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewV.glsl", GL_VERTEX_SHADER_ARB));
- gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewF.glsl", GL_FRAGMENT_SHADER_ARB));
gObjectPreviewProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
success = gObjectPreviewProgram.createShader(NULL, NULL);
+ gObjectPreviewProgram.mFeatures.hasLighting = true;
}
if (success)
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 0e2c53ee5b..fa4eb73180 100755..100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -526,8 +526,8 @@ void send_stats()
}
else
{
- shader_level = 3;
- }
+ shader_level = 3;
+ }
}
else if (gPipeline.canUseWindLightShadersOnObjects())
{
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 00e8c66b54..e94ba23163 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -216,7 +216,7 @@ public:
U32 mCountOfNextUpdatesToIgnore;
inline StatsAccumulator()
- {
+ {
reset();
}
@@ -315,7 +315,7 @@ public:
private:
LLTrace::Recording mRecording;
- F64 mLastTimeDiff; // used for time stat updates
+ F64 mLastTimeDiff; // used for time stat updates
};
static const F32 SEND_STATS_PERIOD = 300.0f;
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index 482f6a77a3..61d0f02fc1 100644
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -222,15 +222,15 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
}
}
else
- {
+ {
//llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl;
return;
}
}
- std::ostringstream data_msg;
+ std::ostringstream data_msg;
- data_msg << getTimeSinceStart()
+ data_msg << getTimeSinceStart()
<< "\t " << mObjectCacheHitCount
<< "\t" << mObjectCacheMissFullCount
<< "\t" << mObjectCacheMissCrcCount
@@ -250,7 +250,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
<< "\t" << (mObjectTerseUpdatesSize * 8 / delta_time)
<< "\t" << (mObjectCacheMissResponsesSize * 8 / delta_time)
<< "\t" << (mTextureFetchSize * 8 / delta_time)
- << "\n";
+ << "\n";
if (fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ) != data_msg.str().size())
{
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 76210563bb..7edfa6adfa 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1931,13 +1931,13 @@ void LLViewerFetchedTexture::updateVirtualSize()
{
if (getBoostLevel() == LLViewerTexture::BOOST_NONE &&
drawable->getVObj() && drawable->getVObj()->isSelected())
- {
+ {
setBoostLevel(LLViewerTexture::BOOST_SELECTED);
}
- addTextureStats(facep->getVirtualSize()) ;
- setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
- }
- }
+ addTextureStats(facep->getVirtualSize()) ;
+ setAdditionalDecodePriority(facep->getImportanceToCamera()) ;
+ }
+ }
}
}
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 0a9778ce76..0a9778ce76 100755..100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 899ef985ff..0066c09720 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1710,11 +1710,11 @@ bool LLUIImageList::initFromFile()
// add components defined in the rest of the skin paths
while (++pi != pend)
{
- LLXMLNodePtr update_root;
+ LLXMLNodePtr update_root;
if (LLXMLNode::parseFile(*pi, update_root, NULL))
- {
+ {
parser.readXUI(update_root, images, *pi);
- }
+ }
}
if (!images.validateBlock()) return false;
diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h
index 3bc95cbfbf..2826e6c316 100644
--- a/indra/newview/llviewervisualparam.h
+++ b/indra/newview/llviewervisualparam.h
@@ -65,6 +65,7 @@ protected:
// VIRTUAL CLASS
// a viewer side interface class for a generalized parametric modification of the avatar mesh
//-----------------------------------------------------------------------------
+LL_ALIGN_PREFIX(16)
class LLViewerVisualParam : public LLVisualParam
{
public:
@@ -104,6 +105,6 @@ public:
BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
-};
+} LL_ALIGN_POSTFIX(16);
#endif // LL_LLViewerVisualParam_H
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 0bd0b2a769..fea44a38c6 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1935,9 +1935,9 @@ void LLViewerWindow::initWorldUI()
panel_ssf_container->addChild(panel_stand_stop_flying);
panel_ssf_container->setVisible(TRUE);
-
- LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
+ LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
+
// Load and make the toolbars visible
// Note: we need to load the toolbars only *after* the user is logged in and IW
if (gToolBarView)
@@ -4275,12 +4275,12 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (!reset_deferred)
{
- // if image cropping or need to enlarge the scene, compute a scale_factor
- F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
- snapshot_width = (S32)(ratio * image_width) ;
- snapshot_height = (S32)(ratio * image_height) ;
- scale_factor = llmax(1.0f, 1.0f / ratio) ;
- }
+ // if image cropping or need to enlarge the scene, compute a scale_factor
+ F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
+ snapshot_width = (S32)(ratio * image_width) ;
+ snapshot_height = (S32)(ratio * image_height) ;
+ scale_factor = llmax(1.0f, 1.0f / ratio) ;
+ }
}
if (show_ui && scale_factor > 1.f)
@@ -4482,7 +4482,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
{
send_agent_resume();
}
-
+
return ret;
}
@@ -5001,7 +5001,7 @@ S32 LLViewerWindow::getChatConsoleBottomPad()
S32 offset = 0;
if(gToolBarView)
- offset += gToolBarView->getChild<LLView>("bottom_toolbar_panel")->getRect().getHeight();
+ offset += gToolBarView->getBottomToolbar()->getRect().getHeight();
return offset;
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5a07cdf7c9..5a07cdf7c9 100755..100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 4ecb7f2fc7..4275552117 100755..100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -810,7 +810,7 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys,
// unpack the texture UUIDs to the texture slots
if(mesgsys != NULL)
{
- retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num);
+ retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num);
}
// need to trigger a few operations to get the avatar to use the new bakes
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
@@ -2216,7 +2216,7 @@ void LLVOAvatarSelf::sendAppearanceChangeMetrics()
{
LLCurlRequest::headers_t headers;
LLHTTPClient::post(caps_url,
- msg,
+ msg,
new ViewerAppearanceChangeMetricsResponder(report_sequence,
report_sequence,
reporting_started));
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2056aed0ad..12f268d324 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1138,16 +1138,28 @@ void LLVOVolume::sculpt()
S32 current_discard = getVolume()->getSculptLevel() ;
if(current_discard < -2)
{
- llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
+ static S32 low_sculpty_discard_warning_count = 100;
+ if (++low_sculpty_discard_warning_count >= 100)
+ { // Log first time, then every 100 afterwards otherwise this can flood the logs
+ llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
+ << " at " << current_discard
<< " is less than -2." << llendl;
+ low_sculpty_discard_warning_count = 0;
+ }
// corrupted volume... don't update the sculpty
return;
}
else if (current_discard > MAX_DISCARD_LEVEL)
{
- llwarns << "WARNING!!: Current discard of sculpty at " << current_discard
+ static S32 high_sculpty_discard_warning_count = 100;
+ if (++high_sculpty_discard_warning_count >= 100)
+ { // Log first time, then every 100 afterwards otherwise this can flood the logs
+ llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID()
+ << " at " << current_discard
<< " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl;
+ high_sculpty_discard_warning_count = 0;
+ }
// corrupted volume... don't update the sculpty
return;
@@ -1483,7 +1495,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
updateRadius();
mDrawable->movePartition();
-
+
return res;
}
@@ -4024,10 +4036,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
else
{
model_mat = &(drawable->getRegion()->mRenderMatrix);
- if (model_mat->isIdentity())
- {
- model_mat = NULL;
- }
}
//drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD)));
@@ -4644,10 +4652,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
LLDrawable* drawablep = (LLDrawable*)(*drawable_iter)->getDrawable();
if(drawablep)
{
- drawablep->clearState(LLDrawable::REBUILD_ALL);
- }
+ drawablep->clearState(LLDrawable::REBUILD_ALL);
}
}
+ }
group->mLastUpdateTime = gFrameTimeSeconds;
group->mBuilt = 1.f;
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index aba9df24c9..12eea513da 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -652,8 +652,8 @@ void LLWorld::updateVisibilities()
void LLWorld::updateRegions(F32 max_update_time)
{
LLTimer update_timer;
- BOOL did_one = FALSE;
-
+ BOOL did_one = FALSE;
+
// Perform idle time updates for the regions (and associated surfaces)
for (region_list_t::iterator iter = mRegionList.begin();
iter != mRegionList.end(); ++iter)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 355fa1350b..26ceaf512a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -762,7 +762,16 @@ void LLPipeline::resizeScreenTexture()
GLuint resX = gViewerWindow->getWorldViewWidthRaw();
GLuint resY = gViewerWindow->getWorldViewHeightRaw();
- allocateScreenBuffer(resX,resY);
+ if (!allocateScreenBuffer(resX,resY))
+ { //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled
+ //NOTE: if the session closes successfully after this call, deferred rendering will be
+ // disabled on future sessions
+ if (LLPipeline::sRenderDeferred)
+ {
+ gSavedSettings.setBOOL("RenderDeferred", FALSE);
+ LLPipeline::refreshCachedSettings();
+ }
+ }
}
}
@@ -780,7 +789,7 @@ void LLPipeline::allocatePhysicsBuffer()
bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{
refreshCachedSettings();
-
+
bool save_settings = sRenderDeferred;
if (save_settings)
{
@@ -815,7 +824,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
{
- //try to allocate screen buffers at requested resolution and samples
+ // try to allocate screen buffers at requested resolution and samples
// - on failure, shrink number of samples and try again
// - if not multisampled, shrink resolution and try again (favor X resolution over Y)
// Make sure to call "releaseScreenBuffers" after each failure to cleanup the partially loaded state
@@ -2063,10 +2072,10 @@ void check_references(LLSpatialGroup* group, LLFace* face)
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
if(drawable)
{
- check_references(drawable, face);
- }
+ check_references(drawable, face);
}
}
+}
void LLPipeline::checkReferences(LLFace* face)
{
@@ -2470,7 +2479,7 @@ void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera)
}
assertInitialized();
-
+
if (!group->mSpatialPartition->mRenderByGroup)
{ //render by drawable
sCull->pushDrawableGroup(group);
@@ -3223,7 +3232,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
- postSort(camera);
+ postSort(camera);
LLSceneMonitor::getInstance()->fetchQueryResult();
}
@@ -6100,7 +6109,7 @@ void LLPipeline::enableLightsPreview()
LLVector4 light_pos(dir0, 0.0f);
- LLLightState* light = gGL.getLight(0);
+ LLLightState* light = gGL.getLight(1);
light->enable();
light->setPosition(light_pos);
@@ -6112,7 +6121,7 @@ void LLPipeline::enableLightsPreview()
light_pos = LLVector4(dir1, 0.f);
- light = gGL.getLight(1);
+ light = gGL.getLight(2);
light->enable();
light->setPosition(light_pos);
light->setDiffuse(diffuse1);
@@ -6122,7 +6131,7 @@ void LLPipeline::enableLightsPreview()
light->setSpotCutoff(180.f);
light_pos = LLVector4(dir2, 0.f);
- light = gGL.getLight(2);
+ light = gGL.getLight(3);
light->enable();
light->setPosition(light_pos);
light->setDiffuse(diffuse2);
diff --git a/indra/newview/skins/default/xui/en/floater_my_inventory.xml b/indra/newview/skins/default/xui/en/floater_my_inventory.xml
index ea44fd493e..178987962b 100644
--- a/indra/newview/skins/default/xui/en/floater_my_inventory.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_inventory.xml
@@ -6,7 +6,7 @@
height="570"
help_topic="sidebar_inventory"
min_width="333"
- min_height="560"
+ min_height="570"
name="floater_my_inventory"
save_rect="true"
save_visibility="true"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index e91f5af3d5..29720a680b 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -3,7 +3,7 @@
layout="topleft"
left="0"
mouse_opaque="false"
- can_tear_off="true"
+ can_tear_off="false"
name="menu_inventory_add"
visible="false">
<menu
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 5b6a6f908a..2f0acba23e 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -885,14 +885,6 @@
function="Tools.EnableTakeCopy" />
</menu_item_call>
<menu_item_call
- label="Save Back to My Inventory"
- name="Save Object Back to My Inventory">
- <menu_item_call.on_click
- function="Tools.SaveToInventory" />
- <menu_item_call.on_enable
- function="Tools.EnableSaveToInventory" />
- </menu_item_call>
- <menu_item_call
label="Save Back to Object Contents"
name="Save Object Back to Object Contents">
<menu_item_call.on_click
@@ -3212,6 +3204,40 @@
parameter="AllowSelectAvatar" />
</menu_item_check>
</menu>
+ <menu
+ create_jump_keys="true"
+ label="Animation Speed"
+ name="Animation Speed"
+ tear_off="true">
+ <menu_item_call
+ label="All Animations 10% Faster"
+ name="All Animations 10 Faster">
+ <menu_item_call.on_click
+ function="Advanced.AnimTenFaster" />
+ </menu_item_call>
+ <menu_item_call
+ label="All Animations 10% Slower"
+ name="All Animations 10 Slower">
+ <menu_item_call.on_click
+ function="Advanced.AnimTenSlower" />
+ </menu_item_call>
+ <menu_item_call
+ label="Reset All Animation Speed"
+ name="Reset All Animation Speed">
+ <menu_item_call.on_click
+ function="Advanced.AnimResetAll" />
+ </menu_item_call>
+ <menu_item_check
+ label="Slow Motion Animations"
+ name="Slow Motion Animations">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="SlowMotionAnimation" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="SlowMotionAnimation" />
+ </menu_item_check>
+ </menu>
<menu_item_call
label="Force Params to Default"
name="Force Params to Default">
@@ -3229,16 +3255,6 @@
parameter="" />
</menu_item_check>
<menu_item_check
- label="Slow Motion Animations"
- name="Slow Motion Animations">
- <menu_item_check.on_check
- function="CheckControl"
- parameter="SlowMotionAnimation" />
- <menu_item_check.on_click
- function="ToggleControl"
- parameter="SlowMotionAnimation" />
- </menu_item_check>
- <menu_item_check
label="Show Look At"
name="Show Look At">
<menu_item_check.on_check
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9dae77a304..c8f5cbb2b0 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1293,6 +1293,45 @@ Visit [_URL] for more information?
<notification
icon="alertmodal.tga"
+ name="AMDOldDriver"
+ type="alertmodal">
+ There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance.
+
+ Visit [_URL] to check for driver updates?
+ <tag>confirm</tag>
+ <url option="0" name="url">
+ http://support.amd.com/us/Pages/AMDSupportHub.aspx
+ </url>
+ <usetemplate
+ ignoretext="My graphics driver is out of date"
+ name="okcancelignore"
+ notext="No"
+ yestext="Yes"/>
+ <tag>fail</tag>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NVIDIAOldDriver"
+ type="alertmodal">
+ There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance.
+
+ Visit [_URL] to check for driver updates?
+ <tag>confirm</tag>
+ <url option="0" name="url">
+ http://www.nvidia.com/Download/index.aspx?lang=en-us
+ </url>
+ <usetemplate
+ ignoretext="My graphics driver is out of date"
+ name="okcancelignore"
+ notext="No"
+ yestext="Yes"/>
+ <tag>fail</tag>
+ </notification>
+
+
+ <notification
+ icon="alertmodal.tga"
name="UnknownGPU"
type="alertmodal">
Your system contains a graphics card that [APP_NAME] doesn't recognize.
@@ -6744,7 +6783,7 @@ Is this OK?
type="notify">
Warning: The object &apos;&lt;nolink&gt;[OBJECTNAME]&lt;/nolink&gt;&apos; wants total access to your Linden Dollars account. If you allow access, it can remove funds from your account at any time, or empty your account completely, on an ongoing basis with no additional warnings.
-It is rare that such a request is legitimate. Do not allow access if you do not fully understand why it wants access to your account.
+Do not allow access if you do not fully understand why it wants access to your account.
<tag>confirm</tag>
<form name="form">
@@ -8252,4 +8291,1651 @@ Attempt cancelled.
yestext="Yes"/>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarFrozen"
+ type="notify">
+ <tag>fail</tag>
+[AV_FREEZER] has frozen you. You cannot move or interact with the world.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarFrozenDuration"
+ type="notify">
+ <tag>fail</tag>
+[AV_FREEZER] has frozen you for [AV_FREEZE_TIME] seconds. You cannot move or interact with the world.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="YouFrozeAvatar"
+ type="notify">
+ <tag>fail</tag>
+Avatar frozen.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarHasUnFrozenYou"
+ type="notify">
+ <tag>fail</tag>
+[AV_FREEZER] has unfrozen you.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarUnFrozen"
+ type="notify">
+ <tag>fail</tag>
+Avatar unfrozen.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarFreezeFailure"
+ type="notify">
+ <tag>fail</tag>
+Freeze failed because you don't have admin permission for that parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarFreezeThaw"
+ type="notify">
+ <tag>fail</tag>
+Your freeze expired, go about your business.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarCantFreeze"
+ type="notify">
+ <tag>fail</tag>
+Sorry, can't freeze that user.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NowOwnObject"
+ type="notify">
+ <tag>fail</tag>
+You are now the owner of object [OBJECT_NAME]
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantRezOnLand"
+ type="notify">
+ <tag>fail</tag>
+Can't rez object at [OBJECT_POS] because the owner of this land does not allow it. Use the land tool to see land ownership.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RezFailTooManyRequests"
+ type="notify">
+ <tag>fail</tag>
+Object can not be rezzed because there are too many requests.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SitFailCantMove"
+ type="notify">
+ <tag>fail</tag>
+You cannot sit because you cannot move at this time.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SitFailNotAllowedOnLand"
+ type="notify">
+ <tag>fail</tag>
+You cannot sit because you are not allowed on that land.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SitFailNotSameRegion"
+ type="notify">
+ <tag>fail</tag>
+Try moving closer. Can't sit on object because
+it is not in the same region as you.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoNewObjectRegionFull"
+ type="notify">
+ <tag>fail</tag>
+Unable to create new object. The region is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="FailedToPlaceObject"
+ type="notify">
+ <tag>fail</tag>
+Failed to place object at specified location. Please try again.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoOwnNoGardening"
+ type="notify">
+ <tag>fail</tag>
+You Can't create trees and grass on land you don't own.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoCopyPermsNoObject"
+ type="notify">
+ <tag>fail</tag>
+Copy failed because you lack permission to copy the object '[OBJ_NAME]'.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoTransPermsNoObject"
+ type="notify">
+ <tag>fail</tag>
+Copy failed because the object '[OBJ_NAME]' cannot be transferred to you.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AddToNavMeshNoCopy"
+ type="notify">
+ <tag>fail</tag>
+Copy failed because the object '[OBJ_NAME]' contributes to navmesh.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DupeWithNoRootsSelected"
+ type="notify">
+ <tag>fail</tag>
+Duplicate with no root objects selected.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDupeCuzRegionIsFull"
+ type="notify">
+ <tag>fail</tag>
+Can't duplicate objects because the region is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDupeCuzParcelNotFound"
+ type="notify">
+ <tag>fail</tag>
+Can't duplicate objects - Can't find the parcel they are on.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateCuzParcelFull"
+ type="notify">
+ <tag>fail</tag>
+Can't create object because
+the parcel is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RezAttemptFailed"
+ type="notify">
+ <tag>fail</tag>
+Attempt to rez an object failed.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ToxicInvRezAttemptFailed"
+ type="notify">
+ <tag>fail</tag>
+Unable to create item that has caused problems on this region.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvItemIsBlacklisted"
+ type="notify">
+ <tag>fail</tag>
+That inventory item has been blacklisted.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoCanRezObjects"
+ type="notify">
+ <tag>fail</tag>
+You are not currently allowed to create objects.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LandSearchBlocked"
+ type="notify">
+ <tag>fail</tag>
+Land Search Blocked.
+You have performed too many land searches too quickly.
+Please try again in a minute.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NotEnoughResourcesToAttach"
+ type="notify">
+ <tag>fail</tag>
+Not enough script resources available to attach object!
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="YouDiedAndGotTPHome"
+ type="notify">
+ <tag>fail</tag>
+You died and have been teleported to your home location
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="EjectComingSoon"
+ type="notify">
+ <tag>fail</tag>
+You are no longer allowed here and have [EJECT_TIME] seconds to leave.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoEnterServerFull"
+ type="notify">
+ <tag>fail</tag>
+You can't enter this region because
+the server is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SaveBackToInvDisabled"
+ type="notify">
+ <tag>fail</tag>
+Save Back To Inventory has been disabled.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoExistNoSaveToContents"
+ type="notify">
+ <tag>fail</tag>
+Cannot save '[OBJ_NAME]' to object contents because the object it was rezzed from no longer exists.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoModNoSaveToContents"
+ type="notify">
+ <tag>fail</tag>
+Cannot save '[OBJ_NAME]' to object contents because you do not have permission to modify the object '[DEST_NAME]'.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoSaveBackToInvDisabled"
+ type="notify">
+ <tag>fail</tag>
+Cannot save '[OBJ_NAME]' back to inventory -- this operation has been disabled.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoCopyNoSelCopy"
+ type="notify">
+ <tag>fail</tag>
+You cannot copy your selection because you do not have permission to copy the object '[OBJ_NAME]'.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoTransNoSelCopy"
+ type="notify">
+ <tag>fail</tag>
+You cannot copy your selection because the object '[OBJ_NAME]' is not transferrable.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoTransNoCopy"
+ type="notify">
+ <tag>fail</tag>
+You cannot copy your selection because the object '[OBJ_NAME]' is not transferrable.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoPermsNoRemoval"
+ type="notify">
+ <tag>fail</tag>
+Removal of the object '[OBJ_NAME]' from the simulator is disallowed by the permissions system.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoModNoSaveSelection"
+ type="notify">
+ <tag>fail</tag>
+Cannot save your selection because you do not have permission to modify the object '[OBJ_NAME]'.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoCopyNoSaveSelection"
+ type="notify">
+ <tag>fail</tag>
+Cannot save your selection because the object '[OBJ_NAME]' is not copyable.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoModNoTaking"
+ type="notify">
+ <tag>fail</tag>
+You cannot take your selection because you do not have permission to modify the object '[OBJ_NAME]'.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RezDestInternalError"
+ type="notify">
+ <tag>fail</tag>
+Internal Error: Unknown destination type.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DeleteFailObjNotFound"
+ type="notify">
+ <tag>fail</tag>
+Delete failed because object not found
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SorryCantEjectUser"
+ type="notify">
+ <tag>fail</tag>
+Sorry, can't eject that user.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RegionSezNotAHome"
+ type="notify">
+ <tag>fail</tag>
+This region does not allow you to set your home location here.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="HomeLocationLimits"
+ type="notify">
+ <tag>fail</tag>
+You can only set your 'Home Location' on your land or at a mainland Infohub.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="HomePositionSet"
+ type="notify">
+ <tag>fail</tag>
+Home position set.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarEjected"
+ type="notify">
+ <tag>fail</tag>
+Avatar ejected.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AvatarEjectFailed"
+ type="notify">
+ <tag>fail</tag>
+Eject failed because you don't have admin permission for that parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantMoveObjectParcelFull"
+ type="notify">
+ <tag>fail</tag>
+Can't move object '[OBJECT_NAME]' to
+[OBJ_POSITION] in region [REGION_NAME] because the parcel is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantMoveObjectParcelPerms"
+ type="notify">
+ <tag>fail</tag>
+Can't move object '[OBJECT_NAME]' to
+[OBJ_POSITION] in region [REGION_NAME] because your objects are not allowed on this parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantMoveObjectParcelResources"
+ type="notify">
+ <tag>fail</tag>
+Can't move object '[OBJECT_NAME]' to
+[OBJ_POSITION] in region [REGION_NAME] because there are not enough resources for this object on this parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantMoveObjectRegionVersion"
+ type="notify">
+ <tag>fail</tag>
+Can't move object '[OBJECT_NAME]' to
+[OBJ_POSITION] in region [REGION_NAME] because the other region is running an older version which does not support receiving this object via region crossing.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantMoveObjectNavMesh"
+ type="notify">
+ <tag>fail</tag>
+Can't move object '[OBJECT_NAME]' to
+[OBJ_POSITION] in region [REGION_NAME] because you cannot modify the navmesh across region boundaries.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantMoveObjectWTF"
+ type="notify">
+ <tag>fail</tag>
+Can't move object '[OBJECT_NAME]' to
+[OBJ_POSITION] in region [REGION_NAME] because of an unknown reason. ([FAILURE_TYPE])
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoPermModifyObject"
+ type="notify">
+ <tag>fail</tag>
+You don't have permission to modify that object
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantEnablePhysObjContributesToNav"
+ type="notify">
+ <tag>fail</tag>
+Can't enable physics for an object that contributes to the navmesh.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantEnablePhysKeyframedObj"
+ type="notify">
+ <tag>fail</tag>
+Can't enable physics for keyframed objects.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantEnablePhysNotEnoughLandResources"
+ type="notify">
+ <tag>fail</tag>
+Can't enable physics for object -- insufficient land resources.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantEnablePhysCostTooGreat"
+ persist="true"
+ type="notify">
+ <tag>fail</tag>
+Can't enable physics for object with physics resource cost greater than [MAX_OBJECTS]
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="PhantomWithConcavePiece"
+ type="notify">
+ <tag>fail</tag>
+This object cannot have a concave piece because it is phantom and contributes to the navmesh.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UnableAddItem"
+ type="notify">
+ <tag>fail</tag>
+Unable to add item!
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UnableEditItem"
+ type="notify">
+ <tag>fail</tag>
+Unable to edit this!
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoPermToEdit"
+ type="notify">
+ <tag>fail</tag>
+Not permitted to edit this.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoPermToCopyInventory"
+ type="notify">
+ <tag>fail</tag>
+Not permitted to copy that inventory.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSaveItemDoesntExist"
+ type="notify">
+ <tag>fail</tag>
+Cannot save to object contents: Item no longer exists.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSaveItemAlreadyExists"
+ type="notify">
+ <tag>fail</tag>
+Cannot save to object contents: Item with that name already exists in inventory
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSaveModifyAttachment"
+ type="notify">
+ <tag>fail</tag>
+Cannot save to object contents: This would modify the attachment permissions.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TooManyScripts"
+ type="notify">
+ <tag>fail</tag>
+Too many scripts.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UnableAddScript"
+ type="notify">
+ <tag>fail</tag>
+Unable to add script!
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AssetServerTimeoutObjReturn"
+ type="notify">
+ <tag>fail</tag>
+Asset server didn't respond in a timely fashion. Object returned to sim.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RegionDisablePhysicsShapes"
+ type="notify">
+ <tag>fail</tag>
+This region does not have physics shapes enabled.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoModNavmeshAcrossRegions"
+ type="notify">
+ <tag>fail</tag>
+You cannot modify the navmesh across region boundaries.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoSetPhysicsPropertiesOnObjectType"
+ type="notify">
+ <tag>fail</tag>
+Cannot set physics properties on that object type.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoSetRootPrimWithNoShape"
+ type="notify">
+ <tag>fail</tag>
+Cannot set root prim to have no shape.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoRegionSupportPhysMats"
+ type="notify">
+ <tag>fail</tag>
+This region does not have physics materials enabled.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="OnlyRootPrimPhysMats"
+ type="notify">
+ <tag>fail</tag>
+Only root prims may have their physics materials adjusted.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoSupportCharacterPhysMats"
+ type="notify">
+ <tag>fail</tag>
+Setting physics materials on characters is not yet supported.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidPhysMatProperty"
+ type="notify">
+ <tag>fail</tag>
+One or more of the specified physics material properties was invalid.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoPermsAlterStitchingMeshObj"
+ type="notify">
+ <tag>fail</tag>
+You may not alter the stitching type of a mesh object.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoPermsAlterShapeMeshObj"
+ type="notify">
+ <tag>fail</tag>
+You may not alter the shape of a mesh object
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="FullRegionCantEnter"
+ type="notify">
+ <tag>fail</tag>
+You can't enter this region because \nthe region is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedOwnersDiffer"
+ type="notify">
+ <tag>fail</tag>
+Link failed -- owners differ
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedNoModNavmeshAcrossRegions"
+ type="notify">
+ <tag>fail</tag>
+Link failed -- cannot modify the navmesh across region boundaries.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedNoPermToEdit"
+ type="notify">
+ <tag>fail</tag>
+Link failed because you do not have edit permission.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedTooManyPrims"
+ type="notify">
+ <tag>fail</tag>
+Link failed -- too many primitives
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedCantLinkNoCopyNoTrans"
+ type="notify">
+ <tag>fail</tag>
+Link failed -- cannot link no-copy with no-transfer
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedNothingLinkable"
+ type="notify">
+ <tag>fail</tag>
+Link failed -- nothing linkable.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedTooManyPathfindingChars"
+ type="notify">
+ <tag>fail</tag>
+Link failed -- too many pathfinding characters
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedInsufficientLand"
+ type="notify">
+ <tag>fail</tag>
+Link failed -- insufficient land resources
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LinkFailedTooMuchPhysics"
+ type="notify">
+ <tag>fail</tag>
+Object uses too many physics resources -- its dynamics have been disabled.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TeleportedHomeByObjectOnParcel"
+ persist="true"
+ type="notify">
+ <tag>fail</tag>
+You have been teleported home by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]'
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TeleportedHomeByObject"
+ persist="true"
+ type="notify">
+ <tag>fail</tag>
+You have been teleported home by the object '[OBJECT_NAME]'
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TeleportedByAttachment"
+ type="notify">
+ <tag>fail</tag>
+You have been teleported by an attachment on [ITEM_ID]
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TeleportedByObjectOnParcel"
+ type="notify">
+ <tag>fail</tag>
+You have been teleported by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]'
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TeleportedByObjectOwnedBy"
+ type="notify">
+ <tag>fail</tag>
+You have been teleported by the object '[OBJECT_NAME]' owned by [OWNER_ID]
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TeleportedByObjectUnknownUser"
+ type="notify">
+ <tag>fail</tag>
+You have been teleported by the object '[OBJECT_NAME]' owned by an unknown user.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateObjectRegionFull"
+ type="notify">
+ <tag>fail</tag>
+Unable to create requested object. The region is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantAttackMultipleObjOneSpot"
+ type="notify">
+ <tag>fail</tag>
+You can't attach multiple objects to one spot.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateMultipleObjAtLoc"
+ type="notify">
+ <tag>fail</tag>
+You can't create multiple objects here.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UnableToCreateObjTimeOut"
+ type="notify">
+ <tag>fail</tag>
+Unable to create requested object. Object is missing from database.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UnableToCreateObjUnknown"
+ type="notify">
+ <tag>fail</tag>
+Unable to create requested object. The request timed out. Please try again.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UnableToCreateObjMissingFromDB"
+ type="notify">
+ <tag>fail</tag>
+Unable to create requested object. Please try again.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RezFailureTookTooLong"
+ type="notify">
+ <tag>fail</tag>
+Rez failed, requested object took too long to load.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="FailedToPlaceObjAtLoc"
+ type="notify">
+ <tag>fail</tag>
+Failed to place object at specified location. Please try again.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreatePlantsOnLand"
+ type="notify">
+ <tag>fail</tag>
+You cannot create plants on this land.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantRestoreObjectNoWorldPos"
+ type="notify">
+ <tag>fail</tag>
+Cannot restore object. No world position found.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantRezObjectInvalidMeshData"
+ type="notify">
+ <tag>fail</tag>
+Unable to rez object because its mesh data is invalid.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantRezObjectTooManyScripts"
+ type="notify">
+ <tag>fail</tag>
+Unable to rez object because there are already too many scripts in this region.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateObjectNoAccess"
+ type="notify">
+ <tag>fail</tag>
+Your access privileges don't allow you to create objects there.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateObject"
+ type="notify">
+ <tag>fail</tag>
+You are not currently allowed to create objects.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InvalidObjectParams"
+ type="notify">
+ <tag>fail</tag>
+Invalid object parameters
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDuplicateObjectNoAcess"
+ type="notify">
+ <tag>fail</tag>
+Your access privileges don't allow you to duplicate objects here.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantChangeShape"
+ type="notify">
+ <tag>fail</tag>
+You are not allowed to change this shape.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoAccessToClaimObjects"
+ type="notify">
+ <tag>fail</tag>
+Your access privileges don't allow you to claim objects here.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DeedFailedNoPermToDeedForGroup"
+ type="notify">
+ <tag>fail</tag>
+Deed failed because you do not have permission to deed objects for your group.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoPrivsToBuyObject"
+ type="notify">
+ <tag>fail</tag>
+Your access privileges don't allow you to buy objects here.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantAttachObjectAvatarSittingOnIt"
+ type="notify">
+ <tag>fail</tag>
+Cannot attach object because an avatar is sitting on it.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="WhyAreYouTryingToWearShrubbery"
+ type="notify">
+ <tag>fail</tag>
+Trees and grasses cannot be worn as attachments.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantAttachGroupOwnedObjs"
+ type="notify">
+ <tag>fail</tag>
+Cannot attach group-owned objects.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantAttachObjectsNotOwned"
+ type="notify">
+ <tag>fail</tag>
+Cannot attach objects that you don't own.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantAttachNavmeshObjects"
+ type="notify">
+ <tag>fail</tag>
+Cannot attach objects that contribute to navmesh.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantAttachObjectNoMovePermissions"
+ type="notify">
+ <tag>fail</tag>
+Cannot attach object because you do not have permission to move it.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantAttachNotEnoughScriptResources"
+ type="notify">
+ <tag>fail</tag>
+Not enough script resources available to attach object!
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDropItemTrialUser"
+ type="notify">
+ <tag>fail</tag>
+You can't drop objects here; try the Free Trial area.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDropMeshAttachment"
+ type="notify">
+ <tag>fail</tag>
+You can't drop mesh attachments. Detach to inventory and then rez in world.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDropAttachmentNoPermission"
+ type="notify">
+ <tag>fail</tag>
+Failed to drop attachment: you don't have permission to drop there.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDropAttachmentInsufficientLandResources"
+ type="notify">
+ <tag>fail</tag>
+Failed to drop attachment: insufficient available land resource.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDropAttachmentInsufficientResources"
+ type="notify">
+ <tag>fail</tag>
+Failed to drop attachments: insufficient available resources.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDropObjectFullParcel"
+ type="notify">
+ <tag>fail</tag>
+Cannot drop object here. Parcel is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantTouchObjectBannedFromParcel"
+ type="notify">
+ <tag>fail</tag>
+Can't touch/grab this object because you are banned from the land parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="PlzNarrowDeleteParams"
+ type="notify">
+ <tag>fail</tag>
+Please narrow your delete parameters.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UnableToUploadAsset"
+ type="notify">
+ <tag>fail</tag>
+Unable to upload asset.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantTeleportCouldNotFindUser"
+ type="notify">
+ <tag>fail</tag>
+Could not find user to teleport home
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="GodlikeRequestFailed"
+ type="notify">
+ <tag>fail</tag>
+godlike request failed
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="GenericRequestFailed"
+ type="notify">
+ <tag>fail</tag>
+generic request failed
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantUploadPostcard"
+ type="notify">
+ <tag>fail</tag>
+Unable to upload postcard. Try again later.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantFetchInventoryForGroupNotice"
+ type="notify">
+ <tag>fail</tag>
+Unable to fetch inventory details for the group notice.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSendGroupNoticeNotPermitted"
+ type="notify">
+ <tag>fail</tag>
+Unable to send group notice -- not permitted.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSendGroupNoticeCantConstructInventory"
+ type="notify">
+ <tag>fail</tag>
+Unable to send group notice -- could not construct inventory.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantParceInventoryInNotice"
+ type="notify">
+ <tag>fail</tag>
+Unable to parse inventory in notice.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TerrainUploadFailed"
+ type="notify">
+ <tag>fail</tag>
+Terrain upload failed.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TerrainFileWritten"
+ type="notify">
+ <tag>fail</tag>
+Terrain file written.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TerrainFileWrittenStartingDownload"
+ type="notify">
+ <tag>fail</tag>
+Terrain file written, starting download...
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TerrainBaked"
+ type="notify">
+ <tag>fail</tag>
+Terrain baked.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="TenObjectsDisabledPlzRefresh"
+ type="notify">
+ <tag>fail</tag>
+Only the first 10 selected objects have been disabled. Refresh and make additional selections if required.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UpdateViewerBuyParcel"
+ type="notify">
+ <tag>fail</tag>
+You need to update your viewer to buy this parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LandBuyAccessBlocked"
+ type="notify">
+ <tag>fail</tag>
+You can't buy this land due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. Please go to the Knowledge Base for details on accessing areas with this maturity Rating.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantBuyParcelNotForSale"
+ type="notify">
+ <tag>fail</tag>
+Unable to buy, this parcel is not for sale.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantBuySalePriceOrLandAreaChanged"
+ type="notify">
+ <tag>fail</tag>
+Unable to buy, the sale price or land area has changed.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantBuyParcelNotAuthorized"
+ type="notify">
+ <tag>fail</tag>
+You are not the authorized buyer for this parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantBuyParcelAwaitingPurchaseAuth"
+ type="notify">
+ <tag>fail</tag>
+You cannot purchase this parcel because it is already awaiting purchase aut
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantBuildOverflowParcel"
+ type="notify">
+ <tag>fail</tag>
+You cannot build objects here because doing so would overflow the parcel.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SelectedMultipleOwnedLand"
+ type="notify">
+ <tag>fail</tag>
+You selected land with different owners. Please select a smaller area and try again.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantJoinTooFewLeasedParcels"
+ type="notify">
+ <tag>fail</tag>
+Not enough leased parcels in selection to join.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDivideLandMultipleParcelsSelected"
+ type="notify">
+ <tag>fail</tag>
+Can't divide land.\nThere is more than one parcel selected.\nTry selecting a smaller piece of land.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDivideLandCantFindParcel"
+ type="notify">
+ <tag>fail</tag>
+Can't divide land.\nCan't find the parcel.\nPlease report with Help -> Reprt Bug...
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDivideLandWholeParcelSelected"
+ type="notify">
+ <tag>fail</tag>
+Can't divide land. Whole parcel is selected.\nTry selecting a smaller piece of land.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LandHasBeenDivided"
+ type="notify">
+ <tag>fail</tag>
+Land has been divided.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="PassPurchased"
+ type="notify">
+ <tag>fail</tag>
+You purchased a pass.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RegionDisallowsClassifieds"
+ type="notify">
+ <tag>fail</tag>
+Region does not allow classified advertisements.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LandPassExpireSoon"
+ type="notify">
+ <tag>fail</tag>
+Your pass to this land is about to expire.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSitNoSuitableSurface"
+ type="notify">
+ <tag>fail</tag>
+There is no suitable surface to sit on, try another spot.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSitNoRoom"
+ type="notify">
+ <tag>fail</tag>
+No room to sit here, try another spot.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AutopilotCanceled"
+ type="notify">
+ <tag>fail</tag>
+Autopilot canceled
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ClaimObjectFailedNoPermission"
+ type="notify">
+ <tag>fail</tag>
+Claim object failed because you don't have permission
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ClaimObjectFailedNoMoney"
+ type="notify">
+ <tag>fail</tag>
+Claim object failed because you don't have enough L$.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDeedGroupLand"
+ type="notify">
+ <tag>fail</tag>
+Cannot deed group-owned land.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="BuyObjectFailedNoMoney"
+ type="notify">
+ <tag>fail</tag>
+Buy object failed because you don't have enough L$.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="BuyInventoryFailedNoMoney"
+ type="notify">
+ <tag>fail</tag>
+Buy inventory failed because you do not have enough L$
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="BuyPassFailedNoMoney"
+ type="notify">
+ <tag>fail</tag>
+You don't have enough L$ to buy a pass to this land.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantBuyPassTryAgain"
+ type="notify">
+ <tag>fail</tag>
+Unable to buy pass right now. Try again later.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateObjectParcelFull"
+ type="notify">
+ <tag>fail</tag>
+Can't create object because \nthe parcel is full.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="FailedPlacingObject"
+ type="notify">
+ <tag>fail</tag>
+Failed to place object at specified location. Please try again.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateLandmarkForEvent"
+ type="notify">
+ <tag>fail</tag>
+Unable to create landmark for event.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="GodBeatsFreeze"
+ type="notify">
+ <tag>fail</tag>
+Your godlike powers break the freeze!
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SpecialPowersRequestFailedLogged"
+ type="notify">
+ <tag>fail</tag>
+Request for special powers failed. This request has been logged.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ExpireExplanation"
+ type="notify">
+ <tag>fail</tag>
+The system is currently unable to process your request. The request timed out.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DieExplanation"
+ type="notify">
+ <tag>fail</tag>
+The system is unable to process your request.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="AddPrimitiveFailure"
+ type="notify">
+ <tag>fail</tag>
+Insufficient funds to create primitve.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RezObjectFailure"
+ type="notify">
+ <tag>fail</tag>
+Insufficient funds to create object.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ResetHomePositionNotLegal"
+ type="notify">
+ <tag>fail</tag>
+Reset Home position since Home wasn't legal.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantInviteRegionFull"
+ type="notify">
+ <tag>fail</tag>
+You cannot currently invite anyone to your location because the region is full. Try again later.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantSetHomeAtRegion"
+ type="notify">
+ <tag>fail</tag>
+This region does not allow you to set your home location here.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ListValidHomeLocations"
+ type="notify">
+ <tag>fail</tag>
+You can only set your 'Home Location' on your land or at a mainland Infohub.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="SetHomePosition"
+ type="notify">
+ <tag>fail</tag>
+Home position set.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDerezInventoryError"
+ type="notify">
+ <tag>fail</tag>
+Cannot derez object due to inventory fault.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateRequestedInv"
+ type="notify">
+ <tag>fail</tag>
+Cannot create requested inventory.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateRequestedInvFolder"
+ type="notify">
+ <tag>fail</tag>
+Cannot create requested inventory folder.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateInventory"
+ type="notify">
+ <tag>fail</tag>
+Cannot create that inventory.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateLandmark"
+ type="notify">
+ <tag>fail</tag>
+Cannot create landmark.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantCreateOutfit"
+ type="notify">
+ <tag>fail</tag>
+Cannot create outfit right now. Try again in a minute.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InventoryNotForSale"
+ type="notify">
+ <tag>fail</tag>
+Inventory is not for sale.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantFindInvItem"
+ type="notify">
+ <tag>fail</tag>
+Unable to find inventory item.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantFindObject"
+ type="notify">
+ <tag>fail</tag>
+Unable to find object.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantTransfterMoneyRegionDisabled"
+ type="notify">
+ <tag>fail</tag>
+Money transfers to objects are currently disabled in this region.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantPayNoAgent"
+ type="notify">
+ <tag>fail</tag>
+Could not figure out who to pay.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CantDonateToPublicObjects"
+ type="notify">
+ <tag>fail</tag>
+You cannot give L$ to public objects.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="InventoryCreationInWorldObjectFailed"
+ type="notify">
+ <tag>fail</tag>
+Inventory creation on in-world object failed.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UserBalanceOrLandUsageError"
+ type="notify">
+ <tag>fail</tag>
+An internal error prevented us from properly updating your viewer. The L$ balance or parcel holdings displayed in your viewer may not reflect your actual balance on the servers.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LargePrimAgentIntersect"
+ type="notify">
+ <tag>fail</tag>
+Cannot create large prims that intersect other players. Please re-try when other players have moved.
+ </notification>
+
</notifications>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index 849f3ef73d..cd243d40a4 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -147,12 +147,12 @@
height="12"
layout="topleft"
left_delta="87"
- name="ShadersPrefText3"
+ name="ShadersPrefText2"
top_delta="0"
width="80">
Mid
</text>
- <text
+ <text
type="string"
length="1"
follows="left|top"
@@ -163,8 +163,8 @@
name="ShadersPrefText3"
top_delta="0"
width="80">
- High
- </text>
+ High
+ </text>
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index f1ae14809f..6ee8fc3a4c 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- height="570"
- layout="topleft"
- name="object properties"
- help_topic="object_properties"
- title="Object Profile"
- width="333">
- <panel.string
- name="text deed continued">
- Deed
- </panel.string>
- <panel.string
- name="text deed">
- Deed
- </panel.string>
- <panel.string
- name="text modify info 1">
- You can modify this object
- </panel.string>
- <panel.string
- name="text modify info 2">
- You can modify these objects
- </panel.string>
- <panel.string
- name="text modify info 3">
- You can't modify this object
- </panel.string>
- <panel.string
- name="text modify info 4">
- You can't modify these objects
- </panel.string>
- <panel.string
+ height="570"
+ layout="topleft"
+ name="object properties"
+ help_topic="object_properties"
+ title="Object Profile"
+ width="333">
+ <panel.string
+ name="text deed continued">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text deed">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text modify info 1">
+ You can modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 2">
+ You can modify these objects
+ </panel.string>
+ <panel.string
+ name="text modify info 3">
+ You can't modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 4">
+ You can't modify these objects
+ </panel.string>
+ <panel.string
name="text modify info 5">
You can't modify this object across a region boundary
</panel.string>
@@ -39,403 +39,403 @@
You can't modify these objects across a region boundary
</panel.string>
<panel.string
- name="text modify warning">
- This object has linked parts
- </panel.string>
- <panel.string
- name="Cost Default">
- Price: L$
- </panel.string>
- <panel.string
- name="Cost Total">
- Total Price: L$
- </panel.string>
- <panel.string
- name="Cost Per Unit">
- Price Per: L$
- </panel.string>
- <panel.string
- name="Cost Mixed">
- Mixed Price
- </panel.string>
- <panel.string
- name="Sale Mixed">
- Mixed Sale
- </panel.string>
- <button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- left="8"
- name="back_btn"
- tab_stop="false"
- top="0"
- width="30"
- use_draw_context_alpha="false" />
- <text
- follows="top|left|right"
- font="SansSerifHuge"
- height="26"
- layout="topleft"
- left_pad="10"
- name="title"
- text_color="LtGray"
- top="0"
- use_ellipses="true"
- value="Object Profile"
- width="290" />
- <text
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="where"
- text_color="LtGray_50"
- value="(Inworld)"
- width="150" />
- <panel
- follows="all"
- height="490"
- label=""
- layout="topleft"
- left="10"
- help_topic=""
- name="properties_panel"
- top="45"
- width="313"
- background_visible="true"
- bg_alpha_color="DkGray2">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Name:"
- top="10"
- width="78">
- Name:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="20"
- layout="topleft"
- left_delta="78"
- max_length_bytes="63"
- name="Object Name"
- top_delta="0"
- width="225" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Description:"
- top_pad="10"
- width="78">
- Description:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="23"
- layout="topleft"
- name="Object Description"
- select_on_focus="true"
- left_delta="78"
- max_length_bytes="127"
- top_delta="-5"
- width="225"/>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="CreatorNameLabel"
- top_pad="12"
- width="78">
- Creator:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Creator Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Owner:"
- top_pad="15"
- width="78">
- Owner:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Owner Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Group_label"
- top_pad="15"
- width="78">
- Group:
- </text>
+ name="text modify warning">
+ This object has linked parts
+ </panel.string>
+ <panel.string
+ name="Cost Default">
+ Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Total">
+ Total Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Per Unit">
+ Price Per: L$
+ </panel.string>
+ <panel.string
+ name="Cost Mixed">
+ Mixed Price
+ </panel.string>
+ <panel.string
+ name="Sale Mixed">
+ Mixed Sale
+ </panel.string>
<button
- follows="top|left"
- height="10"
- image_disabled="Activate_Checkmark"
- image_selected="Activate_Checkmark"
- image_unselected="Activate_Checkmark"
- image_color="White_50"
- layout="topleft"
- left_pad="0"
- top_delta="0"
- name="button set group"
- tab_stop="false"
- tool_tip="Choose a group to share this object's permissions"
- width="10" />
- <name_box
- follows="left|top"
- height="18"
- initial_value="Loading..."
- layout="topleft"
- left_pad="5"
- top_delta="-1"
- name="Group Name Proxy"
- width="150" />
- <button
- follows="top|left"
- height="23"
- label="Deed"
- label_selected="Deed"
- layout="topleft"
- name="button deed"
- top_pad="0"
- left="81"
- tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
- width="100" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="9"
- layout="topleft"
- top_pad="5"
- left="5"
- name="label click action"
- width="280">
- Click to:
- </text>
- <combo_box
- follows="left|top"
- height="23"
- layout="topleft"
- name="clickaction"
- width="168"
- left="81">
- <combo_box.item
- label="Touch (default)"
- name="Touch/grab(default)"
+ follows="top|left"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
+ layout="topleft"
+ left="8"
+ name="back_btn"
+ tab_stop="false"
+ top="0"
+ width="30"
+ use_draw_context_alpha="false" />
+ <text
+ follows="top|left|right"
+ font="SansSerifHuge"
+ height="26"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="LtGray"
+ top="0"
+ use_ellipses="true"
+ value="Object Profile"
+ width="290" />
+ <text
+ follows="top|left"
+ height="13"
+ layout="topleft"
+ left="45"
+ name="where"
+ text_color="LtGray_50"
+ value="(Inworld)"
+ width="150" />
+ <panel
+ follows="all"
+ height="490"
+ label=""
+ layout="topleft"
+ left="10"
+ help_topic=""
+ name="properties_panel"
+ top="45"
+ width="313"
+ background_visible="true"
+ bg_alpha_color="DkGray2">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Name:"
+ top="10"
+ width="78">
+ Name:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="20"
+ layout="topleft"
+ left_delta="78"
+ max_length_bytes="63"
+ name="Object Name"
+ top_delta="0"
+ width="225" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Description:"
+ top_pad="10"
+ width="78">
+ Description:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ name="Object Description"
+ select_on_focus="true"
+ left_delta="78"
+ max_length_bytes="127"
+ top_delta="-5"
+ width="225"/>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="CreatorNameLabel"
+ top_pad="12"
+ width="78">
+ Creator:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Creator Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Owner:"
+ top_pad="15"
+ width="78">
+ Owner:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Owner Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Group_label"
+ top_pad="15"
+ width="78">
+ Group:
+ </text>
+ <button
+ follows="top|left"
+ height="10"
+ image_disabled="Activate_Checkmark"
+ image_selected="Activate_Checkmark"
+ image_unselected="Activate_Checkmark"
+ image_color="White_50"
+ layout="topleft"
+ left_pad="0"
+ top_delta="0"
+ name="button set group"
+ tab_stop="false"
+ tool_tip="Choose a group to share this object's permissions"
+ width="10" />
+ <name_box
+ follows="left|top"
+ height="18"
+ initial_value="Loading..."
+ layout="topleft"
+ left_pad="5"
+ top_delta="-1"
+ name="Group Name Proxy"
+ width="150" />
+ <button
+ follows="top|left"
+ height="23"
+ label="Deed"
+ label_selected="Deed"
+ layout="topleft"
+ name="button deed"
+ top_pad="0"
+ left="81"
+ tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="9"
+ layout="topleft"
+ top_pad="5"
+ left="5"
+ name="label click action"
+ width="280">
+ Click to:
+ </text>
+ <combo_box
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ name="clickaction"
+ width="168"
+ left="81">
+ <combo_box.item
+ label="Touch (default)"
+ name="Touch/grab(default)"
value="Touch" />
- <combo_box.item
- label="Sit on object"
- name="Sitonobject"
+ <combo_box.item
+ label="Sit on object"
+ name="Sitonobject"
value="Sit" />
- <combo_box.item
- label="Buy object"
- name="Buyobject"
+ <combo_box.item
+ label="Buy object"
+ name="Buyobject"
value="Buy" />
- <combo_box.item
- label="Pay object"
- name="Payobject"
+ <combo_box.item
+ label="Pay object"
+ name="Payobject"
value="Pay" />
- <combo_box.item
- label="Open"
- name="Open"
- value="Open" />
+ <combo_box.item
+ label="Open"
+ name="Open"
+ value="Open" />
<combo_box.item
label="Zoom"
name="Zoom"
value="Zoom" />
- </combo_box>
- <panel
- border="false"
- follows="left|top"
- layout="topleft"
- mouse_opaque="false"
- background_visible="true"
- bg_alpha_color="DkGray"
- name="perms_inv"
- left="0"
- top_pad="15"
- height="135"
- width="313">
- <text
- type="string"
- length="1"
+ </combo_box>
+ <panel
+ border="false"
+ follows="left|top"
+ layout="topleft"
+ mouse_opaque="false"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ name="perms_inv"
+ left="0"
+ top_pad="15"
+ height="135"
+ width="313">
+ <text
+ type="string"
+ length="1"
left="5"
- top_pad="15"
- text_color="EmphasisColor"
- height="15"
- follows="left|top|right"
- layout="topleft"
- name="perm_modify"
- width="310">
- You can modify this object
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="Anyone can:"
- top_pad="8"
- width="100">
- Anyone:
- </text>
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox allow everyone copy"
- top_delta="-2"
- width="90" />
- <check_box
- height="18"
- label="Move"
- layout="topleft"
- name="checkbox allow everyone move"
- left_pad="0"
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="GroupLabel"
- top_pad="8"
- width="100">
- Group:
- </text>
- <check_box
- height="18"
- label="Share"
- layout="topleft"
- left_pad="90"
- top_delta="-2"
- name="checkbox share with group"
- tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="NextOwnerLabel"
- top_pad="8"
- width="200"
- word_wrap="true">
- Next owner:
- </text>
- <check_box
- height="18"
- label="Modify"
- layout="topleft"
- left="20"
- top_pad="0"
- name="checkbox next owner can modify"
- width="90" />
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can copy"
- width="90" />
- <check_box
- height="18"
- label="Transfer"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can transfer"
- tool_tip="Next owner can give away or resell this object"
- width="106" />
- </panel>
- <check_box
- height="23"
- label="For Sale"
- layout="topleft"
- left="20"
- name="checkbox for sale"
- top_pad="10"
- width="100" />
- <combo_box
- height="23"
- left_pad="0"
- layout="topleft"
- follows="left|top"
- name="sale type"
- width="170">
- <combo_box.item
- name="Copy"
- label="Copy"
- value="2" />
- <combo_box.item
- name="Contents"
- label="Contents"
- value="3" />
- <combo_box.item
- name="Original"
- label="Original"
- value="1" />
- </combo_box>
- <spinner
+ top_pad="15"
+ text_color="EmphasisColor"
+ height="15"
+ follows="left|top|right"
+ layout="topleft"
+ name="perm_modify"
+ width="310">
+ You can modify this object
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="Anyone can:"
+ top_pad="8"
+ width="100">
+ Anyone:
+ </text>
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox allow everyone copy"
+ top_delta="-2"
+ width="90" />
+ <check_box
+ height="18"
+ label="Move"
+ layout="topleft"
+ name="checkbox allow everyone move"
+ left_pad="0"
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="GroupLabel"
+ top_pad="8"
+ width="100">
+ Group:
+ </text>
+ <check_box
+ height="18"
+ label="Share"
+ layout="topleft"
+ left_pad="90"
+ top_delta="-2"
+ name="checkbox share with group"
+ tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="NextOwnerLabel"
+ top_pad="8"
+ width="200"
+ word_wrap="true">
+ Next owner:
+ </text>
+ <check_box
+ height="18"
+ label="Modify"
+ layout="topleft"
+ left="20"
+ top_pad="0"
+ name="checkbox next owner can modify"
+ width="90" />
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can copy"
+ width="90" />
+ <check_box
+ height="18"
+ label="Transfer"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can transfer"
+ tool_tip="Next owner can give away or resell this object"
+ width="106" />
+ </panel>
+ <check_box
+ height="23"
+ label="For Sale"
+ layout="topleft"
+ left="20"
+ name="checkbox for sale"
+ top_pad="10"
+ width="100" />
+ <combo_box
+ height="23"
+ left_pad="0"
+ layout="topleft"
+ follows="left|top"
+ name="sale type"
+ width="170">
+ <combo_box.item
+ name="Copy"
+ label="Copy"
+ value="2" />
+ <combo_box.item
+ name="Contents"
+ label="Contents"
+ value="3" />
+ <combo_box.item
+ name="Original"
+ label="Original"
+ value="1" />
+ </combo_box>
+ <spinner
follows="left|top"
decimal_digits="0"
increment="1"
@@ -449,17 +449,17 @@
min_val="1"
height="20"
max_val="999999999" />
- <check_box
- height="20"
- width="110"
- top_pad="6"
- label="Show in search"
- layout="topleft"
- left="120"
- name="search_check"
- tool_tip="Let people see this object in search results" />
- <text
- type="string"
+ <check_box
+ height="20"
+ width="110"
+ top_pad="6"
+ label="Show in search"
+ layout="topleft"
+ left="120"
+ name="search_check"
+ tool_tip="Let people see this object in search results" />
+ <text
+ type="string"
follows="left|top"
name="pathfinding_attributes_label"
top_pad="6"
@@ -470,7 +470,7 @@
<text
type="string"
follows="left|top"
- text_color="EmphasisColor"
+ text_color="EmphasisColor"
name="pathfinding_attributes_value"
width="130"
word_wrap="false"
@@ -479,120 +479,120 @@
<text
type="string"
text_color="EmphasisColor"
- length="1"
+ length="1"
top_pad="10"
- follows="left|top"
- layout="topleft"
- left="10"
- name="B:"
- height="10"
- width="50">
- B:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="O:"
- height="10"
- width="50">
- O:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="G:"
- height="10"
- width="50">
- G:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- left_pad="0"
- layout="topleft"
- name="E:"
- height="10"
- width="50">
- E:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="N:"
- height="10"
- width="50">
- N:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="F:"
- height="10"
- width="50">
- F:
- </text>
- </panel>
- <panel
- height="25"
- layout="bottomright"
- name="button_panel"
- left="5"
- bottom="5"
- width="313">
- <button
- follows="bottom|left"
- height="23"
- label="Open"
- layout="topleft"
- left="5"
- name="open_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Pay"
- layout="topleft"
- left_pad="5"
- name="pay_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Buy"
- layout="topleft"
- left_pad="5"
- name="buy_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Details"
- layout="topleft"
- left_pad="5"
- name="details_btn"
- top="0"
- width="74" />
+ follows="left|top"
+ layout="topleft"
+ left="10"
+ name="B:"
+ height="10"
+ width="50">
+ B:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="O:"
+ height="10"
+ width="50">
+ O:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="G:"
+ height="10"
+ width="50">
+ G:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ left_pad="0"
+ layout="topleft"
+ name="E:"
+ height="10"
+ width="50">
+ E:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="N:"
+ height="10"
+ width="50">
+ N:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="F:"
+ height="10"
+ width="50">
+ F:
+ </text>
+ </panel>
+ <panel
+ height="25"
+ layout="bottomright"
+ name="button_panel"
+ left="5"
+ bottom="5"
+ width="313">
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Open"
+ layout="topleft"
+ left="5"
+ name="open_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Pay"
+ layout="topleft"
+ left_pad="5"
+ name="pay_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Buy"
+ layout="topleft"
+ left_pad="5"
+ name="buy_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Details"
+ layout="topleft"
+ left_pad="5"
+ name="details_btn"
+ top="0"
+ width="74" />
- </panel>
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 18d1854f67..4383b98592 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3330,7 +3330,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="LocationCtrlAdultIconTooltip">Adult Region</string>
<string name="LocationCtrlModerateIconTooltip">Moderate Region</string>
<string name="LocationCtrlGeneralIconTooltip">General Region</string>
- <string name="LocationCtrlSeeAVsTooltip">Avatars visible and chat allowed outside of this parcel</string>
+ <string name="LocationCtrlSeeAVsTooltip">Avatars inside this parcel cannot be seen or heard by avatars outside this parcel</string>
<string name="LocationCtrlPathfindingDirtyTooltip">Objects that move may not behave correctly in this region until the region is rebaked.</string>
<string name="LocationCtrlPathfindingDisabledTooltip">Dynamic pathfinding is not enabled on this region.</string>
<!-- Strings used by the (currently Linux) auto-updater app -->
diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml
index 3f17324006..7e17ed6864 100644
--- a/indra/newview/skins/default/xui/zh/strings.xml
+++ b/indra/newview/skins/default/xui/zh/strings.xml
@@ -1982,7 +1982,7 @@ http://secondlife.com/viewer-access-faq
新腳本
</string>
<string name="BusyModeResponseDefault">
- 你傳訊過去的居民目前處於忙碌狀態,這意味著他要求不被打擾。 你的訊息仍將留存並顯示於對���的 IM 面板上供稍後查閱。
+ 你傳訊過去的居民目前處於忙碌狀態,這意味著他要求不被打擾。 你的訊息仍將留存並顯示於對方的 IM 面板上供稍後查閱。
</string>
<string name="MuteByName">
(按名稱)
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index ea75d4f4f6..e7108141ee 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -968,7 +968,6 @@ class LinuxManifest(ViewerManifest):
if self.prefix(src="", dst="bin"):
self.path("secondlife-bin","do-not-directly-run-secondlife-bin")
self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")
- self.path("../linux_updater/linux-updater", "linux-updater.bin")
self.path2basename("../llplugin/slplugin", "SLPlugin")
self.path2basename("../viewer_components/updater/scripts/linux", "update_install")
self.end_prefix("bin")
@@ -1017,9 +1016,7 @@ class LinuxManifest(ViewerManifest):
else:
installer_name += '_' + self.channel_oneword().upper()
- if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer():
- print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build"
- self.run_command("find %(d)r/bin %(d)r/lib -type f \\! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure
+ self.strip_binaries()
# Fix access permissions
self.run_command("""
@@ -1054,6 +1051,11 @@ class LinuxManifest(ViewerManifest):
'dst': self.get_dst_prefix(),
'inst': self.build_path_of(installer_name)})
+ def strip_binaries(self):
+ if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer():
+ print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build"
+ self.run_command(r"find %(d)r/bin %(d)r/lib -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure
+
class Linux_i686Manifest(LinuxManifest):
def construct(self):
super(Linux_i686Manifest, self).construct()
@@ -1139,9 +1141,7 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libvivoxplatform.so")
self.end_prefix("lib")
- if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer():
- print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build"
- self.run_command("find %(d)r/bin %(d)r/lib -type f \\! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure
+ self.strip_binaries()
class Linux_x86_64Manifest(LinuxManifest):
diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install
index e0505a9f72..a9df9042fd 100644
--- a/indra/viewer_components/updater/scripts/linux/update_install
+++ b/indra/viewer_components/updater/scripts/linux/update_install
@@ -1,10 +1,217 @@
#! /bin/bash
-INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd)
-export LD_LIBRARY_PATH="$INSTALL_DIR/lib"
-bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml"
-if [ $? -ne 0 ]
- then echo $3 >> "$2"
+# @file update_install
+# @author Nat Goodspeed
+# @date 2013-01-09
+# @brief Update the containing Second Life application bundle to the version in
+# the specified tarball.
+#
+# This bash implementation is derived from the previous linux-updater.bin
+# application.
+#
+# $LicenseInfo:firstyear=2013&license=viewerlgpl$
+# Copyright (c) 2013, Linden Research, Inc.
+# $/LicenseInfo$
+
+# ****************************************************************************
+# script parameters
+# ****************************************************************************
+tarball="$1" # the file to install
+markerfile="$2" # create this file on failure
+mandatory="$3" # what to write to markerfile on failure
+
+# ****************************************************************************
+# helper functions
+# ****************************************************************************
+# empty array
+cleanups=()
+
+# add a cleanup action to execute on exit
+function cleanup {
+ # wacky bash syntax for appending to array
+ cleanups[${#cleanups[*]}]="$*"
+}
+
+# called implicitly on exit
+function onexit {
+ for action in "${cleanups[@]}"
+ do # don't quote, support actions consisting of multiple words
+ $action
+ done
+}
+trap 'onexit' EXIT
+
+# write to log file
+function log {
+ # our log file will be open as stderr -- but until we set up that
+ # redirection, logging to stderr is better than nothing
+ echo "$*" 1>&2
+}
+
+# We display status by leaving one background xmessage process running. This
+# is the pid of that process.
+statuspid=""
+
+function clear_message {
+ [ -n "$statuspid" ] && kill $statuspid
+ statuspid=""
+}
+
+# make sure we remove any message box we might have put up
+cleanup clear_message
+
+# can we use zenity, or must we fall back to xmessage?
+zenpath="$(which zenity)"
+if [ -n "$zenpath" ]
+then # zenity on PATH and is executable
+ # display a message box and continue
+ function status {
+ # clear any previous message
+ clear_message
+ # put up a new zenity box and capture its pid
+ "$zenpath" --info --title "Second Life Viewer Updater" \
+ --width=320 --height=120 --text="$*" &
+ statuspid=$!
+ }
+
+ # display an error box and wait for user
+ function errorbox {
+ "$zenpath" --error --title "Second Life Viewer Updater" \
+ --width=320 --height=120 --text="$*"
+ }
+
+else # no zenity, use xmessage instead
+ # display a message box and continue
+ function status {
+ # clear any previous message
+ clear_message
+ # put up a new xmessage and capture its pid
+ xmessage -buttons OK:2 -center "$*" &
+ statuspid=$!
+ }
+
+ # display an error box and wait for user
+ function errorbox {
+ xmessage -buttons OK:2 -center "$*"
+ }
+fi
+
+# display an error box and terminate
+function fail {
+ # Log the message
+ log "$@"
+ # tell subsequent viewer things went south
+ echo "$mandatory" > "$markerfile"
+ # add boilerplate
+ errorbox "An error occurred while updating Second Life:
+$*
+Please download the latest viewer from www.secondlife.com."
+ exit 1
+}
+
+# Find a graphical sudo program and define mysudo function. On error, $? is
+# nonzero; output is in $err instead of being written to stdout/stderr.
+gksudo="$(which gksudo)"
+kdesu="$(which kdesu)"
+if [ -n "$gksudo" ]
+then function mysudo {
+ # gksudo allows you to specify description
+ err="$("$gksudo" --description "Second Life Viewer Updater" "$@" 2>&1)"
+ }
+elif [ -n "$kdesu" ]
+then function mysudo {
+ err="$("$kdesu" "$@" 2>&1)"
+ }
+else # couldn't find either one, just try it anyway
+ function mysudo {
+ err="$("$@" 2>&1)"
+ }
fi
-rm -f "$1"
+# Move directories, using mysudo if we think it necessary. On error, $? is
+# nonzero; output is in $err instead of being written to stdout/stderr.
+function sudo_mv {
+ # If we have write permission to both parent directories, shouldn't need
+ # sudo.
+ if [ -w "$(dirname "$1")" -a -w "$(dirname "$2")" ]
+ then err="$(mv "$@" 2>&1)"
+ else # use available sudo program; mysudo sets $? and $err
+ mysudo mv "$@"
+ fi
+}
+
+# ****************************************************************************
+# main script logic
+# ****************************************************************************
+mydir="$(dirname "$0")"
+# We happen to know that the viewer specifies a marker-file pathname within
+# the logs directory.
+logsdir="$(dirname "$markerfile")"
+logname="$logsdir/updater.log"
+
+# move aside old updater.log; we're about to create a new one
+[ -f "$logname" ] && mv "$logname" "$logname.old"
+
+# Set up redirections for this script such that stderr is logged. (But first
+# move the previous stderr to file descriptor 3.)
+exec 3>&2- 2> "$logname"
+
+# Rather than setting up a special pipeline to timestamp every line of stderr,
+# produce header lines into log file indicating timestamp and the arguments
+# with which we were invoked.
+date 1>&2
+log "$0 $*"
+
+# Log every command we execute, along with any stderr it might produce
+set -x
+
+status 'Installing Second Life...'
+
+# Creating tempdir under /tmp means it's possible that tempdir is on a
+# different filesystem than INSTALL_DIR. One is tempted to create tempdir on a
+# path derived from `dirname INSTALL_DIR` -- but it seems modern 'mv' can
+# handle moving across filesystems??
+tempdir="$(mktemp -d)"
+tempinstall="$tempdir/install"
+# capture the actual error message, if any
+err="$(mkdir -p "$tempinstall" 2>&1)" || fail "$err"
+cleanup rm -rf "$tempdir"
+
+# If we already knew the name of the tarball's top-level directory, we could
+# just move that when all was said and done. Since we don't, untarring to the
+# 'install' subdir with --strip 1 effectively renames that top-level
+# directory.
+# untar failures tend to be voluminous -- don't even try to capture, just log
+tar --strip 1 -xjf "$tarball" -C "$tempinstall" || fail "Untar command failed"
+
+INSTALL_DIR="$(cd "$mydir/.." ; pwd)"
+
+# Considering we're launched from a subdirectory of INSTALL_DIR, would be
+# surprising if it did NOT already exist...
+if [ -e "$INSTALL_DIR" ]
+then backup="$INSTALL_DIR.backup"
+ backupn=1
+ while [ -e "$backup" ]
+ do backup="$INSTALL_DIR.backup.$backupn"
+ ((backupn += 1))
+ done
+ # on error, fail with actual error message from sudo_mv: permissions,
+ # cross-filesystem mv, ...?
+ sudo_mv "$INSTALL_DIR" "$backup" || fail "$err"
+fi
+# We unpacked the tarball into tempinstall. Move that.
+if ! sudo_mv "$tempinstall" "$INSTALL_DIR"
+then # If we failed to move the temp install to INSTALL_DIR, try to restore
+ # INSTALL_DIR from backup. Save $err because next sudo_mv will trash it!
+ realerr="$err"
+ sudo_mv "$backup" "$INSTALL_DIR"
+ fail "$realerr"
+fi
+
+# Removing the tarball here, rather than with a 'cleanup' action, means we
+# only remove it if we succeeded.
+rm -f "$tarball"
+
+# Launch the updated viewer. Restore original stderr from file descriptor 3,
+# though -- otherwise updater.log gets cluttered with the viewer log!
+"$INSTALL_DIR/secondlife" 2>&3- &