aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--linden/indra/newview/Info-SecondLife.plist2
-rw-r--r--linden/indra/newview/app_settings/keywords.ini10
-rw-r--r--linden/indra/newview/fakevoicesoundsignal.cpp34
-rw-r--r--linden/indra/newview/fakevoicesoundsignal.h34
-rw-r--r--linden/indra/newview/featuretable.txt2
-rw-r--r--linden/indra/newview/featuretable_linux.txt6
-rw-r--r--linden/indra/newview/featuretable_mac.txt3
-rw-r--r--linden/indra/newview/files.lst1
-rw-r--r--linden/indra/newview/gpu_table.txt2
-rw-r--r--linden/indra/newview/linux_tools/client-readme.txt4
-rwxr-xr-xlinden/indra/newview/linux_tools/wrapper.sh10
-rw-r--r--linden/indra/newview/llagent.cpp2
-rw-r--r--linden/indra/newview/llagent.h3
-rw-r--r--linden/indra/newview/llassetuploadresponders.cpp4
-rw-r--r--linden/indra/newview/llcompilequeue.cpp6
-rw-r--r--linden/indra/newview/llcompilequeue.h6
-rw-r--r--linden/indra/newview/llconsole.cpp2
-rw-r--r--linden/indra/newview/llcontroldef.cpp16
-rw-r--r--linden/indra/newview/llcubemap.cpp17
-rw-r--r--linden/indra/newview/lldrawpool.cpp51
-rw-r--r--linden/indra/newview/lldrawpoolalpha.cpp8
-rw-r--r--linden/indra/newview/lldrawpoolbump.cpp12
-rw-r--r--linden/indra/newview/lldrawpoolwater.cpp6
-rw-r--r--linden/indra/newview/lldynamictexture.cpp21
-rw-r--r--linden/indra/newview/llfeaturemanager.cpp8
-rw-r--r--linden/indra/newview/llflexibleobject.cpp11
-rw-r--r--linden/indra/newview/llflexibleobject.h2
-rw-r--r--linden/indra/newview/llfloaterabout.cpp22
-rw-r--r--linden/indra/newview/llfloateranimpreview.h2
-rw-r--r--linden/indra/newview/llfloaterauction.cpp8
-rw-r--r--linden/indra/newview/llfloateravatarpicker.cpp46
-rw-r--r--linden/indra/newview/llfloateravatarpicker.h2
-rw-r--r--linden/indra/newview/llfloatercustomize.cpp7
-rw-r--r--linden/indra/newview/llfloatercustomize.h2
-rw-r--r--linden/indra/newview/llfloaterdirectory.cpp3
-rw-r--r--linden/indra/newview/llfloaterfriends.cpp3
-rw-r--r--linden/indra/newview/llfloaterfriends.h2
-rw-r--r--linden/indra/newview/llfloatergodtools.cpp2
-rw-r--r--linden/indra/newview/llfloatergroupinfo.cpp14
-rw-r--r--linden/indra/newview/llfloatergroupinvite.cpp7
-rw-r--r--linden/indra/newview/llfloatergroupinvite.h2
-rw-r--r--linden/indra/newview/llfloatergroups.cpp45
-rw-r--r--linden/indra/newview/llfloatergroups.h2
-rw-r--r--linden/indra/newview/llfloaterimagepreview.cpp9
-rw-r--r--linden/indra/newview/llfloaterimport.cpp2
-rw-r--r--linden/indra/newview/llfloaterimport.h2
-rw-r--r--linden/indra/newview/llfloaterinspect.cpp8
-rw-r--r--linden/indra/newview/llfloaterpostcard.cpp2
-rw-r--r--linden/indra/newview/llfloaterpostcard.h2
-rw-r--r--linden/indra/newview/llfloaterregioninfo.cpp22
-rw-r--r--linden/indra/newview/llfloaterregioninfo.h2
-rw-r--r--linden/indra/newview/llfloaterreleasemsg.cpp152
-rw-r--r--linden/indra/newview/llfloaterreleasemsg.h55
-rw-r--r--linden/indra/newview/llfloaterreporter.cpp4
-rw-r--r--linden/indra/newview/llfloaterreporter.h2
-rw-r--r--linden/indra/newview/llfloatersnapshot.cpp8
-rw-r--r--linden/indra/newview/llfloatertools.cpp18
-rw-r--r--linden/indra/newview/llfloatertos.cpp14
-rw-r--r--linden/indra/newview/llfloaterworldmap.cpp8
-rw-r--r--linden/indra/newview/llfolderview.cpp73
-rw-r--r--linden/indra/newview/llfolderview.h3
-rw-r--r--linden/indra/newview/llgesturemgr.cpp2
-rw-r--r--linden/indra/newview/llgesturemgr.h2
-rw-r--r--linden/indra/newview/llglslshader.cpp5
-rw-r--r--linden/indra/newview/llgroupnotify.cpp2
-rw-r--r--linden/indra/newview/llhudeffectlookat.cpp239
-rw-r--r--linden/indra/newview/llhudeffectlookat.h4
-rw-r--r--linden/indra/newview/llinventorybridge.cpp48
-rw-r--r--linden/indra/newview/llinventoryview.cpp4
-rw-r--r--linden/indra/newview/lllandmarklist.cpp3
-rw-r--r--linden/indra/newview/lllandmarklist.h3
-rw-r--r--linden/indra/newview/llmaniptranslate.cpp15
-rw-r--r--linden/indra/newview/llmutelist.cpp4
-rw-r--r--linden/indra/newview/llmutelist.h2
-rw-r--r--linden/indra/newview/llnotify.cpp3
-rw-r--r--linden/indra/newview/llnotify.h2
-rw-r--r--linden/indra/newview/llpanelclassified.cpp59
-rw-r--r--linden/indra/newview/llpanelclassified.h5
-rw-r--r--linden/indra/newview/llpaneldisplay.cpp10
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.cpp22
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.h2
-rw-r--r--linden/indra/newview/llpanelgroupinvite.cpp146
-rw-r--r--linden/indra/newview/llpanelgroupinvite.h8
-rw-r--r--linden/indra/newview/llpanellogin.cpp49
-rw-r--r--linden/indra/newview/llpanellogin.h2
-rw-r--r--linden/indra/newview/llpanelobject.cpp75
-rw-r--r--linden/indra/newview/llpanelobject.h7
-rw-r--r--linden/indra/newview/llprefsim.cpp2
-rw-r--r--linden/indra/newview/llprefsvoice.h80
-rw-r--r--linden/indra/newview/llpreview.cpp8
-rw-r--r--linden/indra/newview/llpreview.h2
-rw-r--r--linden/indra/newview/llpreviewgesture.cpp7
-rw-r--r--linden/indra/newview/llpreviewgesture.h4
-rw-r--r--linden/indra/newview/llpreviewnotecard.cpp4
-rw-r--r--linden/indra/newview/llpreviewnotecard.h4
-rw-r--r--linden/indra/newview/llpreviewscript.cpp46
-rw-r--r--linden/indra/newview/llpreviewscript.h16
-rw-r--r--linden/indra/newview/llspatialpartition.cpp19
-rw-r--r--linden/indra/newview/llspatialpartition.h22
-rw-r--r--linden/indra/newview/llstartup.cpp663
-rw-r--r--linden/indra/newview/llstartup.h61
-rw-r--r--linden/indra/newview/llstatusbar.cpp2
-rw-r--r--linden/indra/newview/lltexlayer.cpp2
-rw-r--r--linden/indra/newview/lltexlayer.h2
-rw-r--r--linden/indra/newview/lltexturectrl.cpp18
-rw-r--r--linden/indra/newview/lltexturectrl.h4
-rw-r--r--linden/indra/newview/lltoolgrab.cpp7
-rw-r--r--linden/indra/newview/lltoolmorph.cpp2
-rw-r--r--linden/indra/newview/lltoolpie.cpp2
-rw-r--r--linden/indra/newview/lltracker.cpp51
-rw-r--r--linden/indra/newview/lluserauth.cpp2
-rw-r--r--linden/indra/newview/llviewerassetstorage.cpp10
-rw-r--r--linden/indra/newview/llviewerassetstorage.h2
-rw-r--r--linden/indra/newview/llviewerbuild.h4
-rw-r--r--linden/indra/newview/llviewerdisplay.cpp11
-rw-r--r--linden/indra/newview/llviewerimage.cpp4
-rw-r--r--linden/indra/newview/llviewerimagelist.cpp10
-rw-r--r--linden/indra/newview/llviewerimagelist.h2
-rw-r--r--linden/indra/newview/llviewerinventory.cpp88
-rw-r--r--linden/indra/newview/llviewerinventory.h6
-rw-r--r--linden/indra/newview/llviewermenu.cpp48
-rw-r--r--linden/indra/newview/llviewermenufile.cpp2
-rw-r--r--linden/indra/newview/llviewermessage.cpp202
-rw-r--r--linden/indra/newview/llviewermessage.h3
-rw-r--r--linden/indra/newview/llviewerobject.cpp2
-rw-r--r--linden/indra/newview/llviewerobject.h2
-rw-r--r--linden/indra/newview/llviewerobjectlist.cpp40
-rw-r--r--linden/indra/newview/llviewerprecompiledheaders.h2
-rw-r--r--linden/indra/newview/llviewerregion.cpp10
-rw-r--r--linden/indra/newview/llviewertexteditor.cpp91
-rw-r--r--linden/indra/newview/llviewertexteditor.h6
-rw-r--r--linden/indra/newview/llviewerwindow.cpp20
-rw-r--r--linden/indra/newview/llvoavatar.cpp1
-rw-r--r--linden/indra/newview/llvoiceclient.cpp2
-rw-r--r--linden/indra/newview/llvoicevisualizer.cpp28
-rw-r--r--linden/indra/newview/llvoicevisualizer.h28
-rw-r--r--linden/indra/newview/llvopartgroup.cpp2
-rw-r--r--linden/indra/newview/llvosky.cpp6
-rw-r--r--linden/indra/newview/llvovolume.cpp6
-rw-r--r--linden/indra/newview/llwearable.cpp3
-rw-r--r--linden/indra/newview/llwearable.h2
-rw-r--r--linden/indra/newview/llwearablelist.cpp2
-rw-r--r--linden/indra/newview/llwearablelist.h2
-rw-r--r--linden/indra/newview/lsl_guide.html125
-rw-r--r--linden/indra/newview/macview.xcodeproj/project.pbxproj16
-rw-r--r--linden/indra/newview/newview.vcproj3
-rw-r--r--linden/indra/newview/pipeline.cpp8
-rw-r--r--linden/indra/newview/pipeline.h2
-rwxr-xr-xlinden/indra/newview/prebuild.bat22
-rw-r--r--linden/indra/newview/releasenotes.txt97
-rw-r--r--linden/indra/newview/res/newViewRes.rc8
-rw-r--r--linden/indra/newview/secondlife setup build release candidate.bat4
-rw-r--r--linden/indra/newview/skins/textures/textures.xml1
-rw-r--r--linden/indra/newview/skins/xui/en-us/alerts.xml5
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_image_preview.xml6
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_inventory.xml2
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml17
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_tools.xml29
-rw-r--r--linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml5
-rw-r--r--linden/indra/newview/skins/xui/en-us/menu_viewer.xml10
-rw-r--r--linden/indra/newview/skins/xui/en-us/notify.xml16
-rw-r--r--linden/indra/newview/skins/xui/en-us/panel_group_invite.xml31
-rw-r--r--linden/indra/newview/viewer.cpp100
-rw-r--r--linden/indra/newview/viewer.h4
-rwxr-xr-xlinden/indra/newview/viewer_manifest.py16
166 files changed, 2466 insertions, 1303 deletions
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings
index e86b0d2..e622664 100644
--- a/linden/indra/newview/English.lproj/InfoPlist.strings
+++ b/linden/indra/newview/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
1/* Localized versions of Info.plist keys */ 1/* Localized versions of Info.plist keys */
2 2
3CFBundleName = "Second Life"; 3CFBundleName = "Second Life";
4CFBundleShortVersionString = "Second Life version 1.18.2.1"; 4CFBundleShortVersionString = "Second Life version 1.18.3.2";
5CFBundleGetInfoString = "Second Life version 1.18.2.1, Copyright 2004-2007 Linden Research, Inc."; 5CFBundleGetInfoString = "Second Life version 1.18.3.2, Copyright 2004-2007 Linden Research, Inc.";
diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist
index b897a67..f4ac5c6 100644
--- a/linden/indra/newview/Info-SecondLife.plist
+++ b/linden/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
32 </dict> 32 </dict>
33 </array> 33 </array>
34 <key>CFBundleVersion</key> 34 <key>CFBundleVersion</key>
35 <string>1.18.2.1</string> 35 <string>1.18.3.2</string>
36 <key>CSResourcesFileMapped</key> 36 <key>CSResourcesFileMapped</key>
37 <true/> 37 <true/>
38</dict> 38</dict>
diff --git a/linden/indra/newview/app_settings/keywords.ini b/linden/indra/newview/app_settings/keywords.ini
index c7f8426..4496ee7 100644
--- a/linden/indra/newview/app_settings/keywords.ini
+++ b/linden/indra/newview/app_settings/keywords.ini
@@ -149,6 +149,16 @@ PSYS_SRC_PATTERN_ANGLE
149PSYS_SRC_PATTERN_ANGLE_CONE 149PSYS_SRC_PATTERN_ANGLE_CONE
150PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY 150PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
151 151
152OBJECT_UNKOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type.
153OBJECT_NAME Used with llGetObjectDetails to get an object's name.
154OBJECT_DESC Used with llGetObjectDetails to get an object's description.
155OBJECT_POS Used with llGetObjectDetails to get an object's position.
156OBJECT_ROT Used with llGetObjectDetails to get an object's rotation.
157OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity.
158OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned.
159OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key.
160OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key.
161
152# some vehicle params 162# some vehicle params
153VEHICLE_TYPE_NONE 163VEHICLE_TYPE_NONE
154VEHICLE_TYPE_SLED 164VEHICLE_TYPE_SLED
diff --git a/linden/indra/newview/fakevoicesoundsignal.cpp b/linden/indra/newview/fakevoicesoundsignal.cpp
index 2a271ad..0cb5c11 100644
--- a/linden/indra/newview/fakevoicesoundsignal.cpp
+++ b/linden/indra/newview/fakevoicesoundsignal.cpp
@@ -1,8 +1,32 @@
1//---------------------------------------------------------------------- 1/**
2// Fake Voice Sound Signal 2 * @file fakevoicesoundsignal.cpp
3// author: JJ Ventrella 3 * @brief Fake Voice Sound Signal
4// THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY 4 * author: JJ Ventrella
5//---------------------------------------------------------------------- 5 * THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
6 *
7 * Copyright (c) 2000-2007, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 */
6 30
7#include "llviewerprecompiledheaders.h" 31#include "llviewerprecompiledheaders.h"
8#include "fakevoicesoundsignal.h" 32#include "fakevoicesoundsignal.h"
diff --git a/linden/indra/newview/fakevoicesoundsignal.h b/linden/indra/newview/fakevoicesoundsignal.h
index 9e0132c..a10d9fe 100644
--- a/linden/indra/newview/fakevoicesoundsignal.h
+++ b/linden/indra/newview/fakevoicesoundsignal.h
@@ -1,8 +1,32 @@
1//-------------------------------------------------------------------- 1/**
2// Fake Voice Sound Signal 2 * @file fakevoicesoundsignal.h
3// author: JJ Ventrella 3 * @brief Fake Voice Sound Signal
4// THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY 4 * author: JJ Ventrella
5//----------------------------------------------------------------------------- 5 * THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
6 *
7 * Copyright (c) 2000-2007, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 */
6#ifndef FAKE_VOICE_SOUND_SIGNAL_H 30#ifndef FAKE_VOICE_SOUND_SIGNAL_H
7#define FAKE_VOICE_SOUND_SIGNAL_H 31#define FAKE_VOICE_SOUND_SIGNAL_H
8 32
diff --git a/linden/indra/newview/featuretable.txt b/linden/indra/newview/featuretable.txt
index 28b1ddc..f98b42b 100644
--- a/linden/indra/newview/featuretable.txt
+++ b/linden/indra/newview/featuretable.txt
@@ -34,6 +34,8 @@ RenderParticleCount 1 4096
34RenderRippleWater 1 1 34RenderRippleWater 1 1
35RenderTerrainDetail 1 2 35RenderTerrainDetail 1 2
36VertexShaderEnable 1 1 36VertexShaderEnable 1 1
37UseOcclusion 1 1
38RenderCubeMap 1 1
37 39
38// 40//
39// Class 0 Hardware (Unknown or just old) 41// Class 0 Hardware (Unknown or just old)
diff --git a/linden/indra/newview/featuretable_linux.txt b/linden/indra/newview/featuretable_linux.txt
index 6c7acfa..f31fc0d 100644
--- a/linden/indra/newview/featuretable_linux.txt
+++ b/linden/indra/newview/featuretable_linux.txt
@@ -34,6 +34,8 @@ RenderParticleCount 1 4096
34RenderRippleWater 1 1 34RenderRippleWater 1 1
35RenderTerrainDetail 1 2 35RenderTerrainDetail 1 2
36VertexShaderEnable 1 1 36VertexShaderEnable 1 1
37UseOcclusion 1 1
38RenderCubeMap 1 1
37 39
38// 40//
39// Class 0 Hardware (Unknown or just old) 41// Class 0 Hardware (Unknown or just old)
@@ -107,6 +109,8 @@ RenderAvatarVP 0 0
107RenderLighting 1 0 109RenderLighting 1 0
108RenderParticleCount 1 1024 110RenderParticleCount 1 1024
109RenderTerrainDetail 1 0 111RenderTerrainDetail 1 0
112RenderCubeMap 0 0
113UseOcclusion 0 0
110 114
111 115
112list low 116list low
@@ -145,6 +149,7 @@ RenderVBO 1 0
145RenderAniso 1 0 149RenderAniso 1 0
146RenderLighting 1 0 150RenderLighting 1 0
147RenderTerrainDetail 1 0 151RenderTerrainDetail 1 0
152RenderCubeMap 0 0
148 153
149list GeForce2 154list GeForce2
150RenderVBO 1 1 155RenderVBO 1 1
@@ -156,6 +161,7 @@ RenderTerrainDetail 1 0
156list GeForce3 161list GeForce3
157 162
158list ATI 163list ATI
164UseOcclusion 0 0
159 165
160list Radeon8500 166list Radeon8500
161RenderLighting 1 0 167RenderLighting 1 0
diff --git a/linden/indra/newview/featuretable_mac.txt b/linden/indra/newview/featuretable_mac.txt
index 2685e3b..fe5ae7a 100644
--- a/linden/indra/newview/featuretable_mac.txt
+++ b/linden/indra/newview/featuretable_mac.txt
@@ -35,7 +35,8 @@ RenderParticleCount 1 4096
35RenderRippleWater 1 1 35RenderRippleWater 1 1
36RenderTerrainDetail 1 2 36RenderTerrainDetail 1 2
37VertexShaderEnable 1 1 37VertexShaderEnable 1 1
38 38UseOcclusion 1 1
39RenderCubeMap 1 1
39 40
40// 41//
41// Class 0 Hardware (Unknown or just old) 42// Class 0 Hardware (Unknown or just old)
diff --git a/linden/indra/newview/files.lst b/linden/indra/newview/files.lst
index a5c348c..52372b3 100644
--- a/linden/indra/newview/files.lst
+++ b/linden/indra/newview/files.lst
@@ -97,6 +97,7 @@ newview/llfloaterpermissionsmgr.cpp
97newview/llfloaterpostcard.cpp 97newview/llfloaterpostcard.cpp
98newview/llfloaterpreference.cpp 98newview/llfloaterpreference.cpp
99newview/llfloaterproperties.cpp 99newview/llfloaterproperties.cpp
100newview/llfloaterreleasemsg.cpp
100newview/llfloaterregioninfo.cpp 101newview/llfloaterregioninfo.cpp
101newview/llfloaterreporter.cpp 102newview/llfloaterreporter.cpp
102newview/llfloatersaveavatar.cpp 103newview/llfloatersaveavatar.cpp
diff --git a/linden/indra/newview/gpu_table.txt b/linden/indra/newview/gpu_table.txt
index 74fbe2c..066990b 100644
--- a/linden/indra/newview/gpu_table.txt
+++ b/linden/indra/newview/gpu_table.txt
@@ -25,6 +25,8 @@ ATI Mobility Radeon X1xxx .*ATI.*Mobility.*X1.* 2
25ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1 25ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1
26ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1 26ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1
27ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1 27ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1
28ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 1
29ATI Mobility Radeon .*ATI.*Mobility.* 0
28ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 3 30ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 3
29ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3 31ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3
30ATI FireGL 5xxx .*ATI.*FireGL V5.* 3 32ATI FireGL 5xxx .*ATI.*FireGL V5.* 3
diff --git a/linden/indra/newview/linux_tools/client-readme.txt b/linden/indra/newview/linux_tools/client-readme.txt
index e07384c..59ebf67 100644
--- a/linden/indra/newview/linux_tools/client-readme.txt
+++ b/linden/indra/newview/linux_tools/client-readme.txt
@@ -97,6 +97,10 @@ you wish.
97These are the most commonly-encountered known issues which are specific to 97These are the most commonly-encountered known issues which are specific to
98the Alpha release of the Linux client. 98the Alpha release of the Linux client.
99 99
100* VOICE COMMUNICATION - this is not yet available in the Linux client.
101
102* STREAMING MOVIES - these are currently disabled while we work on some issues.
103
100* VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as 104* VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as
101 robust as their counterparts for other operating systems, so some advanced 105 robust as their counterparts for other operating systems, so some advanced
102 Second Life graphical features have been DISABLED by default to aid 106 Second Life graphical features have been DISABLED by default to aid
diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh
index d39fc3a..9adc4d3 100755
--- a/linden/indra/newview/linux_tools/wrapper.sh
+++ b/linden/indra/newview/linux_tools/wrapper.sh
@@ -43,6 +43,9 @@ export LL_GL_BASICEXT=x
43## - Avoids an often-buggy X feature that doesn't really benefit us anyway. 43## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
44export SDL_VIDEO_X11_DGAMOUSE=0 44export SDL_VIDEO_X11_DGAMOUSE=0
45 45
46## - Works around a problem with misconfigured 64-bit systems not finding GL
47export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}":/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri
48
46## Nothing worth editing below this line. 49## Nothing worth editing below this line.
47##------------------------------------------------------------------- 50##-------------------------------------------------------------------
48 51
@@ -65,7 +68,12 @@ if [ -n "$LL_TCMALLOC" ]; then
65 fi 68 fi
66 fi 69 fi
67fi 70fi
68LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}" $LL_WRAPPER bin/do-not-directly-run-secondlife-bin `cat gridargs.dat` $@ | cat 71
72export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"'
73export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-secondlife-bin'
74export SL_OPT="`cat gridargs.dat` $@"
75
76eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || echo Unclean shutdown.
69 77
70echo 78echo
71echo '*********************************************************' 79echo '*********************************************************'
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index 3f6ab4f..bf54472 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -5612,7 +5612,7 @@ void LLAgent::teleportCancel()
5612 sendReliableMessage(); 5612 sendReliableMessage();
5613 } 5613 }
5614 gTeleportDisplay = FALSE; 5614 gTeleportDisplay = FALSE;
5615 gAgent.setTeleportState( LLAgent::TELEPORT_CANCELLING ); 5615 gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
5616} 5616}
5617 5617
5618 5618
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h
index 7fb4571..9c53fe1 100644
--- a/linden/indra/newview/llagent.h
+++ b/linden/indra/newview/llagent.h
@@ -529,8 +529,7 @@ public:
529 TELEPORT_REQUESTED = 2, // Waiting for source simulator to respond 529 TELEPORT_REQUESTED = 2, // Waiting for source simulator to respond
530 TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator 530 TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator
531 TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator 531 TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator
532 TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches" 532 TELEPORT_ARRIVING = 5 // Make the user wait while content "pre-caches"
533 TELEPORT_CANCELLING = 6 // used only if user clicks "cancel" button
534 }; 533 };
535 534
536 ETeleportState getTeleportState() const { return mTeleportState; } 535 ETeleportState getTeleportState() const { return mTeleportState; }
diff --git a/linden/indra/newview/llassetuploadresponders.cpp b/linden/indra/newview/llassetuploadresponders.cpp
index 1d6e27d..efe71e1 100644
--- a/linden/indra/newview/llassetuploadresponders.cpp
+++ b/linden/indra/newview/llassetuploadresponders.cpp
@@ -95,8 +95,8 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason)
95 { 95 {
96 case 400: 96 case 400:
97 args["[FILE]"] = (mFileName.empty() ? mVFileID.asString() : mFileName); 97 args["[FILE]"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
98 args["[REASON]"] = "Error in upload request. Please contact " 98 args["[REASON]"] = "Error in upload request. Please visit "
99 "support@lindenlab.com for help fixing this problem."; 99 "http://secondlife.com/support for help fixing this problem.";
100 gViewerWindow->alertXml("CannotUploadReason", args); 100 gViewerWindow->alertXml("CannotUploadReason", args);
101 break; 101 break;
102 case 500: 102 case 500:
diff --git a/linden/indra/newview/llcompilequeue.cpp b/linden/indra/newview/llcompilequeue.cpp
index 12b52c4..2bd2f2d 100644
--- a/linden/indra/newview/llcompilequeue.cpp
+++ b/linden/indra/newview/llcompilequeue.cpp
@@ -366,7 +366,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
366// static 366// static
367void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, 367void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
368 LLAssetType::EType type, 368 LLAssetType::EType type,
369 void* user_data, S32 status) 369 void* user_data, S32 status, LLExtStat ext_status)
370{ 370{
371 llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl; 371 llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl;
372 LLScriptQueueData* data = (LLScriptQueueData*)user_data; 372 LLScriptQueueData* data = (LLScriptQueueData*)user_data;
@@ -449,7 +449,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
449} 449}
450 450
451// static 451// static
452void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) 452void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
453{ 453{
454 llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl; 454 llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl;
455 if (status) 455 if (status)
@@ -462,7 +462,7 @@ void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* use
462} 462}
463 463
464// static 464// static
465void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) 465void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
466{ 466{
467 llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl; 467 llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl;
468 LLCompileQueueData* data = (LLCompileQueueData*)user_data; 468 LLCompileQueueData* data = (LLCompileQueueData*)user_data;
diff --git a/linden/indra/newview/llcompilequeue.h b/linden/indra/newview/llcompilequeue.h
index c28b92c..cbff4cb 100644
--- a/linden/indra/newview/llcompilequeue.h
+++ b/linden/indra/newview/llcompilequeue.h
@@ -133,12 +133,12 @@ protected:
133 // This is the callback for when each script arrives 133 // This is the callback for when each script arrives
134 static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id, 134 static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
135 LLAssetType::EType type, 135 LLAssetType::EType type,
136 void* user_data, S32 status); 136 void* user_data, S32 status, LLExtStat ext_status);
137 137
138 static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status); 138 static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status);
139 static void onSaveBytecodeComplete(const LLUUID& asset_id, 139 static void onSaveBytecodeComplete(const LLUUID& asset_id,
140 void* user_data, 140 void* user_data,
141 S32 status); 141 S32 status, LLExtStat ext_status);
142 142
143 // compile the file given and save it out. 143 // compile the file given and save it out.
144 void compile(const char* filename, const LLUUID& asset_id); 144 void compile(const char* filename, const LLUUID& asset_id);
diff --git a/linden/indra/newview/llconsole.cpp b/linden/indra/newview/llconsole.cpp
index 112f8ab..47d239f 100644
--- a/linden/indra/newview/llconsole.cpp
+++ b/linden/indra/newview/llconsole.cpp
@@ -124,7 +124,7 @@ void LLConsole::draw()
124 // skip lines added more than mLinePersistTime ago 124 // skip lines added more than mLinePersistTime ago
125 F32 cur_time = mTimer.getElapsedTimeF32(); 125 F32 cur_time = mTimer.getElapsedTimeF32();
126 126
127 if( gStartupState != STATE_STARTED ) 127 if( LLStartUp::getStartupState() != STATE_STARTED )
128 { 128 {
129 S32 count = mLines.size(); 129 S32 count = mLines.size();
130 S32 i = 0; 130 S32 i = 0;
diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp
index dffaa36..351f437 100644
--- a/linden/indra/newview/llcontroldef.cpp
+++ b/linden/indra/newview/llcontroldef.cpp
@@ -49,6 +49,7 @@
49#include "llconsole.h" 49#include "llconsole.h"
50#include "lldrawpoolterrain.h" 50#include "lldrawpoolterrain.h"
51#include "llflexibleobject.h" 51#include "llflexibleobject.h"
52#include "llfeaturemanager.h"
52#include "llglslshader.h" 53#include "llglslshader.h"
53#include "llmediaengine.h" 54#include "llmediaengine.h"
54#include "llpanelgeneral.h" 55#include "llpanelgeneral.h"
@@ -356,7 +357,7 @@ void declare_settings()
356 gSavedSettings.declareBOOL("ShowPropertyLines", FALSE, "Show line overlay demarking property boundaries"); 357 gSavedSettings.declareBOOL("ShowPropertyLines", FALSE, "Show line overlay demarking property boundaries");
357 gSavedSettings.declareBOOL("ShowParcelOwners", FALSE, "", NO_PERSIST); 358 gSavedSettings.declareBOOL("ShowParcelOwners", FALSE, "", NO_PERSIST);
358 gSavedSettings.declareBOOL("ToolboxAutoMove", FALSE, "[NOT USED]"); 359 gSavedSettings.declareBOOL("ToolboxAutoMove", FALSE, "[NOT USED]");
359 gSavedSettings.declareBOOL("ToolboxShowMore", FALSE, "", NO_PERSIST); 360 gSavedSettings.declareBOOL("ToolboxShowMore", TRUE, "Whether to show additional build tool controls", TRUE);
360 361
361 gSavedSettings.declareRect("ToolboxRect", LLRect(0, 100, 100, 100), "Rectangle for tools window" ); // only care about position 362 gSavedSettings.declareRect("ToolboxRect", LLRect(0, 100, 100, 100), "Rectangle for tools window" ); // only care about position
362 363
@@ -379,7 +380,7 @@ void declare_settings()
379 380
380 gSavedSettings.declareS32("LastPrefTab", 0, "Last selected tab in preferences window"); 381 gSavedSettings.declareS32("LastPrefTab", 0, "Last selected tab in preferences window");
381 382
382 gSavedSettings.declareString("LSLHelpURL", "http://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); 383 gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword");
383 // link for editable wiki (https doesn't seem to work right now with our embedded browser) 384 // link for editable wiki (https doesn't seem to work right now with our embedded browser)
384 //gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword"); 385 //gSavedSettings.declareString("LSLHelpURL", "https://wiki.secondlife.com/wiki/[LSL_STRING]", "URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword");
385 // Wearable default images 386 // Wearable default images
@@ -846,6 +847,9 @@ void declare_settings()
846 //gSavedSettings.declareU32("LastRAMDetected", 0, "[DO NOT MODIFY] Detected system memory (bytes)"); // used to detect RAM changes 847 //gSavedSettings.declareU32("LastRAMDetected", 0, "[DO NOT MODIFY] Detected system memory (bytes)"); // used to detect RAM changes
847 gSavedSettings.declareBOOL("ImagePipelineUseHTTP", FALSE, "If TRUE use HTTP GET to fetch textures from the server"); 848 gSavedSettings.declareBOOL("ImagePipelineUseHTTP", FALSE, "If TRUE use HTTP GET to fetch textures from the server");
848 849
850 // Image compression
851 gSavedSettings.declareBOOL("LosslessJ2CUpload", FALSE, "Use lossless compression for small image uploads");
852
849 // Threading 853 // Threading
850 gSavedSettings.declareBOOL("RunMultipleThreads", FALSE, "If TRUE keep background threads active during render"); 854 gSavedSettings.declareBOOL("RunMultipleThreads", FALSE, "If TRUE keep background threads active during render");
851 855
@@ -1108,6 +1112,10 @@ void declare_settings()
1108 1112
1109 // HTML dialog (general purpose) 1113 // HTML dialog (general purpose)
1110 gSavedSettings.declareRect("HtmlFloaterRect", LLRect(100,460,370,100), "Rectangle for HTML Floater window"); 1114 gSavedSettings.declareRect("HtmlFloaterRect", LLRect(100,460,370,100), "Rectangle for HTML Floater window");
1115
1116 // HTML sim release message floater
1117 gSavedSettings.declareRect("HtmlReleaseMessage", LLRect(46,520,400,128), "Rectangle for HTML Release Message Floater window");
1118
1111 1119
1112 // HTML help 1120 // HTML help
1113 gSavedSettings.declareString("HtmlHelpLastPage", "", "Last URL visited via help system"); 1121 gSavedSettings.declareString("HtmlHelpLastPage", "", "Last URL visited via help system");
@@ -1810,8 +1818,8 @@ class LLUseOcclusionListener: public LLSimpleListener
1810{ 1818{
1811 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 1819 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
1812 { 1820 {
1813 LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery && 1821 LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery
1814 !gUseWireframe); 1822 && gFeatureManagerp->isFeatureAvailable("UseOcclusion") && !gUseWireframe);
1815 return true; 1823 return true;
1816 } 1824 }
1817}; 1825};
diff --git a/linden/indra/newview/llcubemap.cpp b/linden/indra/newview/llcubemap.cpp
index 74af3da..ff8f7c3 100644
--- a/linden/indra/newview/llcubemap.cpp
+++ b/linden/indra/newview/llcubemap.cpp
@@ -27,6 +27,7 @@
27 */ 27 */
28 28
29#include "llviewerprecompiledheaders.h" 29#include "llviewerprecompiledheaders.h"
30#include "llfeaturemanager.h"
30#include "llworkerthread.h" 31#include "llworkerthread.h"
31 32
32#include "llcubemap.h" 33#include "llcubemap.h"
@@ -65,7 +66,8 @@ void LLCubeMap::initGL()
65{ 66{
66 llassert(gGLManager.mInited); 67 llassert(gGLManager.mInited);
67 68
68 if (gGLManager.mHasCubeMap) 69 if (gGLManager.mHasCubeMap
70 && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
69 { 71 {
70 mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; 72 mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB;
71 mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; 73 mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB;
@@ -174,7 +176,9 @@ GLuint LLCubeMap::getGLName()
174 176
175void LLCubeMap::bind() 177void LLCubeMap::bind()
176{ 178{
177 if (gGLManager.mHasCubeMap) 179 if (gGLManager.mHasCubeMap
180 //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
181 )
178 { 182 {
179 // We assume that if they have cube mapping, they have multitexturing. 183 // We assume that if they have cube mapping, they have multitexturing.
180 glEnable(GL_TEXTURE_CUBE_MAP_ARB); 184 glEnable(GL_TEXTURE_CUBE_MAP_ARB);
@@ -192,7 +196,10 @@ void LLCubeMap::bind()
192void LLCubeMap::enable(S32 stage) 196void LLCubeMap::enable(S32 stage)
193{ 197{
194 mTextureStage = stage; 198 mTextureStage = stage;
195 if (gGLManager.mHasCubeMap && stage >= 0) 199 if (gGLManager.mHasCubeMap &&
200 stage >= 0
201 //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
202 )
196 { 203 {
197 glActiveTextureARB(GL_TEXTURE0_ARB + stage); // NOTE: leaves texture stage set 204 glActiveTextureARB(GL_TEXTURE0_ARB + stage); // NOTE: leaves texture stage set
198 205
@@ -209,7 +216,9 @@ void LLCubeMap::enable(S32 stage)
209 216
210void LLCubeMap::disable() 217void LLCubeMap::disable()
211{ 218{
212 if (gGLManager.mHasCubeMap && mTextureStage >= 0) 219 if (gGLManager.mHasCubeMap && mTextureStage >= 0
220 //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
221 )
213 { 222 {
214 glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage); 223 glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage);
215 glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0); 224 glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, 0);
diff --git a/linden/indra/newview/lldrawpool.cpp b/linden/indra/newview/lldrawpool.cpp
index 0ab5b54..f1feb4a 100644
--- a/linden/indra/newview/lldrawpool.cpp
+++ b/linden/indra/newview/lldrawpool.cpp
@@ -469,12 +469,14 @@ LLDrawPool* LLRenderPass::instancePool()
469 469
470void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture) 470void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture)
471{ 471{
472 std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; 472 LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
473 473
474 for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) 474 for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
475 { 475 {
476 LLDrawInfo& params = **k; 476 LLDrawInfo *pparams = *k;
477 pushBatch(params, mask, texture); 477 if (pparams) {
478 pushBatch(*pparams, mask, texture);
479 }
478 } 480 }
479} 481}
480 482
@@ -484,14 +486,15 @@ void LLRenderPass::renderInvisible(U32 mask)
484 LLGLState::checkClientArrays(mask); 486 LLGLState::checkClientArrays(mask);
485#endif 487#endif
486 488
487 std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE]; 489 LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
488 490
489 for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i) 491 for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
490 { 492 {
491 LLDrawInfo& params = **i; 493
494 LLDrawInfo *pparams = *i;
495 if (pparams && pparams->mVertexBuffer.notNull()) {
496 LLDrawInfo &params = *pparams;
492 497
493 if (params.mVertexBuffer)
494 {
495 params.mVertexBuffer->setBuffer(mask); 498 params.mVertexBuffer->setBuffer(mask);
496 U32 *indices_pointer = 499 U32 *indices_pointer =
497 (U32 *) params.mVertexBuffer->getIndicesPointer(); 500 (U32 *) params.mVertexBuffer->getIndicesPointer();
@@ -509,22 +512,19 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
509 LLGLState::checkClientArrays(mask); 512 LLGLState::checkClientArrays(mask);
510#endif 513#endif
511 514
512 std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type]; 515 LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
513 516
514 for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i) 517 for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
515 { 518 {
516 LLDrawInfo& params = **i; 519 LLDrawInfo* pparams = *i;
517 pushBatch(params, mask, TRUE); 520 if (pparams) {
521 pushBatch(*pparams, mask, TRUE);
522 }
518 } 523 }
519} 524}
520 525
521void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) 526void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
522{ 527{
523 if (params.mVertexBuffer.isNull())
524 {
525 return;
526 }
527
528 if (texture) 528 if (texture)
529 { 529 {
530 if (params.mTexture.notNull()) 530 if (params.mTexture.notNull())
@@ -542,12 +542,15 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
542 LLImageGL::unbindTexture(0); 542 LLImageGL::unbindTexture(0);
543 } 543 }
544 } 544 }
545 545
546 params.mVertexBuffer->setBuffer(mask); 546 if (params.mVertexBuffer.notNull())
547 U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer(); 547 {
548 glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount, 548 params.mVertexBuffer->setBuffer(mask);
549 GL_UNSIGNED_INT, indices_pointer+params.mOffset); 549 U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
550 gPipeline.mTrianglesDrawn += params.mCount/3; 550 glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
551 GL_UNSIGNED_INT, indices_pointer+params.mOffset);
552 gPipeline.mTrianglesDrawn += params.mCount/3;
553 }
551 554
552 if (params.mTextureMatrix && texture && params.mTexture.notNull()) 555 if (params.mTextureMatrix && texture && params.mTexture.notNull())
553 { 556 {
diff --git a/linden/indra/newview/lldrawpoolalpha.cpp b/linden/indra/newview/lldrawpoolalpha.cpp
index 8866c1e..a502580 100644
--- a/linden/indra/newview/lldrawpoolalpha.cpp
+++ b/linden/indra/newview/lldrawpoolalpha.cpp
@@ -219,9 +219,9 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask, std::vector<LLSpatialGroup*
219 last_part = part; 219 last_part = part;
220 } 220 }
221 221
222 std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA]; 222 LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
223 223
224 for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) 224 for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
225 { 225 {
226 LLDrawInfo& params = **k; 226 LLDrawInfo& params = **k;
227 227
@@ -245,7 +245,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
245{ 245{
246 BOOL light_enabled = TRUE; 246 BOOL light_enabled = TRUE;
247 247
248 std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; 248 LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
249 249
250 U32 prim_type = GL_TRIANGLES; 250 U32 prim_type = GL_TRIANGLES;
251 251
@@ -272,7 +272,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
272 glPointSize(width/(view*view)); 272 glPointSize(width/(view*view));
273 }*/ 273 }*/
274 274
275 for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) 275 for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
276 { 276 {
277 LLDrawInfo& params = **k; 277 LLDrawInfo& params = **k;
278 if (texture && params.mTexture.notNull()) 278 if (texture && params.mTexture.notNull())
diff --git a/linden/indra/newview/lldrawpoolbump.cpp b/linden/indra/newview/lldrawpoolbump.cpp
index b0b8b02..a78dc94 100644
--- a/linden/indra/newview/lldrawpoolbump.cpp
+++ b/linden/indra/newview/lldrawpoolbump.cpp
@@ -350,9 +350,9 @@ void LLDrawPoolBump::renderActive(U32 type, U32 mask, BOOL texture)
350 350
351void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE) 351void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE)
352{ 352{
353 std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; 353 LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
354 354
355 for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) 355 for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
356 { 356 {
357 LLDrawInfo& params = **k; 357 LLDrawInfo& params = **k;
358 if (LLPipeline::sDynamicReflections) 358 if (LLPipeline::sDynamicReflections)
@@ -899,9 +899,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
899 LLGLState::checkClientArrays(mask); 899 LLGLState::checkClientArrays(mask);
900#endif 900#endif
901 901
902 std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type]; 902 LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
903 903
904 for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i) 904 for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
905 { 905 {
906 LLDrawInfo& params = **i; 906 LLDrawInfo& params = **i;
907 907
@@ -914,9 +914,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
914 914
915void LLDrawPoolBump::renderGroupBump(LLSpatialGroup* group, U32 type, U32 mask) 915void LLDrawPoolBump::renderGroupBump(LLSpatialGroup* group, U32 type, U32 mask)
916{ 916{
917 const std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type]; 917 LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
918 918
919 for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k) 919 for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
920 { 920 {
921 LLDrawInfo& params = **k; 921 LLDrawInfo& params = **k;
922 922
diff --git a/linden/indra/newview/lldrawpoolwater.cpp b/linden/indra/newview/lldrawpoolwater.cpp
index 100eb43..035cb56 100644
--- a/linden/indra/newview/lldrawpoolwater.cpp
+++ b/linden/indra/newview/lldrawpoolwater.cpp
@@ -92,8 +92,8 @@ LLDrawPool *LLDrawPoolWater::instancePool()
92 92
93void LLDrawPoolWater::prerender() 93void LLDrawPoolWater::prerender()
94{ 94{
95 mVertexShaderLevel = gSavedSettings.getBOOL("RenderRippleWater") ? 95 mVertexShaderLevel = (gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) ?
96 LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0; 96 LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0;
97 97
98} 98}
99 99
@@ -565,7 +565,7 @@ void LLDrawPoolWater::shade()
565 LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap(); 565 LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap();
566 566
567 gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB); 567 gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB);
568 skyMap->bind(); 568 skyMap->bind();
569 569
570 //bind normal map 570 //bind normal map
571 S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP); 571 S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP);
diff --git a/linden/indra/newview/lldynamictexture.cpp b/linden/indra/newview/lldynamictexture.cpp
index 4944415..57f4def 100644
--- a/linden/indra/newview/lldynamictexture.cpp
+++ b/linden/indra/newview/lldynamictexture.cpp
@@ -205,8 +205,6 @@ BOOL LLDynamicTexture::updateAllInstances()
205 return TRUE; 205 return TRUE;
206 } 206 }
207 207
208 BOOL started = FALSE;
209
210 BOOL result = FALSE; 208 BOOL result = FALSE;
211 for( S32 order = 0; order < ORDER_COUNT; order++ ) 209 for( S32 order = 0; order < ORDER_COUNT; order++ )
212 { 210 {
@@ -215,29 +213,22 @@ BOOL LLDynamicTexture::updateAllInstances()
215 dynamicTexture = LLDynamicTexture::sInstances[order].getNextData()) 213 dynamicTexture = LLDynamicTexture::sInstances[order].getNextData())
216 { 214 {
217 if (dynamicTexture->needsRender()) 215 if (dynamicTexture->needsRender())
218 { 216 {
219 if (!started) 217 dynamicTexture->preRender(); // Must be called outside of startRender()
220 { 218
221 started = TRUE; 219 LLVertexBuffer::startRender();
222 LLVertexBuffer::startRender();
223 }
224
225 dynamicTexture->preRender();
226 if (dynamicTexture->render()) 220 if (dynamicTexture->render())
227 { 221 {
228 result = TRUE; 222 result = TRUE;
229 sNumRenders++; 223 sNumRenders++;
230 } 224 }
225 LLVertexBuffer::stopRender();
226
231 dynamicTexture->postRender(result); 227 dynamicTexture->postRender(result);
232 } 228 }
233 } 229 }
234 } 230 }
235 231
236 if (started)
237 {
238 LLVertexBuffer::stopRender();
239 }
240
241 return result; 232 return result;
242} 233}
243 234
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp
index 8bcbc1e..93450b4 100644
--- a/linden/indra/newview/llfeaturemanager.cpp
+++ b/linden/indra/newview/llfeaturemanager.cpp
@@ -402,7 +402,7 @@ void LLFeatureManager::cleanupFeatureTables()
402 402
403void LLFeatureManager::initCPUFeatureMasks() 403void LLFeatureManager::initCPUFeatureMasks()
404{ 404{
405 if (gSysMemory.getPhysicalMemory() <= 256*1024*1024) 405 if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024)
406 { 406 {
407 maskFeatures("RAM256MB"); 407 maskFeatures("RAM256MB");
408 } 408 }
@@ -494,7 +494,7 @@ extern LLOSInfo gSysOS;
494 494
495void LLFeatureManager::applyRecommendedFeatures() 495void LLFeatureManager::applyRecommendedFeatures()
496{ 496{
497 // see featuretable.txt 497 // see featuretable.txt / featuretable_linux.txt / featuretable_mac.txt
498 498
499 llinfos << "Applying Recommended Features" << llendl; 499 llinfos << "Applying Recommended Features" << llendl;
500#ifndef LL_RELEASE_FOR_DOWNLOAD 500#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -544,6 +544,10 @@ void LLFeatureManager::applyRecommendedFeatures()
544 // RippleWater 544 // RippleWater
545 BOOL ripple = getRecommendedLevel("RenderRippleWater"); 545 BOOL ripple = getRecommendedLevel("RenderRippleWater");
546 gSavedSettings.setBOOL("RenderRippleWater", ripple); 546 gSavedSettings.setBOOL("RenderRippleWater", ripple);
547
548 // Occlusion Culling
549 BOOL occlusion = getRecommendedLevel("UseOcclusion");
550 gSavedSettings.setBOOL("UseOcclusion", occlusion);
547 551
548 // Vertex Shaders 552 // Vertex Shaders
549 S32 shaders = getRecommendedLevel("VertexShaderEnable"); 553 S32 shaders = getRecommendedLevel("VertexShaderEnable");
diff --git a/linden/indra/newview/llflexibleobject.cpp b/linden/indra/newview/llflexibleobject.cpp
index 836cfdc..454b40f 100644
--- a/linden/indra/newview/llflexibleobject.cpp
+++ b/linden/indra/newview/llflexibleobject.cpp
@@ -643,6 +643,15 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
643 volume->updateRelativeXform(); 643 volume->updateRelativeXform();
644 doFlexibleUpdate(); 644 doFlexibleUpdate();
645 645
646 // Object may have been rotated, which means it needs a rebuild. See SL-47220
647 BOOL rotated = FALSE;
648 LLQuaternion cur_rotation = getFrameRotation();
649 if ( cur_rotation != mLastFrameRotation )
650 {
651 mLastFrameRotation = cur_rotation;
652 rotated = TRUE;
653 }
654
646 if (volume->mLODChanged || volume->mFaceMappingChanged || 655 if (volume->mLODChanged || volume->mFaceMappingChanged ||
647 volume->mVolumeChanged) 656 volume->mVolumeChanged)
648 { 657 {
@@ -650,7 +659,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
650 volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME); 659 volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME);
651 } 660 }
652 661
653 if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged) 662 if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged || rotated)
654 { 663 {
655 doFlexibleRebuild(); 664 doFlexibleRebuild();
656 volume->genBBoxes(isVolumeGlobal()); 665 volume->genBBoxes(isVolumeGlobal());
diff --git a/linden/indra/newview/llflexibleobject.h b/linden/indra/newview/llflexibleobject.h
index f3da5bb..df2e4ac 100644
--- a/linden/indra/newview/llflexibleobject.h
+++ b/linden/indra/newview/llflexibleobject.h
@@ -117,7 +117,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
117 LLVector3 mAnchorPosition; 117 LLVector3 mAnchorPosition;
118 LLVector3 mParentPosition; 118 LLVector3 mParentPosition;
119 LLQuaternion mParentRotation; 119 LLQuaternion mParentRotation;
120 LLQuaternion mInitialAxisRotation; 120 LLQuaternion mLastFrameRotation;
121 LLQuaternion mLastSegmentRotation; 121 LLQuaternion mLastSegmentRotation;
122 BOOL mInitialized; 122 BOOL mInitialized;
123 BOOL mUpdated; 123 BOOL mUpdated;
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp
index cc3bb08..b259455 100644
--- a/linden/indra/newview/llfloaterabout.cpp
+++ b/linden/indra/newview/llfloaterabout.cpp
@@ -41,7 +41,7 @@
41#include "llagent.h" 41#include "llagent.h"
42#include "llviewerstats.h" 42#include "llviewerstats.h"
43#include "llviewerregion.h" 43#include "llviewerregion.h"
44#include "llversion.h" 44#include "llversionviewer.h"
45#include "llviewerbuild.h" 45#include "llviewerbuild.h"
46#include "llvieweruictrlfactory.h" 46#include "llvieweruictrlfactory.h"
47#include "viewer.h" // for gViewerDigest 47#include "viewer.h" // for gViewerDigest
@@ -109,7 +109,9 @@ LLFloaterAbout::LLFloaterAbout()
109 support.append(" ("); 109 support.append(" (");
110 gAgent.getRegion()->getHost().getString(buffer, MAX_STRING); 110 gAgent.getRegion()->getHost().getString(buffer, MAX_STRING);
111 support.append(buffer); 111 support.append(buffer);
112 support.append(")\n\n"); 112 support.append(")\n");
113 support.append(gLastVersionChannel);
114 support.append("\n\n");
113 } 115 }
114 116
115 // CPU 117 // CPU
@@ -117,9 +119,8 @@ LLFloaterAbout::LLFloaterAbout()
117 support.append( gSysCPU.getCPUString() ); 119 support.append( gSysCPU.getCPUString() );
118 support.append("\n"); 120 support.append("\n");
119 121
120 U32 memory = gSysMemory.getPhysicalMemory() / 1024 / 1024; 122 U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
121 // For some reason, the reported amount of memory is always wrong by one meg 123 // Moved hack adjustment to Windows memory size into llsys.cpp
122 memory++;
123 124
124 LLString mem_text = llformat("Memory: %u MB\n", memory ); 125 LLString mem_text = llformat("Memory: %u MB\n", memory );
125 support.append(mem_text); 126 support.append(mem_text);
@@ -165,8 +166,15 @@ LLFloaterAbout::LLFloaterAbout()
165 166
166 // Fix views 167 // Fix views
167 childDisable("credits_editor"); 168 childDisable("credits_editor");
168 childDisable("support_editor"); 169
169 childSetText("support_editor", support); 170 LLTextEditor * support_widget = (LLTextEditor *) getChildByName("support_editor", true);
171 if (support_widget)
172 {
173 support_widget->setEnabled( FALSE );
174 support_widget->setTakesFocus( TRUE );
175 support_widget->setText( support );
176 support_widget->setHandleEditKeysDirectly( TRUE );
177 }
170 178
171 center(); 179 center();
172 180
diff --git a/linden/indra/newview/llfloateranimpreview.h b/linden/indra/newview/llfloateranimpreview.h
index c536fb5..68cd3d5 100644
--- a/linden/indra/newview/llfloateranimpreview.h
+++ b/linden/indra/newview/llfloateranimpreview.h
@@ -102,7 +102,7 @@ public:
102 static void onSaveComplete(const LLUUID& asset_uuid, 102 static void onSaveComplete(const LLUUID& asset_uuid,
103 LLAssetType::EType type, 103 LLAssetType::EType type,
104 void* user_data, 104 void* user_data,
105 S32 status); 105 S32 status, LLExtStat ext_status);
106protected: 106protected:
107 void draw(); 107 void draw();
108 void resetMotion(); 108 void resetMotion();
diff --git a/linden/indra/newview/llfloaterauction.cpp b/linden/indra/newview/llfloaterauction.cpp
index 49da8ba..e024bde 100644
--- a/linden/indra/newview/llfloaterauction.cpp
+++ b/linden/indra/newview/llfloaterauction.cpp
@@ -55,9 +55,9 @@
55///---------------------------------------------------------------------------- 55///----------------------------------------------------------------------------
56 56
57void auction_j2c_upload_done(const LLUUID& asset_id, 57void auction_j2c_upload_done(const LLUUID& asset_id,
58 void* user_data, S32 status); 58 void* user_data, S32 status, LLExtStat ext_status);
59void auction_tga_upload_done(const LLUUID& asset_id, 59void auction_tga_upload_done(const LLUUID& asset_id,
60 void* user_data, S32 status); 60 void* user_data, S32 status, LLExtStat ext_status);
61 61
62///---------------------------------------------------------------------------- 62///----------------------------------------------------------------------------
63/// Class llfloaterauction 63/// Class llfloaterauction
@@ -258,7 +258,7 @@ void LLFloaterAuction::onClickOK(void* data)
258/// Local function definitions 258/// Local function definitions
259///---------------------------------------------------------------------------- 259///----------------------------------------------------------------------------
260 260
261void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) 261void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
262{ 262{
263 LLString* name = (LLString*)(user_data); 263 LLString* name = (LLString*)(user_data);
264 llinfos << "Upload of asset '" << *name << "' " << asset_id 264 llinfos << "Upload of asset '" << *name << "' " << asset_id
@@ -279,7 +279,7 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status
279 } 279 }
280} 280}
281 281
282void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed) 282void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
283{ 283{
284 LLString* name = (LLString*)(user_data); 284 LLString* name = (LLString*)(user_data);
285 llinfos << "Upload of asset '" << *name << "' " << asset_id 285 llinfos << "Upload of asset '" << *name << "' " << asset_id
diff --git a/linden/indra/newview/llfloateravatarpicker.cpp b/linden/indra/newview/llfloateravatarpicker.cpp
index 3bb2462..16c15b0 100644
--- a/linden/indra/newview/llfloateravatarpicker.cpp
+++ b/linden/indra/newview/llfloateravatarpicker.cpp
@@ -197,29 +197,33 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
197 } 197 }
198} 198}
199 199
200// static callback for inventory picker (select from calling cards)
200void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data) 201void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
201{ 202{
202 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data; 203 LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data;
203 if (!self) 204 if (self)
204 { 205 {
205 return; 206 self->doSelectionChange( items, user_action, data );
206 } 207 }
208}
207 209
208 self->mAvatarIDs.clear(); 210// Callback for inventory picker (select from calling cards)
209 self->mAvatarNames.clear(); 211void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
210 212{
211 // if we have calling cards, disable select button until 213 if (!mListNames)
212 // the inventory picks a valid calling card
213 if (!items.empty())
214 { 214 {
215 self->childSetEnabled("Select", FALSE); 215 return;
216 } 216 }
217 217
218 if (!self->mListNames) 218 std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected();
219 { 219 if ( search_items.size() == 0 )
220 return; 220 { // Nothing selected in the search results
221 mAvatarIDs.clear();
222 mAvatarNames.clear();
223 childSetEnabled("Select", FALSE);
221 } 224 }
222 225
226 BOOL first_calling_card = TRUE;
223 std::deque<LLFolderViewItem*>::const_iterator item_it; 227 std::deque<LLFolderViewItem*>::const_iterator item_it;
224 for (item_it = items.begin(); item_it != items.end(); ++item_it) 228 for (item_it = items.begin(); item_it != items.end(); ++item_it)
225 { 229 {
@@ -230,10 +234,18 @@ void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*
230 234
231 if (item) 235 if (item)
232 { 236 {
233 self->mAvatarIDs.push_back(item->getCreatorUUID()); 237 if ( first_calling_card )
234 self->mAvatarNames.push_back(listenerp->getName()); 238 { // Have a calling card selected, so clear anything from the search panel
235 self->childSetEnabled("Select", TRUE); 239 first_calling_card = FALSE;
236 self->mListNames->deselectAllItems(); 240 mAvatarIDs.clear();
241 mAvatarNames.clear();
242 mListNames->deselectAllItems();
243 }
244
245 // Add calling card info to the selected avatars
246 mAvatarIDs.push_back(item->getCreatorUUID());
247 mAvatarNames.push_back(listenerp->getName());
248 childSetEnabled("Select", TRUE);
237 } 249 }
238 } 250 }
239 } 251 }
diff --git a/linden/indra/newview/llfloateravatarpicker.h b/linden/indra/newview/llfloateravatarpicker.h
index 9089c9a..f9326ad 100644
--- a/linden/indra/newview/llfloateravatarpicker.h
+++ b/linden/indra/newview/llfloateravatarpicker.h
@@ -64,6 +64,8 @@ protected:
64 static void onBtnAdd(void* userdata); 64 static void onBtnAdd(void* userdata);
65 static void onBtnClose(void* userdata); 65 static void onBtnClose(void* userdata);
66 static void onList(LLUICtrl* ctrl, void* userdata); 66 static void onList(LLUICtrl* ctrl, void* userdata);
67
68 void doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
67 static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); 69 static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
68 70
69 void find(); 71 void find();
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp
index 41bd8d7..3c5c9a5 100644
--- a/linden/indra/newview/llfloatercustomize.cpp
+++ b/linden/indra/newview/llfloatercustomize.cpp
@@ -379,6 +379,7 @@ public:
379 379
380 virtual BOOL postBuild(); 380 virtual BOOL postBuild();
381 virtual void draw(); 381 virtual void draw();
382 virtual BOOL isDirty() const; // LLUICtrl
382 383
383 void addSubpart(const LLString& name, ESubpart id, LLSubpart* part ); 384 void addSubpart(const LLString& name, ESubpart id, LLSubpart* part );
384 void addTextureDropTarget( LLVOAvatar::ETextureIndex te, const LLString& name, const LLUUID& default_image_id, BOOL allow_no_texture ); 385 void addTextureDropTarget( LLVOAvatar::ETextureIndex te, const LLString& name, const LLUUID& default_image_id, BOOL allow_no_texture );
@@ -395,7 +396,6 @@ public:
395 void setWearable(LLWearable* wearable, U32 perm_mask, BOOL is_complete); 396 void setWearable(LLWearable* wearable, U32 perm_mask, BOOL is_complete);
396 397
397 void addVisualParamToUndoBuffer( S32 param_id, F32 current_weight ); 398 void addVisualParamToUndoBuffer( S32 param_id, F32 current_weight );
398 BOOL isDirty();
399 399
400 void setUIPermissions(U32 perm_mask, BOOL is_complete); 400 void setUIPermissions(U32 perm_mask, BOOL is_complete);
401 401
@@ -558,6 +558,7 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart )
558 sorted_params.insert(vt); 558 sorted_params.insert(vt);
559 } 559 }
560 gFloaterCustomize->generateVisualParamHints(NULL, sorted_params); 560 gFloaterCustomize->generateVisualParamHints(NULL, sorted_params);
561 gFloaterCustomize->updateScrollingPanelUI();
561 562
562 563
563 // Update the camera 564 // Update the camera
@@ -1030,7 +1031,7 @@ void LLPanelEditWearable::setVisible(BOOL visible)
1030 } 1031 }
1031} 1032}
1032 1033
1033BOOL LLPanelEditWearable::isDirty() 1034BOOL LLPanelEditWearable::isDirty() const
1034{ 1035{
1035 LLWearable* wearable = gAgent.getWearable( mType ); 1036 LLWearable* wearable = gAgent.getWearable( mType );
1036 if( !wearable ) 1037 if( !wearable )
@@ -2148,7 +2149,7 @@ void LLFloaterCustomize::draw()
2148 } 2149 }
2149} 2150}
2150 2151
2151BOOL LLFloaterCustomize::isDirty() 2152BOOL LLFloaterCustomize::isDirty() const
2152{ 2153{
2153 for(S32 i = 0; i < WT_COUNT; i++) 2154 for(S32 i = 0; i < WT_COUNT; i++)
2154 { 2155 {
diff --git a/linden/indra/newview/llfloatercustomize.h b/linden/indra/newview/llfloatercustomize.h
index 6eccdcc..a24dc39 100644
--- a/linden/indra/newview/llfloatercustomize.h
+++ b/linden/indra/newview/llfloatercustomize.h
@@ -95,7 +95,7 @@ public:
95 //const char* getWearableDescription( EWearableType type ); 95 //const char* getWearableDescription( EWearableType type );
96 LLPanelEditWearable* getCurrentWearablePanel() { return mWearablePanelList[ sCurrentWearableType ]; } 96 LLPanelEditWearable* getCurrentWearablePanel() { return mWearablePanelList[ sCurrentWearableType ]; }
97 97
98 BOOL isDirty(); 98 virtual BOOL isDirty() const;
99 99
100 void askToSaveAllIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata ); 100 void askToSaveAllIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata );
101 101
diff --git a/linden/indra/newview/llfloaterdirectory.cpp b/linden/indra/newview/llfloaterdirectory.cpp
index 3a05715..2e54166 100644
--- a/linden/indra/newview/llfloaterdirectory.cpp
+++ b/linden/indra/newview/llfloaterdirectory.cpp
@@ -209,7 +209,8 @@ void* LLFloaterDirectory::createClassifiedDetail(void* userdata)
209void* LLFloaterDirectory::createPanelAvatar(void* data) 209void* LLFloaterDirectory::createPanelAvatar(void* data)
210{ 210{
211 LLFloaterDirectory* self = (LLFloaterDirectory*)data; 211 LLFloaterDirectory* self = (LLFloaterDirectory*)data;
212 self->mPanelAvatarp = new LLPanelAvatar("Avatar", LLRect(), TRUE); // allow edit self 212 self->mPanelAvatarp = new LLPanelAvatar("Avatar", LLRect(),
213 FALSE); // disallow editing in search context (SL-48632)
213 self->mPanelAvatarp->setVisible(FALSE); 214 self->mPanelAvatarp->setVisible(FALSE);
214 return self->mPanelAvatarp; 215 return self->mPanelAvatarp;
215 216
diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp
index 78447e9..67803e1 100644
--- a/linden/indra/newview/llfloaterfriends.cpp
+++ b/linden/indra/newview/llfloaterfriends.cpp
@@ -93,12 +93,13 @@ LLPanelFriends::~LLPanelFriends()
93 delete mObserver; 93 delete mObserver;
94} 94}
95 95
96void LLPanelFriends::tick() 96BOOL LLPanelFriends::tick()
97{ 97{
98 mEventTimer.stop(); 98 mEventTimer.stop();
99 mPeriod = 1000000; 99 mPeriod = 1000000;
100 mAllowRightsChange = TRUE; 100 mAllowRightsChange = TRUE;
101 updateFriends(LLFriendObserver::ADD); 101 updateFriends(LLFriendObserver::ADD);
102 return FALSE;
102} 103}
103 104
104void LLPanelFriends::updateFriends(U32 changed_mask) 105void LLPanelFriends::updateFriends(U32 changed_mask)
diff --git a/linden/indra/newview/llfloaterfriends.h b/linden/indra/newview/llfloaterfriends.h
index 0b6646d..cf7451f 100644
--- a/linden/indra/newview/llfloaterfriends.h
+++ b/linden/indra/newview/llfloaterfriends.h
@@ -57,7 +57,7 @@ public:
57 * current instantiation of this floater. There is only once since 57 * current instantiation of this floater. There is only once since
58 * you can currently only look at your local friends. 58 * you can currently only look at your local friends.
59 */ 59 */
60 virtual void tick(); 60 virtual BOOL tick();
61 61
62 /** 62 /**
63 * @brief This method is called in response to the LLAvatarTracker 63 * @brief This method is called in response to the LLAvatarTracker
diff --git a/linden/indra/newview/llfloatergodtools.cpp b/linden/indra/newview/llfloatergodtools.cpp
index 7376bba..b858003 100644
--- a/linden/indra/newview/llfloatergodtools.cpp
+++ b/linden/indra/newview/llfloatergodtools.cpp
@@ -1419,7 +1419,7 @@ void LLPanelRequestTools::onClickRequest(void* data)
1419 } 1419 }
1420} 1420}
1421 1421
1422void terrain_download_done(void** data, S32 status) 1422void terrain_download_done(void** data, S32 status, LLExtStat ext_status)
1423{ 1423{
1424 LLNotifyBox::showXml("TerrainDownloaded"); 1424 LLNotifyBox::showXml("TerrainDownloaded");
1425} 1425}
diff --git a/linden/indra/newview/llfloatergroupinfo.cpp b/linden/indra/newview/llfloatergroupinfo.cpp
index 3e8eae5..6187692 100644
--- a/linden/indra/newview/llfloatergroupinfo.cpp
+++ b/linden/indra/newview/llfloatergroupinfo.cpp
@@ -109,7 +109,7 @@ void LLFloaterGroupInfo::closeGroup(const LLUUID& group_id)
109 { 109 {
110 fgi->mPanelGroupp->close(); 110 fgi->mPanelGroupp->close();
111 } 111 }
112 } 112 }
113} 113}
114 114
115// static 115// static
@@ -125,9 +125,9 @@ void LLFloaterGroupInfo::refreshGroup(const LLUUID& group_id)
125 if (fgi) 125 if (fgi)
126 { 126 {
127 if (fgi->mPanelGroupp) 127 if (fgi->mPanelGroupp)
128 { 128 {
129 fgi->mPanelGroupp->refreshData(); 129 fgi->mPanelGroupp->refreshData();
130 } 130 }
131 } 131 }
132} 132}
133 133
@@ -190,9 +190,9 @@ void LLFloaterGroupInfo::showNotice(const char* subject,
190 { 190 {
191 // We need to clean up that inventory offer. 191 // We need to clean up that inventory offer.
192 if (inventory_offer) 192 if (inventory_offer)
193 { 193 {
194 inventory_offer_callback( IOR_DECLINE , inventory_offer); 194 inventory_offer_callback( IOR_DECLINE , inventory_offer);
195 } 195 }
196 return; 196 return;
197 } 197 }
198 198
@@ -202,9 +202,9 @@ void LLFloaterGroupInfo::showNotice(const char* subject,
202 { 202 {
203 // We need to clean up that inventory offer. 203 // We need to clean up that inventory offer.
204 if (inventory_offer) 204 if (inventory_offer)
205 { 205 {
206 inventory_offer_callback( IOR_DECLINE , inventory_offer); 206 inventory_offer_callback( IOR_DECLINE , inventory_offer);
207 } 207 }
208 return; 208 return;
209 } 209 }
210 210
diff --git a/linden/indra/newview/llfloatergroupinvite.cpp b/linden/indra/newview/llfloatergroupinvite.cpp
index a6d81ec..3ff95dc 100644
--- a/linden/indra/newview/llfloatergroupinvite.cpp
+++ b/linden/indra/newview/llfloatergroupinvite.cpp
@@ -107,7 +107,7 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite()
107} 107}
108 108
109// static 109// static
110void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id) 110void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids)
111{ 111{
112 // Make sure group_id isn't null 112 // Make sure group_id isn't null
113 if (group_id.isNull()) 113 if (group_id.isNull())
@@ -131,6 +131,11 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id)
131 131
132 fgi->mImpl->mInvitePanelp->clear(); 132 fgi->mImpl->mInvitePanelp->clear();
133 } 133 }
134
135 if (agent_ids != NULL)
136 {
137 fgi->mImpl->mInvitePanelp->addUsers(*agent_ids);
138 }
134 139
135 fgi->center(); 140 fgi->center();
136 fgi->open(); /*Flawfinder: ignore*/ 141 fgi->open(); /*Flawfinder: ignore*/
diff --git a/linden/indra/newview/llfloatergroupinvite.h b/linden/indra/newview/llfloatergroupinvite.h
index c61adee..3ad0bf2 100644
--- a/linden/indra/newview/llfloatergroupinvite.h
+++ b/linden/indra/newview/llfloatergroupinvite.h
@@ -39,7 +39,7 @@ class LLFloaterGroupInvite
39public: 39public:
40 virtual ~LLFloaterGroupInvite(); 40 virtual ~LLFloaterGroupInvite();
41 41
42 static void showForGroup(const LLUUID &group_id); 42 static void showForGroup(const LLUUID &group_id, std::vector<LLUUID> *agent_ids = NULL);
43 43
44protected: 44protected:
45 LLFloaterGroupInvite(const std::string& name, 45 LLFloaterGroupInvite(const std::string& name,
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp
index 74526e1..5a442be 100644
--- a/linden/indra/newview/llfloatergroups.cpp
+++ b/linden/indra/newview/llfloatergroups.cpp
@@ -38,6 +38,7 @@
38#include "llfloatergroups.h" 38#include "llfloatergroups.h"
39 39
40#include "message.h" 40#include "message.h"
41#include "roles_constants.h"
41 42
42#include "llagent.h" 43#include "llagent.h"
43#include "llbutton.h" 44#include "llbutton.h"
@@ -56,7 +57,7 @@
56std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances; 57std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
57 58
58// helper functions 59// helper functions
59void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id); 60void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS);
60 61
61///---------------------------------------------------------------------------- 62///----------------------------------------------------------------------------
62/// Class LLFloaterGroupPicker 63/// Class LLFloaterGroupPicker
@@ -83,7 +84,8 @@ LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
83 84
84LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) : 85LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
85 mSelectCallback(NULL), 86 mSelectCallback(NULL),
86 mCallbackUserdata(NULL) 87 mCallbackUserdata(NULL),
88 mPowersMask(GP_ALL_POWERS)
87{ 89{
88 mID = seed.asUUID(); 90 mID = seed.asUUID();
89 sInstances.insert(std::make_pair(mID, this)); 91 sInstances.insert(std::make_pair(mID, this));
@@ -101,9 +103,16 @@ void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*),
101 mCallbackUserdata = userdata; 103 mCallbackUserdata = userdata;
102} 104}
103 105
106void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
107{
108 mPowersMask = powers_mask;
109 postBuild();
110}
111
112
104BOOL LLFloaterGroupPicker::postBuild() 113BOOL LLFloaterGroupPicker::postBuild()
105{ 114{
106 init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID()); 115 init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID(), mPowersMask);
107 116
108 childSetAction("OK", onBtnOK, this); 117 childSetAction("OK", onBtnOK, this);
109 118
@@ -414,7 +423,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
414 if(self) self->enableButtons(); 423 if(self) self->enableButtons();
415} 424}
416 425
417void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id) 426void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask)
418{ 427{
419 S32 count = gAgent.mGroups.count(); 428 S32 count = gAgent.mGroups.count();
420 LLUUID id; 429 LLUUID id;
@@ -427,20 +436,22 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
427 { 436 {
428 id = gAgent.mGroups.get(i).mID; 437 id = gAgent.mGroups.get(i).mID;
429 LLGroupData* group_datap = &gAgent.mGroups.get(i); 438 LLGroupData* group_datap = &gAgent.mGroups.get(i);
430 LLString style = "NORMAL"; 439 if ((group_datap->mPowers & powers_mask) != 0) {
431 if(highlight_id == id) 440 LLString style = "NORMAL";
432 { 441 if(highlight_id == id)
433 style = "BOLD"; 442 {
443 style = "BOLD";
444 }
445
446 LLSD element;
447 element["id"] = id;
448 element["columns"][0]["column"] = "name";
449 element["columns"][0]["value"] = group_datap->mName;
450 element["columns"][0]["font"] = "SANSSERIF";
451 element["columns"][0]["font-style"] = style;
452
453 group_list->addElement(element, ADD_SORTED);
434 } 454 }
435
436 LLSD element;
437 element["id"] = id;
438 element["columns"][0]["column"] = "name";
439 element["columns"][0]["value"] = group_datap->mName;
440 element["columns"][0]["font"] = "SANSSERIF";
441 element["columns"][0]["font-style"] = style;
442
443 group_list->addElement(element, ADD_SORTED);
444 } 455 }
445 456
446 // add "none" to list at top 457 // add "none" to list at top
diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h
index ed5b8b2..496a9fb 100644
--- a/linden/indra/newview/llfloatergroups.h
+++ b/linden/indra/newview/llfloatergroups.h
@@ -57,6 +57,7 @@ public:
57 ~LLFloaterGroupPicker(); 57 ~LLFloaterGroupPicker();
58 void setSelectCallback( void (*callback)(LLUUID, void*), 58 void setSelectCallback( void (*callback)(LLUUID, void*),
59 void* userdata); 59 void* userdata);
60 void setPowersMask(U64 powers_mask);
60 BOOL postBuild(); 61 BOOL postBuild();
61 62
62protected: 63protected:
@@ -69,6 +70,7 @@ protected:
69 70
70protected: 71protected:
71 LLUUID mID; 72 LLUUID mID;
73 U64 mPowersMask;
72 void (*mSelectCallback)(LLUUID id, void* userdata); 74 void (*mSelectCallback)(LLUUID id, void* userdata);
73 void* mCallbackUserdata; 75 void* mCallbackUserdata;
74 76
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp
index 0a91563..554555d 100644
--- a/linden/indra/newview/llfloaterimagepreview.cpp
+++ b/linden/indra/newview/llfloaterimagepreview.cpp
@@ -50,6 +50,7 @@
50#include "pipeline.h" 50#include "pipeline.h"
51#include "viewer.h" 51#include "viewer.h"
52#include "llvieweruictrlfactory.h" 52#include "llvieweruictrlfactory.h"
53#include "llviewerimagelist.h"
53 54
54//static 55//static
55S32 LLFloaterImagePreview::sUploadAmount = 10; 56S32 LLFloaterImagePreview::sUploadAmount = 10;
@@ -57,9 +58,10 @@ S32 LLFloaterImagePreview::sUploadAmount = 10;
57const S32 PREVIEW_BORDER_WIDTH = 2; 58const S32 PREVIEW_BORDER_WIDTH = 2;
58const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; 59const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
59const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; 60const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
60const S32 PREF_BUTTON_HEIGHT = 16; 61const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
61const S32 PREVIEW_TEXTURE_HEIGHT = 300; 62const S32 PREVIEW_TEXTURE_HEIGHT = 300;
62 63
64
63//----------------------------------------------------------------------------- 65//-----------------------------------------------------------------------------
64// LLFloaterImagePreview() 66// LLFloaterImagePreview()
65//----------------------------------------------------------------------------- 67//-----------------------------------------------------------------------------
@@ -106,6 +108,10 @@ BOOL LLFloaterImagePreview::postBuild()
106 108
107 mSculptedPreview = new LLImagePreviewSculpted(256, 256); 109 mSculptedPreview = new LLImagePreviewSculpted(256, 256);
108 mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f); 110 mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
111
112 if ((mRawImagep->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) &&
113 (mRawImagep->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF))
114 childEnable("lossless_check");
109 } 115 }
110 else 116 else
111 { 117 {
@@ -763,6 +769,7 @@ LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynami
763 769
764 LLVolumeParams volume_params; 770 LLVolumeParams volume_params;
765 volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE); 771 volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE);
772 volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_SPHERE);
766 mVolume = new LLVolume(volume_params, (F32) MAX_LOD); 773 mVolume = new LLVolume(volume_params, (F32) MAX_LOD);
767 774
768 /* 775 /*
diff --git a/linden/indra/newview/llfloaterimport.cpp b/linden/indra/newview/llfloaterimport.cpp
index f30f69d..7340c49 100644
--- a/linden/indra/newview/llfloaterimport.cpp
+++ b/linden/indra/newview/llfloaterimport.cpp
@@ -510,7 +510,7 @@ void LLFloaterImport::finishImport(ImportAssetInfo *info)
510} 510}
511 511
512// static 512// static
513void LLFloaterImport::asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result) 513void LLFloaterImport::asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status)
514{ 514{
515 llinfos << "LLFloaterImport: Finished uploading image." << llendl; 515 llinfos << "LLFloaterImport: Finished uploading image." << llendl;
516 LLResourceData *resource_data = (LLResourceData*)user_data; 516 LLResourceData *resource_data = (LLResourceData*)user_data;
diff --git a/linden/indra/newview/llfloaterimport.h b/linden/indra/newview/llfloaterimport.h
index 518ddc4..9ac005f 100644
--- a/linden/indra/newview/llfloaterimport.h
+++ b/linden/indra/newview/llfloaterimport.h
@@ -100,7 +100,7 @@ protected:
100 static void onBtnOK(void*); 100 static void onBtnOK(void*);
101 static void onBtnCancel(void*); 101 static void onBtnCancel(void*);
102 102
103 static void asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result); 103 static void asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
104 static void finishImport(ImportAssetInfo *fp); 104 static void finishImport(ImportAssetInfo *fp);
105 105
106 void draw(); 106 void draw();
diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp
index c926afa..f494251 100644
--- a/linden/indra/newview/llfloaterinspect.cpp
+++ b/linden/indra/newview/llfloaterinspect.cpp
@@ -55,10 +55,10 @@ LLFloaterInspect::~LLFloaterInspect(void)
55 { 55 {
56 if(gToolMgr->getBaseTool() == gToolInspect) 56 if(gToolMgr->getBaseTool() == gToolInspect)
57 { 57 {
58 select_tool(gToolNull); 58 gToolMgr->clearTransientTool();
59 } 59 }
60 // Switch back to basic toolset 60 // Switch back to basic toolset
61 gToolMgr->setCurrentToolset(gBasicToolset); 61 gToolMgr->setCurrentToolset(gBasicToolset);
62 } 62 }
63 else 63 else
64 { 64 {
@@ -85,7 +85,7 @@ void LLFloaterInspect::show(void* ignored)
85 } 85 }
86 86
87 sInstance->open(); 87 sInstance->open();
88 select_tool(gToolInspect); 88 gToolMgr->setTransientTool(gToolInspect);
89 gSelectMgr->setForceSelection(forcesel); // restore previouis value 89 gSelectMgr->setForceSelection(forcesel); // restore previouis value
90 90
91 sInstance->mObjectSelection = gSelectMgr->getSelection(); 91 sInstance->mObjectSelection = gSelectMgr->getSelection();
@@ -256,7 +256,7 @@ void LLFloaterInspect::refresh()
256 256
257void LLFloaterInspect::onFocusReceived() 257void LLFloaterInspect::onFocusReceived()
258{ 258{
259 select_tool(gToolInspect); 259 gToolMgr->setTransientTool(gToolInspect);
260} 260}
261 261
262void LLFloaterInspect::dirty() 262void LLFloaterInspect::dirty()
diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp
index 24344bf..94ff5ed 100644
--- a/linden/indra/newview/llfloaterpostcard.cpp
+++ b/linden/indra/newview/llfloaterpostcard.cpp
@@ -291,7 +291,7 @@ void LLFloaterPostcard::onClickPublishHelp(void* data)
291} 291}
292 292
293// static 293// static
294void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result) // StoreAssetData callback (fixed) 294void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
295{ 295{
296 LLFloaterPostcard *self = (LLFloaterPostcard *)user_data; 296 LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
297 297
diff --git a/linden/indra/newview/llfloaterpostcard.h b/linden/indra/newview/llfloaterpostcard.h
index 33a5e92..2c5327e 100644
--- a/linden/indra/newview/llfloaterpostcard.h
+++ b/linden/indra/newview/llfloaterpostcard.h
@@ -58,7 +58,7 @@ public:
58 58
59 static void uploadCallback(const LLUUID& asset_id, 59 static void uploadCallback(const LLUUID& asset_id,
60 void *user_data, 60 void *user_data,
61 S32 result); 61 S32 result, LLExtStat ext_status);
62 62
63 static void updateUserInfo(const char *email); 63 static void updateUserInfo(const char *email);
64 64
diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp
index 571bcac..f7c05b5 100644
--- a/linden/indra/newview/llfloaterregioninfo.cpp
+++ b/linden/indra/newview/llfloaterregioninfo.cpp
@@ -1483,13 +1483,15 @@ void LLPanelEstateInfo::onClickAddEstateManager(void* user_data)
1483 LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list"); 1483 LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list");
1484 if (!list) return; 1484 if (!list) return;
1485 if (list->getItemCount() >= ESTATE_MAX_MANAGERS) 1485 if (list->getItemCount() >= ESTATE_MAX_MANAGERS)
1486 { 1486 { // Tell user they can't add more managers
1487 LLString::format_map_t args; 1487 LLString::format_map_t args;
1488 args["[MAX_MANAGER]"] = llformat("%d",ESTATE_MAX_MANAGERS); 1488 args["[MAX_MANAGER]"] = llformat("%d",ESTATE_MAX_MANAGERS);
1489 gViewerWindow->alertXml("MaxManagersOnRegion", args); 1489 gViewerWindow->alertXml("MaxManagersOnRegion", args);
1490 return;
1491 } 1490 }
1492 accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd"); 1491 else
1492 { // Go pick managers to add
1493 accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
1494 }
1493} 1495}
1494 1496
1495// static 1497// static
@@ -1995,7 +1997,7 @@ BOOL LLPanelEstateInfo::postBuild()
1995 if (manager_name_list) 1997 if (manager_name_list)
1996 { 1998 {
1997 manager_name_list->setCommitOnSelectionChange(TRUE); 1999 manager_name_list->setCommitOnSelectionChange(TRUE);
1998 manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS); 2000 manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
1999 } 2001 }
2000 2002
2001 childSetAction("add_estate_manager_btn", onClickAddEstateManager, this); 2003 childSetAction("add_estate_manager_btn", onClickAddEstateManager, this);
@@ -2562,7 +2564,7 @@ void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
2562void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, 2564void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
2563 const LLUUID& asset_uuid, 2565 const LLUUID& asset_uuid,
2564 LLAssetType::EType type, 2566 LLAssetType::EType type,
2565 void* user_data, S32 status) 2567 void* user_data, S32 status, LLExtStat ext_status)
2566{ 2568{
2567 llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl; 2569 llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl;
2568 LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data; 2570 LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data;
@@ -2973,9 +2975,13 @@ bool LLDispatchSetEstateAccess::operator()(
2973 LLNameListCtrl* estate_manager_name_list = 2975 LLNameListCtrl* estate_manager_name_list =
2974 LLViewerUICtrlFactory::getNameListByName(panel, "estate_manager_name_list"); 2976 LLViewerUICtrlFactory::getNameListByName(panel, "estate_manager_name_list");
2975 if (estate_manager_name_list) 2977 if (estate_manager_name_list)
2976 { 2978 {
2977 estate_manager_name_list->deleteAllItems(); 2979 estate_manager_name_list->deleteAllItems(); // Clear existing entries
2978 for (S32 i = 0; i < num_estate_managers && i < ESTATE_MAX_MANAGERS; i++) 2980
2981 // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't
2982 // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused,
2983 // and they can still remove them.
2984 for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++)
2979 { 2985 {
2980 LLUUID id; 2986 LLUUID id;
2981 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ 2987 memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
diff --git a/linden/indra/newview/llfloaterregioninfo.h b/linden/indra/newview/llfloaterregioninfo.h
index cd550ff..6c53a7d 100644
--- a/linden/indra/newview/llfloaterregioninfo.h
+++ b/linden/indra/newview/llfloaterregioninfo.h
@@ -369,7 +369,7 @@ public:
369 static void onLoadComplete(LLVFS *vfs, 369 static void onLoadComplete(LLVFS *vfs,
370 const LLUUID& asset_uuid, 370 const LLUUID& asset_uuid,
371 LLAssetType::EType type, 371 LLAssetType::EType type,
372 void* user_data, S32 status); 372 void* user_data, S32 status, LLExtStat ext_status);
373 373
374 // Accessor functions 374 // Accessor functions
375 static void updateCovenantText(const std::string& string, const LLUUID& asset_id); 375 static void updateCovenantText(const std::string& string, const LLUUID& asset_id);
diff --git a/linden/indra/newview/llfloaterreleasemsg.cpp b/linden/indra/newview/llfloaterreleasemsg.cpp
new file mode 100644
index 0000000..50df25a
--- /dev/null
+++ b/linden/indra/newview/llfloaterreleasemsg.cpp
@@ -0,0 +1,152 @@
1/**
2 * @file llfloaterreleasemsg.cpp
3 * @brief In-world HTML dialog
4 *
5 * Copyright (c) 2005-2007, Linden Research, Inc.
6 *
7 * Second Life Viewer Source Code
8 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement
11 * ("Other License"), formally executed by you and Linden Lab. Terms of
12 * the GPL can be found in doc/GPL-license.txt in this distribution, or
13 * online at http://secondlife.com/developers/opensource/gplv2
14 *
15 * There are special exceptions to the terms and conditions of the GPL as
16 * it is applied to this Source Code. View the full text of the exception
17 * in the file doc/FLOSS-exception.txt in this software distribution, or
18 * online at http://secondlife.com/developers/opensource/flossexception
19 *
20 * By copying, modifying or distributing this software, you acknowledge
21 * that you have read and understood your obligations described above,
22 * and agree to abide by those obligations.
23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE.
27 */
28
29#include "llviewerprecompiledheaders.h"
30
31#include "llvieweruictrlfactory.h"
32#include "llviewerwindow.h"
33#include "llviewercontrol.h"
34#include "llfloaterreleasemsg.h"
35#include "llagent.h"
36#include "llviewerregion.h"
37
38extern LLAgent gAgent;
39extern LLString gLastVersionChannel;
40
41LLFloaterReleaseMsg* LLFloaterReleaseMsg::sInstance = 0;
42
43
44////////////////////////////////////////////////////////////////////////////////
45//
46LLFloaterReleaseMsg* LLFloaterReleaseMsg::getInstance()
47{
48 if ( ! sInstance )
49 sInstance = new LLFloaterReleaseMsg;
50
51 return sInstance;
52}
53
54////////////////////////////////////////////////////////////////////////////////
55//
56LLFloaterReleaseMsg::LLFloaterReleaseMsg()
57: LLFloater( "Release Message Floater" )
58
59#if LL_LIBXUL_ENABLED
60 ,
61 mWebBrowser( 0 )
62#endif // LL_LIBXUL_ENABLED
63{
64 // create floater from its XML definition
65 gUICtrlFactory->buildFloater( this, "floater_sim_release_message.xml" );
66
67 mTitleBase = getTitle();
68
69 // reposition floater from saved settings
70 LLRect rect = gSavedSettings.getRect( "HtmlReleaseMessage" );
71 reshape( rect.getWidth(), rect.getHeight(), FALSE );
72 setRect( rect );
73
74#if LL_LIBXUL_ENABLED
75 mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "release_message_floater_browser" );
76 if ( mWebBrowser )
77 {
78 // observe browser events
79 mWebBrowser->addObserver( this );
80
81 // make links open in external browser
82 mWebBrowser->setOpenInExternalBrowser( true );
83
84 // don't automatically open secondlife links since we want to catch
85 // special ones that do other stuff (like open F1 Help)
86 //mWebBrowser->setOpenSecondLifeLinksInMap( false );
87 }
88#endif // LL_LIBXUL_ENABLED
89
90 childSetAction("close_btn", onClickClose, this);
91 setDefaultBtn("close_btn");
92}
93
94////////////////////////////////////////////////////////////////////////////////
95//
96LLFloaterReleaseMsg::~LLFloaterReleaseMsg()
97{
98#if LL_LIBXUL_ENABLED
99 // stop observing browser events
100 if ( mWebBrowser )
101 mWebBrowser->remObserver( this );
102#endif // LL_LIBXUL_ENABLED
103
104 // save position of floater
105 gSavedSettings.setRect( "HtmlReleaseMessage", mRect );
106
107 sInstance = 0;
108}
109
110////////////////////////////////////////////////////////////////////////////////
111//
112void LLFloaterReleaseMsg::show()
113{
114
115 std::string url = gAgent.getRegion()->getCapability("ServerReleaseNotes");
116
117 if (url.empty()) return;
118
119 llinfos << "Release message url: " << url << llendl;
120
121 if (!sInstance)
122 {
123 sInstance = new LLFloaterReleaseMsg();
124 sInstance->center();
125 }
126
127 sInstance->setTitle(sInstance->mTitleBase + " " + gLastVersionChannel);
128 sInstance->open();
129
130#if LL_LIBXUL_ENABLED
131 // navigate to the URL
132 if ( sInstance->mWebBrowser )
133 sInstance->mWebBrowser->navigateTo( url );
134#endif // LL_LIBXUL_ENABLED
135
136 // make floater appear
137 sInstance->setVisibleAndFrontmost();
138
139 sInstance->draw();
140}
141
142
143////////////////////////////////////////////////////////////////////////////////
144//
145void LLFloaterReleaseMsg::onClickClose( void* data )
146{
147 LLFloaterReleaseMsg* self = ( LLFloaterReleaseMsg* )data;
148
149 self->setVisible( false );
150}
151
152
diff --git a/linden/indra/newview/llfloaterreleasemsg.h b/linden/indra/newview/llfloaterreleasemsg.h
new file mode 100644
index 0000000..026b9da
--- /dev/null
+++ b/linden/indra/newview/llfloaterreleasemsg.h
@@ -0,0 +1,55 @@
1/**
2 * @file LLFloaterReleaseMsg.h
3 *
4 * Copyright (c) 2005-2007, Linden Research, Inc.
5 *
6 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28#ifndef LL_LLFLOATERRELMSG_H
29#define LL_LLFLOATERRELMSG_H
30
31#include "llwebbrowserctrl.h"
32#include "llfloater.h"
33
34class LLFloaterReleaseMsg :
35 public LLFloater,
36 public LLWebBrowserCtrlObserver
37{
38 public:
39 static LLFloaterReleaseMsg* getInstance();
40 virtual ~LLFloaterReleaseMsg();
41
42 static void show();
43 static void onClickClose( void* data );
44
45 static LLFloaterReleaseMsg* sInstance;
46 LLString mTitleBase;
47 private:
48 LLFloaterReleaseMsg();
49#if LL_LIBXUL_ENABLED
50 LLWebBrowserCtrl* mWebBrowser;
51#endif // LL_LIBXUL_ENABLED
52 LLButton* mCloseButton;
53};
54
55#endif
diff --git a/linden/indra/newview/llfloaterreporter.cpp b/linden/indra/newview/llfloaterreporter.cpp
index 7e6bf4d..f37f8a0 100644
--- a/linden/indra/newview/llfloaterreporter.cpp
+++ b/linden/indra/newview/llfloaterreporter.cpp
@@ -41,7 +41,7 @@
41#include "llinventory.h" 41#include "llinventory.h"
42#include "llstring.h" 42#include "llstring.h"
43#include "llsys.h" 43#include "llsys.h"
44#include "llversion.h" 44#include "llversionviewer.h"
45#include "message.h" 45#include "message.h"
46#include "v3math.h" 46#include "v3math.h"
47 47
@@ -930,7 +930,7 @@ void LLFloaterReporter::uploadImage()
930 930
931 931
932// static 932// static
933void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result) // StoreAssetData callback (fixed) 933void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
934{ 934{
935 LLUploadDialog::modalUploadFinished(); 935 LLUploadDialog::modalUploadFinished();
936 936
diff --git a/linden/indra/newview/llfloaterreporter.h b/linden/indra/newview/llfloaterreporter.h
index 9cb8557..32fff6b 100644
--- a/linden/indra/newview/llfloaterreporter.h
+++ b/linden/indra/newview/llfloaterreporter.h
@@ -94,7 +94,7 @@ public:
94 static void onClickObjPicker (void *userdata); 94 static void onClickObjPicker (void *userdata);
95 static void onClickSelectAbuser (void *userdata); 95 static void onClickSelectAbuser (void *userdata);
96 static void closePickTool (void *userdata); 96 static void closePickTool (void *userdata);
97 static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result); 97 static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result, LLExtStat ext_status);
98 static void addDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); 98 static void addDescription(const LLString& description, LLMeanCollisionData *mcd = NULL);
99 static void setDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); 99 static void setDescription(const LLString& description, LLMeanCollisionData *mcd = NULL);
100 100
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp
index 8b104a3..7cb92ff 100644
--- a/linden/indra/newview/llfloatersnapshot.cpp
+++ b/linden/indra/newview/llfloatersnapshot.cpp
@@ -678,15 +678,17 @@ void LLSnapshotLivePreview::saveTexture()
678 LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE); 678 LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE);
679 std::string pos_string; 679 std::string pos_string;
680 gAgent.buildLocationString(pos_string); 680 gAgent.buildLocationString(pos_string);
681 std::string who_took_it;
682 gAgent.buildFullname(who_took_it);
681 upload_new_resource(tid, // tid 683 upload_new_resource(tid, // tid
682 LLAssetType::AT_TEXTURE, 684 LLAssetType::AT_TEXTURE,
683 "Snapshot", 685 "Snapshot : " + pos_string,
684 pos_string, 686 "Taken by " + who_took_it + " at " + pos_string,
685 0, 687 0,
686 LLAssetType::AT_SNAPSHOT_CATEGORY, 688 LLAssetType::AT_SNAPSHOT_CATEGORY,
687 LLInventoryType::IT_SNAPSHOT, 689 LLInventoryType::IT_SNAPSHOT,
688 PERM_ALL, 690 PERM_ALL,
689 "Snapshot"); 691 "Snapshot : " + pos_string);
690 } 692 }
691 else 693 else
692 { 694 {
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index df5d488..4aa817e 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -400,13 +400,18 @@ LLFloaterTools::LLFloaterTools()
400 mSmallHeight = mLargeHeight; 400 mSmallHeight = mLargeHeight;
401 if (mTab) mSmallHeight -= mTab->getRect().getHeight(); 401 if (mTab) mSmallHeight -= mTab->getRect().getHeight();
402 402
403 gSavedSettings.setBOOL("ToolboxShowMore", TRUE); // force a toggle initially 403 // force a toggle initially. seems to be needed to correctly initialize
404 showMore(FALSE); 404 // both "more" and "less" cases. it also seems to be important to begin
405 // with the user's preference first so that it's initial position will
406 // be correct (SL-51192) -MG
407 BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference
408 gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below
409 showMore( !show_more ); // does the toggle
410 showMore( show_more ); // reset the real user's preference
405} 411}
406 412
407LLFloaterTools::~LLFloaterTools() 413LLFloaterTools::~LLFloaterTools()
408{ 414{
409 showMore(FALSE);
410 // children automatically deleted 415 // children automatically deleted
411} 416}
412 417
@@ -777,23 +782,20 @@ void LLFloaterTools::showMore(BOOL show_more)
777 { 782 {
778 reshape( mRect.getWidth(), mLargeHeight, TRUE); 783 reshape( mRect.getWidth(), mLargeHeight, TRUE);
779 translate( 0, mSmallHeight - mLargeHeight ); 784 translate( 0, mSmallHeight - mLargeHeight );
780 childSetVisible("button less", true);
781 childSetVisible("button more", false);
782 } 785 }
783 else 786 else
784 { 787 {
785 reshape( mRect.getWidth(), mSmallHeight, TRUE); 788 reshape( mRect.getWidth(), mSmallHeight, TRUE);
786 translate( 0, mLargeHeight - mSmallHeight ); 789 translate( 0, mLargeHeight - mSmallHeight );
787 childSetVisible("button less", false);
788 childSetVisible("button more", true);
789 } 790 }
791 childSetVisible("button less", show_more);
792 childSetVisible("button more", !show_more);
790} 793}
791 794
792void LLFloaterTools::showPanel(EInfoPanel panel) 795void LLFloaterTools::showPanel(EInfoPanel panel)
793{ 796{
794 llassert(panel >= 0 && panel < PANEL_COUNT); 797 llassert(panel >= 0 && panel < PANEL_COUNT);
795 mTab->selectTabByName(PANEL_NAMES[panel]); 798 mTab->selectTabByName(PANEL_NAMES[panel]);
796 showMore(TRUE);
797} 799}
798 800
799void click_show_more(void *userdata) 801void click_show_more(void *userdata)
diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp
index 3ea8c49..93aa3df 100644
--- a/linden/indra/newview/llfloatertos.cpp
+++ b/linden/indra/newview/llfloatertos.cpp
@@ -267,7 +267,17 @@ void LLFloaterTOS::onContinue( void* userdata )
267 { 267 {
268 gAcceptCriticalMessage = TRUE; 268 gAcceptCriticalMessage = TRUE;
269 } 269 }
270 gStartupState++; 270
271 // Testing TOS dialog
272 #if ! LL_RELEASE_FOR_DOWNLOAD
273 if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT )
274 {
275 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
276 }
277 else
278 #endif
279
280 LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
271 self->close(); // destroys this object 281 self->close(); // destroys this object
272} 282}
273 283
@@ -277,7 +287,7 @@ void LLFloaterTOS::onCancel( void* userdata )
277 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 287 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
278 llinfos << "User disagrees with TOS." << llendl; 288 llinfos << "User disagrees with TOS." << llendl;
279 gViewerWindow->alertXml("MustAgreeToLogIn", login_alert_done); 289 gViewerWindow->alertXml("MustAgreeToLogIn", login_alert_done);
280 gStartupState = STATE_LOGIN_SHOW; 290 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
281 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS 291 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
282 self->close(); // destroys this object 292 self->close(); // destroys this object
283} 293}
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp
index ccd252b..237563f 100644
--- a/linden/indra/newview/llfloaterworldmap.cpp
+++ b/linden/indra/newview/llfloaterworldmap.cpp
@@ -1242,6 +1242,14 @@ void LLFloaterWorldMap::onLocationCommit( void* userdata )
1242 1242
1243 LLString str = self->childGetValue("location").asString(); 1243 LLString str = self->childGetValue("location").asString();
1244 1244
1245 // Trim any leading and trailing spaces in the search target
1246 LLString saved_str = str;
1247 LLString::trim( str );
1248 if ( str != saved_str )
1249 { // Set the value in the UI if any spaces were removed
1250 self->childSetValue("location", str);
1251 }
1252
1245 LLString::toLower(str); 1253 LLString::toLower(str);
1246 gFloaterWorldMap->mCompletingRegionName = str; 1254 gFloaterWorldMap->mCompletingRegionName = str;
1247 gWorldMap->mIsTrackingCommit = TRUE; 1255 gWorldMap->mIsTrackingCommit = TRUE;
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp
index f3c6ace..3a58be9 100644
--- a/linden/indra/newview/llfolderview.cpp
+++ b/linden/indra/newview/llfolderview.cpp
@@ -2528,6 +2528,7 @@ LLFolderView::LLFolderView( const LLString& name, LLViewerImage* root_folder_ico
2528 mShowSelectionContext(FALSE), 2528 mShowSelectionContext(FALSE),
2529 mShowSingleSelection(FALSE), 2529 mShowSingleSelection(FALSE),
2530 mArrangeGeneration(0), 2530 mArrangeGeneration(0),
2531 mUserData(NULL),
2531 mSelectCallback(NULL), 2532 mSelectCallback(NULL),
2532 mSelectionChanged(FALSE), 2533 mSelectionChanged(FALSE),
2533 mMinWidth(0), 2534 mMinWidth(0),
@@ -4254,73 +4255,89 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
4254 return NULL; 4255 return NULL;
4255} 4256}
4256 4257
4257//static 4258
4258void LLFolderView::idle(void* user_data) 4259// Main idle routine
4260void LLFolderView::doIdle()
4259{ 4261{
4260 LLFastTimer t2(LLFastTimer::FTM_INVENTORY); 4262 LLFastTimer t2(LLFastTimer::FTM_INVENTORY);
4261 LLFolderView* self = (LLFolderView*)user_data;
4262 4263
4263 BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters"); 4264 BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters");
4264 if (debug_filters != self->getDebugFilters()) 4265 if (debug_filters != getDebugFilters())
4265 { 4266 {
4266 self->mDebugFilters = debug_filters; 4267 mDebugFilters = debug_filters;
4267 self->arrangeAll(); 4268 arrangeAll();
4268 } 4269 }
4269 4270
4270 self->mFilter.clearModified(); 4271 mFilter.clearModified();
4271 BOOL filter_modified_and_active = self->mCompletedFilterGeneration < self->mFilter.getCurrentGeneration() && 4272 BOOL filter_modified_and_active = mCompletedFilterGeneration < mFilter.getCurrentGeneration() &&
4272 self->mFilter.isNotDefault(); 4273 mFilter.isNotDefault();
4273 self->mNeedsAutoSelect = filter_modified_and_active && 4274 mNeedsAutoSelect = filter_modified_and_active &&
4274 !(gFocusMgr.childHasKeyboardFocus(self) || gFocusMgr.getMouseCapture()); 4275 !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
4275 4276
4276 // filter to determine visiblity before arranging 4277 // filter to determine visiblity before arranging
4277 self->filterFromRoot(); 4278 filterFromRoot();
4278 4279
4279 // automatically show matching items, and select first one 4280 // automatically show matching items, and select first one
4280 // do this every frame until user puts keyboard focus into the inventory window 4281 // do this every frame until user puts keyboard focus into the inventory window
4281 // signaling the end of the automatic update 4282 // signaling the end of the automatic update
4282 // only do this when mNeedsFilter is set, meaning filtered items have 4283 // only do this when mNeedsFilter is set, meaning filtered items have
4283 // potentially changed 4284 // potentially changed
4284 if (self->mNeedsAutoSelect) 4285 if (mNeedsAutoSelect)
4285 { 4286 {
4286 LLFastTimer t3(LLFastTimer::FTM_AUTO_SELECT); 4287 LLFastTimer t3(LLFastTimer::FTM_AUTO_SELECT);
4287 // select new item only if a filtered item not currently selected 4288 // select new item only if a filtered item not currently selected
4288 LLFolderViewItem* selected_itemp = self->mSelectedItems.empty() ? NULL : self->mSelectedItems.back(); 4289 LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
4289 if ((!selected_itemp || !selected_itemp->getFiltered()) && !self->mAutoSelectOverride) 4290 if ((!selected_itemp || !selected_itemp->getFiltered()) && !mAutoSelectOverride)
4290 { 4291 {
4291 // select first filtered item 4292 // select first filtered item
4292 LLSelectFirstFilteredItem filter; 4293 LLSelectFirstFilteredItem filter;
4293 self->applyFunctorRecursively(filter); 4294 applyFunctorRecursively(filter);
4294 } 4295 }
4295 self->scrollToShowSelection(); 4296 scrollToShowSelection();
4296 } 4297 }
4297 4298
4298 self->sanitizeSelection(); 4299 BOOL is_visible = isInVisibleChain();
4299 4300
4300 if( self->needsArrange() && self->isInVisibleChain()) 4301 if ( is_visible )
4301 { 4302 {
4302 self->arrangeFromRoot(); 4303 sanitizeSelection();
4304 if( needsArrange() )
4305 {
4306 arrangeFromRoot();
4307 }
4303 } 4308 }
4304 4309
4305 if (self->mSelectedItems.size() && self->mNeedsScroll) 4310 if (mSelectedItems.size() && mNeedsScroll)
4306 { 4311 {
4307 self->scrollToShowItem(self->mSelectedItems.back()); 4312 scrollToShowItem(mSelectedItems.back());
4308 // continue scrolling until animated layout change is done 4313 // continue scrolling until animated layout change is done
4309 if (self->getCompletedFilterGeneration() >= self->mFilter.getMinRequiredGeneration() && 4314 if (getCompletedFilterGeneration() >= mFilter.getMinRequiredGeneration() &&
4310 (!self->needsArrange() || !self->isInVisibleChain())) 4315 (!needsArrange() || !is_visible))
4311 { 4316 {
4312 self->mNeedsScroll = FALSE; 4317 mNeedsScroll = FALSE;
4313 } 4318 }
4314 } 4319 }
4315 4320
4316 if (self->mSelectionChanged && self->mSelectCallback) 4321 if (mSelectionChanged && mSelectCallback)
4317 { 4322 {
4318 //RN: we use keyboard focus as a proxy for user-explicit actions 4323 //RN: we use keyboard focus as a proxy for user-explicit actions
4319 self->mSelectCallback(self->mSelectedItems, gFocusMgr.childHasKeyboardFocus(self), self->mUserData); 4324 mSelectCallback(mSelectedItems, gFocusMgr.childHasKeyboardFocus(this), mUserData);
4320 } 4325 }
4321 self->mSelectionChanged = FALSE; 4326 mSelectionChanged = FALSE;
4322} 4327}
4323 4328
4329
4330//static
4331void LLFolderView::idle(void* user_data)
4332{
4333 LLFolderView* self = (LLFolderView*)user_data;
4334 if ( self )
4335 { // Do the real idle
4336 self->doIdle();
4337 }
4338}
4339
4340
4324void LLFolderView::dumpSelectionInformation() 4341void LLFolderView::dumpSelectionInformation()
4325{ 4342{
4326 llinfos << "LLFolderView::dumpSelectionInformation()" << llendl; 4343 llinfos << "LLFolderView::dumpSelectionInformation()" << llendl;
diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h
index 9482b96..9336ec3 100644
--- a/linden/indra/newview/llfolderview.h
+++ b/linden/indra/newview/llfolderview.h
@@ -859,7 +859,8 @@ public:
859 void removeItemID(const LLUUID& id); 859 void removeItemID(const LLUUID& id);
860 LLFolderViewItem* getItemByID(const LLUUID& id); 860 LLFolderViewItem* getItemByID(const LLUUID& id);
861 861
862 static void idle(void* user_data); 862 void doIdle(); // Real idle routine
863 static void idle(void* user_data); // static glue to doIdle()
863 864
864 BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } 865 BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; }
865 BOOL needsAutoRename() { return mNeedsAutoRename; } 866 BOOL needsAutoRename() { return mNeedsAutoRename; }
diff --git a/linden/indra/newview/llgesturemgr.cpp b/linden/indra/newview/llgesturemgr.cpp
index bf3c057..9b8f2c8 100644
--- a/linden/indra/newview/llgesturemgr.cpp
+++ b/linden/indra/newview/llgesturemgr.cpp
@@ -897,7 +897,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step)
897void LLGestureManager::onLoadComplete(LLVFS *vfs, 897void LLGestureManager::onLoadComplete(LLVFS *vfs,
898 const LLUUID& asset_uuid, 898 const LLUUID& asset_uuid,
899 LLAssetType::EType type, 899 LLAssetType::EType type,
900 void* user_data, S32 status) 900 void* user_data, S32 status, LLExtStat ext_status)
901{ 901{
902 LLLoadInfo* info = (LLLoadInfo*)user_data; 902 LLLoadInfo* info = (LLLoadInfo*)user_data;
903 903
diff --git a/linden/indra/newview/llgesturemgr.h b/linden/indra/newview/llgesturemgr.h
index 29aecf3..92b484a 100644
--- a/linden/indra/newview/llgesturemgr.h
+++ b/linden/indra/newview/llgesturemgr.h
@@ -132,7 +132,7 @@ protected:
132 static void onLoadComplete(LLVFS *vfs, 132 static void onLoadComplete(LLVFS *vfs,
133 const LLUUID& asset_uuid, 133 const LLUUID& asset_uuid,
134 LLAssetType::EType type, 134 LLAssetType::EType type,
135 void* user_data, S32 status); 135 void* user_data, S32 status, LLExtStat ext_status);
136 136
137public: 137public:
138 BOOL mValid; 138 BOOL mValid;
diff --git a/linden/indra/newview/llglslshader.cpp b/linden/indra/newview/llglslshader.cpp
index cc440c4..0a7ec4a 100644
--- a/linden/indra/newview/llglslshader.cpp
+++ b/linden/indra/newview/llglslshader.cpp
@@ -29,6 +29,7 @@
29#include "llviewerprecompiledheaders.h" 29#include "llviewerprecompiledheaders.h"
30 30
31#include "llviewerwindow.h" 31#include "llviewerwindow.h"
32#include "llfeaturemanager.h"
32#include "llglslshader.h" 33#include "llglslshader.h"
33#include "llviewercontrol.h" 34#include "llviewercontrol.h"
34#include "pipeline.h" 35#include "pipeline.h"
@@ -412,7 +413,7 @@ void LLShaderMgr::setShaders()
412 413
413 if (gGLManager.mHasFramebufferObject) 414 if (gGLManager.mHasFramebufferObject)
414 { 415 {
415 LLPipeline::sDynamicReflections = gSavedSettings.getBOOL("RenderDynamicReflections"); 416 LLPipeline::sDynamicReflections = gSavedSettings.getBOOL("RenderDynamicReflections") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap");
416 LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow"); 417 LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow");
417 } 418 }
418 else 419 else
@@ -471,7 +472,7 @@ void LLShaderMgr::setShaders()
471 loadShadersAvatar(); 472 loadShadersAvatar();
472 473
473 // Load shaders to correct levels 474 // Load shaders to correct levels
474 if (!gSavedSettings.getBOOL("RenderRippleWater")) 475 if (!(gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")))
475 { 476 {
476 if (gSavedSettings.getBOOL("RenderGlow")) 477 if (gSavedSettings.getBOOL("RenderGlow"))
477 { 478 {
diff --git a/linden/indra/newview/llgroupnotify.cpp b/linden/indra/newview/llgroupnotify.cpp
index aa84e3d..95d4dbf 100644
--- a/linden/indra/newview/llgroupnotify.cpp
+++ b/linden/indra/newview/llgroupnotify.cpp
@@ -226,7 +226,7 @@ LLGroupNotifyBox::LLGroupNotifyBox(const char* subject,
226 text->setCursor(0,0); 226 text->setCursor(0,0);
227 text->setEnabled(FALSE); 227 text->setEnabled(FALSE);
228 text->setWordWrap(TRUE); 228 text->setWordWrap(TRUE);
229 text->setTakesFocus(FALSE); 229 text->setTakesFocus(TRUE); // Allow focus so text can be copied. Since it's not enabled, it will be read-only
230 text->setTabToNextField(TRUE); 230 text->setTabToNextField(TRUE);
231 text->setMouseOpaque(TRUE); 231 text->setMouseOpaque(TRUE);
232 text->setBorderVisible(TRUE); 232 text->setBorderVisible(TRUE);
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp
index da0ec60..6922f29 100644
--- a/linden/indra/newview/llhudeffectlookat.cpp
+++ b/linden/indra/newview/llhudeffectlookat.cpp
@@ -39,6 +39,10 @@
39#include "llselectmgr.h" 39#include "llselectmgr.h"
40#include "llglheaders.h" 40#include "llglheaders.h"
41 41
42
43#include "llxmltree.h"
44
45
42BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE; 46BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE;
43 47
44// packet layout 48// packet layout
@@ -54,69 +58,179 @@ const F32 MAX_SENDS_PER_SEC = 4.f;
54const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f; 58const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f;
55const F32 MIN_TARGET_OFFSET_SQUARED = 0.0001f; 59const F32 MIN_TARGET_OFFSET_SQUARED = 0.0001f;
56 60
57// timeouts 61
58// can't use actual F32_MAX, because we add this to the current frametime 62// can't use actual F32_MAX, because we add this to the current frametime
59const F32 MAX_TIMEOUT = F32_MAX / 2.f; 63const F32 MAX_TIMEOUT = F32_MAX / 2.f;
60 64
61const F32 LOOKAT_TIMEOUTS[LOOKAT_NUM_TARGETS] = 65/**
66 * Simple data class holding values for a particular type of attention.
67 */
68class LLAttention
62{ 69{
63 MAX_TIMEOUT, //LOOKAT_TARGET_NONE 70public:
64 3.f, //LOOKAT_TARGET_IDLE 71 LLAttention(){}
65 4.f, //LOOKAT_TARGET_AUTO_LISTEN 72 LLAttention(F32 timeout, F32 priority, char *name, LLColor3 color) :
66 2.f, //LOOKAT_TARGET_FREELOOK 73 mTimeout(timeout), mPriority(priority), mName(name), mColor(color)
67 4.f, //LOOKAT_TARGET_RESPOND 74 {
68 1.f, //LOOKAT_TARGET_HOVER 75 }
69 MAX_TIMEOUT, //LOOKAT_TARGET_CONVERSATION 76 F32 mTimeout, mPriority;
70 MAX_TIMEOUT, //LOOKAT_TARGET_SELECT 77 LLString mName;
71 MAX_TIMEOUT, //LOOKAT_TARGET_FOCUS 78 LLColor3 mColor;
72 MAX_TIMEOUT, //LOOKAT_TARGET_MOUSELOOK
73 0.f, //LOOKAT_TARGET_CLEAR
74}; 79};
75 80
76const S32 LOOKAT_PRIORITIES[LOOKAT_NUM_TARGETS] = 81/**
82 * Simple data class holding a list of attentions, one for every type.
83 */
84class LLAttentionSet
77{ 85{
78 0, //LOOKAT_TARGET_NONE 86public:
79 1, //LOOKAT_TARGET_IDLE 87 LLAttentionSet(const LLAttention attentions[])
80 3, //LOOKAT_TARGET_AUTO_LISTEN 88 {
81 2, //LOOKAT_TARGET_FREELOOK 89 for(int i=0; i<LOOKAT_NUM_TARGETS; i++)
82 3, //LOOKAT_TARGET_RESPOND 90 {
83 4, //LOOKAT_TARGET_HOVER 91 mAttentions[i] = attentions[i];
84 5, //LOOKAT_TARGET_CONVERSATION 92 }
85 6, //LOOKAT_TARGET_SELECT 93 }
86 6, //LOOKAT_TARGET_FOCUS 94 LLAttention mAttentions[LOOKAT_NUM_TARGETS];
87 7, //LOOKAT_TARGET_MOUSELOOK 95 LLAttention& operator[](int idx) { return mAttentions[idx]; }
88 8, //LOOKAT_TARGET_CLEAR
89}; 96};
90 97
91const char *LOOKAT_STRINGS[] = 98// Default attribute set data.
99// Used to initialize the global attribute set objects, one of which will be
100// refered to by the hud object at any given time.
101// Note that the values below are only the default values and that any or all of them
102// can be overwritten with customizing data from the XML file. The actual values below
103// are those that will give exactly the same look-at behavior as before the ability
104// to customize was added. - MG
105static const
106 LLAttention
107 BOY_ATTS[] = { // default set of masculine attentions
108 LLAttention(MAX_TIMEOUT, 0, "None", LLColor3(0.3f, 0.3f, 0.3f)), // LOOKAT_TARGET_NONE
109 LLAttention(3.f, 1, "Idle", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_IDLE
110 LLAttention(4.f, 3, "AutoListen", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_AUTO_LISTEN
111 LLAttention(2.f, 2, "FreeLook", LLColor3(0.5f, 0.5f, 0.9f)), // LOOKAT_TARGET_FREELOOK
112 LLAttention(4.f, 3, "Respond", LLColor3(0.0f, 0.0f, 0.0f)), // LOOKAT_TARGET_RESPOND
113 LLAttention(1.f, 4, "Hover", LLColor3(0.5f, 0.9f, 0.5f)), // LOOKAT_TARGET_HOVER
114 LLAttention(MAX_TIMEOUT, 0, "Conversation", LLColor3(0.1f, 0.1f, 0.5f)), // LOOKAT_TARGET_CONVERSATION
115 LLAttention(MAX_TIMEOUT, 6, "Select", LLColor3(0.9f, 0.5f, 0.5f)), // LOOKAT_TARGET_SELECT
116 LLAttention(MAX_TIMEOUT, 6, "Focus", LLColor3(0.9f, 0.5f, 0.9f)), // LOOKAT_TARGET_FOCUS
117 LLAttention(MAX_TIMEOUT, 7, "Mouselook", LLColor3(0.9f, 0.9f, 0.5f)), // LOOKAT_TARGET_MOUSELOOK
118 LLAttention(0.f, 8, "Clear", LLColor3(1.0f, 1.0f, 1.0f)), // LOOKAT_TARGET_CLEAR
119 },
120 GIRL_ATTS[] = { // default set of feminine attentions
121 LLAttention(MAX_TIMEOUT, 0, "None", LLColor3(0.3f, 0.3f, 0.3f)), // LOOKAT_TARGET_NONE
122 LLAttention(3.f, 1, "Idle", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_IDLE
123 LLAttention(4.f, 3, "AutoListen", LLColor3(0.5f, 0.5f, 0.5f)), // LOOKAT_TARGET_AUTO_LISTEN
124 LLAttention(2.f, 2, "FreeLook", LLColor3(0.5f, 0.5f, 0.9f)), // LOOKAT_TARGET_FREELOOK
125 LLAttention(4.f, 3, "Respond", LLColor3(0.0f, 0.0f, 0.0f)), // LOOKAT_TARGET_RESPOND
126 LLAttention(1.f, 4, "Hover", LLColor3(0.5f, 0.9f, 0.5f)), // LOOKAT_TARGET_HOVER
127 LLAttention(MAX_TIMEOUT, 0, "Conversation", LLColor3(0.1f, 0.1f, 0.5f)), // LOOKAT_TARGET_CONVERSATION
128 LLAttention(MAX_TIMEOUT, 6, "Select", LLColor3(0.9f, 0.5f, 0.5f)), // LOOKAT_TARGET_SELECT
129 LLAttention(MAX_TIMEOUT, 6, "Focus", LLColor3(0.9f, 0.5f, 0.9f)), // LOOKAT_TARGET_FOCUS
130 LLAttention(MAX_TIMEOUT, 7, "Mouselook", LLColor3(0.9f, 0.9f, 0.5f)), // LOOKAT_TARGET_MOUSELOOK
131 LLAttention(0.f, 8, "Clear", LLColor3(1.0f, 1.0f, 1.0f)), // LOOKAT_TARGET_CLEAR
132 };
133
134static LLAttentionSet
135 gBoyAttentions(BOY_ATTS),
136 gGirlAttentions(GIRL_ATTS);
137
138
139static BOOL loadGender(LLXmlTreeNode* gender)
92{ 140{
93 "None", //LOOKAT_TARGET_NONE 141 if( !gender)
94 "Idle", //LOOKAT_TARGET_IDLE 142 {
95 "AutoListen", //LOOKAT_TARGET_AUTO_LISTEN 143 return FALSE;
96 "FreeLook", //LOOKAT_TARGET_FREELOOK 144 }
97 "Respond", //LOOKAT_TARGET_RESPOND 145 LLString str;
98 "Hover", //LOOKAT_TARGET_HOVER 146 gender->getAttributeString("name", str);
99 "Conversation", //LOOKAT_TARGET_CONVERSATION 147 LLAttentionSet& attentions = (str.compare("Masculine") == 0) ? gBoyAttentions : gGirlAttentions;
100 "Select", //LOOKAT_TARGET_SELECT 148 for (LLXmlTreeNode* attention_node = gender->getChildByName( "param" );
101 "Focus", //LOOKAT_TARGET_FOCUS 149 attention_node;
102 "Mouselook", //LOOKAT_TARGET_MOUSELOOK 150 attention_node = gender->getNextNamedChild())
103 "Clear", //LOOKAT_TARGET_CLEAR 151 {
104}; 152 attention_node->getAttributeString("attention", str);
153 LLAttention* attention;
154 if (str == "idle") attention = &attentions[LOOKAT_TARGET_IDLE];
155 else if(str == "auto_listen") attention = &attentions[LOOKAT_TARGET_AUTO_LISTEN];
156 else if(str == "freelook") attention = &attentions[LOOKAT_TARGET_FREELOOK];
157 else if(str == "respond") attention = &attentions[LOOKAT_TARGET_RESPOND];
158 else if(str == "hover") attention = &attentions[LOOKAT_TARGET_HOVER];
159 else if(str == "conversation") attention = &attentions[LOOKAT_TARGET_CONVERSATION];
160 else if(str == "select") attention = &attentions[LOOKAT_TARGET_SELECT];
161 else if(str == "focus") attention = &attentions[LOOKAT_TARGET_FOCUS];
162 else if(str == "mouselook") attention = &attentions[LOOKAT_TARGET_MOUSELOOK];
163 else return FALSE;
164
165 F32 priority, timeout;
166 attention_node->getAttributeF32("priority", priority);
167 attention_node->getAttributeF32("timeout", timeout);
168 if(timeout < 0) timeout = MAX_TIMEOUT;
169 attention->mPriority = priority;
170 attention->mTimeout = timeout;
171 }
172 return TRUE;
173}
105 174
106const LLColor3 LOOKAT_COLORS[LOOKAT_NUM_TARGETS] = 175static BOOL loadAttentions()
107{ 176{
108 LLColor3(0.3f, 0.3f, 0.3f), //LOOKAT_TARGET_NONE 177 static BOOL first_time = TRUE;
109 LLColor3(0.5f, 0.5f, 0.5f), //LOOKAT_TARGET_IDLE 178 if( ! first_time)
110 LLColor3(0.5f, 0.5f, 0.5f), //LOOKAT_TARGET_AUTO_LISTEN 179 {
111 LLColor3(0.5f, 0.5f, 0.9f), //LOOKAT_TARGET_FREELOOK 180 return TRUE; // maybe not ideal but otherwise it can continue to fail forever.
112 LLColor3(0.f, 0.f, 0.f), //LOOKAT_TARGET_RESPOND 181 }
113 LLColor3(0.5f, 0.9f, 0.5f), //LOOKAT_TARGET_HOVER 182 first_time = FALSE;
114 LLColor3(0.1f, 0.1f, 0.5f), //LOOKAT_TARGET_CONVERSATION 183
115 LLColor3(0.9f, 0.5f, 0.5f), //LOOKAT_TARGET_SELECT 184 char filename[MAX_PATH]; /*Flawfinder: ignore*/
116 LLColor3(0.9f, 0.5f, 0.9f), //LOOKAT_TARGET_FOCUS 185 strncpy(filename,gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml").c_str(), sizeof(filename) -1); /*Flawfinder: ignore*/
117 LLColor3(0.9f, 0.9f, 0.5f), //LOOKAT_TARGET_MOUSELOOK 186 filename[sizeof(filename) -1] = '\0';
118 LLColor3(1.f, 1.f, 1.f), //LOOKAT_TARGET_CLEAR 187 LLXmlTree xml_tree;
119}; 188 BOOL success = xml_tree.parseFile( filename, FALSE );
189 if( !success )
190 {
191 return FALSE;
192 }
193 LLXmlTreeNode* root = xml_tree.getRoot();
194 if( !root )
195 {
196 return FALSE;
197 }
198
199 //-------------------------------------------------------------------------
200 // <linden_attentions version="1.0"> (root)
201 //-------------------------------------------------------------------------
202 if( !root->hasName( "linden_attentions" ) )
203 {
204 llwarns << "Invalid linden_attentions file header: " << filename << llendl;
205 return FALSE;
206 }
207
208 LLString version;
209 static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
210 if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
211 {
212 llwarns << "Invalid linden_attentions file version: " << version << llendl;
213 return FALSE;
214 }
215
216 //-------------------------------------------------------------------------
217 // <gender>
218 //-------------------------------------------------------------------------
219 for (LLXmlTreeNode* child = root->getChildByName( "gender" );
220 child;
221 child = root->getNextNamedChild())
222 {
223 if( !loadGender( child ) )
224 {
225 return FALSE;
226 }
227 }
228
229 return TRUE;
230}
231
232
233
120 234
121//----------------------------------------------------------------------------- 235//-----------------------------------------------------------------------------
122// LLHUDEffectLookAt() 236// LLHUDEffectLookAt()
@@ -127,6 +241,10 @@ LLHUDEffectLookAt::LLHUDEffectLookAt(const U8 type) :
127 mLastSendTime(0.f) 241 mLastSendTime(0.f)
128{ 242{
129 clearLookAtTarget(); 243 clearLookAtTarget();
244 // parse the default sets
245 loadAttentions();
246 // initialize current attention set. switches when avatar sex changes.
247 mAttentions = &gGirlAttentions;
130} 248}
131 249
132//----------------------------------------------------------------------------- 250//-----------------------------------------------------------------------------
@@ -280,7 +398,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
280 llassert(target_type < LOOKAT_NUM_TARGETS); 398 llassert(target_type < LOOKAT_NUM_TARGETS);
281 399
282 // must be same or higher priority than existing effect 400 // must be same or higher priority than existing effect
283 if (LOOKAT_PRIORITIES[target_type] < LOOKAT_PRIORITIES[mTargetType]) 401 if ((*mAttentions)[target_type].mPriority < (*mAttentions)[mTargetType].mPriority)
284 { 402 {
285 return FALSE; 403 return FALSE;
286 } 404 }
@@ -288,8 +406,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
288 F32 current_time = mTimer.getElapsedTimeF32(); 406 F32 current_time = mTimer.getElapsedTimeF32();
289 407
290 // type of lookat behavior or target object has changed 408 // type of lookat behavior or target object has changed
291 BOOL lookAtChanged = (target_type != mTargetType) || 409 BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject);
292 (object != mTargetObject);
293 410
294 // lookat position has moved a certain amount and we haven't just sent an update 411 // lookat position has moved a certain amount and we haven't just sent an update
295 lookAtChanged = lookAtChanged || (dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) && 412 lookAtChanged = lookAtChanged || (dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) &&
@@ -298,7 +415,8 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
298 if (lookAtChanged) 415 if (lookAtChanged)
299 { 416 {
300 mLastSentOffsetGlobal = position; 417 mLastSentOffsetGlobal = position;
301 setDuration(LOOKAT_TIMEOUTS[target_type]); 418 F32 timeout = (*mAttentions)[target_type].mTimeout;
419 setDuration(timeout);
302 setNeedsSendToSim(TRUE); 420 setNeedsSendToSim(TRUE);
303 } 421 }
304 422
@@ -379,7 +497,7 @@ void LLHUDEffectLookAt::render()
379 glScalef(0.3f, 0.3f, 0.3f); 497 glScalef(0.3f, 0.3f, 0.3f);
380 glBegin(GL_LINES); 498 glBegin(GL_LINES);
381 { 499 {
382 LLColor3 color = LOOKAT_COLORS[mTargetType]; 500 LLColor3 color = (*mAttentions)[mTargetType].mColor;
383 glColor3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]); 501 glColor3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]);
384 glVertex3f(-1.f, 0.f, 0.f); 502 glVertex3f(-1.f, 0.f, 0.f);
385 glVertex3f(1.f, 0.f, 0.f); 503 glVertex3f(1.f, 0.f, 0.f);
@@ -412,6 +530,13 @@ void LLHUDEffectLookAt::update()
412 return; 530 return;
413 } 531 }
414 532
533 // make sure the proper set of avatar attention are currently being used.
534 LLVOAvatar* source_avatar = (LLVOAvatar*)(LLViewerObject*)mSourceObject;
535 // for now the first cut will just switch on sex. future development could adjust
536 // timeouts according to avatar age and/or other features.
537 mAttentions = (source_avatar->getSex() == SEX_MALE) ? &gBoyAttentions : &gGirlAttentions;
538 //printf("updated to %s\n", (source_avatar->getSex() == SEX_MALE) ? "male" : "female");
539
415 F32 time = mTimer.getElapsedTimeF32(); 540 F32 time = mTimer.getElapsedTimeF32();
416 541
417 // clear out the effect if time is up 542 // clear out the effect if time is up
@@ -438,7 +563,7 @@ void LLHUDEffectLookAt::update()
438 563
439 if (sDebugLookAt) 564 if (sDebugLookAt)
440 { 565 {
441 ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText(LOOKAT_STRINGS[mTargetType]); 566 ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText((*mAttentions)[mTargetType].mName);
442 } 567 }
443} 568}
444 569
diff --git a/linden/indra/newview/llhudeffectlookat.h b/linden/indra/newview/llhudeffectlookat.h
index 8fa1ac2..fdb3432 100644
--- a/linden/indra/newview/llhudeffectlookat.h
+++ b/linden/indra/newview/llhudeffectlookat.h
@@ -34,6 +34,7 @@
34 34
35class LLViewerObject; 35class LLViewerObject;
36class LLVOAvatar; 36class LLVOAvatar;
37class LLAttentionSet;
37 38
38typedef enum e_lookat_type 39typedef enum e_lookat_type
39{ 40{
@@ -43,7 +44,7 @@ typedef enum e_lookat_type
43 LOOKAT_TARGET_FREELOOK, 44 LOOKAT_TARGET_FREELOOK,
44 LOOKAT_TARGET_RESPOND, 45 LOOKAT_TARGET_RESPOND,
45 LOOKAT_TARGET_HOVER, 46 LOOKAT_TARGET_HOVER,
46 LOOKAT_TARGET_CONVERSATION, // conversation mode deprecated 47 LOOKAT_TARGET_CONVERSATION,
47 LOOKAT_TARGET_SELECT, 48 LOOKAT_TARGET_SELECT,
48 LOOKAT_TARGET_FOCUS, 49 LOOKAT_TARGET_FOCUS,
49 LOOKAT_TARGET_MOUSELOOK, 50 LOOKAT_TARGET_MOUSELOOK,
@@ -91,6 +92,7 @@ private:
91 LLFrameTimer mTimer; 92 LLFrameTimer mTimer;
92 LLVector3 mTargetPos; 93 LLVector3 mTargetPos;
93 F32 mLastSendTime; 94 F32 mLastSendTime;
95 LLAttentionSet* mAttentions;
94}; 96};
95 97
96#endif // LL_LLHUDEFFECTLOOKAT_H 98#endif // LL_LLHUDEFFECTLOOKAT_H
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index fd7d98e..f8baf46 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -88,10 +88,14 @@
88void inc_busy_count() 88void inc_busy_count()
89{ 89{
90// gViewerWindow->getWindow()->incBusyCount(); 90// gViewerWindow->getWindow()->incBusyCount();
91// check balance of these calls if this code is changed to ever actually
92// *do* something!
91} 93}
92void dec_busy_count() 94void dec_busy_count()
93{ 95{
94// gViewerWindow->getWindow()->decBusyCount(); 96// gViewerWindow->getWindow()->decBusyCount();
97// check balance of these calls if this code is changed to ever actually
98// *do* something!
95} 99}
96 100
97// Function declarations 101// Function declarations
@@ -906,7 +910,7 @@ BOOL LLItemBridge::removeItem()
906 return FALSE; 910 return FALSE;
907 } 911 }
908 // move it to the trash 912 // move it to the trash
909 LLPreview::hide(mUUID); 913 LLPreview::hide(mUUID, TRUE);
910 LLInventoryModel* model = mInventoryPanel->getModel(); 914 LLInventoryModel* model = mInventoryPanel->getModel();
911 if(!model) return FALSE; 915 if(!model) return FALSE;
912 LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); 916 LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
@@ -1365,6 +1369,17 @@ protected:
1365 1369
1366void LLRightClickInventoryFetchDescendentsObserver::done() 1370void LLRightClickInventoryFetchDescendentsObserver::done()
1367{ 1371{
1372 // Avoid passing a NULL-ref as mCompleteFolders.front() down to
1373 // gInventory.collectDescendents()
1374 if( mCompleteFolders.empty() )
1375 {
1376 llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl;
1377 dec_busy_count();
1378 gInventory.removeObserver(this);
1379 delete this;
1380 return;
1381 }
1382
1368 // What we do here is get the complete information on the items in 1383 // What we do here is get the complete information on the items in
1369 // the library, and set up an observer that will wait for that to 1384 // the library, and set up an observer that will wait for that to
1370 // happen. 1385 // happen.
@@ -1375,7 +1390,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
1375 item_array, 1390 item_array,
1376 LLInventoryModel::EXCLUDE_TRASH); 1391 LLInventoryModel::EXCLUDE_TRASH);
1377 S32 count = item_array.count(); 1392 S32 count = item_array.count();
1378#if 0 1393#if 0 // HACK/TODO: Why?
1379 // This early causes a giant menu to get produced, and doesn't seem to be needed. 1394 // This early causes a giant menu to get produced, and doesn't seem to be needed.
1380 if(!count) 1395 if(!count)
1381 { 1396 {
@@ -2919,7 +2934,6 @@ void LLGestureBridge::openItem()
2919BOOL LLGestureBridge::removeItem() 2934BOOL LLGestureBridge::removeItem()
2920{ 2935{
2921 // Force close the preview window, if it exists 2936 // Force close the preview window, if it exists
2922 LLPreview::hide(mUUID);
2923 gGestureManager.deactivateGesture(mUUID); 2937 gGestureManager.deactivateGesture(mUUID);
2924 return LLItemBridge::removeItem(); 2938 return LLItemBridge::removeItem();
2925} 2939}
@@ -3458,13 +3472,27 @@ public:
3458 { 3472 {
3459 /* 3473 /*
3460 * Do nothing. We only care about the destructor 3474 * Do nothing. We only care about the destructor
3475 *
3476 * The reason for this is that this callback is used in a hack where the
3477 * same callback is given to dozens of items, and the destructor is called
3478 * after the last item has fired the event and dereferenced it -- if all
3479 * the events actually fire!
3461 */ 3480 */
3462 } 3481 }
3463 3482
3464protected: 3483protected:
3465 ~LLWearInventoryCategoryCallback() 3484 ~LLWearInventoryCategoryCallback()
3466 { 3485 {
3467 wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend); 3486 // Is the destructor called by ordinary dereference, or because the app's shutting down?
3487 // If the inventory callback manager goes away, we're shutting down, no longer want the callback.
3488 if( LLInventoryCallbackManager::is_instantiated() )
3489 {
3490 wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend);
3491 }
3492 else
3493 {
3494 llwarns << "Dropping unhandled LLWearInventoryCategoryCallback" << llendl;
3495 }
3468 } 3496 }
3469 3497
3470private: 3498private:
@@ -4214,8 +4242,17 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
4214 items.push_back("Restore Item"); 4242 items.push_back("Restore Item");
4215 } 4243 }
4216 else 4244 else
4217 { 4245 { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere
4218 BOOL no_open = ((flags & SUPPRESS_OPEN_ITEM) == SUPPRESS_OPEN_ITEM); 4246 BOOL no_open = ((flags & SUPPRESS_OPEN_ITEM) == SUPPRESS_OPEN_ITEM);
4247
4248 // If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976
4249 LLViewerInventoryItem* item = getItem();
4250 if( !no_open && item )
4251 {
4252 no_open = (item->getType() == LLAssetType::AT_CLOTHING) ||
4253 (item->getType() == LLAssetType::AT_BODYPART);
4254 }
4255
4219 if (!no_open) 4256 if (!no_open)
4220 { 4257 {
4221 items.push_back("Open"); 4258 items.push_back("Open");
@@ -4242,7 +4279,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
4242 LLWearableBridge::canEditOnAvatar, 4279 LLWearableBridge::canEditOnAvatar,
4243 (void*)this));*/ 4280 (void*)this));*/
4244 4281
4245 LLViewerInventoryItem* item = getItem();
4246 if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) 4282 if( item && (item->getType() == LLAssetType::AT_CLOTHING) )
4247 { 4283 {
4248 items.push_back("Take Off"); 4284 items.push_back("Take Off");
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index 112c071..8b7809d 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -1367,12 +1367,12 @@ void LLInventoryPanel::modelChanged(U32 mask)
1367 if(view) 1367 if(view)
1368 { 1368 {
1369 // request refresh on this item (also flags for filtering) 1369 // request refresh on this item (also flags for filtering)
1370 view->refresh();
1371 bridge = (LLInvFVBridge*)view->getListener(); 1370 bridge = (LLInvFVBridge*)view->getListener();
1372 if(bridge) 1371 if(bridge)
1373 { 1372 { // Clear the display name first, so it gets properly re-built during refresh()
1374 bridge->clearDisplayName(); 1373 bridge->clearDisplayName();
1375 } 1374 }
1375 view->refresh();
1376 } 1376 }
1377 } 1377 }
1378 } 1378 }
diff --git a/linden/indra/newview/lllandmarklist.cpp b/linden/indra/newview/lllandmarklist.cpp
index a0ad1ce..7633be4 100644
--- a/linden/indra/newview/lllandmarklist.cpp
+++ b/linden/indra/newview/lllandmarklist.cpp
@@ -77,7 +77,8 @@ void LLLandmarkList::processGetAssetReply(
77 const LLUUID& uuid, 77 const LLUUID& uuid,
78 LLAssetType::EType type, 78 LLAssetType::EType type,
79 void* user_data, 79 void* user_data,
80 S32 status) 80 S32 status,
81 LLExtStat ext_status )
81{ 82{
82 if( status == 0 ) 83 if( status == 0 )
83 { 84 {
diff --git a/linden/indra/newview/lllandmarklist.h b/linden/indra/newview/lllandmarklist.h
index 50ccfb6..1d69158 100644
--- a/linden/indra/newview/lllandmarklist.h
+++ b/linden/indra/newview/lllandmarklist.h
@@ -55,7 +55,8 @@ public:
55 const LLUUID& uuid, 55 const LLUUID& uuid,
56 LLAssetType::EType type, 56 LLAssetType::EType type,
57 void* user_data, 57 void* user_data,
58 S32 status); 58 S32 status,
59 LLExtStat ext_status );
59 60
60protected: 61protected:
61 typedef std::map<LLUUID, LLLandmark*> landmark_list_t; 62 typedef std::map<LLUUID, LLLandmark*> landmark_list_t;
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp
index a7312fc..e405dc4 100644
--- a/linden/indra/newview/llmaniptranslate.cpp
+++ b/linden/indra/newview/llmaniptranslate.cpp
@@ -349,7 +349,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
349 if (!selected_object) 349 if (!selected_object)
350 { 350 {
351 // somehow we lost the object! 351 // somehow we lost the object!
352 llwarns << "Translate manip lost the object" << llendl; 352 llwarns << "Translate manip lost the object, no selected object" << llendl;
353 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); 353 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
354 return TRUE; 354 return TRUE;
355 } 355 }
@@ -367,9 +367,12 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
367 if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE) 367 if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE)
368 { 368 {
369 LLCoordGL mouse_pos; 369 LLCoordGL mouse_pos;
370 gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos); 370 if (!gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos))
371 371 {
372 if (gSavedSettings.getBOOL("SnapToMouseCursor")) 372 // mouse_pos may be nonsense
373 llwarns << "Failed to project object center to screen" << llendl;
374 }
375 else if (gSavedSettings.getBOOL("SnapToMouseCursor"))
373 { 376 {
374 LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY); 377 LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY);
375 x = mouse_pos.mX; 378 x = mouse_pos.mX;
@@ -480,7 +483,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
480 if (!selectNode) 483 if (!selectNode)
481 { 484 {
482 // somehow we lost the object! 485 // somehow we lost the object!
483 llwarns << "Translate manip lost the object" << llendl; 486 llwarns << "Translate manip lost the object, no selectNode" << llendl;
484 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); 487 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
485 return TRUE; 488 return TRUE;
486 } 489 }
@@ -489,7 +492,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
489 if (!object) 492 if (!object)
490 { 493 {
491 // somehow we lost the object! 494 // somehow we lost the object!
492 llwarns << "Translate manip lost the object" << llendl; 495 llwarns << "Translate manip lost the object, no object in selectNode" << llendl;
493 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); 496 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
494 return TRUE; 497 return TRUE;
495 } 498 }
diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp
index b5764c5..024123e 100644
--- a/linden/indra/newview/llmutelist.cpp
+++ b/linden/indra/newview/llmutelist.cpp
@@ -192,7 +192,7 @@ BOOL LLMuteList::isLinden(const LLString& name) const
192BOOL LLMuteList::add(const LLMute& mute, U32 flags) 192BOOL LLMuteList::add(const LLMute& mute, U32 flags)
193{ 193{
194 // Can't mute text from Lindens 194 // Can't mute text from Lindens
195 if ((mute.mType == LLMute::AGENT || mute.mType == LLMute::BY_NAME) 195 if ((mute.mType == LLMute::AGENT)
196 && isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0)) 196 && isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0))
197 { 197 {
198 gViewerWindow->alertXml("MuteLinden"); 198 gViewerWindow->alertXml("MuteLinden");
@@ -613,7 +613,7 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**)
613 gMuteListp->loadFromFile(filename); 613 gMuteListp->loadFromFile(filename);
614} 614}
615 615
616void LLMuteList::onFileMuteList(void** user_data, S32 error_code) 616void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status)
617{ 617{
618 llinfos << "LLMuteList::processMuteListFile()" << llendl; 618 llinfos << "LLMuteList::processMuteListFile()" << llendl;
619 if (!gMuteListp) return; 619 if (!gMuteListp) return;
diff --git a/linden/indra/newview/llmutelist.h b/linden/indra/newview/llmutelist.h
index 4624bfd..63bee60 100644
--- a/linden/indra/newview/llmutelist.h
+++ b/linden/indra/newview/llmutelist.h
@@ -123,7 +123,7 @@ private:
123 static void processMuteListUpdate(LLMessageSystem* msg, void**); 123 static void processMuteListUpdate(LLMessageSystem* msg, void**);
124 static void processUseCachedMuteList(LLMessageSystem* msg, void**); 124 static void processUseCachedMuteList(LLMessageSystem* msg, void**);
125 125
126 static void onFileMuteList(void** user_data, S32 code); 126 static void onFileMuteList(void** user_data, S32 code, LLExtStat ext_status);
127 127
128private: 128private:
129 struct compare_by_name 129 struct compare_by_name
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp
index 4f5c64b..7c206bb 100644
--- a/linden/indra/newview/llnotify.cpp
+++ b/linden/indra/newview/llnotify.cpp
@@ -552,12 +552,13 @@ void LLNotifyBox::close()
552} 552}
553 553
554/*virtual*/ 554/*virtual*/
555void LLNotifyBox::tick() 555BOOL LLNotifyBox::tick()
556{ 556{
557 if (mIsTip) 557 if (mIsTip)
558 { 558 {
559 close(); 559 close();
560 } 560 }
561 return FALSE;
561} 562}
562 563
563void LLNotifyBox::setVisible(BOOL visible) 564void LLNotifyBox::setVisible(BOOL visible)
diff --git a/linden/indra/newview/llnotify.h b/linden/indra/newview/llnotify.h
index ad9b24a..b08634d 100644
--- a/linden/indra/newview/llnotify.h
+++ b/linden/indra/newview/llnotify.h
@@ -86,7 +86,7 @@ protected:
86 86
87 // Animate as sliding onto the screen. 87 // Animate as sliding onto the screen.
88 /*virtual*/ void draw(); 88 /*virtual*/ void draw();
89 /*virtual*/ void tick(); 89 /*virtual*/ BOOL tick();
90 90
91 void moveToBack(); 91 void moveToBack();
92 92
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp
index f7ef441..5f7bb6e 100644
--- a/linden/indra/newview/llpanelclassified.cpp
+++ b/linden/indra/newview/llpanelclassified.cpp
@@ -269,7 +269,7 @@ void LLPanelClassified::apply()
269{ 269{
270 // Apply is used for automatically saving results, so only 270 // Apply is used for automatically saving results, so only
271 // do that if there is a difference, and this is a save not create. 271 // do that if there is a difference, and this is a save not create.
272 if (mDirty && mPaidFor) 272 if (checkDirty() && mPaidFor)
273 { 273 {
274 sendClassifiedInfoUpdate(); 274 sendClassifiedInfoUpdate();
275 } 275 }
@@ -313,7 +313,8 @@ void LLPanelClassified::saveCallback(S32 option, void* data)
313 313
314BOOL LLPanelClassified::canClose() 314BOOL LLPanelClassified::canClose()
315{ 315{
316 if (mForceClose || !mDirty) return TRUE; 316 if (mForceClose || !checkDirty())
317 return TRUE;
317 318
318 LLString::format_map_t args; 319 LLString::format_map_t args;
319 args["[NAME]"] = mNameEditor->getText(); 320 args["[NAME]"] = mNameEditor->getText();
@@ -676,7 +677,7 @@ void LLPanelClassified::refresh()
676 mSetBtn->setVisible(is_self); 677 mSetBtn->setVisible(is_self);
677 mSetBtn->setEnabled(is_self); 678 mSetBtn->setEnabled(is_self);
678 679
679 mUpdateBtn->setEnabled(is_self && mDirty); 680 mUpdateBtn->setEnabled(is_self && checkDirty());
680 mUpdateBtn->setVisible(is_self); 681 mUpdateBtn->setVisible(is_self);
681 } 682 }
682} 683}
@@ -736,29 +737,44 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, LLString text, vo
736 737
737} 738}
738 739
739// static
740void LLPanelClassified::callbackConfirmPublish(S32 option, void* data)
741{
742 LLPanelClassified* self = (LLPanelClassified*)data;
743 740
741// invoked from callbackConfirmPublish
742void LLPanelClassified::confirmPublish(S32 option)
743{
744 // Option 0 = publish 744 // Option 0 = publish
745 if (option != 0) return; 745 if (option != 0) return;
746 746
747 self->sendClassifiedInfoUpdate(); 747 sendClassifiedInfoUpdate();
748 748
749 // Big hack - assume that top picks are always in a browser, 749 // Big hack - assume that top picks are always in a browser,
750 // and non-finder-classifieds are always in a tab container. 750 // and non-finder-classifieds are always in a tab container.
751 if (self->mInFinder) 751 if (mInFinder)
752 { 752 {
753 // TODO: enable this 753 // TODO: enable this
754 //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)self->getParent(); 754 //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)getParent();
755 //panel->renameClassified(self->mClassifiedID, self->mNameEditor->getText().c_str()); 755 //panel->renameClassified(mClassifiedID, mNameEditor->getText().c_str());
756 } 756 }
757 else 757 else
758 { 758 {
759 LLTabContainerVertical* tab = (LLTabContainerVertical*)self->getParent(); 759 LLTabContainerVertical* tab = (LLTabContainerVertical*)getParent();
760 tab->setCurrentTabName(self->mNameEditor->getText()); 760 tab->setCurrentTabName(mNameEditor->getText());
761 } 761 }
762
763 // Tell all the widgets to reset their dirty state since the ad was just saved
764 mSnapshotCtrl->resetDirty();
765 mNameEditor->resetDirty();
766 mDescEditor->resetDirty();
767 mLocationEditor->resetDirty();
768 mCategoryCombo->resetDirty();
769 mMatureCheck->resetDirty();
770 mAutoRenewCheck->resetDirty();
771}
772
773// static
774void LLPanelClassified::callbackConfirmPublish(S32 option, void* data)
775{
776 LLPanelClassified* self = (LLPanelClassified*)data;
777 self->confirmPublish(option);
762} 778}
763 779
764// static 780// static
@@ -831,13 +847,27 @@ void LLPanelClassified::onClickSet(void* data)
831} 847}
832 848
833 849
850BOOL LLPanelClassified::checkDirty()
851{
852 mDirty = FALSE;
853 if ( mSnapshotCtrl ) mDirty |= mSnapshotCtrl->isDirty();
854 if ( mNameEditor ) mDirty |= mNameEditor->isDirty();
855 if ( mDescEditor ) mDirty |= mDescEditor->isDirty();
856 if ( mLocationEditor ) mDirty |= mLocationEditor->isDirty();
857 if ( mCategoryCombo ) mDirty |= mCategoryCombo->isDirty();
858 if ( mMatureCheck ) mDirty |= mMatureCheck->isDirty();
859 if ( mAutoRenewCheck ) mDirty |= mAutoRenewCheck->isDirty();
860
861 return mDirty;
862}
863
834// static 864// static
835void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data) 865void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
836{ 866{
837 LLPanelClassified* self = (LLPanelClassified*)data; 867 LLPanelClassified* self = (LLPanelClassified*)data;
838 if (self) 868 if (self)
839 { 869 {
840 self->mDirty = true; 870 self->checkDirty();
841 } 871 }
842} 872}
843 873
@@ -845,7 +875,6 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
845void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data) 875void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data)
846{ 876{
847 // allow the data to be saved 877 // allow the data to be saved
848 // Dave/Simon TODO: replace this with better isDirty() functionality
849 onCommitAny(ctrl, data); 878 onCommitAny(ctrl, data);
850} 879}
851 880
diff --git a/linden/indra/newview/llpanelclassified.h b/linden/indra/newview/llpanelclassified.h
index 6f5e370..ec2d0b6 100644
--- a/linden/indra/newview/llpanelclassified.h
+++ b/linden/indra/newview/llpanelclassified.h
@@ -91,6 +91,7 @@ public:
91 91
92 void sendClassifiedInfoRequest(); 92 void sendClassifiedInfoRequest();
93 void sendClassifiedInfoUpdate(); 93 void sendClassifiedInfoUpdate();
94 void confirmPublish(S32 option);
94 95
95 static void processClassifiedInfoReply(LLMessageSystem* msg, void**); 96 static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
96 97
@@ -110,10 +111,11 @@ protected:
110 static void onCommitAny(LLUICtrl* ctrl, void* data); 111 static void onCommitAny(LLUICtrl* ctrl, void* data);
111 112
112 void sendClassifiedClickMessage(const char* type); 113 void sendClassifiedClickMessage(const char* type);
114 BOOL checkDirty(); // Update and return mDirty
113 115
114protected: 116protected:
115 BOOL mInFinder; 117 BOOL mInFinder;
116 bool mDirty; 118 BOOL mDirty;
117 bool mForceClose; 119 bool mForceClose;
118 LLUUID mClassifiedID; 120 LLUUID mClassifiedID;
119 LLUUID mRequestedID; 121 LLUUID mRequestedID;
@@ -134,7 +136,6 @@ protected:
134 // Values the user may change 136 // Values the user may change
135 LLTextureCtrl* mSnapshotCtrl; 137 LLTextureCtrl* mSnapshotCtrl;
136 LLLineEditor* mNameEditor; 138 LLLineEditor* mNameEditor;
137 LLLineEditor* mDateEditor;
138 LLTextEditor* mDescEditor; 139 LLTextEditor* mDescEditor;
139 LLLineEditor* mLocationEditor; 140 LLLineEditor* mLocationEditor;
140 LLComboBox* mCategoryCombo; 141 LLComboBox* mCategoryCombo;
diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp
index c4fa1dc..4a03900 100644
--- a/linden/indra/newview/llpaneldisplay.cpp
+++ b/linden/indra/newview/llpaneldisplay.cpp
@@ -322,7 +322,7 @@ void LLPanelDisplay::applyResolution()
322 // change fullscreen resolution or switch in/out of windowed mode 322 // change fullscreen resolution or switch in/out of windowed mode
323 BOOL result; 323 BOOL result;
324 324
325 BOOL logged_in = (gStartupState >= STATE_STARTED); 325 BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
326 if (fullscreen) 326 if (fullscreen)
327 { 327 {
328 result = gViewerWindow->changeDisplaySettings(TRUE, 328 result = gViewerWindow->changeDisplaySettings(TRUE,
@@ -526,7 +526,7 @@ void LLPanelDisplay2::apply()
526 LLImageGL::sGlobalUseAnisotropic = childGetValue("ani"); 526 LLImageGL::sGlobalUseAnisotropic = childGetValue("ani");
527 if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic) 527 if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic)
528 { 528 {
529 BOOL logged_in = (gStartupState >= STATE_STARTED); 529 BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
530 gViewerWindow->restartDisplay(logged_in); 530 gViewerWindow->restartDisplay(logged_in);
531 } 531 }
532 532
@@ -655,9 +655,13 @@ void LLPanelDisplay3::refresh()
655void LLPanelDisplay3::refreshEnabledState() 655void LLPanelDisplay3::refreshEnabledState()
656{ 656{
657 // Ripple Water 657 // Ripple Water
658 bool ripple = (LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) >= 2); 658 bool ripple = (LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) >= 2) && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap");
659 mCtrlRippleWater->setEnabled(ripple ? TRUE : FALSE); 659 mCtrlRippleWater->setEnabled(ripple ? TRUE : FALSE);
660 660
661 // Bump & Shiny
662 bool bumpshiny = gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap") && gFeatureManagerp->isFeatureAvailable("RenderObjectBump");
663 mCtrlBumpShiny->setEnabled(bumpshiny ? TRUE : FALSE);
664
661 // Avatar Mode 665 // Avatar Mode
662 S32 max_avatar_shader = LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_AVATAR); 666 S32 max_avatar_shader = LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_AVATAR);
663 mCtrlAvatarVP->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE); 667 mCtrlAvatarVP->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE);
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp
index 0888cad..8d30f09 100644
--- a/linden/indra/newview/llpanelgroupgeneral.cpp
+++ b/linden/indra/newview/llpanelgroupgeneral.cpp
@@ -70,7 +70,6 @@ LLPanelGroupGeneral::LLPanelGroupGeneral(const std::string& name,
70 mFounderName(NULL), 70 mFounderName(NULL),
71 mInsignia(NULL), 71 mInsignia(NULL),
72 mEditCharter(NULL), 72 mEditCharter(NULL),
73 mEditName(NULL),
74 mBtnJoinGroup(NULL), 73 mBtnJoinGroup(NULL),
75 mListVisibleMembers(NULL), 74 mListVisibleMembers(NULL),
76 mCtrlShowInGroupList(NULL), 75 mCtrlShowInGroupList(NULL),
@@ -256,7 +255,7 @@ BOOL LLPanelGroupGeneral::postBuild()
256void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data) 255void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data)
257{ 256{
258 LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; 257 LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
259 self->mChanged = TRUE; 258 self->updateChanged();
260 self->notifyObservers(); 259 self->notifyObservers();
261} 260}
262 261
@@ -811,3 +810,22 @@ void LLPanelGroupGeneral::updateMembers()
811 mListVisibleMembers->setEnabled(FALSE); 810 mListVisibleMembers->setEnabled(FALSE);
812 } 811 }
813} 812}
813
814
815void LLPanelGroupGeneral::updateChanged()
816{
817 mChanged = FALSE;
818 if ( mGroupNameEditor )
819 mChanged = mGroupNameEditor->isDirty();
820 if ( mGroupName )
821 mChanged |= mGroupName->isDirty();
822 if ( mFounderName )
823 mChanged |= mFounderName->isDirty();
824 if ( mInsignia )
825 mChanged |= mInsignia->isDirty();
826 if ( mEditCharter )
827 mChanged |= mEditCharter->isDirty();
828// if ( mCtrlReceiveNotices ) // "Receive group notices" is different, see onReceiveNotices()
829// mChanged |= mCtrlReceiveNotices->isDirty();
830}
831
diff --git a/linden/indra/newview/llpanelgroupgeneral.h b/linden/indra/newview/llpanelgroupgeneral.h
index 22990a9..a8615b2 100644
--- a/linden/indra/newview/llpanelgroupgeneral.h
+++ b/linden/indra/newview/llpanelgroupgeneral.h
@@ -74,6 +74,7 @@ private:
74 static void joinDlgCB(S32 which, void *userdata); 74 static void joinDlgCB(S32 which, void *userdata);
75 75
76 void updateMembers(); 76 void updateMembers();
77 void updateChanged();
77 78
78 BOOL mPendingMemberUpdate; 79 BOOL mPendingMemberUpdate;
79 BOOL mChanged; 80 BOOL mChanged;
@@ -88,7 +89,6 @@ private:
88 LLNameBox *mFounderName; 89 LLNameBox *mFounderName;
89 LLTextureCtrl *mInsignia; 90 LLTextureCtrl *mInsignia;
90 LLTextEditor *mEditCharter; 91 LLTextEditor *mEditCharter;
91 LLLineEditor *mEditName;
92 LLButton *mBtnJoinGroup; 92 LLButton *mBtnJoinGroup;
93 LLButton *mBtnInfo; 93 LLButton *mBtnInfo;
94 94
diff --git a/linden/indra/newview/llpanelgroupinvite.cpp b/linden/indra/newview/llpanelgroupinvite.cpp
index 7e5429f..4078c6d 100644
--- a/linden/indra/newview/llpanelgroupinvite.cpp
+++ b/linden/indra/newview/llpanelgroupinvite.cpp
@@ -36,6 +36,9 @@
36#include "llgroupmgr.h" 36#include "llgroupmgr.h"
37#include "llnamelistctrl.h" 37#include "llnamelistctrl.h"
38#include "llspinctrl.h" 38#include "llspinctrl.h"
39#include "lltextbox.h"
40#include "llviewerobject.h"
41#include "llviewerobjectlist.h"
39#include "llvieweruictrlfactory.h" 42#include "llvieweruictrlfactory.h"
40 43
41class LLPanelGroupInvite::impl 44class LLPanelGroupInvite::impl
@@ -65,7 +68,9 @@ public:
65 68
66 LLNameListCtrl *mInvitees; 69 LLNameListCtrl *mInvitees;
67 LLComboBox *mRoleNames; 70 LLComboBox *mRoleNames;
68 LLButton *mRemoveButton; 71 LLButton *mOKButton;
72 LLButton *mRemoveButton;
73 LLTextBox *mGroupName;
69 74
70 void (*mCloseCallback)(void* data); 75 void (*mCloseCallback)(void* data);
71 76
@@ -308,6 +313,8 @@ LLPanelGroupInvite::LLPanelGroupInvite(const std::string& name,
308 : LLPanel(name) 313 : LLPanel(name)
309{ 314{
310 mImplementation = new impl(group_id); 315 mImplementation = new impl(group_id);
316 mPendingUpdate = FALSE;
317 mStoreSelected = LLUUID::null;
311 318
312 std::string panel_def_file; 319 std::string panel_def_file;
313 320
@@ -329,29 +336,132 @@ void LLPanelGroupInvite::setCloseCallback(void (*close_callback)(void*),
329 336
330void LLPanelGroupInvite::clear() 337void LLPanelGroupInvite::clear()
331{ 338{
339 mStoreSelected = LLUUID::null;
332 mImplementation->mInvitees->deleteAllItems(); 340 mImplementation->mInvitees->deleteAllItems();
333 mImplementation->mRoleNames->clear(); 341 mImplementation->mRoleNames->clear();
334 mImplementation->mRoleNames->removeall(); 342 mImplementation->mRoleNames->removeall();
343 mImplementation->mOKButton->setEnabled(FALSE);
335} 344}
336 345
346void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
347{
348 std::vector<std::string> names;
349 for (S32 i = 0; i < (S32)agent_ids.size(); i++)
350 {
351 LLUUID agent_id = agent_ids[i];
352 LLViewerObject* dest = gObjectList.findObject(agent_id);
353 if(dest && dest->isAvatar())
354 {
355 LLString fullname;
356 LLString::format_map_t args;
357 LLNameValue* nvfirst = dest->getNVPair("FirstName");
358 LLNameValue* nvlast = dest->getNVPair("LastName");
359 if(nvfirst && nvlast)
360 {
361 args["[FIRST]"] = nvfirst->getString();
362 args["[LAST]"] = nvlast->getString();
363 fullname = nvfirst->getString();
364 fullname += " ";
365 fullname += nvlast->getString();
366 }
367 if (!fullname.empty())
368 {
369 names.push_back(fullname);
370 }
371 else
372 {
373 llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl;
374 names.push_back("(Unknown)");
375 }
376 }
377 }
378 mImplementation->addUsers(names, agent_ids);
379}
380
381void LLPanelGroupInvite::draw()
382{
383 LLPanel::draw();
384 if (mPendingUpdate)
385 {
386 updateLists();
387 }
388}
389
337void LLPanelGroupInvite::update() 390void LLPanelGroupInvite::update()
338{ 391{
392 mPendingUpdate = FALSE;
393 if (mImplementation->mGroupName)
394 {
395 mImplementation->mGroupName->setText("(loading...)");
396 }
397 if ( mImplementation->mRoleNames )
398 {
399 mStoreSelected = mImplementation->mRoleNames->getCurrentID();
400 mImplementation->mRoleNames->clear();
401 mImplementation->mRoleNames->removeall();
402 mImplementation->mRoleNames->add("(loading...)", LLUUID::null, ADD_BOTTOM);
403 mImplementation->mRoleNames->setCurrentByID(LLUUID::null);
404 }
405
406 updateLists();
407}
408
409void LLPanelGroupInvite::updateLists()
410{
339 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mImplementation->mGroupID); 411 LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mImplementation->mGroupID);
412 BOOL waiting = FALSE;
340 413
341 if (!gdatap || !gdatap->isRoleDataComplete()) 414 if (gdatap)
415 {
416 if (gdatap->isGroupPropertiesDataComplete())
417 {
418 if (mImplementation->mGroupName)
419 {
420 mImplementation->mGroupName->setText(gdatap->mName);
421 }
422 }
423 else
424 {
425 waiting = TRUE;
426 }
427 if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete())
428 {
429 if ( mImplementation->mRoleNames )
430 {
431 mImplementation->mRoleNames->clear();
432 mImplementation->mRoleNames->removeall();
433
434 //add the role names and select the everybody role by default
435 mImplementation->addRoleNames(gdatap);
436 mImplementation->mRoleNames->setCurrentByID(mStoreSelected);
437 }
438 }
439 else
440 {
441 waiting = TRUE;
442 }
443 }
444 else
342 { 445 {
343 gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID); 446 waiting = TRUE;
344 } 447 }
448
449 if (waiting)
450 {
451 if (!mPendingUpdate)
452 {
453 gGroupMgr->sendGroupPropertiesRequest(mImplementation->mGroupID);
454 gGroupMgr->sendGroupMembersRequest(mImplementation->mGroupID);
455 gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID);
456 }
457 mPendingUpdate = TRUE;
458 }
345 else 459 else
346 { 460 {
347 if ( mImplementation->mRoleNames ) 461 mPendingUpdate = FALSE;
462 if (mImplementation->mOKButton && mImplementation->mRoleNames->getItemCount())
348 { 463 {
349 mImplementation->mRoleNames->clear(); 464 mImplementation->mOKButton->setEnabled(TRUE);
350 mImplementation->mRoleNames->removeall();
351
352 //add the role names and select the everybody role by default
353 mImplementation->addRoleNames(gdatap);
354 mImplementation->mRoleNames->setCurrentByID(LLUUID::null);
355 } 465 }
356 } 466 }
357} 467}
@@ -362,6 +472,7 @@ BOOL LLPanelGroupInvite::postBuild()
362 472
363 mImplementation->mRoleNames = (LLComboBox*) getChildByName("role_name", 473 mImplementation->mRoleNames = (LLComboBox*) getChildByName("role_name",
364 recurse); 474 recurse);
475 mImplementation->mGroupName = (LLTextBox*) getChildByName("group_name_text", recurse);
365 mImplementation->mInvitees = 476 mImplementation->mInvitees =
366 (LLNameListCtrl*) getChildByName("invitee_list", recurse); 477 (LLNameListCtrl*) getChildByName("invitee_list", recurse);
367 if ( mImplementation->mInvitees ) 478 if ( mImplementation->mInvitees )
@@ -390,12 +501,15 @@ BOOL LLPanelGroupInvite::postBuild()
390 mImplementation->mRemoveButton->setEnabled(FALSE); 501 mImplementation->mRemoveButton->setEnabled(FALSE);
391 } 502 }
392 503
393 button = (LLButton*) getChildByName("ok_button", recurse); 504 mImplementation->mOKButton =
394 if ( button ) 505 (LLButton*) getChildByName("ok_button", recurse);
395 { 506 if ( mImplementation->mOKButton )
396 button->setClickedCallback(impl::callbackClickOK); 507 {
397 button->setCallbackUserData(mImplementation); 508 mImplementation->mOKButton->
398 } 509 setClickedCallback(impl::callbackClickOK);
510 mImplementation->mOKButton->setCallbackUserData(mImplementation);
511 mImplementation->mOKButton->setEnabled(FALSE);
512 }
399 513
400 button = (LLButton*) getChildByName("cancel_button", recurse); 514 button = (LLButton*) getChildByName("cancel_button", recurse);
401 if ( button ) 515 if ( button )
diff --git a/linden/indra/newview/llpanelgroupinvite.h b/linden/indra/newview/llpanelgroupinvite.h
index 260b091..40e9701 100644
--- a/linden/indra/newview/llpanelgroupinvite.h
+++ b/linden/indra/newview/llpanelgroupinvite.h
@@ -37,16 +37,22 @@ class LLPanelGroupInvite
37public: 37public:
38 LLPanelGroupInvite(const std::string& name, const LLUUID& group_id); 38 LLPanelGroupInvite(const std::string& name, const LLUUID& group_id);
39 ~LLPanelGroupInvite(); 39 ~LLPanelGroupInvite();
40 40
41 void addUsers(std::vector<LLUUID>& agent_ids);
41 void clear(); 42 void clear();
42 void update(); 43 void update();
43 44
44 void setCloseCallback(void (*close_callback)(void*), void* data); 45 void setCloseCallback(void (*close_callback)(void*), void* data);
45 46
47 virtual void draw();
46 virtual BOOL postBuild(); 48 virtual BOOL postBuild();
47protected: 49protected:
48 class impl; 50 class impl;
49 impl* mImplementation; 51 impl* mImplementation;
52
53 BOOL mPendingUpdate;
54 LLUUID mStoreSelected;
55 void updateLists();
50}; 56};
51 57
52#endif 58#endif
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index 7a0482b..2df1097 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -36,7 +36,7 @@
36#include "llmd5.h" 36#include "llmd5.h"
37#include "llsecondlifeurls.h" 37#include "llsecondlifeurls.h"
38#include "llwindow.h" // shell_open() 38#include "llwindow.h" // shell_open()
39#include "llversion.h" 39#include "llversionviewer.h"
40#include "v4color.h" 40#include "v4color.h"
41 41
42#include "llbutton.h" 42#include "llbutton.h"
@@ -139,6 +139,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
139 { 139 {
140 llwarns << "Duplicate instance of login view deleted" << llendl; 140 llwarns << "Duplicate instance of login view deleted" << llendl;
141 delete LLPanelLogin::sInstance; 141 delete LLPanelLogin::sInstance;
142
143 // Don't leave bad pointer in gFocusMgr
144 gFocusMgr.setDefaultKeyboardFocus(NULL);
142 } 145 }
143 146
144 LLPanelLogin::sInstance = this; 147 LLPanelLogin::sInstance = this;
@@ -525,9 +528,10 @@ void LLPanelLogin::show(const LLRect &rect,
525 { 528 {
526 // Grab focus and move cursor to first enabled control 529 // Grab focus and move cursor to first enabled control
527 sInstance->setFocus(TRUE); 530 sInstance->setFocus(TRUE);
528 // make sure that focus always goes here
529 gFocusMgr.setDefaultKeyboardFocus(sInstance);
530 } 531 }
532
533 // Make sure that focus always goes here (and use the latest sInstance that was just created)
534 gFocusMgr.setDefaultKeyboardFocus(sInstance);
531} 535}
532 536
533// static 537// static
@@ -608,35 +612,40 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString &
608} 612}
609 613
610 614
611// static 615// static. Return TRUE if user made a choice from the popup
612void LLPanelLogin::getServer(LLString &server, S32 &domain_name) 616BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name)
613{ 617{
618 BOOL user_picked = FALSE;
614 if (!sInstance) 619 if (!sInstance)
615 { 620 {
616 llwarns << "Attempted getServer with no login view shown" << llendl; 621 llwarns << "Attempted getServer with no login view shown" << llendl;
617 return;
618 } 622 }
619 623 else
620 LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo");
621 if (combo)
622 { 624 {
623 LLSD combo_val = combo->getValue(); 625 LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo");
624 if (LLSD::TypeInteger == combo_val.type()) 626 if (combo)
625 { 627 {
626 domain_name = combo->getValue().asInteger(); 628 LLSD combo_val = combo->getValue();
629 if (LLSD::TypeInteger == combo_val.type())
630 {
631 domain_name = combo->getValue().asInteger();
627 632
628 if ((S32)USERSERVER_OTHER == domain_name) 633 if ((S32)USERSERVER_OTHER == domain_name)
634 {
635 server = gUserServerName;
636 }
637 }
638 else
629 { 639 {
630 server = gUserServerName; 640 // no valid selection, return other
641 domain_name = (S32)USERSERVER_OTHER;
642 server = combo_val.asString();
631 } 643 }
632 } 644 user_picked = combo->isDirty();
633 else
634 {
635 // no valid selection, return other
636 domain_name = (S32)USERSERVER_OTHER;
637 server = combo_val.asString();
638 } 645 }
639 } 646 }
647
648 return user_picked;
640} 649}
641 650
642// static 651// static
diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h
index 05590d3..7faf0d8 100644
--- a/linden/indra/newview/llpanellogin.h
+++ b/linden/indra/newview/llpanellogin.h
@@ -69,7 +69,7 @@ public:
69 static void getFields(LLString &firstname, LLString &lastname, 69 static void getFields(LLString &firstname, LLString &lastname,
70 LLString &password, BOOL &remember); 70 LLString &password, BOOL &remember);
71 71
72 static void getServer(LLString &server, S32& domain_name); 72 static BOOL getServer(LLString &server, S32& domain_name);
73 static void getLocation(LLString &location); 73 static void getLocation(LLString &location);
74 74
75 static void close(); 75 static void close();
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp
index 3e7be68..a8411df 100644
--- a/linden/indra/newview/llpanelobject.cpp
+++ b/linden/indra/newview/llpanelobject.cpp
@@ -286,6 +286,10 @@ BOOL LLPanelObject::postBuild()
286 } 286 }
287 } 287 }
288 288
289 mLabelSculptType = gUICtrlFactory->getTextBoxByName(this, "label sculpt type");
290 mCtrlSculptType = gUICtrlFactory->getComboBoxByName(this, "sculpt type control");
291 childSetCommitCallback("sculpt type control", onCommitSculptType, this);
292
289 293
290 // Start with everyone disabled 294 // Start with everyone disabled
291 clearCtrls(); 295 clearCtrls();
@@ -1035,7 +1039,10 @@ void LLPanelObject::getState( )
1035 mLabelRevolutions->setVisible( revolutions_visible ); 1039 mLabelRevolutions->setVisible( revolutions_visible );
1036 mSpinRevolutions ->setVisible( revolutions_visible ); 1040 mSpinRevolutions ->setVisible( revolutions_visible );
1037 1041
1038 mCtrlSculptTexture->setVisible( sculpt_texture_visible ); 1042 bool sculpt_type_visible = FALSE; // currently not visible - for LSL setting only
1043 mCtrlSculptTexture->setVisible(sculpt_texture_visible);
1044 mLabelSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible);
1045 mCtrlSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible);
1039 1046
1040 1047
1041 // sculpt texture 1048 // sculpt texture
@@ -1045,21 +1052,39 @@ void LLPanelObject::getState( )
1045 LLUUID id; 1052 LLUUID id;
1046 LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); 1053 LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
1047 1054
1048 LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control"); 1055
1049 if((mTextureCtrl) && (sculpt_params)) 1056 if (sculpt_params) // if we have a legal sculpt param block for this object:
1050 { 1057 {
1051 mTextureCtrl->setTentative(FALSE);
1052 mTextureCtrl->setEnabled(editable);
1053 if (editable)
1054 mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture());
1055 else
1056 mTextureCtrl->setImageAssetID(LLUUID::null);
1057
1058
1059 if (mObject != objectp) // we've just selected a new object, so save for undo 1058 if (mObject != objectp) // we've just selected a new object, so save for undo
1059 {
1060 mSculptTextureRevert = sculpt_params->getSculptTexture(); 1060 mSculptTextureRevert = sculpt_params->getSculptTexture();
1061 } 1061 mSculptTypeRevert = sculpt_params->getSculptType();
1062 }
1063
1064 LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control");
1065 if(mTextureCtrl)
1066 {
1067 mTextureCtrl->setTentative(FALSE);
1068 mTextureCtrl->setEnabled(editable);
1069 if (editable)
1070 mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture());
1071 else
1072 mTextureCtrl->setImageAssetID(LLUUID::null);
1073 }
1074
1075 if (mCtrlSculptType)
1076 {
1077 mCtrlSculptType->setCurrentByIndex(sculpt_params->getSculptType());
1078 mCtrlSculptType->setEnabled(editable);
1079 }
1062 1080
1081 if (mLabelSculptType)
1082 {
1083 mLabelSculptType->setEnabled(TRUE);
1084 }
1085
1086
1087 }
1063 } 1088 }
1064 1089
1065 1090
@@ -1194,7 +1219,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata )
1194 self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE); 1219 self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE);
1195 LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); 1220 LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
1196 if (sculpt_params) 1221 if (sculpt_params)
1197 volume_params.setSculptID(sculpt_params->getSculptTexture(), 0); 1222 volume_params.setSculptID(sculpt_params->getSculptTexture(), sculpt_params->getSculptType());
1198 } 1223 }
1199 else 1224 else
1200 { 1225 {
@@ -1648,13 +1673,16 @@ void LLPanelObject::sendPosition()
1648 1673
1649void LLPanelObject::sendSculpt() 1674void LLPanelObject::sendSculpt()
1650{ 1675{
1651 LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(this,"sculpt texture control"); 1676 if (mObject.isNull())
1652 if(!mTextureCtrl)
1653 return; 1677 return;
1654 1678
1655 LLSculptParams sculpt_params; 1679 LLSculptParams sculpt_params;
1656 sculpt_params.setSculptTexture(mTextureCtrl->getImageAssetID()); 1680
1657 sculpt_params.setSculptType(LL_SCULPT_TYPE_SPHERE); 1681 if (mCtrlSculptTexture)
1682 sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID());
1683
1684 if (mCtrlSculptType)
1685 sculpt_params.setSculptType(mCtrlSculptType->getCurrentIndex());
1658 1686
1659 mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); 1687 mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
1660} 1688}
@@ -1863,7 +1891,9 @@ void LLPanelObject::onSelectSculpt(LLUICtrl* ctrl, void* userdata)
1863 LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control"); 1891 LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control");
1864 1892
1865 if (mTextureCtrl) 1893 if (mTextureCtrl)
1894 {
1866 self->mSculptTextureRevert = mTextureCtrl->getImageAssetID(); 1895 self->mSculptTextureRevert = mTextureCtrl->getImageAssetID();
1896 }
1867 1897
1868 self->sendSculpt(); 1898 self->sendSculpt();
1869} 1899}
@@ -1890,7 +1920,6 @@ BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdat
1890 mTextureCtrl->setImageAssetID(asset); 1920 mTextureCtrl->setImageAssetID(asset);
1891 self->mSculptTextureRevert = asset; 1921 self->mSculptTextureRevert = asset;
1892 } 1922 }
1893
1894 1923
1895 return TRUE; 1924 return TRUE;
1896} 1925}
@@ -1909,3 +1938,11 @@ void LLPanelObject::onCancelSculpt(LLUICtrl* ctrl, void* userdata)
1909 1938
1910 self->sendSculpt(); 1939 self->sendSculpt();
1911} 1940}
1941
1942// static
1943void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata)
1944{
1945 LLPanelObject* self = (LLPanelObject*) userdata;
1946
1947 self->sendSculpt();
1948}
diff --git a/linden/indra/newview/llpanelobject.h b/linden/indra/newview/llpanelobject.h
index c734b38..ac0b96c 100644
--- a/linden/indra/newview/llpanelobject.h
+++ b/linden/indra/newview/llpanelobject.h
@@ -77,7 +77,9 @@ public:
77 static void onCommitSculpt( LLUICtrl* ctrl, void* userdata); 77 static void onCommitSculpt( LLUICtrl* ctrl, void* userdata);
78 static void onCancelSculpt( LLUICtrl* ctrl, void* userdata); 78 static void onCancelSculpt( LLUICtrl* ctrl, void* userdata);
79 static void onSelectSculpt( LLUICtrl* ctrl, void* userdata); 79 static void onSelectSculpt( LLUICtrl* ctrl, void* userdata);
80 static BOOL onDropSculpt(LLUICtrl* ctrl, LLInventoryItem* item, void* ud); 80 static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
81 static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
82
81 83
82protected: 84protected:
83 void getState(); 85 void getState();
@@ -163,6 +165,8 @@ protected:
163 LLCheckBoxCtrl *mCheckCastShadows; 165 LLCheckBoxCtrl *mCheckCastShadows;
164 166
165 LLTextureCtrl *mCtrlSculptTexture; 167 LLTextureCtrl *mCtrlSculptTexture;
168 LLTextBox *mLabelSculptType;
169 LLComboBox *mCtrlSculptType;
166 170
167 LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed 171 LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
168 BOOL mIsPhysical; // to avoid sending "physical" when not changed 172 BOOL mIsPhysical; // to avoid sending "physical" when not changed
@@ -172,6 +176,7 @@ protected:
172 S32 mSelectedType; // So we know what selected type we last were 176 S32 mSelectedType; // So we know what selected type we last were
173 177
174 LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel 178 LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel
179 U8 mSculptTypeRevert; // so we can revert the sculpt type on cancel
175 180
176 LLPointer<LLViewerObject> mObject; 181 LLPointer<LLViewerObject> mObject;
177 LLPointer<LLViewerObject> mRootObject; 182 LLPointer<LLViewerObject> mRootObject;
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp
index 738c340..fad1742 100644
--- a/linden/indra/newview/llprefsim.cpp
+++ b/linden/indra/newview/llprefsim.cpp
@@ -155,7 +155,7 @@ BOOL LLPrefsIMImpl::postBuild()
155 childSetText("log_path_string", mLogPath); 155 childSetText("log_path_string", mLogPath);
156 childSetValue("log_instant_messages", mLogInstantMessages); 156 childSetValue("log_instant_messages", mLogInstantMessages);
157 childSetValue("log_chat", mLogChat); 157 childSetValue("log_chat", mLogChat);
158 childSetValue("log_show_history", mIMLogTimestamp); 158 childSetValue("log_show_history", mLogShowHistory);
159 childSetValue("log_instant_messages_timestamp", mIMLogTimestamp); 159 childSetValue("log_instant_messages_timestamp", mIMLogTimestamp);
160 childSetValue("log_chat_timestamp", mLogChatTimestamp); 160 childSetValue("log_chat_timestamp", mLogChatTimestamp);
161 childSetValue("log_chat_IM", mLogIMChat); 161 childSetValue("log_chat_IM", mLogIMChat);
diff --git a/linden/indra/newview/llprefsvoice.h b/linden/indra/newview/llprefsvoice.h
index e6b861d..4e48fd7 100644
--- a/linden/indra/newview/llprefsvoice.h
+++ b/linden/indra/newview/llprefsvoice.h
@@ -1,8 +1,8 @@
1/** 1/**
2 * @file llprefsvoice.h 2 * @file llprefsvoice.h
3 * @brief Voice chat preferences panel 3 * @brief Voice chat preferences panel
4 * 4 *
5 * Copyright (c) 2003-2007, Linden Research, Inc. 5 * Copyright (c) 2003-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code 7 * Second Life Viewer Source Code
8 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -23,18 +23,18 @@
23 * 23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 26 * COMPLETENESS OR PERFORMANCE.
27 */ 27 */
28 28
29#ifndef LLPREFSVOICE_H 29#ifndef LLPREFSVOICE_H
30#define LLPREFSVOICE_H 30#define LLPREFSVOICE_H
31 31
32#include "llpanel.h" 32#include "llpanel.h"
33 33
34class LLFloaterDeviceSettings; 34class LLFloaterDeviceSettings;
35 35
36class LLPrefsVoiceLogic 36class LLPrefsVoiceLogic
37{ 37{
38public: 38public:
39 LLPrefsVoiceLogic(LLPanel* panelp); 39 LLPrefsVoiceLogic(LLPanel* panelp);
40 virtual ~LLPrefsVoiceLogic(){}; 40 virtual ~LLPrefsVoiceLogic(){};
@@ -51,8 +51,8 @@ protected:
51 51
52 static void onClickSetKey(void* user_data); 52 static void onClickSetKey(void* user_data);
53 static void onClickSetMiddleMouse(void* user_data); 53 static void onClickSetMiddleMouse(void* user_data);
54 static void onEarLocationCommit(LLUICtrl* ctrl, void* user_data); 54 static void onEarLocationCommit(LLUICtrl* ctrl, void* user_data);
55 static void onClickLaunchWizard(void* user_data); 55 static void onClickLaunchWizard(void* user_data);
56 56
57 BOOL mEnableVoice; 57 BOOL mEnableVoice;
58 BOOL mVoiceCallsFriendsOnly; 58 BOOL mVoiceCallsFriendsOnly;
@@ -60,28 +60,28 @@ protected:
60 std::string mModifier; 60 std::string mModifier;
61 BOOL mPushToTalkToggle; 61 BOOL mPushToTalkToggle;
62 S32 mEarLocation; 62 S32 mEarLocation;
63 LLCtrlSelectionInterface *mCtrlEarLocation; 63 LLCtrlSelectionInterface *mCtrlEarLocation;
64 64
65 BOOL mEatNextSetKeyClick; 65 BOOL mEatNextSetKeyClick;
66 66
67 LLPanel* mPanel; 67 LLPanel* mPanel;
68}; 68};
69 69
70class LLPrefsVoice : public LLPanel 70class LLPrefsVoice : public LLPanel
71{ 71{
72public: 72public:
73 LLPrefsVoice(); 73 LLPrefsVoice();
74 ~LLPrefsVoice(); 74 ~LLPrefsVoice();
75 75
76 /*virtual*/ void draw(); 76 /*virtual*/ void draw();
77 void apply(); 77 void apply();
78 void cancel(); 78 void cancel();
79 79
80protected: 80protected:
81 static void onClickDeviceSettingsBtn(void* user_data); 81 static void onClickDeviceSettingsBtn(void* user_data);
82 82
83 LLPrefsVoiceLogic* mLogic; 83 LLPrefsVoiceLogic* mLogic;
84 LLFloaterDeviceSettings* mDeviceSettings; 84 LLFloaterDeviceSettings* mDeviceSettings;
85}; 85};
86 86
87#endif // LLPREFSVOICE_H 87#endif // LLPREFSVOICE_H
diff --git a/linden/indra/newview/llpreview.cpp b/linden/indra/newview/llpreview.cpp
index 751a90f..4993852 100644
--- a/linden/indra/newview/llpreview.cpp
+++ b/linden/indra/newview/llpreview.cpp
@@ -300,12 +300,18 @@ bool LLPreview::save( const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemp
300} 300}
301 301
302// static 302// static
303void LLPreview::hide(const LLUUID& item_uuid) 303void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ )
304{ 304{
305 preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid); 305 preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid);
306 if(found_it != LLPreview::sInstances.end()) 306 if(found_it != LLPreview::sInstances.end())
307 { 307 {
308 LLPreview* instance = found_it->second; 308 LLPreview* instance = found_it->second;
309
310 if ( no_saving )
311 {
312 instance->mForceClose = TRUE;
313 }
314
309 instance->close(); 315 instance->close();
310 } 316 }
311} 317}
diff --git a/linden/indra/newview/llpreview.h b/linden/indra/newview/llpreview.h
index 0369227..dcf7fbb 100644
--- a/linden/indra/newview/llpreview.h
+++ b/linden/indra/newview/llpreview.h
@@ -81,7 +81,7 @@ public:
81 81
82 static LLPreview* find(const LLUUID& item_uuid); 82 static LLPreview* find(const LLUUID& item_uuid);
83 static LLPreview* show(const LLUUID& item_uuid, BOOL take_focus = TRUE ); 83 static LLPreview* show(const LLUUID& item_uuid, BOOL take_focus = TRUE );
84 static void hide(const LLUUID& item_uuid); 84 static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE );
85 static void rename(const LLUUID& item_uuid, const std::string& new_name); 85 static void rename(const LLUUID& item_uuid, const std::string& new_name);
86 static bool save(const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemptr); 86 static bool save(const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemptr);
87 87
diff --git a/linden/indra/newview/llpreviewgesture.cpp b/linden/indra/newview/llpreviewgesture.cpp
index 23e6aa5..1afa523 100644
--- a/linden/indra/newview/llpreviewgesture.cpp
+++ b/linden/indra/newview/llpreviewgesture.cpp
@@ -266,7 +266,8 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
266// virtual 266// virtual
267BOOL LLPreviewGesture::canClose() 267BOOL LLPreviewGesture::canClose()
268{ 268{
269 if(!mDirty) 269
270 if(!mDirty || mForceClose)
270 { 271 {
271 return TRUE; 272 return TRUE;
272 } 273 }
@@ -884,7 +885,7 @@ void LLPreviewGesture::loadAsset()
884void LLPreviewGesture::onLoadComplete(LLVFS *vfs, 885void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
885 const LLUUID& asset_uuid, 886 const LLUUID& asset_uuid,
886 LLAssetType::EType type, 887 LLAssetType::EType type,
887 void* user_data, S32 status) 888 void* user_data, S32 status, LLExtStat ext_status)
888{ 889{
889 LLUUID* item_idp = (LLUUID*)user_data; 890 LLUUID* item_idp = (LLUUID*)user_data;
890 LLPreview* preview = LLPreview::find(*item_idp); 891 LLPreview* preview = LLPreview::find(*item_idp);
@@ -1180,7 +1181,7 @@ void LLPreviewGesture::saveIfNeeded()
1180// TODO: This is very similar to LLPreviewNotecard::onSaveComplete. 1181// TODO: This is very similar to LLPreviewNotecard::onSaveComplete.
1181// Could merge code. 1182// Could merge code.
1182// static 1183// static
1183void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) 1184void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
1184{ 1185{
1185 LLSaveInfo* info = (LLSaveInfo*)user_data; 1186 LLSaveInfo* info = (LLSaveInfo*)user_data;
1186 if (info && (status == 0)) 1187 if (info && (status == 0))
diff --git a/linden/indra/newview/llpreviewgesture.h b/linden/indra/newview/llpreviewgesture.h
index e0ccffd..a7abb7e 100644
--- a/linden/indra/newview/llpreviewgesture.h
+++ b/linden/indra/newview/llpreviewgesture.h
@@ -87,7 +87,7 @@ protected:
87 static void onLoadComplete(LLVFS *vfs, 87 static void onLoadComplete(LLVFS *vfs,
88 const LLUUID& asset_uuid, 88 const LLUUID& asset_uuid,
89 LLAssetType::EType type, 89 LLAssetType::EType type,
90 void* user_data, S32 status); 90 void* user_data, S32 status, LLExtStat ext_status);
91 91
92 void loadUIFromGesture(LLMultiGesture* gesture); 92 void loadUIFromGesture(LLMultiGesture* gesture);
93 93
@@ -95,7 +95,7 @@ protected:
95 95
96 static void onSaveComplete(const LLUUID& asset_uuid, 96 static void onSaveComplete(const LLUUID& asset_uuid,
97 void* user_data, 97 void* user_data,
98 S32 status); 98 S32 status, LLExtStat ext_status);
99 99
100 static void handleSaveChangesDialog(S32 option, void* userdata); 100 static void handleSaveChangesDialog(S32 option, void* userdata);
101 101
diff --git a/linden/indra/newview/llpreviewnotecard.cpp b/linden/indra/newview/llpreviewnotecard.cpp
index 5943b3e..ce37d64 100644
--- a/linden/indra/newview/llpreviewnotecard.cpp
+++ b/linden/indra/newview/llpreviewnotecard.cpp
@@ -349,7 +349,7 @@ void LLPreviewNotecard::loadAsset()
349void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, 349void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
350 const LLUUID& asset_uuid, 350 const LLUUID& asset_uuid,
351 LLAssetType::EType type, 351 LLAssetType::EType type,
352 void* user_data, S32 status) 352 void* user_data, S32 status, LLExtStat ext_status)
353{ 353{
354 llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl; 354 llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl;
355 LLUUID* item_id = (LLUUID*)user_data; 355 LLUUID* item_id = (LLUUID*)user_data;
@@ -537,7 +537,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
537} 537}
538 538
539// static 539// static
540void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) 540void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
541{ 541{
542 LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data; 542 LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data;
543 if(info && (0 == status)) 543 if(info && (0 == status))
diff --git a/linden/indra/newview/llpreviewnotecard.h b/linden/indra/newview/llpreviewnotecard.h
index 715abac..6a52b1f 100644
--- a/linden/indra/newview/llpreviewnotecard.h
+++ b/linden/indra/newview/llpreviewnotecard.h
@@ -89,13 +89,13 @@ protected:
89 static void onLoadComplete(LLVFS *vfs, 89 static void onLoadComplete(LLVFS *vfs,
90 const LLUUID& asset_uuid, 90 const LLUUID& asset_uuid,
91 LLAssetType::EType type, 91 LLAssetType::EType type,
92 void* user_data, S32 status); 92 void* user_data, S32 status, LLExtStat ext_status);
93 93
94 static void onClickSave(void* data); 94 static void onClickSave(void* data);
95 95
96 static void onSaveComplete(const LLUUID& asset_uuid, 96 static void onSaveComplete(const LLUUID& asset_uuid,
97 void* user_data, 97 void* user_data,
98 S32 status); 98 S32 status, LLExtStat ext_status);
99 99
100 static void handleSaveChangesDialog(S32 option, void* userdata); 100 static void handleSaveChangesDialog(S32 option, void* userdata);
101 101
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp
index a2ea141..cce672b 100644
--- a/linden/indra/newview/llpreviewscript.cpp
+++ b/linden/indra/newview/llpreviewscript.cpp
@@ -291,6 +291,7 @@ LLScriptEdCore::LLScriptEdCore(
291 const LLViewHandle& floater_handle, 291 const LLViewHandle& floater_handle,
292 void (*load_callback)(void*), 292 void (*load_callback)(void*),
293 void (*save_callback)(void*, BOOL), 293 void (*save_callback)(void*, BOOL),
294 void (*search_replace_callback) (void* userdata),
294 void* userdata, 295 void* userdata,
295 S32 bottom_pad) 296 S32 bottom_pad)
296 : 297 :
@@ -300,6 +301,7 @@ LLScriptEdCore::LLScriptEdCore(
300 mEditor( NULL ), 301 mEditor( NULL ),
301 mLoadCallback( load_callback ), 302 mLoadCallback( load_callback ),
302 mSaveCallback( save_callback ), 303 mSaveCallback( save_callback ),
304 mSearchReplaceCallback( search_replace_callback ),
303 mUserdata( userdata ), 305 mUserdata( userdata ),
304 mForceClose( FALSE ), 306 mForceClose( FALSE ),
305 mLastHelpToken(NULL), 307 mLastHelpToken(NULL),
@@ -1028,7 +1030,9 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
1028{ 1030{
1029 if(getVisible() && getEnabled()) 1031 if(getVisible() && getEnabled())
1030 { 1032 {
1031 if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) 1033 bool just_control = MASK_CONTROL == (mask & MASK_MODIFIERS);
1034
1035 if(('S' == key) && just_control)
1032 { 1036 {
1033 if(mSaveCallback) 1037 if(mSaveCallback)
1034 { 1038 {
@@ -1038,6 +1042,16 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
1038 1042
1039 return TRUE; 1043 return TRUE;
1040 } 1044 }
1045
1046 if(('F' == key) && just_control)
1047 {
1048 if(mSearchReplaceCallback)
1049 {
1050 mSearchReplaceCallback(mUserdata);
1051 }
1052
1053 return TRUE;
1054 }
1041 } 1055 }
1042 return FALSE; 1056 return FALSE;
1043} 1057}
@@ -1071,6 +1085,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
1071 self->mViewHandle, 1085 self->mViewHandle,
1072 LLPreviewLSL::onLoad, 1086 LLPreviewLSL::onLoad,
1073 LLPreviewLSL::onSave, 1087 LLPreviewLSL::onSave,
1088 LLPreviewLSL::onSearchReplace,
1074 self, 1089 self,
1075 0); 1090 0);
1076 1091
@@ -1220,6 +1235,13 @@ void LLPreviewLSL::open() /*Flawfinder: ignore*/
1220 LLFloater::open(); /*Flawfinder: ignore*/ 1235 LLFloater::open(); /*Flawfinder: ignore*/
1221} 1236}
1222 1237
1238void LLPreviewLSL::onSearchReplace(void* userdata)
1239{
1240 LLPreviewLSL* self = (LLPreviewLSL*)userdata;
1241 LLScriptEdCore* sec = self->mScriptEd;
1242 LLFloaterScriptSearch::show(sec);
1243}
1244
1223// static 1245// static
1224void LLPreviewLSL::onLoad(void* userdata) 1246void LLPreviewLSL::onLoad(void* userdata)
1225{ 1247{
@@ -1386,7 +1408,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename,
1386 1408
1387 1409
1388// static 1410// static
1389void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) 1411void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
1390{ 1412{
1391 LLScriptSaveInfo* info = reinterpret_cast<LLScriptSaveInfo*>(user_data); 1413 LLScriptSaveInfo* info = reinterpret_cast<LLScriptSaveInfo*>(user_data);
1392 if(0 == status) 1414 if(0 == status)
@@ -1435,7 +1457,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
1435} 1457}
1436 1458
1437// static 1459// static
1438void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) 1460void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
1439{ 1461{
1440 LLUUID* instance_uuid = (LLUUID*)user_data; 1462 LLUUID* instance_uuid = (LLUUID*)user_data;
1441 LLPreviewLSL* self = NULL; 1463 LLPreviewLSL* self = NULL;
@@ -1474,7 +1496,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
1474 1496
1475// static 1497// static
1476void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, 1498void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type,
1477 void* user_data, S32 status) 1499 void* user_data, S32 status, LLExtStat ext_status)
1478{ 1500{
1479 lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid 1501 lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid
1480 << llendl; 1502 << llendl;
@@ -1579,6 +1601,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
1579 self->mViewHandle, 1601 self->mViewHandle,
1580 &LLLiveLSLEditor::onLoad, 1602 &LLLiveLSLEditor::onLoad,
1581 &LLLiveLSLEditor::onSave, 1603 &LLLiveLSLEditor::onSave,
1604 &LLLiveLSLEditor::onSearchReplace,
1582 self, 1605 self,
1583 0); 1606 0);
1584 1607
@@ -1793,7 +1816,7 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new)
1793// static 1816// static
1794void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, 1817void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
1795 LLAssetType::EType type, 1818 LLAssetType::EType type,
1796 void* user_data, S32 status) 1819 void* user_data, S32 status, LLExtStat ext_status)
1797{ 1820{
1798 lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id 1821 lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
1799 << llendl; 1822 << llendl;
@@ -1976,6 +1999,15 @@ void LLLiveLSLEditor::draw()
1976 } 1999 }
1977} 2000}
1978 2001
2002
2003void LLLiveLSLEditor::onSearchReplace(void* userdata)
2004{
2005 LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
2006
2007 LLScriptEdCore* sec = self->mScriptEd;
2008 LLFloaterScriptSearch::show(sec);
2009}
2010
1979struct LLLiveLSLSaveData 2011struct LLLiveLSLSaveData
1980{ 2012{
1981 LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active); 2013 LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active);
@@ -2189,7 +2221,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename,
2189 runningCheckbox->setEnabled(TRUE); 2221 runningCheckbox->setEnabled(TRUE);
2190} 2222}
2191 2223
2192void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) 2224void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
2193{ 2225{
2194 LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; 2226 LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data;
2195 2227
@@ -2219,7 +2251,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
2219} 2251}
2220 2252
2221 2253
2222void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed) 2254void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
2223{ 2255{
2224 LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; 2256 LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data;
2225 if(!data) 2257 if(!data)
diff --git a/linden/indra/newview/llpreviewscript.h b/linden/indra/newview/llpreviewscript.h
index 4aadc8b..9cc0e46 100644
--- a/linden/indra/newview/llpreviewscript.h
+++ b/linden/indra/newview/llpreviewscript.h
@@ -67,6 +67,7 @@ public:
67 const LLViewHandle& floater_handle, 67 const LLViewHandle& floater_handle,
68 void (*load_callback)(void* userdata), 68 void (*load_callback)(void* userdata),
69 void (*save_callback)(void* userdata, BOOL close_after_save), 69 void (*save_callback)(void* userdata, BOOL close_after_save),
70 void (*search_replace_callback)(void* userdata),
70 void* userdata, 71 void* userdata,
71 S32 bottom_pad = 0); // pad below bottom row of buttons 72 S32 bottom_pad = 0); // pad below bottom row of buttons
72 ~LLScriptEdCore(); 73 ~LLScriptEdCore();
@@ -130,6 +131,7 @@ private:
130 LLTextEditor* mEditor; 131 LLTextEditor* mEditor;
131 void (*mLoadCallback)(void* userdata); 132 void (*mLoadCallback)(void* userdata);
132 void (*mSaveCallback)(void* userdata, BOOL close_after_save); 133 void (*mSaveCallback)(void* userdata, BOOL close_after_save);
134 void (*mSearchReplaceCallback) (void* userdata);
133 void* mUserdata; 135 void* mUserdata;
134 LLComboBox *mFunctions; 136 LLComboBox *mFunctions;
135 BOOL mForceClose; 137 BOOL mForceClose;
@@ -169,14 +171,15 @@ protected:
169 const LLUUID& item_id, 171 const LLUUID& item_id,
170 const LLTransactionID& tid); 172 const LLTransactionID& tid);
171 173
174 static void onSearchReplace(void* userdata);
172 static void onLoad(void* userdata); 175 static void onLoad(void* userdata);
173 static void onSave(void* userdata, BOOL close_after_save); 176 static void onSave(void* userdata, BOOL close_after_save);
174 177
175 static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid, 178 static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid,
176 LLAssetType::EType type, 179 LLAssetType::EType type,
177 void* user_data, S32 status); 180 void* user_data, S32 status, LLExtStat ext_status);
178 static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status); 181 static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status);
179 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status); 182 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
180 static LLPreviewLSL* getInstance(const LLUUID& uuid); 183 static LLPreviewLSL* getInstance(const LLUUID& uuid);
181 184
182 static void* createScriptEdPanel(void* userdata); 185 static void* createScriptEdPanel(void* userdata);
@@ -229,14 +232,15 @@ protected:
229 const LLTransactionID& tid, 232 const LLTransactionID& tid,
230 BOOL is_running); 233 BOOL is_running);
231 234
235 static void onSearchReplace(void* userdata);
232 static void onLoad(void* userdata); 236 static void onLoad(void* userdata);
233 static void onSave(void* userdata, BOOL close_after_save); 237 static void onSave(void* userdata, BOOL close_after_save);
234 238
235 static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, 239 static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid,
236 LLAssetType::EType type, 240 LLAssetType::EType type,
237 void* user_data, S32 status); 241 void* user_data, S32 status, LLExtStat ext_status);
238 static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status); 242 static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
239 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status); 243 static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
240 static void onRunningCheckboxClicked(LLUICtrl*, void* userdata); 244 static void onRunningCheckboxClicked(LLUICtrl*, void* userdata);
241 static void onReset(void* userdata); 245 static void onReset(void* userdata);
242 246
diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp
index 283b38b..00bb724 100644
--- a/linden/indra/newview/llspatialpartition.cpp
+++ b/linden/indra/newview/llspatialpartition.cpp
@@ -71,7 +71,7 @@ void sg_assert(BOOL expr)
71#endif 71#endif
72} 72}
73 73
74#if !LL_RELEASE_FOR_DOWNLOAD 74#if LL_DEBUG
75void validate_drawable(LLDrawable* drawablep) 75void validate_drawable(LLDrawable* drawablep)
76{ 76{
77 F64 rad = drawablep->getBinRadius(); 77 F64 rad = drawablep->getBinRadius();
@@ -153,10 +153,6 @@ LLSpatialGroup::~LLSpatialGroup()
153 153
154void LLSpatialGroup::clearDrawMap() 154void LLSpatialGroup::clearDrawMap()
155{ 155{
156 for (LLSpatialGroup::draw_map_t::iterator i = mDrawMap.begin(); i != mDrawMap.end(); ++i)
157 {
158 std::for_each(i->second.begin(), i->second.end(), DeletePointer());
159 }
160 mDrawMap.clear(); 156 mDrawMap.clear();
161} 157}
162 158
@@ -2323,7 +2319,7 @@ void pushVerts(LLSpatialGroup* group, U32 mask)
2323 2319
2324 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) 2320 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
2325 { 2321 {
2326 for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j) 2322 for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
2327 { 2323 {
2328 params = *j; 2324 params = *j;
2329 pushVerts(params, mask); 2325 pushVerts(params, mask);
@@ -2351,7 +2347,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
2351 2347
2352 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) 2348 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
2353 { 2349 {
2354 for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j) 2350 for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
2355 { 2351 {
2356 params = *j; 2352 params = *j;
2357 glColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f); 2353 glColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f);
@@ -2702,8 +2698,8 @@ public:
2702 2698
2703 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) 2699 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
2704 { 2700 {
2705 std::vector<LLDrawInfo*>& draw_vec = i->second; 2701 LLSpatialGroup::drawmap_elem_t& draw_vec = i->second;
2706 for (std::vector<LLDrawInfo*>::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j) 2702 for (LLSpatialGroup::drawmap_elem_t::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j)
2707 { 2703 {
2708 LLDrawInfo* draw_info = *j; 2704 LLDrawInfo* draw_info = *j;
2709 if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_ANIM)) 2705 if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_ANIM))
@@ -2889,6 +2885,11 @@ LLDrawInfo::LLDrawInfo(U32 start, U32 end, U32 count, U32 offset,
2889{ 2885{
2890} 2886}
2891 2887
2888LLDrawInfo::~LLDrawInfo()
2889{
2890
2891}
2892
2892LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage) 2893LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage)
2893{ 2894{
2894 return new LLVertexBuffer(type_mask, usage); 2895 return new LLVertexBuffer(type_mask, usage);
diff --git a/linden/indra/newview/llspatialpartition.h b/linden/indra/newview/llspatialpartition.h
index 3046b73..31ec040 100644
--- a/linden/indra/newview/llspatialpartition.h
+++ b/linden/indra/newview/llspatialpartition.h
@@ -46,13 +46,17 @@
46class LLSpatialPartition; 46class LLSpatialPartition;
47class LLSpatialBridge; 47class LLSpatialBridge;
48 48
49class LLDrawInfo 49class LLDrawInfo : public LLRefCount
50{ 50{
51protected:
52 ~LLDrawInfo();
53
51public: 54public:
52 LLDrawInfo(U32 start, U32 end, U32 count, U32 offset, 55 LLDrawInfo(U32 start, U32 end, U32 count, U32 offset,
53 LLViewerImage* image, LLVertexBuffer* buffer, 56 LLViewerImage* image, LLVertexBuffer* buffer,
54 BOOL fullbright = FALSE, U8 bump = 0, BOOL particle = FALSE, F32 part_size = 0); 57 BOOL fullbright = FALSE, U8 bump = 0, BOOL particle = FALSE, F32 part_size = 0);
55 58
59
56 LLPointer<LLVertexBuffer> mVertexBuffer; 60 LLPointer<LLVertexBuffer> mVertexBuffer;
57 LLPointer<LLViewerImage> mTexture; 61 LLPointer<LLViewerImage> mTexture;
58 LLPointer<LLCubeMap> mReflectionMap; 62 LLPointer<LLCubeMap> mReflectionMap;
@@ -78,18 +82,21 @@ public:
78 82
79 struct CompareTexturePtr 83 struct CompareTexturePtr
80 { 84 {
81 bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs) 85 bool operator()(const LLPointer<LLDrawInfo>& lhs, const LLPointer<LLDrawInfo>& rhs)
82 { 86 {
83 87 // sort by pointer, sort NULL down to the end
84 return lhs == NULL || rhs == NULL || lhs->mTexture > rhs->mTexture; 88 return lhs.get() != rhs.get()
89 && (lhs.isNull() || (rhs.notNull() && lhs->mTexture.get() > rhs->mTexture.get()));
85 } 90 }
86 }; 91 };
87 92
88 struct CompareBump 93 struct CompareBump
89 { 94 {
90 bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs) 95 bool operator()(const LLPointer<LLDrawInfo>& lhs, const LLPointer<LLDrawInfo>& rhs)
91 { 96 {
92 return lhs == NULL || rhs == NULL || lhs->mBump > rhs->mBump; 97 // sort by mBump value, sort NULL down to the end
98 return lhs.get() != rhs.get()
99 && (lhs.isNull() || (rhs.notNull() && lhs->mBump > rhs->mBump));
93 } 100 }
94 }; 101 };
95}; 102};
@@ -102,7 +109,8 @@ public:
102 typedef std::vector<LLPointer<LLSpatialGroup> > sg_vector_t; 109 typedef std::vector<LLPointer<LLSpatialGroup> > sg_vector_t;
103 typedef std::set<LLPointer<LLSpatialGroup> > sg_set_t; 110 typedef std::set<LLPointer<LLSpatialGroup> > sg_set_t;
104 typedef std::vector<LLPointer<LLSpatialBridge> > bridge_list_t; 111 typedef std::vector<LLPointer<LLSpatialBridge> > bridge_list_t;
105 typedef std::map<U32, std::vector<LLDrawInfo*> > draw_map_t; 112 typedef std::vector<LLPointer<LLDrawInfo> > drawmap_elem_t;
113 typedef std::map<U32, drawmap_elem_t > draw_map_t;
106 typedef std::map<LLPointer<LLViewerImage>, LLPointer<LLVertexBuffer> > buffer_map_t; 114 typedef std::map<LLPointer<LLViewerImage>, LLPointer<LLVertexBuffer> > buffer_map_t;
107 115
108 typedef LLOctreeListener<LLDrawable> BaseType; 116 typedef LLOctreeListener<LLDrawable> BaseType;
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 7c76634..3f02f6a 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -64,7 +64,7 @@
64#include "llsecondlifeurls.h" 64#include "llsecondlifeurls.h"
65#include "llstring.h" 65#include "llstring.h"
66#include "lluserrelations.h" 66#include "lluserrelations.h"
67#include "llversion.h" 67#include "llversionviewer.h"
68#include "llvfs.h" 68#include "llvfs.h"
69#include "llwindow.h" // for shell_open 69#include "llwindow.h" // for shell_open
70#include "llxorcipher.h" // saved password, MAC address 70#include "llxorcipher.h" // saved password, MAC address
@@ -216,6 +216,9 @@ LLString gInitialOutfitGender; // "male" or "female"
216 216
217static bool gUseCircuitCallbackCalled = false; 217static bool gUseCircuitCallbackCalled = false;
218 218
219S32 LLStartUp::gStartupState = STATE_FIRST;
220
221
219// 222//
220// local function declaration 223// local function declaration
221// 224//
@@ -356,7 +359,7 @@ BOOL idle_startup()
356 gImageList.updateImages(0.01f); 359 gImageList.updateImages(0.01f);
357 } 360 }
358 361
359 if (STATE_FIRST == gStartupState) 362 if ( STATE_FIRST == LLStartUp::getStartupState() )
360 { 363 {
361 gViewerWindow->showCursor(); 364 gViewerWindow->showCursor();
362 gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); 365 gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT);
@@ -565,10 +568,7 @@ BOOL idle_startup()
565#endif // LL_LINUX 568#endif // LL_LINUX
566 569
567 std::ostringstream codec; 570 std::ostringstream codec;
568 codec << "[Second Life "; 571 codec << "[Second Life " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD << "]";
569 codec << "(" << gChannelName << ")";
570 codec << " - " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD;
571 codec << "]";
572 LLMozLib::getInstance()->setBrowserAgentId( codec.str() ); 572 LLMozLib::getInstance()->setBrowserAgentId( codec.str() );
573 #endif 573 #endif
574 574
@@ -608,67 +608,49 @@ BOOL idle_startup()
608 llwarns << "Unreliable timers detected (may be bad PCI chipset)!!" << llendl; 608 llwarns << "Unreliable timers detected (may be bad PCI chipset)!!" << llendl;
609 } 609 }
610 610
611 // Get ready to show the login dialog 611 //
612 if (!gConnectToSomething) 612 // Log on to system
613 //
614 if( !gCmdLineFirstName.empty()
615 && !gCmdLineLastName.empty()
616 && !gCmdLinePassword.empty())
613 { 617 {
614 // Don't use a session token, and generate a random user id 618 firstname = gCmdLineFirstName;
615 gAgentID.generate(); 619 lastname = gCmdLineLastName;
616 gAgentSessionID = LLUUID::null;
617 620
618 gStartupState = STATE_WORLD_INIT; 621 LLMD5 pass((unsigned char*)gCmdLinePassword.c_str());
619 return do_normal_idle; 622 char md5pass[33]; /* Flawfinder: ignore */
623 pass.hex_digest(md5pass);
624 password = md5pass;
625
626 remember_password = gSavedSettings.getBOOL("RememberPassword");
627 show_connect_box = FALSE;
620 } 628 }
621 else if (!gRunLocal) 629 else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin"))
622 { 630 {
623 // 631 firstname = gSavedSettings.getString("FirstName");
624 // Log on to userserver 632 lastname = gSavedSettings.getString("LastName");
625 // 633 password = load_password_from_disk();
626 if( !gCmdLineFirstName.empty() 634 remember_password = TRUE;
627 && !gCmdLineLastName.empty() 635 show_connect_box = FALSE;
628 && !gCmdLinePassword.empty())
629 {
630 firstname = gCmdLineFirstName;
631 lastname = gCmdLineLastName;
632
633 LLMD5 pass((unsigned char*)gCmdLinePassword.c_str());
634 char md5pass[33]; /* Flawfinder: ignore */
635 pass.hex_digest(md5pass);
636 password = md5pass;
637
638 remember_password = gSavedSettings.getBOOL("RememberPassword");
639 show_connect_box = FALSE;
640 }
641 else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin"))
642 {
643 firstname = gSavedSettings.getString("FirstName");
644 lastname = gSavedSettings.getString("LastName");
645 password = load_password_from_disk();
646 remember_password = TRUE;
647 show_connect_box = FALSE;
648 }
649 else
650 {
651 // if not automatically logging in, display login dialog
652 // until a valid userserver is selected
653 firstname = gSavedSettings.getString("FirstName");
654 lastname = gSavedSettings.getString("LastName");
655 password = load_password_from_disk();
656 remember_password = gSavedSettings.getBOOL("RememberPassword");
657 show_connect_box = TRUE;
658 }
659
660 // Go to the next startup state
661 gStartupState++;
662 return do_normal_idle;
663 } 636 }
664 else 637 else
665 { 638 {
666 gStartupState++; 639 // if not automatically logging in, display login dialog
667 return do_normal_idle; 640 // until a valid userserver is selected
641 firstname = gSavedSettings.getString("FirstName");
642 lastname = gSavedSettings.getString("LastName");
643 password = load_password_from_disk();
644 remember_password = gSavedSettings.getBOOL("RememberPassword");
645 show_connect_box = TRUE;
668 } 646 }
647
648 // Go to the next startup state
649 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
650 return do_normal_idle;
669 } 651 }
670 652
671 if (STATE_LOGIN_SHOW == gStartupState) 653 if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
672 { 654 {
673 llinfos << "Initializing Window" << llendl; 655 llinfos << "Initializing Window" << llendl;
674 656
@@ -678,45 +660,37 @@ BOOL idle_startup()
678 660
679 timeout_count = 0; 661 timeout_count = 0;
680 662
681 if (gConnectToSomething && !gRunLocal) 663 if (show_connect_box)
682 { 664 {
683 if (show_connect_box) 665 if (gNoRender)
684 { 666 {
685 if (gNoRender) 667 llerrs << "Need to autologin or use command line with norender!" << llendl;
686 { 668 }
687 llerrs << "Need to autologin or use command line with norender!" << llendl; 669 // Make sure the process dialog doesn't hide things
688 } 670 gViewerWindow->setShowProgress(FALSE);
689 // Make sure the process dialog doesn't hide things
690 gViewerWindow->setShowProgress(FALSE);
691 671
692 // Show the login dialog 672 // Show the login dialog
693 login_show(); 673 login_show();
694 674
695 // connect dialog is already shown, so fill in the names 675 // connect dialog is already shown, so fill in the names
696 LLPanelLogin::setFields( firstname, lastname, password, remember_password ); 676 LLPanelLogin::setFields( firstname, lastname, password, remember_password );
697 LLPanelLogin::giveFocus(); 677 LLPanelLogin::giveFocus();
698 678
699 gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); 679 gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
700 680
701 gStartupState++; 681 LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input
702 }
703 else
704 {
705 // skip directly to message template verification
706 gStartupState = STATE_LOGIN_CLEANUP;
707 }
708 } 682 }
709 else 683 else
710 { 684 {
711 gMessageSystem->setCircuitProtection(FALSE); 685 // skip directly to message template verification
712 gStartupState = STATE_LOGIN_CLEANUP; 686 LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
713 } 687 }
714 688
715 timeout.reset(); 689 timeout.reset();
716 return do_normal_idle; 690 return do_normal_idle;
717 } 691 }
718 692
719 if (STATE_LOGIN_WAIT == gStartupState) 693 if (STATE_LOGIN_WAIT == LLStartUp::getStartupState())
720 { 694 {
721 // Don't do anything. Wait for the login view to call the login_callback, 695 // Don't do anything. Wait for the login view to call the login_callback,
722 // which will push us to the next state. 696 // which will push us to the next state.
@@ -726,7 +700,7 @@ BOOL idle_startup()
726 return do_normal_idle; 700 return do_normal_idle;
727 } 701 }
728 702
729 if (STATE_LOGIN_CLEANUP == gStartupState) 703 if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
730 { 704 {
731 if (show_connect_box) 705 if (show_connect_box)
732 { 706 {
@@ -794,7 +768,7 @@ BOOL idle_startup()
794 { 768 {
795 LLString server_label; 769 LLString server_label;
796 S32 domain_name_index; 770 S32 domain_name_index;
797 LLPanelLogin::getServer( server_label, domain_name_index ); 771 BOOL user_picked_server = LLPanelLogin::getServer( server_label, domain_name_index );
798 gUserServerChoice = (EUserServerDomain) domain_name_index; 772 gUserServerChoice = (EUserServerDomain) domain_name_index;
799 gSavedSettings.setS32("ServerChoice", gUserServerChoice); 773 gSavedSettings.setS32("ServerChoice", gUserServerChoice);
800 if (gUserServerChoice == USERSERVER_OTHER) 774 if (gUserServerChoice == USERSERVER_OTHER)
@@ -802,14 +776,11 @@ BOOL idle_startup()
802 snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */ 776 snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */
803 } 777 }
804 778
805 // Dave S temp reversion of SL-49082 fix - this code breaks command line urls. I'll fix this with 779 if ( user_picked_server )
806 // the control isDirty() functionality tomorrow. 780 { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gUserServerChoice
807 781 auth_uris.clear();
808 //if ( userPickedServer ) 782 resetURIs();
809 //{ // User picked a grid from the popup, so clear the stored urls so they will be re-generated from gUserServerChoice 783 }
810 // auth_uris.clear();
811 // resetURIs();
812 //}
813 784
814 LLString location; 785 LLString location;
815 LLPanelLogin::getLocation( location ); 786 LLPanelLogin::getLocation( location );
@@ -872,18 +843,18 @@ BOOL idle_startup()
872 init_colors(); 843 init_colors();
873 844
874 // skipping over STATE_UPDATE_CHECK because that just waits for input 845 // skipping over STATE_UPDATE_CHECK because that just waits for input
875 gStartupState = STATE_LOGIN_AUTH_INIT; 846 LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
876 847
877 return do_normal_idle; 848 return do_normal_idle;
878 } 849 }
879 850
880 if (STATE_UPDATE_CHECK == gStartupState) 851 if (STATE_UPDATE_CHECK == LLStartUp::getStartupState())
881 { 852 {
882 // wait for user to give input via dialog box 853 // wait for user to give input via dialog box
883 return do_normal_idle; 854 return do_normal_idle;
884 } 855 }
885 856
886 if(STATE_LOGIN_AUTH_INIT == gStartupState) 857 if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState())
887 { 858 {
888//#define LL_MINIMIAL_REQUESTED_OPTIONS 859//#define LL_MINIMIAL_REQUESTED_OPTIONS
889 lldebugs << "STATE_LOGIN_AUTH_INIT" << llendl; 860 lldebugs << "STATE_LOGIN_AUTH_INIT" << llendl;
@@ -930,10 +901,10 @@ BOOL idle_startup()
930 auth_desc = "Logging in. "; 901 auth_desc = "Logging in. ";
931 auth_desc += gSecondLife; 902 auth_desc += gSecondLife;
932 auth_desc += " may appear frozen. Please wait."; 903 auth_desc += " may appear frozen. Please wait.";
933 ++gStartupState; 904 LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
934 } 905 }
935 906
936 if (STATE_LOGIN_AUTHENTICATE == gStartupState) 907 if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState())
937 { 908 {
938 lldebugs << "STATE_LOGIN_AUTHENTICATE" << llendl; 909 lldebugs << "STATE_LOGIN_AUTHENTICATE" << llendl;
939 set_startup_status(progress, auth_desc.c_str(), auth_message.c_str()); 910 set_startup_status(progress, auth_desc.c_str(), auth_message.c_str());
@@ -985,11 +956,11 @@ BOOL idle_startup()
985 // reset globals 956 // reset globals
986 gAcceptTOS = FALSE; 957 gAcceptTOS = FALSE;
987 gAcceptCriticalMessage = FALSE; 958 gAcceptCriticalMessage = FALSE;
988 ++gStartupState; 959 LLStartUp::setStartupState( STATE_LOGIN_NO_DATA_YET );
989 return do_normal_idle; 960 return do_normal_idle;
990 } 961 }
991 962
992 if(STATE_LOGIN_NO_DATA_YET == gStartupState) 963 if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState())
993 { 964 {
994 //lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl; 965 //lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl;
995 if (!gUserAuthp) 966 if (!gUserAuthp)
@@ -1008,13 +979,13 @@ BOOL idle_startup()
1008 //llinfos << "waiting..." << llendl; 979 //llinfos << "waiting..." << llendl;
1009 return do_normal_idle; 980 return do_normal_idle;
1010 } 981 }
1011 ++gStartupState; 982 LLStartUp::setStartupState( STATE_LOGIN_DOWNLOADING );
1012 progress += 0.01f; 983 progress += 0.01f;
1013 set_startup_status(progress, auth_desc.c_str(), auth_message.c_str()); 984 set_startup_status(progress, auth_desc.c_str(), auth_message.c_str());
1014 return do_normal_idle; 985 return do_normal_idle;
1015 } 986 }
1016 987
1017 if(STATE_LOGIN_DOWNLOADING == gStartupState) 988 if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState())
1018 { 989 {
1019 lldebugs << "STATE_LOGIN_DOWNLOADING" << llendl; 990 lldebugs << "STATE_LOGIN_DOWNLOADING" << llendl;
1020 if (!gUserAuthp) 991 if (!gUserAuthp)
@@ -1033,13 +1004,13 @@ BOOL idle_startup()
1033 //llinfos << "downloading..." << llendl; 1004 //llinfos << "downloading..." << llendl;
1034 return do_normal_idle; 1005 return do_normal_idle;
1035 } 1006 }
1036 ++gStartupState; 1007 LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
1037 progress += 0.01f; 1008 progress += 0.01f;
1038 set_startup_status(progress, "Processing Response...", auth_message.c_str()); 1009 set_startup_status(progress, "Processing Response...", auth_message.c_str());
1039 return do_normal_idle; 1010 return do_normal_idle;
1040 } 1011 }
1041 1012
1042 if(STATE_LOGIN_PROCESS_RESPONSE == gStartupState) 1013 if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
1043 { 1014 {
1044 lldebugs << "STATE_LOGIN_PROCESS_RESPONSE" << llendl; 1015 lldebugs << "STATE_LOGIN_PROCESS_RESPONSE" << llendl;
1045 std::ostringstream emsg; 1016 std::ostringstream emsg;
@@ -1078,7 +1049,7 @@ BOOL idle_startup()
1078 } 1049 }
1079 // ignoring the duration & options array for now. 1050 // ignoring the duration & options array for now.
1080 // Go back to authenticate. 1051 // Go back to authenticate.
1081 gStartupState = STATE_LOGIN_AUTHENTICATE; 1052 LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
1082 return do_normal_idle; 1053 return do_normal_idle;
1083 } 1054 }
1084 else 1055 else
@@ -1101,7 +1072,7 @@ BOOL idle_startup()
1101 if (show_connect_box) 1072 if (show_connect_box)
1102 { 1073 {
1103 llinfos << "Need tos agreement" << llendl; 1074 llinfos << "Need tos agreement" << llendl;
1104 gStartupState = STATE_UPDATE_CHECK; 1075 LLStartUp::setStartupState( STATE_UPDATE_CHECK );
1105 LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS, 1076 LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
1106 message_response); 1077 message_response);
1107 tos_dialog->startModal(); 1078 tos_dialog->startModal();
@@ -1118,7 +1089,7 @@ BOOL idle_startup()
1118 if (show_connect_box) 1089 if (show_connect_box)
1119 { 1090 {
1120 llinfos << "Need critical message" << llendl; 1091 llinfos << "Need critical message" << llendl;
1121 gStartupState = STATE_UPDATE_CHECK; 1092 LLStartUp::setStartupState( STATE_UPDATE_CHECK );
1122 LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE, 1093 LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
1123 message_response); 1094 message_response);
1124 tos_dialog->startModal(); 1095 tos_dialog->startModal();
@@ -1142,7 +1113,7 @@ BOOL idle_startup()
1142 if (show_connect_box) 1113 if (show_connect_box)
1143 { 1114 {
1144 update_app(TRUE, auth_message); 1115 update_app(TRUE, auth_message);
1145 gStartupState = STATE_UPDATE_CHECK; 1116 LLStartUp::setStartupState( STATE_UPDATE_CHECK );
1146 return FALSE; 1117 return FALSE;
1147 } 1118 }
1148 else 1119 else
@@ -1157,7 +1128,7 @@ BOOL idle_startup()
1157 if (show_connect_box) 1128 if (show_connect_box)
1158 { 1129 {
1159 update_app(FALSE, auth_message); 1130 update_app(FALSE, auth_message);
1160 gStartupState = STATE_UPDATE_CHECK; 1131 LLStartUp::setStartupState( STATE_UPDATE_CHECK );
1161 gSkipOptionalUpdate = TRUE; 1132 gSkipOptionalUpdate = TRUE;
1162 return FALSE; 1133 return FALSE;
1163 } 1134 }
@@ -1180,7 +1151,7 @@ BOOL idle_startup()
1180 s << "Previous login attempt failed. Logging in, attempt " 1151 s << "Previous login attempt failed. Logging in, attempt "
1181 << (auth_uri_num + 1) << ". "; 1152 << (auth_uri_num + 1) << ". ";
1182 auth_desc = s.str(); 1153 auth_desc = s.str();
1183 gStartupState = STATE_LOGIN_AUTHENTICATE; 1154 LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
1184 auth_uri_num++; 1155 auth_uri_num++;
1185 return do_normal_idle; 1156 return do_normal_idle;
1186 } 1157 }
@@ -1410,7 +1381,7 @@ BOOL idle_startup()
1410 && first_sim.isOk() 1381 && first_sim.isOk()
1411 && gAgent.mInventoryRootID.notNull()) 1382 && gAgent.mInventoryRootID.notNull())
1412 { 1383 {
1413 ++gStartupState; 1384 LLStartUp::setStartupState( STATE_WORLD_INIT );
1414 } 1385 }
1415 else 1386 else
1416 { 1387 {
@@ -1454,7 +1425,7 @@ BOOL idle_startup()
1454 //--------------------------------------------------------------------- 1425 //---------------------------------------------------------------------
1455 // World Init 1426 // World Init
1456 //--------------------------------------------------------------------- 1427 //---------------------------------------------------------------------
1457 if (STATE_WORLD_INIT == gStartupState) 1428 if (STATE_WORLD_INIT == LLStartUp::getStartupState())
1458 { 1429 {
1459 set_startup_status(0.40f, "Initializing World...", gAgent.mMOTD.c_str()); 1430 set_startup_status(0.40f, "Initializing World...", gAgent.mMOTD.c_str());
1460 display_startup(); 1431 display_startup();
@@ -1497,38 +1468,26 @@ BOOL idle_startup()
1497 // User might have overridden far clip 1468 // User might have overridden far clip
1498 gWorldp->setLandFarClip( gAgent.mDrawDistance ); 1469 gWorldp->setLandFarClip( gAgent.mDrawDistance );
1499 1470
1500 if (!gRunLocal) 1471 // Before we create the first region, we need to set the agent's mOriginGlobal
1501 { 1472 // This is necessary because creating objects before this is set will result in a
1502 // Before we create the first region, we need to set the agent's mOriginGlobal 1473 // bad mPositionAgent cache.
1503 // This is necessary because creating objects before this is set will result in a
1504 // bad mPositionAgent cache.
1505 1474
1506 gAgent.initOriginGlobal(from_region_handle(first_sim_handle)); 1475 gAgent.initOriginGlobal(from_region_handle(first_sim_handle));
1507 1476
1508 gWorldp->addRegion(first_sim_handle, first_sim); 1477 gWorldp->addRegion(first_sim_handle, first_sim);
1509 1478
1510 LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle); 1479 LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle);
1511 llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl; 1480 llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl;
1512 1481
1513 gStartupState = STATE_SEED_GRANTED_WAIT; 1482 LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
1514 regionp->setSeedCapability(first_sim_seed_cap); 1483 regionp->setSeedCapability(first_sim_seed_cap);
1515 1484
1516 // Set agent's initial region to be the one we just created. 1485 // Set agent's initial region to be the one we just created.
1517 gAgent.setRegion(regionp); 1486 gAgent.setRegion(regionp);
1518 1487
1519 // Set agent's initial position, which will be read by LLVOAvatar when the avatar 1488 // Set agent's initial position, which will be read by LLVOAvatar when the avatar
1520 // object is created. I think this must be done after setting the region. JC 1489 // object is created. I think this must be done after setting the region. JC
1521 gAgent.setPositionAgent(agent_start_position_region); 1490 gAgent.setPositionAgent(agent_start_position_region);
1522 }
1523 else
1524 {
1525 // With one simulator, assume region is at 0,0, hence has regionHandle 0
1526 // VEFFECT: Login
1527 gWorldp->addRegion(0, gAgentSimHost);
1528 gAgent.setRegion(gWorldp->getRegionFromHandle(0));
1529
1530 gStartupState = STATE_SEED_CAP_GRANTED;
1531 }
1532 1491
1533 display_startup(); 1492 display_startup();
1534 return do_normal_idle; 1493 return do_normal_idle;
@@ -1538,7 +1497,7 @@ BOOL idle_startup()
1538 //--------------------------------------------------------------------- 1497 //---------------------------------------------------------------------
1539 // Wait for Seed Cap Grant 1498 // Wait for Seed Cap Grant
1540 //--------------------------------------------------------------------- 1499 //---------------------------------------------------------------------
1541 if(STATE_SEED_GRANTED_WAIT == gStartupState) 1500 if(STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
1542 { 1501 {
1543 llinfos << "Waiting for seed grant ...." << llendl; 1502 llinfos << "Waiting for seed grant ...." << llendl;
1544 return do_normal_idle; 1503 return do_normal_idle;
@@ -1549,7 +1508,7 @@ BOOL idle_startup()
1549 // Seed Capability Granted 1508 // Seed Capability Granted
1550 // no newMessage calls should happen before this point 1509 // no newMessage calls should happen before this point
1551 //--------------------------------------------------------------------- 1510 //---------------------------------------------------------------------
1552 if (STATE_SEED_CAP_GRANTED == gStartupState) 1511 if (STATE_SEED_CAP_GRANTED == LLStartUp::getStartupState())
1553 { 1512 {
1554 update_texture_fetch(); 1513 update_texture_fetch();
1555 1514
@@ -1682,42 +1641,35 @@ BOOL idle_startup()
1682 // For all images pre-loaded into viewer cache, decode them. 1641 // For all images pre-loaded into viewer cache, decode them.
1683 // Need to do this AFTER we init the sky 1642 // Need to do this AFTER we init the sky
1684 gImageList.decodeAllImages(2.f); 1643 gImageList.decodeAllImages(2.f);
1685 gStartupState++; 1644 LLStartUp::setStartupState( STATE_QUICKTIME_INIT );
1686 1645
1687 // JC - Do this as late as possible to increase likelihood Purify 1646 // JC - Do this as late as possible to increase likelihood Purify
1688 // will run. 1647 // will run.
1689 if (!gRunLocal) 1648 LLMessageSystem* msg = gMessageSystem;
1649 if (!msg->mOurCircuitCode)
1690 { 1650 {
1691 LLMessageSystem* msg = gMessageSystem; 1651 llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
1692 if (!msg->mOurCircuitCode)
1693 {
1694 llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
1695 }
1696
1697 gUseCircuitCallbackCalled = FALSE;
1698
1699 msg->enableCircuit(first_sim, TRUE);
1700 // now, use the circuit info to tell simulator about us!
1701 llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
1702 msg->newMessageFast(_PREHASH_UseCircuitCode);
1703 msg->nextBlockFast(_PREHASH_CircuitCode);
1704 msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
1705 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
1706 msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
1707 msg->sendReliable(
1708 first_sim,
1709 MAX_TIMEOUT_COUNT,
1710 FALSE,
1711 TIMEOUT_SECONDS,
1712 use_circuit_callback,
1713 NULL);
1714 } 1652 }
1715 1653
1654 gUseCircuitCallbackCalled = FALSE;
1655
1656 msg->enableCircuit(first_sim, TRUE);
1657 // now, use the circuit info to tell simulator about us!
1658 llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
1659 msg->newMessageFast(_PREHASH_UseCircuitCode);
1660 msg->nextBlockFast(_PREHASH_CircuitCode);
1661 msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
1662 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
1663 msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
1664 msg->sendReliable(
1665 first_sim,
1666 MAX_TIMEOUT_COUNT,
1667 FALSE,
1668 TIMEOUT_SECONDS,
1669 use_circuit_callback,
1670 NULL);
1671
1716 timeout.reset(); 1672 timeout.reset();
1717 if (!gConnectToSomething)
1718 {
1719 gStartupState = STATE_MISC;
1720 }
1721 1673
1722 return do_normal_idle; 1674 return do_normal_idle;
1723 } 1675 }
@@ -1725,7 +1677,7 @@ BOOL idle_startup()
1725 //--------------------------------------------------------------------- 1677 //---------------------------------------------------------------------
1726 // LLMediaEngine Init 1678 // LLMediaEngine Init
1727 //--------------------------------------------------------------------- 1679 //---------------------------------------------------------------------
1728 if (STATE_QUICKTIME_INIT == gStartupState) 1680 if (STATE_QUICKTIME_INIT == LLStartUp::getStartupState())
1729 { 1681 {
1730 if (gViewerWindow) 1682 if (gViewerWindow)
1731 { 1683 {
@@ -1760,20 +1712,20 @@ BOOL idle_startup()
1760 } 1712 }
1761 #endif 1713 #endif
1762 1714
1763 gStartupState++; 1715 LLStartUp::setStartupState( STATE_WORLD_WAIT );
1764 return do_normal_idle; 1716 return do_normal_idle;
1765 } 1717 }
1766 1718
1767 //--------------------------------------------------------------------- 1719 //---------------------------------------------------------------------
1768 // Agent Send 1720 // Agent Send
1769 //--------------------------------------------------------------------- 1721 //---------------------------------------------------------------------
1770 if(STATE_WORLD_WAIT == gStartupState) 1722 if(STATE_WORLD_WAIT == LLStartUp::getStartupState())
1771 { 1723 {
1772 //llinfos << "Waiting for simulator ack...." << llendl; 1724 //llinfos << "Waiting for simulator ack...." << llendl;
1773 set_startup_status(0.49f, "Waiting for region handshake...", gAgent.mMOTD.c_str()); 1725 set_startup_status(0.49f, "Waiting for region handshake...", gAgent.mMOTD.c_str());
1774 if(gGotUseCircuitCodeAck) 1726 if(gGotUseCircuitCodeAck)
1775 { 1727 {
1776 ++gStartupState; 1728 LLStartUp::setStartupState( STATE_AGENT_SEND );
1777 } 1729 }
1778 LLMessageSystem* msg = gMessageSystem; 1730 LLMessageSystem* msg = gMessageSystem;
1779 while (msg->checkAllMessages(gFrameCount, gServicePump)) 1731 while (msg->checkAllMessages(gFrameCount, gServicePump))
@@ -1786,7 +1738,7 @@ BOOL idle_startup()
1786 //--------------------------------------------------------------------- 1738 //---------------------------------------------------------------------
1787 // Agent Send 1739 // Agent Send
1788 //--------------------------------------------------------------------- 1740 //---------------------------------------------------------------------
1789 if (STATE_AGENT_SEND == gStartupState) 1741 if (STATE_AGENT_SEND == LLStartUp::getStartupState())
1790 { 1742 {
1791 llinfos << "Connecting to region..." << llendl; 1743 llinfos << "Connecting to region..." << llendl;
1792 set_startup_status(0.50f, "Connecting to region...", gAgent.mMOTD.c_str()); 1744 set_startup_status(0.50f, "Connecting to region...", gAgent.mMOTD.c_str());
@@ -1797,7 +1749,7 @@ BOOL idle_startup()
1797 _PREHASH_AgentMovementComplete, 1749 _PREHASH_AgentMovementComplete,
1798 process_agent_movement_complete); 1750 process_agent_movement_complete);
1799 LLViewerRegion* regionp = gAgent.getRegion(); 1751 LLViewerRegion* regionp = gAgent.getRegion();
1800 if(!gRunLocal && regionp) 1752 if(regionp)
1801 { 1753 {
1802 send_complete_agent_movement(regionp->getHost()); 1754 send_complete_agent_movement(regionp->getHost());
1803 gAssetStorage->setUpstream(regionp->getHost()); 1755 gAssetStorage->setUpstream(regionp->getHost());
@@ -1805,10 +1757,6 @@ BOOL idle_startup()
1805 msg->newMessageFast(_PREHASH_EconomyDataRequest); 1757 msg->newMessageFast(_PREHASH_EconomyDataRequest);
1806 gAgent.sendReliableMessage(); 1758 gAgent.sendReliableMessage();
1807 } 1759 }
1808 else
1809 {
1810 gStartupState++;
1811 }
1812 1760
1813 // Create login effect 1761 // Create login effect
1814 // But not on first login, because you can't see your avatar then 1762 // But not on first login, because you can't see your avatar then
@@ -1820,7 +1768,7 @@ BOOL idle_startup()
1820 gHUDManager->sendEffects(); 1768 gHUDManager->sendEffects();
1821 } 1769 }
1822 1770
1823 gStartupState++; 1771 LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT
1824 1772
1825 timeout.reset(); 1773 timeout.reset();
1826 return do_normal_idle; 1774 return do_normal_idle;
@@ -1829,14 +1777,13 @@ BOOL idle_startup()
1829 //--------------------------------------------------------------------- 1777 //---------------------------------------------------------------------
1830 // Agent Wait 1778 // Agent Wait
1831 //--------------------------------------------------------------------- 1779 //---------------------------------------------------------------------
1832 if (STATE_AGENT_WAIT == gStartupState) 1780 if (STATE_AGENT_WAIT == LLStartUp::getStartupState())
1833 { 1781 {
1834 LLMessageSystem* msg = gMessageSystem; 1782 LLMessageSystem* msg = gMessageSystem;
1835 while (msg->checkAllMessages(gFrameCount, gServicePump)) 1783 while (msg->checkAllMessages(gFrameCount, gServicePump))
1836 { 1784 {
1837 if (gAgentMovementCompleted) 1785 if (gAgentMovementCompleted)
1838 { 1786 {
1839 gStartupState++;
1840 // Sometimes we have more than one message in the 1787 // Sometimes we have more than one message in the
1841 // queue. break out of this loop and continue 1788 // queue. break out of this loop and continue
1842 // processing. If we don't, then this could skip one 1789 // processing. If we don't, then this could skip one
@@ -1850,183 +1797,187 @@ BOOL idle_startup()
1850 } 1797 }
1851 } 1798 }
1852 msg->processAcks(); 1799 msg->processAcks();
1800
1801 if (gAgentMovementCompleted)
1802 {
1803 LLStartUp::setStartupState( STATE_INVENTORY_SEND );
1804 }
1805
1853 return do_normal_idle; 1806 return do_normal_idle;
1854 } 1807 }
1855 1808
1856 //--------------------------------------------------------------------- 1809 //---------------------------------------------------------------------
1857 // Inventory Send 1810 // Inventory Send
1858 //--------------------------------------------------------------------- 1811 //---------------------------------------------------------------------
1859 if (STATE_INVENTORY_SEND == gStartupState) 1812 if (STATE_INVENTORY_SEND == LLStartUp::getStartupState())
1860 { 1813 {
1861 if (!gUserAuthp) 1814 if (!gUserAuthp)
1862 { 1815 {
1863 llerrs << "No userauth in STATE_INVENTORY_SEND!" << llendl; 1816 llerrs << "No userauth in STATE_INVENTORY_SEND!" << llendl;
1864 } 1817 }
1865 1818
1866 if (gConnectToSomething && !gRunLocal) 1819 // unpack thin inventory
1820 LLUserAuth::options_t options;
1821 options.clear();
1822 //bool dump_buffer = false;
1823
1824 if(gUserAuthp->getOptions("inventory-lib-root", options)
1825 && !options.empty())
1867 { 1826 {
1868 // unpack thin inventory 1827 // should only be one
1869 LLUserAuth::options_t options; 1828 LLUserAuth::response_t::iterator it;
1870 options.clear(); 1829 it = options[0].find("folder_id");
1871 //bool dump_buffer = false; 1830 if(it != options[0].end())
1872
1873 if(gUserAuthp->getOptions("inventory-lib-root", options)
1874 && !options.empty())
1875 { 1831 {
1876 // should only be one 1832 gInventoryLibraryRoot.set((*it).second.c_str());
1877 LLUserAuth::response_t::iterator it;
1878 it = options[0].find("folder_id");
1879 if(it != options[0].end())
1880 {
1881 gInventoryLibraryRoot.set((*it).second.c_str());
1882 }
1883 } 1833 }
1884 options.clear(); 1834 }
1885 if(gUserAuthp->getOptions("inventory-lib-owner", options) 1835 options.clear();
1886 && !options.empty()) 1836 if(gUserAuthp->getOptions("inventory-lib-owner", options)
1837 && !options.empty())
1838 {
1839 // should only be one
1840 LLUserAuth::response_t::iterator it;
1841 it = options[0].find("agent_id");
1842 if(it != options[0].end())
1887 { 1843 {
1888 // should only be one 1844 gInventoryLibraryOwner.set((*it).second.c_str());
1889 LLUserAuth::response_t::iterator it;
1890 it = options[0].find("agent_id");
1891 if(it != options[0].end())
1892 {
1893 gInventoryLibraryOwner.set((*it).second.c_str());
1894 }
1895 } 1845 }
1896 options.clear(); 1846 }
1897 if(gUserAuthp->getOptions("inventory-skel-lib", options) 1847 options.clear();
1898 && gInventoryLibraryOwner.notNull()) 1848 if(gUserAuthp->getOptions("inventory-skel-lib", options)
1849 && gInventoryLibraryOwner.notNull())
1850 {
1851 if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
1899 { 1852 {
1900 if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner)) 1853 llwarns << "Problem loading inventory-skel-lib" << llendl;
1901 {
1902 llwarns << "Problem loading inventory-skel-lib" << llendl;
1903 }
1904 } 1854 }
1905 options.clear(); 1855 }
1906 if(gUserAuthp->getOptions("inventory-skeleton", options)) 1856 options.clear();
1857 if(gUserAuthp->getOptions("inventory-skeleton", options))
1858 {
1859 if(!gInventory.loadSkeleton(options, gAgent.getID()))
1907 { 1860 {
1908 if(!gInventory.loadSkeleton(options, gAgent.getID())) 1861 llwarns << "Problem loading inventory-skel-targets"
1909 { 1862 << llendl;
1910 llwarns << "Problem loading inventory-skel-targets"
1911 << llendl;
1912 }
1913 } 1863 }
1914 1864 }
1915 options.clear(); 1865
1916 if(gUserAuthp->getOptions("buddy-list", options)) 1866 options.clear();
1917 { 1867 if(gUserAuthp->getOptions("buddy-list", options))
1918 LLUserAuth::options_t::iterator it = options.begin(); 1868 {
1919 LLUserAuth::options_t::iterator end = options.end(); 1869 LLUserAuth::options_t::iterator it = options.begin();
1920 LLAvatarTracker::buddy_map_t list; 1870 LLUserAuth::options_t::iterator end = options.end();
1921 LLUUID agent_id; 1871 LLAvatarTracker::buddy_map_t list;
1922 S32 has_rights = 0, given_rights = 0; 1872 LLUUID agent_id;
1923 for (; it != end; ++it) 1873 S32 has_rights = 0, given_rights = 0;
1874 for (; it != end; ++it)
1875 {
1876 LLUserAuth::response_t::const_iterator option_it;
1877 option_it = (*it).find("buddy_id");
1878 if(option_it != (*it).end())
1924 { 1879 {
1925 LLUserAuth::response_t::const_iterator option_it; 1880 agent_id.set((*option_it).second.c_str());
1926 option_it = (*it).find("buddy_id");
1927 if(option_it != (*it).end())
1928 {
1929 agent_id.set((*option_it).second.c_str());
1930 }
1931 option_it = (*it).find("buddy_rights_has");
1932 if(option_it != (*it).end())
1933 {
1934 has_rights = atoi((*option_it).second.c_str());
1935 }
1936 option_it = (*it).find("buddy_rights_given");
1937 if(option_it != (*it).end())
1938 {
1939 given_rights = atoi((*option_it).second.c_str());
1940 }
1941 list[agent_id] = new LLRelationship(given_rights, has_rights, false);
1942 } 1881 }
1943 LLAvatarTracker::instance().addBuddyList(list); 1882 option_it = (*it).find("buddy_rights_has");
1944 } 1883 if(option_it != (*it).end())
1945
1946 options.clear();
1947 if(gUserAuthp->getOptions("ui-config", options))
1948 {
1949 LLUserAuth::options_t::iterator it = options.begin();
1950 LLUserAuth::options_t::iterator end = options.end();
1951 for (; it != end; ++it)
1952 { 1884 {
1953 LLUserAuth::response_t::const_iterator option_it; 1885 has_rights = atoi((*option_it).second.c_str());
1954 option_it = (*it).find("allow_first_life");
1955 if(option_it != (*it).end())
1956 {
1957 if (option_it->second == "Y")
1958 {
1959 LLPanelAvatar::sAllowFirstLife = TRUE;
1960 }
1961 }
1962 } 1886 }
1963 } 1887 option_it = (*it).find("buddy_rights_given");
1964 1888 if(option_it != (*it).end())
1965 options.clear(); 1889 {
1966 if(gUserAuthp->getOptions("event_categories", options)) 1890 given_rights = atoi((*option_it).second.c_str());
1967 { 1891 }
1968 LLEventInfo::loadCategories(options); 1892 list[agent_id] = new LLRelationship(given_rights, has_rights, false);
1969 }
1970 if(gUserAuthp->getOptions("event_notifications", options))
1971 {
1972 gEventNotifier.load(options);
1973 } 1893 }
1974 options.clear(); 1894 LLAvatarTracker::instance().addBuddyList(list);
1975 if(gUserAuthp->getOptions("classified_categories", options)) 1895 }
1896
1897 options.clear();
1898 if(gUserAuthp->getOptions("ui-config", options))
1899 {
1900 LLUserAuth::options_t::iterator it = options.begin();
1901 LLUserAuth::options_t::iterator end = options.end();
1902 for (; it != end; ++it)
1976 { 1903 {
1977 LLClassifiedInfo::loadCategories(options); 1904 LLUserAuth::response_t::const_iterator option_it;
1905 option_it = (*it).find("allow_first_life");
1906 if(option_it != (*it).end())
1907 {
1908 if (option_it->second == "Y")
1909 {
1910 LLPanelAvatar::sAllowFirstLife = TRUE;
1911 }
1912 }
1978 } 1913 }
1979 gInventory.buildParentChildMap(); 1914 }
1980 gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null);
1981 gInventory.notifyObservers();
1982 1915
1983 // set up callbacks 1916 options.clear();
1984 LLMessageSystem* msg = gMessageSystem; 1917 if(gUserAuthp->getOptions("event_categories", options))
1985 LLInventoryModel::registerCallbacks(msg); 1918 {
1986 LLAvatarTracker::instance().registerCallbacks(msg); 1919 LLEventInfo::loadCategories(options);
1987 LLLandmark::registerCallbacks(msg); 1920 }
1988 1921 if(gUserAuthp->getOptions("event_notifications", options))
1989 // request mute list 1922 {
1990 gMuteListp->requestFromServer(gAgent.getID()); 1923 gEventNotifier.load(options);
1991 1924 }
1992 // Get L$ and ownership credit information 1925 options.clear();
1993 msg->newMessageFast(_PREHASH_MoneyBalanceRequest); 1926 if(gUserAuthp->getOptions("classified_categories", options))
1994 msg->nextBlockFast(_PREHASH_AgentData); 1927 {
1995 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 1928 LLClassifiedInfo::loadCategories(options);
1996 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 1929 }
1997 msg->nextBlockFast(_PREHASH_MoneyData); 1930 gInventory.buildParentChildMap();
1998 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null ); 1931 gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null);
1999 gAgent.sendReliableMessage(); 1932 gInventory.notifyObservers();
2000 1933
2001 // request all group information 1934 // set up callbacks
2002 // *FIX: This will not do the right thing if the message 1935 LLMessageSystem* msg = gMessageSystem;
2003 // gets there before the requestuserserverconnection 1936 LLInventoryModel::registerCallbacks(msg);
2004 // circuit is completed. 1937 LLAvatarTracker::instance().registerCallbacks(msg);
2005 gAgent.sendAgentDataUpdateRequest(); 1938 LLLandmark::registerCallbacks(msg);
2006 1939
1940 // request mute list
1941 gMuteListp->requestFromServer(gAgent.getID());
2007 1942
2008 // NOTE: removed as part of user-privacy 1943 // Get L$ and ownership credit information
2009 // enhancements. this information should be available from 1944 msg->newMessageFast(_PREHASH_MoneyBalanceRequest);
2010 // login. 2006-10-16 Phoenix. 1945 msg->nextBlockFast(_PREHASH_AgentData);
2011 // get the users that have been granted modify powers 1946 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
2012 //msg->newMessageFast(_PREHASH_RequestGrantedProxies); 1947 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
2013 //msg->nextBlockFast(_PREHASH_AgentData); 1948 msg->nextBlockFast(_PREHASH_MoneyData);
2014 //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 1949 msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null );
2015 //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 1950 gAgent.sendReliableMessage();
2016 //gAgent.sendReliableMessage();
2017 1951
2018 BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory"); 1952 // request all group information
1953 // *FIX: This will not do the right thing if the message
1954 // gets there before the requestuserserverconnection
1955 // circuit is completed.
1956 gAgent.sendAgentDataUpdateRequest();
2019 1957
2020 // Create the inventory views
2021 LLInventoryView::showAgentInventory();
2022 1958
2023 // Hide the inventory if it wasn't shown at exit 1959 // NOTE: removed as part of user-privacy
2024 if(!shown_at_exit) 1960 // enhancements. this information should be available from
2025 { 1961 // login. 2006-10-16 Phoenix.
2026 LLInventoryView::toggleVisibility(NULL); 1962 // get the users that have been granted modify powers
2027 } 1963 //msg->newMessageFast(_PREHASH_RequestGrantedProxies);
1964 //msg->nextBlockFast(_PREHASH_AgentData);
1965 //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
1966 //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
1967 //gAgent.sendReliableMessage();
1968
1969 BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory");
1970
1971 // Create the inventory views
1972 LLInventoryView::showAgentInventory();
1973
1974 // Hide the inventory if it wasn't shown at exit
1975 if(!shown_at_exit)
1976 {
1977 LLInventoryView::toggleVisibility(NULL);
2028 } 1978 }
2029 gStartupState++; 1979
1980 LLStartUp::setStartupState( STATE_MISC );
2030 return do_normal_idle; 1981 return do_normal_idle;
2031 } 1982 }
2032 1983
@@ -2034,14 +1985,8 @@ BOOL idle_startup()
2034 //--------------------------------------------------------------------- 1985 //---------------------------------------------------------------------
2035 // Misc 1986 // Misc
2036 //--------------------------------------------------------------------- 1987 //---------------------------------------------------------------------
2037 if (STATE_MISC == gStartupState) 1988 if (STATE_MISC == LLStartUp::getStartupState())
2038 { 1989 {
2039 // Create a few objects if we don't actually have a world
2040 if (!gConnectToSomething)
2041 {
2042 // could add them here
2043 }
2044
2045 // We have a region, and just did a big inventory download. 1990 // We have a region, and just did a big inventory download.
2046 // We can estimate the user's connection speed, and set their 1991 // We can estimate the user's connection speed, and set their
2047 // max bandwidth accordingly. JC 1992 // max bandwidth accordingly. JC
@@ -2060,7 +2005,7 @@ BOOL idle_startup()
2060 { 2005 {
2061 llinfos << "Fast network connection, increasing max bandwidth to " 2006 llinfos << "Fast network connection, increasing max bandwidth to "
2062 << FASTER_RATE_BPS/1024.f 2007 << FASTER_RATE_BPS/1024.f
2063 << " Kbps" << llendl; 2008 << " kbps" << llendl;
2064 gViewerThrottle.setMaxBandwidth(FASTER_RATE_BPS / 1024.f); 2009 gViewerThrottle.setMaxBandwidth(FASTER_RATE_BPS / 1024.f);
2065 } 2010 }
2066 else if (rate_bps > FAST_RATE_BPS 2011 else if (rate_bps > FAST_RATE_BPS
@@ -2068,7 +2013,7 @@ BOOL idle_startup()
2068 { 2013 {
2069 llinfos << "Fast network connection, increasing max bandwidth to " 2014 llinfos << "Fast network connection, increasing max bandwidth to "
2070 << FAST_RATE_BPS/1024.f 2015 << FAST_RATE_BPS/1024.f
2071 << " Kbps" << llendl; 2016 << " kbps" << llendl;
2072 gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f); 2017 gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f);
2073 } 2018 }
2074 } 2019 }
@@ -2220,12 +2165,12 @@ BOOL idle_startup()
2220 } 2165 }
2221 } 2166 }
2222 2167
2223 gStartupState++; 2168 LLStartUp::setStartupState( STATE_PRECACHE );
2224 timeout.reset(); 2169 timeout.reset();
2225 return do_normal_idle; 2170 return do_normal_idle;
2226 } 2171 }
2227 2172
2228 if (STATE_PRECACHE == gStartupState) 2173 if (STATE_PRECACHE == LLStartUp::getStartupState())
2229 { 2174 {
2230 do_normal_idle = TRUE; 2175 do_normal_idle = TRUE;
2231 2176
@@ -2234,7 +2179,7 @@ BOOL idle_startup()
2234 if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) 2179 if(((timeout_frac > 1.f) && gAgent.getAvatarObject())
2235 || (timeout_frac > 3.f)) 2180 || (timeout_frac > 3.f))
2236 { 2181 {
2237 gStartupState++; 2182 LLStartUp::setStartupState( STATE_WEARABLES_WAIT );
2238 } 2183 }
2239 else 2184 else
2240 { 2185 {
@@ -2246,7 +2191,7 @@ BOOL idle_startup()
2246 return do_normal_idle; 2191 return do_normal_idle;
2247 } 2192 }
2248 2193
2249 if (STATE_WEARABLES_WAIT == gStartupState) 2194 if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState())
2250 { 2195 {
2251 do_normal_idle = TRUE; 2196 do_normal_idle = TRUE;
2252 2197
@@ -2257,13 +2202,13 @@ BOOL idle_startup()
2257 2202
2258 if(gAgent.getWearablesLoaded() || !gAgent.isGenderChosen()) 2203 if(gAgent.getWearablesLoaded() || !gAgent.isGenderChosen())
2259 { 2204 {
2260 gStartupState++; 2205 LLStartUp::setStartupState( STATE_CLEANUP );
2261 } 2206 }
2262 else if (wearables_time > MAX_WEARABLES_TIME) 2207 else if (wearables_time > MAX_WEARABLES_TIME)
2263 { 2208 {
2264 gViewerWindow->alertXml("ClothingLoading"); 2209 gViewerWindow->alertXml("ClothingLoading");
2265 gViewerStats->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG); 2210 gViewerStats->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG);
2266 gStartupState++; 2211 LLStartUp::setStartupState( STATE_CLEANUP );
2267 } 2212 }
2268 else 2213 else
2269 { 2214 {
@@ -2275,7 +2220,7 @@ BOOL idle_startup()
2275 return do_normal_idle; 2220 return do_normal_idle;
2276 } 2221 }
2277 2222
2278 if (STATE_CLEANUP == gStartupState) 2223 if (STATE_CLEANUP == LLStartUp::getStartupState())
2279 { 2224 {
2280 set_startup_status(1.0, "", NULL); 2225 set_startup_status(1.0, "", NULL);
2281 2226
@@ -2347,7 +2292,7 @@ BOOL idle_startup()
2347 gUserAuthp = NULL; 2292 gUserAuthp = NULL;
2348 } 2293 }
2349 2294
2350 gStartupState++; 2295 LLStartUp::setStartupState( STATE_STARTED );
2351 2296
2352 // Unmute audio if desired and setup volumes 2297 // Unmute audio if desired and setup volumes
2353 audio_update_volume(); 2298 audio_update_volume();
@@ -2361,7 +2306,7 @@ BOOL idle_startup()
2361 return do_normal_idle; 2306 return do_normal_idle;
2362 } 2307 }
2363 2308
2364 llwarns << "Reached end of idle_startup for state " << gStartupState << llendl; 2309 llwarns << "Reached end of idle_startup for state " << LLStartUp::getStartupState() << llendl;
2365 return do_normal_idle; 2310 return do_normal_idle;
2366} 2311}
2367 2312
@@ -2421,7 +2366,7 @@ void login_callback(S32 option, void *userdata)
2421 2366
2422 if (CONNECT_OPTION == option) 2367 if (CONNECT_OPTION == option)
2423 { 2368 {
2424 gStartupState++; 2369 LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
2425 return; 2370 return;
2426 } 2371 }
2427 else if (QUIT_OPTION == option) 2372 else if (QUIT_OPTION == option)
@@ -2688,7 +2633,7 @@ void update_dialog_callback(S32 option, void *userdata)
2688#if !LL_RELEASE_FOR_DOWNLOAD 2633#if !LL_RELEASE_FOR_DOWNLOAD
2689 if (option == 2) 2634 if (option == 2)
2690 { 2635 {
2691 gStartupState++; 2636 LLStartUp::setStartupState( STATE_WORLD_INIT );
2692 return; 2637 return;
2693 } 2638 }
2694#endif 2639#endif
@@ -2704,7 +2649,7 @@ void update_dialog_callback(S32 option, void *userdata)
2704 } 2649 }
2705 else 2650 else
2706 { 2651 {
2707 gStartupState++; 2652 LLStartUp::setStartupState( STATE_WORLD_INIT );
2708 } 2653 }
2709 return; 2654 return;
2710 } 2655 }
@@ -3089,7 +3034,7 @@ void init_stat_view()
3089 stat_barp->mDisplayHistory = FALSE; 3034 stat_barp->mDisplayHistory = FALSE;
3090 3035
3091 stat_barp = stat_viewp->addStat("Packet Loss", &(gViewerStats->mPacketsLostPercentStat)); 3036 stat_barp = stat_viewp->addStat("Packet Loss", &(gViewerStats->mPacketsLostPercentStat));
3092 stat_barp->setUnitLabel(" %%"); 3037 stat_barp->setUnitLabel(" %");
3093 stat_barp->mMinBar = 0.f; 3038 stat_barp->mMinBar = 0.f;
3094 stat_barp->mMaxBar = 5.f; 3039 stat_barp->mMaxBar = 5.f;
3095 stat_barp->mTickSpacing = 1.f; 3040 stat_barp->mTickSpacing = 1.f;
@@ -3109,16 +3054,6 @@ void init_stat_view()
3109 stat_barp->mPerSec = FALSE; 3054 stat_barp->mPerSec = FALSE;
3110 stat_barp->mDisplayMean = FALSE; 3055 stat_barp->mDisplayMean = FALSE;
3111 3056
3112 stat_barp = stat_viewp->addStat("Ping User", &(gViewerStats->mUserserverPingStat));
3113 stat_barp->setUnitLabel(" msec");
3114 stat_barp->mMinBar = 0.f;
3115 stat_barp->mMaxBar = 1000.f;
3116 stat_barp->mTickSpacing = 100.f;
3117 stat_barp->mLabelSpacing = 200.f;
3118 stat_barp->mDisplayBar = FALSE;
3119 stat_barp->mPerSec = FALSE;
3120 stat_barp->mDisplayMean = FALSE;
3121
3122 3057
3123 stat_viewp = new LLStatView("advanced stat view", "Advanced", "OpenDebugStatAdvanced", rect); 3058 stat_viewp = new LLStatView("advanced stat view", "Advanced", "OpenDebugStatAdvanced", rect);
3124 gDebugView->mStatViewp->addChildAtEnd(stat_viewp); 3059 gDebugView->mStatViewp->addChildAtEnd(stat_viewp);
@@ -3740,17 +3675,31 @@ void release_start_screen()
3740 gStartImageGL = NULL; 3675 gStartImageGL = NULL;
3741} 3676}
3742 3677
3678// static
3743bool LLStartUp::canGoFullscreen() 3679bool LLStartUp::canGoFullscreen()
3744{ 3680{
3745 return gStartupState >= STATE_WORLD_INIT; 3681 return LLStartUp::getStartupState() >= STATE_WORLD_INIT;
3746} 3682}
3747 3683
3684
3685// static
3686void LLStartUp::setStartupState( S32 state )
3687{
3688 llinfos << "Startup state changing from " << gStartupState << " to " << state << llendl;
3689 gStartupState = state;
3690}
3691
3692
3748void reset_login() 3693void reset_login()
3749{ 3694{
3750 gStartupState = STATE_LOGIN_SHOW; 3695 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
3751 3696
3752 if ( gViewerWindow ) 3697 if ( gViewerWindow )
3753 { // Hide menus and normal buttons 3698 { // Hide menus and normal buttons
3754 gViewerWindow->setNormalControlsVisible( FALSE ); 3699 gViewerWindow->setNormalControlsVisible( FALSE );
3755 } 3700 }
3701
3702 // Hide any other stuff
3703 if ( gFloaterMap )
3704 gFloaterMap->setVisible( FALSE );
3756} 3705}
diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h
index 718d74d..d9adc62 100644
--- a/linden/indra/newview/llstartup.h
+++ b/linden/indra/newview/llstartup.h
@@ -42,38 +42,32 @@ extern const char* SCREEN_HOME_FILENAME;
42extern const char* SCREEN_LAST_FILENAME; 42extern const char* SCREEN_LAST_FILENAME;
43 43
44enum EStartupState{ 44enum EStartupState{
45 STATE_FIRST, 45 STATE_FIRST, // Initial startup
46 STATE_LOGIN_SHOW, 46 STATE_LOGIN_SHOW, // Show login screen
47 STATE_LOGIN_WAIT, 47 STATE_LOGIN_WAIT, // Wait for user input at login screen
48 STATE_LOGIN_CLEANUP, 48 STATE_LOGIN_CLEANUP, // Get rid of login screen and start login
49 STATE_UPDATE_CHECK, 49 STATE_UPDATE_CHECK, // Wait for user at a dialog box (updates, term-of-service, etc)
50 STATE_LOGIN_AUTH_INIT, 50 STATE_LOGIN_AUTH_INIT, // Start login to SL servers
51 STATE_LOGIN_AUTHENTICATE, 51 STATE_LOGIN_AUTHENTICATE, // Do authentication voodoo
52 STATE_LOGIN_NO_DATA_YET, 52 STATE_LOGIN_NO_DATA_YET, // Waiting for authentication replies to start
53 STATE_LOGIN_DOWNLOADING, 53 STATE_LOGIN_DOWNLOADING, // Waiting for authentication replies to download
54 STATE_LOGIN_PROCESS_RESPONSE, 54 STATE_LOGIN_PROCESS_RESPONSE, // Check authentication reply
55 STATE_WORLD_INIT, 55 STATE_WORLD_INIT, // Start building the world
56 STATE_SEED_GRANTED_WAIT, 56 STATE_SEED_GRANTED_WAIT, // Wait for seed cap grant
57 STATE_SEED_CAP_GRANTED, 57 STATE_SEED_CAP_GRANTED, // Have seed cap grant
58 STATE_QUICKTIME_INIT, 58 STATE_QUICKTIME_INIT, // Initialzie QT
59 STATE_WORLD_WAIT, 59 STATE_WORLD_WAIT, // Waiting for simulator
60 STATE_AGENT_SEND, 60 STATE_AGENT_SEND, // Connect to a region
61 STATE_AGENT_WAIT, 61 STATE_AGENT_WAIT, // Wait for region
62 STATE_INVENTORY_SEND, 62 STATE_INVENTORY_SEND, // Do inventory transfer
63 STATE_MISC, 63 STATE_MISC, // Do more things (set bandwidth, start audio, save location, etc)
64 STATE_PRECACHE, 64 STATE_PRECACHE, // Wait a bit for textures to download
65 STATE_WEARABLES_WAIT, 65 STATE_WEARABLES_WAIT, // Wait for clothing to download
66 //STATE_INVENTORY_WAIT, 66 STATE_CLEANUP, // Final cleanup
67 //STATE_TOS_AGREEMENT_START, 67 STATE_STARTED // Up and running in-world
68 //STATE_TOS_AGREEMENT_WAIT,
69 //STATE_CRITICAL_MESSAGE_START,
70 //STATE_CRITICAL_MESSAGE_WAIT,
71 STATE_CLEANUP,
72 STATE_STARTED
73}; 68};
74 69
75// exorted symbol 70// exported symbols
76extern S32 gStartupState;
77extern BOOL gAgentMovementCompleted; 71extern BOOL gAgentMovementCompleted;
78extern bool gUseQuickTime; 72extern bool gUseQuickTime;
79extern bool gQuickTimeInitialized; 73extern bool gQuickTimeInitialized;
@@ -85,6 +79,13 @@ public:
85 static bool canGoFullscreen(); 79 static bool canGoFullscreen();
86 // returns true if we are far enough along in startup to allow 80 // returns true if we are far enough along in startup to allow
87 // going full screen 81 // going full screen
82
83 // Always use this to set gStartupState so changes are logged
84 static void setStartupState( S32 state );
85 static S32 getStartupState() { return gStartupState; };
86
87protected:
88 static S32 gStartupState; // Do not set directly, use LLStartup::setStartupState
88}; 89};
89 90
90 91
diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp
index 9d6434f..2471e18 100644
--- a/linden/indra/newview/llstatusbar.cpp
+++ b/linden/indra/newview/llstatusbar.cpp
@@ -157,7 +157,7 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect)
157 LLString text = childGetText("bandwidth_tooltip") + " "; 157 LLString text = childGetText("bandwidth_tooltip") + " ";
158 LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven 158 LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven
159 mSGBandwidth->setLabel(bandwidth_tooltip.getString().c_str()); 159 mSGBandwidth->setLabel(bandwidth_tooltip.getString().c_str());
160 mSGBandwidth->setUnits("Kbps"); 160 mSGBandwidth->setUnits("kbps");
161 mSGBandwidth->setPrecision(0); 161 mSGBandwidth->setPrecision(0);
162 addChild(mSGBandwidth); 162 addChild(mSGBandwidth);
163 x -= SIM_STAT_WIDTH + 2; 163 x -= SIM_STAT_WIDTH + 2;
diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp
index 2005e39..3b48d8b 100644
--- a/linden/indra/newview/lltexlayer.cpp
+++ b/linden/indra/newview/lltexlayer.cpp
@@ -482,7 +482,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data)
482 482
483 483
484// static 484// static
485void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result) // StoreAssetData callback (not fixed) 485void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result, LLExtStat ext_status) // StoreAssetData callback (not fixed)
486{ 486{
487 LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata; 487 LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata;
488 488
diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h
index 7d517ee..e5bfb79 100644
--- a/linden/indra/newview/lltexlayer.h
+++ b/linden/indra/newview/lltexlayer.h
@@ -221,7 +221,7 @@ public:
221 void readBackAndUpload(U8* baked_bump_data); 221 void readBackAndUpload(U8* baked_bump_data);
222 static void onTextureUploadComplete( const LLUUID& uuid, 222 static void onTextureUploadComplete( const LLUUID& uuid,
223 void* userdata, 223 void* userdata,
224 S32 result); 224 S32 result, LLExtStat ext_status);
225 static void dumpTotalByteCount(); 225 static void dumpTotalByteCount();
226 226
227private: 227private:
diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp
index 6602096..9c64bd3 100644
--- a/linden/indra/newview/lltexturectrl.cpp
+++ b/linden/indra/newview/lltexturectrl.cpp
@@ -129,7 +129,7 @@ public:
129 void setCanApplyImmediately(BOOL b); 129 void setCanApplyImmediately(BOOL b);
130 130
131 void setDirty( BOOL b ) { mIsDirty = b; } 131 void setDirty( BOOL b ) { mIsDirty = b; }
132 BOOL isDirty() { return mIsDirty; } 132 BOOL isDirty() const { return mIsDirty; }
133 void setActive( BOOL active ); 133 void setActive( BOOL active );
134 134
135 LLTextureCtrl* getOwner() const { return mOwner; } 135 LLTextureCtrl* getOwner() const { return mOwner; }
@@ -908,7 +908,8 @@ LLTextureCtrl::LLTextureCtrl(
908 mNonImmediateFilterPermMask( PERM_NONE ), 908 mNonImmediateFilterPermMask( PERM_NONE ),
909 mCanApplyImmediately( FALSE ), 909 mCanApplyImmediately( FALSE ),
910 mNeedsRawImageData( FALSE ), 910 mNeedsRawImageData( FALSE ),
911 mValid( TRUE ) 911 mValid( TRUE ),
912 mDirty( FALSE )
912{ 913{
913 mCaption = new LLTextBox( label, 914 mCaption = new LLTextBox( label,
914 LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ), 915 LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ),
@@ -1070,6 +1071,18 @@ void LLTextureCtrl::setValid(BOOL valid )
1070 } 1071 }
1071} 1072}
1072 1073
1074// virtual
1075BOOL LLTextureCtrl::isDirty() const
1076{
1077 return mDirty;
1078}
1079
1080// virtual
1081void LLTextureCtrl::resetDirty()
1082{
1083 mDirty = FALSE;
1084}
1085
1073 1086
1074// virtual 1087// virtual
1075void LLTextureCtrl::clear() 1088void LLTextureCtrl::clear()
@@ -1186,6 +1199,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
1186 1199
1187 if( floaterp && mEnabled) 1200 if( floaterp && mEnabled)
1188 { 1201 {
1202 mDirty = (op != TEXTURE_CANCEL);
1189 if( floaterp->isDirty() ) 1203 if( floaterp->isDirty() )
1190 { 1204 {
1191 setTentative( FALSE ); 1205 setTentative( FALSE );
diff --git a/linden/indra/newview/lltexturectrl.h b/linden/indra/newview/lltexturectrl.h
index d8ad4d9..853ca73 100644
--- a/linden/indra/newview/lltexturectrl.h
+++ b/linden/indra/newview/lltexturectrl.h
@@ -87,6 +87,9 @@ public:
87 virtual void setVisible( BOOL visible ); 87 virtual void setVisible( BOOL visible );
88 virtual void setEnabled( BOOL enabled ); 88 virtual void setEnabled( BOOL enabled );
89 89
90 virtual BOOL isDirty() const;
91 virtual void resetDirty();
92
90 void setValid(BOOL valid); 93 void setValid(BOOL valid);
91 94
92 // LLUICtrl interface 95 // LLUICtrl interface
@@ -169,6 +172,7 @@ private:
169 BOOL mNeedsRawImageData; 172 BOOL mNeedsRawImageData;
170 LLViewBorder* mBorder; 173 LLViewBorder* mBorder;
171 BOOL mValid; 174 BOOL mValid;
175 BOOL mDirty;
172}; 176};
173 177
174// XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp 178// XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp
diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp
index d6f1f0e..e79121a 100644
--- a/linden/indra/newview/lltoolgrab.cpp
+++ b/linden/indra/newview/lltoolgrab.cpp
@@ -803,9 +803,10 @@ void LLToolGrab::onMouseCaptureLost()
803 LLVector3 grab_point_agent = mGrabObject->getRenderPosition(); 803 LLVector3 grab_point_agent = mGrabObject->getRenderPosition();
804 804
805 LLCoordGL gl_point; 805 LLCoordGL gl_point;
806 gCamera->projectPosAgentToScreen(grab_point_agent, gl_point); 806 if (gCamera->projectPosAgentToScreen(grab_point_agent, gl_point))
807 807 {
808 LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY); 808 LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY);
809 }
809 } 810 }
810 else 811 else
811 { 812 {
diff --git a/linden/indra/newview/lltoolmorph.cpp b/linden/indra/newview/lltoolmorph.cpp
index ceb83b5..25d7d2e 100644
--- a/linden/indra/newview/lltoolmorph.cpp
+++ b/linden/indra/newview/lltoolmorph.cpp
@@ -153,6 +153,8 @@ void LLVisualParamHint::preRender(BOOL clear_depth)
153 avatarp->updateComposites(); 153 avatarp->updateComposites();
154 avatarp->updateVisualParams(); 154 avatarp->updateVisualParams();
155 avatarp->updateGeometry(avatarp->mDrawable); 155 avatarp->updateGeometry(avatarp->mDrawable);
156 avatarp->updateLOD();
157
156 LLDynamicTexture::preRender(clear_depth); 158 LLDynamicTexture::preRender(clear_depth);
157} 159}
158 160
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp
index 0e3a5fe..0aa7d10 100644
--- a/linden/indra/newview/lltoolpie.cpp
+++ b/linden/indra/newview/lltoolpie.cpp
@@ -551,9 +551,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
551 break; 551 break;
552 } 552 }
553 } 553 }
554
555 mGrabMouseButtonDown = FALSE; 554 mGrabMouseButtonDown = FALSE;
556 gToolMgr->clearTransientTool(); 555 gToolMgr->clearTransientTool();
556 gAgent.setLookAt(LOOKAT_TARGET_CONVERSATION, obj); // maybe look at object/person clicked on
557 return LLTool::handleMouseUp(x, y, mask); 557 return LLTool::handleMouseUp(x, y, mask);
558} 558}
559 559
diff --git a/linden/indra/newview/lltracker.cpp b/linden/indra/newview/lltracker.cpp
index 4125bb6..feb4207 100644
--- a/linden/indra/newview/lltracker.cpp
+++ b/linden/indra/newview/lltracker.cpp
@@ -107,15 +107,6 @@ void LLTracker::stopTracking(void* userdata)
107// static virtual 107// static virtual
108void LLTracker::drawHUDArrow() 108void LLTracker::drawHUDArrow()
109{ 109{
110 /* tracking autopilot destination has been disabled
111 -- 2004.01.09, Leviathan
112 // Draw dot for autopilot target
113 if (gAgent.getAutoPilot())
114 {
115 instance()->drawMarker( gAgent.getAutoPilotTargetGlobal(), gTrackColor );
116 return;
117 }
118 */
119 switch (getTrackingStatus()) 110 switch (getTrackingStatus())
120 { 111 {
121 case TRACKING_AVATAR: 112 case TRACKING_AVATAR:
@@ -479,7 +470,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
479 if (dist > 0.99f * gCamera->getFar()) 470 if (dist > 0.99f * gCamera->getFar())
480 { 471 {
481 color_frac = 0.4f; 472 color_frac = 0.4f;
482 // pos_global = gAgent.getCameraPositionGlobal() + 0.99f*(gCamera->getFar()/dist)*to_vec;
483 } 473 }
484 else 474 else
485 { 475 {
@@ -504,7 +494,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
504 494
505 draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color); 495 draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
506 496
507 //glScalef(1.f, 1.f, 1000.f);
508 glColor4fv(fogged_color.mV); 497 glColor4fv(fogged_color.mV);
509 const U32 BEACON_VERTS = 256; 498 const U32 BEACON_VERTS = 256;
510 const F32 step = 1024.0f/BEACON_VERTS; 499 const F32 step = 1024.0f/BEACON_VERTS;
@@ -554,24 +543,30 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
554 glEnd(); 543 glEnd();
555 } 544 }
556 545
557 //gCylinder.render(1000);
558 glPopMatrix(); 546 glPopMatrix();
559 547
560 char text[1024]; /* Flawfinder: ignore */ 548 if (!gCamera || to_vec.magVec() > gCamera->getFar())
561 snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */ 549 {
550 hud_textp->clearString();
551 }
552 else
553 {
554 char text[1024]; /* Flawfinder: ignore */
555 snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */
562 556
563 LLWString wstr; 557 LLWString wstr;
564 wstr += utf8str_to_wstring(label); 558 wstr += utf8str_to_wstring(label);
565 wstr += '\n'; 559 wstr += '\n';
566 wstr += utf8str_to_wstring(text); 560 wstr += utf8str_to_wstring(text);
567 561
568 hud_textp->setFont(LLFontGL::sSansSerif); 562 hud_textp->setFont(LLFontGL::sSansSerif);
569 hud_textp->setZCompare(FALSE); 563 hud_textp->setZCompare(FALSE);
570 hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST)))); 564 hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST))));
571 565
572 hud_textp->setString(wstr); 566 hud_textp->setString(wstr);
573 hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER); 567 hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER);
574 hud_textp->setPositionAgent(pos_agent); 568 hud_textp->setPositionAgent(pos_agent);
569 }
575} 570}
576 571
577 572
@@ -643,6 +638,14 @@ void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color)
643 return; 638 return;
644 } 639 }
645 640
641 LLVector3d to_vec = pos_global - gAgent.getCameraPositionGlobal();
642 to_vec.mdV[2] = 0;
643
644 if (to_vec.magVec() > gCamera->getFar())
645 { //only draw arrow if lateral distance to object is less than view distance.
646 return;
647 }
648
646 // get position 649 // get position
647 LLVector3 pos_local = gAgent.getPosAgentFromGlobal(pos_global); 650 LLVector3 pos_local = gAgent.getPosAgentFromGlobal(pos_global);
648 651
diff --git a/linden/indra/newview/lluserauth.cpp b/linden/indra/newview/lluserauth.cpp
index f790fe7..6c45b8d 100644
--- a/linden/indra/newview/lluserauth.cpp
+++ b/linden/indra/newview/lluserauth.cpp
@@ -34,7 +34,7 @@
34#include <iterator> 34#include <iterator>
35 35
36#include "lldir.h" 36#include "lldir.h"
37#include "llversion.h" 37#include "llversionviewer.h"
38#include "viewer.h" 38#include "viewer.h"
39#include "llviewerbuild.h" 39#include "llviewerbuild.h"
40#include "llviewercontrol.h" 40#include "llviewercontrol.h"
diff --git a/linden/indra/newview/llviewerassetstorage.cpp b/linden/indra/newview/llviewerassetstorage.cpp
index d9a5ada..7947700 100644
--- a/linden/indra/newview/llviewerassetstorage.cpp
+++ b/linden/indra/newview/llviewerassetstorage.cpp
@@ -88,7 +88,7 @@ void LLViewerAssetStorage::storeAssetData(
88 delete req; 88 delete req;
89 if (callback) 89 if (callback)
90 { 90 {
91 callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED); 91 callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_VFS_CORRUPT);
92 } 92 }
93 return; 93 return;
94 } 94 }
@@ -117,7 +117,7 @@ void LLViewerAssetStorage::storeAssetData(
117 llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl; 117 llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl;
118 if (callback) 118 if (callback)
119 { 119 {
120 callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE); 120 callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_VFS_CORRUPT);
121 } 121 }
122 return; 122 return;
123 } 123 }
@@ -142,7 +142,7 @@ void LLViewerAssetStorage::storeAssetData(
142 llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; 142 llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
143 if (callback) 143 if (callback)
144 { 144 {
145 callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE); 145 callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE);
146 } 146 }
147 } 147 }
148 } 148 }
@@ -151,7 +151,7 @@ void LLViewerAssetStorage::storeAssetData(
151 llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl; 151 llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl;
152 if (callback) 152 if (callback)
153 { 153 {
154 callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE); 154 callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
155 } 155 }
156 } 156 }
157} 157}
@@ -220,7 +220,7 @@ void LLViewerAssetStorage::storeAssetData(
220 { 220 {
221 if (callback) 221 if (callback)
222 { 222 {
223 callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE); 223 callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE);
224 } 224 }
225 } 225 }
226} 226}
diff --git a/linden/indra/newview/llviewerassetstorage.h b/linden/indra/newview/llviewerassetstorage.h
index 46840cb..c49820a 100644
--- a/linden/indra/newview/llviewerassetstorage.h
+++ b/linden/indra/newview/llviewerassetstorage.h
@@ -37,8 +37,6 @@ class LLVFile;
37class LLViewerAssetStorage : public LLAssetStorage 37class LLViewerAssetStorage : public LLAssetStorage
38{ 38{
39public: 39public:
40 typedef void (*LLStoreAssetCallback)(const LLUUID &transaction_id, void *user_data, S32 status);
41
42 LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, 40 LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
43 LLVFS *vfs, const LLHost &upstream_host); 41 LLVFS *vfs, const LLHost &upstream_host);
44 42
diff --git a/linden/indra/newview/llviewerbuild.h b/linden/indra/newview/llviewerbuild.h
index 340d353..82a35b0 100644
--- a/linden/indra/newview/llviewerbuild.h
+++ b/linden/indra/newview/llviewerbuild.h
@@ -26,8 +26,8 @@
26 * COMPLETENESS OR PERFORMANCE. 26 * COMPLETENESS OR PERFORMANCE.
27 */ 27 */
28 28
29#include "llversion.h" 29#include "llversionviewer.h"
30 30
31// Set the build number in indra/llcommon/llversion.h! 31// Set the build number in indra/llcommon/llversionviewer.h!
32 32
33const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD; 33const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD;
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp
index fc288c0..64ad66c 100644
--- a/linden/indra/newview/llviewerdisplay.cpp
+++ b/linden/indra/newview/llviewerdisplay.cpp
@@ -35,6 +35,7 @@
35#include "lldir.h" 35#include "lldir.h"
36#include "lldynamictexture.h" 36#include "lldynamictexture.h"
37#include "lldrawpoolalpha.h" 37#include "lldrawpoolalpha.h"
38#include "llfeaturemanager.h"
38#include "llframestats.h" 39#include "llframestats.h"
39#include "llgl.h" 40#include "llgl.h"
40#include "llglheaders.h" 41#include "llglheaders.h"
@@ -217,7 +218,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
217 // Bail out if we're in the startup state and don't want to try to 218 // Bail out if we're in the startup state and don't want to try to
218 // render the world. 219 // render the world.
219 // 220 //
220 if (gStartupState < STATE_STARTED) 221 if (LLStartUp::getStartupState() < STATE_STARTED)
221 { 222 {
222 display_startup(); 223 display_startup();
223 return; 224 return;
@@ -315,12 +316,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
315 } 316 }
316 break; 317 break;
317 318
318 case LLAgent::TELEPORT_CANCELLING:
319 gViewerWindow->setProgressCancelButtonVisible(FALSE, "Cancel");
320 gViewerWindow->setProgressPercent( 100.f );
321 gViewerWindow->setProgressString("Canceling...");
322 break;
323
324 case LLAgent::TELEPORT_NONE: 319 case LLAgent::TELEPORT_NONE:
325 // No teleport in progress 320 // No teleport in progress
326 gViewerWindow->setShowProgress(FALSE); 321 gViewerWindow->setShowProgress(FALSE);
@@ -430,7 +425,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
430 } 425 }
431 else 426 else
432 { 427 {
433 LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery; 428 LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion");
434 } 429 }
435 430
436 stop_glerror(); 431 stop_glerror();
diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp
index e40fb80..f4cd582 100644
--- a/linden/indra/newview/llviewerimage.cpp
+++ b/linden/indra/newview/llviewerimage.cpp
@@ -155,9 +155,9 @@ void LLViewerImage::updateClass(const F32 velocity, const F32 angular_velocity)
155 sMaxTotalTextureMem -= sMaxBoundTextureMem/4; 155 sMaxTotalTextureMem -= sMaxBoundTextureMem/4;
156 } 156 }
157 157
158 if ((U32)sMaxTotalTextureMem > gSysMemory.getPhysicalMemory() - (U32)min_non_tex_system_mem) 158 if ((U32)sMaxTotalTextureMem > gSysMemory.getPhysicalMemoryClamped() - (U32)min_non_tex_system_mem)
159 { 159 {
160 sMaxTotalTextureMem = (S32)gSysMemory.getPhysicalMemory() - min_non_tex_system_mem; 160 sMaxTotalTextureMem = (S32)gSysMemory.getPhysicalMemoryClamped() - min_non_tex_system_mem;
161 } 161 }
162 162
163 if (sBoundTextureMemory >= sMaxBoundTextureMem || 163 if (sBoundTextureMemory >= sMaxBoundTextureMem ||
diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp
index 2e3b964..890629e 100644
--- a/linden/indra/newview/llviewerimagelist.cpp
+++ b/linden/indra/newview/llviewerimagelist.cpp
@@ -1142,6 +1142,12 @@ LLPointer<LLImageJ2C> LLViewerImageList::convertToUploadFile(LLPointer<LLImageRa
1142 raw_image->biasedScaleToPowerOfTwo(LLViewerImage::MAX_IMAGE_SIZE_DEFAULT); 1142 raw_image->biasedScaleToPowerOfTwo(LLViewerImage::MAX_IMAGE_SIZE_DEFAULT);
1143 LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C(); 1143 LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C();
1144 compressedImage->setRate(0.f); 1144 compressedImage->setRate(0.f);
1145
1146 if (gSavedSettings.getBOOL("LosslessJ2CUpload") &&
1147 (raw_image->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) &&
1148 (raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF))
1149 compressedImage->setReversible(TRUE);
1150
1145 compressedImage->encode(raw_image); 1151 compressedImage->encode(raw_image);
1146 1152
1147 return compressedImage; 1153 return compressedImage;
@@ -1170,7 +1176,7 @@ S32 LLViewerImageList::getMaxVideoRamSetting(S32 max)
1170 } 1176 }
1171 llwarns << "VRAM amount not detected, defaulting to " << max_vram/(double)(1<<20) << " MB" << llendl; 1177 llwarns << "VRAM amount not detected, defaulting to " << max_vram/(double)(1<<20) << " MB" << llendl;
1172 } 1178 }
1173 U32 system_ram = gSysMemory.getPhysicalMemory(); 1179 U32 system_ram = gSysMemory.getPhysicalMemoryClamped();
1174 //llinfos << "*** DETECTED " << system_ram/(double)(1<<20) << " MB of system memory." << llendl; // TomY TESTING DNCI 1180 //llinfos << "*** DETECTED " << system_ram/(double)(1<<20) << " MB of system memory." << llendl; // TomY TESTING DNCI
1175 if (max == -2) 1181 if (max == -2)
1176 { 1182 {
@@ -1396,7 +1402,7 @@ S32 LLViewerImageList::calcMaxTextureRAM()
1396{ 1402{
1397 // Decide the maximum amount of RAM we should allow the user to allocate to texture cache 1403 // Decide the maximum amount of RAM we should allow the user to allocate to texture cache
1398 LLMemoryInfo memory_info; 1404 LLMemoryInfo memory_info;
1399 U32 available_memory = memory_info.getPhysicalMemory(); 1405 U32 available_memory = memory_info.getPhysicalMemoryClamped();
1400 1406
1401 clamp_rescale((F32)available_memory, 1407 clamp_rescale((F32)available_memory,
1402 (F32)(SIXTEEN_MEG * 16), 1408 (F32)(SIXTEEN_MEG * 16),
diff --git a/linden/indra/newview/llviewerimagelist.h b/linden/indra/newview/llviewerimagelist.h
index 0a7f8b0..266bcfc 100644
--- a/linden/indra/newview/llviewerimagelist.h
+++ b/linden/indra/newview/llviewerimagelist.h
@@ -37,6 +37,8 @@
37#include <list> 37#include <list>
38#include <set> 38#include <set>
39 39
40const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128;
41
40const BOOL MIPMAP_YES = TRUE; 42const BOOL MIPMAP_YES = TRUE;
41const BOOL MIPMAP_NO = FALSE; 43const BOOL MIPMAP_NO = FALSE;
42 44
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp
index 6372ba8..c9cd52f 100644
--- a/linden/indra/newview/llviewerinventory.cpp
+++ b/linden/indra/newview/llviewerinventory.cpp
@@ -43,6 +43,9 @@
43 43
44#include "llinventoryview.h" 44#include "llinventoryview.h"
45 45
46#include "llviewerregion.h"
47#include "llviewerobjectlist.h"
48
46///---------------------------------------------------------------------------- 49///----------------------------------------------------------------------------
47/// Local function declarations, constants, enums, and typedefs 50/// Local function declarations, constants, enums, and typedefs
48///---------------------------------------------------------------------------- 51///----------------------------------------------------------------------------
@@ -551,13 +554,27 @@ void inventory_reliable_callback(void**, S32 status)
551 } 554 }
552} 555}
553*/ 556*/
557LLInventoryCallbackManager *LLInventoryCallbackManager::sInstance = NULL;
558
554LLInventoryCallbackManager::LLInventoryCallbackManager() : 559LLInventoryCallbackManager::LLInventoryCallbackManager() :
555 mLastCallback(0) 560 mLastCallback(0)
556{ 561{
562 if( sInstance != NULL )
563 {
564 llwarns << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << llendl;
565 return;
566 }
567 sInstance = this;
557} 568}
558 569
559LLInventoryCallbackManager::~LLInventoryCallbackManager() 570LLInventoryCallbackManager::~LLInventoryCallbackManager()
560{ 571{
572 if( sInstance != this )
573 {
574 llwarns << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << llendl;
575 return;
576 }
577 sInstance = NULL;
561} 578}
562 579
563U32 LLInventoryCallbackManager::registerCB(LLPointer<LLInventoryCallback> cb) 580U32 LLInventoryCallbackManager::registerCB(LLPointer<LLInventoryCallback> cb)
@@ -701,29 +718,56 @@ void move_inventory_item(
701 gAgent.sendReliableMessage(); 718 gAgent.sendReliableMessage();
702} 719}
703 720
704void _copy_inventory_from_notecard_hdr(const LLUUID& object_id, const LLUUID& notecard_inv_id) 721class LLCopyInventoryFromNotecardResponder : public LLHTTPClient::Responder
705{ 722{
706 LLMessageSystem* msg = gMessageSystem; 723public:
707 msg->newMessageFast(_PREHASH_CopyInventoryFromNotecard); 724 //If we get back a normal response, handle it here
708 msg->nextBlock(_PREHASH_AgentData); 725 virtual void result(const LLSD& content)
709 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 726 {
710 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 727 // What do we do here?
711 msg->nextBlock(_PREHASH_NotecardData); 728 llinfos << "CopyInventoryFromNotecard request successful." << llendl;
712 msg->addUUIDFast(_PREHASH_NotecardItemID, notecard_inv_id); 729 }
713 msg->addUUIDFast(_PREHASH_ObjectID, object_id); 730
714} 731 //If we get back an error (not found, etc...), handle it here
732 virtual void error(U32 status, const std::string& reason)
733 {
734 llinfos << "LLCopyInventoryFromNotecardResponder::error "
735 << status << ": " << reason << llendl;
736 }
737};
715 738
716void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src) 739void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
717{ 740{
718 LLMessageSystem* msg = gMessageSystem; 741 LLSD body;
719 /* 742 LLViewerRegion* viewer_region = NULL;
720 * I was going to handle multiple inventory items here, but then I realized that 743 if(object_id.notNull())
721 * we are only handling one at a time. Perhaps you can only select one at a 744 {
722 * time from the notecard? 745 LLViewerObject* vo = gObjectList.findObject(object_id);
723 */ 746 if(vo)
724 _copy_inventory_from_notecard_hdr(object_id, notecard_inv_id); 747 {
725 msg->nextBlockFast(_PREHASH_InventoryData); 748 viewer_region = vo->getRegion();
726 msg->addUUIDFast(_PREHASH_ItemID, src->getUUID()); 749 }
727 msg->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(src->getType())); 750 }
728 gAgent.sendReliableMessage(); 751
752 // Fallback to the agents region if for some reason the
753 // object isn't found in the viewer.
754 if(!viewer_region)
755 {
756 viewer_region = gAgent.getRegion();
757 }
758
759 if(viewer_region)
760 {
761 std::string url = viewer_region->getCapability("CopyInventoryFromNotecard");
762 if (!url.empty())
763 {
764 body["notecard-id"] = notecard_inv_id;
765 body["object-id"] = object_id;
766 body["item-id"] = src->getUUID();
767 body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType());
768 body["callback-id"] = (LLSD::Integer)callback_id;
769
770 LLHTTPClient::post(url, body, new LLCopyInventoryFromNotecardResponder());
771 }
772 }
729} 773}
diff --git a/linden/indra/newview/llviewerinventory.h b/linden/indra/newview/llviewerinventory.h
index 513834f..1226a83 100644
--- a/linden/indra/newview/llviewerinventory.h
+++ b/linden/indra/newview/llviewerinventory.h
@@ -234,6 +234,9 @@ public:
234private: 234private:
235 std::map<U32, LLPointer<LLInventoryCallback> > mMap; 235 std::map<U32, LLPointer<LLInventoryCallback> > mMap;
236 U32 mLastCallback; 236 U32 mLastCallback;
237 static LLInventoryCallbackManager *sInstance;
238public:
239 static bool is_instantiated() { return sInstance != NULL; }
237}; 240};
238extern LLInventoryCallbackManager gInventoryCallbacks; 241extern LLInventoryCallbackManager gInventoryCallbacks;
239 242
@@ -269,7 +272,8 @@ void move_inventory_item(
269 272
270void copy_inventory_from_notecard(const LLUUID& object_id, 273void copy_inventory_from_notecard(const LLUUID& object_id,
271 const LLUUID& notecard_inv_id, 274 const LLUUID& notecard_inv_id,
272 const LLInventoryItem *src); 275 const LLInventoryItem *src,
276 U32 callback_id = 0);
273 277
274 278
275#endif // LL_LLVIEWERINVENTORY_H 279#endif // LL_LLVIEWERINVENTORY_H
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 4ac1da4..0d7a2cd 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -40,6 +40,7 @@
40#include "indra_constants.h" 40#include "indra_constants.h"
41#include "llassetstorage.h" 41#include "llassetstorage.h"
42#include "llchat.h" 42#include "llchat.h"
43#include "llfeaturemanager.h"
43#include "llfocusmgr.h" 44#include "llfocusmgr.h"
44#include "llfontgl.h" 45#include "llfontgl.h"
45#include "llinstantmessage.h" 46#include "llinstantmessage.h"
@@ -98,6 +99,7 @@
98#include "llfloatergesture.h" 99#include "llfloatergesture.h"
99#include "llfloatergodtools.h" 100#include "llfloatergodtools.h"
100#include "llfloatergroupinfo.h" 101#include "llfloatergroupinfo.h"
102#include "llfloatergroupinvite.h"
101#include "llfloatergroups.h" 103#include "llfloatergroups.h"
102#include "llfloaterhtml.h" 104#include "llfloaterhtml.h"
103#include "llfloaterhtmlhelp.h" 105#include "llfloaterhtmlhelp.h"
@@ -411,7 +413,7 @@ void toggle_debug_menus(void*);
411void toggle_map( void* user_data ); 413void toggle_map( void* user_data );
412void export_info_callback(LLAssetInfo *info, void **user_data, S32 result); 414void export_info_callback(LLAssetInfo *info, void **user_data, S32 result);
413void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result); 415void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result);
414void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result); 416void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
415BOOL menu_check_build_tool( void* user_data ); 417BOOL menu_check_build_tool( void* user_data );
416void handle_reload_settings(void*); 418void handle_reload_settings(void*);
417void focus_here(void*); 419void focus_here(void*);
@@ -1226,7 +1228,7 @@ void init_debug_rendering_menu(LLMenuGL* menu)
1226 1228
1227 LLMenuItemCheckGL* item; 1229 LLMenuItemCheckGL* item;
1228 item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT); 1230 item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT);
1229 item->setEnabled(gGLManager.mHasOcclusionQuery); 1231 item->setEnabled(gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion"));
1230 menu->append(item); 1232 menu->append(item);
1231 1233
1232 1234
@@ -5100,6 +5102,43 @@ class LLToolsLookAtSelection : public view_listener_t
5100 } 5102 }
5101}; 5103};
5102 5104
5105void callback_invite_to_group(LLUUID group_id, void *user_data)
5106{
5107 std::vector<LLUUID> agent_ids;
5108 agent_ids.push_back(*(LLUUID *)user_data);
5109
5110 LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
5111}
5112
5113void invite_to_group(const LLUUID& dest_id)
5114{
5115 LLViewerObject* dest = gObjectList.findObject(dest_id);
5116 if(dest && dest->isAvatar())
5117 {
5118 LLFloaterGroupPicker* widget;
5119 widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
5120 if (widget)
5121 {
5122 widget->center();
5123 widget->setPowersMask(GP_MEMBER_INVITE);
5124 widget->setSelectCallback(callback_invite_to_group, (void *)&dest_id);
5125 }
5126 }
5127}
5128
5129class LLAvatarInviteToGroup : public view_listener_t
5130{
5131 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
5132 {
5133 LLVOAvatar* avatar = find_avatar_from_object( gViewerWindow->lastObjectHit() );
5134 if(avatar)
5135 {
5136 invite_to_group(avatar->getID());
5137 }
5138 return true;
5139 }
5140};
5141
5103class LLAvatarAddFriend : public view_listener_t 5142class LLAvatarAddFriend : public view_listener_t
5104{ 5143{
5105 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 5144 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -7434,7 +7473,7 @@ class LLViewToggleRenderType : public view_listener_t
7434 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 7473 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
7435 { 7474 {
7436 LLString type = userdata.asString(); 7475 LLString type = userdata.asString();
7437 if (type == "particles") 7476 if (type == "hideparticles")
7438 { 7477 {
7439 LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES); 7478 LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
7440 } 7479 }
@@ -7448,7 +7487,7 @@ class LLViewCheckRenderType : public view_listener_t
7448 { 7487 {
7449 LLString type = userdata["data"].asString(); 7488 LLString type = userdata["data"].asString();
7450 bool new_value = false; 7489 bool new_value = false;
7451 if (type == "particles") 7490 if (type == "hideparticles")
7452 { 7491 {
7453 new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES); 7492 new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
7454 } 7493 }
@@ -7750,6 +7789,7 @@ void initialize_menus()
7750 addMenu(new LLAvatarDebug(), "Avatar.Debug"); 7789 addMenu(new LLAvatarDebug(), "Avatar.Debug");
7751 addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); 7790 addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
7752 addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug"); 7791 addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug");
7792 addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
7753 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); 7793 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
7754 addMenu(new LLAvatarEject(), "Avatar.Eject"); 7794 addMenu(new LLAvatarEject(), "Avatar.Eject");
7755 addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); 7795 addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
diff --git a/linden/indra/newview/llviewermenufile.cpp b/linden/indra/newview/llviewermenufile.cpp
index 4d46a8f..031e6d4 100644
--- a/linden/indra/newview/llviewermenufile.cpp
+++ b/linden/indra/newview/llviewermenufile.cpp
@@ -796,7 +796,7 @@ void upload_new_resource(const LLString& src_filename, std::string name,
796 } 796 }
797} 797}
798 798
799void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result) // StoreAssetData callback (fixed) 799void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
800{ 800{
801 LLResourceData* data = (LLResourceData*)user_data; 801 LLResourceData* data = (LLResourceData*)user_data;
802 //LLAssetType::EType pref_loc = data->mPreferredLocation; 802 //LLAssetType::EType pref_loc = data->mPreferredLocation;
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 6bca17e..8f3cd96 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -84,6 +84,7 @@
84#include "llfloatermute.h" 84#include "llfloatermute.h"
85#include "llfloaterpostcard.h" 85#include "llfloaterpostcard.h"
86#include "llfloaterpreference.h" 86#include "llfloaterpreference.h"
87#include "llfloaterreleasemsg.h"
87#include "llfollowcam.h" 88#include "llfollowcam.h"
88#include "llgroupnotify.h" 89#include "llgroupnotify.h"
89#include "llhudeffect.h" 90#include "llhudeffect.h"
@@ -573,6 +574,15 @@ void join_group_callback(S32 option, void* user_data)
573 LLJoinGroupData* data = (LLJoinGroupData*)user_data; 574 LLJoinGroupData* data = (LLJoinGroupData*)user_data;
574 BOOL delete_context_data = TRUE; 575 BOOL delete_context_data = TRUE;
575 bool accept_invite = false; 576 bool accept_invite = false;
577
578 if (option == 2 && data && !data->mGroupID.isNull())
579 {
580 LLFloaterGroupInfo::showFromUUID(data->mGroupID);
581 LLString::format_map_t args;
582 args["[MESSAGE]"] = data->mMessage;
583 LLNotifyBox::showXml("JoinGroup", args, &join_group_callback, data);
584 return;
585 }
576 if(option == 0 && data && !data->mGroupID.isNull()) 586 if(option == 0 && data && !data->mGroupID.isNull())
577 { 587 {
578 // check for promotion or demotion. 588 // check for promotion or demotion.
@@ -763,7 +773,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
763 //llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl; 773 //llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl;
764 // When downloading the initial inventory we get a lot of new items 774 // When downloading the initial inventory we get a lot of new items
765 // coming in and can't tell that from spam. JC 775 // coming in and can't tell that from spam. JC
766 if (gStartupState >= STATE_STARTED 776 if (LLStartUp::getStartupState() >= STATE_STARTED
767 && throttle_count >= OFFER_THROTTLE_MAX_COUNT) 777 && throttle_count >= OFFER_THROTTLE_MAX_COUNT)
768 { 778 {
769 if (!throttle_logged) 779 if (!throttle_logged)
@@ -2162,7 +2172,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2162 { 2172 {
2163 is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat) 2173 is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat)
2164 || gMuteListp->isMuted(owner_id); 2174 || gMuteListp->isMuted(owner_id);
2165 is_linden = gMuteListp->isLinden(from_name); 2175 is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && gMuteListp->isLinden(from_name);
2166 } 2176 }
2167 2177
2168 BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); 2178 BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
@@ -2319,16 +2329,16 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
2319 } 2329 }
2320 2330
2321 // truth table: 2331 // truth table:
2322 // LINDEN BUSY MUTED OWNED_BY_YOU DISPLAY STORE IN HISTORY 2332 // LINDEN BUSY MUTED OWNED_BY_YOU TASK DISPLAY STORE IN HISTORY
2323 // F F F F Yes Yes 2333 // F F F F * Yes Yes
2324 // F F F T Yes Yes 2334 // F F F T * Yes Yes
2325 // F F T F No No 2335 // F F T F * No No
2326 // F F T T No No 2336 // F F T T * No No
2327 // F T F F No Yes 2337 // F T F F * No Yes
2328 // F T F T Yes Yes 2338 // F T F T * Yes Yes
2329 // F T T F No No 2339 // F T T F * No No
2330 // F T T T No No 2340 // F T T T * No No
2331 // T * * * Yes Yes 2341 // T * * * F Yes Yes
2332 2342
2333 chat.mMuted = is_muted && !is_linden; 2343 chat.mMuted = is_muted && !is_linden;
2334 2344
@@ -2427,47 +2437,103 @@ public:
2427 { 2437 {
2428 LLIsType is_landmark(LLAssetType::AT_LANDMARK); 2438 LLIsType is_landmark(LLAssetType::AT_LANDMARK);
2429 LLIsType is_card(LLAssetType::AT_CALLINGCARD); 2439 LLIsType is_card(LLAssetType::AT_CALLINGCARD);
2430 LLInventoryModel::cat_array_t cats; 2440
2431 LLInventoryModel::item_array_t items; 2441 LLInventoryModel::cat_array_t card_cats;
2442 LLInventoryModel::item_array_t card_items;
2443 LLInventoryModel::cat_array_t land_cats;
2444 LLInventoryModel::item_array_t land_items;
2445
2432 folder_ref_t::iterator it = mCompleteFolders.begin(); 2446 folder_ref_t::iterator it = mCompleteFolders.begin();
2433 folder_ref_t::iterator end = mCompleteFolders.end(); 2447 folder_ref_t::iterator end = mCompleteFolders.end();
2434 for(; it != end; ++it) 2448 for(; it != end; ++it)
2435 { 2449 {
2436 gInventory.collectDescendentsIf( 2450 gInventory.collectDescendentsIf(
2437 (*it), 2451 (*it),
2438 cats, 2452 land_cats,
2439 items, 2453 land_items,
2440 LLInventoryModel::EXCLUDE_TRASH, 2454 LLInventoryModel::EXCLUDE_TRASH,
2441 is_landmark); 2455 is_landmark);
2442 gInventory.collectDescendentsIf( 2456 gInventory.collectDescendentsIf(
2443 (*it), 2457 (*it),
2444 cats, 2458 card_cats,
2445 items, 2459 card_items,
2446 LLInventoryModel::EXCLUDE_TRASH, 2460 LLInventoryModel::EXCLUDE_TRASH,
2447 is_card); 2461 is_card);
2448 } 2462 }
2449 S32 count = items.count(); 2463 LLString::format_map_t args;
2450 for(S32 i = 0; i < count; ++i) 2464 if ( land_items.count() > 0 )
2451 { 2465 { // Show notification that they can now teleport to landmarks. Use a random landmark from the inventory
2452 LLString::format_map_t args; 2466 S32 random_land = ll_rand( land_items.count() - 1 );
2453 args["[NAME]"] = items[i]->getName(); 2467 args["[NAME]"] = land_items[random_land]->getName();
2454 switch(items[i]->getType()) 2468 LLNotifyBox::showXml("TeleportToLandmark",args);
2455 { 2469 }
2456 case LLAssetType::AT_LANDMARK: 2470 if ( card_items.count() > 0 )
2457 LLNotifyBox::showXml("TeleportToLandmark",args); 2471 { // Show notification that they can now contact people. Use a random calling card from the inventory
2458 break; 2472 S32 random_card = ll_rand( card_items.count() - 1 );
2459 case LLAssetType::AT_CALLINGCARD: 2473 args["[NAME]"] = card_items[random_card]->getName();
2460 LLNotifyBox::showXml("TeleportToPerson",args); 2474 LLNotifyBox::showXml("TeleportToPerson",args);
2461 break;
2462 default:
2463 break;
2464 }
2465 } 2475 }
2476
2466 gInventory.removeObserver(this); 2477 gInventory.removeObserver(this);
2467 delete this; 2478 delete this;
2468 } 2479 }
2469}; 2480};
2470 2481
2482
2483
2484class LLPostTeleportNotifiers : public LLEventTimer
2485{
2486public:
2487 LLPostTeleportNotifiers();
2488 virtual ~LLPostTeleportNotifiers();
2489
2490 //function to be called at the supplied frequency
2491 virtual BOOL tick();
2492};
2493
2494LLPostTeleportNotifiers::LLPostTeleportNotifiers() : LLEventTimer( 2.0 )
2495{
2496};
2497
2498LLPostTeleportNotifiers::~LLPostTeleportNotifiers()
2499{
2500}
2501
2502BOOL LLPostTeleportNotifiers::tick()
2503{
2504 BOOL all_done = FALSE;
2505 if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE )
2506 {
2507 // get callingcards and landmarks available to the user arriving.
2508 LLInventoryFetchDescendentsObserver::folder_ref_t folders;
2509 LLUUID folder_id;
2510 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
2511 if(folder_id.notNull())
2512 folders.push_back(folder_id);
2513 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
2514 if(folder_id.notNull())
2515 folders.push_back(folder_id);
2516 if(!folders.empty())
2517 {
2518 LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
2519 fetcher->fetchDescendents(folders);
2520 if(fetcher->isEverythingComplete())
2521 {
2522 fetcher->done();
2523 }
2524 else
2525 {
2526 gInventory.addObserver(fetcher);
2527 }
2528 }
2529 all_done = TRUE;
2530 }
2531
2532 return all_done;
2533}
2534
2535
2536
2471// Teleport notification from the simulator 2537// Teleport notification from the simulator
2472// We're going to pretend to be a new agent 2538// We're going to pretend to be a new agent
2473void process_teleport_finish(LLMessageSystem* msg, void**) 2539void process_teleport_finish(LLMessageSystem* msg, void**)
@@ -2513,26 +2579,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
2513 { 2579 {
2514 gAgent.setHomePosRegion(region_handle, pos); 2580 gAgent.setHomePosRegion(region_handle, pos);
2515 2581
2516 // get callingcards and landmarks available to the user arriving. 2582 // Create a timer that will send notices when teleporting is all finished. Since this is
2517 LLInventoryFetchDescendentsObserver::folder_ref_t folders; 2583 // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked.
2518 LLUUID folder_id; 2584 new LLPostTeleportNotifiers();
2519 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
2520 if(folder_id.notNull()) folders.push_back(folder_id);
2521 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
2522 if(folder_id.notNull()) folders.push_back(folder_id);
2523 if(!folders.empty())
2524 {
2525 LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
2526 fetcher->fetchDescendents(folders);
2527 if(fetcher->isEverythingComplete())
2528 {
2529 fetcher->done();
2530 }
2531 else
2532 {
2533 gInventory.addObserver(fetcher);
2534 }
2535 }
2536 } 2585 }
2537 2586
2538 LLHost sim_host(sim_ip, sim_port); 2587 LLHost sim_host(sim_ip, sim_port);
@@ -2632,6 +2681,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2632 msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at); 2681 msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at);
2633 U64 region_handle; 2682 U64 region_handle;
2634 msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle); 2683 msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle);
2684
2685 char version_channel_char[MAX_STRING];
2686 msg->getString("SimData", "ChannelVersion", MAX_STRING, version_channel_char);
2635 2687
2636 LLVOAvatar* avatarp = gAgent.getAvatarObject(); 2688 LLVOAvatar* avatarp = gAgent.getAvatarObject();
2637 if (!avatarp) 2689 if (!avatarp)
@@ -2765,6 +2817,23 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
2765 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 2817 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
2766 msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun()); 2818 msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun());
2767 gAgent.sendReliableMessage(); 2819 gAgent.sendReliableMessage();
2820
2821
2822 LLString version_channel = LLString(version_channel_char);
2823
2824 if (gLastVersionChannel != version_channel)
2825 {
2826 //show release message if not on initial login
2827 if (!gLastVersionChannel.empty())
2828 {
2829 gLastVersionChannel = version_channel;
2830 LLFloaterReleaseMsg::show();
2831 }
2832 else {
2833 gLastVersionChannel = version_channel;
2834 }
2835 }
2836
2768} 2837}
2769 2838
2770void process_crossed_region(LLMessageSystem* msg, void**) 2839void process_crossed_region(LLMessageSystem* msg, void**)
@@ -4006,12 +4075,10 @@ void process_alert_core(const char* buffer, BOOL modal)
4006 else if( !strcmp( buffer, "Home position set." ) ) 4075 else if( !strcmp( buffer, "Home position set." ) )
4007 { 4076 {
4008 // save the home location image to disk 4077 // save the home location image to disk
4009 char temp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ 4078 LLString snap_filename = gDirUtilp->getLindenUserDir();
4010 strncpy(temp_str, gDirUtilp->getLindenUserDir().c_str(), LL_MAX_PATH -1); /* Flawfinder: ignore */ 4079 snap_filename += gDirUtilp->getDirDelimiter();
4011 temp_str[LL_MAX_PATH -1] = '\0'; 4080 snap_filename += SCREEN_HOME_FILENAME;
4012 strcat(temp_str, "/"); /* Flawfinder: ignore */ 4081 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
4013 strcat(temp_str,SCREEN_HOME_FILENAME); /* Flawfinder: ignore */
4014 gViewerWindow->saveSnapshot(temp_str, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
4015 } 4082 }
4016 4083
4017 // Translate system messages here. 4084 // Translate system messages here.
@@ -4562,7 +4629,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
4562 msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, STD_STRING_BUF_SIZE, reason); 4629 msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, STD_STRING_BUF_SIZE, reason);
4563 4630
4564 LLStringBase<char>::format_map_t args; 4631 LLStringBase<char>::format_map_t args;
4565 args["[REASON]"] = LLAgent::sTeleportErrorMessages[reason]; 4632 LLString big_reason = LLAgent::sTeleportErrorMessages[reason];
4633 if ( big_reason.size() > 0 )
4634 { // Substitute verbose reason from the local map
4635 args["[REASON]"] = big_reason;
4636 }
4637 else
4638 { // Nothing found in the map - use what the server returned
4639 args["[REASON]"] = reason;
4640 }
4641
4566 gViewerWindow->alertXml("CouldNotTeleportReason", args); 4642 gViewerWindow->alertXml("CouldNotTeleportReason", args);
4567 4643
4568 if( gAgent.getTeleportState() != LLAgent::TELEPORT_NONE ) 4644 if( gAgent.getTeleportState() != LLAgent::TELEPORT_NONE )
@@ -5027,7 +5103,7 @@ void process_load_url(LLMessageSystem* msg, void**)
5027} 5103}
5028 5104
5029 5105
5030void callback_download_complete(void** data, S32 result) 5106void callback_download_complete(void** data, S32 result, LLExtStat ext_status)
5031{ 5107{
5032 LLString* filepath = (LLString*)data; 5108 LLString* filepath = (LLString*)data;
5033 LLString::format_map_t args; 5109 LLString::format_map_t args;
@@ -5164,7 +5240,7 @@ void callbackCacheEstateOwnerName(
5164void onCovenantLoadComplete(LLVFS *vfs, 5240void onCovenantLoadComplete(LLVFS *vfs,
5165 const LLUUID& asset_uuid, 5241 const LLUUID& asset_uuid,
5166 LLAssetType::EType type, 5242 LLAssetType::EType type,
5167 void* user_data, S32 status) 5243 void* user_data, S32 status, LLExtStat ext_status)
5168{ 5244{
5169 llinfos << "onCovenantLoadComplete()" << llendl; 5245 llinfos << "onCovenantLoadComplete()" << llendl;
5170 std::string covenant_text; 5246 std::string covenant_text;
diff --git a/linden/indra/newview/llviewermessage.h b/linden/indra/newview/llviewermessage.h
index 14f2cda..7042324 100644
--- a/linden/indra/newview/llviewermessage.h
+++ b/linden/indra/newview/llviewermessage.h
@@ -180,7 +180,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**);
180void onCovenantLoadComplete(LLVFS *vfs, 180void onCovenantLoadComplete(LLVFS *vfs,
181 const LLUUID& asset_uuid, 181 const LLUUID& asset_uuid,
182 LLAssetType::EType type, 182 LLAssetType::EType type,
183 void* user_data, S32 status); 183 void* user_data, S32 status, LLExtStat ext_status);
184void callbackCacheEstateOwnerName( 184void callbackCacheEstateOwnerName(
185 const LLUUID& id, 185 const LLUUID& id,
186 const char* first, 186 const char* first,
@@ -219,3 +219,4 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**);
219 219
220#endif 220#endif
221 221
222
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index f8095b8..ec81146 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -2438,7 +2438,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
2438 LLXferManager::HIGH_PRIORITY); 2438 LLXferManager::HIGH_PRIORITY);
2439} 2439}
2440 2440
2441void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code) 2441void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status)
2442{ 2442{
2443 LLFilenameAndTask* ft = (LLFilenameAndTask*)user_data; 2443 LLFilenameAndTask* ft = (LLFilenameAndTask*)user_data;
2444 LLViewerObject* object = NULL; 2444 LLViewerObject* object = NULL;
diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h
index fcb246c..09b1d57 100644
--- a/linden/indra/newview/llviewerobject.h
+++ b/linden/indra/newview/llviewerobject.h
@@ -539,7 +539,7 @@ protected:
539 // inventory functionality 539 // inventory functionality
540 // 540 //
541 541
542 static void processTaskInvFile(void** user_data, S32 error_code); 542 static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status);
543 void loadTaskInvFile(const char* filename); 543 void loadTaskInvFile(const char* filename);
544 void doInventoryCallback(); 544 void doInventoryCallback();
545 545
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp
index 9f008a4..f8c20a3 100644
--- a/linden/indra/newview/llviewerobjectlist.cpp
+++ b/linden/indra/newview/llviewerobjectlist.cpp
@@ -654,13 +654,33 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
654 654
655 std::vector<LLViewerObject*> kill_list; 655 std::vector<LLViewerObject*> kill_list;
656 S32 num_active_objects = 0; 656 S32 num_active_objects = 0;
657 LLViewerObject *objectp = NULL;
657 658
659 // Make a copy of the list in case something in idleUpdate() messes with it
660 std::vector<LLViewerObject*> idle_list;
661 idle_list.reserve( mActiveObjects.size() );
662
663 for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
664 active_iter != mActiveObjects.end(); active_iter++)
665 {
666 objectp = *active_iter;
667 if (objectp)
668 {
669 idle_list.push_back( objectp );
670 }
671 else
672 { // There shouldn't be any NULL pointers in the list, but they have caused
673 // crashes before. This may be idleUpdate() messing with the list.
674 llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl;
675 }
676 }
677
658 if (gSavedSettings.getBOOL("FreezeTime")) 678 if (gSavedSettings.getBOOL("FreezeTime"))
659 { 679 {
660 for (std::set<LLPointer<LLViewerObject> >::iterator iter = mActiveObjects.begin(); 680 for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();
661 iter != mActiveObjects.end(); iter++) 681 iter != idle_list.end(); iter++)
662 { 682 {
663 LLViewerObject *objectp = *iter; 683 objectp = *iter;
664 if (objectp->getPCode() == LLViewerObject::LL_VO_CLOUDS || 684 if (objectp->getPCode() == LLViewerObject::LL_VO_CLOUDS ||
665 objectp->isAvatar()) 685 objectp->isAvatar())
666 { 686 {
@@ -670,10 +690,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
670 } 690 }
671 else 691 else
672 { 692 {
673 for (std::set<LLPointer<LLViewerObject> >::iterator iter = mActiveObjects.begin(); 693 for (std::vector<LLViewerObject*>::iterator idle_iter = idle_list.begin();
674 iter != mActiveObjects.end(); iter++) 694 idle_iter != idle_list.end(); idle_iter++)
675 { 695 {
676 LLViewerObject *objectp = *iter; 696 objectp = *idle_iter;
677 if (!objectp->idleUpdate(agent, world, frame_time)) 697 if (!objectp->idleUpdate(agent, world, frame_time))
678 { 698 {
679 // If Idle Update returns false, kill object! 699 // If Idle Update returns false, kill object!
@@ -684,10 +704,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
684 num_active_objects++; 704 num_active_objects++;
685 } 705 }
686 } 706 }
687 for (std::vector<LLViewerObject*>::iterator iter = kill_list.begin(); 707 for (std::vector<LLViewerObject*>::iterator kill_iter = kill_list.begin();
688 iter != kill_list.end(); iter++) 708 kill_iter != kill_list.end(); kill_iter++)
689 { 709 {
690 LLViewerObject *objectp = *iter; 710 objectp = *kill_iter;
691 killObject(objectp); 711 killObject(objectp);
692 } 712 }
693 } 713 }
@@ -1099,6 +1119,8 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce
1099 iter != pick_drawables.end(); iter++) 1119 iter != pick_drawables.end(); iter++)
1100 { 1120 {
1101 LLDrawable* drawablep = *iter; 1121 LLDrawable* drawablep = *iter;
1122 if( !drawablep )
1123 continue;
1102 1124
1103 LLViewerObject* last_objectp = NULL; 1125 LLViewerObject* last_objectp = NULL;
1104 for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++) 1126 for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++)
diff --git a/linden/indra/newview/llviewerprecompiledheaders.h b/linden/indra/newview/llviewerprecompiledheaders.h
index 632fa22..f5a66a7 100644
--- a/linden/indra/newview/llviewerprecompiledheaders.h
+++ b/linden/indra/newview/llviewerprecompiledheaders.h
@@ -109,7 +109,7 @@
109#include "llthread.h" 109#include "llthread.h"
110#include "lltimer.h" 110#include "lltimer.h"
111#include "lluuidhashmap.h" 111#include "lluuidhashmap.h"
112//#include "llversion.h" 112//#include "llversionviewer.h"
113//#include "processor.h" 113//#include "processor.h"
114#include "stdenums.h" 114#include "stdenums.h"
115#include "stdtypes.h" 115#include "stdtypes.h"
diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp
index 0a21e45..6378b01 100644
--- a/linden/indra/newview/llviewerregion.cpp
+++ b/linden/indra/newview/llviewerregion.cpp
@@ -1207,9 +1207,9 @@ public:
1207 llinfos << "BaseCapabilitiesComplete::error " 1207 llinfos << "BaseCapabilitiesComplete::error "
1208 << statusNum << ": " << reason << llendl; 1208 << statusNum << ": " << reason << llendl;
1209 1209
1210 if (STATE_SEED_GRANTED_WAIT == gStartupState) 1210 if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
1211 { 1211 {
1212 gStartupState = STATE_SEED_CAP_GRANTED; 1212 LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
1213 } 1213 }
1214 } 1214 }
1215 1215
@@ -1223,9 +1223,9 @@ public:
1223 << iter->first << llendl; 1223 << iter->first << llendl;
1224 } 1224 }
1225 1225
1226 if (STATE_SEED_GRANTED_WAIT == gStartupState) 1226 if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
1227 { 1227 {
1228 gStartupState = STATE_SEED_CAP_GRANTED; 1228 LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
1229 } 1229 }
1230 } 1230 }
1231 1231
@@ -1275,6 +1275,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
1275 capabilityNames.append("ParcelVoiceInfoRequest"); 1275 capabilityNames.append("ParcelVoiceInfoRequest");
1276 capabilityNames.append("ChatSessionRequest"); 1276 capabilityNames.append("ChatSessionRequest");
1277 capabilityNames.append("ProvisionVoiceAccountRequest"); 1277 capabilityNames.append("ProvisionVoiceAccountRequest");
1278 capabilityNames.append("ServerReleaseNotes");
1279 capabilityNames.append("CopyInventoryFromNotecard");
1278 1280
1279 llinfos << "posting to seed " << url << llendl; 1281 llinfos << "posting to seed " << url << llendl;
1280 1282
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp
index 3369125..754132d 100644
--- a/linden/indra/newview/llviewertexteditor.cpp
+++ b/linden/indra/newview/llviewertexteditor.cpp
@@ -55,6 +55,68 @@
55 55
56extern BOOL gPacificDaylightTime; 56extern BOOL gPacificDaylightTime;
57 57
58///----------------------------------------------------------------------------
59/// Class LLEmbeddedNotecardOpener
60///----------------------------------------------------------------------------
61class LLEmbeddedNotecardOpener : public LLInventoryCallback
62{
63 LLViewerTextEditor* mTextEditor;
64
65public:
66 LLEmbeddedNotecardOpener()
67 : mTextEditor(NULL)
68 {
69 }
70
71 void setEditor(LLViewerTextEditor* e) {mTextEditor = e;}
72
73 // override
74 void fire(const LLUUID& inv_item)
75 {
76 if(!mTextEditor)
77 {
78 // The parent text editor may have vanished by now.
79 // In that case just quit.
80 return;
81 }
82
83 LLInventoryItem* item = gInventory.getItem(inv_item);
84 if(!item)
85 {
86 llwarns << "Item add reported, but not found in inventory!: " << inv_item << llendl;
87 }
88 else
89 {
90 // See if we can bring an existing preview to the front
91 if(!LLPreview::show(item->getUUID(), true))
92 {
93 if(!gSavedSettings.getBOOL("ShowNewInventory"))
94 {
95 // There isn't one, so make a new preview
96 S32 left, top;
97 gFloaterView->getNewFloaterPosition(&left, &top);
98 LLRect rect = gSavedSettings.getRect("NotecardEditorRect");
99 rect.translate(left - rect.mLeft, top - rect.mTop);
100 LLPreviewNotecard* preview;
101 preview = new LLPreviewNotecard("preview notecard",
102 rect,
103 LLString("Embedded Note: ") + item->getName(),
104 item->getUUID(),
105 LLUUID::null,
106 item->getAssetUUID(),
107 true,
108 (LLViewerInventoryItem*)item);
109 preview->setSourceID(LLUUID::null);
110 preview->setFocus(TRUE);
111
112 // Force to be entirely onscreen.
113 gFloaterView->adjustToFitScreen(preview, FALSE);
114 }
115 }
116 }
117 }
118};
119
58//////////////////////////////////////////////////////////// 120////////////////////////////////////////////////////////////
59// LLEmbeddedItems 121// LLEmbeddedItems
60// 122//
@@ -497,14 +559,21 @@ LLViewerTextEditor::LLViewerTextEditor(const LLString& name,
497 const LLFontGL* font, 559 const LLFontGL* font,
498 BOOL allow_embedded_items) 560 BOOL allow_embedded_items)
499 : LLTextEditor(name, rect, max_length, default_text, font, allow_embedded_items), 561 : LLTextEditor(name, rect, max_length, default_text, font, allow_embedded_items),
500 mDragItemSaved(FALSE) 562 mDragItemSaved(FALSE),
563 mInventoryCallback(new LLEmbeddedNotecardOpener)
501{ 564{
502 mEmbeddedItemList = new LLEmbeddedItems(this); 565 mEmbeddedItemList = new LLEmbeddedItems(this);
566 mInventoryCallback->setEditor(this);
503} 567}
504 568
505LLViewerTextEditor::~LLViewerTextEditor() 569LLViewerTextEditor::~LLViewerTextEditor()
506{ 570{
507 delete mEmbeddedItemList; 571 delete mEmbeddedItemList;
572
573
574 // The inventory callback may still be in use by gInventoryCallbackManager...
575 // so set its reference to this to null.
576 mInventoryCallback->setEditor(NULL);
508} 577}
509 578
510/////////////////////////////////////////////////////////////////// 579///////////////////////////////////////////////////////////////////
@@ -1279,22 +1348,14 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item )
1279 open_landmark((LLViewerInventoryItem*)item, " preview landmark", FALSE, item->getUUID(), TRUE); 1348 open_landmark((LLViewerInventoryItem*)item, " preview landmark", FALSE, item->getUUID(), TRUE);
1280} 1349}
1281 1350
1282
1283void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, BOOL saved ) 1351void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, BOOL saved )
1284{ 1352{
1285 if (saved) 1353 if (saved)
1286 { 1354 {
1287 // Pop-up the notecard floater. 1355 // An LLInventoryItem needs to be in an inventory to be opened.
1288 // Note: Previously would copy to inventory and rely on autodisplay to view. 1356 // This will give the item to the viewer's agent.
1289 // Now that autodisplay can be turned off, we need to make this case display always. 1357 // The callback will attempt to open it if its not already opened.
1290 // besides, there's no point adding to inventory -MG 1358 copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback));
1291 open_notecard(
1292 (LLViewerInventoryItem*)item,
1293 LLString("Embedded Note: ") + item->getName(), // title
1294 mObjectID,
1295 FALSE, // show_keep_discard
1296 LLUUID::null, // source_id
1297 TRUE); // take_focus
1298 } 1359 }
1299 else 1360 else
1300 { 1361 {
@@ -1369,11 +1430,11 @@ bool LLViewerTextEditor::importStream(std::istream& str)
1369 return success; 1430 return success;
1370} 1431}
1371 1432
1372void LLViewerTextEditor::copyInventory(LLInventoryItem* item) 1433void LLViewerTextEditor::copyInventory(const LLInventoryItem* item, U32 callback_id)
1373{ 1434{
1374 copy_inventory_from_notecard(mObjectID, 1435 copy_inventory_from_notecard(mObjectID,
1375 mNotecardInventoryID, 1436 mNotecardInventoryID,
1376 item); 1437 item, callback_id);
1377} 1438}
1378 1439
1379bool LLViewerTextEditor::hasEmbeddedInventory() 1440bool LLViewerTextEditor::hasEmbeddedInventory()
diff --git a/linden/indra/newview/llviewertexteditor.h b/linden/indra/newview/llviewertexteditor.h
index 1dbc7b6..230ce3e 100644
--- a/linden/indra/newview/llviewertexteditor.h
+++ b/linden/indra/newview/llviewertexteditor.h
@@ -33,7 +33,7 @@
33 33
34class LLInventoryItem; 34class LLInventoryItem;
35class LLEmbeddedItems; 35class LLEmbeddedItems;
36 36class LLEmbeddedNotecardOpener;
37 37
38// 38//
39// Classes 39// Classes
@@ -86,7 +86,7 @@ public:
86 // Appends Second Life time, small font, grey 86 // Appends Second Life time, small font, grey
87 // If this starts a line, you need to prepend a newline. 87 // If this starts a line, you need to prepend a newline.
88 88
89 void copyInventory(LLInventoryItem* item); 89 void copyInventory(const LLInventoryItem* item, U32 callback_id = 0);
90 90
91 // returns true if there is embedded inventory. 91 // returns true if there is embedded inventory.
92 // *HACK: This is only useful because the notecard verifier may 92 // *HACK: This is only useful because the notecard verifier may
@@ -123,6 +123,8 @@ protected:
123 123
124 LLUUID mObjectID; 124 LLUUID mObjectID;
125 LLUUID mNotecardInventoryID; 125 LLUUID mNotecardInventoryID;
126
127 LLPointer<LLEmbeddedNotecardOpener> mInventoryCallback;
126}; 128};
127 129
128#endif // LL_VIEWERTEXTEDITOR_H 130#endif // LL_VIEWERTEXTEDITOR_H
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 13a4c41..fb52827 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -1305,7 +1305,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
1305 { 1305 {
1306 if (!gQuit) 1306 if (!gQuit)
1307 { 1307 {
1308 if (gStartupState >= STATE_STARTED) 1308 if (LLStartUp::getStartupState() >= STATE_STARTED)
1309 { 1309 {
1310 // if we're in world, show a progress bar to hide reloading of textures 1310 // if we're in world, show a progress bar to hide reloading of textures
1311 llinfos << "Restoring GL during activate" << llendl; 1311 llinfos << "Restoring GL during activate" << llendl;
@@ -2746,27 +2746,11 @@ BOOL LLViewerWindow::handlePerFrameHover()
2746 2746
2747 gPipeline.sRenderProcessBeacons = FALSE; 2747 gPipeline.sRenderProcessBeacons = FALSE;
2748 KEY key = gKeyboard->currentKey(); 2748 KEY key = gKeyboard->currentKey();
2749 if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || (gFloaterTools && gFloaterTools->getVisible()) || gSavedSettings.getBOOL("BeaconAlwaysOn")) 2749 if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || gSavedSettings.getBOOL("BeaconAlwaysOn"))
2750 { 2750 {
2751 gPipeline.sRenderProcessBeacons = TRUE; 2751 gPipeline.sRenderProcessBeacons = TRUE;
2752 } 2752 }
2753 2753
2754/*
2755 // Show joints while in edit mode and hold down alt key.
2756 if (gHUDManager)
2757 {
2758 BOOL menuOption = gSavedSettings.getBOOL("AltShowsPhysical");
2759 if (menuOption
2760 || (gFloaterTools && gFloaterTools->getVisible()))
2761 {
2762 gHUDManager->toggleShowPhysical( mask & MASK_ALT );
2763 }
2764 else
2765 {
2766 gHUDManager->toggleShowPhysical( FALSE );
2767 }
2768 }
2769*/
2770 BOOL handled = FALSE; 2754 BOOL handled = FALSE;
2771 2755
2772 BOOL handled_by_top_ctrl = FALSE; 2756 BOOL handled_by_top_ctrl = FALSE;
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 3b9e8ea..456adfc 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -1372,6 +1372,7 @@ void LLVOAvatar::initClass()
1372 if (!skeleton_node) 1372 if (!skeleton_node)
1373 { 1373 {
1374 llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl; 1374 llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl;
1375 return;
1375 } 1376 }
1376 1377
1377 LLString skeleton_file_name; 1378 LLString skeleton_file_name;
diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp
index 8a0e0dd..9e1c90a 100644
--- a/linden/indra/newview/llvoiceclient.cpp
+++ b/linden/indra/newview/llvoiceclient.cpp
@@ -1339,7 +1339,7 @@ void LLVoiceClient::stateMachine()
1339 CloseHandle(pinfo.hThread); // stops leaks - nothing else 1339 CloseHandle(pinfo.hThread); // stops leaks - nothing else
1340 } 1340 }
1341 1341
1342 delete args2; 1342 delete[] args2;
1343#else // LL_WINDOWS 1343#else // LL_WINDOWS
1344 // This should be the same for mac and linux 1344 // This should be the same for mac and linux
1345 { 1345 {
diff --git a/linden/indra/newview/llvoicevisualizer.cpp b/linden/indra/newview/llvoicevisualizer.cpp
index fca2226..2c64e46 100644
--- a/linden/indra/newview/llvoicevisualizer.cpp
+++ b/linden/indra/newview/llvoicevisualizer.cpp
@@ -1,3 +1,31 @@
1/**
2 * @file llvoicevisualizer.cpp
3 * @brief Draws in-world speaking indicators.
4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 *
7 * Second Life Viewer Source Code
8 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement
11 * ("Other License"), formally executed by you and Linden Lab. Terms of
12 * the GPL can be found in doc/GPL-license.txt in this distribution, or
13 * online at http://secondlife.com/developers/opensource/gplv2
14 *
15 * There are special exceptions to the terms and conditions of the GPL as
16 * it is applied to this Source Code. View the full text of the exception
17 * in the file doc/FLOSS-exception.txt in this software distribution, or
18 * online at http://secondlife.com/developers/opensource/flossexception
19 *
20 * By copying, modifying or distributing this software, you acknowledge
21 * that you have read and understood your obligations described above,
22 * and agree to abide by those obligations.
23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE.
27 */
28
1//---------------------------------------------------------------------- 29//----------------------------------------------------------------------
2// Voice Visualizer 30// Voice Visualizer
3// author: JJ Ventrella 31// author: JJ Ventrella
diff --git a/linden/indra/newview/llvoicevisualizer.h b/linden/indra/newview/llvoicevisualizer.h
index ea53372..9cd0465 100644
--- a/linden/indra/newview/llvoicevisualizer.h
+++ b/linden/indra/newview/llvoicevisualizer.h
@@ -1,3 +1,31 @@
1/**
2 * @file llvoicevisualizer.h
3 * @brief Draws in-world speaking indicators.
4 *
5 * Copyright (c) 2000-2007, Linden Research, Inc.
6 *
7 * Second Life Viewer Source Code
8 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement
11 * ("Other License"), formally executed by you and Linden Lab. Terms of
12 * the GPL can be found in doc/GPL-license.txt in this distribution, or
13 * online at http://secondlife.com/developers/opensource/gplv2
14 *
15 * There are special exceptions to the terms and conditions of the GPL as
16 * it is applied to this Source Code. View the full text of the exception
17 * in the file doc/FLOSS-exception.txt in this software distribution, or
18 * online at http://secondlife.com/developers/opensource/flossexception
19 *
20 * By copying, modifying or distributing this software, you acknowledge
21 * that you have read and understood your obligations described above,
22 * and agree to abide by those obligations.
23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE.
27 */
28
1//-------------------------------------------------------------------- 29//--------------------------------------------------------------------
2// 30//
3// VOICE VISUALIZER 31// VOICE VISUALIZER
diff --git a/linden/indra/newview/llvopartgroup.cpp b/linden/indra/newview/llvopartgroup.cpp
index 791b4ab..ad65a55 100644
--- a/linden/indra/newview/llvopartgroup.cpp
+++ b/linden/indra/newview/llvopartgroup.cpp
@@ -478,7 +478,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
478 buffer->getTexCoordStrider(texcoordsp); 478 buffer->getTexCoordStrider(texcoordsp);
479 buffer->getIndexStrider(indicesp); 479 buffer->getIndexStrider(indicesp);
480 480
481 std::vector<LLDrawInfo*>& draw_vec = group->mDrawMap[mRenderPass]; 481 LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[mRenderPass];
482 482
483 for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i) 483 for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i)
484 { 484 {
diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp
index 442ef23..32a8cac 100644
--- a/linden/indra/newview/llvosky.cpp
+++ b/linden/indra/newview/llvosky.cpp
@@ -31,6 +31,7 @@
31#include "llvosky.h" 31#include "llvosky.h"
32 32
33#include "imageids.h" 33#include "imageids.h"
34#include "llfeaturemanager.h"
34#include "llviewercontrol.h" 35#include "llviewercontrol.h"
35#include "llframetimer.h" 36#include "llframetimer.h"
36#include "timing.h" 37#include "timing.h"
@@ -597,7 +598,7 @@ void LLVOSky::initCubeMap()
597 { 598 {
598 mCubeMap->init(images); 599 mCubeMap->init(images);
599 } 600 }
600 else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap) 601 else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
601 { 602 {
602 mCubeMap = new LLCubeMap(); 603 mCubeMap = new LLCubeMap();
603 mCubeMap->init(images); 604 mCubeMap->init(images);
@@ -634,7 +635,8 @@ void LLVOSky::restoreGL()
634 635
635 calcBrightnessScaleAndColors(); 636 calcBrightnessScaleAndColors();
636 637
637 if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap) 638 if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap
639 && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
638 { 640 {
639 LLCubeMap* cube_map = getCubeMap(); 641 LLCubeMap* cube_map = getCubeMap();
640 642
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp
index a0a83f5..4656eda 100644
--- a/linden/indra/newview/llvovolume.cpp
+++ b/linden/indra/newview/llvovolume.cpp
@@ -2086,7 +2086,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
2086 } 2086 }
2087 2087
2088 //add face to drawmap 2088 //add face to drawmap
2089 std::vector<LLDrawInfo*>& draw_vec = group->mDrawMap[type]; 2089 LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[type];
2090 2090
2091 S32 idx = draw_vec.size()-1; 2091 S32 idx = draw_vec.size()-1;
2092 2092
@@ -2111,7 +2111,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
2111 U32 end = start + facep->getGeomCount()-1; 2111 U32 end = start + facep->getGeomCount()-1;
2112 U32 offset = facep->getIndicesStart(); 2112 U32 offset = facep->getIndicesStart();
2113 U32 count = facep->getIndicesCount(); 2113 U32 count = facep->getIndicesCount();
2114 LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex, 2114 LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset,tex,
2115 facep->mVertexBuffer, fullbright, bump); 2115 facep->mVertexBuffer, fullbright, bump);
2116 draw_info->mVSize = facep->getVirtualSize(); 2116 draw_info->mVSize = facep->getVirtualSize();
2117 draw_vec.push_back(draw_info); 2117 draw_vec.push_back(draw_info);
@@ -2151,7 +2151,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
2151 U32 end = start + facep->getGeomCount()-1; 2151 U32 end = start + facep->getGeomCount()-1;
2152 U32 offset = facep->getIndicesStart(); 2152 U32 offset = facep->getIndicesStart();
2153 U32 count = facep->getIndicesCount(); 2153 U32 count = facep->getIndicesCount();
2154 LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex, 2154 LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset,tex,
2155 facep->mVertexBuffer, fullbright, bump); 2155 facep->mVertexBuffer, fullbright, bump);
2156 draw_info->mVSize = facep->getVirtualSize(); 2156 draw_info->mVSize = facep->getVirtualSize();
2157 draw_vec.push_back(draw_info); 2157 draw_vec.push_back(draw_info);
diff --git a/linden/indra/newview/llwearable.cpp b/linden/indra/newview/llwearable.cpp
index 4dc3080..6db871c 100644
--- a/linden/indra/newview/llwearable.cpp
+++ b/linden/indra/newview/llwearable.cpp
@@ -934,7 +934,7 @@ void LLWearable::saveNewAsset()
934} 934}
935 935
936// static 936// static
937void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status) // StoreAssetData callback (fixed) 937void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
938{ 938{
939 LLWearableSaveData* data = (LLWearableSaveData*)userdata; 939 LLWearableSaveData* data = (LLWearableSaveData*)userdata;
940 const char* type_name = LLWearable::typeToTypeName(data->mType); 940 const char* type_name = LLWearable::typeToTypeName(data->mType);
@@ -1003,3 +1003,4 @@ void LLWearable::dump()
1003 } 1003 }
1004} 1004}
1005 1005
1006
diff --git a/linden/indra/newview/llwearable.h b/linden/indra/newview/llwearable.h
index 1e953f5..41e9ed2 100644
--- a/linden/indra/newview/llwearable.h
+++ b/linden/indra/newview/llwearable.h
@@ -108,7 +108,7 @@ public:
108 static LLAssetType::EType typeToAssetType( EWearableType wearable_type ); 108 static LLAssetType::EType typeToAssetType( EWearableType wearable_type );
109 109
110 void saveNewAsset(); 110 void saveNewAsset();
111 static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status ); 111 static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status );
112 112
113 BOOL isMatchedToInventoryItem( LLViewerInventoryItem* item ); 113 BOOL isMatchedToInventoryItem( LLViewerInventoryItem* item );
114 114
diff --git a/linden/indra/newview/llwearablelist.cpp b/linden/indra/newview/llwearablelist.cpp
index b345ab0..8c56727 100644
--- a/linden/indra/newview/llwearablelist.cpp
+++ b/linden/indra/newview/llwearablelist.cpp
@@ -93,7 +93,7 @@ void LLWearableList::getAsset( const LLAssetID& assetID, const LLString& wearabl
93} 93}
94 94
95// static 95// static
96void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status ) 96void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status )
97{ 97{
98 BOOL success = FALSE; 98 BOOL success = FALSE;
99 LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; 99 LLWearableArrivedData* data = (LLWearableArrivedData*) userdata;
diff --git a/linden/indra/newview/llwearablelist.h b/linden/indra/newview/llwearablelist.h
index 632f5af..3627685 100644
--- a/linden/indra/newview/llwearablelist.h
+++ b/linden/indra/newview/llwearablelist.h
@@ -59,7 +59,7 @@ public:
59 LLWearable* createNewWearable( EWearableType type ); 59 LLWearable* createNewWearable( EWearableType type );
60 60
61 // Pseudo-private 61 // Pseudo-private
62 static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status); 62 static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status, LLExtStat ext_status);
63 63
64protected: 64protected:
65 LLPtrSkipMap< const LLUUID, LLWearable* > mList; 65 LLPtrSkipMap< const LLUUID, LLWearable* > mList;
diff --git a/linden/indra/newview/lsl_guide.html b/linden/indra/newview/lsl_guide.html
index 33c2499..98b2c4c 100644
--- a/linden/indra/newview/lsl_guide.html
+++ b/linden/indra/newview/lsl_guide.html
@@ -3843,6 +3843,7 @@ talk_about_inventory(integer type)
3843 llSay(0, "No more inventory items"); 3843 llSay(0, "No more inventory items");
3844 continue = FALSE; 3844 continue = FALSE;
3845 } 3845 }
3846 i++;
3846 } while(continue); 3847 } while(continue);
3847} 3848}
3848 </PRE 3849 </PRE
@@ -15055,16 +15056,6 @@ HREF="#AEN5604"
15055>. 15056>.
15056 If <CODE 15057 If <CODE
15057CLASS="parameter" 15058CLASS="parameter"
15058<<<<<<< .working
15059=======
15060>linknumber</CODE
15061> is <A
15062HREF="#AEN5604"
15063>LINK_SET</A
15064>, set the alpha of
15065 all objects in the linked set. If <CODE
15066CLASS="parameter"
15067>>>>>>> .merge-right.r59207
15068>face</CODE 15059>face</CODE
15069> is 15060> is
15070 <A 15061 <A
@@ -15116,16 +15107,6 @@ HREF="#AEN5604"
15116>. 15107>.
15117 If <CODE 15108 If <CODE
15118CLASS="parameter" 15109CLASS="parameter"
15119<<<<<<< .working
15120=======
15121>linknumber</CODE
15122> is <A
15123HREF="#AEN5604"
15124>LINK_SET</A
15125>, set the color of
15126 all objects in the linked set. If <CODE
15127CLASS="parameter"
15128>>>>>>> .merge-right.r59207
15129>face</CODE 15110>face</CODE
15130> is 15111> is
15131 <A 15112 <A
@@ -15153,7 +15134,6 @@ NAME="AEN3915"
15153><CODE 15134><CODE
15154><CODE 15135><CODE
15155CLASS="FUNCDEF" 15136CLASS="FUNCDEF"
15156<<<<<<< .working
15157>llSetLinkPrimitiveParams</CODE 15137>llSetLinkPrimitiveParams</CODE
15158>(integer linknumber, list rules);</CODE 15138>(integer linknumber, list rules);</CODE
15159></P 15139></P
@@ -15253,109 +15233,6 @@ NAME="AEN3950"
15253><CODE 15233><CODE
15254><CODE 15234><CODE
15255CLASS="FUNCDEF" 15235CLASS="FUNCDEF"
15256=======
15257>llSetLinkPrimitiveParams</CODE
15258>(integer linknumber, list rules);</CODE
15259></P
15260><P
15261></P
15262></DIV
15263><P
15264>Sets the primitive parameters of the linked child
15265 specified by <CODE
15266CLASS="parameter"
15267>linknumber</CODE
15268>. A value of 0 means
15269 no link, 1 the root, 2 for first child, etc. If
15270 <CODE
15271CLASS="parameter"
15272>linknumber</CODE
15273> is <A
15274HREF="#AEN5604"
15275>LINK_SET</A
15276>, set the primitive parameters
15277 of all objects in the linked set. The <CODE
15278CLASS="parameter"
15279>rules</CODE
15280>
15281 list is identical to that of
15282 <A
15283HREF="#AEN4008"
15284>llSetPrimitiveParams</A
15285>.</P
15286></DIV
15287><DIV
15288CLASS="section"
15289><HR><H2
15290CLASS="section"
15291><A
15292NAME="AEN3929"
15293>A.235. llSetLinkTexture</A
15294></H2
15295><DIV
15296CLASS="funcsynopsis"
15297><P
15298></P
15299><A
15300NAME="AEN3931"
15301></A
15302><P
15303><CODE
15304><CODE
15305CLASS="FUNCDEF"
15306>llSetLinkTexture</CODE
15307>(integer linknumber, string texture, integer face);</CODE
15308></P
15309><P
15310></P
15311></DIV
15312><P
15313>Sets the <CODE
15314CLASS="parameter"
15315>texture</CODE
15316> of the linked child
15317 specified by <CODE
15318CLASS="parameter"
15319>linknumber</CODE
15320>. A value of 0 means
15321 no link, 1 the root, 2 for first child, etc. If
15322 <CODE
15323CLASS="parameter"
15324>linknumber</CODE
15325> is <A
15326HREF="#AEN5604"
15327>LINK_SET</A
15328>, set the texture of
15329 all objects in the linked set. If <CODE
15330CLASS="parameter"
15331>face</CODE
15332> is
15333 <A
15334HREF="#AEN6061"
15335>ALL_SIDES</A
15336>, set the texture
15337 of all faces.</P
15338></DIV
15339><DIV
15340CLASS="section"
15341><HR><H2
15342CLASS="section"
15343><A
15344NAME="AEN3948"
15345>A.236. llSetLocalRot</A
15346></H2
15347><DIV
15348CLASS="funcsynopsis"
15349><P
15350></P
15351><A
15352NAME="AEN3950"
15353></A
15354><P
15355><CODE
15356><CODE
15357CLASS="FUNCDEF"
15358>>>>>>> .merge-right.r59207
15359>llSetLocalRot</CODE 15236>llSetLocalRot</CODE
15360>(rotation rot);</CODE 15237>(rotation rot);</CODE
15361></P 15238></P
diff --git a/linden/indra/newview/macview.xcodeproj/project.pbxproj b/linden/indra/newview/macview.xcodeproj/project.pbxproj
index 669833e..0594224 100644
--- a/linden/indra/newview/macview.xcodeproj/project.pbxproj
+++ b/linden/indra/newview/macview.xcodeproj/project.pbxproj
@@ -585,6 +585,7 @@
585 C1F5D0A50B138AEB00827F1D /* lluserrelations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C1F5D0A30B138AEB00827F1D /* lluserrelations.cpp */; }; 585 C1F5D0A50B138AEB00827F1D /* lluserrelations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C1F5D0A30B138AEB00827F1D /* lluserrelations.cpp */; };
586 C64F673F0AFBED80009732B5 /* lllogchat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F673D0AFBED80009732B5 /* lllogchat.cpp */; }; 586 C64F673F0AFBED80009732B5 /* lllogchat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F673D0AFBED80009732B5 /* lllogchat.cpp */; };
587 C64F67420AFBED91009732B5 /* lldirpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F67400AFBED91009732B5 /* lldirpicker.cpp */; }; 587 C64F67420AFBED91009732B5 /* lldirpicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C64F67400AFBED91009732B5 /* lldirpicker.cpp */; };
588 D23289B50C453A3600304FEF /* llfloaterreleasemsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D23289B30C453A3600304FEF /* llfloaterreleasemsg.cpp */; };
588 D62830DB0B4DC76300F8830F /* llimagej2coj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D62830D80B4DC76300F8830F /* llimagej2coj.cpp */; }; 589 D62830DB0B4DC76300F8830F /* llimagej2coj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D62830D80B4DC76300F8830F /* llimagej2coj.cpp */; };
589 D645940C0B3B6D9000FAB68F /* libapr-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDE8764E09BEA39600AF6316 /* libapr-1.a */; }; 590 D645940C0B3B6D9000FAB68F /* libapr-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FDE8764E09BEA39600AF6316 /* libapr-1.a */; };
590 D645940D0B3B6D9A00FAB68F /* libaprutil-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD6C9A5209C773A000AA1849 /* libaprutil-1.a */; }; 591 D645940D0B3B6D9A00FAB68F /* libaprutil-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD6C9A5209C773A000AA1849 /* libaprutil-1.a */; };
@@ -1132,6 +1133,7 @@
1132 26F52AD8051F61DF00A80050 /* llmenucommands.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llmenucommands.cpp; sourceTree = SOURCE_ROOT; }; 1133 26F52AD8051F61DF00A80050 /* llmenucommands.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llmenucommands.cpp; sourceTree = SOURCE_ROOT; };
1133 26F52ADA051F61DF00A80050 /* llhudeffectpointat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectpointat.cpp; sourceTree = SOURCE_ROOT; }; 1134 26F52ADA051F61DF00A80050 /* llhudeffectpointat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectpointat.cpp; sourceTree = SOURCE_ROOT; };
1134 26F52ADB051F61DF00A80050 /* llhudeffectlookat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectlookat.cpp; sourceTree = SOURCE_ROOT; }; 1135 26F52ADB051F61DF00A80050 /* llhudeffectlookat.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llhudeffectlookat.cpp; sourceTree = SOURCE_ROOT; };
1136 295542580C3B371500025801 /* llversionviewer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llversionviewer.h; sourceTree = "<group>"; };
1135 299F95BE0ADDE5D000C94EEF /* llviewquery.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llviewquery.cpp; sourceTree = "<group>"; }; 1137 299F95BE0ADDE5D000C94EEF /* llviewquery.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llviewquery.cpp; sourceTree = "<group>"; };
1136 299F95BF0ADDE5D000C94EEF /* llviewquery.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llviewquery.h; sourceTree = "<group>"; }; 1138 299F95BF0ADDE5D000C94EEF /* llviewquery.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llviewquery.h; sourceTree = "<group>"; };
1137 2E6FE90D09FD560A00AF02FF /* llpanelgroupnotices.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpanelgroupnotices.cpp; sourceTree = SOURCE_ROOT; }; 1139 2E6FE90D09FD560A00AF02FF /* llpanelgroupnotices.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpanelgroupnotices.cpp; sourceTree = SOURCE_ROOT; };
@@ -1234,7 +1236,6 @@
1234 61922154074A9B58005E1F34 /* llsys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llsys.h; sourceTree = "<group>"; }; 1236 61922154074A9B58005E1F34 /* llsys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llsys.h; sourceTree = "<group>"; };
1235 61922155074A9B58005E1F34 /* lltimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lltimer.h; sourceTree = "<group>"; }; 1237 61922155074A9B58005E1F34 /* lltimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lltimer.h; sourceTree = "<group>"; };
1236 61922158074A9B58005E1F34 /* lluuidhashmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lluuidhashmap.h; sourceTree = "<group>"; }; 1238 61922158074A9B58005E1F34 /* lluuidhashmap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lluuidhashmap.h; sourceTree = "<group>"; };
1237 61922159074A9B58005E1F34 /* llversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llversion.h; sourceTree = "<group>"; };
1238 6192215B074A9B58005E1F34 /* processor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = processor.h; sourceTree = "<group>"; }; 1239 6192215B074A9B58005E1F34 /* processor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = processor.h; sourceTree = "<group>"; };
1239 6192215C074A9B58005E1F34 /* stdenums.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdenums.h; sourceTree = "<group>"; }; 1240 6192215C074A9B58005E1F34 /* stdenums.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdenums.h; sourceTree = "<group>"; };
1240 6192215D074A9B58005E1F34 /* stdtypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdtypes.h; sourceTree = "<group>"; }; 1241 6192215D074A9B58005E1F34 /* stdtypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stdtypes.h; sourceTree = "<group>"; };
@@ -1632,8 +1633,8 @@
1632 993A3E030B546D47007A0790 /* llvoiceclient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llvoiceclient.h; sourceTree = "<group>"; }; 1633 993A3E030B546D47007A0790 /* llvoiceclient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llvoiceclient.h; sourceTree = "<group>"; };
1633 993A3E040B546D47007A0790 /* llvoiceclient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvoiceclient.cpp; sourceTree = "<group>"; }; 1634 993A3E040B546D47007A0790 /* llvoiceclient.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvoiceclient.cpp; sourceTree = "<group>"; };
1634 994ADAE20A8016E500061DFB /* libllmozlib.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libllmozlib.dylib; path = "../../libraries/universal-darwin/lib_release/libllmozlib.dylib"; sourceTree = SOURCE_ROOT; }; 1635 994ADAE20A8016E500061DFB /* libllmozlib.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libllmozlib.dylib; path = "../../libraries/universal-darwin/lib_release/libllmozlib.dylib"; sourceTree = SOURCE_ROOT; };
1635 9956CAFB0B96679C00F58C6D /* llprefsvoice.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llprefsvoice.h; sourceTree = "<group>"; }; 1636 9956CAFB0B96679C00F58C6D /* llprefsvoice.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = llprefsvoice.h; sourceTree = "<group>"; };
1636 9956CAFC0B96679C00F58C6D /* llprefsvoice.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; path = llprefsvoice.cpp; sourceTree = "<group>"; }; 1637 9956CAFC0B96679C00F58C6D /* llprefsvoice.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; lineEnding = 0; path = llprefsvoice.cpp; sourceTree = "<group>"; };
1637 996209680B864D0E00392531 /* SLVoiceAgent.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; name = SLVoiceAgent.app; path = "vivox-runtime/universal-darwin/SLVoiceAgent.app"; sourceTree = SOURCE_ROOT; }; 1638 996209680B864D0E00392531 /* SLVoiceAgent.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; name = SLVoiceAgent.app; path = "vivox-runtime/universal-darwin/SLVoiceAgent.app"; sourceTree = SOURCE_ROOT; };
1638 9967E9090B37533F0087BD1B /* libfmodwrapper.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libfmodwrapper.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 1639 9967E9090B37533F0087BD1B /* libfmodwrapper.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libfmodwrapper.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
1639 9967E9520B37564D0087BD1B /* fmodwrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fmodwrapper.cpp; sourceTree = "<group>"; }; 1640 9967E9520B37564D0087BD1B /* fmodwrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fmodwrapper.cpp; sourceTree = "<group>"; };
@@ -2012,6 +2013,9 @@
2012 C64F673E0AFBED80009732B5 /* lllogchat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lllogchat.h; sourceTree = "<group>"; }; 2013 C64F673E0AFBED80009732B5 /* lllogchat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lllogchat.h; sourceTree = "<group>"; };
2013 C64F67400AFBED91009732B5 /* lldirpicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lldirpicker.cpp; sourceTree = "<group>"; }; 2014 C64F67400AFBED91009732B5 /* lldirpicker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lldirpicker.cpp; sourceTree = "<group>"; };
2014 C64F67410AFBED91009732B5 /* lldirpicker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lldirpicker.h; sourceTree = "<group>"; }; 2015 C64F67410AFBED91009732B5 /* lldirpicker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lldirpicker.h; sourceTree = "<group>"; };
2016 CB162DB40C6CCCFE00BF83BB /* llextendedstatus.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llextendedstatus.h; sourceTree = "<group>"; };
2017 D23289B30C453A3600304FEF /* llfloaterreleasemsg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfloaterreleasemsg.cpp; sourceTree = "<group>"; };
2018 D23289B40C453A3600304FEF /* llfloaterreleasemsg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llfloaterreleasemsg.h; sourceTree = "<group>"; };
2015 D62830D80B4DC76300F8830F /* llimagej2coj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llimagej2coj.cpp; sourceTree = "<group>"; }; 2019 D62830D80B4DC76300F8830F /* llimagej2coj.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llimagej2coj.cpp; sourceTree = "<group>"; };
2016 D62830D90B4DC76300F8830F /* llimagej2coj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llimagej2coj.h; sourceTree = "<group>"; }; 2020 D62830D90B4DC76300F8830F /* llimagej2coj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llimagej2coj.h; sourceTree = "<group>"; };
2017 D628315B0B4F3FA100F8830F /* llfont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfont.cpp; sourceTree = "<group>"; }; 2021 D628315B0B4F3FA100F8830F /* llfont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfont.cpp; sourceTree = "<group>"; };
@@ -2397,6 +2401,8 @@
2397 993A3E040B546D47007A0790 /* llvoiceclient.cpp */, 2401 993A3E040B546D47007A0790 /* llvoiceclient.cpp */,
2398 ABD8702D0B3C68630007C63B /* llvoavatar.h */, 2402 ABD8702D0B3C68630007C63B /* llvoavatar.h */,
2399 AB058FE40B3B74AD003C59D8 /* llvoicevisualizer.h */, 2403 AB058FE40B3B74AD003C59D8 /* llvoicevisualizer.h */,
2404 D23289B30C453A3600304FEF /* llfloaterreleasemsg.cpp */,
2405 D23289B40C453A3600304FEF /* llfloaterreleasemsg.h */,
2400 1A0DA5100C3AC07700361F49 /* llviewerjointmesh_vec.cpp */, 2406 1A0DA5100C3AC07700361F49 /* llviewerjointmesh_vec.cpp */,
2401 1A0DA5110C3AC07700361F49 /* llviewerjointmesh_sse2.cpp */, 2407 1A0DA5110C3AC07700361F49 /* llviewerjointmesh_sse2.cpp */,
2402 1A0DA5120C3AC07700361F49 /* llviewerjointmesh_sse.cpp */, 2408 1A0DA5120C3AC07700361F49 /* llviewerjointmesh_sse.cpp */,
@@ -2791,6 +2797,8 @@
2791 6192211E074A9B57005E1F34 /* llcommon */ = { 2797 6192211E074A9B57005E1F34 /* llcommon */ = {
2792 isa = PBXGroup; 2798 isa = PBXGroup;
2793 children = ( 2799 children = (
2800 295542580C3B371500025801 /* llversionviewer.h */,
2801 CB162DB40C6CCCFE00BF83BB /* llextendedstatus.h */,
2794 1A9897E70B98E2F4005C45D7 /* llbase32.h */, 2802 1A9897E70B98E2F4005C45D7 /* llbase32.h */,
2795 1A9897E80B98E2F4005C45D7 /* llbase32.cpp */, 2803 1A9897E80B98E2F4005C45D7 /* llbase32.cpp */,
2796 1A97C4540B8BCF9C00331A24 /* llliveappconfig.cpp */, 2804 1A97C4540B8BCF9C00331A24 /* llliveappconfig.cpp */,
@@ -2910,7 +2918,6 @@
2910 61922154074A9B58005E1F34 /* llsys.h */, 2918 61922154074A9B58005E1F34 /* llsys.h */,
2911 61922155074A9B58005E1F34 /* lltimer.h */, 2919 61922155074A9B58005E1F34 /* lltimer.h */,
2912 61922158074A9B58005E1F34 /* lluuidhashmap.h */, 2920 61922158074A9B58005E1F34 /* lluuidhashmap.h */,
2913 61922159074A9B58005E1F34 /* llversion.h */,
2914 99321B11081DD26000678159 /* llworkerthread.h */, 2921 99321B11081DD26000678159 /* llworkerthread.h */,
2915 99321B12081DD26000678159 /* llworkerthread.cpp */, 2922 99321B12081DD26000678159 /* llworkerthread.cpp */,
2916 6192215B074A9B58005E1F34 /* processor.h */, 2923 6192215B074A9B58005E1F34 /* processor.h */,
@@ -4620,6 +4627,7 @@
4620 1A0DA5140C3AC07800361F49 /* llviewerjointmesh_sse2.cpp in Sources */, 4627 1A0DA5140C3AC07800361F49 /* llviewerjointmesh_sse2.cpp in Sources */,
4621 1A0DA5150C3AC07800361F49 /* llviewerjointmesh_sse.cpp in Sources */, 4628 1A0DA5150C3AC07800361F49 /* llviewerjointmesh_sse.cpp in Sources */,
4622 79256EA30C57D6A5000AAFA4 /* llfloatervoicewizard.cpp in Sources */, 4629 79256EA30C57D6A5000AAFA4 /* llfloatervoicewizard.cpp in Sources */,
4630 D23289B50C453A3600304FEF /* llfloaterreleasemsg.cpp in Sources */,
4623 ); 4631 );
4624 runOnlyForDeploymentPostprocessing = 0; 4632 runOnlyForDeploymentPostprocessing = 0;
4625 }; 4633 };
diff --git a/linden/indra/newview/newview.vcproj b/linden/indra/newview/newview.vcproj
index 199083f..1ae7f8b 100644
--- a/linden/indra/newview/newview.vcproj
+++ b/linden/indra/newview/newview.vcproj
@@ -577,6 +577,9 @@
577 RelativePath=".\llfloaterregioninfo.cpp"> 577 RelativePath=".\llfloaterregioninfo.cpp">
578 </File> 578 </File>
579 <File 579 <File
580 RelativePath=".\llfloaterreleasemsg.cpp">
581 </File>
582 <File
580 RelativePath=".\llfloaterreporter.cpp"> 583 RelativePath=".\llfloaterreporter.cpp">
581 </File> 584 </File>
582 <File 585 <File
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index 16eaa22..8e42504 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -498,7 +498,7 @@ public:
498 { 498 {
499 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) 499 for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
500 { 500 {
501 for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j) 501 for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
502 { 502 {
503 LLDrawInfo* params = *j; 503 LLDrawInfo* params = *j;
504 if (mTextures.find(params->mTexture) != mTextures.end()) 504 if (mTextures.find(params->mTexture) != mTextures.end())
@@ -1651,10 +1651,10 @@ void LLPipeline::postSort(LLCamera& camera)
1651 } 1651 }
1652 for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j) 1652 for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j)
1653 { 1653 {
1654 std::vector<LLDrawInfo*>& src_vec = j->second; 1654 LLSpatialGroup::drawmap_elem_t& src_vec = j->second;
1655 std::vector<LLDrawInfo*>& dest_vec = mRenderMap[j->first]; 1655 LLSpatialGroup::drawmap_elem_t& dest_vec = mRenderMap[j->first];
1656 1656
1657 for (std::vector<LLDrawInfo*>::iterator k = src_vec.begin(); k != src_vec.end(); ++k) 1657 for (LLSpatialGroup::drawmap_elem_t::iterator k = src_vec.begin(); k != src_vec.end(); ++k)
1658 { 1658 {
1659 dest_vec.push_back(*k); 1659 dest_vec.push_back(*k);
1660 } 1660 }
diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h
index 218f920..06bfb73 100644
--- a/linden/indra/newview/pipeline.h
+++ b/linden/indra/newview/pipeline.h
@@ -393,7 +393,7 @@ public:
393 LLVector3 mSunDir; 393 LLVector3 mSunDir;
394 394
395 LLSpatialGroup::sg_vector_t mActiveGroups; 395 LLSpatialGroup::sg_vector_t mActiveGroups;
396 std::vector<LLDrawInfo*> mRenderMap[LLRenderPass::NUM_RENDER_TYPES]; 396 LLSpatialGroup::drawmap_elem_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES];
397 std::vector<LLSpatialGroup* > mAlphaGroups; 397 std::vector<LLSpatialGroup* > mAlphaGroups;
398 std::vector<LLSpatialGroup* > mAlphaGroupsPostWater; 398 std::vector<LLSpatialGroup* > mAlphaGroupsPostWater;
399 LLSpatialGroup::sg_vector_t mVisibleGroups; 399 LLSpatialGroup::sg_vector_t mVisibleGroups;
diff --git a/linden/indra/newview/prebuild.bat b/linden/indra/newview/prebuild.bat
index 139d810..ee714f5 100755
--- a/linden/indra/newview/prebuild.bat
+++ b/linden/indra/newview/prebuild.bat
@@ -1,13 +1,15 @@
1@echo off 1@echo off
2 2
3rem -- Check current message template against the master 3rem -- Check current message template against the master
4"../../scripts/template_verifier.py" --mode="development" 4
5"../../scripts/template_verifier.py" --mode="development" --cache_master
6
5if errorlevel 1 goto BuildFailed 7if errorlevel 1 goto BuildFailed
6goto end 8goto end
7 9
8:BuildFailed 10:BuildFailed
9echo PREBUILD FAILED 11echo PREBUILD FAILED
10exit 1 12exit 1
11 13
12:end 14:end
13echo PREBUILD SUCCESSFUL 15echo PREBUILD SUCCESSFUL
diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt
index 86f8c6d..f4d6a8a 100644
--- a/linden/indra/newview/releasenotes.txt
+++ b/linden/indra/newview/releasenotes.txt
@@ -1,11 +1,98 @@
1Release Notes for Second Life 1.18.2(1) September 19, 2007 1Release Notes for Second Life 1.18.3(2) August 27, 2007
2===================================== 2=====================================
3
4Changes: 3Changes:
5* Fix URL handler exploit described here: http://blog.secondlife.com/2007/09/18/second-life-url-handler-exploit/ 4* Altered beacon behavior
6* Update voice components to improve quality and address VWR-1532 5** The beacon shaft is always drawn
7* Add name of viewer release channel to embedded browser agent ID string 6** The arrow is drawn if the lateral distance to the location being tracked is less than your view distance
7** The text appears if the total distance to the location being tracked is less than your view distance
8* Changed Bug Reporting links to http:// instead of https://
9* Build mode no longer automatically turns on beacons
10* Removed 'Ping User' in statistics window (was returning 0, as userserver no longer exists)
11* Removed 'Open' menu option when clothing is selected (as 'Wear' is available)
12* Added minimize button to Inventory
13
14LSL changes:
15* Ability to get details about an object by object key:
16** list llGetObjectDetails(key id, list params)
17*** id = the key of the object to get info about.
18*** params = a list of the object details requested: [OBJECT_NAME, OBJECT_OWNER]
19*** returns a list of values in the order requested: [ "Object_Name", <the UUID key of the owner>]
20**** OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type.
21**** OBJECT_NAME Used with llGetObjectDetails to get an object's name.
22**** OBJECT_DESC Used with llGetObjectDetails to get an object's description.
23**** OBJECT_POS Used with llGetObjectDetails to get an object's position.
24**** OBJECT_ROT Used with llGetObjectDetails to get an object's rotation.
25**** OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity.
26**** OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned.
27**** OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key.
28**** OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key.
8 29
30Bug fixes:
31* Fixed inworld map region search failing if a space is included after the region name
32* Fixed Appearance editor preview squares after changing tabs
33* Fixed a bug with LODs for sculpted prims
34* Fixed flexy causes llTargetOmega child objects to not rotate
35* Fixed an incorrect Support link
36* Fixed clipboard capture on login screen's config info
37* Fixed web browser widget shows up blank when connecting via https
38* Fixed doubleclicking text entry fields should select a single word first, then the entire field
39* Fixed items renamed from Recent Items not displaying the correct name in All Items
40* Fixed physical memory calls with more than 4GB of memory
41* Fixed viewer crash by clicking Connect button repeatedly
42* Fixed crash in viewer when receiving bad HUD Effects
43* Fixed a Linux client crash
44* Fixed client on 64-bit Linux systems that cannot find their GL drivers
45* Improved Linux client threading
46* Improved client performance after closing an inventory folder with a large number of items
47* CID-633: Possible string overflow (and generally lame code)
48* CID-634: Possible string overflow (and generally lame code)
49* CID-639: Possible use of uninitialized mouse co-ordinates
50* CID-641: LLToolGrab::onMouseCaptureLost() doesn't check that projectPosAgentToScreen succeeded
51* CID-698: LLFloaterTexturePicker::isDirty() is not correctly overriding ancestor
52* SVC-300: Spam upon TP out of Help Island Public, per calling card and landmark
53* VWR-1079: Group Notice dialog: message text can't be copied and pasted
54* VWR-1187: Profile > Classifieds tab shows confirmation dialog when no changes are made
55* VWR-1225: Embedded notecards not functioning
56* VWR-1230: Text highlighting in Chat History window is cancelled when history scrolls
57* VWR-1372: Sculpt prim topology reverts to sphere unexpectedly
58* VWR-1398: Appearance editor's previews do not render correctly (1.17.2)
59* VWR-1460: Can not see permissions of objects in Buy Contents window when item has long name
60* VWR-1564: Viewer crashes when started with the "-local" argument.
61* VWR-1566: An attempt to fix the glDrawRangeElements crashes (refcount LLDrawInfo )
62* VWR-1567: Change the default item name for "snapshot to inventory" to something more usefull than "snapshot"
63* VWR-1638: confused viewer - displays login and regular menus and buttons
64* VWR-1640: login retires cause LLFrameStatView::setup() to seg fault
65* VWR-1647: "Show end of last IM conversation" in Preferences/Communication automatically remains checked after OK-ing unchecked
66* VWR-1699: Sculpt map preview inaccurate
67* VWR-1714: Folders flashing in Inventory window with Filters and 'Always show folders' checked
68* VWR-1721: GUI quirk in groups
69* VWR-1722: Profiles are editable in two places (including Search browser)
70* VWR-1736: Add a Invite to Group option to the Avatar Pie Menu
71* VWR-1743: LLFloaterGroups source code inconsistencies
72* VWR-1761: Group Invite Suggestion--add 'view group info' to invite dialog box
73* VWR-1808: Possible crash in llviewerobjectlist
74* VWR-1823: Bad typecast for 64 bit systems, llagent llfloatercustomize
75* VWR-1861: Renaming items in inventory folders does not update item sort order
76* VWR-1872: An attempt to fix the "empty inventory trash" crashes
77* VWR-1880: Modify "Ctrl-F" to call Search/Replace Dialog when invoked inside Script Window
78* VWR-1891: Detect a Debian bulid-host, as is done for Fedora
79* VWR-1892: Use pkgconfig for more libraries in the standalone build
80* VWR-1942: An error in the do-while example of the LSL Scripting Guide could cause infinite looping.
81* VWR-1951: Hide Particles is not working from the View > Beacons menu item
82* VWR-1968: Possible crash in llmultigesture.cpp
83* VWR-1976: Solaris' fprintf segfaults on NULL arguments
84* VWR-1987: Segfault on startup if audio doesn't initialize.
85* VWR-2036: Build tools floater does not remember its position on restart
86* VWR-2144: Client crashes when deleting unsaved gestures
87* VWR-2152: Possible crash in llviewerobjectlist
88* VWR-240: Cannot input Japanese characters from keyboard on Linux
89* VWR-423: Selecting group charter text causes Apply/Ignore/Cancel popup even if the text wasn't changed
90* VWR-493: Objects with "Linden" in their name can't be muted
91* VWR-493: Statistics bar, Packet Loss: % sign is doubled
92* VWR-749: Bandwidth indicator: Kbps, should not have capital k
93* VWR-819: Open the "More>>" section of the edit tools by default and persist it across sessions
94* VWR-866: Sculpties suffer HORRIBLY from JPEG artifacts
95* VWR-942: logRanOffEndOfPacket is too terse when it logs packet data, add some more info
9 96
10Release Notes for Second Life 1.18.2(0) August 10, 2007 97Release Notes for Second Life 1.18.2(0) August 10, 2007
11===================================== 98=====================================
diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc
index e5f4f5d..78267b8 100644
--- a/linden/indra/newview/res/newViewRes.rc
+++ b/linden/indra/newview/res/newViewRes.rc
@@ -227,8 +227,8 @@ TOOLPIPETTE CURSOR "toolpipette.cur"
227// 227//
228 228
229VS_VERSION_INFO VERSIONINFO 229VS_VERSION_INFO VERSIONINFO
230 FILEVERSION 1,18,2,1 230 FILEVERSION 1,18,3,2
231 PRODUCTVERSION 1,18,2,1 231 PRODUCTVERSION 1,18,3,2
232 FILEFLAGSMASK 0x3fL 232 FILEFLAGSMASK 0x3fL
233#ifdef _DEBUG 233#ifdef _DEBUG
234 FILEFLAGS 0x1L 234 FILEFLAGS 0x1L
@@ -245,12 +245,12 @@ BEGIN
245 BEGIN 245 BEGIN
246 VALUE "CompanyName", "Linden Lab" 246 VALUE "CompanyName", "Linden Lab"
247 VALUE "FileDescription", "Second Life" 247 VALUE "FileDescription", "Second Life"
248 VALUE "FileVersion", "1.18.2.1" 248 VALUE "FileVersion", "1.18.3.2"
249 VALUE "InternalName", "Second Life" 249 VALUE "InternalName", "Second Life"
250 VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc." 250 VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc."
251 VALUE "OriginalFilename", "SecondLife.exe" 251 VALUE "OriginalFilename", "SecondLife.exe"
252 VALUE "ProductName", "Second Life" 252 VALUE "ProductName", "Second Life"
253 VALUE "ProductVersion", "1.18.2.1" 253 VALUE "ProductVersion", "1.18.3.2"
254 END 254 END
255 END 255 END
256 BLOCK "VarFileInfo" 256 BLOCK "VarFileInfo"
diff --git a/linden/indra/newview/secondlife setup build release candidate.bat b/linden/indra/newview/secondlife setup build release candidate.bat
new file mode 100644
index 0000000..e2bdbf3
--- /dev/null
+++ b/linden/indra/newview/secondlife setup build release candidate.bat
@@ -0,0 +1,4 @@
1@rem Invoke the script which preps then runs the installer.
2@rem This batch file is customized per grid.
3
4@"secondlife setup build.bat" --channel="Second Life Release Candidate"
diff --git a/linden/indra/newview/skins/textures/textures.xml b/linden/indra/newview/skins/textures/textures.xml
index 1c02ce4..ccf0834 100644
--- a/linden/indra/newview/skins/textures/textures.xml
+++ b/linden/indra/newview/skins/textures/textures.xml
@@ -394,6 +394,7 @@
394 <oi_hud_mov_3_0.tga value="f5ff1f08-4c92-8606-1854-cc5b9d3e445c"/> 394 <oi_hud_mov_3_0.tga value="f5ff1f08-4c92-8606-1854-cc5b9d3e445c"/>
395 <oi_hud_mov_1_2.tga value="1e3abeed-e893-c44e-1f9d-5ecc76d21e5d"/> 395 <oi_hud_mov_1_2.tga value="1e3abeed-e893-c44e-1f9d-5ecc76d21e5d"/>
396 <oi_hud_mov_1_0.tga value="e300fc95-aa94-8e31-c501-ce903cac8b7c"/> 396 <oi_hud_mov_1_0.tga value="e300fc95-aa94-8e31-c501-ce903cac8b7c"/>
397 <eng_lng_1_0.jpg value="5fcaac05-0677-b208-e715-983ebf01d16f"/>
397 <circle.tga value="0498c309-5306-43cd-82a2-ae31d096cdef"/> 398 <circle.tga value="0498c309-5306-43cd-82a2-ae31d096cdef"/>
398 <mute_icon.tga value="37c8e000-6aa2-41ef-8f86-e0c2e60bfa42"/> 399 <mute_icon.tga value="37c8e000-6aa2-41ef-8f86-e0c2e60bfa42"/>
399 <active_speakers.tga value="c97bdfb5-b0da-4741-877c-7c1553957d30"/> 400 <active_speakers.tga value="c97bdfb5-b0da-4741-877c-7c1553957d30"/>
diff --git a/linden/indra/newview/skins/xui/en-us/alerts.xml b/linden/indra/newview/skins/xui/en-us/alerts.xml
index d294ae8..3030b78 100644
--- a/linden/indra/newview/skins/xui/en-us/alerts.xml
+++ b/linden/indra/newview/skins/xui/en-us/alerts.xml
@@ -3429,6 +3429,11 @@ spaceserver hiccup.
3429 OK 3429 OK
3430 </option> 3430 </option>
3431 </alert> 3431 </alert>
3432 <alert modal="true" name="ProblemAddingEstateManager">
3433 <message name="message">
3434 Problems adding a new estate manager. One or more estates may have a full manager list.
3435 </message>
3436 </alert>
3432 <alert modal="true" name="UnableToLoadNotecard"> 3437 <alert modal="true" name="UnableToLoadNotecard">
3433 <message name="message"> 3438 <message name="message">
3434 Unable to load notecard&apos;s asset at this time. 3439 Unable to load notecard&apos;s asset at this time.
diff --git a/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml b/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml
index 2cea9e7..c54b5de 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_image_preview.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater can_close="true" can_drag_on_left="false" can_minimize="false" 2<floater can_close="true" can_drag_on_left="false" can_minimize="false"
3 can_resize="false" height="440" min_height="140" min_width="300" 3 can_resize="false" height="463" min_height="140" min_width="300"
4 name="Image Preview" title="" width="300"> 4 name="Image Preview" title="" width="300">
5 <text bottom_delta="-40" follows="top|left" height="15" left="10" name="name_label"> 5 <text bottom_delta="-40" follows="top|left" height="15" left="10" name="name_label">
6 Name: 6 Name:
@@ -53,6 +53,10 @@ Unable to read image.
53 53
54Try saving image as 24 bit Targa (.tga). 54Try saving image as 24 bit Targa (.tga).
55 </text> 55 </text>
56 <check_box bottom="37" follows="bottom|left" enabled="false"
57 font="SansSerifSmall" height="16" initial_value="false"
58 label="Use lossless compression" left="10"
59 left_delta="2" name="lossless_check" control_name="LosslessJ2CUpload" width="280" />
56 <button bottom="10" follows="bottom|right" height="20" label="Cancel" left="182" 60 <button bottom="10" follows="bottom|right" height="20" label="Cancel" left="182"
57 name="cancel_btn" width="64" /> 61 name="cancel_btn" width="64" />
58 <button bottom="10" follows="bottom|left" height="20" label="Upload (L$[AMOUNT])" 62 <button bottom="10" follows="bottom|left" height="20" label="Upload (L$[AMOUNT])"
diff --git a/linden/indra/newview/skins/xui/en-us/floater_inventory.xml b/linden/indra/newview/skins/xui/en-us/floater_inventory.xml
index ffed294..3b1cb87 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_inventory.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_inventory.xml
@@ -1,4 +1,4 @@
1<floater bottom="-720" can_close="true" can_drag_on_left="false" can_minimize="false" 1<floater bottom="-720" can_close="true" can_drag_on_left="false" can_minimize="true"
2 can_resize="true" height="563" hidden="false" left="882" min_height="150" 2 can_resize="true" height="563" hidden="false" left="882" min_height="150"
3 min_width="240" mouse_opaque="true" name="Inventory" 3 min_width="240" mouse_opaque="true" name="Inventory"
4 rect_control="FloaterInventoryRect" title="Inventory" width="467"> 4 rect_control="FloaterInventoryRect" title="Inventory" width="467">
diff --git a/linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml b/linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml
new file mode 100644
index 0000000..5daa44b
--- /dev/null
+++ b/linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml
@@ -0,0 +1,17 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
3 height="500" min_height="300" min_width="300" name="floaterreleasemessage"
4 title="Entering Region" width="700">
5 <button bottom="10" follows="bottom|right" font="SansSerifSmall" height="20"
6 label="Close" name="close_btn" right="-10" width="50" />
7 <web_browser bottom="40" follows="top|left|bottom|right" font="SansSerifSmall" left="15"
8 name="release_message_floater_browser" right="-15" top="-30" />
9 <text hidden="true" name="in-world_help_title">In-World Help</text>
10 <text hidden="true" name="in-world_help_url">
11 http://www.secondlife.com/app/support/inworld.html
12 </text>
13 <text hidden="true" name="additional_help_title">Additional Help</text>
14 <text hidden="true" name="additional_help_url">
15 http://www.secondlife.com/app/support/support.html
16 </text>
17</floater> \ No newline at end of file
diff --git a/linden/indra/newview/skins/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/xui/en-us/floater_tools.xml
index 305a5ef..edd84cc 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_tools.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_tools.xml
@@ -855,10 +855,35 @@
855 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" 855 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16"
856 hidden="false" increment="0.1" initial_val="1" left_delta="73" max_val="4" 856 hidden="false" increment="0.1" initial_val="1" left_delta="73" max_val="4"
857 min_val="1" mouse_opaque="true" name="Revolutions" width="68" /> 857 min_val="1" mouse_opaque="true" name="Revolutions" width="68" />
858 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" 858 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true"
859 default_image_name="Default" follows="left|top" height="141" hidden="false" 859 default_image_name="Default" follows="left|top" height="141" hidden="false"
860 label="Sculpt Texture" left="121" mouse_opaque="true" name="sculpt texture control" 860 label="Sculpt Texture" left="121" mouse_opaque="true" name="sculpt texture control"
861 tool_tip="Click to choose a picture" width="141" /> 861 tool_tip="Click to choose a picture" width="141" visible="false"/>
862 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
863 bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
864 font="SansSerifSmall" h_pad="0" align="left" height="10" hidden="false"
865 left="121" mouse_opaque="true" name="label sculpt type" v_pad="0" width="121" visible="false">
866 Stitching type
867 </text>
868 <combo_box allow_text_entry="false" bottom_delta="-24" follows="left|top" height="18"
869 hidden="false" left="121" max_chars="20" mouse_opaque="true"
870 name="sculpt type control" width="141" visible="false">
871 <combo_item name="None" value="None" hidden="false">
872 (none)
873 </combo_item>
874 <combo_item name="Sphere" value="Sphere">
875 Sphere
876 </combo_item>
877 <combo_item name="Torus" value="Torus">
878 Torus
879 </combo_item>
880 <combo_item name="Plane" value="Plane">
881 Plane
882 </combo_item>
883 <combo_item name="Cylinder" value="Cylinder">
884 Cylinder
885 </combo_item>
886 </combo_box>
862 </panel> 887 </panel>
863 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" 888 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367"
864 hidden="false" label="Features" left="1" mouse_opaque="false" 889 hidden="false" label="Features" left="1" mouse_opaque="false"
diff --git a/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml b/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml
index 91e27b7..b2280e2 100644
--- a/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml
+++ b/linden/indra/newview/skins/xui/en-us/menu_pie_avatar.xml
@@ -28,11 +28,14 @@
28 <on_click function="Avatar.Freeze" /> 28 <on_click function="Avatar.Freeze" />
29 <on_enable function="Avatar.EnableFreezeEject" /> 29 <on_enable function="Avatar.EnableFreezeEject" />
30 </menu_item_call> 30 </menu_item_call>
31 <menu_item_separator />
32 <menu_item_call enabled="false" hidden="false" label="Give Card" mouse_opaque="true" 31 <menu_item_call enabled="false" hidden="false" label="Give Card" mouse_opaque="true"
33 name="Give Card"> 32 name="Give Card">
34 <on_click function="Avatar.GiveCard" /> 33 <on_click function="Avatar.GiveCard" />
35 </menu_item_call> 34 </menu_item_call>
35 <menu_item_call enabled="true" hidden="false" label="Group Invite..." mouse_opaque="true"
36 name="Invite...">
37 <on_click function="Avatar.InviteToGroup" />
38 </menu_item_call>
36 <menu_item_separator /> 39 <menu_item_separator />
37 <menu_item_call enabled="false" hidden="false" label="Eject..." mouse_opaque="true" 40 <menu_item_call enabled="false" hidden="false" label="Eject..." mouse_opaque="true"
38 name="Eject..."> 41 name="Eject...">
diff --git a/linden/indra/newview/skins/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/xui/en-us/menu_viewer.xml
index 4d30c05..d1bcb05 100644
--- a/linden/indra/newview/skins/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/xui/en-us/menu_viewer.xml
@@ -820,19 +820,19 @@
820 label="Bug Reporting 101..." left="0" mouse_opaque="true" 820 label="Bug Reporting 101..." left="0" mouse_opaque="true"
821 name="Bug Reporing 101..." width="166"> 821 name="Bug Reporing 101..." width="166">
822 <on_click function="PromptShowURL" 822 <on_click function="PromptShowURL"
823 userdata="WebLaunchBugReport101,https://wiki.secondlife.com/wiki/Bug_Reporting_101" /> 823 userdata="WebLaunchBugReport101,http://wiki.secondlife.com/wiki/Bug_Reporting_101" />
824 </menu_item_call> 824 </menu_item_call>
825 <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" 825 <menu_item_call bottom="-94" enabled="true" height="19" hidden="false"
826 label="Security Issues..." left="0" mouse_opaque="true" 826 label="Security Issues..." left="0" mouse_opaque="true"
827 name="Security Issues..." width="166"> 827 name="Security Issues..." width="166">
828 <on_click function="PromptShowURL" 828 <on_click function="PromptShowURL"
829 userdata="WebLaunchSecurityIssues,https://wiki.secondlife.com/wiki/Security_issues" /> 829 userdata="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues" />
830 </menu_item_call> 830 </menu_item_call>
831 <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" 831 <menu_item_call bottom="-94" enabled="true" height="19" hidden="false"
832 label="QA Wiki..." left="0" mouse_opaque="true" 832 label="QA Wiki..." left="0" mouse_opaque="true"
833 name="QA Wiki..." width="166"> 833 name="QA Wiki..." width="166">
834 <on_click function="PromptShowURL" 834 <on_click function="PromptShowURL"
835 userdata="WebLaunchQAWiki,https://wiki.secondlife.com/wiki/QA_Portal" /> 835 userdata="WebLaunchQAWiki,http://wiki.secondlife.com/wiki/QA_Portal" />
836 </menu_item_call> 836 </menu_item_call>
837 <menu_item_separator bottom="-411" enabled="true" height="8" hidden="false" label="-----------" 837 <menu_item_separator bottom="-411" enabled="true" height="8" hidden="false" label="-----------"
838 left="0" mouse_opaque="true" name="separator7" width="250" /> 838 left="0" mouse_opaque="true" name="separator7" width="250" />
@@ -840,13 +840,13 @@
840 label="Public Issue Tracker..." left="0" mouse_opaque="true" 840 label="Public Issue Tracker..." left="0" mouse_opaque="true"
841 name="Public Issue Tracker..." width="166"> 841 name="Public Issue Tracker..." width="166">
842 <on_click function="PromptShowURL" 842 <on_click function="PromptShowURL"
843 userdata="WebLaunchPublicIssue,https://jira.secondlife.com" /> 843 userdata="WebLaunchPublicIssue,http://jira.secondlife.com" />
844 </menu_item_call> 844 </menu_item_call>
845 <menu_item_call bottom="-94" enabled="true" height="19" hidden="false" 845 <menu_item_call bottom="-94" enabled="true" height="19" hidden="false"
846 label="Public Issue Tracker Help..." left="0" mouse_opaque="true" 846 label="Public Issue Tracker Help..." left="0" mouse_opaque="true"
847 name="Publc Issue Tracker Help..." width="166"> 847 name="Publc Issue Tracker Help..." width="166">
848 <on_click function="PromptShowURL" 848 <on_click function="PromptShowURL"
849 userdata="WebLaunchPublicIssueHelp,https://wiki.secondlife.com/wiki/Issue_tracker" /> 849 userdata="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker" />
850 </menu_item_call> 850 </menu_item_call>
851 </menu> 851 </menu>
852 </menu> 852 </menu>
diff --git a/linden/indra/newview/skins/xui/en-us/notify.xml b/linden/indra/newview/skins/xui/en-us/notify.xml
index b21325e..f4de3f1 100644
--- a/linden/indra/newview/skins/xui/en-us/notify.xml
+++ b/linden/indra/newview/skins/xui/en-us/notify.xml
@@ -233,13 +233,13 @@ Please select a single object.
233 </notify> 233 </notify>
234 <notify name="TeleportToLandmark" tip="true"> 234 <notify name="TeleportToLandmark" tip="true">
235 <message name="message"> 235 <message name="message">
236 Now that you have reached the mainland, you can teleport to the location &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Landmarks folder. 236 Now that you have reached the mainland, you can teleport to locations like &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Landmarks folder.
237Double click on the landmark and click on Teleport to travel there. 237Double click on the landmark and click on Teleport to travel there.
238 </message> 238 </message>
239 </notify> 239 </notify>
240 <notify name="TeleportToPerson" tip="true"> 240 <notify name="TeleportToPerson" tip="true">
241 <message name="message"> 241 <message name="message">
242 Now that you have reached the mainland, you can contact the resident &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Calling Cards folder. 242 Now that you have reached the mainland, you can contact residents like &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Calling Cards folder.
243Double click on the card, click on Instant Message, and type a message. 243Double click on the card, click on Instant Message, and type a message.
244 </message> 244 </message>
245 </notify> 245 </notify>
@@ -481,6 +481,9 @@ No scripts will run except those belonging to the land owner.
481 <option name="Decline"> 481 <option name="Decline">
482 Decline 482 Decline
483 </option> 483 </option>
484 <option name="Info">
485 Info
486 </option>
484 </notify> 487 </notify>
485 <notify name="JoinGroupOfficerNoFee" tip="false"> 488 <notify name="JoinGroupOfficerNoFee" tip="false">
486 <message name="message"> 489 <message name="message">
@@ -496,6 +499,9 @@ There is no cost to join this group.
496 <option name="Decline"> 499 <option name="Decline">
497 Decline 500 Decline
498 </option> 501 </option>
502 <option name="Info">
503 Info
504 </option>
499 </notify> 505 </notify>
500 <notify name="JoinGroupMember" tip="false"> 506 <notify name="JoinGroupMember" tip="false">
501 <message name="message"> 507 <message name="message">
@@ -511,6 +517,9 @@ To join this group, you will have to pay a signup fee of L$[COST]
511 <option name="Decline"> 517 <option name="Decline">
512 Decline 518 Decline
513 </option> 519 </option>
520 <option name="Info">
521 Info
522 </option>
514 </notify> 523 </notify>
515 <notify name="JoinGroupMemberNoFee" tip="false"> 524 <notify name="JoinGroupMemberNoFee" tip="false">
516 <message name="message"> 525 <message name="message">
@@ -526,6 +535,9 @@ There is no cost to join this group.
526 <option name="Decline"> 535 <option name="Decline">
527 Decline 536 Decline
528 </option> 537 </option>
538 <option name="Info">
539 Info
540 </option>
529 </notify> 541 </notify>
530 <notify name="OfferTeleport" tip="false"> 542 <notify name="OfferTeleport" tip="false">
531 <message name="message"> 543 <message name="message">
diff --git a/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml b/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml
index e369da9..3463880 100644
--- a/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml
+++ b/linden/indra/newview/skins/xui/en-us/panel_group_invite.xml
@@ -1,20 +1,29 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<panel border="false" bottom="0" height="380" label="Invite a Member" left="0" 2<panel border="false" bottom="0" height="380" label="Invite a Member" left="0"
3 name="invite_panel" select="false" width="210"> 3 name="invite_panel" select="false" width="210">
4 <text bottom_delta="-78" height="54" left="7" width="200"> 4 <text bottom_delta="-44" follows="left|top" font="SansSerifSmall" height="20"
5 left="7" name="group_name_lbl" width="40">
6 Group:
7 </text>
8 <text bg_readonly_color="clear" bottom_delta="0" follows="left|top"
9 font="SansSerifSmall" height="20" left="50" name="group_name_text"
10 text_readonly_color="white" width="150">
11 (unknown)
12 </text>
13 <text bottom_delta="-50" height="54" left="7" width="200">
5 You can select multiple residents to 14 You can select multiple residents to
6invite to your group. Click &apos;Open 15invite to your group. Click &apos;Open
7Person Chooser&apos; to start. 16Person Chooser&apos; to start.
8 </text> 17 </text>
9 <button bottom_delta="-10" font="SansSerifSmall" halign="center" height="20" 18 <button bottom_delta="-12" font="SansSerifSmall" halign="center" height="20"
10 label="Open Person Chooser" left="5" name="add_button" tool_tip="" 19 label="Open Person Chooser" left="5" name="add_button" tool_tip=""
11 width="200" /> 20 width="200" />
12 <name_list allow_calling_card_drop="true" background_visible="true" bottom_delta="-193" 21 <name_list allow_calling_card_drop="true" background_visible="true" bottom_delta="-183"
13 column_padding="0" draw_border="true" fg_disable_color="grey" 22 column_padding="0" draw_border="true" fg_disable_color="grey"
14 fg_selected_color="black" fg_unselected_color="black" height="189" left="5" 23 fg_selected_color="black" fg_unselected_color="black" height="169" left="5"
15 multi_select="true" name="invitee_list" 24 multi_select="true" name="invitee_list"
16 tool_tip="Hold the Ctrl key and click resident names to multi-select." 25 tool_tip="Hold the Ctrl key and click resident names to multi-select."
17 width="200" /> 26 width="200" />
18 <button bottom_delta="-24" font="SansSerifSmall" halign="center" height="20" 27 <button bottom_delta="-24" font="SansSerifSmall" halign="center" height="20"
19 label="Remove Selected from List" left_delta="0" name="remove_button" 28 label="Remove Selected from List" left_delta="0" name="remove_button"
20 tool_tip="Removes residents selected above from the invite list." 29 tool_tip="Removes residents selected above from the invite list."
diff --git a/linden/indra/newview/viewer.cpp b/linden/indra/newview/viewer.cpp
index 69e98f4..d42872d 100644
--- a/linden/indra/newview/viewer.cpp
+++ b/linden/indra/newview/viewer.cpp
@@ -138,7 +138,7 @@
138#include "llmemtype.h" 138#include "llmemtype.h"
139#include "llmd5.h" 139#include "llmd5.h"
140#include "llsecondlifeurls.h" 140#include "llsecondlifeurls.h"
141#include "llversion.h" 141#include "llversionviewer.h"
142#include "llvfile.h" 142#include "llvfile.h"
143#include "llvfs.h" 143#include "llvfs.h"
144#include "llwindow.h" // for shell_open 144#include "llwindow.h" // for shell_open
@@ -296,8 +296,6 @@ std::string gSerialNumber;
296// Application constants 296// Application constants
297///////////////////////////////////////////////////////////////////////////////// 297/////////////////////////////////////////////////////////////////////////////////
298 298
299S32 gStartupState = STATE_FIRST;
300
301BOOL gAgentMovementCompleted = FALSE; 299BOOL gAgentMovementCompleted = FALSE;
302BOOL gHaveSavedSnapshot = FALSE; 300BOOL gHaveSavedSnapshot = FALSE;
303 301
@@ -391,7 +389,6 @@ BOOL gPrintMessagesThisFrame = FALSE;
391const char* DEFAULT_SETTINGS_FILE = "settings.xml"; 389const char* DEFAULT_SETTINGS_FILE = "settings.xml";
392const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini"; 390const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini";
393BOOL gUseWireframe = FALSE; 391BOOL gUseWireframe = FALSE;
394BOOL gRunLocal = FALSE;
395LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. 392LLUUID gViewerDigest; // MD5 digest of the viewer's executable file.
396LLPumpIO* gServicePump = NULL; 393LLPumpIO* gServicePump = NULL;
397S32 gNumSessions = 0; 394S32 gNumSessions = 0;
@@ -468,6 +465,8 @@ BOOL gPacificDaylightTime = FALSE;
468U32 gSecondsPerDay = 0; 465U32 gSecondsPerDay = 0;
469U32 gSecondsPerYear = 0; 466U32 gSecondsPerYear = 0;
470 467
468LLString gLastVersionChannel;
469
471// 470//
472// Region/Object globals 471// Region/Object globals
473// 472//
@@ -513,7 +512,6 @@ static const char USAGE[] = "\n"
513" -user <user_server_ip> specify userserver in dotted quad\n" 512" -user <user_server_ip> specify userserver in dotted quad\n"
514#if !LL_RELEASE_FOR_DOWNLOAD 513#if !LL_RELEASE_FOR_DOWNLOAD
515" -sim <simulator_ip> specify the simulator ip address\n" 514" -sim <simulator_ip> specify the simulator ip address\n"
516" -local run without simulator\n"
517#endif 515#endif
518" -god log in as god if you have god access\n" 516" -god log in as god if you have god access\n"
519" -purge delete files in cache\n" 517" -purge delete files in cache\n"
@@ -543,13 +541,12 @@ BOOL gGodConnect = FALSE;
543BOOL gUseConsole = TRUE; 541BOOL gUseConsole = TRUE;
544BOOL gUseAudio = TRUE; 542BOOL gUseAudio = TRUE;
545BOOL gUseFMOD = TRUE; 543BOOL gUseFMOD = TRUE;
546BOOL gConnectToSomething = TRUE;
547BOOL gLogMessages = FALSE; 544BOOL gLogMessages = FALSE;
548BOOL gRequestInventoryLibrary = TRUE; 545BOOL gRequestInventoryLibrary = TRUE;
549BOOL gAcceptTOS = FALSE; 546BOOL gAcceptTOS = FALSE;
550BOOL gAcceptCriticalMessage = FALSE; 547BOOL gAcceptCriticalMessage = FALSE;
551// this is the channel the viewer uses to check for updates/login 548// this is the channel the viewer uses to check for updates/login
552std::string gChannelName = "Second Life Release"; 549std::string gChannelName = LL_CHANNEL;
553 550
554LLUUID gInventoryLibraryOwner; 551LLUUID gInventoryLibraryOwner;
555LLUUID gInventoryLibraryRoot; 552LLUUID gInventoryLibraryRoot;
@@ -629,7 +626,7 @@ void main_loop();
629// 626//
630// Callbacks and other stuff that's not directly used in main 627// Callbacks and other stuff that's not directly used in main
631// 628//
632void uuid_table_request_file_callback(void **user_data, S32 result); 629void uuid_table_request_file_callback(void **user_data, S32 result, LLExtStat ext_status);
633void send_stats(); 630void send_stats();
634 631
635// 632//
@@ -808,6 +805,11 @@ int main( int argc, char **argv )
808#if LL_SOLARIS && defined(__sparc) 805#if LL_SOLARIS && defined(__sparc)
809 asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC 806 asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
810#endif 807#endif
808
809#if LL_DARWIN
810 // Set the working dir to <bundle>/Contents/Resources
811 (void) chdir(gDirUtilp->getAppRODataDir().c_str());
812#endif
811 813
812#if 1 814#if 1
813 // This will eventually be done in LLApp 815 // This will eventually be done in LLApp
@@ -944,6 +946,10 @@ int main( int argc, char **argv )
944 // May need to know this early also 946 // May need to know this early also
945 gDisableVoice = TRUE; 947 gDisableVoice = TRUE;
946 } 948 }
949 else if (!strcmp(argv[j], "-url") && (++j < argc))
950 {
951 LLURLSimString::setString(argv[j]);
952 }
947 } 953 }
948 954
949 if (!strcmp(gUserServerName, gUserServerDomainName[USERSERVER_AGNI].mName)) 955 if (!strcmp(gUserServerName, gUserServerDomainName[USERSERVER_AGNI].mName))
@@ -1347,7 +1353,6 @@ int main( int argc, char **argv )
1347 if ( nextLoginLocation.length() ) 1353 if ( nextLoginLocation.length() )
1348 { 1354 {
1349 LLURLSimString::setString( nextLoginLocation.c_str() ); 1355 LLURLSimString::setString( nextLoginLocation.c_str() );
1350 gConnectToSomething = TRUE;
1351 }; 1356 };
1352 1357
1353 // Merge with the command line overrides 1358 // Merge with the command line overrides
@@ -1853,7 +1858,7 @@ void main_loop()
1853 if (gViewerWindow->mWindow->getVisible() 1858 if (gViewerWindow->mWindow->getVisible()
1854 && gViewerWindow->getActive() 1859 && gViewerWindow->getActive()
1855 && !gViewerWindow->mWindow->getMinimized() 1860 && !gViewerWindow->mWindow->getMinimized()
1856 && gStartupState == STATE_STARTED 1861 && LLStartUp::getStartupState() == STATE_STARTED
1857 && !gViewerWindow->getShowProgress() 1862 && !gViewerWindow->getShowProgress()
1858 && !gFocusMgr.focusLocked()) 1863 && !gFocusMgr.focusLocked())
1859 { 1864 {
@@ -1871,7 +1876,7 @@ void main_loop()
1871 gServicePump->callback(); 1876 gServicePump->callback();
1872 } 1877 }
1873 1878
1874 if (gDoDisconnect && (gStartupState == STATE_STARTED)) 1879 if (gDoDisconnect && (LLStartUp::getStartupState() == STATE_STARTED))
1875 { 1880 {
1876 save_final_snapshot(NULL); 1881 save_final_snapshot(NULL);
1877 disconnect_viewer(NULL); 1882 disconnect_viewer(NULL);
@@ -1981,7 +1986,7 @@ void main_loop()
1981 } 1986 }
1982 1987
1983 // Save snapshot for next time, if we made it through initialization 1988 // Save snapshot for next time, if we made it through initialization
1984 if (STATE_STARTED == gStartupState) 1989 if (STATE_STARTED == LLStartUp::getStartupState())
1985 { 1990 {
1986 save_final_snapshot(NULL); 1991 save_final_snapshot(NULL);
1987 } 1992 }
@@ -2023,7 +2028,7 @@ void process_keystrokes_async()
2023 if (gViewerWindow->mWindow->getVisible() 2028 if (gViewerWindow->mWindow->getVisible()
2024 && gViewerWindow->getActive() 2029 && gViewerWindow->getActive()
2025 && !gViewerWindow->mWindow->getMinimized() 2030 && !gViewerWindow->mWindow->getMinimized()
2026 && gStartupState == STATE_STARTED 2031 && LLStartUp::getStartupState() == STATE_STARTED
2027 && !gViewerWindow->getShowProgress() 2032 && !gViewerWindow->getShowProgress()
2028 && !gFocusMgr.focusLocked()) 2033 && !gFocusMgr.focusLocked())
2029 { 2034 {
@@ -2196,7 +2201,7 @@ void write_system_info()
2196 write_debug(gSysCPU.getCPUString()); 2201 write_debug(gSysCPU.getCPUString());
2197 write_debug("\n"); 2202 write_debug("\n");
2198 2203
2199 tmp_str = llformat("RAM: %u\n", gSysMemory.getPhysicalMemory()); 2204 tmp_str = llformat("RAM: %u KB\n", gSysMemory.getPhysicalMemoryKB());
2200 write_debug(tmp_str.c_str()); 2205 write_debug(tmp_str.c_str());
2201 write_debug("OS: "); 2206 write_debug("OS: ");
2202 write_debug(gSysOS.getOSString().c_str()); 2207 write_debug(gSysOS.getOSString().c_str());
@@ -2951,7 +2956,6 @@ OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn)
2951 2956
2952 // Parse it and stash in globals. 2957 // Parse it and stash in globals.
2953 LLURLSimString::setString(buffer); 2958 LLURLSimString::setString(buffer);
2954 gConnectToSomething = TRUE;
2955 2959
2956 if(gFloaterWorldMap != NULL) 2960 if(gFloaterWorldMap != NULL)
2957 { 2961 {
@@ -3192,12 +3196,11 @@ void save_final_snapshot(void*)
3192 gAgent.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch 3196 gAgent.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch
3193 gSavedSettings.setBOOL("ShowParcelOwners", FALSE); 3197 gSavedSettings.setBOOL("ShowParcelOwners", FALSE);
3194 idle(); 3198 idle();
3195 char temp_str[MAX_PATH]; /* Flawfinder: ignore */ 3199
3196 strncpy (temp_str,gDirUtilp->getLindenUserDir().c_str(), MAX_PATH -1); /* Flawfinder: ignore */ 3200 LLString snap_filename = gDirUtilp->getLindenUserDir();
3197 temp_str[MAX_PATH -1] = '\0'; 3201 snap_filename += gDirUtilp->getDirDelimiter();
3198 strcat (temp_str,"/"); /* Flawfinder: ignore */ 3202 snap_filename += SCREEN_LAST_FILENAME;
3199 strcat (temp_str,SCREEN_LAST_FILENAME); /* Flawfinder: ignore */ 3203 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, TRUE);
3200 gViewerWindow->saveSnapshot(temp_str, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, TRUE);
3201 gHaveSavedSnapshot = TRUE; 3204 gHaveSavedSnapshot = TRUE;
3202 } 3205 }
3203} 3206}
@@ -3239,7 +3242,7 @@ void app_request_quit()
3239 3242
3240 LLViewerRegion* region = gAgent.getRegion(); 3243 LLViewerRegion* region = gAgent.getRegion();
3241 3244
3242 if( (gStartupState < STATE_STARTED) || !region ) 3245 if( (LLStartUp::getStartupState() < STATE_STARTED) || !region )
3243 { 3246 {
3244 // Quit immediately 3247 // Quit immediately
3245 app_force_quit(NULL); 3248 app_force_quit(NULL);
@@ -3495,7 +3498,7 @@ void idle_network()
3495 gObjectList.mNumNewObjects = 0; 3498 gObjectList.mNumNewObjects = 0;
3496 S32 total_decoded = 0; 3499 S32 total_decoded = 0;
3497 3500
3498 if (!gSavedSettings.getBOOL("SpeedTest") && !gRunLocal) 3501 if (!gSavedSettings.getBOOL("SpeedTest"))
3499 { 3502 {
3500 LLFastTimer t(LLFastTimer::FTM_IDLE_NETWORK); // decode 3503 LLFastTimer t(LLFastTimer::FTM_IDLE_NETWORK); // decode
3501 3504
@@ -3663,7 +3666,7 @@ void idle()
3663 // Special case idle if still starting up 3666 // Special case idle if still starting up
3664 // 3667 //
3665 3668
3666 if (gStartupState < STATE_STARTED) 3669 if (LLStartUp::getStartupState() < STATE_STARTED)
3667 { 3670 {
3668 // Skip rest if idle startup returns false (essentially, no world yet) 3671 // Skip rest if idle startup returns false (essentially, no world yet)
3669 if (!idle_startup()) 3672 if (!idle_startup())
@@ -4004,13 +4007,13 @@ void idle()
4004 { 4007 {
4005 gFrameStats.start(LLFrameStats::AUDIO); 4008 gFrameStats.start(LLFrameStats::AUDIO);
4006 LLFastTimer t(LLFastTimer::FTM_AUDIO_UPDATE); 4009 LLFastTimer t(LLFastTimer::FTM_AUDIO_UPDATE);
4007
4008 audio_update_volume(false);
4009 audio_update_listener();
4010 audio_update_wind(false);
4011 4010
4012 if (gAudiop) 4011 if (gAudiop)
4013 { 4012 {
4013 audio_update_volume(false);
4014 audio_update_listener();
4015 audio_update_wind(false);
4016
4014 // this line actually commits the changes we've made to source positions, etc. 4017 // this line actually commits the changes we've made to source positions, etc.
4015 const F32 max_audio_decode_time = 0.002f; // 2 ms decode time 4018 const F32 max_audio_decode_time = 0.002f; // 2 ms decode time
4016 gAudiop->idle(max_audio_decode_time); 4019 gAudiop->idle(max_audio_decode_time);
@@ -5192,7 +5195,7 @@ void send_stats()
5192 gMessageSystem->addF32Fast(_PREHASH_Ping, gAvgSimPing); 5195 gMessageSystem->addF32Fast(_PREHASH_Ping, gAvgSimPing);
5193 gMessageSystem->addF64Fast(_PREHASH_MetersTraveled, gAgent.getDistanceTraveled()); 5196 gMessageSystem->addF64Fast(_PREHASH_MetersTraveled, gAgent.getDistanceTraveled());
5194 gMessageSystem->addS32Fast(_PREHASH_RegionsVisited, gAgent.getRegionsVisited()); 5197 gMessageSystem->addS32Fast(_PREHASH_RegionsVisited, gAgent.getRegionsVisited());
5195 gMessageSystem->addU32Fast(_PREHASH_SysRAM, gSysMemory.getPhysicalMemory()); 5198 gMessageSystem->addU32Fast(_PREHASH_SysRAM, gSysMemory.getPhysicalMemoryClamped());
5196 gMessageSystem->addStringFast(_PREHASH_SysOS, gSysOS.getOSString()); 5199 gMessageSystem->addStringFast(_PREHASH_SysOS, gSysOS.getOSString());
5197 gMessageSystem->addStringFast(_PREHASH_SysCPU, gSysCPU.getCPUString()); 5200 gMessageSystem->addStringFast(_PREHASH_SysCPU, gSysCPU.getCPUString());
5198 5201
@@ -5341,13 +5344,18 @@ int parse_args(int argc, char **argv)
5341 // Sometimes IP addresses passed in on the command line have leading 5344 // Sometimes IP addresses passed in on the command line have leading
5342 // or trailing white space. Use LLString to clean that up. 5345 // or trailing white space. Use LLString to clean that up.
5343 LLString ip_string; 5346 LLString ip_string;
5347
5344 S32 j; 5348 S32 j;
5349 // agent_sim_host holds the settings for connecting to the first simulator.
5345 5350
5346 for (j = 1; j < argc; j++) 5351 for (j = 1; j < argc; j++)
5347 { 5352 {
5348 gArgs += argv[j]; 5353 gArgs += argv[j];
5349 gArgs += " "; 5354 gArgs += " ";
5355 }
5350 5356
5357 for (j = 1; j < argc; j++)
5358 {
5351 LLString argument = argv[j]; 5359 LLString argument = argv[j];
5352 if ((!strcmp(argv[j], "-port")) && (++j < argc)) 5360 if ((!strcmp(argv[j], "-port")) && (++j < argc))
5353 { 5361 {
@@ -5369,61 +5377,51 @@ int parse_args(int argc, char **argv)
5369 { 5377 {
5370 gUserServerChoice = USERSERVER_ADITI; 5378 gUserServerChoice = USERSERVER_ADITI;
5371 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ 5379 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */
5372 gConnectToSomething = TRUE;
5373 } 5380 }
5374 else if (!strcmp(argv[j], "--agni")) 5381 else if (!strcmp(argv[j], "--agni"))
5375 { 5382 {
5376 gUserServerChoice = USERSERVER_AGNI; 5383 gUserServerChoice = USERSERVER_AGNI;
5377 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ 5384 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */
5378 gConnectToSomething = TRUE;
5379 } 5385 }
5380 else if (!strcmp(argv[j], "--dmz")) 5386 else if (!strcmp(argv[j], "--dmz"))
5381 { 5387 {
5382 gUserServerChoice = USERSERVER_DMZ; 5388 gUserServerChoice = USERSERVER_DMZ;
5383 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ 5389 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */
5384 gConnectToSomething = TRUE;
5385 } 5390 }
5386 else if (!strcmp(argv[j], "--siva")) 5391 else if (!strcmp(argv[j], "--siva"))
5387 { 5392 {
5388 gUserServerChoice = USERSERVER_SIVA; 5393 gUserServerChoice = USERSERVER_SIVA;
5389 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ 5394 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */
5390 gConnectToSomething = TRUE;
5391 } 5395 }
5392 else if (!strcmp(argv[j], "--shakti")) 5396 else if (!strcmp(argv[j], "--shakti"))
5393 { 5397 {
5394 gUserServerChoice = USERSERVER_SHAKTI; 5398 gUserServerChoice = USERSERVER_SHAKTI;
5395 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ 5399 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */
5396 gConnectToSomething = TRUE;
5397 } 5400 }
5398 else if (!strcmp(argv[j], "--durga")) 5401 else if (!strcmp(argv[j], "--durga"))
5399 { 5402 {
5400 gUserServerChoice = USERSERVER_DURGA; 5403 gUserServerChoice = USERSERVER_DURGA;
5401 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ 5404 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */
5402 gConnectToSomething = TRUE;
5403 } 5405 }
5404 else if (!strcmp(argv[j], "--soma")) 5406 else if (!strcmp(argv[j], "--soma"))
5405 { 5407 {
5406 gUserServerChoice = USERSERVER_SOMA; 5408 gUserServerChoice = USERSERVER_SOMA;
5407 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */ 5409 snprintf(gUserServerName, MAX_STRING, "%s", gUserServerDomainName[gUserServerChoice].mName); /* Flawfinder: ignore */
5408 gConnectToSomething = TRUE;
5409 } 5410 }
5410 else if (!strcmp(argv[j], "--ganga")) 5411 else if (!strcmp(argv[j], "--ganga"))
5411 { 5412 {
5412 gUserServerChoice = USERSERVER_GANGA; 5413 gUserServerChoice = USERSERVER_GANGA;
5413 sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); 5414 sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName);
5414 gConnectToSomething = TRUE;
5415 } 5415 }
5416 else if (!strcmp(argv[j], "--vaak")) 5416 else if (!strcmp(argv[j], "--vaak"))
5417 { 5417 {
5418 gUserServerChoice = USERSERVER_VAAK; 5418 gUserServerChoice = USERSERVER_VAAK;
5419 sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); 5419 sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName);
5420 gConnectToSomething = TRUE;
5421 } 5420 }
5422 else if (!strcmp(argv[j], "--uma")) 5421 else if (!strcmp(argv[j], "--uma"))
5423 { 5422 {
5424 gUserServerChoice = USERSERVER_UMA; 5423 gUserServerChoice = USERSERVER_UMA;
5425 sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName); 5424 sprintf(gUserServerName,"%s", gUserServerDomainName[gUserServerChoice].mName);
5426 gConnectToSomething = TRUE;
5427 } 5425 }
5428 else if (!strcmp(argv[j], "-user") && (++j < argc)) 5426 else if (!strcmp(argv[j], "-user") && (++j < argc))
5429 { 5427 {
@@ -5439,7 +5437,6 @@ int parse_args(int argc, char **argv)
5439 LLString::trim(ip_string); 5437 LLString::trim(ip_string);
5440 snprintf(gUserServerName, MAX_STRING, "%s", ip_string.c_str()); /* Flawfinder: ignore */ 5438 snprintf(gUserServerName, MAX_STRING, "%s", ip_string.c_str()); /* Flawfinder: ignore */
5441 } 5439 }
5442 gConnectToSomething = TRUE;
5443 } 5440 }
5444 else if (!strcmp(argv[j], "-loginuri") && (++j < argc)) 5441 else if (!strcmp(argv[j], "-loginuri") && (++j < argc))
5445 { 5442 {
@@ -5509,11 +5506,6 @@ int parse_args(int argc, char **argv)
5509 { 5506 {
5510 purge_cache(); 5507 purge_cache();
5511 } 5508 }
5512 else if (!strcmp(argv[j], "-local"))
5513 {
5514 gConnectToSomething = FALSE;
5515 gRunLocal = TRUE;
5516 }
5517 else if(!strcmp(argv[j], "-noinvlib")) 5509 else if(!strcmp(argv[j], "-noinvlib"))
5518 { 5510 {
5519 gRequestInventoryLibrary = FALSE; 5511 gRequestInventoryLibrary = FALSE;
@@ -5621,25 +5613,11 @@ int parse_args(int argc, char **argv)
5621 // so this allows us to parse the URL straight off the command line without a "-url" paramater 5613 // so this allows us to parse the URL straight off the command line without a "-url" paramater
5622 else if (!argument.compare(0, std::string( "secondlife://" ).length(), std::string("secondlife://"))) 5614 else if (!argument.compare(0, std::string( "secondlife://" ).length(), std::string("secondlife://")))
5623 { 5615 {
5624 // *NOTE: After setting the url, bail. What can happen is
5625 // that someone can use IE (or potentially other browsers)
5626 // and do the rough equivalent of command injection and
5627 // steal passwords. Phoenix. SL-55321
5628 LLURLSimString::setString(argv[j]); 5616 LLURLSimString::setString(argv[j]);
5629 gConnectToSomething = TRUE;
5630 gArgs += argv[j];
5631 return 0;
5632 } 5617 }
5633 else if (!strcmp(argv[j], "-url") && (++j < argc)) 5618 else if (!strcmp(argv[j], "-url") && (++j < argc))
5634 { 5619 {
5635 // *NOTE: After setting the url, bail. What can happen is
5636 // that someone can use IE (or potentially other browsers)
5637 // and do the rough equivalent of command injection and
5638 // steal passwords. Phoenix. SL-55321
5639 LLURLSimString::setString(argv[j]); 5620 LLURLSimString::setString(argv[j]);
5640 gConnectToSomething = TRUE;
5641 gArgs += argv[j];
5642 return 0;
5643 } 5621 }
5644 else if (!strcmp(argv[j], "-ignorepixeldepth")) 5622 else if (!strcmp(argv[j], "-ignorepixeldepth"))
5645 { 5623 {
@@ -6024,7 +6002,7 @@ void do_disconnect(const LLString& mesg)
6024 } 6002 }
6025 6003
6026 //RN: just quit if we haven't logged in 6004 //RN: just quit if we haven't logged in
6027 if (gStartupState < STATE_STARTED) 6005 if (LLStartUp::getStartupState() < STATE_STARTED)
6028 { 6006 {
6029 finish_disconnect(1, NULL); 6007 finish_disconnect(1, NULL);
6030 return; 6008 return;
diff --git a/linden/indra/newview/viewer.h b/linden/indra/newview/viewer.h
index ef975e7..e6392f5 100644
--- a/linden/indra/newview/viewer.h
+++ b/linden/indra/newview/viewer.h
@@ -77,9 +77,7 @@ extern LLMemoryInfo gSysMemory;
77extern BOOL gLogMessages; 77extern BOOL gLogMessages;
78extern BOOL gUseAudio; 78extern BOOL gUseAudio;
79extern bool gPreloadImages; 79extern bool gPreloadImages;
80extern BOOL gConnectToSomething;
81extern BOOL gGodConnect; 80extern BOOL gGodConnect;
82extern BOOL gRunLocal;
83extern LLString gCmdLineFirstName; 81extern LLString gCmdLineFirstName;
84extern LLString gCmdLineLastName; 82extern LLString gCmdLineLastName;
85extern LLString gCmdLinePassword; 83extern LLString gCmdLinePassword;
@@ -117,6 +115,8 @@ extern U32 gSecondsPerYear;
117// currently in daylight savings time? 115// currently in daylight savings time?
118extern BOOL gPacificDaylightTime; 116extern BOOL gPacificDaylightTime;
119 117
118extern LLString gLastVersionChannel;
119
120extern LLVector3 gWindVec; 120extern LLVector3 gWindVec;
121extern LLVector3 gRelativeWindVec; 121extern LLVector3 gRelativeWindVec;
122 122
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py
index ecbeda2..3641bcf 100755
--- a/linden/indra/newview/viewer_manifest.py
+++ b/linden/indra/newview/viewer_manifest.py
@@ -402,8 +402,9 @@ class DarwinManifest(ViewerManifest):
402 # make sure we don't have stale files laying about 402 # make sure we don't have stale files laying about
403 self.remove(sparsename, finalname) 403 self.remove(sparsename, finalname)
404 404
405 self.run_command('hdiutil create "%(sparse)s" -volname "Second Life" -fs HFS+ -type SPARSE -megabytes 300' % { 405 self.run_command('hdiutil create "%(sparse)s" -volname "%(channel)s" -fs HFS+ -type SPARSE -megabytes 300' % {
406 'sparse':sparsename}) 406 'sparse':sparsename,
407 'channel':channel_standin})
407 408
408 # mount the image and get the name of the mount point and device node 409 # mount the image and get the name of the mount point and device node
409 hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"') 410 hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"')
@@ -459,9 +460,12 @@ class LinuxManifest(ViewerManifest):
459 if(self.args.has_key('installer_name')): 460 if(self.args.has_key('installer_name')):
460 installer_name = self.args['installer_name'] 461 installer_name = self.args['installer_name']
461 else: 462 else:
462 installer_name = '_'.join(['SecondLife', self.args.get('arch'), '_'.join(self.args['version'])]) 463 installer_name = '_'.join('SecondLife_', self.args.get('arch'), *self.args['version'])
463 if not self.default_grid(): 464 if self.default_channel():
464 installer_name += "_" + grid.upper() 465 if not self.default_grid():
466 installer_name += '_' + self.args['grid'].upper()
467 else:
468 installer_name += '_' + self.channel_oneword().upper()
465 469
466 # temporarily move directory tree so that it has the right name in the tarfile 470 # temporarily move directory tree so that it has the right name in the tarfile
467 self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)}) 471 self.run_command("mv %(dst)s %(inst)s" % {'dst':self.get_dst_prefix(),'inst':self.src_path_of(installer_name)})
@@ -503,7 +507,7 @@ class Linux_i686Manifest(LinuxManifest):
503 self.path("libuuid.so", "libuuid.so.1") 507 self.path("libuuid.so", "libuuid.so.1")
504 self.path("libSDL-1.2.so.0") 508 self.path("libSDL-1.2.so.0")
505 self.path("libELFIO.so") 509 self.path("libELFIO.so")
506 #self.path("libresolv.so") - don't bundle 510 self.path("libresolv.so", "libresolv.so.2")
507 #self.path("libtcmalloc.so.0") - bugged 511 #self.path("libtcmalloc.so.0") - bugged
508 #self.path("libstacktrace.so.0") - probably bugged 512 #self.path("libstacktrace.so.0") - probably bugged
509# self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason 513# self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason