From 8465910c79b8e746e04fd581cca2d60399e569b9 Mon Sep 17 00:00:00 2001
From: Jacek Antonelli
Date: Fri, 15 Aug 2008 23:45:07 -0500
Subject: Second Life viewer sources 1.18.3.2-RC
---
linden/doc/contributions.txt | 256 ++++++--
linden/indra/SConstruct | 128 ++--
linden/indra/lib/python/indra/util/llmanifest.py | 19 +-
linden/indra/llaudio/audioengine.cpp | 3 +-
linden/indra/llaudio/audioengine.h | 2 +-
linden/indra/llcharacter/llkeyframemotion.cpp | 22 +-
linden/indra/llcharacter/llkeyframemotion.h | 3 +-
linden/indra/llcharacter/llmultigesture.cpp | 2 +-
linden/indra/llcommon/indra_constants.h | 1 +
linden/indra/llcommon/linden_common.h | 1 +
linden/indra/llcommon/llcommon.vcproj | 8 +-
linden/indra/llcommon/llevent.cpp | 1 +
linden/indra/llcommon/llextendedstatus.h | 69 +++
linden/indra/llcommon/lllivefile.cpp | 7 +-
linden/indra/llcommon/lllslconstants.h | 11 +
linden/indra/llcommon/llmetrics.cpp | 2 +-
linden/indra/llcommon/llsys.cpp | 81 ++-
linden/indra/llcommon/llsys.h | 26 +-
linden/indra/llcommon/llthread.h | 2 +-
linden/indra/llcommon/lltimer.cpp | 16 +-
linden/indra/llcommon/lltimer.h | 5 +-
linden/indra/llcommon/lluri.cpp | 111 ----
linden/indra/llcommon/llversion.h | 37 --
linden/indra/llcommon/llversionserver.h | 40 ++
linden/indra/llcommon/llversionviewer.h | 39 ++
linden/indra/llimage/llimage.cpp | 41 +-
linden/indra/llimage/llimage.h | 2 +-
linden/indra/llimage/llimagej2c.cpp | 16 +-
linden/indra/llimage/llimagej2c.h | 4 +-
linden/indra/llimagej2coj/llimagej2coj.cpp | 2 +-
linden/indra/llimagej2coj/llimagej2coj.h | 3 +-
linden/indra/llmath/llvolume.cpp | 25 +-
linden/indra/llmedia/llmediaimplgstreamer.cpp | 1 +
.../llmedia/llmediaimplgstreamer_syms_raw.inc | 1 -
linden/indra/llmessage/llassetstorage.cpp | 58 +-
linden/indra/llmessage/llassetstorage.h | 33 +-
linden/indra/llmessage/llcircuit.cpp | 2 +-
linden/indra/llmessage/llhttpassetstorage.cpp | 14 +-
linden/indra/llmessage/llhttpassetstorage.h | 2 +-
linden/indra/llmessage/llmessageconfig.cpp | 2 +-
linden/indra/llmessage/llsdmessagebuilder.cpp | 2 +-
linden/indra/llmessage/llteleportflags.h | 1 +
linden/indra/llmessage/lltemplatemessagereader.cpp | 11 +-
linden/indra/llmessage/lltemplatemessagereader.h | 2 +-
linden/indra/llmessage/lltransfersourceasset.cpp | 2 +-
linden/indra/llmessage/lltransfersourceasset.h | 2 +-
linden/indra/llmessage/lltransfertargetvfile.cpp | 3 +-
linden/indra/llmessage/lltransfertargetvfile.h | 2 +-
linden/indra/llmessage/llxfer.cpp | 3 +-
linden/indra/llmessage/llxfer.h | 3 +-
linden/indra/llmessage/llxfer_file.cpp | 2 +-
linden/indra/llmessage/llxfer_file.h | 3 +-
linden/indra/llmessage/llxfer_mem.cpp | 5 +-
linden/indra/llmessage/llxfer_mem.h | 5 +-
linden/indra/llmessage/llxfer_vfile.cpp | 2 +-
linden/indra/llmessage/llxfer_vfile.h | 3 +-
linden/indra/llmessage/llxfermanager.cpp | 7 +-
linden/indra/llmessage/llxfermanager.h | 7 +-
linden/indra/llmessage/message.cpp | 2 +-
linden/indra/llmessage/message_prehash.cpp | 6 +-
linden/indra/llmessage/message_prehash.h | 3 +-
linden/indra/llprimitive/lltextureentry.cpp | 12 +-
linden/indra/llui/llbutton.cpp | 12 +-
linden/indra/llui/llbutton.h | 4 -
linden/indra/llui/llcheckboxctrl.cpp | 21 +-
linden/indra/llui/llcheckboxctrl.h | 6 +-
linden/indra/llui/llcombobox.cpp | 21 +
linden/indra/llui/llcombobox.h | 4 +-
linden/indra/llui/llctrlselectioninterface.h | 2 +-
linden/indra/llui/llfloater.cpp | 9 +-
linden/indra/llui/lllineeditor.cpp | 56 +-
linden/indra/llui/lllineeditor.h | 5 +-
linden/indra/llui/llradiogroup.h | 2 +-
linden/indra/llui/llscrolllistctrl.cpp | 31 +-
linden/indra/llui/llscrolllistctrl.h | 8 +-
linden/indra/llui/lltexteditor.cpp | 26 +-
linden/indra/llui/lltexteditor.h | 1 +
linden/indra/llui/lluictrl.h | 4 +-
linden/indra/llvfs/lldir_mac.cpp | 6 +-
linden/indra/llvfs/llvfs.cpp | 4 +-
linden/indra/llwindow/llgl.cpp | 4 +-
linden/indra/llwindow/llwindowsdl.cpp | 1 +
linden/indra/lscript/lscript_compile/indra.l | 10 +
linden/indra/lscript/lscript_compile/indra.y | 1 -
.../indra/lscript/lscript_compile/lscript_tree.cpp | 8 +-
.../lscript/lscript_library/lscript_library.cpp | 2 +
.../indra/newview/English.lproj/InfoPlist.strings | 4 +-
linden/indra/newview/Info-SecondLife.plist | 2 +-
linden/indra/newview/app_settings/keywords.ini | 10 +
linden/indra/newview/fakevoicesoundsignal.cpp | 34 +-
linden/indra/newview/fakevoicesoundsignal.h | 34 +-
linden/indra/newview/featuretable.txt | 2 +
linden/indra/newview/featuretable_linux.txt | 6 +
linden/indra/newview/featuretable_mac.txt | 3 +-
linden/indra/newview/files.lst | 1 +
linden/indra/newview/gpu_table.txt | 2 +
linden/indra/newview/linux_tools/client-readme.txt | 4 +
linden/indra/newview/linux_tools/wrapper.sh | 10 +-
linden/indra/newview/llagent.cpp | 2 +-
linden/indra/newview/llagent.h | 3 +-
linden/indra/newview/llassetuploadresponders.cpp | 4 +-
linden/indra/newview/llcompilequeue.cpp | 6 +-
linden/indra/newview/llcompilequeue.h | 6 +-
linden/indra/newview/llconsole.cpp | 2 +-
linden/indra/newview/llcontroldef.cpp | 16 +-
linden/indra/newview/llcubemap.cpp | 17 +-
linden/indra/newview/lldrawpool.cpp | 51 +-
linden/indra/newview/lldrawpoolalpha.cpp | 8 +-
linden/indra/newview/lldrawpoolbump.cpp | 12 +-
linden/indra/newview/lldrawpoolwater.cpp | 6 +-
linden/indra/newview/lldynamictexture.cpp | 21 +-
linden/indra/newview/llfeaturemanager.cpp | 8 +-
linden/indra/newview/llflexibleobject.cpp | 11 +-
linden/indra/newview/llflexibleobject.h | 2 +-
linden/indra/newview/llfloaterabout.cpp | 22 +-
linden/indra/newview/llfloateranimpreview.h | 2 +-
linden/indra/newview/llfloaterauction.cpp | 8 +-
linden/indra/newview/llfloateravatarpicker.cpp | 46 +-
linden/indra/newview/llfloateravatarpicker.h | 2 +
linden/indra/newview/llfloatercustomize.cpp | 7 +-
linden/indra/newview/llfloatercustomize.h | 2 +-
linden/indra/newview/llfloaterdirectory.cpp | 3 +-
linden/indra/newview/llfloaterfriends.cpp | 3 +-
linden/indra/newview/llfloaterfriends.h | 2 +-
linden/indra/newview/llfloatergodtools.cpp | 2 +-
linden/indra/newview/llfloatergroupinfo.cpp | 14 +-
linden/indra/newview/llfloatergroupinvite.cpp | 7 +-
linden/indra/newview/llfloatergroupinvite.h | 2 +-
linden/indra/newview/llfloatergroups.cpp | 45 +-
linden/indra/newview/llfloatergroups.h | 2 +
linden/indra/newview/llfloaterimagepreview.cpp | 9 +-
linden/indra/newview/llfloaterimport.cpp | 2 +-
linden/indra/newview/llfloaterimport.h | 2 +-
linden/indra/newview/llfloaterinspect.cpp | 8 +-
linden/indra/newview/llfloaterpostcard.cpp | 2 +-
linden/indra/newview/llfloaterpostcard.h | 2 +-
linden/indra/newview/llfloaterregioninfo.cpp | 22 +-
linden/indra/newview/llfloaterregioninfo.h | 2 +-
linden/indra/newview/llfloaterreleasemsg.cpp | 152 +++++
linden/indra/newview/llfloaterreleasemsg.h | 55 ++
linden/indra/newview/llfloaterreporter.cpp | 4 +-
linden/indra/newview/llfloaterreporter.h | 2 +-
linden/indra/newview/llfloatersnapshot.cpp | 8 +-
linden/indra/newview/llfloatertools.cpp | 18 +-
linden/indra/newview/llfloatertos.cpp | 14 +-
linden/indra/newview/llfloaterworldmap.cpp | 8 +
linden/indra/newview/llfolderview.cpp | 73 ++-
linden/indra/newview/llfolderview.h | 3 +-
linden/indra/newview/llgesturemgr.cpp | 2 +-
linden/indra/newview/llgesturemgr.h | 2 +-
linden/indra/newview/llglslshader.cpp | 5 +-
linden/indra/newview/llgroupnotify.cpp | 2 +-
linden/indra/newview/llhudeffectlookat.cpp | 239 ++++++--
linden/indra/newview/llhudeffectlookat.h | 4 +-
linden/indra/newview/llinventorybridge.cpp | 48 +-
linden/indra/newview/llinventoryview.cpp | 4 +-
linden/indra/newview/lllandmarklist.cpp | 3 +-
linden/indra/newview/lllandmarklist.h | 3 +-
linden/indra/newview/llmaniptranslate.cpp | 15 +-
linden/indra/newview/llmutelist.cpp | 4 +-
linden/indra/newview/llmutelist.h | 2 +-
linden/indra/newview/llnotify.cpp | 3 +-
linden/indra/newview/llnotify.h | 2 +-
linden/indra/newview/llpanelclassified.cpp | 59 +-
linden/indra/newview/llpanelclassified.h | 5 +-
linden/indra/newview/llpaneldisplay.cpp | 10 +-
linden/indra/newview/llpanelgroupgeneral.cpp | 22 +-
linden/indra/newview/llpanelgroupgeneral.h | 2 +-
linden/indra/newview/llpanelgroupinvite.cpp | 146 ++++-
linden/indra/newview/llpanelgroupinvite.h | 8 +-
linden/indra/newview/llpanellogin.cpp | 49 +-
linden/indra/newview/llpanellogin.h | 2 +-
linden/indra/newview/llpanelobject.cpp | 75 ++-
linden/indra/newview/llpanelobject.h | 7 +-
linden/indra/newview/llprefsim.cpp | 2 +-
linden/indra/newview/llprefsvoice.h | 80 +--
linden/indra/newview/llpreview.cpp | 8 +-
linden/indra/newview/llpreview.h | 2 +-
linden/indra/newview/llpreviewgesture.cpp | 7 +-
linden/indra/newview/llpreviewgesture.h | 4 +-
linden/indra/newview/llpreviewnotecard.cpp | 4 +-
linden/indra/newview/llpreviewnotecard.h | 4 +-
linden/indra/newview/llpreviewscript.cpp | 46 +-
linden/indra/newview/llpreviewscript.h | 16 +-
linden/indra/newview/llspatialpartition.cpp | 19 +-
linden/indra/newview/llspatialpartition.h | 22 +-
linden/indra/newview/llstartup.cpp | 663 ++++++++++-----------
linden/indra/newview/llstartup.h | 61 +-
linden/indra/newview/llstatusbar.cpp | 2 +-
linden/indra/newview/lltexlayer.cpp | 2 +-
linden/indra/newview/lltexlayer.h | 2 +-
linden/indra/newview/lltexturectrl.cpp | 18 +-
linden/indra/newview/lltexturectrl.h | 4 +
linden/indra/newview/lltoolgrab.cpp | 7 +-
linden/indra/newview/lltoolmorph.cpp | 2 +
linden/indra/newview/lltoolpie.cpp | 2 +-
linden/indra/newview/lltracker.cpp | 51 +-
linden/indra/newview/lluserauth.cpp | 2 +-
linden/indra/newview/llviewerassetstorage.cpp | 10 +-
linden/indra/newview/llviewerassetstorage.h | 2 -
linden/indra/newview/llviewerbuild.h | 4 +-
linden/indra/newview/llviewerdisplay.cpp | 11 +-
linden/indra/newview/llviewerimage.cpp | 4 +-
linden/indra/newview/llviewerimagelist.cpp | 10 +-
linden/indra/newview/llviewerimagelist.h | 2 +
linden/indra/newview/llviewerinventory.cpp | 88 ++-
linden/indra/newview/llviewerinventory.h | 6 +-
linden/indra/newview/llviewermenu.cpp | 48 +-
linden/indra/newview/llviewermenufile.cpp | 2 +-
linden/indra/newview/llviewermessage.cpp | 202 +++++--
linden/indra/newview/llviewermessage.h | 3 +-
linden/indra/newview/llviewerobject.cpp | 2 +-
linden/indra/newview/llviewerobject.h | 2 +-
linden/indra/newview/llviewerobjectlist.cpp | 40 +-
linden/indra/newview/llviewerprecompiledheaders.h | 2 +-
linden/indra/newview/llviewerregion.cpp | 10 +-
linden/indra/newview/llviewertexteditor.cpp | 91 ++-
linden/indra/newview/llviewertexteditor.h | 6 +-
linden/indra/newview/llviewerwindow.cpp | 20 +-
linden/indra/newview/llvoavatar.cpp | 1 +
linden/indra/newview/llvoiceclient.cpp | 2 +-
linden/indra/newview/llvoicevisualizer.cpp | 28 +
linden/indra/newview/llvoicevisualizer.h | 28 +
linden/indra/newview/llvopartgroup.cpp | 2 +-
linden/indra/newview/llvosky.cpp | 6 +-
linden/indra/newview/llvovolume.cpp | 6 +-
linden/indra/newview/llwearable.cpp | 3 +-
linden/indra/newview/llwearable.h | 2 +-
linden/indra/newview/llwearablelist.cpp | 2 +-
linden/indra/newview/llwearablelist.h | 2 +-
linden/indra/newview/lsl_guide.html | 125 +---
.../newview/macview.xcodeproj/project.pbxproj | 16 +-
linden/indra/newview/newview.vcproj | 3 +
linden/indra/newview/pipeline.cpp | 8 +-
linden/indra/newview/pipeline.h | 2 +-
linden/indra/newview/prebuild.bat | 22 +-
linden/indra/newview/releasenotes.txt | 97 ++-
linden/indra/newview/res/newViewRes.rc | 8 +-
.../secondlife setup build release candidate.bat | 4 +
linden/indra/newview/skins/textures/textures.xml | 1 +
linden/indra/newview/skins/xui/en-us/alerts.xml | 5 +
.../skins/xui/en-us/floater_image_preview.xml | 6 +-
.../newview/skins/xui/en-us/floater_inventory.xml | 2 +-
.../xui/en-us/floater_sim_release_message.xml | 17 +
.../newview/skins/xui/en-us/floater_tools.xml | 29 +-
.../newview/skins/xui/en-us/menu_pie_avatar.xml | 5 +-
.../indra/newview/skins/xui/en-us/menu_viewer.xml | 10 +-
linden/indra/newview/skins/xui/en-us/notify.xml | 16 +-
.../newview/skins/xui/en-us/panel_group_invite.xml | 31 +-
linden/indra/newview/viewer.cpp | 100 ++--
linden/indra/newview/viewer.h | 4 +-
linden/indra/newview/viewer_manifest.py | 16 +-
linden/indra/test/lltemplatemessagebuilder_tut.cpp | 2 +-
linden/indra/test/message_tut.cpp | 2 +-
linden/indra/test/test_llmanifest.py | 8 +-
linden/scripts/messages/message_template.msg | 8 +-
256 files changed, 3431 insertions(+), 1792 deletions(-)
create mode 100644 linden/indra/llcommon/llextendedstatus.h
delete mode 100644 linden/indra/llcommon/llversion.h
create mode 100644 linden/indra/llcommon/llversionserver.h
create mode 100644 linden/indra/llcommon/llversionviewer.h
create mode 100644 linden/indra/newview/llfloaterreleasemsg.cpp
create mode 100644 linden/indra/newview/llfloaterreleasemsg.h
create mode 100644 linden/indra/newview/secondlife setup build release candidate.bat
create mode 100644 linden/indra/newview/skins/xui/en-us/floater_sim_release_message.xml
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index b7d15b5..1ce46e5 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -4,49 +4,213 @@ along with the issue identifier corresponding to the patches we've
received from them. To see more about these contributions, visit
http://jira.secondlife.com/ and enter the issue identifier.
-Able Whitman - VWR-650, VWR-1460
-Alissa Sabre - VWR-81, VWR-83, VWR-171, VWR-251, VWR-414, VWR-415, VWR-459, VWR-606, VWR-652, VWR-1351, VWR-1410
-Argent Stonecutter - VWR-68
-Benja Kepler - VWR-746
-Blakar Ogre - VWR-881
-blino Nakamura - VWR-17
-bushing Spatula - VWR-424, VWR-119
-Catherine Pfeffer - VWR-1282
-Dale Glass - VWR-120, VWR-560
-Drewan Keats - VWR-28, VWR-248, VWR-412
-Dylan Haskell - VWR-72
-Dzonatas Sol - VWR-198, VWR-878, VWR-1704, VWR-1705, VWR-1729, VWR-975
-Eddy Stryker - VWR-15, VWR-23, VWR-1468
-EponymousDylan Ra - VWR-1465
-Feep Larsson - VWR-1314
-Fremont Cunningham - VWR-1147
-Gigs Taggart - VWR-71, VWR-326, VWR-1217, VWR-1434
-Ginko Bayliss - VWR-4
-Grazer Kline - VWR-1092
-Gudmund Shepherd - VWR-1594
-Hikkoshi Sakai - VWR-429
-Hiro Sommambulist - VWR-66, VWR-97, VWR-100, VWR-105, VWR-108, VWR-118, VWR-132, VWR-136, VWR-143
-Iskar Ariantho - VWR-1223
-Jacek Antonelli - VWR-165, VWR-188, VWR-427, VWR-597
-Joghert LeSabre - VWR-64
-Kage Pixel - VWR-11
-Kunnis Basiat - VWR-82
-McCabe Maxsted - VWR-1318
-Nicholaz Beresford - VWR-132, VWR-176, VWR-364, VWR-691, VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-856, VWR-869, VWR-870, VWR-871, VWR-873, VWR-908, VWR-966, VWR-1221, VWR-1270, VWR-1296, VWR-1410, VWR-1418, VWR-1453, VWR-1455, VWR-1470, VWR-1578, VWR-1626, VWR-1655, VWR-1698, VWR-1706, VWR-1723, VWR-1732, VWR-1861
-Paul Churchill - VWR-20
-Paula Innis - VWR-30, VWR-1049
-Peekay Semyorka - VWR-7, VWR-19, VWR-49, VWR-79
-Ryozu Kojima - VWR-287
-SignpostMarv Martin - VWR-154, VWR-155
-Simon Nolan - VWR-409
-SpacedOut Frye - VWR-57, VWR-94, VWR-121, VWR-123, VWR-1823
-Stevex Janus - VWR-1182
-Still Defiant - VWR-207, VWR-446
-Strife Onizuka - SVC-9, VWR-74, VWR-85, VWR-148
-tenebrous pau - VWR-247
-TBBle Kurosawa - VWR-938, VWR-941, VWR-944, VWR-945
-Tharax Ferraris - VWR-605
-Thraxis Epsilon - VWR-383, SVC-371
-Whoops Babii - VWR-1640
-Zi Ree - VWR-671, VWR-682, VWR-1140
-Zipherius Turas - VWR-76, VWR-77
+Able Whitman
+ VWR-650
+ VWR-1460
+Alissa Sabre
+ VWR-81
+ VWR-83
+ VWR-171
+ VWR-251
+ VWR-414
+ VWR-415
+ VWR-459
+ VWR-606
+ VWR-652
+ VWR-1351
+ VWR-1410
+Argent Stonecutter
+ VWR-68
+Benja Kepler
+ VWR-746
+Blakar Ogre
+ VWR-881
+blino Nakamura
+ VWR-17
+bushing Spatula
+ VWR-119
+ VWR-424
+Catherine Pfeffer
+ VWR-1282
+Dale Glass
+ VWR-120
+ VWR-560
+Drewan Keats
+ VWR-28
+ VWR-248
+ VWR-412
+Dylan Haskell
+ VWR-72
+Dzonatas Sol
+ VWR-198
+ VWR-878
+ VWR-975
+ VWR-1704
+ VWR-1705
+ VWR-1729
+Eddy Stryker
+ VWR-15
+ VWR-23
+ VWR-1468
+EponymousDylan Ra
+ VWR-1465
+Feep Larsson
+ VWR-1314
+Fremont Cunningham
+ VWR-1147
+Gigs Taggart
+ VWR-71
+ VWR-326
+ VWR-493
+ VWR-1217
+ VWR-1434
+ VWR-1987
+Ginko Bayliss
+ VWR-4
+Grazer Kline
+ VWR-1092
+Gudmund Shepherd
+ VWR-1594
+Hikkoshi Sakai
+ VWR-429
+Hiro Sommambulist
+ VWR-66
+ VWR-97
+ VWR-100
+ VWR-105
+ VWR-108
+ VWR-118
+ VWR-132
+ VWR-136
+ VWR-143
+Iskar Ariantho
+ VWR-1223
+Jacek Antonelli
+ VWR-165
+ VWR-188
+ VWR-427
+ VWR-597
+Joghert LeSabre
+ VWR-64
+Kage Pixel
+ VWR-11
+Kunnis Basiat
+ VWR-82
+Matthew Dowd
+ VWR-1344
+ VWR-1736
+ VWR-1761
+McCabe Maxsted
+ VWR-1318
+Mr Greggan
+ VWR-445
+Nicholaz Beresford
+ VWR-132
+ VWR-176
+ VWR-364
+ VWR-546
+ VWR-691
+ VWR-793
+ VWR-794
+ VWR-802
+ VWR-803
+ VWR-804
+ VWR-805
+ VWR-808
+ VWR-809
+ VWR-810
+ VWR-823
+ VWR-856
+ VWR-869
+ VWR-870
+ VWR-871
+ VWR-873
+ VWR-908
+ VWR-966
+ VWR-1221
+ VWR-1230
+ VWR-1270
+ VWR-1296
+ VWR-1410
+ VWR-1418
+ VWR-1453
+ VWR-1455
+ VWR-1470
+ VWR-1566
+ VWR-1578
+ VWR-1626
+ VWR-1655
+ VWR-1698
+ VWR-1706
+ VWR-1721
+ VWR-1723
+ VWR-1732
+ VWR-1769
+ VWR-1808
+ VWR-1861
+ VWR-1872
+ VWR-1968
+ VWR-2152
+Paul Churchill
+ VWR-20
+ VWR-493
+ VWR-749
+ VWR-1567
+ VWR-1647
+ VWR-1880
+Paula Innis
+ VWR-30
+ VWR-1049
+Peekay Semyorka
+ VWR-7
+ VWR-19
+ VWR-49
+ VWR-79
+Renault Clio
+ VWR-1976
+Ryozu Kojima
+ VWR-287
+SignpostMarv Martin
+ VWR-154
+ VWR-155
+Simon Nolan
+ VWR-409
+SpacedOut Frye
+ VWR-57
+ VWR-94
+ VWR-121
+ VWR-123
+ VWR-1823
+Stevex Janus
+ VWR-1182
+Still Defiant
+ VWR-207
+ VWR-446
+Strife Onizuka
+ SVC-9
+ VWR-74
+ VWR-85
+ VWR-148
+tenebrous pau
+ VWR-247
+TBBle Kurosawa
+ VWR-938
+ VWR-941
+ VWR-942
+ VWR-944
+ VWR-945
+ VWR-1892
+Tharax Ferraris
+ VWR-605
+Thraxis Epsilon
+ SVC-371
+ VWR-383
+Whoops Babii
+ VWR-1640
+Zi Ree
+ VWR-671
+ VWR-682
+ VWR-1140
+Zipherius Turas
+ VWR-76
+ VWR-77
diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct
index e90a7e6..6105759 100644
--- a/linden/indra/SConstruct
+++ b/linden/indra/SConstruct
@@ -38,35 +38,25 @@ if platform == 'linux2':
# GET VERSION #
######################
-def grep(filestr,searchstr):
- try:
- f = open( filestr, 'r' )
- except IOError:
- print "No such file " + filestr
- sys.exit(2)
- r = re.compile( searchstr )
- for line in f.read().split('\n'):
- if ( r.search(line) ):
- f.close()
- return line
- f.close()
- return None
-
-def get_version(llver):
- re_vernum = re.compile("[0-9]+")
- rstr = grep('llcommon/llversion.h', "LL_VERSION_" + llver)
- if rstr == None:
- print "No version information in llversion.h"
- sys.exit(2)
- version = re_vernum.findall( rstr )[1]
- return version
+def get_version(type):
+ file = open('llcommon/llversion%s.h' % type,"r")
+ file_str = file.read()
+ file.close()
+
+ m = re.search('const S32 LL_VERSION_MAJOR = (\d+);', file_str)
+ VER_MAJOR = m.group(1)
+ m = re.search('const S32 LL_VERSION_MINOR = (\d+);', file_str)
+ VER_MINOR = m.group(1)
+ m = re.search('const S32 LL_VERSION_PATCH = (\d+);', file_str)
+ VER_PATCH = m.group(1)
+ m = re.search('const S32 LL_VERSION_BUILD = (\d+);', file_str)
+ VER_BUILD = m.group(1)
+ version = "%(VER_MAJOR)s.%(VER_MINOR)s.%(VER_PATCH)s.%(VER_BUILD)s" % locals()
-version_major = get_version("MAJOR")
-version_minor = get_version("MINOR")
-version_patch = get_version("PATCH")
-version_build = get_version("BUILD")
+ return version
-version = version_major + '.' + version_minor + '.' + version_patch + '.' + version_build
+version_viewer = get_version('viewer')
+version_server = get_version('server')
###############
@@ -82,8 +72,6 @@ try:
except:
debian_sarge = False
-fedora = os.path.exists('/etc/fedora-release')
-
#########################
# COMMAND LINE OPTIONS #
#########################
@@ -103,6 +91,8 @@ opts.AddOptions(
BoolOption('COLORGCC', 'Enabled colorgcc', True),
EnumOption('GRID', 'Client package\'s default grid', 'default',
allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'firstlook', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak')),
+ EnumOption('CHANNEL', 'Client package default channel', 'default',
+ allowed_values=('default', 'Release', 'Release Candidate', 'WindLight')),
BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True),
BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False),
BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line
@@ -118,6 +108,7 @@ enable_mozlib = optenv['MOZLIB']
enable_gstreamer = optenv['GSTREAMER']
enable_colorgcc = optenv['COLORGCC']
grid = optenv['GRID']
+channel = optenv['CHANNEL']
standalone = optenv['STANDALONE']
opensource = standalone or optenv['OPENSOURCE']
enable_fmod = not opensource and optenv['FMOD']
@@ -136,8 +127,6 @@ if standalone and platform != 'linux':
print >> sys.stderr, 'Warning: standalone builds have only been tested on Linux'
standalone_pkgs = [
- 'apr-1',
- 'apr-util-1',
'atk',
'cairo',
'freetype2',
@@ -146,7 +135,6 @@ standalone_pkgs = [
'glib-2.0',
'gmodule-2.0',
'gtk+-2.0',
- 'libcurl',
'libpng',
'pango',
'pangoft2',
@@ -158,12 +146,22 @@ standalone_pkgs = [
'vorbisfile',
]
+standalone_net_pkgs = [
+ 'apr-1',
+ 'apr-util-1',
+ 'libcrypto',
+ 'libcurl',
+ 'libssl',
+ ]
+
def pkgconfig(opt, pkgs=None):
+ if pkgs is None:
+ pkgs = standalone_pkgs + standalone_net_pkgs
return os.popen('pkg-config %s %s' %
- (opt, pkgs or ' '.join(standalone_pkgs))).read().strip()
+ (opt, ' '.join(pkgs))).read().strip()
if standalone:
- missing = [pkg for pkg in standalone_pkgs
+ missing = [pkg for pkg in standalone_pkgs + standalone_net_pkgs
if os.system('pkg-config --exists ' + pkg)]
if missing:
print >> sys.stderr, ('Error: pkg-config cannot find these '
@@ -181,7 +179,7 @@ for build_target in targets:
system_str = arch + '-' + platform
- print 'Building ' + build_target + ' ' + version + ' on ' + system_str + ' (' + buildtype + ')'
+ print 'Building ' + build_target + ' ' + version_server + ' on ' + system_str + ' (' + buildtype + ')'
system_lib_dir = '../libraries/' + system_str
@@ -214,8 +212,11 @@ for build_target in targets:
'../libraries/' + system_str + '/include' )
if platform == 'linux' and build_target == 'client':
- if arch == 'x86_64' and os.path.exists('/usr/lib64'):
- client_external_libs = [File('/usr/lib64/libresolv.a')]
+ if standalone:
+ if arch == 'x86_64' and os.path.exists('/usr/lib64'):
+ client_external_libs = [File('/usr/lib64/libresolv.a')]
+ else:
+ client_external_libs = [File('/usr/lib/libresolv.a')]
else:
# Custom libresolv build which avoids a billion flavors of
# brokenness prevalent in common libresolvs out there.
@@ -254,7 +255,7 @@ for build_target in targets:
##############
# Generic GCC flags
- cflags = '-g -pipe -Wall -Wno-trigraphs -Wno-sign-compare -Werror '
+ cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror '
cxxflags = ''
cppflags = '-D_FORTIFY_SOURCE=2 '
if standalone:
@@ -275,7 +276,7 @@ for build_target in targets:
cppflags += server_cppflags + ' '
else:
# Viewer flags
- cflags += '-fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing '
+ cflags += '-pthread -D_REENTRANT -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing '
cppflags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 '
try:
client_cppflags = os.environ['CLIENT_CPPFLAGS']
@@ -318,8 +319,7 @@ for build_target in targets:
# GStreamer stuff
if enable_gstreamer:
cppflags += '-DLL_GSTREAMER_ENABLED=1 '
- client_external_libs += [ 'glib-2.0', 'gobject-2.0' ]
- #client_external_libs += [ 'gstreamer-0.10', 'gstvideo-0.10', 'gstaudio-0.10' ]
+ client_external_libs += [ 'glib-2.0', 'gobject-2.0', 'gthread-2.0' ]
include_dirs += [ '../libraries/' + system_str + '/include/gstreamer-0.10' ]
include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0', '../libraries/' + system_str + '/include/glib-2.0/include' ]
include_dirs += [ '../libraries/' + system_str + '/include/libxml2']
@@ -544,9 +544,15 @@ for build_target in targets:
local_flags="",
module_libs = [],
source_files = 'files.lst'):
+ # -Bsymbolic avoids having the lib pull symbols from the app's
+ # namespace instead of its own by default. This avoids some
+ # rediculous problems with multiple destruction of the wrong
+ # objects, though has some gotchas of its own.
+ dyn_link_flags = '-Wl,-Bsymbolic'
files_list = load_files(module, source_files)
BuildDir(build_dir + '/' + module, module, duplicate=duplicate)
- local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags)
+ local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags,
+ LINKFLAGS = env['LINKFLAGS'] + ' ' + dyn_link_flags)
tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs)
Default(tgt)
@@ -596,12 +602,15 @@ for build_target in targets:
create_static_module('llxml')
create_static_module('lscript', extra_depends=build_dir + '/lscript/lscript_compile/indra.y.h')
- net_external_libs = [ 'curl', 'cares', 'ssl', 'crypto', 'expat', 'aprutil-1', 'apr-1' ]
- common_external_libs = net_external_libs + [ 'z' ]
- if standalone and fedora:
- common_external_libs += [ 'xmlrpc-epi' ]
+ if standalone:
+ net_external_libs = [d[2:] for d in
+ pkgconfig('--libs-only-l',
+ standalone_net_pkgs).split()]
else:
- common_external_libs += [ 'xmlrpc' ]
+ net_external_libs = [ 'curl', 'ssl', 'crypto', 'aprutil-1', 'apr-1' ]
+ net_external_libs += [ 'cares', 'expat' ]
+
+ common_external_libs = net_external_libs + [ 'xmlrpc-epi', 'z' ]
if build_target == 'client':
if platform == 'linux':
@@ -612,7 +621,7 @@ for build_target in targets:
if standalone:
external_libs = net_external_libs
external_libs += [d[2:] for d in
- pkgconfig('--libs-only-l', 'gtk+-2.0').split()]
+ pkgconfig('--libs-only-l', ['gtk+-2.0']).split()]
else:
external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ]
external_libs.remove('cares')
@@ -672,14 +681,19 @@ for build_target in targets:
if platform == 'linux':
env.Command(output_bin + '-stripped', output_bin, strip_cmd)
env.Command(output_crashlogger_bin + '-stripped', output_crashlogger_bin, strip_cmd)
- product_name = 'SecondLife_' + arch + '_' + version_major + "_" + version_minor + "_" + version_patch + "_" + version_build
+ product_name = 'SecondLife_' + arch + '_' + "_".join(version_viewer.split("."))
if grid not in ['default', 'agni']:
product_name += "_" + grid.upper()
+ if channel not in ['default', 'Release']:
+ product_name += "_" + "".join(channel.upper().split())
+
package_name = product_name + '.tar.bz2'
- cmd = 'rm -rf newview/%(pn)s* && newview/viewer_manifest.py --grid=%(grid)s --installer_name=%(pn)s --arch=%(arch)s' % {
+ complete_channel = 'Second Life ' + channel
+ cmd = 'rm -rf newview/%(pn)s* && newview/viewer_manifest.py --grid=%(grid)s --channel=\'%(ch)s\' --installer_name=%(pn)s --arch=%(arch)s' % {
'pn': product_name,
'grid':grid,
- 'arch':arch}
+ 'arch':arch,
+ 'ch':complete_channel}
env.Command('newview/' + package_name, 'newview/viewer_manifest.py', cmd)
Depends('newview/' + package_name, output_bin + '-stripped')
Depends('newview/' + package_name, output_crashlogger_bin + '-stripped')
@@ -724,7 +738,9 @@ for build_target in targets:
internal_libs + external_libs)
# Dataserver
- external_libs = common_external_libs + ['boost_regex-gcc-mt', 'mysqlclient']
+ external_libs = common_external_libs + [
+ 'boost_regex-gcc-mt', 'mysqlclient', 'tcmalloc', 'stacktrace',
+ ]
internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llimagej2coj', 'llinventory',
'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ]
create_executable('dataserver/dataserver' + file_suffix, 'dataserver',
@@ -738,7 +754,7 @@ for build_target in targets:
internal_libs + external_libs)
# Rpcserver
- external_libs = common_external_libs + ['xmlrpc', 'mysqlclient']
+ external_libs = common_external_libs + ['xmlrpc-epi', 'mysqlclient']
internal_libs = ['llscene', 'llmessage', 'lldatabase', 'llvfs',
'llmath', 'llcommon']
create_executable('rpcserver/rpcserver' + file_suffix, 'rpcserver',
@@ -754,7 +770,11 @@ for build_target in targets:
internal_libs + external_libs)
# Simulator
- external_libs = common_external_libs + ['hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', 'hkactions', 'boost_regex-gcc-mt', 'openjpeg', 'dl', 'kdu', 'mysqlclient', 'iconv']
+ external_libs = common_external_libs + [
+ 'hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide',
+ 'hkactions', 'boost_regex-gcc-mt', 'openjpeg', 'dl', 'kdu',
+ 'mysqlclient', 'iconv', 'tcmalloc', 'stacktrace',
+ ]
internal_libs = [ 'lscript', 'llprimitive',
'llscene', 'llhavok', 'llinventory', 'llimage', 'llimagej2coj',
'llcharacter', 'llxml', 'lldatabase', 'llkdustatic',
diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py
index 0e46589..c496e95 100644
--- a/linden/indra/lib/python/indra/util/llmanifest.py
+++ b/linden/indra/lib/python/indra/util/llmanifest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
"""\
@file llmanifest.py
@author Ryan Williams
@@ -77,7 +76,7 @@ def get_default_platform(dummy):
def get_default_version(srctree):
# look up llversion.h and parse out the version info
- paths = [os.path.join(srctree, x, 'llversion.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
+ paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
for p in paths:
if os.path.exists(p):
contents = open(p, 'r').read()
@@ -87,6 +86,16 @@ def get_default_version(srctree):
build = re.search("LL_VERSION_BUILD\s=\s([0-9]+)", contents).group(1)
return major, minor, patch, build
+def get_channel(srctree):
+ # look up llversionserver.h and parse out the version info
+ paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
+ for p in paths:
+ if os.path.exists(p):
+ contents = open(p, 'r').read()
+ channel = re.search("LL_CHANNEL\s=\s\"([\w\s]+)\"", contents).group(1)
+ return channel
+
+
DEFAULT_CHANNEL = 'Second Life Release'
ARGUMENTS=[
@@ -118,7 +127,7 @@ ARGUMENTS=[
default=""),
dict(name='channel',
description="""The channel to use for updates.""",
- default=DEFAULT_CHANNEL),
+ default=get_channel),
dict(name='installer_name',
description=""" The name of the file that the installer should be
packaged up into. Only used on Linux at the moment.""",
@@ -322,7 +331,9 @@ class LLManifest(object):
output = ''.join(lines)
status = fd.close()
if(status):
- raise RuntimeError, "Command " + command + " returned non-zero status (" + str(status) + ")"
+ raise RuntimeError(
+ "Command %s returned non-zero status (%s) \noutput:\n%s"
+ % (command, status, output) )
return output
def created_path(self, path):
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp
index 4428cea..373b0c1 100644
--- a/linden/indra/llaudio/audioengine.cpp
+++ b/linden/indra/llaudio/audioengine.cpp
@@ -1136,7 +1136,7 @@ void LLAudioEngine::startNextTransfer()
// static
-void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code)
+void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status)
{
if (result_code)
{
@@ -1665,3 +1665,4 @@ BOOL LLAudioData::load()
return TRUE;
}
+
diff --git a/linden/indra/llaudio/audioengine.h b/linden/indra/llaudio/audioengine.h
index 5a0186c..3b6bbd7 100644
--- a/linden/indra/llaudio/audioengine.h
+++ b/linden/indra/llaudio/audioengine.h
@@ -157,7 +157,7 @@ public:
// Asset callback when we're retrieved a sound from the asset server.
void startNextTransfer();
- static void assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code);
+ static void assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status);
friend class LLPipeline; // For debugging
diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp
index e5d610a..cf489aa 100644
--- a/linden/indra/llcharacter/llkeyframemotion.cpp
+++ b/linden/indra/llcharacter/llkeyframemotion.cpp
@@ -425,15 +425,17 @@ void LLKeyframeMotion::JointMotion::update(LLJointState* joint_state, F32 time,
// LLKeyframeMotion()
// Class Constructor
//-----------------------------------------------------------------------------
-LLKeyframeMotion::LLKeyframeMotion( const LLUUID &id) : LLMotion(id)
+LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id)
+ : LLMotion(id),
+ mJointMotionList(NULL),
+ mJointStates(NULL),
+ mPelvisp(NULL),
+ mLastSkeletonSerialNum(0),
+ mLastUpdateTime(0.f),
+ mLastLoopedTime(0.f),
+ mAssetStatus(ASSET_UNDEFINED)
{
- mJointMotionList = NULL;
- mJointStates = NULL;
- mLastSkeletonSerialNum = 0;
- mLastLoopedTime = 0.f;
- mLastUpdateTime = 0.f;
- mAssetStatus = ASSET_UNDEFINED;
- mPelvisp = NULL;
+
}
@@ -1738,7 +1740,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
}
success &= dp.packS32(mJointMotionList->mConstraints.size(), "num_constraints");
- for (JointMotionList::constraint_list_t::iterator iter = mJointMotionList->mConstraints.begin();
+ for (JointMotionList::constraint_list_t::const_iterator iter = mJointMotionList->mConstraints.begin();
iter != mJointMotionList->mConstraints.end(); ++iter)
{
JointConstraintSharedData* shared_constraintp = *iter;
@@ -1933,7 +1935,7 @@ void LLKeyframeMotion::setLoopOut(F32 out_point)
void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
LLUUID* id = (LLUUID*)user_data;
diff --git a/linden/indra/llcharacter/llkeyframemotion.h b/linden/indra/llcharacter/llkeyframemotion.h
index 1e5cd62..9e1b11d 100644
--- a/linden/indra/llcharacter/llkeyframemotion.h
+++ b/linden/indra/llcharacter/llkeyframemotion.h
@@ -144,7 +144,7 @@ public:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
public:
U32 getFileSize();
@@ -456,3 +456,4 @@ public:
#endif // LL_LLKEYFRAMEMOTION_H
+
diff --git a/linden/indra/llcharacter/llmultigesture.cpp b/linden/indra/llcharacter/llmultigesture.cpp
index 0a4d99a..e92fcbd 100644
--- a/linden/indra/llcharacter/llmultigesture.cpp
+++ b/linden/indra/llcharacter/llmultigesture.cpp
@@ -278,7 +278,7 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
// Apparently an earlier version of the gesture code added \r to the end
// of the animation names. Get rid of it. JC
- if (mAnimName[mAnimName.length() - 1] == '\r')
+ if (!mAnimName.empty() && mAnimName[mAnimName.length() - 1] == '\r')
{
// chop the last character
mAnimName.resize(mAnimName.length() - 1);
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h
index 21635b5..bd591c5 100644
--- a/linden/indra/llcommon/indra_constants.h
+++ b/linden/indra/llcommon/indra_constants.h
@@ -136,6 +136,7 @@ const MASK MASK_ALT = 0x0002;
const MASK MASK_SHIFT = 0x0004;
const MASK MASK_NORMALKEYS = 0x0007; // A real mask - only get the bits for normal modifier keys
const MASK MASK_MAC_CONTROL = 0x0008; // Un-mapped Ctrl key on Macs, not used on Windows
+const MASK MASK_MODIFIERS = MASK_CONTROL|MASK_ALT|MASK_SHIFT|MASK_MAC_CONTROL;
// Special keys go into >128
const KEY KEY_SPECIAL = 0x80; // special keys start here
diff --git a/linden/indra/llcommon/linden_common.h b/linden/indra/llcommon/linden_common.h
index 5a6018a..24a346c 100644
--- a/linden/indra/llcommon/linden_common.h
+++ b/linden/indra/llcommon/linden_common.h
@@ -50,6 +50,7 @@
#include "stdtypes.h"
#include "lldefs.h"
#include "llerror.h"
+#include "llextendedstatus.h"
#include "llformat.h"
#include "llstring.h"
#include "lltimer.h"
diff --git a/linden/indra/llcommon/llcommon.vcproj b/linden/indra/llcommon/llcommon.vcproj
index 5557f94..70006e0 100644
--- a/linden/indra/llcommon/llcommon.vcproj
+++ b/linden/indra/llcommon/llcommon.vcproj
@@ -385,6 +385,9 @@
RelativePath=".\llevent.h">
+
+
+ RelativePath=".\llversionserver.h">
+
+
diff --git a/linden/indra/llcommon/llevent.cpp b/linden/indra/llcommon/llevent.cpp
index a6c4ef0..9c736c8 100644
--- a/linden/indra/llcommon/llevent.cpp
+++ b/linden/indra/llcommon/llevent.cpp
@@ -238,6 +238,7 @@ LLEventDispatcher::~LLEventDispatcher()
if (impl)
{
delete impl;
+ impl = NULL;
}
}
diff --git a/linden/indra/llcommon/llextendedstatus.h b/linden/indra/llcommon/llextendedstatus.h
new file mode 100644
index 0000000..a1c998f
--- /dev/null
+++ b/linden/indra/llcommon/llextendedstatus.h
@@ -0,0 +1,69 @@
+/**
+ * @file llextendedstatus.h
+ * @date August 2007
+ * @brief extended status codes for curl/vfs/resident asset storage and delivery
+ *
+ * Copyright (c) 2007-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#ifndef LL_LLEXTENDEDSTATUS_H
+#define LL_LLEXTENDEDSTATUS_H
+
+
+typedef S32 LLExtStat;
+
+
+// Status provider groups - Top bits indicate which status type it is
+// Zero is common status code (next section)
+const LLExtStat LL_EXSTAT_CURL_RESULT = 1L<<30; // serviced by curl - use 1L if we really implement the below
+const LLExtStat LL_EXSTAT_RES_RESULT = 2L<<30; // serviced by resident copy
+const LLExtStat LL_EXSTAT_VFS_RESULT = 3L<<30; // serviced by vfs
+
+
+// Common Status Codes
+//
+const LLExtStat LL_EXSTAT_NONE = 0x00000; // No extra info here - sorry!
+const LLExtStat LL_EXSTAT_NULL_UUID = 0x10001; // null asset ID
+const LLExtStat LL_EXSTAT_NO_UPSTREAM = 0x10002; // attempt to upload without a valid upstream method/provider
+const LLExtStat LL_EXSTAT_REQUEST_DROPPED = 0x10003; // request was dropped unserviced
+const LLExtStat LL_EXSTAT_NONEXISTENT_FILE = 0x10004; // trying to upload a file that doesn't exist
+const LLExtStat LL_EXSTAT_BLOCKED_FILE = 0x10005; // trying to upload a file that we can't open
+
+
+// curl status codes:
+//
+// Mask off LL_EXSTAT_CURL_RESULT for original result and
+// see: libraries/include/curl/curl.h
+
+
+// Memory-Resident status codes:
+// None at present
+
+
+// VFS status codes:
+const LLExtStat LL_EXSTAT_VFS_CACHED = LL_EXSTAT_VFS_RESULT | 0x0001;
+const LLExtStat LL_EXSTAT_VFS_CORRUPT = LL_EXSTAT_VFS_RESULT | 0x0002;
+
+
+#endif // LL_LLEXTENDEDSTATUS_H
diff --git a/linden/indra/llcommon/lllivefile.cpp b/linden/indra/llcommon/lllivefile.cpp
index f116a2a..17fe210 100644
--- a/linden/indra/llcommon/lllivefile.cpp
+++ b/linden/indra/llcommon/lllivefile.cpp
@@ -146,8 +146,11 @@ namespace
: LLEventTimer(refresh), mLiveFile(f)
{ }
- void tick()
- { mLiveFile.checkAndReload(); }
+ BOOL tick()
+ {
+ mLiveFile.checkAndReload();
+ return FALSE;
+ }
private:
LLLiveFile& mLiveFile;
diff --git a/linden/indra/llcommon/lllslconstants.h b/linden/indra/llcommon/lllslconstants.h
index afe4a9e..151c7a2 100644
--- a/linden/indra/llcommon/lllslconstants.h
+++ b/linden/indra/llcommon/lllslconstants.h
@@ -166,4 +166,15 @@ const S32 STRING_TRIM_HEAD = 0x01;
const S32 STRING_TRIM_TAIL = 0x02;
const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL;
+// llGetObjectDetails
+const S32 OBJECT_UNKOWN_DETAIL = -1;
+const S32 OBJECT_NAME = 1;
+const S32 OBJECT_DESC = 2;
+const S32 OBJECT_POS = 3;
+const S32 OBJECT_ROT = 4;
+const S32 OBJECT_VELOCITY = 5;
+const S32 OBJECT_OWNER = 6;
+const S32 OBJECT_GROUP = 7;
+const S32 OBJECT_CREATOR = 8;
+
#endif
diff --git a/linden/indra/llcommon/llmetrics.cpp b/linden/indra/llcommon/llmetrics.cpp
index 583f840..74bd13d 100644
--- a/linden/indra/llcommon/llmetrics.cpp
+++ b/linden/indra/llcommon/llmetrics.cpp
@@ -67,7 +67,7 @@ void LLMetricsImpl::recordEventDetails(const std::string& location,
metrics["location"] = location;
metrics["stats"] = stats;
- llinfos << "LLMETRICS: " << LLSDOStreamer(metrics) << llendl;
+ llinfos << "LLMETRICS: " << LLSDNotationStreamer(metrics) << llendl;
}
// Store this:
diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp
index 25749e1..95b6b55 100644
--- a/linden/indra/llcommon/llsys.cpp
+++ b/linden/indra/llcommon/llsys.cpp
@@ -46,6 +46,7 @@
#elif LL_DARWIN
# include
# include
+# include
#elif LL_LINUX
# include
# include
@@ -482,57 +483,97 @@ LLMemoryInfo::LLMemoryInfo()
{
}
-U32 LLMemoryInfo::getPhysicalMemory() const
+#if LL_WINDOWS
+static U32 LLMemoryAdjustKBResult(U32 inKB)
+{
+ // Moved this here from llfloaterabout.cpp
+
+ //! \bug
+ // For some reason, the reported amount of memory is always wrong.
+ // The original adjustment assumes it's always off by one meg, however
+ // errors of as much as 2520 KB have been observed in the value
+ // returned from the GetMemoryStatusEx function. Here we keep the
+ // original adjustment from llfoaterabout.cpp until this can be
+ // fixed somehow.
+ inKB += 1024;
+
+ return inKB;
+}
+#endif
+
+U32 LLMemoryInfo::getPhysicalMemoryKB() const
{
#if LL_WINDOWS
- MEMORYSTATUS state;
+ MEMORYSTATUSEX state;
state.dwLength = sizeof(state);
- GlobalMemoryStatus(&state);
+ GlobalMemoryStatusEx(&state);
- return (U32)state.dwTotalPhys;
+ return LLMemoryAdjustKBResult((U32)(state.ullTotalPhys >> 10));
#elif LL_DARWIN
// This might work on Linux as well. Someone check...
- unsigned int phys = 0;
- int mib[2] = { CTL_HW, HW_PHYSMEM };
+ uint64_t phys = 0;
+ int mib[2] = { CTL_HW, HW_MEMSIZE };
size_t len = sizeof(phys);
sysctl(mib, 2, &phys, &len, NULL, 0);
- return phys;
+ return (U32)(phys >> 10);
+
#elif LL_LINUX
+ U64 phys = 0;
+ phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
+ return (U32)(phys >> 10);
- return getpagesize() * get_phys_pages();
#elif LL_SOLARIS
- return getpagesize() * sysconf(_SC_PHYS_PAGES);
+ U64 phys = 0;
+ phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES));
+ return (U32)(phys >> 10);
+
#else
return 0;
#endif
}
+U32 LLMemoryInfo::getPhysicalMemoryClamped() const
+{
+ // Return the total physical memory in bytes, but clamp it
+ // to no more than U32_MAX
+
+ U32 phys_kb = getPhysicalMemoryKB();
+ if (phys_kb >= 4194304 /* 4GB in KB */)
+ {
+ return U32_MAX;
+ }
+ else
+ {
+ return phys_kb << 10;
+ }
+}
+
void LLMemoryInfo::stream(std::ostream& s) const
{
#if LL_WINDOWS
- MEMORYSTATUS state;
+ MEMORYSTATUSEX state;
state.dwLength = sizeof(state);
- GlobalMemoryStatus(&state);
+ GlobalMemoryStatusEx(&state);
s << "Percent Memory use: " << (U32)state.dwMemoryLoad << '%' << std::endl;
- s << "Total Physical Kb: " << (U32)state.dwTotalPhys/1024 << std::endl;
- s << "Avail Physical Kb: " << (U32)state.dwAvailPhys/1024 << std::endl;
- s << "Total page Kb: " << (U32)state.dwTotalPageFile/1024 << std::endl;
- s << "Avail page Kb: " << (U32)state.dwAvailPageFile/1024 << std::endl;
- s << "Total Virtual Kb: " << (U32)state.dwTotalVirtual/1024 << std::endl;
- s << "Avail Virtual Kb: " << (U32)state.dwAvailVirtual/1024 << std::endl;
+ s << "Total Physical KB: " << (U32)(state.ullTotalPhys/1024) << std::endl;
+ s << "Avail Physical KB: " << (U32)(state.ullAvailPhys/1024) << std::endl;
+ s << "Total page KB: " << (U32)(state.ullTotalPageFile/1024) << std::endl;
+ s << "Avail page KB: " << (U32)(state.ullAvailPageFile/1024) << std::endl;
+ s << "Total Virtual KB: " << (U32)(state.ullTotalVirtual/1024) << std::endl;
+ s << "Avail Virtual KB: " << (U32)(state.ullAvailVirtual/1024) << std::endl;
#elif LL_DARWIN
- U64 phys = 0;
+ uint64_t phys = 0;
size_t len = sizeof(phys);
if(sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0)
{
- s << "Total Physical Kb: " << phys/1024 << std::endl;
+ s << "Total Physical KB: " << phys/1024 << std::endl;
}
else
{
@@ -543,7 +584,7 @@ void LLMemoryInfo::stream(std::ostream& s) const
phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024);
- s << "Total Physical Kb: " << phys << std::endl;
+ s << "Total Physical KB: " << phys << std::endl;
#else
// *NOTE: This works on linux. What will it do on other systems?
FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb");
diff --git a/linden/indra/llcommon/llsys.h b/linden/indra/llcommon/llsys.h
index 416bd54..66a3465 100644
--- a/linden/indra/llcommon/llsys.h
+++ b/linden/indra/llcommon/llsys.h
@@ -89,13 +89,31 @@ private:
std::string mCPUString;
};
+//=============================================================================
+//
+// CLASS LLMemoryInfo
+
class LLMemoryInfo
+
+/*! @brief Class to query the memory subsystem
+
+ @details
+ Here's how you use an LLMemoryInfo:
+
+ LLMemoryInfo info;
+ llinfos << info << llendl;
+*/
{
public:
- LLMemoryInfo();
- void stream(std::ostream& s) const;
-
- U32 getPhysicalMemory() const;
+ LLMemoryInfo(); ///< Default constructor
+ void stream(std::ostream& s) const; ///< output text info to s
+
+ U32 getPhysicalMemoryKB() const; ///< Memory size in KiloBytes
+
+ /*! Memory size in bytes, if total memory is >= 4GB then U32_MAX will
+ ** be returned.
+ */
+ U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes
};
diff --git a/linden/indra/llcommon/llthread.h b/linden/indra/llcommon/llthread.h
index c863322..d700592 100644
--- a/linden/indra/llcommon/llthread.h
+++ b/linden/indra/llcommon/llthread.h
@@ -220,7 +220,7 @@ public:
if (0 == res)
{
delete this;
- res = 0;
+ return 0;
}
return res;
}
diff --git a/linden/indra/llcommon/lltimer.cpp b/linden/indra/llcommon/lltimer.cpp
index 6077063..177f1de 100644
--- a/linden/indra/llcommon/lltimer.cpp
+++ b/linden/indra/llcommon/lltimer.cpp
@@ -525,13 +525,27 @@ LLEventTimer::~LLEventTimer()
void LLEventTimer::updateClass()
{
+ std::list completed_timers;
for (std::list::iterator iter = sActiveList.begin(); iter != sActiveList.end(); )
{
LLEventTimer* timer = *iter++;
F32 et = timer->mEventTimer.getElapsedTimeF32();
if (et > timer->mPeriod) {
timer->mEventTimer.reset();
- timer->tick();
+ if ( timer->tick() )
+ {
+ completed_timers.push_back( timer );
+ }
+ }
+ }
+
+ if ( completed_timers.size() > 0 )
+ {
+ for (std::list::iterator completed_iter = completed_timers.begin();
+ completed_iter != completed_timers.end();
+ completed_iter++ )
+ {
+ delete *completed_iter;
}
}
}
diff --git a/linden/indra/llcommon/lltimer.h b/linden/indra/llcommon/lltimer.h
index 37917d0..35f0a7b 100644
--- a/linden/indra/llcommon/lltimer.h
+++ b/linden/indra/llcommon/lltimer.h
@@ -142,11 +142,12 @@ void secondsToTimecodeString(F32 current_time, char *tcstring);
class LLEventTimer
{
public:
- LLEventTimer(F32 period); // period is the amount of time between each call to tick()
+ LLEventTimer(F32 period); // period is the amount of time between each call to tick() in seconds
virtual ~LLEventTimer();
//function to be called at the supplied frequency
- virtual void tick() = 0;
+ // Normally return FALSE; TRUE will delete the timer after the function returns.
+ virtual BOOL tick() = 0;
static void updateClass();
diff --git a/linden/indra/llcommon/lluri.cpp b/linden/indra/llcommon/lluri.cpp
index 43d2147..892ac02 100644
--- a/linden/indra/llcommon/lluri.cpp
+++ b/linden/indra/llcommon/lluri.cpp
@@ -319,117 +319,6 @@ LLURI LLURI::buildHTTP(const std::string& host,
return LLURI::buildHTTP(llformat("%s:%u", host.c_str(), port), path, query);
}
-namespace {
- LLURI buildBackboneURL(LLApp* app,
- const std::string& p1 = "",
- const std::string& p2 = "",
- const std::string& p3 = "")
- {
- std::string host = "localhost:12040";
-
- if (app)
- {
- host = app->getOption("backbone-host-port").asString();
- }
-
- LLSD path = LLSD::emptyArray();
- if (!p1.empty()) path.append(p1);
- if (!p2.empty()) path.append(p2);
- if (!p3.empty()) path.append(p3);
-
- return LLURI::buildHTTP(host, path);
- }
-}
-
-#if LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS
-// static
-LLURI LLURI::buildBulkAgentNamesURI(LLApp* app)
-{
- std::string host = "localhost:12040";
-
- if (app)
- {
- host = app->getOption("backbone-host-port").asString();
- }
-
- LLSD path = LLSD::emptyArray();
- path.append("agent");
- path.append("names");
-
- return buildHTTP(host, path);
-}
-
-// static
-LLURI LLURI::buildBulkAgentNamesURI(LLApp* app)
-{
- std::string host = "localhost:12040";
-
- if (app)
- {
- host = app->getOption("backbone-host-port").asString();
- }
-
- LLSD path = LLSD::emptyArray();
- path.append("agent");
- path.append("names");
-
- return buildHTTP(host, path);
-}
-
-// static
-LLURI LLURI::buildAgentSessionURI(const LLUUID& agent_id, LLApp* app)
-{
- return buildBackboneURL(app, "agent", agent_id.asString(), "session");
-}
-
-// static
-LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app)
-{
- std::string host = "localhost:12040";
-
- if (app)
- {
- host = app->getOption("backbone-host-port").asString();
- }
-
- LLSD path = LLSD::emptyArray();
- path.append("agent");
- path.append(agent_id);
- path.append("name");
-
- return buildHTTP(host, path);
-}
-
-// static
-LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app)
-{
- std::string host = "localhost:12040";
-
- if (app)
- {
- host = app->getOption("backbone-host-port").asString();
- }
-
- LLSD path = LLSD::emptyArray();
- path.append("agent");
- path.append(agent_id);
- path.append("name");
-
- return buildHTTP(host, path);
-}
-
-// static
-LLURI LLURI::buildAgentLoginInfoURI(const LLUUID& agent_id, const std::string& dataserver)
-{
- LLSD path = LLSD::emptyArray();
- path.append("agent");
- path.append(agent_id);
- path.append("logininfo");
-
- return buildHTTP(dataserver, path);
-}
-#endif // LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS
-
std::string LLURI::asString() const
{
if (mScheme.empty())
diff --git a/linden/indra/llcommon/llversion.h b/linden/indra/llcommon/llversion.h
deleted file mode 100644
index 00c3039..0000000
--- a/linden/indra/llcommon/llversion.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file llversion.h
- * @brief
- *
- * Copyright (c) 2002-2007, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- */
-
-#ifndef LL_LLVERSION_H
-#define LL_LLVERSION_H
-
-const S32 LL_VERSION_MAJOR = 1;
-const S32 LL_VERSION_MINOR = 18;
-const S32 LL_VERSION_PATCH = 2;
-const S32 LL_VERSION_BUILD = 1;
-
-#endif
diff --git a/linden/indra/llcommon/llversionserver.h b/linden/indra/llcommon/llversionserver.h
new file mode 100644
index 0000000..0680501
--- /dev/null
+++ b/linden/indra/llcommon/llversionserver.h
@@ -0,0 +1,40 @@
+/**
+ * @file llversionserver.h
+ * @brief
+ *
+ * Copyright (c) 2002-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#ifndef LL_LLVERSIONSERVER_H
+#define LL_LLVERSIONSERVER_H
+
+const S32 LL_VERSION_MAJOR = 1;
+const S32 LL_VERSION_MINOR = 18;
+const S32 LL_VERSION_PATCH = 2;
+const S32 LL_VERSION_BUILD = 0;
+
+const char * const LL_CHANNEL = "Second Life Server";
+
+
+#endif
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
new file mode 100644
index 0000000..8c001e0
--- /dev/null
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -0,0 +1,39 @@
+/**
+ * @file llversionviewer.h
+ * @brief
+ *
+ * Copyright (c) 2002-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#ifndef LL_LLVERSIONVIEWER_H
+#define LL_LLVERSIONVIEWER_H
+
+const S32 LL_VERSION_MAJOR = 1;
+const S32 LL_VERSION_MINOR = 18;
+const S32 LL_VERSION_PATCH = 3;
+const S32 LL_VERSION_BUILD = 2;
+
+const char * const LL_CHANNEL = "Second Life Release";
+
+#endif
diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp
index b846606..fccd7b3 100644
--- a/linden/indra/llimage/llimage.cpp
+++ b/linden/indra/llimage/llimage.cpp
@@ -310,42 +310,15 @@ BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height,
// Should do some simple bounds checking
U32 i;
- U32 to_offset;
- U32 from_offset;
- if (!reverse_y)
+ for (i = 0; i < height; i++)
{
- for (i = 0; i < height; i++)
- {
- to_offset = (y_pos + i)*getWidth() + x_pos;
- if (stride != 0)
- {
- from_offset = i*stride;
- }
- else
- {
- from_offset = i*width*getComponents();
- }
- memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */
- data + from_offset, getComponents()*width);
- }
- }
- else
- {
- for (i = 0; i < height; i++)
- {
- to_offset = (y_pos + i)*getWidth() + x_pos;
- if (stride != 0)
- {
- from_offset = (height - 1 - i)*stride;
- }
- else
- {
- from_offset = (height - 1 - i)*width*getComponents();
- }
- memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */
- data + from_offset, getComponents()*width);
- }
+ const U32 row = reverse_y ? height - 1 - i : i;
+ const U32 from_offset = row * ((stride == 0) ? width*getComponents() : stride);
+ const U32 to_offset = (y_pos + i)*getWidth() + x_pos;
+ memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */
+ data + from_offset, getComponents()*width);
}
+
return TRUE;
}
diff --git a/linden/indra/llimage/llimage.h b/linden/indra/llimage/llimage.h
index cd559ec..e706c0a 100644
--- a/linden/indra/llimage/llimage.h
+++ b/linden/indra/llimage/llimage.h
@@ -116,7 +116,7 @@ public:
static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels);
- // Function for calculating the download priority for textes
+ // Function for calculating the download priority for textures
// <= 0 priority means that there's no need for more data.
static F32 calc_download_priority(F32 virtual_size, F32 visible_area, S32 bytes_sent);
diff --git a/linden/indra/llimage/llimagej2c.cpp b/linden/indra/llimage/llimagej2c.cpp
index b116027..305b11d 100644
--- a/linden/indra/llimage/llimagej2c.cpp
+++ b/linden/indra/llimage/llimagej2c.cpp
@@ -152,7 +152,9 @@ void LLImageJ2C::closeDSO()
LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C),
mMaxBytes(0),
mRawDiscardLevel(-1),
- mRate(0.0f)
+ mRate(0.0f),
+ mReversible(FALSE)
+
{
//We assume here that if we wanted to destory via
//a dynamic library that the approriate open calls were made
@@ -272,7 +274,7 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
{
LLMemType mt1((LLMemType::EMemType)mMemType);
- return mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time);
+ return mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
}
//static
@@ -341,11 +343,11 @@ void LLImageJ2C::setMaxBytes(S32 max_bytes)
{
mMaxBytes = max_bytes;
}
-// NOT USED
-// void LLImageJ2C::setReversible(const BOOL reversible)
-// {
-// mReversible = reversible;
-// }
+
+void LLImageJ2C::setReversible(const BOOL reversible)
+{
+ mReversible = reversible;
+}
BOOL LLImageJ2C::loadAndValidate(const LLString &filename)
diff --git a/linden/indra/llimage/llimagej2c.h b/linden/indra/llimage/llimagej2c.h
index 63ebe38..00cb919 100644
--- a/linden/indra/llimage/llimagej2c.h
+++ b/linden/indra/llimage/llimagej2c.h
@@ -79,6 +79,7 @@ protected:
S32 mMaxBytes; // Maximum number of bytes of data to use...
S8 mRawDiscardLevel;
F32 mRate;
+ BOOL mReversible;
LLImageJ2CImpl *mImpl;
};
@@ -100,7 +101,8 @@ protected:
// true: decoding complete (even if it failed)
// false: time expired while decoding
virtual BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count) = 0;
- virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0) = 0;
+ virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
+ BOOL reversible=FALSE) = 0;
friend class LLImageJ2C;
};
diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp
index 9366a62..be6a087 100644
--- a/linden/indra/llimagej2coj/llimagej2coj.cpp
+++ b/linden/indra/llimagej2coj/llimagej2coj.cpp
@@ -193,7 +193,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
}
-BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time)
+BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, BOOL reversible)
{
const S32 MAX_COMPS = 5;
opj_cparameters_t parameters; /* compression parameters */
diff --git a/linden/indra/llimagej2coj/llimagej2coj.h b/linden/indra/llimagej2coj/llimagej2coj.h
index 822ebc2..e896b0a 100644
--- a/linden/indra/llimagej2coj/llimagej2coj.h
+++ b/linden/indra/llimagej2coj/llimagej2coj.h
@@ -40,7 +40,8 @@ public:
protected:
/*virtual*/ BOOL getMetadata(LLImageJ2C &base);
/*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count);
- /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0);
+ /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
+ BOOL reversible = FALSE);
int ceildivpow2(int a, int b)
{
// Divide a by b to the power of 2 and round upwards.
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp
index c0a33c7..1a25b3d 100644
--- a/linden/indra/llmath/llvolume.cpp
+++ b/linden/indra/llmath/llvolume.cpp
@@ -461,6 +461,20 @@ F32 next_power_of_two(F32 value)
return pow(2.0f, power);
}
+F32 nearest_power_of_two(F32 value)
+{
+ // nearest in the linear sense means closest w/r/t a "halfway" point.
+ // in the exponential sense, the "halfway" point isn't 1/2, it's 1/sqrt(2).
+
+ // our windows build hates the math.h defines, so do it here. -qarl
+ F32 const INVSQRT2 = 0.7071067812f;
+
+ F32 answer = next_power_of_two(value * INVSQRT2);
+
+ // llwarns << value << " -> " << answer << llendl;
+
+ return answer;
+}
BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted)
@@ -605,7 +619,7 @@ BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted)
S32 sides = (S32)circle_detail;
if (is_sculpted)
- sides = (S32)next_power_of_two((F32)sides);
+ sides = (S32)nearest_power_of_two((F32)sides - 1);
genNGon(sides);
@@ -1152,7 +1166,7 @@ BOOL LLPath::generate(F32 detail, S32 split, BOOL is_sculpted)
S32 sides = (S32)llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * mParams.getRevolutions());
if (is_sculpted)
- sides = (S32)next_power_of_two((F32)sides);
+ sides = (S32)nearest_power_of_two((F32)sides - 1);
genNGon(sides);
}
@@ -1829,7 +1843,7 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
sNumMeshPoints += mMesh.size();
S32 vertex_change = 0;
- // first test to see if image has enough variation to create geometry
+ // first test to see if image has enough variation to create non-degenerate geometry
if (!data_is_empty)
{
S32 last_index = 0;
@@ -1855,12 +1869,13 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
if (fabs((F32)(sculpt_data[index] - sculpt_data[last_index])) +
fabs((F32)(sculpt_data[index+1] - sculpt_data[last_index+1])) +
- fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 256 * 0.02)
+ fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 0)
vertex_change++;
last_index = index;
}
- if ((F32)vertex_change / sizeS / sizeT < 0.05) // less than 5%
+
+ if ((F32)vertex_change / sizeS / sizeT < 0.02) // less than 2%
data_is_empty = TRUE;
}
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index f8b4c74..36d2e07 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -156,6 +156,7 @@ init ()
if (0 == llgst_init_check(NULL, NULL, NULL))
{
+ llwarns << "GST init failed for unspecified reason." << llendl;
return FALSE;
}
diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
index c00947f..26cefc0 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
+++ b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
@@ -38,5 +38,4 @@ LL_GST_SYM(true, gst_structure_get_name, G_CONST_RETURN gchar *, const GstStruct
// optional symbols to grab
LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled);
LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent);
-LL_GST_SYM(false, expected_to_be_missing, void, gboolean enabled);
LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug);
diff --git a/linden/indra/llmessage/llassetstorage.cpp b/linden/indra/llmessage/llassetstorage.cpp
index 8696438..b1d7fef 100644
--- a/linden/indra/llmessage/llassetstorage.cpp
+++ b/linden/indra/llmessage/llassetstorage.cpp
@@ -365,11 +365,11 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error)
LLAssetRequest* tmp = *curiter;
if (tmp->mUpCallback)
{
- tmp->mUpCallback(tmp->getUUID(), tmp->mUserData, error);
+ tmp->mUpCallback(tmp->getUUID(), tmp->mUserData, error, LL_EXSTAT_NONE);
}
if (tmp->mDownCallback)
{
- tmp->mDownCallback(mVFS, tmp->getUUID(), tmp->getType(), tmp->mUserData, error);
+ tmp->mDownCallback(mVFS, tmp->getUUID(), tmp->getType(), tmp->mUserData, error, LL_EXSTAT_NONE);
}
if (tmp->mInfoCallback)
{
@@ -390,7 +390,7 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType
///////////////////////////////////////////////////////////////////////////
// IW - uuid is passed by value to avoid side effects, please don't re-add &
-void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *,S32), void *user_data, BOOL is_priority)
+void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), void *user_data, BOOL is_priority)
{
lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
@@ -404,7 +404,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
// Special case early out for NULL uuid
if (callback)
{
- callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE);
+ callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID);
}
return;
}
@@ -459,7 +459,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
// unless there's a weird error
if (callback)
{
- callback(mVFS, uuid, type, user_data, LL_ERR_NOERR);
+ callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
}
}
@@ -502,7 +502,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at
llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
if (callback)
{
- callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE);
+ callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@@ -512,7 +512,7 @@ void LLAssetStorage::downloadCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data)
+ void* user_data, LLExtStat ext_status)
{
lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id
<< "," << LLAssetType::lookup(file_type) << llendl;
@@ -566,7 +566,7 @@ void LLAssetStorage::downloadCompleteCallback(
LLAssetRequest* tmp = *curiter;
if (tmp->mDownCallback)
{
- tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result);
+ tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result, ext_status);
}
delete tmp;
}
@@ -586,7 +586,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
// Special case early out for NULL uuid
if (callback)
{
- callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE);
+ callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID);
}
return;
}
@@ -642,7 +642,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
if (callback)
{
- callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE);
+ callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@@ -653,7 +653,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
// unless there's a weird error
if (callback)
{
- callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR);
+ callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
}
}
@@ -662,7 +662,8 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data)
+ void* user_data,
+ LLExtStat ext_status)
{
LLEstateAssetRequest *req = (LLEstateAssetRequest*)user_data;
if(!req)
@@ -693,7 +694,7 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback(
}
}
- req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result);
+ req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result, ext_status);
}
void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id,
@@ -777,7 +778,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
if (callback)
{
- callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE);
+ callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@@ -788,7 +789,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
// unless there's a weird error
if (callback)
{
- callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR);
+ callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
}
}
@@ -798,7 +799,8 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data)
+ void* user_data,
+ LLExtStat ext_status)
{
LLInvItemRequest *req = (LLInvItemRequest*)user_data;
if(!req)
@@ -828,7 +830,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
}
}
- req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result);
+ req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result, ext_status);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -836,7 +838,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// static
-void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, S32 result) // StoreAssetData callback (fixed)
+void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
if (!gAssetStorage)
{
@@ -876,10 +878,10 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat
msg->getBOOLFast(_PREHASH_AssetBlock, _PREHASH_Success, success);
asset_type = (LLAssetType::EType)asset_type_s8;
- this_ptr->_callUploadCallbacks(uuid, asset_type, success);
+ this_ptr->_callUploadCallbacks(uuid, asset_type, success, LL_EXSTAT_NONE);
}
-void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success)
+void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status )
{
// SJB: We process the callbacks in reverse order, I do not know if this is important,
// but I didn't want to mess with it.
@@ -913,7 +915,7 @@ void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType
LLAssetRequest* req = *curiter;
if (req->mUpCallback)
{
- req->mUpCallback(uuid, req->mUserData, (success ? LL_ERR_NOERR : LL_ERR_ASSET_REQUEST_FAILED ));
+ req->mUpCallback(uuid, req->mUserData, (success ? LL_ERR_NOERR : LL_ERR_ASSET_REQUEST_FAILED ), ext_status );
}
delete req;
}
@@ -1136,11 +1138,11 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::request_list_t* reques
// Run callbacks.
if (req->mUpCallback)
{
- req->mUpCallback(req->getUUID(), req->mUserData, error);
+ req->mUpCallback(req->getUUID(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED);
}
if (req->mDownCallback)
{
- req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error);
+ req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED);
}
if (req->mInfoCallback)
{
@@ -1193,7 +1195,7 @@ const char* LLAssetStorage::getErrorString(S32 status)
-void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32), void *user_data, BOOL is_priority)
+void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority)
{
// check for duplicates here, since we're about to fool the normal duplicate checker
for (request_list_t::iterator iter = mPendingDownloads.begin();
@@ -1223,7 +1225,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
}
// static
-void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 status)
+void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 status, LLExtStat ext_status)
{
LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data;
char filename[LL_MAX_PATH] = ""; /* Flawfinder: ignore */
@@ -1259,7 +1261,7 @@ void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAss
}
}
- legacy->mDownCallback(filename, uuid, legacy->mUserData, status);
+ legacy->mDownCallback(filename, uuid, legacy->mUserData, status, ext_status);
delete legacy;
}
@@ -1329,12 +1331,12 @@ void LLAssetStorage::storeAssetData(
}
// static
-void LLAssetStorage::legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status)
+void LLAssetStorage::legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status)
{
LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data;
if (legacy && legacy->mUpCallback)
{
- legacy->mUpCallback(uuid, legacy->mUserData, status);
+ legacy->mUpCallback(uuid, legacy->mUserData, status, ext_status);
}
delete legacy;
}
diff --git a/linden/indra/llmessage/llassetstorage.h b/linden/indra/llmessage/llassetstorage.h
index ab12b7a..630268d 100644
--- a/linden/indra/llmessage/llassetstorage.h
+++ b/linden/indra/llmessage/llassetstorage.h
@@ -40,6 +40,7 @@
#include "lltransfermanager.h" // For LLTSCode enum
#include "llassettype.h"
#include "llstring.h"
+#include "llextendedstatus.h"
// Forward declarations
class LLMessageSystem;
@@ -102,8 +103,8 @@ protected:
LLAssetType::EType mType;
public:
- void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32);
- void (*mUpCallback)(const LLUUID&, void *, S32);
+ void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
+ void (*mUpCallback)(const LLUUID&, void *, S32, LLExtStat);
void (*mInfoCallback)(LLAssetInfo *, void *, S32);
void *mUserData;
@@ -150,7 +151,7 @@ protected:
LLAssetType::EType mType;
public:
- void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32);
+ void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
void *mUserData;
LLHost mHost;
@@ -180,7 +181,7 @@ protected:
EstateAssetType mEstateAssetType;
public:
- void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32);
+ void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
void *mUserData;
LLHost mHost;
@@ -196,14 +197,14 @@ public:
typedef void (*LLGetAssetCallback)(LLVFS *vfs, const LLUUID &asset_id,
- LLAssetType::EType asset_type, void *user_data, S32 status);
+ LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status);
class LLAssetStorage
{
public:
// VFS member is public because static child methods need it :(
LLVFS *mVFS;
- typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status);
+ typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status, LLExtStat ext_status);
enum ERequestType
{
@@ -335,27 +336,27 @@ public:
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data);
+ void* user_data, LLExtStat ext_status);
static void downloadEstateAssetCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data);
+ void* user_data, LLExtStat ext_status);
static void downloadInvItemCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data);
+ void* user_data, LLExtStat ext_status);
// upload process callbacks
- static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result);
+ static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result, LLExtStat ext_status);
static void processUploadComplete(LLMessageSystem *msg, void **this_handle);
// debugging
static const char* getErrorString( S32 status );
// deprecated file-based methods
- void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32), void *user_data, BOOL is_priority = FALSE);
+ void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority = FALSE);
/*
* AssetID version.
@@ -385,8 +386,8 @@ public:
bool user_waiting = false,
F64 timeout = LL_ASSET_STORAGE_TIMEOUT);
- static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status);
- static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status);
+ static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status, LLExtStat ext_status);
+ static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status);
// Temp assets are stored on sim nodes, they have agent ID and location data associated with them.
// This is a no-op for non-http asset systems
@@ -404,10 +405,10 @@ public:
protected:
void _cleanupRequests(BOOL all, S32 error);
- void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success);
+ void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status);
virtual void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type,
- void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32),
+ void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data, BOOL duplicate,
BOOL is_priority);
@@ -425,7 +426,7 @@ private:
class LLLegacyAssetRequest
{
public:
- void (*mDownCallback)(const char *, const LLUUID&, void *, S32);
+ void (*mDownCallback)(const char *, const LLUUID&, void *, S32, LLExtStat);
LLAssetStorage::LLStoreAssetCallback mUpCallback;
void *mUserData;
diff --git a/linden/indra/llmessage/llcircuit.cpp b/linden/indra/llmessage/llcircuit.cpp
index 239c1df..3c947d9 100644
--- a/linden/indra/llmessage/llcircuit.cpp
+++ b/linden/indra/llmessage/llcircuit.cpp
@@ -1158,7 +1158,7 @@ std::ostream& operator<<(std::ostream& s, LLCircuitData& circuit)
s << S32(circuit.mBytesInLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f);
s << "/";
s << S32(circuit.mBytesOutLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f);
- s << " Peak Kbps: ";
+ s << " Peak kbps: ";
s << S32(circuit.mPeakBPSIn / 1024.f);
s << "/";
s << S32(circuit.mPeakBPSOut / 1024.f);
diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp
index b6c20b9..924d903 100644
--- a/linden/indra/llmessage/llhttpassetstorage.cpp
+++ b/linden/indra/llmessage/llhttpassetstorage.cpp
@@ -464,7 +464,7 @@ void LLHTTPAssetStorage::storeAssetData(
llwarns << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << llendl;
if (callback)
{
- callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE );
+ callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE);
}
}
}
@@ -529,7 +529,7 @@ void LLHTTPAssetStorage::storeAssetData(
{
if (callback)
{
- callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE);
+ callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE);
}
}
// Coverity CID-269 says there's a leak of 'legacy' here, but
@@ -631,7 +631,7 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
{
if (pending_req->mUpCallback) //Clean up here rather than _callUploadCallbacks because this request is already cleared the req.
{
- pending_req->mUpCallback(pending_req->getUUID(), pending_req->mUserData, -1);
+ pending_req->mUpCallback(pending_req->getUUID(), pending_req->mUserData, -1, LL_EXSTAT_REQUEST_DROPPED);
}
}
@@ -657,7 +657,7 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
// internal requester, used by getAssetData in superclass
void LLHTTPAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType type,
- void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32),
+ void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data, BOOL duplicate,
BOOL is_priority)
{
@@ -922,7 +922,7 @@ void LLHTTPAssetStorage::checkForTimeouts()
{
// shared upload finished callback
// in the base class, this is called from processUploadComplete
- _callUploadCallbacks(req->getUUID(), req->getType(), (xfer_result == 0));
+ _callUploadCallbacks(req->getUUID(), req->getType(), (xfer_result == 0), LL_EXSTAT_CURL_RESULT | curl_result);
// Pending upload flag will get cleared when the request is deleted
}
}
@@ -964,7 +964,8 @@ void LLHTTPAssetStorage::checkForTimeouts()
xfer_result,
req->getUUID(),
req->getType(),
- (void *)req);
+ (void *)req,
+ LL_EXSTAT_CURL_RESULT | curl_result);
// Pending download flag will get cleared when the request is deleted
}
else
@@ -1389,3 +1390,4 @@ void LLHTTPAssetStorage::clearTempAssetData()
mTempAssets.clear();
}
+
diff --git a/linden/indra/llmessage/llhttpassetstorage.h b/linden/indra/llmessage/llhttpassetstorage.h
index 962bece..7fee143 100644
--- a/linden/indra/llmessage/llhttpassetstorage.h
+++ b/linden/indra/llmessage/llhttpassetstorage.h
@@ -128,7 +128,7 @@ public:
protected:
void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type,
- void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32),
+ void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data, BOOL duplicate, BOOL is_priority);
private:
diff --git a/linden/indra/llmessage/llmessageconfig.cpp b/linden/indra/llmessage/llmessageconfig.cpp
index 6ecb1ad..a619e80 100644
--- a/linden/indra/llmessage/llmessageconfig.cpp
+++ b/linden/indra/llmessage/llmessageconfig.cpp
@@ -163,7 +163,7 @@ void LLMessageConfigFile::loadMessageBans(const LLSD& data)
bool LLMessageConfigFile::isCapBanned(const std::string& cap_name) const
{
- llinfos << "mCapBans is " << LLSDXMLStreamer(mCapBans) << llendl;
+ lldebugs << "mCapBans is " << LLSDNotationStreamer(mCapBans) << llendl;
return mCapBans[cap_name];
}
diff --git a/linden/indra/llmessage/llsdmessagebuilder.cpp b/linden/indra/llmessage/llsdmessagebuilder.cpp
index d3dcd5b..f8fb30e 100755
--- a/linden/indra/llmessage/llsdmessagebuilder.cpp
+++ b/linden/indra/llmessage/llsdmessagebuilder.cpp
@@ -276,7 +276,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data)
void LLSDMessageBuilder::copyFromLLSD(const LLSD& msg)
{
mCurrentMessage = msg;
- lldebugs << LLSDXMLStreamer(mCurrentMessage) << llendl;
+ lldebugs << LLSDNotationStreamer(mCurrentMessage) << llendl;
}
const LLSD& LLSDMessageBuilder::getMessage() const
diff --git a/linden/indra/llmessage/llteleportflags.h b/linden/indra/llmessage/llteleportflags.h
index 60916bd..a40b081 100644
--- a/linden/indra/llmessage/llteleportflags.h
+++ b/linden/indra/llmessage/llteleportflags.h
@@ -45,6 +45,7 @@ const U32 TELEPORT_FLAGS_DISABLE_CANCEL = 1 << 11; // Used for llTeleportAgentH
const U32 TELEPORT_FLAGS_VIA_REGION_ID = 1 << 12;
const U32 TELEPORT_FLAGS_IS_FLYING = 1 << 13;
const U32 TELEPORT_FLAGS_SHOW_RESET_HOME = 1 << 14;
+const U32 TELEPORT_FLAGS_FORCE_REDIRECT = 1 << 15; // used to force a redirect to some random location - used when kicking someone from land.
const U32 TELEPORT_FLAGS_MASK_VIA = TELEPORT_FLAGS_VIA_LURE
| TELEPORT_FLAGS_VIA_LANDMARK
diff --git a/linden/indra/llmessage/lltemplatemessagereader.cpp b/linden/indra/llmessage/lltemplatemessagereader.cpp
index 329d2a8..4cde483 100644
--- a/linden/indra/llmessage/lltemplatemessagereader.cpp
+++ b/linden/indra/llmessage/lltemplatemessagereader.cpp
@@ -502,12 +502,15 @@ BOOL LLTemplateMessageReader::decodeTemplate(
return(TRUE);
}
-void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host )
+void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted )
{
// we've run off the end of the packet!
llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName
// << " with id " << mCurrentRecvPacketID
<< " from " << host
+ << " trying to read " << wanted
+ << " bytes at position " << where
+ << " going past packet end at " << mReceiveSize
<< llendl;
if(gMessageSystem->mVerboseLog)
{
@@ -562,7 +565,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
// repeat number is a single byte
if (decode_pos >= mReceiveSize)
{
- logRanOffEndOfPacket(sender);
+ logRanOffEndOfPacket(sender, decode_pos, 1);
// default to 0 repeats
repeat_number = 0;
@@ -621,7 +624,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
if ((decode_pos + data_size) > mReceiveSize)
{
- logRanOffEndOfPacket(sender);
+ logRanOffEndOfPacket(sender, decode_pos, data_size);
// default to 0 length variable blocks
tsize = 0;
@@ -657,7 +660,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
// so, copy data pointer and set data size to fixed size
if ((decode_pos + mvci.getSize()) > mReceiveSize)
{
- logRanOffEndOfPacket(sender);
+ logRanOffEndOfPacket(sender, decode_pos, mvci.getSize());
// default to 0s.
U32 size = mvci.getSize();
diff --git a/linden/indra/llmessage/lltemplatemessagereader.h b/linden/indra/llmessage/lltemplatemessagereader.h
index 86d4ab6..687b75b 100644
--- a/linden/indra/llmessage/lltemplatemessagereader.h
+++ b/linden/indra/llmessage/lltemplatemessagereader.h
@@ -113,7 +113,7 @@ private:
BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs
LLMessageTemplate** msg_template ); // outputs
- void logRanOffEndOfPacket( const LLHost& host );
+ void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted );
BOOL decodeData(const U8* buffer, const LLHost& sender );
diff --git a/linden/indra/llmessage/lltransfersourceasset.cpp b/linden/indra/llmessage/lltransfersourceasset.cpp
index 31094c1..cfc7561 100644
--- a/linden/indra/llmessage/lltransfersourceasset.cpp
+++ b/linden/indra/llmessage/lltransfersourceasset.cpp
@@ -174,7 +174,7 @@ BOOL LLTransferSourceAsset::unpackParams(LLDataPacker &dp)
void LLTransferSourceAsset::responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type,
- void *user_data, S32 result)
+ void *user_data, S32 result, LLExtStat ext_status )
{
LLUUID *tidp = ((LLUUID*) user_data);
LLUUID transfer_id = *(tidp);
diff --git a/linden/indra/llmessage/lltransfersourceasset.h b/linden/indra/llmessage/lltransfersourceasset.h
index 7b1aa63..b953f78 100644
--- a/linden/indra/llmessage/lltransfersourceasset.h
+++ b/linden/indra/llmessage/lltransfersourceasset.h
@@ -59,7 +59,7 @@ public:
virtual ~LLTransferSourceAsset();
static void responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type,
- void *user_data, S32 result);
+ void *user_data, S32 result, LLExtStat ext_status );
protected:
/*virtual*/ void initTransfer();
/*virtual*/ F32 updatePriority();
diff --git a/linden/indra/llmessage/lltransfertargetvfile.cpp b/linden/indra/llmessage/lltransfertargetvfile.cpp
index 79919b8..6f2252d 100644
--- a/linden/indra/llmessage/lltransfertargetvfile.cpp
+++ b/linden/indra/llmessage/lltransfertargetvfile.cpp
@@ -215,6 +215,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status)
mParams.mCompleteCallback(err_code,
mParams.getAssetID(),
mParams.getAssetType(),
- mParams.mUserDatap);
+ mParams.mUserDatap,
+ LL_EXSTAT_NONE);
}
}
diff --git a/linden/indra/llmessage/lltransfertargetvfile.h b/linden/indra/llmessage/lltransfertargetvfile.h
index 6ba8745..98fcbc9 100644
--- a/linden/indra/llmessage/lltransfertargetvfile.h
+++ b/linden/indra/llmessage/lltransfertargetvfile.h
@@ -41,7 +41,7 @@ typedef void (*LLTTVFCompleteCallback)(
S32 status,
const LLUUID& file_id,
LLAssetType::EType file_type,
- void* user_data);
+ void* user_data, LLExtStat ext_status );
class LLTransferTargetParamsVFile : public LLTransferTargetParams
{
diff --git a/linden/indra/llmessage/llxfer.cpp b/linden/indra/llmessage/llxfer.cpp
index e12996d..4647980 100644
--- a/linden/indra/llmessage/llxfer.cpp
+++ b/linden/indra/llmessage/llxfer.cpp
@@ -301,7 +301,7 @@ S32 LLXfer::processEOF()
if (mCallback)
{
- mCallback(mCallbackDataHandle,mCallbackResult);
+ mCallback(mCallbackDataHandle,mCallbackResult,LL_EXSTAT_NONE);
}
return(retval);
@@ -375,3 +375,4 @@ std::ostream& operator<< (std::ostream& os, LLXfer &hh)
+
diff --git a/linden/indra/llmessage/llxfer.h b/linden/indra/llmessage/llxfer.h
index 51d7731..de93dba 100644
--- a/linden/indra/llmessage/llxfer.h
+++ b/linden/indra/llmessage/llxfer.h
@@ -67,7 +67,7 @@ class LLXfer
BOOL mWaitingForACK;
- void (*mCallback)(void **,S32);
+ void (*mCallback)(void **,S32,LLExtStat);
void **mCallbackDataHandle;
S32 mCallbackResult;
@@ -116,3 +116,4 @@ class LLXfer
+
diff --git a/linden/indra/llmessage/llxfer_file.cpp b/linden/indra/llmessage/llxfer_file.cpp
index b36dd5a..7478316 100644
--- a/linden/indra/llmessage/llxfer_file.cpp
+++ b/linden/indra/llmessage/llxfer_file.cpp
@@ -123,7 +123,7 @@ S32 LLXfer_File::initializeRequest(U64 xfer_id,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void**,S32),
+ void (*callback)(void**,S32,LLExtStat),
void** user_data)
{
S32 retval = 0; // presume success
diff --git a/linden/indra/llmessage/llxfer_file.h b/linden/indra/llmessage/llxfer_file.h
index 6a9ee51..4d34acb 100644
--- a/linden/indra/llmessage/llxfer_file.h
+++ b/linden/indra/llmessage/llxfer_file.h
@@ -60,7 +60,7 @@ class LLXfer_File : public LLXfer
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void**,S32),
+ void (*callback)(void**,S32,LLExtStat),
void** user_data);
virtual S32 startDownload();
@@ -86,3 +86,4 @@ class LLXfer_File : public LLXfer
+
diff --git a/linden/indra/llmessage/llxfer_mem.cpp b/linden/indra/llmessage/llxfer_mem.cpp
index 0f055c8..223ce08 100644
--- a/linden/indra/llmessage/llxfer_mem.cpp
+++ b/linden/indra/llmessage/llxfer_mem.cpp
@@ -136,7 +136,7 @@ S32 LLXfer_Mem::processEOF()
if (mCallback)
{
- mCallback((void *)mBuffer,mBufferLength,mCallbackDataHandle,mCallbackResult);
+ mCallback((void *)mBuffer,mBufferLength,mCallbackDataHandle,mCallbackResult,LL_EXSTAT_NONE);
}
return(retval);
@@ -149,7 +149,7 @@ S32 LLXfer_Mem::initializeRequest(U64 xfer_id,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void*,S32,void**,S32),
+ void (*callback)(void*,S32,void**,S32,LLExtStat),
void** user_data)
{
S32 retval = 0; // presume success
@@ -218,3 +218,4 @@ U32 LLXfer_Mem::getXferTypeTag()
+
diff --git a/linden/indra/llmessage/llxfer_mem.h b/linden/indra/llmessage/llxfer_mem.h
index b80807a..8523c7d 100644
--- a/linden/indra/llmessage/llxfer_mem.h
+++ b/linden/indra/llmessage/llxfer_mem.h
@@ -40,7 +40,7 @@ class LLXfer_Mem : public LLXfer
{
private:
protected:
- void (*mCallback)(void *, S32, void **,S32);
+ void (*mCallback)(void *, S32, void **, S32, LLExtStat);
char mRemoteFilename[LL_MAX_PATH]; /* Flawfinder : ignore */
ELLPath mRemotePath;
BOOL mDeleteRemoteOnCompletion;
@@ -65,7 +65,7 @@ class LLXfer_Mem : public LLXfer
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void*,S32,void**,S32),
+ void (*callback)(void*,S32,void**,S32,LLExtStat),
void** user_data);
virtual S32 startDownload();
@@ -79,3 +79,4 @@ class LLXfer_Mem : public LLXfer
+
diff --git a/linden/indra/llmessage/llxfer_vfile.cpp b/linden/indra/llmessage/llxfer_vfile.cpp
index 0d0d5fe..54b9683 100644
--- a/linden/indra/llmessage/llxfer_vfile.cpp
+++ b/linden/indra/llmessage/llxfer_vfile.cpp
@@ -98,7 +98,7 @@ S32 LLXfer_VFile::initializeRequest(U64 xfer_id,
const LLUUID& remote_id,
LLAssetType::EType type,
const LLHost& remote_host,
- void (*callback)(void**,S32),
+ void (*callback)(void**,S32,LLExtStat),
void** user_data)
{
S32 retval = 0; // presume success
diff --git a/linden/indra/llmessage/llxfer_vfile.h b/linden/indra/llmessage/llxfer_vfile.h
index e71a0e8..1362749 100644
--- a/linden/indra/llmessage/llxfer_vfile.h
+++ b/linden/indra/llmessage/llxfer_vfile.h
@@ -65,7 +65,7 @@ class LLXfer_VFile : public LLXfer
const LLUUID &remote_id,
const LLAssetType::EType type,
const LLHost &remote_host,
- void (*callback)(void **,S32),
+ void (*callback)(void **,S32,LLExtStat),
void **user_data);
virtual S32 startDownload();
@@ -92,3 +92,4 @@ class LLXfer_VFile : public LLXfer
+
diff --git a/linden/indra/llmessage/llxfermanager.cpp b/linden/indra/llmessage/llxfermanager.cpp
index 7758a32..b9a2c3e 100644
--- a/linden/indra/llmessage/llxfermanager.cpp
+++ b/linden/indra/llmessage/llxfermanager.cpp
@@ -396,7 +396,7 @@ void LLXferManager::requestFile(const char* local_filename,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void**,S32),
+ void (*callback)(void**,S32,LLExtStat),
void** user_data,
BOOL is_priority,
BOOL use_big_packets)
@@ -453,7 +453,7 @@ void LLXferManager::requestFile(const char* remote_filename,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void*,S32,void**,S32),
+ void (*callback)(void*,S32,void**,S32,LLExtStat),
void** user_data,
BOOL is_priority)
{
@@ -481,7 +481,7 @@ void LLXferManager::requestVFile(const LLUUID& local_id,
const LLUUID& remote_id,
LLAssetType::EType type, LLVFS* vfs,
const LLHost& remote_host,
- void (*callback)(void**, S32),
+ void (*callback)(void**,S32,LLExtStat),
void** user_data,
BOOL is_priority)
{
@@ -1151,3 +1151,4 @@ void process_abort_xfer(LLMessageSystem *mesgsys, void **user_data)
+
diff --git a/linden/indra/llmessage/llxfermanager.h b/linden/indra/llmessage/llxfermanager.h
index 7b529ad..62969d9 100644
--- a/linden/indra/llmessage/llxfermanager.h
+++ b/linden/indra/llmessage/llxfermanager.h
@@ -145,7 +145,7 @@ class LLXferManager
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void**,S32), void** user_data,
+ void (*callback)(void**,S32,LLExtStat), void** user_data,
BOOL is_priority = FALSE,
BOOL use_big_packets = FALSE);
@@ -154,7 +154,7 @@ class LLXferManager
ELLPath remote_path,
const LLHost &remote_host,
BOOL delete_remote_on_completion,
- void (*callback)(void*, S32, void**, S32),
+ void (*callback)(void*, S32, void**, S32, LLExtStat),
void** user_data,
BOOL is_priority = FALSE);
@@ -163,7 +163,7 @@ class LLXferManager
virtual void requestVFile(const LLUUID &local_id, const LLUUID& remote_id,
LLAssetType::EType type, LLVFS* vfs,
const LLHost& remote_host,
- void (*callback)(void**, S32), void** user_data,
+ void (*callback)(void**,S32,LLExtStat), void** user_data,
BOOL is_priority = FALSE);
/*
@@ -205,3 +205,4 @@ void process_abort_xfer (LLMessageSystem *mesgsys, void **user_data);
#endif
+
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp
index a9d5dd3..70b8166 100644
--- a/linden/indra/llmessage/message.cpp
+++ b/linden/indra/llmessage/message.cpp
@@ -2134,7 +2134,7 @@ void LLMessageSystem::dispatch(
}
// enable this for output of message names
//llinfos << "< \"" << msg_name << "\"" << llendl;
- //lldebugs << "data: " << LLSDXMLStreamer(message) << llendl;
+ //lldebugs << "data: " << LLSDNotationStreamer(message) << llendl;
handler->post(responsep, context, message);
}
diff --git a/linden/indra/llmessage/message_prehash.cpp b/linden/indra/llmessage/message_prehash.cpp
index fbe5c33..ce532e1 100644
--- a/linden/indra/llmessage/message_prehash.cpp
+++ b/linden/indra/llmessage/message_prehash.cpp
@@ -305,6 +305,7 @@ char * _PREHASH_LogFailedMoneyTransaction;
char * _PREHASH_ViewerStartAuction;
char * _PREHASH_StartAuction;
char * _PREHASH_DuplicateFlags;
+char * _PREHASH_RegionInfo2;
char * _PREHASH_TextColor;
char * _PREHASH_SlaveID;
char * _PREHASH_Charter;
@@ -670,9 +671,9 @@ char * _PREHASH_PreyAgent;
char * _PREHASH_SimStats;
char * _PREHASH_LogoutReply;
char * _PREHASH_FeatureDisabled;
+char * _PREHASH_PhysicalAvatarEventList;
char * _PREHASH_ObjectLocalID;
char * _PREHASH_Dropped;
-char * _PREHASH_PhysicalAvatarEventList;
char * _PREHASH_WebProfilesDisabled;
char * _PREHASH_Destination;
char * _PREHASH_MasterID;
@@ -1637,6 +1638,7 @@ void init_prehash_data()
_PREHASH_ViewerStartAuction = gMessageStringTable.getString("ViewerStartAuction");
_PREHASH_StartAuction = gMessageStringTable.getString("StartAuction");
_PREHASH_DuplicateFlags = gMessageStringTable.getString("DuplicateFlags");
+ _PREHASH_RegionInfo2 = gMessageStringTable.getString("RegionInfo2");
_PREHASH_TextColor = gMessageStringTable.getString("TextColor");
_PREHASH_SlaveID = gMessageStringTable.getString("SlaveID");
_PREHASH_Charter = gMessageStringTable.getString("Charter");
@@ -2002,9 +2004,9 @@ void init_prehash_data()
_PREHASH_SimStats = gMessageStringTable.getString("SimStats");
_PREHASH_LogoutReply = gMessageStringTable.getString("LogoutReply");
_PREHASH_FeatureDisabled = gMessageStringTable.getString("FeatureDisabled");
+ _PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList");
_PREHASH_ObjectLocalID = gMessageStringTable.getString("ObjectLocalID");
_PREHASH_Dropped = gMessageStringTable.getString("Dropped");
- _PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList");
_PREHASH_WebProfilesDisabled = gMessageStringTable.getString("WebProfilesDisabled");
_PREHASH_Destination = gMessageStringTable.getString("Destination");
_PREHASH_MasterID = gMessageStringTable.getString("MasterID");
diff --git a/linden/indra/llmessage/message_prehash.h b/linden/indra/llmessage/message_prehash.h
index b75edca..672cd14 100644
--- a/linden/indra/llmessage/message_prehash.h
+++ b/linden/indra/llmessage/message_prehash.h
@@ -305,6 +305,7 @@ extern char * _PREHASH_LogFailedMoneyTransaction;
extern char * _PREHASH_ViewerStartAuction;
extern char * _PREHASH_StartAuction;
extern char * _PREHASH_DuplicateFlags;
+extern char * _PREHASH_RegionInfo2;
extern char * _PREHASH_TextColor;
extern char * _PREHASH_SlaveID;
extern char * _PREHASH_Charter;
@@ -670,9 +671,9 @@ extern char * _PREHASH_PreyAgent;
extern char * _PREHASH_SimStats;
extern char * _PREHASH_LogoutReply;
extern char * _PREHASH_FeatureDisabled;
+extern char * _PREHASH_PhysicalAvatarEventList;
extern char * _PREHASH_ObjectLocalID;
extern char * _PREHASH_Dropped;
-extern char * _PREHASH_PhysicalAvatarEventList;
extern char * _PREHASH_WebProfilesDisabled;
extern char * _PREHASH_Destination;
extern char * _PREHASH_MasterID;
diff --git a/linden/indra/llprimitive/lltextureentry.cpp b/linden/indra/llprimitive/lltextureentry.cpp
index 4f329f2..73ecd96 100644
--- a/linden/indra/llprimitive/lltextureentry.cpp
+++ b/linden/indra/llprimitive/lltextureentry.cpp
@@ -109,7 +109,8 @@ bool LLTextureEntry::operator!=(const LLTextureEntry &rhs) const
if (mRotation != rhs.mRotation) return(true);
if (mColor != rhs.mColor) return (true);
if (mBump != rhs.mBump) return (true);
- if (mMediaFlags != rhs.mMediaFlags) return true;
+ if (mMediaFlags != rhs.mMediaFlags) return (true);
+ if (mGlow != rhs.mGlow) return (true);
return(false);
}
@@ -124,6 +125,7 @@ bool LLTextureEntry::operator==(const LLTextureEntry &rhs) const
if (mColor != rhs.mColor) return (false);
if (mBump != rhs.mBump) return (false);
if (mMediaFlags != rhs.mMediaFlags) return false;
+ if (mGlow != rhs.mGlow) return false;
return(true);
}
@@ -141,7 +143,8 @@ LLSD LLTextureEntry::asLLSD() const
sd["bump"] = getBumpShiny();
sd["fullbright"] = getFullbright();
sd["media_flags"] = getMediaTexGen();
-
+ sd["glow"] = getGlow();
+
return sd;
}
@@ -190,6 +193,11 @@ bool LLTextureEntry::fromLLSD(LLSD& sd)
{
setMediaTexGen( sd[w].asInteger() );
} else goto fail;
+ w = "glow";
+ if (sd.has(w))
+ {
+ setGlow((F32)sd[w].asReal() );
+ }
return true;
fail:
diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp
index aa50a6e..6ed6885 100644
--- a/linden/indra/llui/llbutton.cpp
+++ b/linden/indra/llui/llbutton.cpp
@@ -89,8 +89,7 @@ LLButton::LLButton( const LLString& name, const LLRect& rect, const LLString& co
mCurGlowStrength(0.f),
mNeedsHighlight(FALSE),
mCommitOnReturn(TRUE),
- mImagep( NULL ),
- mIsDirty( FALSE )
+ mImagep( NULL )
{
mUnselectedLabel = name;
mSelectedLabel = name;
@@ -275,8 +274,6 @@ void LLButton::onCommit()
{
(*mClickedCallback)( mCallbackUserData );
}
-
- mIsDirty = TRUE;
}
@@ -291,7 +288,6 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent)
(*mClickedCallback)( mCallbackUserData );
}
handled = TRUE;
- mIsDirty = TRUE;
}
return handled;
}
@@ -308,7 +304,6 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent )
(*mClickedCallback)( mCallbackUserData );
}
handled = TRUE;
- mIsDirty = TRUE;
}
}
return handled;
@@ -368,9 +363,7 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
if (mClickedCallback)
{
(*mClickedCallback)( mCallbackUserData );
- }
-
- mIsDirty = TRUE;
+ }
}
mMouseDownTimer.stop();
@@ -773,7 +766,6 @@ void LLButton::setToggleState(BOOL b)
void LLButton::setValue(const LLSD& value )
{
mToggleState = value.asBoolean();
- mIsDirty = FALSE;
}
LLSD LLButton::getValue() const
diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h
index aedc411..d26011b 100644
--- a/linden/indra/llui/llbutton.h
+++ b/linden/indra/llui/llbutton.h
@@ -100,8 +100,6 @@ public:
// HACK: "committing" a button is the same as clicking on it.
virtual void onCommit();
- virtual BOOL isDirty() { return mIsDirty; }; // Returns TRUE if the user has clicked on the button at all
-
void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
@@ -279,8 +277,6 @@ protected:
LLPointer mImagep;
- BOOL mIsDirty;
-
static LLFrameTimer sFlashingTimer;
};
diff --git a/linden/indra/llui/llcheckboxctrl.cpp b/linden/indra/llui/llcheckboxctrl.cpp
index 24cf680..f49e220 100644
--- a/linden/indra/llui/llcheckboxctrl.cpp
+++ b/linden/indra/llui/llcheckboxctrl.cpp
@@ -59,7 +59,8 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect,
mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ),
mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ),
mRadioStyle( use_radio_style ),
- mInitialValue( initial_value )
+ mInitialValue( initial_value ),
+ mSetValue( initial_value )
{
if (font)
{
@@ -228,7 +229,8 @@ void LLCheckBoxCtrl::draw()
//virtual
void LLCheckBoxCtrl::setValue(const LLSD& value )
{
- mButton->setToggleState( value.asBoolean() );
+ mSetValue = value.asBoolean();
+ mButton->setToggleState( mSetValue );
}
//virtual
@@ -269,16 +271,27 @@ void LLCheckBoxCtrl::setControlName(const LLString& control_name, LLView* contex
// virtual Returns TRUE if the user has modified this control.
-BOOL LLCheckBoxCtrl::isDirty()
+BOOL LLCheckBoxCtrl::isDirty() const
{
if ( mButton )
{
- return mButton->isDirty();
+ return (mSetValue != mButton->getToggleState());
}
return FALSE; // Shouldn't get here
}
+// virtual Clear dirty state
+void LLCheckBoxCtrl::resetDirty()
+{
+ if ( mButton )
+ {
+ mSetValue = mButton->getToggleState();
+ }
+}
+
+
+
// virtual
LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const
{
diff --git a/linden/indra/llui/llcheckboxctrl.h b/linden/indra/llui/llcheckboxctrl.h
index 37b1330..6aa7113 100644
--- a/linden/indra/llui/llcheckboxctrl.h
+++ b/linden/indra/llui/llcheckboxctrl.h
@@ -110,7 +110,8 @@ public:
static void onButtonPress(void *userdata);
- virtual BOOL isDirty(); // Returns TRUE if the user has modified this control.
+ virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control.
+ virtual void resetDirty(); // Clear dirty state
protected:
// note: value is stored in toggle state of button
@@ -120,7 +121,8 @@ protected:
LLColor4 mTextEnabledColor;
LLColor4 mTextDisabledColor;
BOOL mRadioStyle;
- BOOL mInitialValue;
+ BOOL mInitialValue; // Value set in constructor
+ BOOL mSetValue; // Value set programmatically
BOOL mKeyboardFocusOnClick;
LLViewBorder* mBorder;
};
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp
index 27df619..b71d88f 100644
--- a/linden/indra/llui/llcombobox.cpp
+++ b/linden/indra/llui/llcombobox.cpp
@@ -247,6 +247,27 @@ void LLComboBox::onCommit()
LLUICtrl::onCommit();
}
+// virtual
+BOOL LLComboBox::isDirty() const
+{
+ BOOL grubby = FALSE;
+ if ( mList )
+ {
+ grubby = mList->isDirty();
+ }
+ return grubby;
+}
+
+// virtual Clear dirty state
+void LLComboBox::resetDirty()
+{
+ if ( mList )
+ {
+ mList->resetDirty();
+ }
+}
+
+
// add item "name" to menu
void LLComboBox::add(const LLString& name, EAddPosition pos, BOOL enabled)
{
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h
index d77224a..1589c30 100644
--- a/linden/indra/llui/llcombobox.h
+++ b/linden/indra/llui/llcombobox.h
@@ -88,6 +88,8 @@ public:
virtual void clear(); // select nothing
virtual void onCommit();
virtual BOOL acceptsTextInput() const { return mAllowTextEntry; }
+ virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control.
+ virtual void resetDirty(); // Clear dirty state
virtual void setFocus(BOOL b);
@@ -147,7 +149,7 @@ public:
virtual BOOL getCanSelect() const { return TRUE; }
virtual BOOL selectFirstItem() { return setCurrentByIndex(0); }
virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); }
- virtual S32 getFirstSelectedIndex() { return getCurrentIndex(); }
+ virtual S32 getFirstSelectedIndex() const { return getCurrentIndex(); }
virtual BOOL setCurrentByID( const LLUUID& id );
virtual LLUUID getCurrentID(); // LLUUID::null if no items in menu
virtual BOOL setSelectedByValue(LLSD value, BOOL selected);
diff --git a/linden/indra/llui/llctrlselectioninterface.h b/linden/indra/llui/llctrlselectioninterface.h
index e21f039..237aa94 100644
--- a/linden/indra/llui/llctrlselectioninterface.h
+++ b/linden/indra/llui/llctrlselectioninterface.h
@@ -56,7 +56,7 @@ public:
virtual BOOL selectFirstItem() = 0;
virtual BOOL selectNthItem( S32 index ) = 0;
- virtual S32 getFirstSelectedIndex() = 0;
+ virtual S32 getFirstSelectedIndex() const = 0;
// TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function
virtual BOOL setCurrentByID( const LLUUID& id ) = 0;
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index b45661f..77fddfb 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -1252,10 +1252,13 @@ BOOL LLFloater::getEditModeEnabled()
//static
void LLFloater::show(LLFloater* floaterp)
{
- if (floaterp) floaterp->open();
- if (floaterp->getHost())
+ if (floaterp)
{
- floaterp->getHost()->open();
+ floaterp->open();
+ if (floaterp->getHost())
+ {
+ floaterp->getHost()->open();
+ }
}
}
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index 98286fa..dca62d7 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -138,6 +138,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect,
mSelectionEnd( 0 ),
mLastSelectionX(-1),
mLastSelectionY(-1),
+ mLastSelectionStart(-1),
+ mLastSelectionEnd(-1),
mPrevalidateFunc( prevalidate_func ),
mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ),
mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ),
@@ -247,6 +249,19 @@ void LLLineEditor::onCommit()
selectAll();
}
+// virtual
+BOOL LLLineEditor::isDirty() const
+{
+ return ( mText.getString() != mPrevText );
+}
+
+// virtual
+void LLLineEditor::resetDirty()
+{
+ mPrevText = mText.getString();
+}
+
+
// line history support
void LLLineEditor::updateHistory()
{
@@ -468,8 +483,38 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
}
else
{
- // otherwise select everything
- selectAll();
+ const LLWString& wtext = mText.getWString();
+
+ BOOL doSelectAll = TRUE;
+
+ // Select the word we're on
+ if( isPartOfWord( wtext[mCursorPos] ) )
+ {
+ S32 old_selection_start = mLastSelectionStart;
+ S32 old_selection_end = mLastSelectionEnd;
+
+ // Select word the cursor is over
+ while ((mCursorPos > 0) && isPartOfWord( wtext[mCursorPos-1] ))
+ { // Find the start of the word
+ mCursorPos--;
+ }
+ startSelection();
+
+ while ((mCursorPos < (S32)wtext.length()) && isPartOfWord( wtext[mCursorPos] ) )
+ { // Find the end of the word
+ mCursorPos++;
+ }
+ mSelectionEnd = mCursorPos;
+
+ // If nothing changed, then the word was already selected. Select the whole line.
+ doSelectAll = (old_selection_start == mSelectionStart) &&
+ (old_selection_end == mSelectionEnd);
+ }
+
+ if ( doSelectAll )
+ { // Select everything
+ selectAll();
+ }
}
// We don't want handleMouseUp() to "finish" the selection (and thereby
@@ -496,6 +541,9 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
}
else
{
+ mLastSelectionStart = -1;
+ mLastSelectionStart = -1;
+
setFocus( TRUE );
if (mask & MASK_SHIFT)
@@ -539,6 +587,10 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
}
else
{
+ // Save selection for word/line selecting on double-click
+ mLastSelectionStart = mSelectionStart;
+ mLastSelectionEnd = mSelectionEnd;
+
// Move cursor and deselect for regular click
setCursorAtLocalPos( x );
deselect();
diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h
index 5ff2de7..04c53b4 100644
--- a/linden/indra/llui/lllineeditor.h
+++ b/linden/indra/llui/lllineeditor.h
@@ -127,7 +127,8 @@ public:
virtual void setRect(const LLRect& rect);
virtual BOOL acceptsTextInput() const;
virtual void onCommit();
- virtual BOOL isDirty() { return ( mText.getString() != mPrevText ); }; // Returns TRUE if the user has changed value at all
+ virtual BOOL isDirty() const; // Returns TRUE if the user has changed value at all
+ virtual void resetDirty(); // Clear dirty state
// assumes UTF8 text
virtual void setValue(const LLSD& value );
@@ -257,6 +258,8 @@ protected:
S32 mSelectionEnd;
S32 mLastSelectionX;
S32 mLastSelectionY;
+ S32 mLastSelectionStart;
+ S32 mLastSelectionEnd;
S32 (*mPrevalidateFunc)(const LLWString &str);
diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h
index 3dec41d..5b3e4db 100644
--- a/linden/indra/llui/llradiogroup.h
+++ b/linden/indra/llui/llradiogroup.h
@@ -115,7 +115,7 @@ public:
/*virtual*/ BOOL getCanSelect() const { return TRUE; }
/*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); }
/*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); }
- /*virtual*/ S32 getFirstSelectedIndex() { return getSelectedIndex(); }
+ /*virtual*/ S32 getFirstSelectedIndex() const { return getSelectedIndex(); }
/*virtual*/ BOOL setCurrentByID( const LLUUID& id );
/*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu
/*virtual*/ BOOL setSelectedByValue(LLSD value, BOOL selected);
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp
index 56a6a22..9e1a573 100644
--- a/linden/indra/llui/llscrolllistctrl.cpp
+++ b/linden/indra/llui/llscrolllistctrl.cpp
@@ -447,6 +447,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect,
mSortColumn(-1),
mSortAscending(TRUE),
mSorted(TRUE),
+ mDirty(FALSE),
+ mOriginalSelection(-1),
mDrewSelected(FALSE)
{
mItemListRect.setOriginAndSize(
@@ -535,6 +537,7 @@ void LLScrollListCtrl::clearRows()
mScrollLines = 0;
mLastSelected = NULL;
updateMaxContentWidth(NULL);
+ mDirty = FALSE;
}
@@ -567,10 +570,10 @@ std::vector LLScrollListCtrl::getAllSelected() const
return ret;
}
-S32 LLScrollListCtrl::getFirstSelectedIndex()
+S32 LLScrollListCtrl::getFirstSelectedIndex() const
{
S32 CurSelectedIndex = 0;
- item_list::iterator iter;
+ item_list::const_iterator iter;
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{
LLScrollListItem* item = *iter;
@@ -885,6 +888,7 @@ BOOL LLScrollListCtrl::selectFirstItem()
selectItem(itemp);
}
success = TRUE;
+ mOriginalSelection = 0;
}
else
{
@@ -918,6 +922,7 @@ BOOL LLScrollListCtrl::selectNthItem( S32 target_index )
{
selectItem(itemp);
success = TRUE;
+ mOriginalSelection = target_index;
}
}
else
@@ -1741,6 +1746,7 @@ BOOL LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
// always commit when mouse operation is completed inside list
if (mItemListRect.pointInRect(x,y))
{
+ mDirty |= mSelectionChanged;
mSelectionChanged = FALSE;
onCommit();
}
@@ -2141,6 +2147,7 @@ void LLScrollListCtrl::commitIfChanged()
{
if (mSelectionChanged)
{
+ mDirty = TRUE;
mSelectionChanged = FALSE;
onCommit();
}
@@ -2999,6 +3006,26 @@ void LLScrollListCtrl::setFocus(BOOL b)
LLUICtrl::setFocus(b);
}
+
+// virtual
+BOOL LLScrollListCtrl::isDirty() const
+{
+ BOOL grubby = mDirty;
+ if ( !mAllowMultipleSelection )
+ {
+ grubby = (mOriginalSelection != getFirstSelectedIndex());
+ }
+ return grubby;
+}
+
+// Clear dirty state
+void LLScrollListCtrl::resetDirty()
+{
+ mDirty = FALSE;
+ mOriginalSelection = getFirstSelectedIndex();
+}
+
+
//virtual
void LLScrollListCtrl::onFocusReceived()
{
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h
index 809c528..2e4dad5 100644
--- a/linden/indra/llui/llscrolllistctrl.h
+++ b/linden/indra/llui/llscrolllistctrl.h
@@ -460,7 +460,7 @@ public:
LLUUID getStringUUIDSelectedItem();
LLScrollListItem* getFirstSelected() const;
- virtual S32 getFirstSelectedIndex();
+ virtual S32 getFirstSelectedIndex() const;
std::vector getAllSelected() const;
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
@@ -515,6 +515,9 @@ public:
virtual void onFocusReceived();
virtual void onFocusLost();
+ virtual BOOL isDirty() const;
+ virtual void resetDirty(); // Clear dirty state
+
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual void arrange(S32 max_width, S32 max_height);
virtual LLRect getRequiredRect();
@@ -658,6 +661,9 @@ protected:
std::map mColumns;
std::vector mColumnsIndexed;
+ BOOL mDirty;
+ S32 mOriginalSelection;
+
public:
// HACK: Did we draw one selected item this frame?
BOOL mDrewSelected;
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index f49b2db..552a9c9 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -354,6 +354,8 @@ LLTextEditor::LLTextEditor(
appendText(default_text, FALSE, FALSE);
+ resetDirty(); // Update saved text state
+
mParseHTML=FALSE;
mHTML="";
}
@@ -529,6 +531,8 @@ void LLTextEditor::setText(const LLString &utf8str)
updateLineStartList();
updateScrollFromCursor();
+
+ resetDirty();
}
void LLTextEditor::setWText(const LLWString &wtext)
@@ -545,6 +549,8 @@ void LLTextEditor::setWText(const LLWString &wtext)
updateLineStartList();
updateScrollFromCursor();
+
+ resetDirty();
}
void LLTextEditor::setValue(const LLSD& value)
@@ -3447,6 +3453,7 @@ void LLTextEditor::appendText(const LLString &new_text, bool allow_undo, bool pr
BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax());
S32 selection_start = mSelectionStart;
S32 selection_end = mSelectionEnd;
+ BOOL was_selecting = mIsSelecting;
S32 cursor_pos = mCursorPos;
S32 old_length = getLength();
BOOL cursor_was_at_end = (mCursorPos == old_length);
@@ -3479,17 +3486,23 @@ void LLTextEditor::appendText(const LLString &new_text, bool allow_undo, bool pr
updateLineStartList(old_length);
// Set the cursor and scroll position
- // Maintain the scroll position unless the scroll was at the end of the doc
- // (in which case, move it to the new end of the doc)
- if( was_scrolled_to_bottom )
+ // Maintain the scroll position unless the scroll was at the end of the doc (in which
+ // case, move it to the new end of the doc) or unless the user was doing actively selecting
+ if( was_scrolled_to_bottom && !was_selecting )
{
+ if( selection_start != selection_end )
+ {
+ // maintain an existing non-active selection
+ mSelectionStart = selection_start;
+ mSelectionEnd = selection_end;
+ }
endOfDoc();
}
else if( selection_start != selection_end )
{
mSelectionStart = selection_start;
-
mSelectionEnd = selection_end;
+ mIsSelecting = was_selecting;
setCursorPos(cursor_pos);
}
else if( cursor_was_at_end )
@@ -3626,6 +3639,11 @@ BOOL LLTextEditor::tryToRevertToPristineState()
return isPristine(); // TRUE => success
}
+// virtual Return TRUE if changes have been made
+BOOL LLTextEditor::isDirty() const
+{
+ return( mLastCmd != NULL || (mPristineCmd && (mPristineCmd != mLastCmd)) );
+}
void LLTextEditor::updateTextRect()
diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h
index 68c1d4a..4bcfcfc 100644
--- a/linden/indra/llui/lltexteditor.h
+++ b/linden/indra/llui/lltexteditor.h
@@ -109,6 +109,7 @@ public:
virtual void clear();
virtual void setFocus( BOOL b );
virtual BOOL acceptsTextInput() const;
+ virtual BOOL isDirty() const;
// LLEditMenuHandler interface
virtual void undo();
diff --git a/linden/indra/llui/lluictrl.h b/linden/indra/llui/lluictrl.h
index 2060a0d..455a8c0 100644
--- a/linden/indra/llui/lluictrl.h
+++ b/linden/indra/llui/lluictrl.h
@@ -149,7 +149,9 @@ public:
};
// Returns TRUE if the user has modified this control. Editable controls should override this.
- virtual BOOL isDirty() { return FALSE; };
+ virtual BOOL isDirty() const { return FALSE; };
+ // Clear the dirty state
+ virtual void resetDirty() {};
protected:
virtual void onFocusReceived();
diff --git a/linden/indra/llvfs/lldir_mac.cpp b/linden/indra/llvfs/lldir_mac.cpp
index d257ce0..db6e20d 100644
--- a/linden/indra/llvfs/lldir_mac.cpp
+++ b/linden/indra/llvfs/lldir_mac.cpp
@@ -176,11 +176,7 @@ LLDir_Mac::LLDir_Mac()
FSRefToLLString(&tempRef, mTempDir);
}
- // Set the working dir to /Contents/Resources
- (void) chdir(mAppRODataDir.c_str());
-
- // Canonically, since we set it here...
- mWorkingDir = mAppRODataDir;
+ mWorkingDir = getCurPath();
CFRelease(executableURLRef);
executableURLRef = NULL;
diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp
index a05d1b9..89db67b 100644
--- a/linden/indra/llvfs/llvfs.cpp
+++ b/linden/indra/llvfs/llvfs.cpp
@@ -892,11 +892,11 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type
{
llwarns << "Short write" << llendl;
}
-
- delete[] buffer;
} else {
llwarns << "Short read" << llendl;
}
+
+ delete[] buffer;
}
}
diff --git a/linden/indra/llwindow/llgl.cpp b/linden/indra/llwindow/llgl.cpp
index 07348b7..2310684 100644
--- a/linden/indra/llwindow/llgl.cpp
+++ b/linden/indra/llwindow/llgl.cpp
@@ -589,8 +589,8 @@ void LLGLManager::initExtensions()
mHasMipMapGeneration = FALSE;
mHasPalettedTextures = FALSE;
mHasAnisotropic = FALSE;
- mHasCubeMap = FALSE; // apparently fatal on Intel 915 & similar
- mHasOcclusionQuery = FALSE; // source of many ATI system hangs
+ //mHasCubeMap = FALSE; // apparently fatal on Intel 915 & similar
+ //mHasOcclusionQuery = FALSE; // source of many ATI system hangs
mHasShaderObjects = FALSE;
mHasVertexShader = FALSE;
mHasFragmentShader = FALSE;
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp
index b38d4d1..9756e09 100644
--- a/linden/indra/llwindow/llwindowsdl.cpp
+++ b/linden/indra/llwindow/llwindowsdl.cpp
@@ -113,6 +113,7 @@ BOOL ll_try_gtk_init(void)
if (!tried_gtk_init)
{
tried_gtk_init = TRUE;
+ if (!g_thread_supported ()) g_thread_init (NULL);
maybe_lock_display();
gtk_is_good = gtk_init_check(NULL, NULL);
maybe_unlock_display();
diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l
index 0beffe5..afd7e1a 100644
--- a/linden/indra/lscript/lscript_compile/indra.l
+++ b/linden/indra/lscript/lscript_compile/indra.l
@@ -227,6 +227,16 @@ extern "C" { int yyerror(const char *fmt, ...); }
"CHANGED_REGION" { count(); yylval.ival = 0x100; return(INTEGER_CONSTANT); }
"CHANGED_TELEPORT" { count(); yylval.ival = 0x200; return(INTEGER_CONSTANT); }
+"OBJECT_UNKOWN_DETAIL" { count(); yylval.ival = OBJECT_UNKOWN_DETAIL; return(INTEGER_CONSTANT); }
+"OBJECT_NAME" { count(); yylval.ival = OBJECT_NAME; return(INTEGER_CONSTANT); }
+"OBJECT_DESC" { count(); yylval.ival = OBJECT_DESC; return(INTEGER_CONSTANT); }
+"OBJECT_POS" { count(); yylval.ival = OBJECT_POS; return(INTEGER_CONSTANT); }
+"OBJECT_ROT" { count(); yylval.ival = OBJECT_ROT; return(INTEGER_CONSTANT); }
+"OBJECT_VELOCITY" { count(); yylval.ival = OBJECT_VELOCITY; return(INTEGER_CONSTANT); }
+"OBJECT_OWNER" { count(); yylval.ival = OBJECT_OWNER; return(INTEGER_CONSTANT); }
+"OBJECT_GROUP" { count(); yylval.ival = OBJECT_GROUP; return(INTEGER_CONSTANT); }
+"OBJECT_CREATOR" { count(); yylval.ival = OBJECT_CREATOR; return(INTEGER_CONSTANT); }
+
"TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); }
"TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); }
"TYPE_STRING" { count(); yylval.ival = LST_STRING; return(INTEGER_CONSTANT); }
diff --git a/linden/indra/lscript/lscript_compile/indra.y b/linden/indra/lscript/lscript_compile/indra.y
index 49d0c38..56f40c9 100644
--- a/linden/indra/lscript/lscript_compile/indra.y
+++ b/linden/indra/lscript/lscript_compile/indra.y
@@ -53,7 +53,6 @@
%token QUATERNION
%token LIST
-%token STATE_DEFAULT
%token STATE
%token EVENT
%token JUMP
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp
index df679ed..075418d 100644
--- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp
+++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp
@@ -8957,8 +8957,12 @@ void LLScriptEventHandler::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompi
{
entrycount = 0;
mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, mScopeEntry, entrycount, NULL);
- fprintf(fp, "Function Args: %s\n", mScopeEntry->mFunctionArgs.mString);
- fprintf(fp, "Local List: %s\n", mScopeEntry->mLocals.mString);
+
+ const char *function_args = mScopeEntry->mFunctionArgs.mString;
+ fprintf(fp, "Function Args: %s\n", function_args?function_args:"");
+
+ const char *local_list = mScopeEntry->mLocals.mString;
+ fprintf(fp, "Local List: %s\n", local_list?local_list:"");
}
mStackSpace = (S32)count;
break;
diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp
index c44e1c0..86fdd18 100644
--- a/linden/indra/lscript/lscript_library/lscript_library.cpp
+++ b/linden/indra/lscript/lscript_library/lscript_library.cpp
@@ -426,6 +426,8 @@ void LLScriptLibrary::init()
addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL."));
addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llRegionSay", NULL, "is", "llRegionSay(integer channel, string msg)\nbroadcasts msg to entire region on channel (not 0.)"));
+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetObjectDetails", "l", "kl", "list llGetObjectDetails(key id, list params)\nGets the object details specified in params for the object with key id.\nDetails are OBJECT_DETAILS_NAME, _DESCRIPTION, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR."));
+
// energy, sleep, dummy_func, name, return type, parameters, help text, gods-only
// IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST.
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 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 1.18.2.1";
-CFBundleGetInfoString = "Second Life version 1.18.2.1, Copyright 2004-2007 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 1.18.3.2";
+CFBundleGetInfoString = "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 @@
CFBundleVersion
- 1.18.2.1
+ 1.18.3.2CSResourcesFileMapped
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
PSYS_SRC_PATTERN_ANGLE_CONE
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
+OBJECT_UNKOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type.
+OBJECT_NAME Used with llGetObjectDetails to get an object's name.
+OBJECT_DESC Used with llGetObjectDetails to get an object's description.
+OBJECT_POS Used with llGetObjectDetails to get an object's position.
+OBJECT_ROT Used with llGetObjectDetails to get an object's rotation.
+OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity.
+OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned.
+OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key.
+OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key.
+
# some vehicle params
VEHICLE_TYPE_NONE
VEHICLE_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 @@
-//----------------------------------------------------------------------
-// Fake Voice Sound Signal
-// author: JJ Ventrella
-// THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
-//----------------------------------------------------------------------
+/**
+ * @file fakevoicesoundsignal.cpp
+ * @brief Fake Voice Sound Signal
+ * author: JJ Ventrella
+ * THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
+ *
+ * Copyright (c) 2000-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
#include "llviewerprecompiledheaders.h"
#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 @@
-//--------------------------------------------------------------------
-// Fake Voice Sound Signal
-// author: JJ Ventrella
-// THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
-//-----------------------------------------------------------------------------
+/**
+ * @file fakevoicesoundsignal.h
+ * @brief Fake Voice Sound Signal
+ * author: JJ Ventrella
+ * THIS IS A TEMPORARY FILE FOR DEVELOPMENT PURPOSES ONLY
+ *
+ * Copyright (c) 2000-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
#ifndef FAKE_VOICE_SOUND_SIGNAL_H
#define FAKE_VOICE_SOUND_SIGNAL_H
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
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
+UseOcclusion 1 1
+RenderCubeMap 1 1
//
// 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
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
+UseOcclusion 1 1
+RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)
@@ -107,6 +109,8 @@ RenderAvatarVP 0 0
RenderLighting 1 0
RenderParticleCount 1 1024
RenderTerrainDetail 1 0
+RenderCubeMap 0 0
+UseOcclusion 0 0
list low
@@ -145,6 +149,7 @@ RenderVBO 1 0
RenderAniso 1 0
RenderLighting 1 0
RenderTerrainDetail 1 0
+RenderCubeMap 0 0
list GeForce2
RenderVBO 1 1
@@ -156,6 +161,7 @@ RenderTerrainDetail 1 0
list GeForce3
list ATI
+UseOcclusion 0 0
list Radeon8500
RenderLighting 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
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
-
+UseOcclusion 1 1
+RenderCubeMap 1 1
//
// 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
newview/llfloaterpostcard.cpp
newview/llfloaterpreference.cpp
newview/llfloaterproperties.cpp
+newview/llfloaterreleasemsg.cpp
newview/llfloaterregioninfo.cpp
newview/llfloaterreporter.cpp
newview/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
ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1
ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1
ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1
+ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 1
+ATI Mobility Radeon .*ATI.*Mobility.* 0
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 3
ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3
ATI 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.
These are the most commonly-encountered known issues which are specific to
the Alpha release of the Linux client.
+* VOICE COMMUNICATION - this is not yet available in the Linux client.
+
+* STREAMING MOVIES - these are currently disabled while we work on some issues.
+
* VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as
robust as their counterparts for other operating systems, so some advanced
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
## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
export SDL_VIDEO_X11_DGAMOUSE=0
+## - Works around a problem with misconfigured 64-bit systems not finding GL
+export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}":/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri
+
## Nothing worth editing below this line.
##-------------------------------------------------------------------
@@ -65,7 +68,12 @@ if [ -n "$LL_TCMALLOC" ]; then
fi
fi
fi
-LD_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
+
+export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"'
+export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-secondlife-bin'
+export SL_OPT="`cat gridargs.dat` $@"
+
+eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || echo Unclean shutdown.
echo
echo '*********************************************************'
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()
sendReliableMessage();
}
gTeleportDisplay = FALSE;
- gAgent.setTeleportState( LLAgent::TELEPORT_CANCELLING );
+ gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
}
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:
TELEPORT_REQUESTED = 2, // Waiting for source simulator to respond
TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator
TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator
- TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches"
- TELEPORT_CANCELLING = 6 // used only if user clicks "cancel" button
+ TELEPORT_ARRIVING = 5 // Make the user wait while content "pre-caches"
};
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)
{
case 400:
args["[FILE]"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
- args["[REASON]"] = "Error in upload request. Please contact "
- "support@lindenlab.com for help fixing this problem.";
+ args["[REASON]"] = "Error in upload request. Please visit "
+ "http://secondlife.com/support for help fixing this problem.";
gViewerWindow->alertXml("CannotUploadReason", args);
break;
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,
// static
void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl;
LLScriptQueueData* data = (LLScriptQueueData*)user_data;
@@ -449,7 +449,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
}
// static
-void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl;
if (status)
@@ -462,7 +462,7 @@ void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* use
}
// static
-void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl;
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:
// This is the callback for when each script arrives
static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
- static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status);
+ static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status);
static void onSaveBytecodeComplete(const LLUUID& asset_id,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
// compile the file given and save it out.
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()
// skip lines added more than mLinePersistTime ago
F32 cur_time = mTimer.getElapsedTimeF32();
- if( gStartupState != STATE_STARTED )
+ if( LLStartUp::getStartupState() != STATE_STARTED )
{
S32 count = mLines.size();
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 @@
#include "llconsole.h"
#include "lldrawpoolterrain.h"
#include "llflexibleobject.h"
+#include "llfeaturemanager.h"
#include "llglslshader.h"
#include "llmediaengine.h"
#include "llpanelgeneral.h"
@@ -356,7 +357,7 @@ void declare_settings()
gSavedSettings.declareBOOL("ShowPropertyLines", FALSE, "Show line overlay demarking property boundaries");
gSavedSettings.declareBOOL("ShowParcelOwners", FALSE, "", NO_PERSIST);
gSavedSettings.declareBOOL("ToolboxAutoMove", FALSE, "[NOT USED]");
- gSavedSettings.declareBOOL("ToolboxShowMore", FALSE, "", NO_PERSIST);
+ gSavedSettings.declareBOOL("ToolboxShowMore", TRUE, "Whether to show additional build tool controls", TRUE);
gSavedSettings.declareRect("ToolboxRect", LLRect(0, 100, 100, 100), "Rectangle for tools window" ); // only care about position
@@ -379,7 +380,7 @@ void declare_settings()
gSavedSettings.declareS32("LastPrefTab", 0, "Last selected tab in preferences window");
- 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");
+ 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");
// link for editable wiki (https doesn't seem to work right now with our embedded browser)
//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");
// Wearable default images
@@ -846,6 +847,9 @@ void declare_settings()
//gSavedSettings.declareU32("LastRAMDetected", 0, "[DO NOT MODIFY] Detected system memory (bytes)"); // used to detect RAM changes
gSavedSettings.declareBOOL("ImagePipelineUseHTTP", FALSE, "If TRUE use HTTP GET to fetch textures from the server");
+ // Image compression
+ gSavedSettings.declareBOOL("LosslessJ2CUpload", FALSE, "Use lossless compression for small image uploads");
+
// Threading
gSavedSettings.declareBOOL("RunMultipleThreads", FALSE, "If TRUE keep background threads active during render");
@@ -1108,6 +1112,10 @@ void declare_settings()
// HTML dialog (general purpose)
gSavedSettings.declareRect("HtmlFloaterRect", LLRect(100,460,370,100), "Rectangle for HTML Floater window");
+
+ // HTML sim release message floater
+ gSavedSettings.declareRect("HtmlReleaseMessage", LLRect(46,520,400,128), "Rectangle for HTML Release Message Floater window");
+
// HTML help
gSavedSettings.declareString("HtmlHelpLastPage", "", "Last URL visited via help system");
@@ -1810,8 +1818,8 @@ class LLUseOcclusionListener: public LLSimpleListener
{
bool handleEvent(LLPointer event, const LLSD& userdata)
{
- LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery &&
- !gUseWireframe);
+ LLPipeline::sUseOcclusion = (event->getValue().asBoolean() && gGLManager.mHasOcclusionQuery
+ && gFeatureManagerp->isFeatureAvailable("UseOcclusion") && !gUseWireframe);
return true;
}
};
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 @@
*/
#include "llviewerprecompiledheaders.h"
+#include "llfeaturemanager.h"
#include "llworkerthread.h"
#include "llcubemap.h"
@@ -65,7 +66,8 @@ void LLCubeMap::initGL()
{
llassert(gGLManager.mInited);
- if (gGLManager.mHasCubeMap)
+ if (gGLManager.mHasCubeMap
+ && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
{
mTargets[0] = GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB;
mTargets[1] = GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB;
@@ -174,7 +176,9 @@ GLuint LLCubeMap::getGLName()
void LLCubeMap::bind()
{
- if (gGLManager.mHasCubeMap)
+ if (gGLManager.mHasCubeMap
+ //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
+ )
{
// We assume that if they have cube mapping, they have multitexturing.
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
@@ -192,7 +196,10 @@ void LLCubeMap::bind()
void LLCubeMap::enable(S32 stage)
{
mTextureStage = stage;
- if (gGLManager.mHasCubeMap && stage >= 0)
+ if (gGLManager.mHasCubeMap &&
+ stage >= 0
+ //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
+ )
{
glActiveTextureARB(GL_TEXTURE0_ARB + stage); // NOTE: leaves texture stage set
@@ -209,7 +216,9 @@ void LLCubeMap::enable(S32 stage)
void LLCubeMap::disable()
{
- if (gGLManager.mHasCubeMap && mTextureStage >= 0)
+ if (gGLManager.mHasCubeMap && mTextureStage >= 0
+ //&& gFeatureManagerp->isFeatureAvailable("RenderCubeMap")
+ )
{
glActiveTextureARB(GL_TEXTURE0_ARB + mTextureStage);
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()
void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture)
{
- std::vector& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
- for (std::vector::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
- LLDrawInfo& params = **k;
- pushBatch(params, mask, texture);
+ LLDrawInfo *pparams = *k;
+ if (pparams) {
+ pushBatch(*pparams, mask, texture);
+ }
}
}
@@ -484,14 +486,15 @@ void LLRenderPass::renderInvisible(U32 mask)
LLGLState::checkClientArrays(mask);
#endif
- std::vector& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
+ LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
- for (std::vector::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
+ for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
- LLDrawInfo& params = **i;
+
+ LLDrawInfo *pparams = *i;
+ if (pparams && pparams->mVertexBuffer.notNull()) {
+ LLDrawInfo ¶ms = *pparams;
- if (params.mVertexBuffer)
- {
params.mVertexBuffer->setBuffer(mask);
U32 *indices_pointer =
(U32 *) params.mVertexBuffer->getIndicesPointer();
@@ -509,22 +512,19 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
LLGLState::checkClientArrays(mask);
#endif
- std::vector& draw_info = gPipeline.mRenderMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
- for (std::vector::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
+ for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
- LLDrawInfo& params = **i;
- pushBatch(params, mask, TRUE);
+ LLDrawInfo* pparams = *i;
+ if (pparams) {
+ pushBatch(*pparams, mask, TRUE);
+ }
}
}
void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
{
- if (params.mVertexBuffer.isNull())
- {
- return;
- }
-
if (texture)
{
if (params.mTexture.notNull())
@@ -542,12 +542,15 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
LLImageGL::unbindTexture(0);
}
}
-
- params.mVertexBuffer->setBuffer(mask);
- U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
- glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
- GL_UNSIGNED_INT, indices_pointer+params.mOffset);
- gPipeline.mTrianglesDrawn += params.mCount/3;
+
+ if (params.mVertexBuffer.notNull())
+ {
+ params.mVertexBuffer->setBuffer(mask);
+ U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
+ glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
+ GL_UNSIGNED_INT, indices_pointer+params.mOffset);
+ gPipeline.mTrianglesDrawn += params.mCount/3;
+ }
if (params.mTextureMatrix && texture && params.mTexture.notNull())
{
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& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
- for (std::vector::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
@@ -245,7 +245,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
{
BOOL light_enabled = TRUE;
- std::vector& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
U32 prim_type = GL_TRIANGLES;
@@ -272,7 +272,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
glPointSize(width/(view*view));
}*/
- for (std::vector::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
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)
void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE)
{
- std::vector& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
- for (std::vector::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
if (LLPipeline::sDynamicReflections)
@@ -899,9 +899,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
LLGLState::checkClientArrays(mask);
#endif
- std::vector& draw_info = gPipeline.mRenderMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
- for (std::vector::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
+ for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
LLDrawInfo& params = **i;
@@ -914,9 +914,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
void LLDrawPoolBump::renderGroupBump(LLSpatialGroup* group, U32 type, U32 mask)
{
- const std::vector& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
- for (std::vector::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
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()
void LLDrawPoolWater::prerender()
{
- mVertexShaderLevel = gSavedSettings.getBOOL("RenderRippleWater") ?
- LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0;
+ mVertexShaderLevel = (gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) ?
+ LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0;
}
@@ -565,7 +565,7 @@ void LLDrawPoolWater::shade()
LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap();
gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB);
- skyMap->bind();
+ skyMap->bind();
//bind normal map
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()
return TRUE;
}
- BOOL started = FALSE;
-
BOOL result = FALSE;
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
@@ -215,29 +213,22 @@ BOOL LLDynamicTexture::updateAllInstances()
dynamicTexture = LLDynamicTexture::sInstances[order].getNextData())
{
if (dynamicTexture->needsRender())
- {
- if (!started)
- {
- started = TRUE;
- LLVertexBuffer::startRender();
- }
-
- dynamicTexture->preRender();
+ {
+ dynamicTexture->preRender(); // Must be called outside of startRender()
+
+ LLVertexBuffer::startRender();
if (dynamicTexture->render())
{
result = TRUE;
sNumRenders++;
}
+ LLVertexBuffer::stopRender();
+
dynamicTexture->postRender(result);
}
}
}
- if (started)
- {
- LLVertexBuffer::stopRender();
- }
-
return result;
}
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()
void LLFeatureManager::initCPUFeatureMasks()
{
- if (gSysMemory.getPhysicalMemory() <= 256*1024*1024)
+ if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024)
{
maskFeatures("RAM256MB");
}
@@ -494,7 +494,7 @@ extern LLOSInfo gSysOS;
void LLFeatureManager::applyRecommendedFeatures()
{
- // see featuretable.txt
+ // see featuretable.txt / featuretable_linux.txt / featuretable_mac.txt
llinfos << "Applying Recommended Features" << llendl;
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -544,6 +544,10 @@ void LLFeatureManager::applyRecommendedFeatures()
// RippleWater
BOOL ripple = getRecommendedLevel("RenderRippleWater");
gSavedSettings.setBOOL("RenderRippleWater", ripple);
+
+ // Occlusion Culling
+ BOOL occlusion = getRecommendedLevel("UseOcclusion");
+ gSavedSettings.setBOOL("UseOcclusion", occlusion);
// Vertex Shaders
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)
volume->updateRelativeXform();
doFlexibleUpdate();
+ // Object may have been rotated, which means it needs a rebuild. See SL-47220
+ BOOL rotated = FALSE;
+ LLQuaternion cur_rotation = getFrameRotation();
+ if ( cur_rotation != mLastFrameRotation )
+ {
+ mLastFrameRotation = cur_rotation;
+ rotated = TRUE;
+ }
+
if (volume->mLODChanged || volume->mFaceMappingChanged ||
volume->mVolumeChanged)
{
@@ -650,7 +659,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME);
}
- if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged)
+ if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged || rotated)
{
doFlexibleRebuild();
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
LLVector3 mAnchorPosition;
LLVector3 mParentPosition;
LLQuaternion mParentRotation;
- LLQuaternion mInitialAxisRotation;
+ LLQuaternion mLastFrameRotation;
LLQuaternion mLastSegmentRotation;
BOOL mInitialized;
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 @@
#include "llagent.h"
#include "llviewerstats.h"
#include "llviewerregion.h"
-#include "llversion.h"
+#include "llversionviewer.h"
#include "llviewerbuild.h"
#include "llvieweruictrlfactory.h"
#include "viewer.h" // for gViewerDigest
@@ -109,7 +109,9 @@ LLFloaterAbout::LLFloaterAbout()
support.append(" (");
gAgent.getRegion()->getHost().getString(buffer, MAX_STRING);
support.append(buffer);
- support.append(")\n\n");
+ support.append(")\n");
+ support.append(gLastVersionChannel);
+ support.append("\n\n");
}
// CPU
@@ -117,9 +119,8 @@ LLFloaterAbout::LLFloaterAbout()
support.append( gSysCPU.getCPUString() );
support.append("\n");
- U32 memory = gSysMemory.getPhysicalMemory() / 1024 / 1024;
- // For some reason, the reported amount of memory is always wrong by one meg
- memory++;
+ U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
+ // Moved hack adjustment to Windows memory size into llsys.cpp
LLString mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
@@ -165,8 +166,15 @@ LLFloaterAbout::LLFloaterAbout()
// Fix views
childDisable("credits_editor");
- childDisable("support_editor");
- childSetText("support_editor", support);
+
+ LLTextEditor * support_widget = (LLTextEditor *) getChildByName("support_editor", true);
+ if (support_widget)
+ {
+ support_widget->setEnabled( FALSE );
+ support_widget->setTakesFocus( TRUE );
+ support_widget->setText( support );
+ support_widget->setHandleEditKeysDirectly( TRUE );
+ }
center();
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:
static void onSaveComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
protected:
void draw();
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 @@
///----------------------------------------------------------------------------
void auction_j2c_upload_done(const LLUUID& asset_id,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
void auction_tga_upload_done(const LLUUID& asset_id,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
///----------------------------------------------------------------------------
/// Class llfloaterauction
@@ -258,7 +258,7 @@ void LLFloaterAuction::onClickOK(void* data)
/// Local function definitions
///----------------------------------------------------------------------------
-void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLString* name = (LLString*)(user_data);
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
}
}
-void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLString* name = (LLString*)(user_data);
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)
}
}
+// static callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::onSelectionChange(const std::deque &items, BOOL user_action, void* data)
{
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data;
- if (!self)
+ if (self)
{
- return;
+ self->doSelectionChange( items, user_action, data );
}
+}
- self->mAvatarIDs.clear();
- self->mAvatarNames.clear();
-
- // if we have calling cards, disable select button until
- // the inventory picks a valid calling card
- if (!items.empty())
+// Callback for inventory picker (select from calling cards)
+void LLFloaterAvatarPicker::doSelectionChange(const std::deque &items, BOOL user_action, void* data)
+{
+ if (!mListNames)
{
- self->childSetEnabled("Select", FALSE);
+ return;
}
- if (!self->mListNames)
- {
- return;
+ std::vector search_items = mListNames->getAllSelected();
+ if ( search_items.size() == 0 )
+ { // Nothing selected in the search results
+ mAvatarIDs.clear();
+ mAvatarNames.clear();
+ childSetEnabled("Select", FALSE);
}
-
+
+ BOOL first_calling_card = TRUE;
std::deque::const_iterator item_it;
for (item_it = items.begin(); item_it != items.end(); ++item_it)
{
@@ -230,10 +234,18 @@ void LLFloaterAvatarPicker::onSelectionChange(const std::dequemAvatarIDs.push_back(item->getCreatorUUID());
- self->mAvatarNames.push_back(listenerp->getName());
- self->childSetEnabled("Select", TRUE);
- self->mListNames->deselectAllItems();
+ if ( first_calling_card )
+ { // Have a calling card selected, so clear anything from the search panel
+ first_calling_card = FALSE;
+ mAvatarIDs.clear();
+ mAvatarNames.clear();
+ mListNames->deselectAllItems();
+ }
+
+ // Add calling card info to the selected avatars
+ mAvatarIDs.push_back(item->getCreatorUUID());
+ mAvatarNames.push_back(listenerp->getName());
+ childSetEnabled("Select", TRUE);
}
}
}
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:
static void onBtnAdd(void* userdata);
static void onBtnClose(void* userdata);
static void onList(LLUICtrl* ctrl, void* userdata);
+
+ void doSelectionChange(const std::deque &items, BOOL user_action, void* data);
static void onSelectionChange(const std::deque &items, BOOL user_action, void* data);
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:
virtual BOOL postBuild();
virtual void draw();
+ virtual BOOL isDirty() const; // LLUICtrl
void addSubpart(const LLString& name, ESubpart id, LLSubpart* part );
void addTextureDropTarget( LLVOAvatar::ETextureIndex te, const LLString& name, const LLUUID& default_image_id, BOOL allow_no_texture );
@@ -395,7 +396,6 @@ public:
void setWearable(LLWearable* wearable, U32 perm_mask, BOOL is_complete);
void addVisualParamToUndoBuffer( S32 param_id, F32 current_weight );
- BOOL isDirty();
void setUIPermissions(U32 perm_mask, BOOL is_complete);
@@ -558,6 +558,7 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart )
sorted_params.insert(vt);
}
gFloaterCustomize->generateVisualParamHints(NULL, sorted_params);
+ gFloaterCustomize->updateScrollingPanelUI();
// Update the camera
@@ -1030,7 +1031,7 @@ void LLPanelEditWearable::setVisible(BOOL visible)
}
}
-BOOL LLPanelEditWearable::isDirty()
+BOOL LLPanelEditWearable::isDirty() const
{
LLWearable* wearable = gAgent.getWearable( mType );
if( !wearable )
@@ -2148,7 +2149,7 @@ void LLFloaterCustomize::draw()
}
}
-BOOL LLFloaterCustomize::isDirty()
+BOOL LLFloaterCustomize::isDirty() const
{
for(S32 i = 0; i < WT_COUNT; i++)
{
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:
//const char* getWearableDescription( EWearableType type );
LLPanelEditWearable* getCurrentWearablePanel() { return mWearablePanelList[ sCurrentWearableType ]; }
- BOOL isDirty();
+ virtual BOOL isDirty() const;
void askToSaveAllIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata );
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)
void* LLFloaterDirectory::createPanelAvatar(void* data)
{
LLFloaterDirectory* self = (LLFloaterDirectory*)data;
- self->mPanelAvatarp = new LLPanelAvatar("Avatar", LLRect(), TRUE); // allow edit self
+ self->mPanelAvatarp = new LLPanelAvatar("Avatar", LLRect(),
+ FALSE); // disallow editing in search context (SL-48632)
self->mPanelAvatarp->setVisible(FALSE);
return self->mPanelAvatarp;
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()
delete mObserver;
}
-void LLPanelFriends::tick()
+BOOL LLPanelFriends::tick()
{
mEventTimer.stop();
mPeriod = 1000000;
mAllowRightsChange = TRUE;
updateFriends(LLFriendObserver::ADD);
+ return FALSE;
}
void 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:
* current instantiation of this floater. There is only once since
* you can currently only look at your local friends.
*/
- virtual void tick();
+ virtual BOOL tick();
/**
* @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)
}
}
-void terrain_download_done(void** data, S32 status)
+void terrain_download_done(void** data, S32 status, LLExtStat ext_status)
{
LLNotifyBox::showXml("TerrainDownloaded");
}
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)
{
fgi->mPanelGroupp->close();
}
- }
+ }
}
// static
@@ -125,9 +125,9 @@ void LLFloaterGroupInfo::refreshGroup(const LLUUID& group_id)
if (fgi)
{
if (fgi->mPanelGroupp)
- {
+ {
fgi->mPanelGroupp->refreshData();
- }
+ }
}
}
@@ -190,9 +190,9 @@ void LLFloaterGroupInfo::showNotice(const char* subject,
{
// We need to clean up that inventory offer.
if (inventory_offer)
- {
+ {
inventory_offer_callback( IOR_DECLINE , inventory_offer);
- }
+ }
return;
}
@@ -202,9 +202,9 @@ void LLFloaterGroupInfo::showNotice(const char* subject,
{
// We need to clean up that inventory offer.
if (inventory_offer)
- {
+ {
inventory_offer_callback( IOR_DECLINE , inventory_offer);
- }
+ }
return;
}
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()
}
// static
-void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id)
+void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector *agent_ids)
{
// Make sure group_id isn't null
if (group_id.isNull())
@@ -131,6 +131,11 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id)
fgi->mImpl->mInvitePanelp->clear();
}
+
+ if (agent_ids != NULL)
+ {
+ fgi->mImpl->mInvitePanelp->addUsers(*agent_ids);
+ }
fgi->center();
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
public:
virtual ~LLFloaterGroupInvite();
- static void showForGroup(const LLUUID &group_id);
+ static void showForGroup(const LLUUID &group_id, std::vector *agent_ids = NULL);
protected:
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 @@
#include "llfloatergroups.h"
#include "message.h"
+#include "roles_constants.h"
#include "llagent.h"
#include "llbutton.h"
@@ -56,7 +57,7 @@
std::map LLFloaterGroupPicker::sInstances;
// helper functions
-void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id);
+void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS);
///----------------------------------------------------------------------------
/// Class LLFloaterGroupPicker
@@ -83,7 +84,8 @@ LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
mSelectCallback(NULL),
- mCallbackUserdata(NULL)
+ mCallbackUserdata(NULL),
+ mPowersMask(GP_ALL_POWERS)
{
mID = seed.asUUID();
sInstances.insert(std::make_pair(mID, this));
@@ -101,9 +103,16 @@ void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*),
mCallbackUserdata = userdata;
}
+void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
+{
+ mPowersMask = powers_mask;
+ postBuild();
+}
+
+
BOOL LLFloaterGroupPicker::postBuild()
{
- init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID());
+ init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID(), mPowersMask);
childSetAction("OK", onBtnOK, this);
@@ -414,7 +423,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
if(self) self->enableButtons();
}
-void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
+void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask)
{
S32 count = gAgent.mGroups.count();
LLUUID id;
@@ -427,20 +436,22 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
{
id = gAgent.mGroups.get(i).mID;
LLGroupData* group_datap = &gAgent.mGroups.get(i);
- LLString style = "NORMAL";
- if(highlight_id == id)
- {
- style = "BOLD";
+ if ((group_datap->mPowers & powers_mask) != 0) {
+ LLString style = "NORMAL";
+ if(highlight_id == id)
+ {
+ style = "BOLD";
+ }
+
+ LLSD element;
+ element["id"] = id;
+ element["columns"][0]["column"] = "name";
+ element["columns"][0]["value"] = group_datap->mName;
+ element["columns"][0]["font"] = "SANSSERIF";
+ element["columns"][0]["font-style"] = style;
+
+ group_list->addElement(element, ADD_SORTED);
}
-
- LLSD element;
- element["id"] = id;
- element["columns"][0]["column"] = "name";
- element["columns"][0]["value"] = group_datap->mName;
- element["columns"][0]["font"] = "SANSSERIF";
- element["columns"][0]["font-style"] = style;
-
- group_list->addElement(element, ADD_SORTED);
}
// 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:
~LLFloaterGroupPicker();
void setSelectCallback( void (*callback)(LLUUID, void*),
void* userdata);
+ void setPowersMask(U64 powers_mask);
BOOL postBuild();
protected:
@@ -69,6 +70,7 @@ protected:
protected:
LLUUID mID;
+ U64 mPowersMask;
void (*mSelectCallback)(LLUUID id, void* userdata);
void* mCallbackUserdata;
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 @@
#include "pipeline.h"
#include "viewer.h"
#include "llvieweruictrlfactory.h"
+#include "llviewerimagelist.h"
//static
S32 LLFloaterImagePreview::sUploadAmount = 10;
@@ -57,9 +58,10 @@ S32 LLFloaterImagePreview::sUploadAmount = 10;
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
-const S32 PREF_BUTTON_HEIGHT = 16;
+const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
const S32 PREVIEW_TEXTURE_HEIGHT = 300;
+
//-----------------------------------------------------------------------------
// LLFloaterImagePreview()
//-----------------------------------------------------------------------------
@@ -106,6 +108,10 @@ BOOL LLFloaterImagePreview::postBuild()
mSculptedPreview = new LLImagePreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
+
+ if ((mRawImagep->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) &&
+ (mRawImagep->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF))
+ childEnable("lossless_check");
}
else
{
@@ -763,6 +769,7 @@ LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynami
LLVolumeParams volume_params;
volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE);
+ volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_SPHERE);
mVolume = new LLVolume(volume_params, (F32) MAX_LOD);
/*
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)
}
// static
-void LLFloaterImport::asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result)
+void LLFloaterImport::asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status)
{
llinfos << "LLFloaterImport: Finished uploading image." << llendl;
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:
static void onBtnOK(void*);
static void onBtnCancel(void*);
- static void asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result);
+ static void asset_uploaded_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
static void finishImport(ImportAssetInfo *fp);
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)
{
if(gToolMgr->getBaseTool() == gToolInspect)
{
- select_tool(gToolNull);
+ gToolMgr->clearTransientTool();
}
// Switch back to basic toolset
- gToolMgr->setCurrentToolset(gBasicToolset);
+ gToolMgr->setCurrentToolset(gBasicToolset);
}
else
{
@@ -85,7 +85,7 @@ void LLFloaterInspect::show(void* ignored)
}
sInstance->open();
- select_tool(gToolInspect);
+ gToolMgr->setTransientTool(gToolInspect);
gSelectMgr->setForceSelection(forcesel); // restore previouis value
sInstance->mObjectSelection = gSelectMgr->getSelection();
@@ -256,7 +256,7 @@ void LLFloaterInspect::refresh()
void LLFloaterInspect::onFocusReceived()
{
- select_tool(gToolInspect);
+ gToolMgr->setTransientTool(gToolInspect);
}
void 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)
}
// static
-void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result) // StoreAssetData callback (fixed)
+void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
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:
static void uploadCallback(const LLUUID& asset_id,
void *user_data,
- S32 result);
+ S32 result, LLExtStat ext_status);
static void updateUserInfo(const char *email);
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)
LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list");
if (!list) return;
if (list->getItemCount() >= ESTATE_MAX_MANAGERS)
- {
+ { // Tell user they can't add more managers
LLString::format_map_t args;
args["[MAX_MANAGER]"] = llformat("%d",ESTATE_MAX_MANAGERS);
gViewerWindow->alertXml("MaxManagersOnRegion", args);
- return;
}
- accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
+ else
+ { // Go pick managers to add
+ accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
+ }
}
// static
@@ -1995,7 +1997,7 @@ BOOL LLPanelEstateInfo::postBuild()
if (manager_name_list)
{
manager_name_list->setCommitOnSelectionChange(TRUE);
- manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS);
+ manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
}
childSetAction("add_estate_manager_btn", onClickAddEstateManager, this);
@@ -2562,7 +2564,7 @@ void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl;
LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data;
@@ -2973,9 +2975,13 @@ bool LLDispatchSetEstateAccess::operator()(
LLNameListCtrl* estate_manager_name_list =
LLViewerUICtrlFactory::getNameListByName(panel, "estate_manager_name_list");
if (estate_manager_name_list)
- {
- estate_manager_name_list->deleteAllItems();
- for (S32 i = 0; i < num_estate_managers && i < ESTATE_MAX_MANAGERS; i++)
+ {
+ estate_manager_name_list->deleteAllItems(); // Clear existing entries
+
+ // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't
+ // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused,
+ // and they can still remove them.
+ for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++)
{
LLUUID id;
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:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
// Accessor functions
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 @@
+/**
+ * @file llfloaterreleasemsg.cpp
+ * @brief In-world HTML dialog
+ *
+ * Copyright (c) 2005-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llvieweruictrlfactory.h"
+#include "llviewerwindow.h"
+#include "llviewercontrol.h"
+#include "llfloaterreleasemsg.h"
+#include "llagent.h"
+#include "llviewerregion.h"
+
+extern LLAgent gAgent;
+extern LLString gLastVersionChannel;
+
+LLFloaterReleaseMsg* LLFloaterReleaseMsg::sInstance = 0;
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+LLFloaterReleaseMsg* LLFloaterReleaseMsg::getInstance()
+{
+ if ( ! sInstance )
+ sInstance = new LLFloaterReleaseMsg;
+
+ return sInstance;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+LLFloaterReleaseMsg::LLFloaterReleaseMsg()
+: LLFloater( "Release Message Floater" )
+
+#if LL_LIBXUL_ENABLED
+ ,
+ mWebBrowser( 0 )
+#endif // LL_LIBXUL_ENABLED
+{
+ // create floater from its XML definition
+ gUICtrlFactory->buildFloater( this, "floater_sim_release_message.xml" );
+
+ mTitleBase = getTitle();
+
+ // reposition floater from saved settings
+ LLRect rect = gSavedSettings.getRect( "HtmlReleaseMessage" );
+ reshape( rect.getWidth(), rect.getHeight(), FALSE );
+ setRect( rect );
+
+#if LL_LIBXUL_ENABLED
+ mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "release_message_floater_browser" );
+ if ( mWebBrowser )
+ {
+ // observe browser events
+ mWebBrowser->addObserver( this );
+
+ // make links open in external browser
+ mWebBrowser->setOpenInExternalBrowser( true );
+
+ // don't automatically open secondlife links since we want to catch
+ // special ones that do other stuff (like open F1 Help)
+ //mWebBrowser->setOpenSecondLifeLinksInMap( false );
+ }
+#endif // LL_LIBXUL_ENABLED
+
+ childSetAction("close_btn", onClickClose, this);
+ setDefaultBtn("close_btn");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+LLFloaterReleaseMsg::~LLFloaterReleaseMsg()
+{
+#if LL_LIBXUL_ENABLED
+ // stop observing browser events
+ if ( mWebBrowser )
+ mWebBrowser->remObserver( this );
+#endif // LL_LIBXUL_ENABLED
+
+ // save position of floater
+ gSavedSettings.setRect( "HtmlReleaseMessage", mRect );
+
+ sInstance = 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+void LLFloaterReleaseMsg::show()
+{
+
+ std::string url = gAgent.getRegion()->getCapability("ServerReleaseNotes");
+
+ if (url.empty()) return;
+
+ llinfos << "Release message url: " << url << llendl;
+
+ if (!sInstance)
+ {
+ sInstance = new LLFloaterReleaseMsg();
+ sInstance->center();
+ }
+
+ sInstance->setTitle(sInstance->mTitleBase + " " + gLastVersionChannel);
+ sInstance->open();
+
+#if LL_LIBXUL_ENABLED
+ // navigate to the URL
+ if ( sInstance->mWebBrowser )
+ sInstance->mWebBrowser->navigateTo( url );
+#endif // LL_LIBXUL_ENABLED
+
+ // make floater appear
+ sInstance->setVisibleAndFrontmost();
+
+ sInstance->draw();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+void LLFloaterReleaseMsg::onClickClose( void* data )
+{
+ LLFloaterReleaseMsg* self = ( LLFloaterReleaseMsg* )data;
+
+ self->setVisible( false );
+}
+
+
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 @@
+/**
+ * @file LLFloaterReleaseMsg.h
+ *
+ * Copyright (c) 2005-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#ifndef LL_LLFLOATERRELMSG_H
+#define LL_LLFLOATERRELMSG_H
+
+#include "llwebbrowserctrl.h"
+#include "llfloater.h"
+
+class LLFloaterReleaseMsg :
+ public LLFloater,
+ public LLWebBrowserCtrlObserver
+{
+ public:
+ static LLFloaterReleaseMsg* getInstance();
+ virtual ~LLFloaterReleaseMsg();
+
+ static void show();
+ static void onClickClose( void* data );
+
+ static LLFloaterReleaseMsg* sInstance;
+ LLString mTitleBase;
+ private:
+ LLFloaterReleaseMsg();
+#if LL_LIBXUL_ENABLED
+ LLWebBrowserCtrl* mWebBrowser;
+#endif // LL_LIBXUL_ENABLED
+ LLButton* mCloseButton;
+};
+
+#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 @@
#include "llinventory.h"
#include "llstring.h"
#include "llsys.h"
-#include "llversion.h"
+#include "llversionviewer.h"
#include "message.h"
#include "v3math.h"
@@ -930,7 +930,7 @@ void LLFloaterReporter::uploadImage()
// static
-void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result) // StoreAssetData callback (fixed)
+void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLUploadDialog::modalUploadFinished();
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:
static void onClickObjPicker (void *userdata);
static void onClickSelectAbuser (void *userdata);
static void closePickTool (void *userdata);
- static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result);
+ static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result, LLExtStat ext_status);
static void addDescription(const LLString& description, LLMeanCollisionData *mcd = NULL);
static void setDescription(const LLString& description, LLMeanCollisionData *mcd = NULL);
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()
LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE);
std::string pos_string;
gAgent.buildLocationString(pos_string);
+ std::string who_took_it;
+ gAgent.buildFullname(who_took_it);
upload_new_resource(tid, // tid
LLAssetType::AT_TEXTURE,
- "Snapshot",
- pos_string,
+ "Snapshot : " + pos_string,
+ "Taken by " + who_took_it + " at " + pos_string,
0,
LLAssetType::AT_SNAPSHOT_CATEGORY,
LLInventoryType::IT_SNAPSHOT,
PERM_ALL,
- "Snapshot");
+ "Snapshot : " + pos_string);
}
else
{
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()
mSmallHeight = mLargeHeight;
if (mTab) mSmallHeight -= mTab->getRect().getHeight();
- gSavedSettings.setBOOL("ToolboxShowMore", TRUE); // force a toggle initially
- showMore(FALSE);
+ // force a toggle initially. seems to be needed to correctly initialize
+ // both "more" and "less" cases. it also seems to be important to begin
+ // with the user's preference first so that it's initial position will
+ // be correct (SL-51192) -MG
+ BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference
+ gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below
+ showMore( !show_more ); // does the toggle
+ showMore( show_more ); // reset the real user's preference
}
LLFloaterTools::~LLFloaterTools()
{
- showMore(FALSE);
// children automatically deleted
}
@@ -777,23 +782,20 @@ void LLFloaterTools::showMore(BOOL show_more)
{
reshape( mRect.getWidth(), mLargeHeight, TRUE);
translate( 0, mSmallHeight - mLargeHeight );
- childSetVisible("button less", true);
- childSetVisible("button more", false);
}
else
{
reshape( mRect.getWidth(), mSmallHeight, TRUE);
translate( 0, mLargeHeight - mSmallHeight );
- childSetVisible("button less", false);
- childSetVisible("button more", true);
}
+ childSetVisible("button less", show_more);
+ childSetVisible("button more", !show_more);
}
void LLFloaterTools::showPanel(EInfoPanel panel)
{
llassert(panel >= 0 && panel < PANEL_COUNT);
mTab->selectTabByName(PANEL_NAMES[panel]);
- showMore(TRUE);
}
void 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 )
{
gAcceptCriticalMessage = TRUE;
}
- gStartupState++;
+
+ // Testing TOS dialog
+ #if ! LL_RELEASE_FOR_DOWNLOAD
+ if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT )
+ {
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+ }
+ else
+ #endif
+
+ LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
self->close(); // destroys this object
}
@@ -277,7 +287,7 @@ void LLFloaterTOS::onCancel( void* userdata )
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
llinfos << "User disagrees with TOS." << llendl;
gViewerWindow->alertXml("MustAgreeToLogIn", login_alert_done);
- gStartupState = STATE_LOGIN_SHOW;
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
self->close(); // destroys this object
}
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 )
LLString str = self->childGetValue("location").asString();
+ // Trim any leading and trailing spaces in the search target
+ LLString saved_str = str;
+ LLString::trim( str );
+ if ( str != saved_str )
+ { // Set the value in the UI if any spaces were removed
+ self->childSetValue("location", str);
+ }
+
LLString::toLower(str);
gFloaterWorldMap->mCompletingRegionName = str;
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
mShowSelectionContext(FALSE),
mShowSingleSelection(FALSE),
mArrangeGeneration(0),
+ mUserData(NULL),
mSelectCallback(NULL),
mSelectionChanged(FALSE),
mMinWidth(0),
@@ -4254,73 +4255,89 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
return NULL;
}
-//static
-void LLFolderView::idle(void* user_data)
+
+// Main idle routine
+void LLFolderView::doIdle()
{
LLFastTimer t2(LLFastTimer::FTM_INVENTORY);
- LLFolderView* self = (LLFolderView*)user_data;
BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters");
- if (debug_filters != self->getDebugFilters())
+ if (debug_filters != getDebugFilters())
{
- self->mDebugFilters = debug_filters;
- self->arrangeAll();
+ mDebugFilters = debug_filters;
+ arrangeAll();
}
- self->mFilter.clearModified();
- BOOL filter_modified_and_active = self->mCompletedFilterGeneration < self->mFilter.getCurrentGeneration() &&
- self->mFilter.isNotDefault();
- self->mNeedsAutoSelect = filter_modified_and_active &&
- !(gFocusMgr.childHasKeyboardFocus(self) || gFocusMgr.getMouseCapture());
+ mFilter.clearModified();
+ BOOL filter_modified_and_active = mCompletedFilterGeneration < mFilter.getCurrentGeneration() &&
+ mFilter.isNotDefault();
+ mNeedsAutoSelect = filter_modified_and_active &&
+ !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
// filter to determine visiblity before arranging
- self->filterFromRoot();
+ filterFromRoot();
// automatically show matching items, and select first one
// do this every frame until user puts keyboard focus into the inventory window
// signaling the end of the automatic update
// only do this when mNeedsFilter is set, meaning filtered items have
// potentially changed
- if (self->mNeedsAutoSelect)
+ if (mNeedsAutoSelect)
{
LLFastTimer t3(LLFastTimer::FTM_AUTO_SELECT);
// select new item only if a filtered item not currently selected
- LLFolderViewItem* selected_itemp = self->mSelectedItems.empty() ? NULL : self->mSelectedItems.back();
- if ((!selected_itemp || !selected_itemp->getFiltered()) && !self->mAutoSelectOverride)
+ LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
+ if ((!selected_itemp || !selected_itemp->getFiltered()) && !mAutoSelectOverride)
{
// select first filtered item
LLSelectFirstFilteredItem filter;
- self->applyFunctorRecursively(filter);
+ applyFunctorRecursively(filter);
}
- self->scrollToShowSelection();
+ scrollToShowSelection();
}
- self->sanitizeSelection();
+ BOOL is_visible = isInVisibleChain();
- if( self->needsArrange() && self->isInVisibleChain())
+ if ( is_visible )
{
- self->arrangeFromRoot();
+ sanitizeSelection();
+ if( needsArrange() )
+ {
+ arrangeFromRoot();
+ }
}
- if (self->mSelectedItems.size() && self->mNeedsScroll)
+ if (mSelectedItems.size() && mNeedsScroll)
{
- self->scrollToShowItem(self->mSelectedItems.back());
+ scrollToShowItem(mSelectedItems.back());
// continue scrolling until animated layout change is done
- if (self->getCompletedFilterGeneration() >= self->mFilter.getMinRequiredGeneration() &&
- (!self->needsArrange() || !self->isInVisibleChain()))
+ if (getCompletedFilterGeneration() >= mFilter.getMinRequiredGeneration() &&
+ (!needsArrange() || !is_visible))
{
- self->mNeedsScroll = FALSE;
+ mNeedsScroll = FALSE;
}
}
- if (self->mSelectionChanged && self->mSelectCallback)
+ if (mSelectionChanged && mSelectCallback)
{
//RN: we use keyboard focus as a proxy for user-explicit actions
- self->mSelectCallback(self->mSelectedItems, gFocusMgr.childHasKeyboardFocus(self), self->mUserData);
+ mSelectCallback(mSelectedItems, gFocusMgr.childHasKeyboardFocus(this), mUserData);
}
- self->mSelectionChanged = FALSE;
+ mSelectionChanged = FALSE;
}
+
+//static
+void LLFolderView::idle(void* user_data)
+{
+ LLFolderView* self = (LLFolderView*)user_data;
+ if ( self )
+ { // Do the real idle
+ self->doIdle();
+ }
+}
+
+
void LLFolderView::dumpSelectionInformation()
{
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:
void removeItemID(const LLUUID& id);
LLFolderViewItem* getItemByID(const LLUUID& id);
- static void idle(void* user_data);
+ void doIdle(); // Real idle routine
+ static void idle(void* user_data); // static glue to doIdle()
BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; }
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)
void LLGestureManager::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
LLLoadInfo* info = (LLLoadInfo*)user_data;
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:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
public:
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 @@
#include "llviewerprecompiledheaders.h"
#include "llviewerwindow.h"
+#include "llfeaturemanager.h"
#include "llglslshader.h"
#include "llviewercontrol.h"
#include "pipeline.h"
@@ -412,7 +413,7 @@ void LLShaderMgr::setShaders()
if (gGLManager.mHasFramebufferObject)
{
- LLPipeline::sDynamicReflections = gSavedSettings.getBOOL("RenderDynamicReflections");
+ LLPipeline::sDynamicReflections = gSavedSettings.getBOOL("RenderDynamicReflections") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap");
LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow");
}
else
@@ -471,7 +472,7 @@ void LLShaderMgr::setShaders()
loadShadersAvatar();
// Load shaders to correct levels
- if (!gSavedSettings.getBOOL("RenderRippleWater"))
+ if (!(gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")))
{
if (gSavedSettings.getBOOL("RenderGlow"))
{
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,
text->setCursor(0,0);
text->setEnabled(FALSE);
text->setWordWrap(TRUE);
- text->setTakesFocus(FALSE);
+ text->setTakesFocus(TRUE); // Allow focus so text can be copied. Since it's not enabled, it will be read-only
text->setTabToNextField(TRUE);
text->setMouseOpaque(TRUE);
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 @@
#include "llselectmgr.h"
#include "llglheaders.h"
+
+#include "llxmltree.h"
+
+
BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE;
// packet layout
@@ -54,69 +58,179 @@ const F32 MAX_SENDS_PER_SEC = 4.f;
const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f;
const F32 MIN_TARGET_OFFSET_SQUARED = 0.0001f;
-// timeouts
+
// can't use actual F32_MAX, because we add this to the current frametime
const F32 MAX_TIMEOUT = F32_MAX / 2.f;
-const F32 LOOKAT_TIMEOUTS[LOOKAT_NUM_TARGETS] =
+/**
+ * Simple data class holding values for a particular type of attention.
+ */
+class LLAttention
{
- MAX_TIMEOUT, //LOOKAT_TARGET_NONE
- 3.f, //LOOKAT_TARGET_IDLE
- 4.f, //LOOKAT_TARGET_AUTO_LISTEN
- 2.f, //LOOKAT_TARGET_FREELOOK
- 4.f, //LOOKAT_TARGET_RESPOND
- 1.f, //LOOKAT_TARGET_HOVER
- MAX_TIMEOUT, //LOOKAT_TARGET_CONVERSATION
- MAX_TIMEOUT, //LOOKAT_TARGET_SELECT
- MAX_TIMEOUT, //LOOKAT_TARGET_FOCUS
- MAX_TIMEOUT, //LOOKAT_TARGET_MOUSELOOK
- 0.f, //LOOKAT_TARGET_CLEAR
+public:
+ LLAttention(){}
+ LLAttention(F32 timeout, F32 priority, char *name, LLColor3 color) :
+ mTimeout(timeout), mPriority(priority), mName(name), mColor(color)
+ {
+ }
+ F32 mTimeout, mPriority;
+ LLString mName;
+ LLColor3 mColor;
};
-const S32 LOOKAT_PRIORITIES[LOOKAT_NUM_TARGETS] =
+/**
+ * Simple data class holding a list of attentions, one for every type.
+ */
+class LLAttentionSet
{
- 0, //LOOKAT_TARGET_NONE
- 1, //LOOKAT_TARGET_IDLE
- 3, //LOOKAT_TARGET_AUTO_LISTEN
- 2, //LOOKAT_TARGET_FREELOOK
- 3, //LOOKAT_TARGET_RESPOND
- 4, //LOOKAT_TARGET_HOVER
- 5, //LOOKAT_TARGET_CONVERSATION
- 6, //LOOKAT_TARGET_SELECT
- 6, //LOOKAT_TARGET_FOCUS
- 7, //LOOKAT_TARGET_MOUSELOOK
- 8, //LOOKAT_TARGET_CLEAR
+public:
+ LLAttentionSet(const LLAttention attentions[])
+ {
+ for(int i=0; igetAttributeString("name", str);
+ LLAttentionSet& attentions = (str.compare("Masculine") == 0) ? gBoyAttentions : gGirlAttentions;
+ for (LLXmlTreeNode* attention_node = gender->getChildByName( "param" );
+ attention_node;
+ attention_node = gender->getNextNamedChild())
+ {
+ attention_node->getAttributeString("attention", str);
+ LLAttention* attention;
+ if (str == "idle") attention = &attentions[LOOKAT_TARGET_IDLE];
+ else if(str == "auto_listen") attention = &attentions[LOOKAT_TARGET_AUTO_LISTEN];
+ else if(str == "freelook") attention = &attentions[LOOKAT_TARGET_FREELOOK];
+ else if(str == "respond") attention = &attentions[LOOKAT_TARGET_RESPOND];
+ else if(str == "hover") attention = &attentions[LOOKAT_TARGET_HOVER];
+ else if(str == "conversation") attention = &attentions[LOOKAT_TARGET_CONVERSATION];
+ else if(str == "select") attention = &attentions[LOOKAT_TARGET_SELECT];
+ else if(str == "focus") attention = &attentions[LOOKAT_TARGET_FOCUS];
+ else if(str == "mouselook") attention = &attentions[LOOKAT_TARGET_MOUSELOOK];
+ else return FALSE;
+
+ F32 priority, timeout;
+ attention_node->getAttributeF32("priority", priority);
+ attention_node->getAttributeF32("timeout", timeout);
+ if(timeout < 0) timeout = MAX_TIMEOUT;
+ attention->mPriority = priority;
+ attention->mTimeout = timeout;
+ }
+ return TRUE;
+}
-const LLColor3 LOOKAT_COLORS[LOOKAT_NUM_TARGETS] =
+static BOOL loadAttentions()
{
- LLColor3(0.3f, 0.3f, 0.3f), //LOOKAT_TARGET_NONE
- LLColor3(0.5f, 0.5f, 0.5f), //LOOKAT_TARGET_IDLE
- LLColor3(0.5f, 0.5f, 0.5f), //LOOKAT_TARGET_AUTO_LISTEN
- LLColor3(0.5f, 0.5f, 0.9f), //LOOKAT_TARGET_FREELOOK
- LLColor3(0.f, 0.f, 0.f), //LOOKAT_TARGET_RESPOND
- LLColor3(0.5f, 0.9f, 0.5f), //LOOKAT_TARGET_HOVER
- LLColor3(0.1f, 0.1f, 0.5f), //LOOKAT_TARGET_CONVERSATION
- LLColor3(0.9f, 0.5f, 0.5f), //LOOKAT_TARGET_SELECT
- LLColor3(0.9f, 0.5f, 0.9f), //LOOKAT_TARGET_FOCUS
- LLColor3(0.9f, 0.9f, 0.5f), //LOOKAT_TARGET_MOUSELOOK
- LLColor3(1.f, 1.f, 1.f), //LOOKAT_TARGET_CLEAR
-};
+ static BOOL first_time = TRUE;
+ if( ! first_time)
+ {
+ return TRUE; // maybe not ideal but otherwise it can continue to fail forever.
+ }
+ first_time = FALSE;
+
+ char filename[MAX_PATH]; /*Flawfinder: ignore*/
+ strncpy(filename,gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml").c_str(), sizeof(filename) -1); /*Flawfinder: ignore*/
+ filename[sizeof(filename) -1] = '\0';
+ LLXmlTree xml_tree;
+ BOOL success = xml_tree.parseFile( filename, FALSE );
+ if( !success )
+ {
+ return FALSE;
+ }
+ LLXmlTreeNode* root = xml_tree.getRoot();
+ if( !root )
+ {
+ return FALSE;
+ }
+
+ //-------------------------------------------------------------------------
+ // (root)
+ //-------------------------------------------------------------------------
+ if( !root->hasName( "linden_attentions" ) )
+ {
+ llwarns << "Invalid linden_attentions file header: " << filename << llendl;
+ return FALSE;
+ }
+
+ LLString version;
+ static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
+ if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
+ {
+ llwarns << "Invalid linden_attentions file version: " << version << llendl;
+ return FALSE;
+ }
+
+ //-------------------------------------------------------------------------
+ //
+ //-------------------------------------------------------------------------
+ for (LLXmlTreeNode* child = root->getChildByName( "gender" );
+ child;
+ child = root->getNextNamedChild())
+ {
+ if( !loadGender( child ) )
+ {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+
+
//-----------------------------------------------------------------------------
// LLHUDEffectLookAt()
@@ -127,6 +241,10 @@ LLHUDEffectLookAt::LLHUDEffectLookAt(const U8 type) :
mLastSendTime(0.f)
{
clearLookAtTarget();
+ // parse the default sets
+ loadAttentions();
+ // initialize current attention set. switches when avatar sex changes.
+ mAttentions = &gGirlAttentions;
}
//-----------------------------------------------------------------------------
@@ -280,7 +398,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
llassert(target_type < LOOKAT_NUM_TARGETS);
// must be same or higher priority than existing effect
- if (LOOKAT_PRIORITIES[target_type] < LOOKAT_PRIORITIES[mTargetType])
+ if ((*mAttentions)[target_type].mPriority < (*mAttentions)[mTargetType].mPriority)
{
return FALSE;
}
@@ -288,8 +406,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
F32 current_time = mTimer.getElapsedTimeF32();
// type of lookat behavior or target object has changed
- BOOL lookAtChanged = (target_type != mTargetType) ||
- (object != mTargetObject);
+ BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject);
// lookat position has moved a certain amount and we haven't just sent an update
lookAtChanged = lookAtChanged || (dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) &&
@@ -298,7 +415,8 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
if (lookAtChanged)
{
mLastSentOffsetGlobal = position;
- setDuration(LOOKAT_TIMEOUTS[target_type]);
+ F32 timeout = (*mAttentions)[target_type].mTimeout;
+ setDuration(timeout);
setNeedsSendToSim(TRUE);
}
@@ -379,7 +497,7 @@ void LLHUDEffectLookAt::render()
glScalef(0.3f, 0.3f, 0.3f);
glBegin(GL_LINES);
{
- LLColor3 color = LOOKAT_COLORS[mTargetType];
+ LLColor3 color = (*mAttentions)[mTargetType].mColor;
glColor3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]);
glVertex3f(-1.f, 0.f, 0.f);
glVertex3f(1.f, 0.f, 0.f);
@@ -412,6 +530,13 @@ void LLHUDEffectLookAt::update()
return;
}
+ // make sure the proper set of avatar attention are currently being used.
+ LLVOAvatar* source_avatar = (LLVOAvatar*)(LLViewerObject*)mSourceObject;
+ // for now the first cut will just switch on sex. future development could adjust
+ // timeouts according to avatar age and/or other features.
+ mAttentions = (source_avatar->getSex() == SEX_MALE) ? &gBoyAttentions : &gGirlAttentions;
+ //printf("updated to %s\n", (source_avatar->getSex() == SEX_MALE) ? "male" : "female");
+
F32 time = mTimer.getElapsedTimeF32();
// clear out the effect if time is up
@@ -438,7 +563,7 @@ void LLHUDEffectLookAt::update()
if (sDebugLookAt)
{
- ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText(LOOKAT_STRINGS[mTargetType]);
+ ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText((*mAttentions)[mTargetType].mName);
}
}
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 @@
class LLViewerObject;
class LLVOAvatar;
+class LLAttentionSet;
typedef enum e_lookat_type
{
@@ -43,7 +44,7 @@ typedef enum e_lookat_type
LOOKAT_TARGET_FREELOOK,
LOOKAT_TARGET_RESPOND,
LOOKAT_TARGET_HOVER,
- LOOKAT_TARGET_CONVERSATION, // conversation mode deprecated
+ LOOKAT_TARGET_CONVERSATION,
LOOKAT_TARGET_SELECT,
LOOKAT_TARGET_FOCUS,
LOOKAT_TARGET_MOUSELOOK,
@@ -91,6 +92,7 @@ private:
LLFrameTimer mTimer;
LLVector3 mTargetPos;
F32 mLastSendTime;
+ LLAttentionSet* mAttentions;
};
#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 @@
void inc_busy_count()
{
// gViewerWindow->getWindow()->incBusyCount();
+// check balance of these calls if this code is changed to ever actually
+// *do* something!
}
void dec_busy_count()
{
// gViewerWindow->getWindow()->decBusyCount();
+// check balance of these calls if this code is changed to ever actually
+// *do* something!
}
// Function declarations
@@ -906,7 +910,7 @@ BOOL LLItemBridge::removeItem()
return FALSE;
}
// move it to the trash
- LLPreview::hide(mUUID);
+ LLPreview::hide(mUUID, TRUE);
LLInventoryModel* model = mInventoryPanel->getModel();
if(!model) return FALSE;
LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
@@ -1365,6 +1369,17 @@ protected:
void LLRightClickInventoryFetchDescendentsObserver::done()
{
+ // Avoid passing a NULL-ref as mCompleteFolders.front() down to
+ // gInventory.collectDescendents()
+ if( mCompleteFolders.empty() )
+ {
+ llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl;
+ dec_busy_count();
+ gInventory.removeObserver(this);
+ delete this;
+ return;
+ }
+
// What we do here is get the complete information on the items in
// the library, and set up an observer that will wait for that to
// happen.
@@ -1375,7 +1390,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
item_array,
LLInventoryModel::EXCLUDE_TRASH);
S32 count = item_array.count();
-#if 0
+#if 0 // HACK/TODO: Why?
// This early causes a giant menu to get produced, and doesn't seem to be needed.
if(!count)
{
@@ -2919,7 +2934,6 @@ void LLGestureBridge::openItem()
BOOL LLGestureBridge::removeItem()
{
// Force close the preview window, if it exists
- LLPreview::hide(mUUID);
gGestureManager.deactivateGesture(mUUID);
return LLItemBridge::removeItem();
}
@@ -3458,13 +3472,27 @@ public:
{
/*
* Do nothing. We only care about the destructor
+ *
+ * The reason for this is that this callback is used in a hack where the
+ * same callback is given to dozens of items, and the destructor is called
+ * after the last item has fired the event and dereferenced it -- if all
+ * the events actually fire!
*/
}
protected:
~LLWearInventoryCategoryCallback()
{
- wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend);
+ // Is the destructor called by ordinary dereference, or because the app's shutting down?
+ // If the inventory callback manager goes away, we're shutting down, no longer want the callback.
+ if( LLInventoryCallbackManager::is_instantiated() )
+ {
+ wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend);
+ }
+ else
+ {
+ llwarns << "Dropping unhandled LLWearInventoryCategoryCallback" << llendl;
+ }
}
private:
@@ -4214,8 +4242,17 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back("Restore Item");
}
else
- {
+ { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere
BOOL no_open = ((flags & SUPPRESS_OPEN_ITEM) == SUPPRESS_OPEN_ITEM);
+
+ // If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976
+ LLViewerInventoryItem* item = getItem();
+ if( !no_open && item )
+ {
+ no_open = (item->getType() == LLAssetType::AT_CLOTHING) ||
+ (item->getType() == LLAssetType::AT_BODYPART);
+ }
+
if (!no_open)
{
items.push_back("Open");
@@ -4242,7 +4279,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
LLWearableBridge::canEditOnAvatar,
(void*)this));*/
- LLViewerInventoryItem* item = getItem();
if( item && (item->getType() == LLAssetType::AT_CLOTHING) )
{
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)
if(view)
{
// request refresh on this item (also flags for filtering)
- view->refresh();
bridge = (LLInvFVBridge*)view->getListener();
if(bridge)
- {
+ { // Clear the display name first, so it gets properly re-built during refresh()
bridge->clearDisplayName();
}
+ view->refresh();
}
}
}
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(
const LLUUID& uuid,
LLAssetType::EType type,
void* user_data,
- S32 status)
+ S32 status,
+ LLExtStat ext_status )
{
if( status == 0 )
{
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:
const LLUUID& uuid,
LLAssetType::EType type,
void* user_data,
- S32 status);
+ S32 status,
+ LLExtStat ext_status );
protected:
typedef std::map 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 )
if (!selected_object)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object" << llendl;
+ llwarns << "Translate manip lost the object, no selected object" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -367,9 +367,12 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE)
{
LLCoordGL mouse_pos;
- gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos);
-
- if (gSavedSettings.getBOOL("SnapToMouseCursor"))
+ if (!gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos))
+ {
+ // mouse_pos may be nonsense
+ llwarns << "Failed to project object center to screen" << llendl;
+ }
+ else if (gSavedSettings.getBOOL("SnapToMouseCursor"))
{
LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY);
x = mouse_pos.mX;
@@ -480,7 +483,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (!selectNode)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object" << llendl;
+ llwarns << "Translate manip lost the object, no selectNode" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -489,7 +492,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (!object)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object" << llendl;
+ llwarns << "Translate manip lost the object, no object in selectNode" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
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
BOOL LLMuteList::add(const LLMute& mute, U32 flags)
{
// Can't mute text from Lindens
- if ((mute.mType == LLMute::AGENT || mute.mType == LLMute::BY_NAME)
+ if ((mute.mType == LLMute::AGENT)
&& isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0))
{
gViewerWindow->alertXml("MuteLinden");
@@ -613,7 +613,7 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**)
gMuteListp->loadFromFile(filename);
}
-void LLMuteList::onFileMuteList(void** user_data, S32 error_code)
+void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status)
{
llinfos << "LLMuteList::processMuteListFile()" << llendl;
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:
static void processMuteListUpdate(LLMessageSystem* msg, void**);
static void processUseCachedMuteList(LLMessageSystem* msg, void**);
- static void onFileMuteList(void** user_data, S32 code);
+ static void onFileMuteList(void** user_data, S32 code, LLExtStat ext_status);
private:
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()
}
/*virtual*/
-void LLNotifyBox::tick()
+BOOL LLNotifyBox::tick()
{
if (mIsTip)
{
close();
}
+ return FALSE;
}
void 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:
// Animate as sliding onto the screen.
/*virtual*/ void draw();
- /*virtual*/ void tick();
+ /*virtual*/ BOOL tick();
void moveToBack();
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()
{
// Apply is used for automatically saving results, so only
// do that if there is a difference, and this is a save not create.
- if (mDirty && mPaidFor)
+ if (checkDirty() && mPaidFor)
{
sendClassifiedInfoUpdate();
}
@@ -313,7 +313,8 @@ void LLPanelClassified::saveCallback(S32 option, void* data)
BOOL LLPanelClassified::canClose()
{
- if (mForceClose || !mDirty) return TRUE;
+ if (mForceClose || !checkDirty())
+ return TRUE;
LLString::format_map_t args;
args["[NAME]"] = mNameEditor->getText();
@@ -676,7 +677,7 @@ void LLPanelClassified::refresh()
mSetBtn->setVisible(is_self);
mSetBtn->setEnabled(is_self);
- mUpdateBtn->setEnabled(is_self && mDirty);
+ mUpdateBtn->setEnabled(is_self && checkDirty());
mUpdateBtn->setVisible(is_self);
}
}
@@ -736,29 +737,44 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, LLString text, vo
}
-// static
-void LLPanelClassified::callbackConfirmPublish(S32 option, void* data)
-{
- LLPanelClassified* self = (LLPanelClassified*)data;
+// invoked from callbackConfirmPublish
+void LLPanelClassified::confirmPublish(S32 option)
+{
// Option 0 = publish
if (option != 0) return;
- self->sendClassifiedInfoUpdate();
+ sendClassifiedInfoUpdate();
// Big hack - assume that top picks are always in a browser,
// and non-finder-classifieds are always in a tab container.
- if (self->mInFinder)
+ if (mInFinder)
{
// TODO: enable this
- //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)self->getParent();
- //panel->renameClassified(self->mClassifiedID, self->mNameEditor->getText().c_str());
+ //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)getParent();
+ //panel->renameClassified(mClassifiedID, mNameEditor->getText().c_str());
}
else
{
- LLTabContainerVertical* tab = (LLTabContainerVertical*)self->getParent();
- tab->setCurrentTabName(self->mNameEditor->getText());
+ LLTabContainerVertical* tab = (LLTabContainerVertical*)getParent();
+ tab->setCurrentTabName(mNameEditor->getText());
}
+
+ // Tell all the widgets to reset their dirty state since the ad was just saved
+ mSnapshotCtrl->resetDirty();
+ mNameEditor->resetDirty();
+ mDescEditor->resetDirty();
+ mLocationEditor->resetDirty();
+ mCategoryCombo->resetDirty();
+ mMatureCheck->resetDirty();
+ mAutoRenewCheck->resetDirty();
+}
+
+// static
+void LLPanelClassified::callbackConfirmPublish(S32 option, void* data)
+{
+ LLPanelClassified* self = (LLPanelClassified*)data;
+ self->confirmPublish(option);
}
// static
@@ -831,13 +847,27 @@ void LLPanelClassified::onClickSet(void* data)
}
+BOOL LLPanelClassified::checkDirty()
+{
+ mDirty = FALSE;
+ if ( mSnapshotCtrl ) mDirty |= mSnapshotCtrl->isDirty();
+ if ( mNameEditor ) mDirty |= mNameEditor->isDirty();
+ if ( mDescEditor ) mDirty |= mDescEditor->isDirty();
+ if ( mLocationEditor ) mDirty |= mLocationEditor->isDirty();
+ if ( mCategoryCombo ) mDirty |= mCategoryCombo->isDirty();
+ if ( mMatureCheck ) mDirty |= mMatureCheck->isDirty();
+ if ( mAutoRenewCheck ) mDirty |= mAutoRenewCheck->isDirty();
+
+ return mDirty;
+}
+
// static
void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
{
LLPanelClassified* self = (LLPanelClassified*)data;
if (self)
{
- self->mDirty = true;
+ self->checkDirty();
}
}
@@ -845,7 +875,6 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data)
{
// allow the data to be saved
- // Dave/Simon TODO: replace this with better isDirty() functionality
onCommitAny(ctrl, data);
}
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:
void sendClassifiedInfoRequest();
void sendClassifiedInfoUpdate();
+ void confirmPublish(S32 option);
static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
@@ -110,10 +111,11 @@ protected:
static void onCommitAny(LLUICtrl* ctrl, void* data);
void sendClassifiedClickMessage(const char* type);
+ BOOL checkDirty(); // Update and return mDirty
protected:
BOOL mInFinder;
- bool mDirty;
+ BOOL mDirty;
bool mForceClose;
LLUUID mClassifiedID;
LLUUID mRequestedID;
@@ -134,7 +136,6 @@ protected:
// Values the user may change
LLTextureCtrl* mSnapshotCtrl;
LLLineEditor* mNameEditor;
- LLLineEditor* mDateEditor;
LLTextEditor* mDescEditor;
LLLineEditor* mLocationEditor;
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()
// change fullscreen resolution or switch in/out of windowed mode
BOOL result;
- BOOL logged_in = (gStartupState >= STATE_STARTED);
+ BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
if (fullscreen)
{
result = gViewerWindow->changeDisplaySettings(TRUE,
@@ -526,7 +526,7 @@ void LLPanelDisplay2::apply()
LLImageGL::sGlobalUseAnisotropic = childGetValue("ani");
if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic)
{
- BOOL logged_in = (gStartupState >= STATE_STARTED);
+ BOOL logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
gViewerWindow->restartDisplay(logged_in);
}
@@ -655,9 +655,13 @@ void LLPanelDisplay3::refresh()
void LLPanelDisplay3::refreshEnabledState()
{
// Ripple Water
- bool ripple = (LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) >= 2);
+ bool ripple = (LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) >= 2) && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap");
mCtrlRippleWater->setEnabled(ripple ? TRUE : FALSE);
+ // Bump & Shiny
+ bool bumpshiny = gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap") && gFeatureManagerp->isFeatureAvailable("RenderObjectBump");
+ mCtrlBumpShiny->setEnabled(bumpshiny ? TRUE : FALSE);
+
// Avatar Mode
S32 max_avatar_shader = LLShaderMgr::getMaxVertexShaderLevel(LLShaderMgr::SHADER_AVATAR);
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,
mFounderName(NULL),
mInsignia(NULL),
mEditCharter(NULL),
- mEditName(NULL),
mBtnJoinGroup(NULL),
mListVisibleMembers(NULL),
mCtrlShowInGroupList(NULL),
@@ -256,7 +255,7 @@ BOOL LLPanelGroupGeneral::postBuild()
void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data)
{
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
- self->mChanged = TRUE;
+ self->updateChanged();
self->notifyObservers();
}
@@ -811,3 +810,22 @@ void LLPanelGroupGeneral::updateMembers()
mListVisibleMembers->setEnabled(FALSE);
}
}
+
+
+void LLPanelGroupGeneral::updateChanged()
+{
+ mChanged = FALSE;
+ if ( mGroupNameEditor )
+ mChanged = mGroupNameEditor->isDirty();
+ if ( mGroupName )
+ mChanged |= mGroupName->isDirty();
+ if ( mFounderName )
+ mChanged |= mFounderName->isDirty();
+ if ( mInsignia )
+ mChanged |= mInsignia->isDirty();
+ if ( mEditCharter )
+ mChanged |= mEditCharter->isDirty();
+// if ( mCtrlReceiveNotices ) // "Receive group notices" is different, see onReceiveNotices()
+// mChanged |= mCtrlReceiveNotices->isDirty();
+}
+
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:
static void joinDlgCB(S32 which, void *userdata);
void updateMembers();
+ void updateChanged();
BOOL mPendingMemberUpdate;
BOOL mChanged;
@@ -88,7 +89,6 @@ private:
LLNameBox *mFounderName;
LLTextureCtrl *mInsignia;
LLTextEditor *mEditCharter;
- LLLineEditor *mEditName;
LLButton *mBtnJoinGroup;
LLButton *mBtnInfo;
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 @@
#include "llgroupmgr.h"
#include "llnamelistctrl.h"
#include "llspinctrl.h"
+#include "lltextbox.h"
+#include "llviewerobject.h"
+#include "llviewerobjectlist.h"
#include "llvieweruictrlfactory.h"
class LLPanelGroupInvite::impl
@@ -65,7 +68,9 @@ public:
LLNameListCtrl *mInvitees;
LLComboBox *mRoleNames;
- LLButton *mRemoveButton;
+ LLButton *mOKButton;
+ LLButton *mRemoveButton;
+ LLTextBox *mGroupName;
void (*mCloseCallback)(void* data);
@@ -308,6 +313,8 @@ LLPanelGroupInvite::LLPanelGroupInvite(const std::string& name,
: LLPanel(name)
{
mImplementation = new impl(group_id);
+ mPendingUpdate = FALSE;
+ mStoreSelected = LLUUID::null;
std::string panel_def_file;
@@ -329,29 +336,132 @@ void LLPanelGroupInvite::setCloseCallback(void (*close_callback)(void*),
void LLPanelGroupInvite::clear()
{
+ mStoreSelected = LLUUID::null;
mImplementation->mInvitees->deleteAllItems();
mImplementation->mRoleNames->clear();
mImplementation->mRoleNames->removeall();
+ mImplementation->mOKButton->setEnabled(FALSE);
}
+void LLPanelGroupInvite::addUsers(std::vector& agent_ids)
+{
+ std::vector names;
+ for (S32 i = 0; i < (S32)agent_ids.size(); i++)
+ {
+ LLUUID agent_id = agent_ids[i];
+ LLViewerObject* dest = gObjectList.findObject(agent_id);
+ if(dest && dest->isAvatar())
+ {
+ LLString fullname;
+ LLString::format_map_t args;
+ LLNameValue* nvfirst = dest->getNVPair("FirstName");
+ LLNameValue* nvlast = dest->getNVPair("LastName");
+ if(nvfirst && nvlast)
+ {
+ args["[FIRST]"] = nvfirst->getString();
+ args["[LAST]"] = nvlast->getString();
+ fullname = nvfirst->getString();
+ fullname += " ";
+ fullname += nvlast->getString();
+ }
+ if (!fullname.empty())
+ {
+ names.push_back(fullname);
+ }
+ else
+ {
+ llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl;
+ names.push_back("(Unknown)");
+ }
+ }
+ }
+ mImplementation->addUsers(names, agent_ids);
+}
+
+void LLPanelGroupInvite::draw()
+{
+ LLPanel::draw();
+ if (mPendingUpdate)
+ {
+ updateLists();
+ }
+}
+
void LLPanelGroupInvite::update()
{
+ mPendingUpdate = FALSE;
+ if (mImplementation->mGroupName)
+ {
+ mImplementation->mGroupName->setText("(loading...)");
+ }
+ if ( mImplementation->mRoleNames )
+ {
+ mStoreSelected = mImplementation->mRoleNames->getCurrentID();
+ mImplementation->mRoleNames->clear();
+ mImplementation->mRoleNames->removeall();
+ mImplementation->mRoleNames->add("(loading...)", LLUUID::null, ADD_BOTTOM);
+ mImplementation->mRoleNames->setCurrentByID(LLUUID::null);
+ }
+
+ updateLists();
+}
+
+void LLPanelGroupInvite::updateLists()
+{
LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mImplementation->mGroupID);
+ BOOL waiting = FALSE;
- if (!gdatap || !gdatap->isRoleDataComplete())
+ if (gdatap)
+ {
+ if (gdatap->isGroupPropertiesDataComplete())
+ {
+ if (mImplementation->mGroupName)
+ {
+ mImplementation->mGroupName->setText(gdatap->mName);
+ }
+ }
+ else
+ {
+ waiting = TRUE;
+ }
+ if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete())
+ {
+ if ( mImplementation->mRoleNames )
+ {
+ mImplementation->mRoleNames->clear();
+ mImplementation->mRoleNames->removeall();
+
+ //add the role names and select the everybody role by default
+ mImplementation->addRoleNames(gdatap);
+ mImplementation->mRoleNames->setCurrentByID(mStoreSelected);
+ }
+ }
+ else
+ {
+ waiting = TRUE;
+ }
+ }
+ else
{
- gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID);
+ waiting = TRUE;
}
+
+ if (waiting)
+ {
+ if (!mPendingUpdate)
+ {
+ gGroupMgr->sendGroupPropertiesRequest(mImplementation->mGroupID);
+ gGroupMgr->sendGroupMembersRequest(mImplementation->mGroupID);
+ gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID);
+ }
+ mPendingUpdate = TRUE;
+ }
else
{
- if ( mImplementation->mRoleNames )
+ mPendingUpdate = FALSE;
+ if (mImplementation->mOKButton && mImplementation->mRoleNames->getItemCount())
{
- mImplementation->mRoleNames->clear();
- mImplementation->mRoleNames->removeall();
-
- //add the role names and select the everybody role by default
- mImplementation->addRoleNames(gdatap);
- mImplementation->mRoleNames->setCurrentByID(LLUUID::null);
+ mImplementation->mOKButton->setEnabled(TRUE);
}
}
}
@@ -362,6 +472,7 @@ BOOL LLPanelGroupInvite::postBuild()
mImplementation->mRoleNames = (LLComboBox*) getChildByName("role_name",
recurse);
+ mImplementation->mGroupName = (LLTextBox*) getChildByName("group_name_text", recurse);
mImplementation->mInvitees =
(LLNameListCtrl*) getChildByName("invitee_list", recurse);
if ( mImplementation->mInvitees )
@@ -390,12 +501,15 @@ BOOL LLPanelGroupInvite::postBuild()
mImplementation->mRemoveButton->setEnabled(FALSE);
}
- button = (LLButton*) getChildByName("ok_button", recurse);
- if ( button )
- {
- button->setClickedCallback(impl::callbackClickOK);
- button->setCallbackUserData(mImplementation);
- }
+ mImplementation->mOKButton =
+ (LLButton*) getChildByName("ok_button", recurse);
+ if ( mImplementation->mOKButton )
+ {
+ mImplementation->mOKButton->
+ setClickedCallback(impl::callbackClickOK);
+ mImplementation->mOKButton->setCallbackUserData(mImplementation);
+ mImplementation->mOKButton->setEnabled(FALSE);
+ }
button = (LLButton*) getChildByName("cancel_button", recurse);
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
public:
LLPanelGroupInvite(const std::string& name, const LLUUID& group_id);
~LLPanelGroupInvite();
-
+
+ void addUsers(std::vector& agent_ids);
void clear();
void update();
void setCloseCallback(void (*close_callback)(void*), void* data);
+ virtual void draw();
virtual BOOL postBuild();
protected:
class impl;
impl* mImplementation;
+
+ BOOL mPendingUpdate;
+ LLUUID mStoreSelected;
+ void updateLists();
};
#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 @@
#include "llmd5.h"
#include "llsecondlifeurls.h"
#include "llwindow.h" // shell_open()
-#include "llversion.h"
+#include "llversionviewer.h"
#include "v4color.h"
#include "llbutton.h"
@@ -139,6 +139,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
{
llwarns << "Duplicate instance of login view deleted" << llendl;
delete LLPanelLogin::sInstance;
+
+ // Don't leave bad pointer in gFocusMgr
+ gFocusMgr.setDefaultKeyboardFocus(NULL);
}
LLPanelLogin::sInstance = this;
@@ -525,9 +528,10 @@ void LLPanelLogin::show(const LLRect &rect,
{
// Grab focus and move cursor to first enabled control
sInstance->setFocus(TRUE);
- // make sure that focus always goes here
- gFocusMgr.setDefaultKeyboardFocus(sInstance);
}
+
+ // Make sure that focus always goes here (and use the latest sInstance that was just created)
+ gFocusMgr.setDefaultKeyboardFocus(sInstance);
}
// static
@@ -608,35 +612,40 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString &
}
-// static
-void LLPanelLogin::getServer(LLString &server, S32 &domain_name)
+// static. Return TRUE if user made a choice from the popup
+BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name)
{
+ BOOL user_picked = FALSE;
if (!sInstance)
{
llwarns << "Attempted getServer with no login view shown" << llendl;
- return;
}
-
- LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo");
- if (combo)
+ else
{
- LLSD combo_val = combo->getValue();
- if (LLSD::TypeInteger == combo_val.type())
+ LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo");
+ if (combo)
{
- domain_name = combo->getValue().asInteger();
+ LLSD combo_val = combo->getValue();
+ if (LLSD::TypeInteger == combo_val.type())
+ {
+ domain_name = combo->getValue().asInteger();
- if ((S32)USERSERVER_OTHER == domain_name)
+ if ((S32)USERSERVER_OTHER == domain_name)
+ {
+ server = gUserServerName;
+ }
+ }
+ else
{
- server = gUserServerName;
+ // no valid selection, return other
+ domain_name = (S32)USERSERVER_OTHER;
+ server = combo_val.asString();
}
- }
- else
- {
- // no valid selection, return other
- domain_name = (S32)USERSERVER_OTHER;
- server = combo_val.asString();
+ user_picked = combo->isDirty();
}
}
+
+ return user_picked;
}
// 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:
static void getFields(LLString &firstname, LLString &lastname,
LLString &password, BOOL &remember);
- static void getServer(LLString &server, S32& domain_name);
+ static BOOL getServer(LLString &server, S32& domain_name);
static void getLocation(LLString &location);
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()
}
}
+ mLabelSculptType = gUICtrlFactory->getTextBoxByName(this, "label sculpt type");
+ mCtrlSculptType = gUICtrlFactory->getComboBoxByName(this, "sculpt type control");
+ childSetCommitCallback("sculpt type control", onCommitSculptType, this);
+
// Start with everyone disabled
clearCtrls();
@@ -1035,7 +1039,10 @@ void LLPanelObject::getState( )
mLabelRevolutions->setVisible( revolutions_visible );
mSpinRevolutions ->setVisible( revolutions_visible );
- mCtrlSculptTexture->setVisible( sculpt_texture_visible );
+ bool sculpt_type_visible = FALSE; // currently not visible - for LSL setting only
+ mCtrlSculptTexture->setVisible(sculpt_texture_visible);
+ mLabelSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible);
+ mCtrlSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible);
// sculpt texture
@@ -1045,21 +1052,39 @@ void LLPanelObject::getState( )
LLUUID id;
LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
- LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control");
- if((mTextureCtrl) && (sculpt_params))
+
+ if (sculpt_params) // if we have a legal sculpt param block for this object:
{
- mTextureCtrl->setTentative(FALSE);
- mTextureCtrl->setEnabled(editable);
- if (editable)
- mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture());
- else
- mTextureCtrl->setImageAssetID(LLUUID::null);
-
-
if (mObject != objectp) // we've just selected a new object, so save for undo
+ {
mSculptTextureRevert = sculpt_params->getSculptTexture();
- }
+ mSculptTypeRevert = sculpt_params->getSculptType();
+ }
+
+ LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control");
+ if(mTextureCtrl)
+ {
+ mTextureCtrl->setTentative(FALSE);
+ mTextureCtrl->setEnabled(editable);
+ if (editable)
+ mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture());
+ else
+ mTextureCtrl->setImageAssetID(LLUUID::null);
+ }
+
+ if (mCtrlSculptType)
+ {
+ mCtrlSculptType->setCurrentByIndex(sculpt_params->getSculptType());
+ mCtrlSculptType->setEnabled(editable);
+ }
+ if (mLabelSculptType)
+ {
+ mLabelSculptType->setEnabled(TRUE);
+ }
+
+
+ }
}
@@ -1194,7 +1219,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata )
self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE);
LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
- volume_params.setSculptID(sculpt_params->getSculptTexture(), 0);
+ volume_params.setSculptID(sculpt_params->getSculptTexture(), sculpt_params->getSculptType());
}
else
{
@@ -1648,13 +1673,16 @@ void LLPanelObject::sendPosition()
void LLPanelObject::sendSculpt()
{
- LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(this,"sculpt texture control");
- if(!mTextureCtrl)
+ if (mObject.isNull())
return;
-
+
LLSculptParams sculpt_params;
- sculpt_params.setSculptTexture(mTextureCtrl->getImageAssetID());
- sculpt_params.setSculptType(LL_SCULPT_TYPE_SPHERE);
+
+ if (mCtrlSculptTexture)
+ sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID());
+
+ if (mCtrlSculptType)
+ sculpt_params.setSculptType(mCtrlSculptType->getCurrentIndex());
mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
}
@@ -1863,7 +1891,9 @@ void LLPanelObject::onSelectSculpt(LLUICtrl* ctrl, void* userdata)
LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control");
if (mTextureCtrl)
+ {
self->mSculptTextureRevert = mTextureCtrl->getImageAssetID();
+ }
self->sendSculpt();
}
@@ -1890,7 +1920,6 @@ BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdat
mTextureCtrl->setImageAssetID(asset);
self->mSculptTextureRevert = asset;
}
-
return TRUE;
}
@@ -1909,3 +1938,11 @@ void LLPanelObject::onCancelSculpt(LLUICtrl* ctrl, void* userdata)
self->sendSculpt();
}
+
+// static
+void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata)
+{
+ LLPanelObject* self = (LLPanelObject*) userdata;
+
+ self->sendSculpt();
+}
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:
static void onCommitSculpt( LLUICtrl* ctrl, void* userdata);
static void onCancelSculpt( LLUICtrl* ctrl, void* userdata);
static void onSelectSculpt( LLUICtrl* ctrl, void* userdata);
- static BOOL onDropSculpt(LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
+ static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
+ static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
+
protected:
void getState();
@@ -163,6 +165,8 @@ protected:
LLCheckBoxCtrl *mCheckCastShadows;
LLTextureCtrl *mCtrlSculptTexture;
+ LLTextBox *mLabelSculptType;
+ LLComboBox *mCtrlSculptType;
LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
BOOL mIsPhysical; // to avoid sending "physical" when not changed
@@ -172,6 +176,7 @@ protected:
S32 mSelectedType; // So we know what selected type we last were
LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel
+ U8 mSculptTypeRevert; // so we can revert the sculpt type on cancel
LLPointer mObject;
LLPointer 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()
childSetText("log_path_string", mLogPath);
childSetValue("log_instant_messages", mLogInstantMessages);
childSetValue("log_chat", mLogChat);
- childSetValue("log_show_history", mIMLogTimestamp);
+ childSetValue("log_show_history", mLogShowHistory);
childSetValue("log_instant_messages_timestamp", mIMLogTimestamp);
childSetValue("log_chat_timestamp", mLogChatTimestamp);
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 @@
-/**
- * @file llprefsvoice.h
- * @brief Voice chat preferences panel
- *
- * Copyright (c) 2003-2007, Linden Research, Inc.
+/**
+ * @file llprefsvoice.h
+ * @brief Voice chat preferences panel
+ *
+ * Copyright (c) 2003-2007, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -23,18 +23,18 @@
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- */
-
-#ifndef LLPREFSVOICE_H
-#define LLPREFSVOICE_H
-
-#include "llpanel.h"
-
-class LLFloaterDeviceSettings;
-
-class LLPrefsVoiceLogic
-{
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
+#ifndef LLPREFSVOICE_H
+#define LLPREFSVOICE_H
+
+#include "llpanel.h"
+
+class LLFloaterDeviceSettings;
+
+class LLPrefsVoiceLogic
+{
public:
LLPrefsVoiceLogic(LLPanel* panelp);
virtual ~LLPrefsVoiceLogic(){};
@@ -51,8 +51,8 @@ protected:
static void onClickSetKey(void* user_data);
static void onClickSetMiddleMouse(void* user_data);
- static void onEarLocationCommit(LLUICtrl* ctrl, void* user_data);
- static void onClickLaunchWizard(void* user_data);
+ static void onEarLocationCommit(LLUICtrl* ctrl, void* user_data);
+ static void onClickLaunchWizard(void* user_data);
BOOL mEnableVoice;
BOOL mVoiceCallsFriendsOnly;
@@ -60,28 +60,28 @@ protected:
std::string mModifier;
BOOL mPushToTalkToggle;
S32 mEarLocation;
- LLCtrlSelectionInterface *mCtrlEarLocation;
+ LLCtrlSelectionInterface *mCtrlEarLocation;
BOOL mEatNextSetKeyClick;
LLPanel* mPanel;
-};
-
-class LLPrefsVoice : public LLPanel
-{
-public:
- LLPrefsVoice();
- ~LLPrefsVoice();
-
- /*virtual*/ void draw();
- void apply();
- void cancel();
-
-protected:
- static void onClickDeviceSettingsBtn(void* user_data);
-
- LLPrefsVoiceLogic* mLogic;
- LLFloaterDeviceSettings* mDeviceSettings;
-};
-
-#endif // LLPREFSVOICE_H
+};
+
+class LLPrefsVoice : public LLPanel
+{
+public:
+ LLPrefsVoice();
+ ~LLPrefsVoice();
+
+ /*virtual*/ void draw();
+ void apply();
+ void cancel();
+
+protected:
+ static void onClickDeviceSettingsBtn(void* user_data);
+
+ LLPrefsVoiceLogic* mLogic;
+ LLFloaterDeviceSettings* mDeviceSettings;
+};
+
+#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* itemp
}
// static
-void LLPreview::hide(const LLUUID& item_uuid)
+void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ )
{
preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid);
if(found_it != LLPreview::sInstances.end())
{
LLPreview* instance = found_it->second;
+
+ if ( no_saving )
+ {
+ instance->mForceClose = TRUE;
+ }
+
instance->close();
}
}
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:
static LLPreview* find(const LLUUID& item_uuid);
static LLPreview* show(const LLUUID& item_uuid, BOOL take_focus = TRUE );
- static void hide(const LLUUID& item_uuid);
+ static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE );
static void rename(const LLUUID& item_uuid, const std::string& new_name);
static bool save(const LLUUID& item_uuid, LLPointer* itemptr);
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,
// virtual
BOOL LLPreviewGesture::canClose()
{
- if(!mDirty)
+
+ if(!mDirty || mForceClose)
{
return TRUE;
}
@@ -884,7 +885,7 @@ void LLPreviewGesture::loadAsset()
void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
LLUUID* item_idp = (LLUUID*)user_data;
LLPreview* preview = LLPreview::find(*item_idp);
@@ -1180,7 +1181,7 @@ void LLPreviewGesture::saveIfNeeded()
// TODO: This is very similar to LLPreviewNotecard::onSaveComplete.
// Could merge code.
// static
-void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLSaveInfo* info = (LLSaveInfo*)user_data;
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:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
void loadUIFromGesture(LLMultiGesture* gesture);
@@ -95,7 +95,7 @@ protected:
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
static void handleSaveChangesDialog(S32 option, void* userdata);
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()
void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl;
LLUUID* item_id = (LLUUID*)user_data;
@@ -537,7 +537,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
}
// static
-void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data;
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:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
static void onClickSave(void* data);
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
static void handleSaveChangesDialog(S32 option, void* userdata);
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(
const LLViewHandle& floater_handle,
void (*load_callback)(void*),
void (*save_callback)(void*, BOOL),
+ void (*search_replace_callback) (void* userdata),
void* userdata,
S32 bottom_pad)
:
@@ -300,6 +301,7 @@ LLScriptEdCore::LLScriptEdCore(
mEditor( NULL ),
mLoadCallback( load_callback ),
mSaveCallback( save_callback ),
+ mSearchReplaceCallback( search_replace_callback ),
mUserdata( userdata ),
mForceClose( FALSE ),
mLastHelpToken(NULL),
@@ -1028,7 +1030,9 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
{
if(getVisible() && getEnabled())
{
- if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL)))
+ bool just_control = MASK_CONTROL == (mask & MASK_MODIFIERS);
+
+ if(('S' == key) && just_control)
{
if(mSaveCallback)
{
@@ -1038,6 +1042,16 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
return TRUE;
}
+
+ if(('F' == key) && just_control)
+ {
+ if(mSearchReplaceCallback)
+ {
+ mSearchReplaceCallback(mUserdata);
+ }
+
+ return TRUE;
+ }
}
return FALSE;
}
@@ -1071,6 +1085,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
self->mViewHandle,
LLPreviewLSL::onLoad,
LLPreviewLSL::onSave,
+ LLPreviewLSL::onSearchReplace,
self,
0);
@@ -1220,6 +1235,13 @@ void LLPreviewLSL::open() /*Flawfinder: ignore*/
LLFloater::open(); /*Flawfinder: ignore*/
}
+void LLPreviewLSL::onSearchReplace(void* userdata)
+{
+ LLPreviewLSL* self = (LLPreviewLSL*)userdata;
+ LLScriptEdCore* sec = self->mScriptEd;
+ LLFloaterScriptSearch::show(sec);
+}
+
// static
void LLPreviewLSL::onLoad(void* userdata)
{
@@ -1386,7 +1408,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename,
// static
-void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLScriptSaveInfo* info = reinterpret_cast(user_data);
if(0 == status)
@@ -1435,7 +1457,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
}
// static
-void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLUUID* instance_uuid = (LLUUID*)user_data;
LLPreviewLSL* self = NULL;
@@ -1474,7 +1496,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
// static
void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid
<< llendl;
@@ -1579,6 +1601,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
self->mViewHandle,
&LLLiveLSLEditor::onLoad,
&LLLiveLSLEditor::onSave,
+ &LLLiveLSLEditor::onSearchReplace,
self,
0);
@@ -1793,7 +1816,7 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new)
// static
void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
<< llendl;
@@ -1976,6 +1999,15 @@ void LLLiveLSLEditor::draw()
}
}
+
+void LLLiveLSLEditor::onSearchReplace(void* userdata)
+{
+ LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
+
+ LLScriptEdCore* sec = self->mScriptEd;
+ LLFloaterScriptSearch::show(sec);
+}
+
struct LLLiveLSLSaveData
{
LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active);
@@ -2189,7 +2221,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename,
runningCheckbox->setEnabled(TRUE);
}
-void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data;
@@ -2219,7 +2251,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
}
-void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data;
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:
const LLViewHandle& floater_handle,
void (*load_callback)(void* userdata),
void (*save_callback)(void* userdata, BOOL close_after_save),
+ void (*search_replace_callback)(void* userdata),
void* userdata,
S32 bottom_pad = 0); // pad below bottom row of buttons
~LLScriptEdCore();
@@ -130,6 +131,7 @@ private:
LLTextEditor* mEditor;
void (*mLoadCallback)(void* userdata);
void (*mSaveCallback)(void* userdata, BOOL close_after_save);
+ void (*mSearchReplaceCallback) (void* userdata);
void* mUserdata;
LLComboBox *mFunctions;
BOOL mForceClose;
@@ -169,14 +171,15 @@ protected:
const LLUUID& item_id,
const LLTransactionID& tid);
+ static void onSearchReplace(void* userdata);
static void onLoad(void* userdata);
static void onSave(void* userdata, BOOL close_after_save);
static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
- static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status);
- static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
static LLPreviewLSL* getInstance(const LLUUID& uuid);
static void* createScriptEdPanel(void* userdata);
@@ -229,14 +232,15 @@ protected:
const LLTransactionID& tid,
BOOL is_running);
+ static void onSearchReplace(void* userdata);
static void onLoad(void* userdata);
static void onSave(void* userdata, BOOL close_after_save);
static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
- static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status);
- static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
static void onRunningCheckboxClicked(LLUICtrl*, void* userdata);
static void onReset(void* userdata);
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)
#endif
}
-#if !LL_RELEASE_FOR_DOWNLOAD
+#if LL_DEBUG
void validate_drawable(LLDrawable* drawablep)
{
F64 rad = drawablep->getBinRadius();
@@ -153,10 +153,6 @@ LLSpatialGroup::~LLSpatialGroup()
void LLSpatialGroup::clearDrawMap()
{
- for (LLSpatialGroup::draw_map_t::iterator i = mDrawMap.begin(); i != mDrawMap.end(); ++i)
- {
- std::for_each(i->second.begin(), i->second.end(), DeletePointer());
- }
mDrawMap.clear();
}
@@ -2323,7 +2319,7 @@ void pushVerts(LLSpatialGroup* group, U32 mask)
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
- for (std::vector::iterator j = i->second.begin(); j != i->second.end(); ++j)
+ for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
{
params = *j;
pushVerts(params, mask);
@@ -2351,7 +2347,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
- for (std::vector::iterator j = i->second.begin(); j != i->second.end(); ++j)
+ for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
{
params = *j;
glColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f);
@@ -2702,8 +2698,8 @@ public:
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
- std::vector& draw_vec = i->second;
- for (std::vector::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j)
+ LLSpatialGroup::drawmap_elem_t& draw_vec = i->second;
+ for (LLSpatialGroup::drawmap_elem_t::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j)
{
LLDrawInfo* draw_info = *j;
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_ANIM))
@@ -2889,6 +2885,11 @@ LLDrawInfo::LLDrawInfo(U32 start, U32 end, U32 count, U32 offset,
{
}
+LLDrawInfo::~LLDrawInfo()
+{
+
+}
+
LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage)
{
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 @@
class LLSpatialPartition;
class LLSpatialBridge;
-class LLDrawInfo
+class LLDrawInfo : public LLRefCount
{
+protected:
+ ~LLDrawInfo();
+
public:
LLDrawInfo(U32 start, U32 end, U32 count, U32 offset,
LLViewerImage* image, LLVertexBuffer* buffer,
BOOL fullbright = FALSE, U8 bump = 0, BOOL particle = FALSE, F32 part_size = 0);
+
LLPointer mVertexBuffer;
LLPointer mTexture;
LLPointer mReflectionMap;
@@ -78,18 +82,21 @@ public:
struct CompareTexturePtr
{
- bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs)
+ bool operator()(const LLPointer& lhs, const LLPointer& rhs)
{
-
- return lhs == NULL || rhs == NULL || lhs->mTexture > rhs->mTexture;
+ // sort by pointer, sort NULL down to the end
+ return lhs.get() != rhs.get()
+ && (lhs.isNull() || (rhs.notNull() && lhs->mTexture.get() > rhs->mTexture.get()));
}
};
struct CompareBump
{
- bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs)
+ bool operator()(const LLPointer& lhs, const LLPointer& rhs)
{
- return lhs == NULL || rhs == NULL || lhs->mBump > rhs->mBump;
+ // sort by mBump value, sort NULL down to the end
+ return lhs.get() != rhs.get()
+ && (lhs.isNull() || (rhs.notNull() && lhs->mBump > rhs->mBump));
}
};
};
@@ -102,7 +109,8 @@ public:
typedef std::vector > sg_vector_t;
typedef std::set > sg_set_t;
typedef std::vector > bridge_list_t;
- typedef std::map > draw_map_t;
+ typedef std::vector > drawmap_elem_t;
+ typedef std::map draw_map_t;
typedef std::map, LLPointer > buffer_map_t;
typedef LLOctreeListener 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 @@
#include "llsecondlifeurls.h"
#include "llstring.h"
#include "lluserrelations.h"
-#include "llversion.h"
+#include "llversionviewer.h"
#include "llvfs.h"
#include "llwindow.h" // for shell_open
#include "llxorcipher.h" // saved password, MAC address
@@ -216,6 +216,9 @@ LLString gInitialOutfitGender; // "male" or "female"
static bool gUseCircuitCallbackCalled = false;
+S32 LLStartUp::gStartupState = STATE_FIRST;
+
+
//
// local function declaration
//
@@ -356,7 +359,7 @@ BOOL idle_startup()
gImageList.updateImages(0.01f);
}
- if (STATE_FIRST == gStartupState)
+ if ( STATE_FIRST == LLStartUp::getStartupState() )
{
gViewerWindow->showCursor();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT);
@@ -565,10 +568,7 @@ BOOL idle_startup()
#endif // LL_LINUX
std::ostringstream codec;
- codec << "[Second Life ";
- codec << "(" << gChannelName << ")";
- codec << " - " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD;
- codec << "]";
+ codec << "[Second Life " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD << "]";
LLMozLib::getInstance()->setBrowserAgentId( codec.str() );
#endif
@@ -608,67 +608,49 @@ BOOL idle_startup()
llwarns << "Unreliable timers detected (may be bad PCI chipset)!!" << llendl;
}
- // Get ready to show the login dialog
- if (!gConnectToSomething)
+ //
+ // Log on to system
+ //
+ if( !gCmdLineFirstName.empty()
+ && !gCmdLineLastName.empty()
+ && !gCmdLinePassword.empty())
{
- // Don't use a session token, and generate a random user id
- gAgentID.generate();
- gAgentSessionID = LLUUID::null;
+ firstname = gCmdLineFirstName;
+ lastname = gCmdLineLastName;
- gStartupState = STATE_WORLD_INIT;
- return do_normal_idle;
+ LLMD5 pass((unsigned char*)gCmdLinePassword.c_str());
+ char md5pass[33]; /* Flawfinder: ignore */
+ pass.hex_digest(md5pass);
+ password = md5pass;
+
+ remember_password = gSavedSettings.getBOOL("RememberPassword");
+ show_connect_box = FALSE;
}
- else if (!gRunLocal)
+ else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin"))
{
- //
- // Log on to userserver
- //
- if( !gCmdLineFirstName.empty()
- && !gCmdLineLastName.empty()
- && !gCmdLinePassword.empty())
- {
- firstname = gCmdLineFirstName;
- lastname = gCmdLineLastName;
-
- LLMD5 pass((unsigned char*)gCmdLinePassword.c_str());
- char md5pass[33]; /* Flawfinder: ignore */
- pass.hex_digest(md5pass);
- password = md5pass;
-
- remember_password = gSavedSettings.getBOOL("RememberPassword");
- show_connect_box = FALSE;
- }
- else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin"))
- {
- firstname = gSavedSettings.getString("FirstName");
- lastname = gSavedSettings.getString("LastName");
- password = load_password_from_disk();
- remember_password = TRUE;
- show_connect_box = FALSE;
- }
- else
- {
- // if not automatically logging in, display login dialog
- // until a valid userserver is selected
- firstname = gSavedSettings.getString("FirstName");
- lastname = gSavedSettings.getString("LastName");
- password = load_password_from_disk();
- remember_password = gSavedSettings.getBOOL("RememberPassword");
- show_connect_box = TRUE;
- }
-
- // Go to the next startup state
- gStartupState++;
- return do_normal_idle;
+ firstname = gSavedSettings.getString("FirstName");
+ lastname = gSavedSettings.getString("LastName");
+ password = load_password_from_disk();
+ remember_password = TRUE;
+ show_connect_box = FALSE;
}
else
{
- gStartupState++;
- return do_normal_idle;
+ // if not automatically logging in, display login dialog
+ // until a valid userserver is selected
+ firstname = gSavedSettings.getString("FirstName");
+ lastname = gSavedSettings.getString("LastName");
+ password = load_password_from_disk();
+ remember_password = gSavedSettings.getBOOL("RememberPassword");
+ show_connect_box = TRUE;
}
+
+ // Go to the next startup state
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+ return do_normal_idle;
}
- if (STATE_LOGIN_SHOW == gStartupState)
+ if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
{
llinfos << "Initializing Window" << llendl;
@@ -678,45 +660,37 @@ BOOL idle_startup()
timeout_count = 0;
- if (gConnectToSomething && !gRunLocal)
+ if (show_connect_box)
{
- if (show_connect_box)
+ if (gNoRender)
{
- if (gNoRender)
- {
- llerrs << "Need to autologin or use command line with norender!" << llendl;
- }
- // Make sure the process dialog doesn't hide things
- gViewerWindow->setShowProgress(FALSE);
+ llerrs << "Need to autologin or use command line with norender!" << llendl;
+ }
+ // Make sure the process dialog doesn't hide things
+ gViewerWindow->setShowProgress(FALSE);
- // Show the login dialog
- login_show();
+ // Show the login dialog
+ login_show();
- // connect dialog is already shown, so fill in the names
- LLPanelLogin::setFields( firstname, lastname, password, remember_password );
- LLPanelLogin::giveFocus();
+ // connect dialog is already shown, so fill in the names
+ LLPanelLogin::setFields( firstname, lastname, password, remember_password );
+ LLPanelLogin::giveFocus();
- gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
+ gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
- gStartupState++;
- }
- else
- {
- // skip directly to message template verification
- gStartupState = STATE_LOGIN_CLEANUP;
- }
+ LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input
}
else
{
- gMessageSystem->setCircuitProtection(FALSE);
- gStartupState = STATE_LOGIN_CLEANUP;
+ // skip directly to message template verification
+ LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
timeout.reset();
return do_normal_idle;
}
- if (STATE_LOGIN_WAIT == gStartupState)
+ if (STATE_LOGIN_WAIT == LLStartUp::getStartupState())
{
// Don't do anything. Wait for the login view to call the login_callback,
// which will push us to the next state.
@@ -726,7 +700,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- if (STATE_LOGIN_CLEANUP == gStartupState)
+ if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
{
if (show_connect_box)
{
@@ -794,7 +768,7 @@ BOOL idle_startup()
{
LLString server_label;
S32 domain_name_index;
- LLPanelLogin::getServer( server_label, domain_name_index );
+ BOOL user_picked_server = LLPanelLogin::getServer( server_label, domain_name_index );
gUserServerChoice = (EUserServerDomain) domain_name_index;
gSavedSettings.setS32("ServerChoice", gUserServerChoice);
if (gUserServerChoice == USERSERVER_OTHER)
@@ -802,14 +776,11 @@ BOOL idle_startup()
snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */
}
- // Dave S temp reversion of SL-49082 fix - this code breaks command line urls. I'll fix this with
- // the control isDirty() functionality tomorrow.
-
- //if ( userPickedServer )
- //{ // User picked a grid from the popup, so clear the stored urls so they will be re-generated from gUserServerChoice
- // auth_uris.clear();
- // resetURIs();
- //}
+ if ( user_picked_server )
+ { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gUserServerChoice
+ auth_uris.clear();
+ resetURIs();
+ }
LLString location;
LLPanelLogin::getLocation( location );
@@ -872,18 +843,18 @@ BOOL idle_startup()
init_colors();
// skipping over STATE_UPDATE_CHECK because that just waits for input
- gStartupState = STATE_LOGIN_AUTH_INIT;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
return do_normal_idle;
}
- if (STATE_UPDATE_CHECK == gStartupState)
+ if (STATE_UPDATE_CHECK == LLStartUp::getStartupState())
{
// wait for user to give input via dialog box
return do_normal_idle;
}
- if(STATE_LOGIN_AUTH_INIT == gStartupState)
+ if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState())
{
//#define LL_MINIMIAL_REQUESTED_OPTIONS
lldebugs << "STATE_LOGIN_AUTH_INIT" << llendl;
@@ -930,10 +901,10 @@ BOOL idle_startup()
auth_desc = "Logging in. ";
auth_desc += gSecondLife;
auth_desc += " may appear frozen. Please wait.";
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
}
- if (STATE_LOGIN_AUTHENTICATE == gStartupState)
+ if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState())
{
lldebugs << "STATE_LOGIN_AUTHENTICATE" << llendl;
set_startup_status(progress, auth_desc.c_str(), auth_message.c_str());
@@ -985,11 +956,11 @@ BOOL idle_startup()
// reset globals
gAcceptTOS = FALSE;
gAcceptCriticalMessage = FALSE;
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_NO_DATA_YET );
return do_normal_idle;
}
- if(STATE_LOGIN_NO_DATA_YET == gStartupState)
+ if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState())
{
//lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl;
if (!gUserAuthp)
@@ -1008,13 +979,13 @@ BOOL idle_startup()
//llinfos << "waiting..." << llendl;
return do_normal_idle;
}
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_DOWNLOADING );
progress += 0.01f;
set_startup_status(progress, auth_desc.c_str(), auth_message.c_str());
return do_normal_idle;
}
- if(STATE_LOGIN_DOWNLOADING == gStartupState)
+ if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState())
{
lldebugs << "STATE_LOGIN_DOWNLOADING" << llendl;
if (!gUserAuthp)
@@ -1033,13 +1004,13 @@ BOOL idle_startup()
//llinfos << "downloading..." << llendl;
return do_normal_idle;
}
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
progress += 0.01f;
set_startup_status(progress, "Processing Response...", auth_message.c_str());
return do_normal_idle;
}
- if(STATE_LOGIN_PROCESS_RESPONSE == gStartupState)
+ if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
{
lldebugs << "STATE_LOGIN_PROCESS_RESPONSE" << llendl;
std::ostringstream emsg;
@@ -1078,7 +1049,7 @@ BOOL idle_startup()
}
// ignoring the duration & options array for now.
// Go back to authenticate.
- gStartupState = STATE_LOGIN_AUTHENTICATE;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
return do_normal_idle;
}
else
@@ -1101,7 +1072,7 @@ BOOL idle_startup()
if (show_connect_box)
{
llinfos << "Need tos agreement" << llendl;
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
message_response);
tos_dialog->startModal();
@@ -1118,7 +1089,7 @@ BOOL idle_startup()
if (show_connect_box)
{
llinfos << "Need critical message" << llendl;
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
message_response);
tos_dialog->startModal();
@@ -1142,7 +1113,7 @@ BOOL idle_startup()
if (show_connect_box)
{
update_app(TRUE, auth_message);
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
return FALSE;
}
else
@@ -1157,7 +1128,7 @@ BOOL idle_startup()
if (show_connect_box)
{
update_app(FALSE, auth_message);
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
gSkipOptionalUpdate = TRUE;
return FALSE;
}
@@ -1180,7 +1151,7 @@ BOOL idle_startup()
s << "Previous login attempt failed. Logging in, attempt "
<< (auth_uri_num + 1) << ". ";
auth_desc = s.str();
- gStartupState = STATE_LOGIN_AUTHENTICATE;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
auth_uri_num++;
return do_normal_idle;
}
@@ -1410,7 +1381,7 @@ BOOL idle_startup()
&& first_sim.isOk()
&& gAgent.mInventoryRootID.notNull())
{
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_WORLD_INIT );
}
else
{
@@ -1454,7 +1425,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// World Init
//---------------------------------------------------------------------
- if (STATE_WORLD_INIT == gStartupState)
+ if (STATE_WORLD_INIT == LLStartUp::getStartupState())
{
set_startup_status(0.40f, "Initializing World...", gAgent.mMOTD.c_str());
display_startup();
@@ -1497,38 +1468,26 @@ BOOL idle_startup()
// User might have overridden far clip
gWorldp->setLandFarClip( gAgent.mDrawDistance );
- if (!gRunLocal)
- {
- // Before we create the first region, we need to set the agent's mOriginGlobal
- // This is necessary because creating objects before this is set will result in a
- // bad mPositionAgent cache.
+ // Before we create the first region, we need to set the agent's mOriginGlobal
+ // This is necessary because creating objects before this is set will result in a
+ // bad mPositionAgent cache.
- gAgent.initOriginGlobal(from_region_handle(first_sim_handle));
+ gAgent.initOriginGlobal(from_region_handle(first_sim_handle));
- gWorldp->addRegion(first_sim_handle, first_sim);
+ gWorldp->addRegion(first_sim_handle, first_sim);
- LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle);
- llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl;
-
- gStartupState = STATE_SEED_GRANTED_WAIT;
- regionp->setSeedCapability(first_sim_seed_cap);
-
- // Set agent's initial region to be the one we just created.
- gAgent.setRegion(regionp);
+ LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle);
+ llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl;
+
+ LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
+ regionp->setSeedCapability(first_sim_seed_cap);
+
+ // Set agent's initial region to be the one we just created.
+ gAgent.setRegion(regionp);
- // Set agent's initial position, which will be read by LLVOAvatar when the avatar
- // object is created. I think this must be done after setting the region. JC
- gAgent.setPositionAgent(agent_start_position_region);
- }
- else
- {
- // With one simulator, assume region is at 0,0, hence has regionHandle 0
- // VEFFECT: Login
- gWorldp->addRegion(0, gAgentSimHost);
- gAgent.setRegion(gWorldp->getRegionFromHandle(0));
-
- gStartupState = STATE_SEED_CAP_GRANTED;
- }
+ // Set agent's initial position, which will be read by LLVOAvatar when the avatar
+ // object is created. I think this must be done after setting the region. JC
+ gAgent.setPositionAgent(agent_start_position_region);
display_startup();
return do_normal_idle;
@@ -1538,7 +1497,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Wait for Seed Cap Grant
//---------------------------------------------------------------------
- if(STATE_SEED_GRANTED_WAIT == gStartupState)
+ if(STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
llinfos << "Waiting for seed grant ...." << llendl;
return do_normal_idle;
@@ -1549,7 +1508,7 @@ BOOL idle_startup()
// Seed Capability Granted
// no newMessage calls should happen before this point
//---------------------------------------------------------------------
- if (STATE_SEED_CAP_GRANTED == gStartupState)
+ if (STATE_SEED_CAP_GRANTED == LLStartUp::getStartupState())
{
update_texture_fetch();
@@ -1682,42 +1641,35 @@ BOOL idle_startup()
// For all images pre-loaded into viewer cache, decode them.
// Need to do this AFTER we init the sky
gImageList.decodeAllImages(2.f);
- gStartupState++;
+ LLStartUp::setStartupState( STATE_QUICKTIME_INIT );
// JC - Do this as late as possible to increase likelihood Purify
// will run.
- if (!gRunLocal)
+ LLMessageSystem* msg = gMessageSystem;
+ if (!msg->mOurCircuitCode)
{
- LLMessageSystem* msg = gMessageSystem;
- if (!msg->mOurCircuitCode)
- {
- llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
- }
-
- gUseCircuitCallbackCalled = FALSE;
-
- msg->enableCircuit(first_sim, TRUE);
- // now, use the circuit info to tell simulator about us!
- llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
- msg->newMessageFast(_PREHASH_UseCircuitCode);
- msg->nextBlockFast(_PREHASH_CircuitCode);
- msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
- msg->sendReliable(
- first_sim,
- MAX_TIMEOUT_COUNT,
- FALSE,
- TIMEOUT_SECONDS,
- use_circuit_callback,
- NULL);
+ llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
}
+ gUseCircuitCallbackCalled = FALSE;
+
+ msg->enableCircuit(first_sim, TRUE);
+ // now, use the circuit info to tell simulator about us!
+ llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
+ msg->newMessageFast(_PREHASH_UseCircuitCode);
+ msg->nextBlockFast(_PREHASH_CircuitCode);
+ msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
+ msg->sendReliable(
+ first_sim,
+ MAX_TIMEOUT_COUNT,
+ FALSE,
+ TIMEOUT_SECONDS,
+ use_circuit_callback,
+ NULL);
+
timeout.reset();
- if (!gConnectToSomething)
- {
- gStartupState = STATE_MISC;
- }
return do_normal_idle;
}
@@ -1725,7 +1677,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// LLMediaEngine Init
//---------------------------------------------------------------------
- if (STATE_QUICKTIME_INIT == gStartupState)
+ if (STATE_QUICKTIME_INIT == LLStartUp::getStartupState())
{
if (gViewerWindow)
{
@@ -1760,20 +1712,20 @@ BOOL idle_startup()
}
#endif
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WORLD_WAIT );
return do_normal_idle;
}
//---------------------------------------------------------------------
// Agent Send
//---------------------------------------------------------------------
- if(STATE_WORLD_WAIT == gStartupState)
+ if(STATE_WORLD_WAIT == LLStartUp::getStartupState())
{
//llinfos << "Waiting for simulator ack...." << llendl;
set_startup_status(0.49f, "Waiting for region handshake...", gAgent.mMOTD.c_str());
if(gGotUseCircuitCodeAck)
{
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_AGENT_SEND );
}
LLMessageSystem* msg = gMessageSystem;
while (msg->checkAllMessages(gFrameCount, gServicePump))
@@ -1786,7 +1738,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Agent Send
//---------------------------------------------------------------------
- if (STATE_AGENT_SEND == gStartupState)
+ if (STATE_AGENT_SEND == LLStartUp::getStartupState())
{
llinfos << "Connecting to region..." << llendl;
set_startup_status(0.50f, "Connecting to region...", gAgent.mMOTD.c_str());
@@ -1797,7 +1749,7 @@ BOOL idle_startup()
_PREHASH_AgentMovementComplete,
process_agent_movement_complete);
LLViewerRegion* regionp = gAgent.getRegion();
- if(!gRunLocal && regionp)
+ if(regionp)
{
send_complete_agent_movement(regionp->getHost());
gAssetStorage->setUpstream(regionp->getHost());
@@ -1805,10 +1757,6 @@ BOOL idle_startup()
msg->newMessageFast(_PREHASH_EconomyDataRequest);
gAgent.sendReliableMessage();
}
- else
- {
- gStartupState++;
- }
// Create login effect
// But not on first login, because you can't see your avatar then
@@ -1820,7 +1768,7 @@ BOOL idle_startup()
gHUDManager->sendEffects();
}
- gStartupState++;
+ LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT
timeout.reset();
return do_normal_idle;
@@ -1829,14 +1777,13 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Agent Wait
//---------------------------------------------------------------------
- if (STATE_AGENT_WAIT == gStartupState)
+ if (STATE_AGENT_WAIT == LLStartUp::getStartupState())
{
LLMessageSystem* msg = gMessageSystem;
while (msg->checkAllMessages(gFrameCount, gServicePump))
{
if (gAgentMovementCompleted)
{
- gStartupState++;
// Sometimes we have more than one message in the
// queue. break out of this loop and continue
// processing. If we don't, then this could skip one
@@ -1850,183 +1797,187 @@ BOOL idle_startup()
}
}
msg->processAcks();
+
+ if (gAgentMovementCompleted)
+ {
+ LLStartUp::setStartupState( STATE_INVENTORY_SEND );
+ }
+
return do_normal_idle;
}
//---------------------------------------------------------------------
// Inventory Send
//---------------------------------------------------------------------
- if (STATE_INVENTORY_SEND == gStartupState)
+ if (STATE_INVENTORY_SEND == LLStartUp::getStartupState())
{
if (!gUserAuthp)
{
llerrs << "No userauth in STATE_INVENTORY_SEND!" << llendl;
}
- if (gConnectToSomething && !gRunLocal)
+ // unpack thin inventory
+ LLUserAuth::options_t options;
+ options.clear();
+ //bool dump_buffer = false;
+
+ if(gUserAuthp->getOptions("inventory-lib-root", options)
+ && !options.empty())
{
- // unpack thin inventory
- LLUserAuth::options_t options;
- options.clear();
- //bool dump_buffer = false;
-
- if(gUserAuthp->getOptions("inventory-lib-root", options)
- && !options.empty())
+ // should only be one
+ LLUserAuth::response_t::iterator it;
+ it = options[0].find("folder_id");
+ if(it != options[0].end())
{
- // should only be one
- LLUserAuth::response_t::iterator it;
- it = options[0].find("folder_id");
- if(it != options[0].end())
- {
- gInventoryLibraryRoot.set((*it).second.c_str());
- }
+ gInventoryLibraryRoot.set((*it).second.c_str());
}
- options.clear();
- if(gUserAuthp->getOptions("inventory-lib-owner", options)
- && !options.empty())
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("inventory-lib-owner", options)
+ && !options.empty())
+ {
+ // should only be one
+ LLUserAuth::response_t::iterator it;
+ it = options[0].find("agent_id");
+ if(it != options[0].end())
{
- // should only be one
- LLUserAuth::response_t::iterator it;
- it = options[0].find("agent_id");
- if(it != options[0].end())
- {
- gInventoryLibraryOwner.set((*it).second.c_str());
- }
+ gInventoryLibraryOwner.set((*it).second.c_str());
}
- options.clear();
- if(gUserAuthp->getOptions("inventory-skel-lib", options)
- && gInventoryLibraryOwner.notNull())
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("inventory-skel-lib", options)
+ && gInventoryLibraryOwner.notNull())
+ {
+ if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
{
- if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
- {
- llwarns << "Problem loading inventory-skel-lib" << llendl;
- }
+ llwarns << "Problem loading inventory-skel-lib" << llendl;
}
- options.clear();
- if(gUserAuthp->getOptions("inventory-skeleton", options))
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("inventory-skeleton", options))
+ {
+ if(!gInventory.loadSkeleton(options, gAgent.getID()))
{
- if(!gInventory.loadSkeleton(options, gAgent.getID()))
- {
- llwarns << "Problem loading inventory-skel-targets"
- << llendl;
- }
+ llwarns << "Problem loading inventory-skel-targets"
+ << llendl;
}
-
- options.clear();
- if(gUserAuthp->getOptions("buddy-list", options))
- {
- LLUserAuth::options_t::iterator it = options.begin();
- LLUserAuth::options_t::iterator end = options.end();
- LLAvatarTracker::buddy_map_t list;
- LLUUID agent_id;
- S32 has_rights = 0, given_rights = 0;
- for (; it != end; ++it)
+ }
+
+ options.clear();
+ if(gUserAuthp->getOptions("buddy-list", options))
+ {
+ LLUserAuth::options_t::iterator it = options.begin();
+ LLUserAuth::options_t::iterator end = options.end();
+ LLAvatarTracker::buddy_map_t list;
+ LLUUID agent_id;
+ S32 has_rights = 0, given_rights = 0;
+ for (; it != end; ++it)
+ {
+ LLUserAuth::response_t::const_iterator option_it;
+ option_it = (*it).find("buddy_id");
+ if(option_it != (*it).end())
{
- LLUserAuth::response_t::const_iterator option_it;
- option_it = (*it).find("buddy_id");
- if(option_it != (*it).end())
- {
- agent_id.set((*option_it).second.c_str());
- }
- option_it = (*it).find("buddy_rights_has");
- if(option_it != (*it).end())
- {
- has_rights = atoi((*option_it).second.c_str());
- }
- option_it = (*it).find("buddy_rights_given");
- if(option_it != (*it).end())
- {
- given_rights = atoi((*option_it).second.c_str());
- }
- list[agent_id] = new LLRelationship(given_rights, has_rights, false);
+ agent_id.set((*option_it).second.c_str());
}
- LLAvatarTracker::instance().addBuddyList(list);
- }
-
- options.clear();
- if(gUserAuthp->getOptions("ui-config", options))
- {
- LLUserAuth::options_t::iterator it = options.begin();
- LLUserAuth::options_t::iterator end = options.end();
- for (; it != end; ++it)
+ option_it = (*it).find("buddy_rights_has");
+ if(option_it != (*it).end())
{
- LLUserAuth::response_t::const_iterator option_it;
- option_it = (*it).find("allow_first_life");
- if(option_it != (*it).end())
- {
- if (option_it->second == "Y")
- {
- LLPanelAvatar::sAllowFirstLife = TRUE;
- }
- }
+ has_rights = atoi((*option_it).second.c_str());
}
- }
-
- options.clear();
- if(gUserAuthp->getOptions("event_categories", options))
- {
- LLEventInfo::loadCategories(options);
- }
- if(gUserAuthp->getOptions("event_notifications", options))
- {
- gEventNotifier.load(options);
+ option_it = (*it).find("buddy_rights_given");
+ if(option_it != (*it).end())
+ {
+ given_rights = atoi((*option_it).second.c_str());
+ }
+ list[agent_id] = new LLRelationship(given_rights, has_rights, false);
}
- options.clear();
- if(gUserAuthp->getOptions("classified_categories", options))
+ LLAvatarTracker::instance().addBuddyList(list);
+ }
+
+ options.clear();
+ if(gUserAuthp->getOptions("ui-config", options))
+ {
+ LLUserAuth::options_t::iterator it = options.begin();
+ LLUserAuth::options_t::iterator end = options.end();
+ for (; it != end; ++it)
{
- LLClassifiedInfo::loadCategories(options);
+ LLUserAuth::response_t::const_iterator option_it;
+ option_it = (*it).find("allow_first_life");
+ if(option_it != (*it).end())
+ {
+ if (option_it->second == "Y")
+ {
+ LLPanelAvatar::sAllowFirstLife = TRUE;
+ }
+ }
}
- gInventory.buildParentChildMap();
- gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null);
- gInventory.notifyObservers();
+ }
- // set up callbacks
- LLMessageSystem* msg = gMessageSystem;
- LLInventoryModel::registerCallbacks(msg);
- LLAvatarTracker::instance().registerCallbacks(msg);
- LLLandmark::registerCallbacks(msg);
-
- // request mute list
- gMuteListp->requestFromServer(gAgent.getID());
-
- // Get L$ and ownership credit information
- msg->newMessageFast(_PREHASH_MoneyBalanceRequest);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_MoneyData);
- msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null );
- gAgent.sendReliableMessage();
+ options.clear();
+ if(gUserAuthp->getOptions("event_categories", options))
+ {
+ LLEventInfo::loadCategories(options);
+ }
+ if(gUserAuthp->getOptions("event_notifications", options))
+ {
+ gEventNotifier.load(options);
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("classified_categories", options))
+ {
+ LLClassifiedInfo::loadCategories(options);
+ }
+ gInventory.buildParentChildMap();
+ gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null);
+ gInventory.notifyObservers();
- // request all group information
- // *FIX: This will not do the right thing if the message
- // gets there before the requestuserserverconnection
- // circuit is completed.
- gAgent.sendAgentDataUpdateRequest();
+ // set up callbacks
+ LLMessageSystem* msg = gMessageSystem;
+ LLInventoryModel::registerCallbacks(msg);
+ LLAvatarTracker::instance().registerCallbacks(msg);
+ LLLandmark::registerCallbacks(msg);
+ // request mute list
+ gMuteListp->requestFromServer(gAgent.getID());
- // NOTE: removed as part of user-privacy
- // enhancements. this information should be available from
- // login. 2006-10-16 Phoenix.
- // get the users that have been granted modify powers
- //msg->newMessageFast(_PREHASH_RequestGrantedProxies);
- //msg->nextBlockFast(_PREHASH_AgentData);
- //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- //gAgent.sendReliableMessage();
+ // Get L$ and ownership credit information
+ msg->newMessageFast(_PREHASH_MoneyBalanceRequest);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_MoneyData);
+ msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null );
+ gAgent.sendReliableMessage();
- BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory");
+ // request all group information
+ // *FIX: This will not do the right thing if the message
+ // gets there before the requestuserserverconnection
+ // circuit is completed.
+ gAgent.sendAgentDataUpdateRequest();
- // Create the inventory views
- LLInventoryView::showAgentInventory();
- // Hide the inventory if it wasn't shown at exit
- if(!shown_at_exit)
- {
- LLInventoryView::toggleVisibility(NULL);
- }
+ // NOTE: removed as part of user-privacy
+ // enhancements. this information should be available from
+ // login. 2006-10-16 Phoenix.
+ // get the users that have been granted modify powers
+ //msg->newMessageFast(_PREHASH_RequestGrantedProxies);
+ //msg->nextBlockFast(_PREHASH_AgentData);
+ //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ //gAgent.sendReliableMessage();
+
+ BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory");
+
+ // Create the inventory views
+ LLInventoryView::showAgentInventory();
+
+ // Hide the inventory if it wasn't shown at exit
+ if(!shown_at_exit)
+ {
+ LLInventoryView::toggleVisibility(NULL);
}
- gStartupState++;
+
+ LLStartUp::setStartupState( STATE_MISC );
return do_normal_idle;
}
@@ -2034,14 +1985,8 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Misc
//---------------------------------------------------------------------
- if (STATE_MISC == gStartupState)
+ if (STATE_MISC == LLStartUp::getStartupState())
{
- // Create a few objects if we don't actually have a world
- if (!gConnectToSomething)
- {
- // could add them here
- }
-
// We have a region, and just did a big inventory download.
// We can estimate the user's connection speed, and set their
// max bandwidth accordingly. JC
@@ -2060,7 +2005,7 @@ BOOL idle_startup()
{
llinfos << "Fast network connection, increasing max bandwidth to "
<< FASTER_RATE_BPS/1024.f
- << " Kbps" << llendl;
+ << " kbps" << llendl;
gViewerThrottle.setMaxBandwidth(FASTER_RATE_BPS / 1024.f);
}
else if (rate_bps > FAST_RATE_BPS
@@ -2068,7 +2013,7 @@ BOOL idle_startup()
{
llinfos << "Fast network connection, increasing max bandwidth to "
<< FAST_RATE_BPS/1024.f
- << " Kbps" << llendl;
+ << " kbps" << llendl;
gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f);
}
}
@@ -2220,12 +2165,12 @@ BOOL idle_startup()
}
}
- gStartupState++;
+ LLStartUp::setStartupState( STATE_PRECACHE );
timeout.reset();
return do_normal_idle;
}
- if (STATE_PRECACHE == gStartupState)
+ if (STATE_PRECACHE == LLStartUp::getStartupState())
{
do_normal_idle = TRUE;
@@ -2234,7 +2179,7 @@ BOOL idle_startup()
if(((timeout_frac > 1.f) && gAgent.getAvatarObject())
|| (timeout_frac > 3.f))
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WEARABLES_WAIT );
}
else
{
@@ -2246,7 +2191,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- if (STATE_WEARABLES_WAIT == gStartupState)
+ if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState())
{
do_normal_idle = TRUE;
@@ -2257,13 +2202,13 @@ BOOL idle_startup()
if(gAgent.getWearablesLoaded() || !gAgent.isGenderChosen())
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_CLEANUP );
}
else if (wearables_time > MAX_WEARABLES_TIME)
{
gViewerWindow->alertXml("ClothingLoading");
gViewerStats->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG);
- gStartupState++;
+ LLStartUp::setStartupState( STATE_CLEANUP );
}
else
{
@@ -2275,7 +2220,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- if (STATE_CLEANUP == gStartupState)
+ if (STATE_CLEANUP == LLStartUp::getStartupState())
{
set_startup_status(1.0, "", NULL);
@@ -2347,7 +2292,7 @@ BOOL idle_startup()
gUserAuthp = NULL;
}
- gStartupState++;
+ LLStartUp::setStartupState( STATE_STARTED );
// Unmute audio if desired and setup volumes
audio_update_volume();
@@ -2361,7 +2306,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- llwarns << "Reached end of idle_startup for state " << gStartupState << llendl;
+ llwarns << "Reached end of idle_startup for state " << LLStartUp::getStartupState() << llendl;
return do_normal_idle;
}
@@ -2421,7 +2366,7 @@ void login_callback(S32 option, void *userdata)
if (CONNECT_OPTION == option)
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
return;
}
else if (QUIT_OPTION == option)
@@ -2688,7 +2633,7 @@ void update_dialog_callback(S32 option, void *userdata)
#if !LL_RELEASE_FOR_DOWNLOAD
if (option == 2)
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WORLD_INIT );
return;
}
#endif
@@ -2704,7 +2649,7 @@ void update_dialog_callback(S32 option, void *userdata)
}
else
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WORLD_INIT );
}
return;
}
@@ -3089,7 +3034,7 @@ void init_stat_view()
stat_barp->mDisplayHistory = FALSE;
stat_barp = stat_viewp->addStat("Packet Loss", &(gViewerStats->mPacketsLostPercentStat));
- stat_barp->setUnitLabel(" %%");
+ stat_barp->setUnitLabel(" %");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 5.f;
stat_barp->mTickSpacing = 1.f;
@@ -3109,16 +3054,6 @@ void init_stat_view()
stat_barp->mPerSec = FALSE;
stat_barp->mDisplayMean = FALSE;
- stat_barp = stat_viewp->addStat("Ping User", &(gViewerStats->mUserserverPingStat));
- stat_barp->setUnitLabel(" msec");
- stat_barp->mMinBar = 0.f;
- stat_barp->mMaxBar = 1000.f;
- stat_barp->mTickSpacing = 100.f;
- stat_barp->mLabelSpacing = 200.f;
- stat_barp->mDisplayBar = FALSE;
- stat_barp->mPerSec = FALSE;
- stat_barp->mDisplayMean = FALSE;
-
stat_viewp = new LLStatView("advanced stat view", "Advanced", "OpenDebugStatAdvanced", rect);
gDebugView->mStatViewp->addChildAtEnd(stat_viewp);
@@ -3740,17 +3675,31 @@ void release_start_screen()
gStartImageGL = NULL;
}
+// static
bool LLStartUp::canGoFullscreen()
{
- return gStartupState >= STATE_WORLD_INIT;
+ return LLStartUp::getStartupState() >= STATE_WORLD_INIT;
}
+
+// static
+void LLStartUp::setStartupState( S32 state )
+{
+ llinfos << "Startup state changing from " << gStartupState << " to " << state << llendl;
+ gStartupState = state;
+}
+
+
void reset_login()
{
- gStartupState = STATE_LOGIN_SHOW;
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
if ( gViewerWindow )
{ // Hide menus and normal buttons
gViewerWindow->setNormalControlsVisible( FALSE );
}
+
+ // Hide any other stuff
+ if ( gFloaterMap )
+ gFloaterMap->setVisible( FALSE );
}
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;
extern const char* SCREEN_LAST_FILENAME;
enum EStartupState{
- STATE_FIRST,
- STATE_LOGIN_SHOW,
- STATE_LOGIN_WAIT,
- STATE_LOGIN_CLEANUP,
- STATE_UPDATE_CHECK,
- STATE_LOGIN_AUTH_INIT,
- STATE_LOGIN_AUTHENTICATE,
- STATE_LOGIN_NO_DATA_YET,
- STATE_LOGIN_DOWNLOADING,
- STATE_LOGIN_PROCESS_RESPONSE,
- STATE_WORLD_INIT,
- STATE_SEED_GRANTED_WAIT,
- STATE_SEED_CAP_GRANTED,
- STATE_QUICKTIME_INIT,
- STATE_WORLD_WAIT,
- STATE_AGENT_SEND,
- STATE_AGENT_WAIT,
- STATE_INVENTORY_SEND,
- STATE_MISC,
- STATE_PRECACHE,
- STATE_WEARABLES_WAIT,
- //STATE_INVENTORY_WAIT,
- //STATE_TOS_AGREEMENT_START,
- //STATE_TOS_AGREEMENT_WAIT,
- //STATE_CRITICAL_MESSAGE_START,
- //STATE_CRITICAL_MESSAGE_WAIT,
- STATE_CLEANUP,
- STATE_STARTED
+ STATE_FIRST, // Initial startup
+ STATE_LOGIN_SHOW, // Show login screen
+ STATE_LOGIN_WAIT, // Wait for user input at login screen
+ STATE_LOGIN_CLEANUP, // Get rid of login screen and start login
+ STATE_UPDATE_CHECK, // Wait for user at a dialog box (updates, term-of-service, etc)
+ STATE_LOGIN_AUTH_INIT, // Start login to SL servers
+ STATE_LOGIN_AUTHENTICATE, // Do authentication voodoo
+ STATE_LOGIN_NO_DATA_YET, // Waiting for authentication replies to start
+ STATE_LOGIN_DOWNLOADING, // Waiting for authentication replies to download
+ STATE_LOGIN_PROCESS_RESPONSE, // Check authentication reply
+ STATE_WORLD_INIT, // Start building the world
+ STATE_SEED_GRANTED_WAIT, // Wait for seed cap grant
+ STATE_SEED_CAP_GRANTED, // Have seed cap grant
+ STATE_QUICKTIME_INIT, // Initialzie QT
+ STATE_WORLD_WAIT, // Waiting for simulator
+ STATE_AGENT_SEND, // Connect to a region
+ STATE_AGENT_WAIT, // Wait for region
+ STATE_INVENTORY_SEND, // Do inventory transfer
+ STATE_MISC, // Do more things (set bandwidth, start audio, save location, etc)
+ STATE_PRECACHE, // Wait a bit for textures to download
+ STATE_WEARABLES_WAIT, // Wait for clothing to download
+ STATE_CLEANUP, // Final cleanup
+ STATE_STARTED // Up and running in-world
};
-// exorted symbol
-extern S32 gStartupState;
+// exported symbols
extern BOOL gAgentMovementCompleted;
extern bool gUseQuickTime;
extern bool gQuickTimeInitialized;
@@ -85,6 +79,13 @@ public:
static bool canGoFullscreen();
// returns true if we are far enough along in startup to allow
// going full screen
+
+ // Always use this to set gStartupState so changes are logged
+ static void setStartupState( S32 state );
+ static S32 getStartupState() { return gStartupState; };
+
+protected:
+ static S32 gStartupState; // Do not set directly, use LLStartup::setStartupState
};
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)
LLString text = childGetText("bandwidth_tooltip") + " ";
LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven
mSGBandwidth->setLabel(bandwidth_tooltip.getString().c_str());
- mSGBandwidth->setUnits("Kbps");
+ mSGBandwidth->setUnits("kbps");
mSGBandwidth->setPrecision(0);
addChild(mSGBandwidth);
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)
// static
-void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result) // StoreAssetData callback (not fixed)
+void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result, LLExtStat ext_status) // StoreAssetData callback (not fixed)
{
LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata;
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:
void readBackAndUpload(U8* baked_bump_data);
static void onTextureUploadComplete( const LLUUID& uuid,
void* userdata,
- S32 result);
+ S32 result, LLExtStat ext_status);
static void dumpTotalByteCount();
private:
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:
void setCanApplyImmediately(BOOL b);
void setDirty( BOOL b ) { mIsDirty = b; }
- BOOL isDirty() { return mIsDirty; }
+ BOOL isDirty() const { return mIsDirty; }
void setActive( BOOL active );
LLTextureCtrl* getOwner() const { return mOwner; }
@@ -908,7 +908,8 @@ LLTextureCtrl::LLTextureCtrl(
mNonImmediateFilterPermMask( PERM_NONE ),
mCanApplyImmediately( FALSE ),
mNeedsRawImageData( FALSE ),
- mValid( TRUE )
+ mValid( TRUE ),
+ mDirty( FALSE )
{
mCaption = new LLTextBox( label,
LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ),
@@ -1070,6 +1071,18 @@ void LLTextureCtrl::setValid(BOOL valid )
}
}
+// virtual
+BOOL LLTextureCtrl::isDirty() const
+{
+ return mDirty;
+}
+
+// virtual
+void LLTextureCtrl::resetDirty()
+{
+ mDirty = FALSE;
+}
+
// virtual
void LLTextureCtrl::clear()
@@ -1186,6 +1199,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
if( floaterp && mEnabled)
{
+ mDirty = (op != TEXTURE_CANCEL);
if( floaterp->isDirty() )
{
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:
virtual void setVisible( BOOL visible );
virtual void setEnabled( BOOL enabled );
+ virtual BOOL isDirty() const;
+ virtual void resetDirty();
+
void setValid(BOOL valid);
// LLUICtrl interface
@@ -169,6 +172,7 @@ private:
BOOL mNeedsRawImageData;
LLViewBorder* mBorder;
BOOL mValid;
+ BOOL mDirty;
};
// 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()
LLVector3 grab_point_agent = mGrabObject->getRenderPosition();
LLCoordGL gl_point;
- gCamera->projectPosAgentToScreen(grab_point_agent, gl_point);
-
- LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY);
+ if (gCamera->projectPosAgentToScreen(grab_point_agent, gl_point))
+ {
+ LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY);
+ }
}
else
{
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)
avatarp->updateComposites();
avatarp->updateVisualParams();
avatarp->updateGeometry(avatarp->mDrawable);
+ avatarp->updateLOD();
+
LLDynamicTexture::preRender(clear_depth);
}
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)
break;
}
}
-
mGrabMouseButtonDown = FALSE;
gToolMgr->clearTransientTool();
+ gAgent.setLookAt(LOOKAT_TARGET_CONVERSATION, obj); // maybe look at object/person clicked on
return LLTool::handleMouseUp(x, y, mask);
}
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)
// static virtual
void LLTracker::drawHUDArrow()
{
- /* tracking autopilot destination has been disabled
- -- 2004.01.09, Leviathan
- // Draw dot for autopilot target
- if (gAgent.getAutoPilot())
- {
- instance()->drawMarker( gAgent.getAutoPilotTargetGlobal(), gTrackColor );
- return;
- }
- */
switch (getTrackingStatus())
{
case TRACKING_AVATAR:
@@ -479,7 +470,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
if (dist > 0.99f * gCamera->getFar())
{
color_frac = 0.4f;
- // pos_global = gAgent.getCameraPositionGlobal() + 0.99f*(gCamera->getFar()/dist)*to_vec;
}
else
{
@@ -504,7 +494,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
- //glScalef(1.f, 1.f, 1000.f);
glColor4fv(fogged_color.mV);
const U32 BEACON_VERTS = 256;
const F32 step = 1024.0f/BEACON_VERTS;
@@ -554,24 +543,30 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
glEnd();
}
- //gCylinder.render(1000);
glPopMatrix();
- char text[1024]; /* Flawfinder: ignore */
- snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */
+ if (!gCamera || to_vec.magVec() > gCamera->getFar())
+ {
+ hud_textp->clearString();
+ }
+ else
+ {
+ char text[1024]; /* Flawfinder: ignore */
+ snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */
- LLWString wstr;
- wstr += utf8str_to_wstring(label);
- wstr += '\n';
- wstr += utf8str_to_wstring(text);
+ LLWString wstr;
+ wstr += utf8str_to_wstring(label);
+ wstr += '\n';
+ wstr += utf8str_to_wstring(text);
- hud_textp->setFont(LLFontGL::sSansSerif);
- hud_textp->setZCompare(FALSE);
- hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST))));
+ hud_textp->setFont(LLFontGL::sSansSerif);
+ hud_textp->setZCompare(FALSE);
+ hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST))));
- hud_textp->setString(wstr);
- hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER);
- hud_textp->setPositionAgent(pos_agent);
+ hud_textp->setString(wstr);
+ hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER);
+ hud_textp->setPositionAgent(pos_agent);
+ }
}
@@ -643,6 +638,14 @@ void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color)
return;
}
+ LLVector3d to_vec = pos_global - gAgent.getCameraPositionGlobal();
+ to_vec.mdV[2] = 0;
+
+ if (to_vec.magVec() > gCamera->getFar())
+ { //only draw arrow if lateral distance to object is less than view distance.
+ return;
+ }
+
// get position
LLVector3 pos_local = gAgent.getPosAgentFromGlobal(pos_global);
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 @@
#include
#include "lldir.h"
-#include "llversion.h"
+#include "llversionviewer.h"
#include "viewer.h"
#include "llviewerbuild.h"
#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(
delete req;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED);
+ callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_VFS_CORRUPT);
}
return;
}
@@ -117,7 +117,7 @@ void LLViewerAssetStorage::storeAssetData(
llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE);
+ callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_VFS_CORRUPT);
}
return;
}
@@ -142,7 +142,7 @@ void LLViewerAssetStorage::storeAssetData(
llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE);
+ callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE);
}
}
}
@@ -151,7 +151,7 @@ void LLViewerAssetStorage::storeAssetData(
llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE);
+ callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@@ -220,7 +220,7 @@ void LLViewerAssetStorage::storeAssetData(
{
if (callback)
{
- callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE);
+ callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE);
}
}
}
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;
class LLViewerAssetStorage : public LLAssetStorage
{
public:
- typedef void (*LLStoreAssetCallback)(const LLUUID &transaction_id, void *user_data, S32 status);
-
LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
LLVFS *vfs, const LLHost &upstream_host);
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 @@
* COMPLETENESS OR PERFORMANCE.
*/
-#include "llversion.h"
+#include "llversionviewer.h"
-// Set the build number in indra/llcommon/llversion.h!
+// Set the build number in indra/llcommon/llversionviewer.h!
const 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 @@
#include "lldir.h"
#include "lldynamictexture.h"
#include "lldrawpoolalpha.h"
+#include "llfeaturemanager.h"
#include "llframestats.h"
#include "llgl.h"
#include "llglheaders.h"
@@ -217,7 +218,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
// Bail out if we're in the startup state and don't want to try to
// render the world.
//
- if (gStartupState < STATE_STARTED)
+ if (LLStartUp::getStartupState() < STATE_STARTED)
{
display_startup();
return;
@@ -315,12 +316,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
}
break;
- case LLAgent::TELEPORT_CANCELLING:
- gViewerWindow->setProgressCancelButtonVisible(FALSE, "Cancel");
- gViewerWindow->setProgressPercent( 100.f );
- gViewerWindow->setProgressString("Canceling...");
- break;
-
case LLAgent::TELEPORT_NONE:
// No teleport in progress
gViewerWindow->setShowProgress(FALSE);
@@ -430,7 +425,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
}
else
{
- LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery;
+ LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion");
}
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)
sMaxTotalTextureMem -= sMaxBoundTextureMem/4;
}
- if ((U32)sMaxTotalTextureMem > gSysMemory.getPhysicalMemory() - (U32)min_non_tex_system_mem)
+ if ((U32)sMaxTotalTextureMem > gSysMemory.getPhysicalMemoryClamped() - (U32)min_non_tex_system_mem)
{
- sMaxTotalTextureMem = (S32)gSysMemory.getPhysicalMemory() - min_non_tex_system_mem;
+ sMaxTotalTextureMem = (S32)gSysMemory.getPhysicalMemoryClamped() - min_non_tex_system_mem;
}
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 LLViewerImageList::convertToUploadFile(LLPointerbiasedScaleToPowerOfTwo(LLViewerImage::MAX_IMAGE_SIZE_DEFAULT);
LLPointer compressedImage = new LLImageJ2C();
compressedImage->setRate(0.f);
+
+ if (gSavedSettings.getBOOL("LosslessJ2CUpload") &&
+ (raw_image->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) &&
+ (raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF))
+ compressedImage->setReversible(TRUE);
+
compressedImage->encode(raw_image);
return compressedImage;
@@ -1170,7 +1176,7 @@ S32 LLViewerImageList::getMaxVideoRamSetting(S32 max)
}
llwarns << "VRAM amount not detected, defaulting to " << max_vram/(double)(1<<20) << " MB" << llendl;
}
- U32 system_ram = gSysMemory.getPhysicalMemory();
+ U32 system_ram = gSysMemory.getPhysicalMemoryClamped();
//llinfos << "*** DETECTED " << system_ram/(double)(1<<20) << " MB of system memory." << llendl; // TomY TESTING DNCI
if (max == -2)
{
@@ -1396,7 +1402,7 @@ S32 LLViewerImageList::calcMaxTextureRAM()
{
// Decide the maximum amount of RAM we should allow the user to allocate to texture cache
LLMemoryInfo memory_info;
- U32 available_memory = memory_info.getPhysicalMemory();
+ U32 available_memory = memory_info.getPhysicalMemoryClamped();
clamp_rescale((F32)available_memory,
(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 @@
#include
#include
+const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128;
+
const BOOL MIPMAP_YES = TRUE;
const BOOL MIPMAP_NO = FALSE;
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 @@
#include "llinventoryview.h"
+#include "llviewerregion.h"
+#include "llviewerobjectlist.h"
+
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
@@ -551,13 +554,27 @@ void inventory_reliable_callback(void**, S32 status)
}
}
*/
+LLInventoryCallbackManager *LLInventoryCallbackManager::sInstance = NULL;
+
LLInventoryCallbackManager::LLInventoryCallbackManager() :
mLastCallback(0)
{
+ if( sInstance != NULL )
+ {
+ llwarns << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << llendl;
+ return;
+ }
+ sInstance = this;
}
LLInventoryCallbackManager::~LLInventoryCallbackManager()
{
+ if( sInstance != this )
+ {
+ llwarns << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << llendl;
+ return;
+ }
+ sInstance = NULL;
}
U32 LLInventoryCallbackManager::registerCB(LLPointer cb)
@@ -701,29 +718,56 @@ void move_inventory_item(
gAgent.sendReliableMessage();
}
-void _copy_inventory_from_notecard_hdr(const LLUUID& object_id, const LLUUID& notecard_inv_id)
+class LLCopyInventoryFromNotecardResponder : public LLHTTPClient::Responder
{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_CopyInventoryFromNotecard);
- msg->nextBlock(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlock(_PREHASH_NotecardData);
- msg->addUUIDFast(_PREHASH_NotecardItemID, notecard_inv_id);
- msg->addUUIDFast(_PREHASH_ObjectID, object_id);
-}
+public:
+ //If we get back a normal response, handle it here
+ virtual void result(const LLSD& content)
+ {
+ // What do we do here?
+ llinfos << "CopyInventoryFromNotecard request successful." << llendl;
+ }
+
+ //If we get back an error (not found, etc...), handle it here
+ virtual void error(U32 status, const std::string& reason)
+ {
+ llinfos << "LLCopyInventoryFromNotecardResponder::error "
+ << status << ": " << reason << llendl;
+ }
+};
-void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src)
+void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
{
- LLMessageSystem* msg = gMessageSystem;
- /*
- * I was going to handle multiple inventory items here, but then I realized that
- * we are only handling one at a time. Perhaps you can only select one at a
- * time from the notecard?
- */
- _copy_inventory_from_notecard_hdr(object_id, notecard_inv_id);
- msg->nextBlockFast(_PREHASH_InventoryData);
- msg->addUUIDFast(_PREHASH_ItemID, src->getUUID());
- msg->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(src->getType()));
- gAgent.sendReliableMessage();
+ LLSD body;
+ LLViewerRegion* viewer_region = NULL;
+ if(object_id.notNull())
+ {
+ LLViewerObject* vo = gObjectList.findObject(object_id);
+ if(vo)
+ {
+ viewer_region = vo->getRegion();
+ }
+ }
+
+ // Fallback to the agents region if for some reason the
+ // object isn't found in the viewer.
+ if(!viewer_region)
+ {
+ viewer_region = gAgent.getRegion();
+ }
+
+ if(viewer_region)
+ {
+ std::string url = viewer_region->getCapability("CopyInventoryFromNotecard");
+ if (!url.empty())
+ {
+ body["notecard-id"] = notecard_inv_id;
+ body["object-id"] = object_id;
+ body["item-id"] = src->getUUID();
+ body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType());
+ body["callback-id"] = (LLSD::Integer)callback_id;
+
+ LLHTTPClient::post(url, body, new LLCopyInventoryFromNotecardResponder());
+ }
+ }
}
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:
private:
std::map > mMap;
U32 mLastCallback;
+ static LLInventoryCallbackManager *sInstance;
+public:
+ static bool is_instantiated() { return sInstance != NULL; }
};
extern LLInventoryCallbackManager gInventoryCallbacks;
@@ -269,7 +272,8 @@ void move_inventory_item(
void copy_inventory_from_notecard(const LLUUID& object_id,
const LLUUID& notecard_inv_id,
- const LLInventoryItem *src);
+ const LLInventoryItem *src,
+ U32 callback_id = 0);
#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 @@
#include "indra_constants.h"
#include "llassetstorage.h"
#include "llchat.h"
+#include "llfeaturemanager.h"
#include "llfocusmgr.h"
#include "llfontgl.h"
#include "llinstantmessage.h"
@@ -98,6 +99,7 @@
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
#include "llfloatergroupinfo.h"
+#include "llfloatergroupinvite.h"
#include "llfloatergroups.h"
#include "llfloaterhtml.h"
#include "llfloaterhtmlhelp.h"
@@ -411,7 +413,7 @@ void toggle_debug_menus(void*);
void toggle_map( void* user_data );
void export_info_callback(LLAssetInfo *info, void **user_data, S32 result);
void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result);
-void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result);
+void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
BOOL menu_check_build_tool( void* user_data );
void handle_reload_settings(void*);
void focus_here(void*);
@@ -1226,7 +1228,7 @@ void init_debug_rendering_menu(LLMenuGL* menu)
LLMenuItemCheckGL* item;
item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT);
- item->setEnabled(gGLManager.mHasOcclusionQuery);
+ item->setEnabled(gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion"));
menu->append(item);
@@ -5100,6 +5102,43 @@ class LLToolsLookAtSelection : public view_listener_t
}
};
+void callback_invite_to_group(LLUUID group_id, void *user_data)
+{
+ std::vector agent_ids;
+ agent_ids.push_back(*(LLUUID *)user_data);
+
+ LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
+}
+
+void invite_to_group(const LLUUID& dest_id)
+{
+ LLViewerObject* dest = gObjectList.findObject(dest_id);
+ if(dest && dest->isAvatar())
+ {
+ LLFloaterGroupPicker* widget;
+ widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
+ if (widget)
+ {
+ widget->center();
+ widget->setPowersMask(GP_MEMBER_INVITE);
+ widget->setSelectCallback(callback_invite_to_group, (void *)&dest_id);
+ }
+ }
+}
+
+class LLAvatarInviteToGroup : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVOAvatar* avatar = find_avatar_from_object( gViewerWindow->lastObjectHit() );
+ if(avatar)
+ {
+ invite_to_group(avatar->getID());
+ }
+ return true;
+ }
+};
+
class LLAvatarAddFriend : public view_listener_t
{
bool handleEvent(LLPointer event, const LLSD& userdata)
@@ -7434,7 +7473,7 @@ class LLViewToggleRenderType : public view_listener_t
bool handleEvent(LLPointer event, const LLSD& userdata)
{
LLString type = userdata.asString();
- if (type == "particles")
+ if (type == "hideparticles")
{
LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
}
@@ -7448,7 +7487,7 @@ class LLViewCheckRenderType : public view_listener_t
{
LLString type = userdata["data"].asString();
bool new_value = false;
- if (type == "particles")
+ if (type == "hideparticles")
{
new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
}
@@ -7750,6 +7789,7 @@ void initialize_menus()
addMenu(new LLAvatarDebug(), "Avatar.Debug");
addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug");
+ addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
addMenu(new LLAvatarEject(), "Avatar.Eject");
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,
}
}
-void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result) // StoreAssetData callback (fixed)
+void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLResourceData* data = (LLResourceData*)user_data;
//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 @@
#include "llfloatermute.h"
#include "llfloaterpostcard.h"
#include "llfloaterpreference.h"
+#include "llfloaterreleasemsg.h"
#include "llfollowcam.h"
#include "llgroupnotify.h"
#include "llhudeffect.h"
@@ -573,6 +574,15 @@ void join_group_callback(S32 option, void* user_data)
LLJoinGroupData* data = (LLJoinGroupData*)user_data;
BOOL delete_context_data = TRUE;
bool accept_invite = false;
+
+ if (option == 2 && data && !data->mGroupID.isNull())
+ {
+ LLFloaterGroupInfo::showFromUUID(data->mGroupID);
+ LLString::format_map_t args;
+ args["[MESSAGE]"] = data->mMessage;
+ LLNotifyBox::showXml("JoinGroup", args, &join_group_callback, data);
+ return;
+ }
if(option == 0 && data && !data->mGroupID.isNull())
{
// check for promotion or demotion.
@@ -763,7 +773,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
//llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl;
// When downloading the initial inventory we get a lot of new items
// coming in and can't tell that from spam. JC
- if (gStartupState >= STATE_STARTED
+ if (LLStartUp::getStartupState() >= STATE_STARTED
&& throttle_count >= OFFER_THROTTLE_MAX_COUNT)
{
if (!throttle_logged)
@@ -2162,7 +2172,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
{
is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat)
|| gMuteListp->isMuted(owner_id);
- is_linden = gMuteListp->isLinden(from_name);
+ is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && gMuteListp->isLinden(from_name);
}
BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
@@ -2319,16 +2329,16 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
// truth table:
- // LINDEN BUSY MUTED OWNED_BY_YOU DISPLAY STORE IN HISTORY
- // F F F F Yes Yes
- // F F F T Yes Yes
- // F F T F No No
- // F F T T No No
- // F T F F No Yes
- // F T F T Yes Yes
- // F T T F No No
- // F T T T No No
- // T * * * Yes Yes
+ // LINDEN BUSY MUTED OWNED_BY_YOU TASK DISPLAY STORE IN HISTORY
+ // F F F F * Yes Yes
+ // F F F T * Yes Yes
+ // F F T F * No No
+ // F F T T * No No
+ // F T F F * No Yes
+ // F T F T * Yes Yes
+ // F T T F * No No
+ // F T T T * No No
+ // T * * * F Yes Yes
chat.mMuted = is_muted && !is_linden;
@@ -2427,47 +2437,103 @@ public:
{
LLIsType is_landmark(LLAssetType::AT_LANDMARK);
LLIsType is_card(LLAssetType::AT_CALLINGCARD);
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
+
+ LLInventoryModel::cat_array_t card_cats;
+ LLInventoryModel::item_array_t card_items;
+ LLInventoryModel::cat_array_t land_cats;
+ LLInventoryModel::item_array_t land_items;
+
folder_ref_t::iterator it = mCompleteFolders.begin();
folder_ref_t::iterator end = mCompleteFolders.end();
for(; it != end; ++it)
{
gInventory.collectDescendentsIf(
(*it),
- cats,
- items,
+ land_cats,
+ land_items,
LLInventoryModel::EXCLUDE_TRASH,
is_landmark);
gInventory.collectDescendentsIf(
(*it),
- cats,
- items,
+ card_cats,
+ card_items,
LLInventoryModel::EXCLUDE_TRASH,
is_card);
}
- S32 count = items.count();
- for(S32 i = 0; i < count; ++i)
- {
- LLString::format_map_t args;
- args["[NAME]"] = items[i]->getName();
- switch(items[i]->getType())
- {
- case LLAssetType::AT_LANDMARK:
- LLNotifyBox::showXml("TeleportToLandmark",args);
- break;
- case LLAssetType::AT_CALLINGCARD:
- LLNotifyBox::showXml("TeleportToPerson",args);
- break;
- default:
- break;
- }
+ LLString::format_map_t args;
+ if ( land_items.count() > 0 )
+ { // Show notification that they can now teleport to landmarks. Use a random landmark from the inventory
+ S32 random_land = ll_rand( land_items.count() - 1 );
+ args["[NAME]"] = land_items[random_land]->getName();
+ LLNotifyBox::showXml("TeleportToLandmark",args);
+ }
+ if ( card_items.count() > 0 )
+ { // Show notification that they can now contact people. Use a random calling card from the inventory
+ S32 random_card = ll_rand( card_items.count() - 1 );
+ args["[NAME]"] = card_items[random_card]->getName();
+ LLNotifyBox::showXml("TeleportToPerson",args);
}
+
gInventory.removeObserver(this);
delete this;
}
};
+
+
+class LLPostTeleportNotifiers : public LLEventTimer
+{
+public:
+ LLPostTeleportNotifiers();
+ virtual ~LLPostTeleportNotifiers();
+
+ //function to be called at the supplied frequency
+ virtual BOOL tick();
+};
+
+LLPostTeleportNotifiers::LLPostTeleportNotifiers() : LLEventTimer( 2.0 )
+{
+};
+
+LLPostTeleportNotifiers::~LLPostTeleportNotifiers()
+{
+}
+
+BOOL LLPostTeleportNotifiers::tick()
+{
+ BOOL all_done = FALSE;
+ if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE )
+ {
+ // get callingcards and landmarks available to the user arriving.
+ LLInventoryFetchDescendentsObserver::folder_ref_t folders;
+ LLUUID folder_id;
+ folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
+ if(folder_id.notNull())
+ folders.push_back(folder_id);
+ folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
+ if(folder_id.notNull())
+ folders.push_back(folder_id);
+ if(!folders.empty())
+ {
+ LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
+ fetcher->fetchDescendents(folders);
+ if(fetcher->isEverythingComplete())
+ {
+ fetcher->done();
+ }
+ else
+ {
+ gInventory.addObserver(fetcher);
+ }
+ }
+ all_done = TRUE;
+ }
+
+ return all_done;
+}
+
+
+
// Teleport notification from the simulator
// We're going to pretend to be a new agent
void process_teleport_finish(LLMessageSystem* msg, void**)
@@ -2513,26 +2579,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
{
gAgent.setHomePosRegion(region_handle, pos);
- // get callingcards and landmarks available to the user arriving.
- LLInventoryFetchDescendentsObserver::folder_ref_t folders;
- LLUUID folder_id;
- folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
- if(folder_id.notNull()) folders.push_back(folder_id);
- folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
- if(folder_id.notNull()) folders.push_back(folder_id);
- if(!folders.empty())
- {
- LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
- fetcher->fetchDescendents(folders);
- if(fetcher->isEverythingComplete())
- {
- fetcher->done();
- }
- else
- {
- gInventory.addObserver(fetcher);
- }
- }
+ // Create a timer that will send notices when teleporting is all finished. Since this is
+ // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked.
+ new LLPostTeleportNotifiers();
}
LLHost sim_host(sim_ip, sim_port);
@@ -2632,6 +2681,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
msg->getVector3Fast(_PREHASH_Data, _PREHASH_LookAt, look_at);
U64 region_handle;
msg->getU64Fast(_PREHASH_Data, _PREHASH_RegionHandle, region_handle);
+
+ char version_channel_char[MAX_STRING];
+ msg->getString("SimData", "ChannelVersion", MAX_STRING, version_channel_char);
LLVOAvatar* avatarp = gAgent.getAvatarObject();
if (!avatarp)
@@ -2765,6 +2817,23 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun());
gAgent.sendReliableMessage();
+
+
+ LLString version_channel = LLString(version_channel_char);
+
+ if (gLastVersionChannel != version_channel)
+ {
+ //show release message if not on initial login
+ if (!gLastVersionChannel.empty())
+ {
+ gLastVersionChannel = version_channel;
+ LLFloaterReleaseMsg::show();
+ }
+ else {
+ gLastVersionChannel = version_channel;
+ }
+ }
+
}
void process_crossed_region(LLMessageSystem* msg, void**)
@@ -4006,12 +4075,10 @@ void process_alert_core(const char* buffer, BOOL modal)
else if( !strcmp( buffer, "Home position set." ) )
{
// save the home location image to disk
- char temp_str[LL_MAX_PATH]; /* Flawfinder: ignore */
- strncpy(temp_str, gDirUtilp->getLindenUserDir().c_str(), LL_MAX_PATH -1); /* Flawfinder: ignore */
- temp_str[LL_MAX_PATH -1] = '\0';
- strcat(temp_str, "/"); /* Flawfinder: ignore */
- strcat(temp_str,SCREEN_HOME_FILENAME); /* Flawfinder: ignore */
- gViewerWindow->saveSnapshot(temp_str, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
+ LLString snap_filename = gDirUtilp->getLindenUserDir();
+ snap_filename += gDirUtilp->getDirDelimiter();
+ snap_filename += SCREEN_HOME_FILENAME;
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
}
// Translate system messages here.
@@ -4562,7 +4629,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, STD_STRING_BUF_SIZE, reason);
LLStringBase::format_map_t args;
- args["[REASON]"] = LLAgent::sTeleportErrorMessages[reason];
+ LLString big_reason = LLAgent::sTeleportErrorMessages[reason];
+ if ( big_reason.size() > 0 )
+ { // Substitute verbose reason from the local map
+ args["[REASON]"] = big_reason;
+ }
+ else
+ { // Nothing found in the map - use what the server returned
+ args["[REASON]"] = reason;
+ }
+
gViewerWindow->alertXml("CouldNotTeleportReason", args);
if( gAgent.getTeleportState() != LLAgent::TELEPORT_NONE )
@@ -5027,7 +5103,7 @@ void process_load_url(LLMessageSystem* msg, void**)
}
-void callback_download_complete(void** data, S32 result)
+void callback_download_complete(void** data, S32 result, LLExtStat ext_status)
{
LLString* filepath = (LLString*)data;
LLString::format_map_t args;
@@ -5164,7 +5240,7 @@ void callbackCacheEstateOwnerName(
void onCovenantLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "onCovenantLoadComplete()" << llendl;
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**);
void onCovenantLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
void callbackCacheEstateOwnerName(
const LLUUID& id,
const char* first,
@@ -219,3 +219,4 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**);
#endif
+
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)
LLXferManager::HIGH_PRIORITY);
}
-void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code)
+void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status)
{
LLFilenameAndTask* ft = (LLFilenameAndTask*)user_data;
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:
// inventory functionality
//
- static void processTaskInvFile(void** user_data, S32 error_code);
+ static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status);
void loadTaskInvFile(const char* filename);
void doInventoryCallback();
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)
std::vector kill_list;
S32 num_active_objects = 0;
+ LLViewerObject *objectp = NULL;
+ // Make a copy of the list in case something in idleUpdate() messes with it
+ std::vector idle_list;
+ idle_list.reserve( mActiveObjects.size() );
+
+ for (std::set >::iterator active_iter = mActiveObjects.begin();
+ active_iter != mActiveObjects.end(); active_iter++)
+ {
+ objectp = *active_iter;
+ if (objectp)
+ {
+ idle_list.push_back( objectp );
+ }
+ else
+ { // There shouldn't be any NULL pointers in the list, but they have caused
+ // crashes before. This may be idleUpdate() messing with the list.
+ llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl;
+ }
+ }
+
if (gSavedSettings.getBOOL("FreezeTime"))
{
- for (std::set >::iterator iter = mActiveObjects.begin();
- iter != mActiveObjects.end(); iter++)
+ for (std::vector::iterator iter = idle_list.begin();
+ iter != idle_list.end(); iter++)
{
- LLViewerObject *objectp = *iter;
+ objectp = *iter;
if (objectp->getPCode() == LLViewerObject::LL_VO_CLOUDS ||
objectp->isAvatar())
{
@@ -670,10 +690,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
}
else
{
- for (std::set >::iterator iter = mActiveObjects.begin();
- iter != mActiveObjects.end(); iter++)
+ for (std::vector::iterator idle_iter = idle_list.begin();
+ idle_iter != idle_list.end(); idle_iter++)
{
- LLViewerObject *objectp = *iter;
+ objectp = *idle_iter;
if (!objectp->idleUpdate(agent, world, frame_time))
{
// If Idle Update returns false, kill object!
@@ -684,10 +704,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
num_active_objects++;
}
}
- for (std::vector::iterator iter = kill_list.begin();
- iter != kill_list.end(); iter++)
+ for (std::vector::iterator kill_iter = kill_list.begin();
+ kill_iter != kill_list.end(); kill_iter++)
{
- LLViewerObject *objectp = *iter;
+ objectp = *kill_iter;
killObject(objectp);
}
}
@@ -1099,6 +1119,8 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce
iter != pick_drawables.end(); iter++)
{
LLDrawable* drawablep = *iter;
+ if( !drawablep )
+ continue;
LLViewerObject* last_objectp = NULL;
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 @@
#include "llthread.h"
#include "lltimer.h"
#include "lluuidhashmap.h"
-//#include "llversion.h"
+//#include "llversionviewer.h"
//#include "processor.h"
#include "stdenums.h"
#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:
llinfos << "BaseCapabilitiesComplete::error "
<< statusNum << ": " << reason << llendl;
- if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
- gStartupState = STATE_SEED_CAP_GRANTED;
+ LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
}
}
@@ -1223,9 +1223,9 @@ public:
<< iter->first << llendl;
}
- if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
- gStartupState = STATE_SEED_CAP_GRANTED;
+ LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
}
}
@@ -1275,6 +1275,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ChatSessionRequest");
capabilityNames.append("ProvisionVoiceAccountRequest");
+ capabilityNames.append("ServerReleaseNotes");
+ capabilityNames.append("CopyInventoryFromNotecard");
llinfos << "posting to seed " << url << llendl;
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 @@
extern BOOL gPacificDaylightTime;
+///----------------------------------------------------------------------------
+/// Class LLEmbeddedNotecardOpener
+///----------------------------------------------------------------------------
+class LLEmbeddedNotecardOpener : public LLInventoryCallback
+{
+ LLViewerTextEditor* mTextEditor;
+
+public:
+ LLEmbeddedNotecardOpener()
+ : mTextEditor(NULL)
+ {
+ }
+
+ void setEditor(LLViewerTextEditor* e) {mTextEditor = e;}
+
+ // override
+ void fire(const LLUUID& inv_item)
+ {
+ if(!mTextEditor)
+ {
+ // The parent text editor may have vanished by now.
+ // In that case just quit.
+ return;
+ }
+
+ LLInventoryItem* item = gInventory.getItem(inv_item);
+ if(!item)
+ {
+ llwarns << "Item add reported, but not found in inventory!: " << inv_item << llendl;
+ }
+ else
+ {
+ // See if we can bring an existing preview to the front
+ if(!LLPreview::show(item->getUUID(), true))
+ {
+ if(!gSavedSettings.getBOOL("ShowNewInventory"))
+ {
+ // There isn't one, so make a new preview
+ S32 left, top;
+ gFloaterView->getNewFloaterPosition(&left, &top);
+ LLRect rect = gSavedSettings.getRect("NotecardEditorRect");
+ rect.translate(left - rect.mLeft, top - rect.mTop);
+ LLPreviewNotecard* preview;
+ preview = new LLPreviewNotecard("preview notecard",
+ rect,
+ LLString("Embedded Note: ") + item->getName(),
+ item->getUUID(),
+ LLUUID::null,
+ item->getAssetUUID(),
+ true,
+ (LLViewerInventoryItem*)item);
+ preview->setSourceID(LLUUID::null);
+ preview->setFocus(TRUE);
+
+ // Force to be entirely onscreen.
+ gFloaterView->adjustToFitScreen(preview, FALSE);
+ }
+ }
+ }
+ }
+};
+
////////////////////////////////////////////////////////////
// LLEmbeddedItems
//
@@ -497,14 +559,21 @@ LLViewerTextEditor::LLViewerTextEditor(const LLString& name,
const LLFontGL* font,
BOOL allow_embedded_items)
: LLTextEditor(name, rect, max_length, default_text, font, allow_embedded_items),
- mDragItemSaved(FALSE)
+ mDragItemSaved(FALSE),
+ mInventoryCallback(new LLEmbeddedNotecardOpener)
{
mEmbeddedItemList = new LLEmbeddedItems(this);
+ mInventoryCallback->setEditor(this);
}
LLViewerTextEditor::~LLViewerTextEditor()
{
delete mEmbeddedItemList;
+
+
+ // The inventory callback may still be in use by gInventoryCallbackManager...
+ // so set its reference to this to null.
+ mInventoryCallback->setEditor(NULL);
}
///////////////////////////////////////////////////////////////////
@@ -1279,22 +1348,14 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item )
open_landmark((LLViewerInventoryItem*)item, " preview landmark", FALSE, item->getUUID(), TRUE);
}
-
void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, BOOL saved )
{
if (saved)
{
- // Pop-up the notecard floater.
- // Note: Previously would copy to inventory and rely on autodisplay to view.
- // Now that autodisplay can be turned off, we need to make this case display always.
- // besides, there's no point adding to inventory -MG
- open_notecard(
- (LLViewerInventoryItem*)item,
- LLString("Embedded Note: ") + item->getName(), // title
- mObjectID,
- FALSE, // show_keep_discard
- LLUUID::null, // source_id
- TRUE); // take_focus
+ // An LLInventoryItem needs to be in an inventory to be opened.
+ // This will give the item to the viewer's agent.
+ // The callback will attempt to open it if its not already opened.
+ copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback));
}
else
{
@@ -1369,11 +1430,11 @@ bool LLViewerTextEditor::importStream(std::istream& str)
return success;
}
-void LLViewerTextEditor::copyInventory(LLInventoryItem* item)
+void LLViewerTextEditor::copyInventory(const LLInventoryItem* item, U32 callback_id)
{
copy_inventory_from_notecard(mObjectID,
mNotecardInventoryID,
- item);
+ item, callback_id);
}
bool 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 @@
class LLInventoryItem;
class LLEmbeddedItems;
-
+class LLEmbeddedNotecardOpener;
//
// Classes
@@ -86,7 +86,7 @@ public:
// Appends Second Life time, small font, grey
// If this starts a line, you need to prepend a newline.
- void copyInventory(LLInventoryItem* item);
+ void copyInventory(const LLInventoryItem* item, U32 callback_id = 0);
// returns true if there is embedded inventory.
// *HACK: This is only useful because the notecard verifier may
@@ -123,6 +123,8 @@ protected:
LLUUID mObjectID;
LLUUID mNotecardInventoryID;
+
+ LLPointer mInventoryCallback;
};
#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)
{
if (!gQuit)
{
- if (gStartupState >= STATE_STARTED)
+ if (LLStartUp::getStartupState() >= STATE_STARTED)
{
// if we're in world, show a progress bar to hide reloading of textures
llinfos << "Restoring GL during activate" << llendl;
@@ -2746,27 +2746,11 @@ BOOL LLViewerWindow::handlePerFrameHover()
gPipeline.sRenderProcessBeacons = FALSE;
KEY key = gKeyboard->currentKey();
- if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || (gFloaterTools && gFloaterTools->getVisible()) || gSavedSettings.getBOOL("BeaconAlwaysOn"))
+ if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || gSavedSettings.getBOOL("BeaconAlwaysOn"))
{
gPipeline.sRenderProcessBeacons = TRUE;
}
-/*
- // Show joints while in edit mode and hold down alt key.
- if (gHUDManager)
- {
- BOOL menuOption = gSavedSettings.getBOOL("AltShowsPhysical");
- if (menuOption
- || (gFloaterTools && gFloaterTools->getVisible()))
- {
- gHUDManager->toggleShowPhysical( mask & MASK_ALT );
- }
- else
- {
- gHUDManager->toggleShowPhysical( FALSE );
- }
- }
-*/
BOOL handled = FALSE;
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()
if (!skeleton_node)
{
llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl;
+ return;
}
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()
CloseHandle(pinfo.hThread); // stops leaks - nothing else
}
- delete args2;
+ delete[] args2;
#else // LL_WINDOWS
// This should be the same for mac and linux
{
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 @@
+/**
+ * @file llvoicevisualizer.cpp
+ * @brief Draws in-world speaking indicators.
+ *
+ * Copyright (c) 2000-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
//----------------------------------------------------------------------
// Voice Visualizer
// 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 @@
+/**
+ * @file llvoicevisualizer.h
+ * @brief Draws in-world speaking indicators.
+ *
+ * Copyright (c) 2000-2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ */
+
//--------------------------------------------------------------------
//
// 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)
buffer->getTexCoordStrider(texcoordsp);
buffer->getIndexStrider(indicesp);
- std::vector& draw_vec = group->mDrawMap[mRenderPass];
+ LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[mRenderPass];
for (std::vector::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i)
{
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 @@
#include "llvosky.h"
#include "imageids.h"
+#include "llfeaturemanager.h"
#include "llviewercontrol.h"
#include "llframetimer.h"
#include "timing.h"
@@ -597,7 +598,7 @@ void LLVOSky::initCubeMap()
{
mCubeMap->init(images);
}
- else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap)
+ else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
{
mCubeMap = new LLCubeMap();
mCubeMap->init(images);
@@ -634,7 +635,8 @@ void LLVOSky::restoreGL()
calcBrightnessScaleAndColors();
- if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap)
+ if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap
+ && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
{
LLCubeMap* cube_map = getCubeMap();
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,
}
//add face to drawmap
- std::vector& draw_vec = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[type];
S32 idx = draw_vec.size()-1;
@@ -2111,7 +2111,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U32 end = start + facep->getGeomCount()-1;
U32 offset = facep->getIndicesStart();
U32 count = facep->getIndicesCount();
- LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex,
+ LLPointer draw_info = new LLDrawInfo(start,end,count,offset,tex,
facep->mVertexBuffer, fullbright, bump);
draw_info->mVSize = facep->getVirtualSize();
draw_vec.push_back(draw_info);
@@ -2151,7 +2151,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U32 end = start + facep->getGeomCount()-1;
U32 offset = facep->getIndicesStart();
U32 count = facep->getIndicesCount();
- LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex,
+ LLPointer draw_info = new LLDrawInfo(start,end,count,offset,tex,
facep->mVertexBuffer, fullbright, bump);
draw_info->mVSize = facep->getVirtualSize();
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()
}
// static
-void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status) // StoreAssetData callback (fixed)
+void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLWearableSaveData* data = (LLWearableSaveData*)userdata;
const char* type_name = LLWearable::typeToTypeName(data->mType);
@@ -1003,3 +1003,4 @@ void LLWearable::dump()
}
}
+
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:
static LLAssetType::EType typeToAssetType( EWearableType wearable_type );
void saveNewAsset();
- static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status );
+ static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status );
BOOL isMatchedToInventoryItem( LLViewerInventoryItem* item );
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
}
// static
-void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status )
+void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status )
{
BOOL success = FALSE;
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:
LLWearable* createNewWearable( EWearableType type );
// Pseudo-private
- static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status);
+ static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status, LLExtStat ext_status);
protected:
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)
llSay(0, "No more inventory items");
continue = FALSE;
}
+ i++;
} while(continue);
}
.
If linknumber is LINK_SET, set the alpha of
- all objects in the linked set. If >>>>>> .merge-right.r59207
>face is
.
If linknumber is LINK_SET, set the color of
- all objects in the linked set. If >>>>>> .merge-right.r59207
>face is
llSetLinkPrimitiveParams(integer linknumber, list rules);
llSetLinkPrimitiveParams(integer linknumber, list rules);
Sets the primitive parameters of the linked child
- specified by linknumber. A value of 0 means
- no link, 1 the root, 2 for first child, etc. If
- linknumber is LINK_SET, set the primitive parameters
- of all objects in the linked set. The rules
- list is identical to that of
- llSetPrimitiveParams.
Sets the texture of the linked child
- specified by linknumber. A value of 0 means
- no link, 1 the root, 2 for first child, etc. If
- linknumber is LINK_SET, set the texture of
- all objects in the linked set. If face is
- ALL_SIDES, set the texture
- of all faces.