From a408bac29378072fbf36864164149458c978cfcc Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:59 -0500 Subject: Second Life viewer sources 1.17.1.0 --- linden/doc/contributions.txt | 30 +- linden/indra/SConstruct | 218 +++++--- linden/indra/indra_complete/indra_complete.sln | 4 +- linden/indra/llcharacter/llmotioncontroller.cpp | 3 +- linden/indra/llcommon/llapr.h | 2 +- linden/indra/llcommon/llavatarconstants.h | 2 +- linden/indra/llcommon/llchat.h | 3 +- linden/indra/llcommon/lldefs.h | 33 +- linden/indra/llcommon/llfile.cpp | 1 + linden/indra/llcommon/llmortician.cpp | 1 + linden/indra/llcommon/llprocessor.cpp | 12 +- linden/indra/llcommon/llsd.cpp | 1 + linden/indra/llcommon/llsdserialize_xml.cpp | 5 +- linden/indra/llcommon/llsdutil.cpp | 2 +- linden/indra/llcommon/llstreamtools.cpp | 2 + linden/indra/llcommon/llstring.cpp | 20 + linden/indra/llcommon/llstring.h | 3 + linden/indra/llcommon/lluri.cpp | 78 +++ linden/indra/llcommon/lluri.h | 15 +- linden/indra/llcommon/llversion.h | 4 +- linden/indra/llcommon/processor.h | 2 +- linden/indra/llcommon/string_table.h | 2 +- linden/indra/llcommon/timer.h | 2 +- linden/indra/llcommon/timing.cpp | 2 +- linden/indra/llimage/files.lst | 2 + linden/indra/llimage/llimage.cpp | 3 +- linden/indra/llimage/llimage.h | 3 +- linden/indra/llimage/llimage.vcproj | 12 + linden/indra/llimage/llimage_vc8.vcproj | 16 + linden/indra/llimage/llimageworker.cpp | 2 +- linden/indra/llinventory/llparcel.cpp | 18 - linden/indra/llinventory/llparcel.h | 1 - linden/indra/llinventory/llpermissions.h | 2 +- linden/indra/llinventory/lluserrelations.cpp | 2 +- linden/indra/llinventory/lluserrelations.h | 4 +- linden/indra/llmath/camera.h | 2 +- linden/indra/llmath/coordframe.h | 2 +- linden/indra/llmath/llquaternion.cpp | 2 +- linden/indra/llmath/llrand.h | 4 +- linden/indra/llmath/llvolume.cpp | 193 +++++-- linden/indra/llmath/llvolume.h | 6 +- linden/indra/llmath/v3color.cpp | 2 +- linden/indra/llmedia/llmediaengine.cpp | 1 + linden/indra/llmessage/llassetstorage.cpp | 18 +- linden/indra/llmessage/llassetstorage.h | 19 +- linden/indra/llmessage/llblowfishcipher.cpp | 56 +-- linden/indra/llmessage/llcachename.cpp | 196 ++++---- linden/indra/llmessage/llcurl.cpp | 2 + linden/indra/llmessage/llhttpassetstorage.cpp | 68 ++- linden/indra/llmessage/llhttpassetstorage.h | 8 +- linden/indra/llmessage/llhttpnode.cpp | 2 +- linden/indra/llmessage/lliohttpserver.cpp | 2 +- linden/indra/llmessage/lliosocket.cpp | 2 + linden/indra/llmessage/llmessagethrottle.cpp | 2 + linden/indra/llmessage/llservicebuilder.cpp | 1 + linden/indra/llmessage/lltemplatemessagereader.cpp | 2 +- linden/indra/llmessage/message.cpp | 16 +- linden/indra/llmessage/net.cpp | 12 +- linden/indra/llmessage/net.h | 2 +- linden/indra/llrender/llvertexbuffer.cpp | 50 -- linden/indra/llui/llalertdialog.h | 9 + linden/indra/llui/llcombobox.cpp | 2 +- linden/indra/llui/llctrlselectioninterface.cpp | 1 + linden/indra/llui/lleditmenuhandler.cpp | 2 +- linden/indra/llui/lllineeditor.cpp | 23 +- linden/indra/llui/llrootview.cpp | 1 + linden/indra/llui/llscrollcontainer.cpp | 19 + linden/indra/llui/llscrollcontainer.h | 12 +- linden/indra/llui/llscrolllistctrl.cpp | 15 +- linden/indra/llui/llscrolllistctrl.h | 2 +- linden/indra/llui/lltabcontainer.cpp | 81 +-- linden/indra/llui/lltabcontainer.h | 6 +- linden/indra/llui/lltexteditor.cpp | 21 +- linden/indra/llui/llviewquery.cpp | 2 + linden/indra/llvfs/llvfs.cpp | 71 ++- linden/indra/llwindow/llwindow.cpp | 50 +- linden/indra/llwindow/llwindow.h | 13 + linden/indra/llwindow/llwindowmacosx.cpp | 75 ++- linden/indra/llwindow/llwindowmacosx.h | 8 + linden/indra/llwindow/llwindowsdl.cpp | 7 +- linden/indra/llwindow/llwindowwin32.cpp | 172 ++++++- linden/indra/llwindow/llwindowwin32.h | 11 + linden/indra/llxml/llxmlnode.cpp | 3 + linden/indra/llxml/llxmlparser.cpp | 2 +- linden/indra/lscript/lscript_compile/indra.l | 17 +- linden/indra/lscript/lscript_compile/indra.y | 44 +- .../lscript/lscript_execute/lscript_execute.cpp | 2 +- linden/indra/mac_updater/GenLinkedList.c | 2 +- .../indra/newview/English.lproj/InfoPlist.strings | 4 +- linden/indra/newview/Info-SecondLife.plist | 2 +- linden/indra/newview/app_settings/colors_base.xml | 6 + linden/indra/newview/files.lst | 1 + linden/indra/newview/fmodwrapper.cpp | 2 +- .../installers/windows/installer_template.nsi | 27 +- linden/indra/newview/licenses-linux.txt | 93 ++++ linden/indra/newview/licenses-mac.txt | 93 ++++ linden/indra/newview/licenses-win32.txt | 93 ++++ linden/indra/newview/linux_tools/wrapper.sh | 2 +- linden/indra/newview/llagent.cpp | 7 +- linden/indra/newview/llagent.h | 2 +- linden/indra/newview/llassetuploadresponders.cpp | 2 +- linden/indra/newview/llcape.h | 2 +- linden/indra/newview/llchatbar.cpp | 2 +- linden/indra/newview/llcontroldef.cpp | 18 +- linden/indra/newview/lldebugmessagebox.cpp | 13 + linden/indra/newview/lldrawable.cpp | 2 +- linden/indra/newview/lldrawable.h | 4 +- linden/indra/newview/lldrawpool.cpp | 17 +- linden/indra/newview/lldrawpoolavatar.cpp | 4 +- linden/indra/newview/lldrawpooltree.cpp | 2 +- linden/indra/newview/lldriverparam.h | 2 +- linden/indra/newview/lleventpoll.cpp | 6 +- linden/indra/newview/llface.cpp | 2 +- linden/indra/newview/llfilepicker.cpp | 8 +- linden/indra/newview/llfirstuse.cpp | 34 ++ linden/indra/newview/llfirstuse.h | 7 + linden/indra/newview/llflexibleobject.cpp | 18 +- linden/indra/newview/llflexibleobject.h | 2 +- linden/indra/newview/llfloateranimpreview.h | 2 +- linden/indra/newview/llfloaterchat.cpp | 26 +- linden/indra/newview/llfloatercustomize.cpp | 12 +- linden/indra/newview/llfloaterhtmlhelp.cpp | 61 ++- linden/indra/newview/llfloaterimagepreview.cpp | 20 + linden/indra/newview/llfloaterinspect.cpp | 2 +- linden/indra/newview/llfloaterinspect.h | 4 +- linden/indra/newview/llfloaterland.cpp | 7 + linden/indra/newview/llfloaterpostcard.cpp | 148 ++++-- linden/indra/newview/llfloaterpostcard.h | 8 +- linden/indra/newview/llfloaterreporter.cpp | 6 +- linden/indra/newview/llfloaterreporter.h | 2 +- linden/indra/newview/llfloatertools.cpp | 10 +- linden/indra/newview/llfolderview.cpp | 37 ++ linden/indra/newview/llfolderview.h | 7 + linden/indra/newview/llgenepool.cpp | 1 + linden/indra/newview/llhudeffectlookat.cpp | 1 + linden/indra/newview/llhudicon.cpp | 6 +- linden/indra/newview/llhudicon.h | 4 + linden/indra/newview/llhudtext.cpp | 5 +- linden/indra/newview/llhudtext.h | 4 +- linden/indra/newview/llimpanel.cpp | 18 +- linden/indra/newview/llinventoryactions.cpp | 8 +- linden/indra/newview/llinventorybridge.cpp | 32 +- linden/indra/newview/llinventoryview.cpp | 113 ++++- linden/indra/newview/llinventoryview.h | 9 + linden/indra/newview/lllogchat.cpp | 26 +- linden/indra/newview/lllogchat.h | 1 + linden/indra/newview/llmanip.cpp | 2 +- linden/indra/newview/llmaniprotate.cpp | 2 +- linden/indra/newview/llmanipscale.cpp | 2 +- linden/indra/newview/llmaniptranslate.cpp | 2 +- linden/indra/newview/llmapresponders.cpp | 2 +- linden/indra/newview/llmutelist.cpp | 4 +- linden/indra/newview/llnotify.cpp | 145 +++++- linden/indra/newview/llnotify.h | 12 +- linden/indra/newview/llpaneldirbrowser.cpp | 7 +- linden/indra/newview/llpaneldirclassified.cpp | 18 +- linden/indra/newview/llpanelgroupvoting.cpp | 2 +- linden/indra/newview/llpanelinventory.cpp | 57 ++- linden/indra/newview/llpanelmsgs.cpp | 48 +- linden/indra/newview/llpanelmsgs.h | 4 + linden/indra/newview/llpanelobject.cpp | 64 ++- linden/indra/newview/llpolymesh.h | 4 +- linden/indra/newview/llprefschat.cpp | 3 + linden/indra/newview/llprefsim.cpp | 31 +- linden/indra/newview/llselectmgr.cpp | 22 +- linden/indra/newview/llselectmgr.h | 2 +- linden/indra/newview/llspatialpartition.cpp | 2 +- linden/indra/newview/llsrv.cpp | 213 ++++++++ linden/indra/newview/llsrv.h | 66 +++ linden/indra/newview/llstartup.cpp | 43 +- linden/indra/newview/lltexlayer.cpp | 2 +- linden/indra/newview/lltexlayer.h | 8 +- linden/indra/newview/lltexturecache.cpp | 4 +- linden/indra/newview/lltexturectrl.cpp | 21 +- linden/indra/newview/lltexturefetch.cpp | 2 +- linden/indra/newview/lltoolcomp.cpp | 12 +- linden/indra/newview/lltoolpie.cpp | 2 +- linden/indra/newview/lltoolpie.h | 2 +- linden/indra/newview/lltoolselect.cpp | 2 +- linden/indra/newview/llviewerassetstorage.cpp | 8 +- linden/indra/newview/llviewerassetstorage.h | 8 +- linden/indra/newview/llviewerimage.cpp | 2 +- linden/indra/newview/llviewerimage.h | 1 + linden/indra/newview/llviewerimagelist.cpp | 16 + linden/indra/newview/llviewerinventory.cpp | 2 +- linden/indra/newview/llviewerjointattachment.h | 4 +- linden/indra/newview/llviewerkeyboard.cpp | 12 +- linden/indra/newview/llviewermenu.cpp | 32 +- linden/indra/newview/llviewermenufile.cpp | 15 + linden/indra/newview/llviewermessage.cpp | 199 +++++++- linden/indra/newview/llviewerobject.cpp | 85 +++- linden/indra/newview/llviewerpartsource.cpp | 4 + linden/indra/newview/llviewerpartsource.h | 8 +- linden/indra/newview/llviewertexteditor.cpp | 3 +- linden/indra/newview/llviewerwindow.cpp | 18 +- linden/indra/newview/llvoavatar.cpp | 23 + linden/indra/newview/llvoavatar.h | 3 +- linden/indra/newview/llvoinventorylistener.cpp | 4 +- linden/indra/newview/llvoinventorylistener.h | 2 +- linden/indra/newview/llvopartgroup.cpp | 2 +- linden/indra/newview/llvopartgroup.h | 5 +- linden/indra/newview/llvosurfacepatch.h | 5 +- linden/indra/newview/llvotree.h | 5 +- linden/indra/newview/llvovolume.cpp | 14 +- linden/indra/newview/llvovolume.h | 3 +- linden/indra/newview/llvowater.h | 3 +- linden/indra/newview/llwebbrowserctrl.h | 4 +- linden/indra/newview/llworld.cpp | 8 +- linden/indra/newview/llxmlrpctransaction.cpp | 16 +- .../newview/macview.xcodeproj/project.pbxproj | 392 +++++++++------ linden/indra/newview/newview.vcproj | 22 +- linden/indra/newview/newview_vc8.vcproj | 16 +- linden/indra/newview/pipeline.cpp | 6 +- linden/indra/newview/releasenotes.txt | 68 +++ linden/indra/newview/res/newViewRes.rc | 8 +- linden/indra/newview/skins/textures/textures.xml | 1 + linden/indra/newview/skins/xui/en-us/alerts.xml | 69 ++- .../newview/skins/xui/en-us/floater_about_land.xml | 70 +-- .../newview/skins/xui/en-us/floater_directory.xml | 7 +- .../skins/xui/en-us/floater_image_preview.xml | 6 +- .../newview/skins/xui/en-us/floater_inventory.xml | 17 +- .../newview/skins/xui/en-us/floater_postcard.xml | 12 +- .../skins/xui/en-us/floater_texture_ctrl.xml | 1 + .../newview/skins/xui/en-us/floater_tools.xml | 7 +- .../indra/newview/skins/xui/en-us/menu_viewer.xml | 7 + linden/indra/newview/skins/xui/en-us/notify.xml | 51 +- .../skins/xui/en-us/panel_preferences_chat.xml | 13 +- .../skins/xui/en-us/panel_preferences_im.xml | 59 ++- .../skins/xui/en-us/panel_preferences_popups.xml | 14 +- .../newview/skins/xui/en-us/panel_region_debug.xml | 4 +- linden/indra/newview/viewer.cpp | 93 +++- linden/indra/newview/viewer.h | 4 +- linden/indra/newview/viewer_manifest.py | 4 +- linden/indra/test/llhttpnode_tut.cpp | 2 +- linden/indra/test/llmessageconfig_tut.cpp | 4 +- linden/indra/test/llsdserialize_tut.cpp | 8 +- linden/indra/test/test.vcproj | 2 +- linden/libraries/include/llmozlib.h | 556 ++++++++++----------- 238 files changed, 4225 insertions(+), 1536 deletions(-) create mode 100644 linden/indra/newview/llsrv.cpp create mode 100644 linden/indra/newview/llsrv.h (limited to 'linden') diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt index 72e79f3..cd9745b 100644 --- a/linden/doc/contributions.txt +++ b/linden/doc/contributions.txt @@ -4,30 +4,40 @@ 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. -Alissa Sabre - VWR-81, VWR-83, VWR-414, VWR-415 +Able Whitman - VWR-650 +Alissa Sabre - VWR-81, VWR-83, VWR-171, VWR-251, VWR-414, VWR-415, VWR-459, VWR-606, VWR-652 +Argent Stonecutter - VWR-68 +Benja Kepler - VWR-746 Blakar Ogre - VWR-881 blino Nakamura - VWR-17 -bushing Spatula - VWR-424 -Drewan Keats - VWR-28, VWR-412 +bushing Spatula - VWR-424, VWR-119 +Dale Glass - VWR-120, VWR-560 +Drewan Keats - VWR-28, VWR-248, VWR-412 +Duckless Vandyke - VWR-383 Dylan Haskell - VWR-72 Dzonatas Sol - VWR-198, VWR-878 Eddy Stryker - VWR-15, VWR-23 -Gigs Taggart - VWR-71, VWR-326 +Gigs Taggart - VWR-71, VWR-326, VWR-1217 Ginko Bayliss - VWR-4 Hikkoshi Sakai - VWR-429 -Hiro Sommambulist - VWR-66, VWR-97, VWR-100, VWR-105, VWR-108, VWR-118, VWR-136 -Jacek Antonelli - VWR-165, VWR-188 +Hiro Sommambulist - VWR-66, VWR-97, VWR-100, VWR-105, VWR-108, VWR-118, VWR-132, VWR-136, VWR-143 +Jacek Antonelli - VWR-165, VWR-188, VWR-427, VWR-597 Joghert LeSabre - VWR-64 Kage Pixel - VWR-11 Kunnis Basiat - VWR-82 -Nicholaz Beresford - VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-869, VWR-870, VWR-871, VWR-908, VWR-966 +Nicholaz Beresford - VWR-132, VWR-176, VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-869, VWR-870, VWR-871, VWR-873, VWR-908, VWR-966 Paul Churchill - VWR-20 -Paula Innis - VWR-30 -Peekay Semyorka - VWR-7, VWR-19, VWR-49 +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 +Stevex Janus - VWR-1182 +Still Defiant - VWR-207, VWR-446 Strife Onizuka - SVC-9, VWR-74, VWR-85, VWR-148 -Zi Ree - VWR-671, VWR-682 +tenebrous pau - VWR-247 +TBBle Kurosawa - VWR-938, VWR-941, VWR-944 +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 39b50bc..68c8fc7 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct @@ -1,12 +1,21 @@ ################################################# -*- python -*- # -# SConstruct makefile for Second Life viewer -# and servers. +# SConstruct makefile for Second Life viewer and servers. # # To build everything: # # scons ARCH=all BTARGET=all DISTCC=yes # +# To build a standalone viewer, you'll need the following packages +# installed, with headers. We pick up the correct flags to use for +# these libraries using the "pkg-config" command. +# +# cairo glib-2.0 gtk+-2.0 sdl vorbis vorbisenc vorbisfile +# +# Then build as follows: +# +# scons BTARGET=client STANDALONE=yes MOZLIB=no ELFIO=no DISTCC=no +# # For help on options: # # scons -h @@ -73,6 +82,8 @@ try: except: debian_sarge = False +fedora = os.path.exists('/etc/fedora-release') + ######################### # COMMAND LINE OPTIONS # ######################### @@ -91,6 +102,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')), + 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 ) optenv = Environment(options = opts) @@ -101,16 +114,39 @@ arch = optenv['ARCH'] target_param = optenv['BTARGET'] enable_distcc = optenv['DISTCC'] enable_mozlib = optenv['MOZLIB'] -enable_fmod = optenv['FMOD'] enable_colorgcc = optenv['COLORGCC'] grid = optenv['GRID'] -opensource = optenv['OPENSOURCE'] +standalone = optenv['STANDALONE'] +opensource = standalone or optenv['OPENSOURCE'] +enable_fmod = not opensource and optenv['FMOD'] +elfio = optenv['ELFIO'] targets = [ target_param ] if target_param == 'all': targets = [ 'client', 'server' ] +# Set this to False if you don't want your source files copied into +# the object directory in /tmp. +duplicate = True + +if standalone and platform != 'linux': + print >> sys.stderr, 'Warning: standalone builds have only been tested on Linux' + +standalone_pkgs = 'cairo glib-2.0 gtk+-2.0 sdl vorbis vorbisenc vorbisfile' + +def pkgconfig(opt, pkgs=None): + return os.popen('pkg-config %s %s' % + (opt, pkgs or standalone_pkgs)).read().strip() + +if standalone: + missing = [pkg for pkg in standalone_pkgs.split() + if os.system('pkg-config --exists ' + pkg)] + if missing: + print >> sys.stderr, ('Error: pkg-config cannot find these ' + 'packages: %s' % ' '.join(missing)) + sys.exit(2) + ##################### # ITERATE TARGETS # ##################### @@ -125,6 +161,7 @@ for build_target in targets: print 'Building ' + build_target + ' ' + version + ' on ' + system_str + ' (' + buildtype + ')' system_lib_dir = '../libraries/' + system_str + if build_target == 'client': system_lib_dir += '/lib_release_client' elif buildtype == 'debug': @@ -153,7 +190,7 @@ for build_target in targets: """ + '../libraries/' + system_str + '/include' ) - client_external_libs = [] + client_external_libs = ['resolv'] system_link_flags = '' if platform != 'linux' and build_target == 'client' and enable_mozlib: @@ -184,74 +221,94 @@ for build_target in targets: ############## # Generic GCC flags - flags = '-g -pipe -Wall -Wno-trigraphs ' - - if opensource: - flags += '-DLL_USE_KDU=0 ' - else: - flags += '-DLL_USE_KDU=1 ' + cflags = '-g -pipe -Wall -Wno-trigraphs -Wno-sign-compare -Werror ' + cxxflags = '' + cppflags = '' if build_target == 'server': # Server flags - flags += '-D_GNU_SOURCE -ftemplate-depth-60 -DLL_MESA_HEADLESS=1 -DLL_MESA=1 ' + cppflags += '-D_GNU_SOURCE -DLL_MESA_HEADLESS=1 -DLL_MESA=1 ' + cxxflags += '-ftemplate-depth-60 ' if arch == 'i686': - flags += '-march=pentiumpro ' + cflags += '-march=pentiumpro ' if debian_sarge: def_server_cppflags = '' else: def_server_cppflags = '-DCTYPE_WORKAROUND' server_cppflags = os.environ.get('SERVER_CPPFLAGS', def_server_cppflags) - flags += server_cppflags + ' ' + cppflags += server_cppflags + ' ' else: # Viewer flags - flags += '-falign-loops=16 -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing -ffast-math ' - flags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' + cflags += '-falign-loops=16 -fno-math-errno -fexceptions -fsigned-char -fno-strict-aliasing -ffast-math ' + cppflags += '-DLL_MESA_HEADLESS=0 -DLL_MESA=0 ' try: client_cppflags = os.environ['CLIENT_CPPFLAGS'] except: client_cppflags = '' - flags += client_cppflags + ' ' + cppflags += client_cppflags + ' ' if platform == 'linux': # Linux-only flags - flags += '-DLL_LINUX=1 ' + cppflags += '-DLL_LINUX=1 ' if build_target == 'client': - flags += '-DAPPID=secondlife -DLL_SDL=1 ' + cppflags += '-DAPPID=secondlife -DLL_SDL=1 ' if arch == 'x86_64' or arch == 'x86_64cross' or not enable_fmod: - flags += '-DLL_FMOD=0 ' - flags += '-DLL_X11=1 -DLL_GTK=1 ' - client_external_libs += [ 'gtk-x11-2.0', 'elfio' ] - include_dirs += [ '../libraries/' + system_str + '/include/gtk-2.0' ] - include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0'] - include_dirs += [ '../libraries/' + system_str + '/include/pango-1.0' ] - include_dirs += [ '../libraries/' + system_str + '/include/atk-1.0' ] - include_dirs += [ '../libraries/' + system_str + '/include/ELFIO' ] - include_dirs += [ '../libraries/' + system_str + '/include/llfreetype2' ] + cppflags += '-DLL_FMOD=0 ' + cppflags += '-DLL_X11=1 -DLL_GTK=1 ' + if standalone: + include_dirs += [d[2:] for d in + pkgconfig('--cflags-only-I').split()] + else: + client_external_libs += [ 'gtk-x11-2.0' ] + incdirs = [ 'ELFIO', 'atk-1.0', 'glib-2.0', 'gtk-2.0', + 'llfreetype2', 'pango-1.0' ] + include_dirs += ['../libraries/' + system_str + '/include/' + d + for d in incdirs] + + if elfio: + client_external_libs += [ 'elfio' ] + else: + cppflags += '-DLL_ELFBIN=0 ' # llmozlib stuff if enable_mozlib: - flags += '-DLL_LIBXUL_ENABLED=1 ' + cppflags += '-DLL_LIBXUL_ENABLED=1 ' client_external_libs += [ 'llmozlib' ] client_external_libs += [ 'mozjs', 'nspr4', 'plc4', 'plds4', 'profdirserviceprovider_s', 'xpcom', 'xul' ] else: - flags += '-DLL_LIBXUL_ENABLED=0 ' + cppflags += '-DLL_LIBXUL_ENABLED=0 ' else: # Mac-only flags - flags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -DLL_DARWIN=1 -Wmost -Wno-sign-compare -Wno-switch -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -ffor-scope -Wno-reorder -isysroot /Developer/SDKs/MacOSX10.3.9.sdk ' + cflags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -Wmost -Wno-sign-compare -Wno-switch -fconstant-cfstrings -ffor-scope -Wno-reorder ' + cppflags += '-x c++ -DLL_DARWIN=1 -fpch-preprocess -F./newview/build/Deployment -fconstant-cfstrings -isysroot /Developer/SDKs/MacOSX10.3.9.sdk ' + + cxxflags += cflags ### Build type-specific flags ### - debug_opts = flags + '-fno-inline -O0 -D_DEBUG -DLL_DEBUG=1 ' - release_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 ' - releasenoopt_opts = flags + '-O0 -DNDEBUG -DLL_RELEASE=1 ' - releasefordownload_opts = flags + '-O2 -DNDEBUG -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 ' + debug_cflags = cflags + '-fno-inline -O0 ' + debug_cppflags = cppflags + '-D_DEBUG -DLL_DEBUG=1 ' + debug_cxxflags = cxxflags + release_cflags = cflags + '-O2 ' + release_cppflags = cppflags + '-DNDEBUG -DLL_RELEASE=1 ' + release_cxxflags = cxxflags + releasenoopt_cflags = cflags + '-O0 ' + releasenoopt_cppflags = cppflags + '-DNDEBUG -DLL_RELEASE=1 ' + releasenoopt_cxxflags = cxxflags + releasefordownload_cflags = cflags + '-O2 ' + releasefordownload_cppflags = cppflags + '-DNDEBUG -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 ' + releasefordownload_cxxflags = cxxflags ################ # ENVIRONMENT # ################ - gcc_bin = 'g++-3.4' + if standalone: + gcc_bin = 'g++' + else: + gcc_bin = 'g++-3.4' + # If you strip more aggressively than -S then the quality of crash- # logger backtraces deteriorates. strip_cmd = 'strip -S -o $TARGET $SOURCE' @@ -285,6 +342,10 @@ for build_target in targets: if os.path.isdir(mysql_lib_dir): lib_path.append(mysql_lib_dir) + if standalone: + system_link_flags += pkgconfig('--libs-only-L') + ' ' + system_link_flags += pkgconfig('--libs-only-other') + ' ' + base_env = Environment(CXX = compiler, CPPPATH = include_dirs, LIBPATH = lib_path, @@ -292,16 +353,24 @@ for build_target in targets: ### Environments for various build types ### - env = base_env.Copy(CPPFLAGS = releasefordownload_opts) + env = base_env.Copy(CFLAGS=releasefordownload_cflags, + CPPFLAGS=releasefordownload_cppflags, + CXXFLAGS=releasefordownload_cxxflags) if buildtype == 'debug': - env = base_env.Copy(CPPFLAGS = debug_opts) + env = base_env.Copy(CFLAGS=debug_cflags, + CPPFLAGS=debug_cppflags, + CXXFLAGS=debug_cxxflags) if buildtype == 'release': - env = base_env.Copy(CPPFLAGS = release_opts) + env = base_env.Copy(CFLAGS=release_cflags, + CPPFLAGS=release_cppflags, + CXXFLAGS=release_cxxflags) if buildtype == 'releasenoopt': - env = base_env.Copy(CPPFLAGS = releasenoopt_opts) + env = base_env.Copy(CFLAGS=releasenoopt_cflags, + CPPFLAGS=releasenoopt_cppflags, + CXXFLAGS=releasenoopt_cxxflags) # ccache needs this to be set try: @@ -381,7 +450,7 @@ for build_target in targets: source_files = 'files.lst', extra_depends=None): files_list = load_files(input_dir, source_files) - BuildDir(build_dir + '/' + input_dir, input_dir) + BuildDir(build_dir + '/' + input_dir, input_dir, duplicate=duplicate) local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) if extra_depends: for x in files_list: @@ -395,20 +464,26 @@ for build_target in targets: def create_dynamic_module( module, local_flags="", - module_libs = None, + module_libs = [], source_files = 'files.lst'): files_list = load_files(module, source_files) - BuildDir(build_dir + '/' + module, module) + BuildDir(build_dir + '/' + module, module, duplicate=duplicate) local_env = env.Copy(CPPFLAGS = env['CPPFLAGS'] + ' ' + local_flags) tgt = local_env.SharedLibrary(lib_dir + '/' + module, files_list, LIBS = module_libs) Default(tgt) + def create_cond_module(module, module_libs=[]): + if build_target != 'client' or not opensource: + create_static_module(module=module) + else: + create_dynamic_module(module=module, module_libs=module_libs) + ### Create an executable from the module ### def create_executable( exec_file, module, module_libs, source_files = 'files.lst'): files_list = load_files(module, source_files) - BuildDir(build_dir + '/' + module, module) + BuildDir(build_dir + '/' + module, module, duplicate=duplicate) tgt = env.Program(exec_file, files_list, LIBS = module_libs) Default(tgt) @@ -417,11 +492,12 @@ for build_target in targets: # BUILD LIBRARIES # #################### - create_static_module('llcommon') - create_static_module('llmath') + create_cond_module('llcommon') + create_cond_module('llmath') + create_cond_module('llvfs') + create_cond_module('llimagej2coj', module_libs=['openjpeg']) + create_cond_module('llimage', module_libs=['llimagej2coj', 'jpeg', 'png12']) create_static_module('llmessage') - create_static_module('llvfs') - create_static_module('llimage') create_static_module('llinventory') create_static_module('llcharacter') create_static_module('llprimitive') @@ -431,7 +507,11 @@ for build_target in targets: 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 + [ 'xmlrpc', 'z' ] + common_external_libs = net_external_libs + [ 'z' ] + if standalone and fedora: + common_external_libs += [ 'xmlrpc-epi' ] + else: + common_external_libs += [ 'xmlrpc' ] if build_target == 'client': if platform == 'linux': @@ -439,16 +519,22 @@ for build_target in targets: # BUILD LINUX_CRASH_LOGGER # ############################# output_crashlogger_bin = 'linux_crash_logger/linux-crash-logger-' + arch + '-bin' - external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] + if standalone: + external_libs = net_external_libs + [ 'db' ] + external_libs += [d[2:] for d in + 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') internal_libs = [ 'llvfs', 'llmath', 'llcommon' ] - create_executable(output_crashlogger_bin + '-globalsyms', 'linux_crash_logger', internal_libs + external_libs) + create_executable(output_crashlogger_bin + '-globalsyms', + 'linux_crash_logger', + internal_libs + external_libs) env.Command(output_crashlogger_bin, output_crashlogger_bin + '-globalsyms', hidesyms_cmd) create_static_module('llaudio') create_static_module('llmedia') create_static_module('llui') - create_static_module('llimagej2coj') if not opensource: create_dynamic_module('llkdu', '', ['llimage', 'llvfs', 'llmath', 'llcommon', 'apr-1', 'kdu_v42R']) @@ -458,7 +544,17 @@ for build_target in targets: ################## output_bin = 'newview/secondlife-' + arch + '-bin' - external_libs = client_external_libs + common_external_libs + [ 'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 'db-4.2', 'openjpeg' ] + external_libs = client_external_libs + common_external_libs + + if standalone: + external_libs += [ 'db' ] + external_libs += [ d[2:] for d in + pkgconfig('--libs-only-l').split() ] + else: + external_libs += [ 'freetype', 'SDL', 'ogg', 'vorbisenc', + 'vorbisfile', 'vorbis', 'db-4.2' ] + + external_libs += [ 'jpeg', 'openjpeg', 'png12', 'GL', 'GLU' ] if arch != 'x86_64' and arch != 'x86_64cross': if enable_fmod: @@ -540,7 +636,7 @@ for build_target in targets: # Dataserver Depends('dataserver/dataserver', 'launcher/launcher' + file_suffix) external_libs = common_external_libs + ['boost_regex-gcc-mt', 'mysqlclient', 'tcmalloc', 'stacktrace'] - internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llinventory', + internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llimagej2coj', 'llinventory', 'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ] create_executable('dataserver/dataserver' + file_suffix, 'dataserver', internal_libs + external_libs) @@ -563,8 +659,7 @@ for build_target in targets: # Rpcserver Depends('rpcserver/rpcserver', 'userserver/userserver' + file_suffix) - external_libs = common_external_libs + ['xmlrpc', - 'mysqlclient'] + external_libs = common_external_libs + ['xmlrpc', 'mysqlclient'] internal_libs = ['llscene', 'llmessage', 'lldatabase', 'llvfs', 'llmath', 'llcommon'] create_executable('rpcserver/rpcserver' + file_suffix, 'rpcserver', @@ -573,27 +668,28 @@ for build_target in targets: # Mapserver Depends('mapserver/mapserver', 'rpcserver/rpcserver' + file_suffix) external_libs = common_external_libs + ['OSMesa16', 'kdu', - 'boost_regex-gcc-mt', 'iconv', 'jpeg', 'GL', + 'boost_regex-gcc-mt', 'iconv', 'jpeg', 'openjpeg', 'GL', 'mysqlclient', 'pthread', 'dl'] - internal_libs = ['llrender', 'llwindow', 'llimage', 'lldatabase', 'llprimitive', 'llmessage', 'llkdustatic', + internal_libs = ['llrender', 'llwindow', 'llimage', 'llimagej2coj', 'lldatabase', 'llprimitive', 'llmessage', 'llkdustatic', 'llxml', 'llvfs', 'llmath', 'llcommon'] create_executable('mapserver/mapserver' + file_suffix, 'mapserver', internal_libs + external_libs) # Simulator Depends('newsim/simulator' + file_suffix, 'mapserver/mapserver' + file_suffix) - external_libs = common_external_libs + ['hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', 'hkactions', 'boost_regex-gcc-mt', 'dl', 'kdu', 'mysqlclient', 'iconv', 'tcmalloc', 'stacktrace'] + 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', + 'llscene', 'llhavok', 'llinventory', 'llimage', 'llimagej2coj', 'llcharacter', 'llxml', 'lldatabase', 'llkdustatic', 'llmessage', 'llvfs', 'llmath', 'llcommon' ] create_executable('newsim/simulator' + file_suffix, 'newsim', internal_libs + external_libs) # texture upload verifier - external_libs = common_external_libs + [ 'kdu', 'dl' ] + external_libs = common_external_libs + [ 'kdu', 'openjpeg', 'dl' ] internal_libs = [ 'llimage', + 'llimagej2coj', 'llkdustatic', 'llinventory', 'llmessage', diff --git a/linden/indra/indra_complete/indra_complete.sln b/linden/indra/indra_complete/indra_complete.sln index 80bb436..a56a889 100644 --- a/linden/indra/indra_complete/indra_complete.sln +++ b/linden/indra/indra_complete/indra_complete.sln @@ -257,10 +257,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llimagej2coj", "..\llimagej EndProject Global GlobalSection(SolutionConfiguration) = preSolution + ReleaseNoOpt = ReleaseNoOpt + ReleaseForDownload = ReleaseForDownload Debug = Debug Release = Release - ReleaseForDownload = ReleaseForDownload - ReleaseNoOpt = ReleaseNoOpt EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Debug.ActiveCfg = Debug|Win32 diff --git a/linden/indra/llcharacter/llmotioncontroller.cpp b/linden/indra/llcharacter/llmotioncontroller.cpp index e2453c9..3ef35ec 100644 --- a/linden/indra/llcharacter/llmotioncontroller.cpp +++ b/linden/indra/llcharacter/llmotioncontroller.cpp @@ -546,6 +546,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty { if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration()) { + posep->setWeight(0.f); deactivateMotion(motionp); } continue; @@ -572,6 +573,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty } else { + posep->setWeight(0.f); deactivateMotion(motionp); continue; } @@ -822,7 +824,6 @@ BOOL LLMotionController::activateMotion(LLMotion *motion, F32 time) //----------------------------------------------------------------------------- BOOL LLMotionController::deactivateMotion(LLMotion *motion) { - motion->getPose()->setWeight(0.f); motion->deactivate(); mActiveMotions.remove(motion); diff --git a/linden/indra/llcommon/llapr.h b/linden/indra/llcommon/llapr.h index a36b177..e7b12d5 100644 --- a/linden/indra/llcommon/llapr.h +++ b/linden/indra/llcommon/llapr.h @@ -35,7 +35,7 @@ #include // Need PATH_MAX in APR headers... #endif -#include "boost/noncopyable.hpp" +#include #include "apr-1/apr_thread_proc.h" #include "apr-1/apr_thread_mutex.h" diff --git a/linden/indra/llcommon/llavatarconstants.h b/linden/indra/llcommon/llavatarconstants.h index 3eedf4e..ab49368 100644 --- a/linden/indra/llcommon/llavatarconstants.h +++ b/linden/indra/llcommon/llavatarconstants.h @@ -1,5 +1,5 @@ /** - * @file indra_constants.h + * @file llavatarconstants.h * @brief some useful short term constants for Indra * * Copyright (c) 2001-2007, Linden Research, Inc. diff --git a/linden/indra/llcommon/llchat.h b/linden/indra/llcommon/llchat.h index bb2610b..7339e9a 100644 --- a/linden/indra/llcommon/llchat.h +++ b/linden/indra/llcommon/llchat.h @@ -50,7 +50,8 @@ typedef enum e_chat_type CHAT_TYPE_START = 4, CHAT_TYPE_STOP = 5, CHAT_TYPE_DEBUG_MSG = 6, - CHAT_TYPE_REGION = 7 + CHAT_TYPE_REGION = 7, + CHAT_TYPE_OWNER = 8 } EChatType; typedef enum e_chat_audible_level diff --git a/linden/indra/llcommon/lldefs.h b/linden/indra/llcommon/lldefs.h index a3651ff..25f4e73 100644 --- a/linden/indra/llcommon/lldefs.h +++ b/linden/indra/llcommon/lldefs.h @@ -55,13 +55,15 @@ const U32 SOUTHWEST = 6; const U32 SOUTHEAST = 7; const U32 MIDDLE = 8; -const U8 LL_SOUND_FLAG_NONE = 0x00; -const U8 LL_SOUND_FLAG_LOOP = 0x01; -const U8 LL_SOUND_FLAG_SYNC_MASTER = 0x02; -const U8 LL_SOUND_FLAG_SYNC_SLAVE = 0x04; -const U8 LL_SOUND_FLAG_SYNC_PENDING = 0x08; -const U8 LL_SOUND_FLAG_SYNC_MASK = LL_SOUND_FLAG_SYNC_MASTER | LL_SOUND_FLAG_SYNC_SLAVE | LL_SOUND_FLAG_SYNC_PENDING; -const U8 LL_SOUND_FLAG_QUEUE = 0x10; +const U8 EAST_MASK = 0x1< diff --git a/linden/indra/llcommon/llprocessor.cpp b/linden/indra/llcommon/llprocessor.cpp index 40dc00c..bd21351 100644 --- a/linden/indra/llcommon/llprocessor.cpp +++ b/linden/indra/llcommon/llprocessor.cpp @@ -453,7 +453,7 @@ bool CProcessor::AnalyzeIntelProcessor() case 3: // Model = 8, Brand id = 3: Pentium III Xeon (on-die L2 cache) processor model strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ break; - default: // ...˛ + default: // ... strncat(strCPUName, "Intel Pentium III core (unknown model, 0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ break; } @@ -664,8 +664,8 @@ bool CProcessor::AnalyzeAMDProcessor() mov dword ptr [tmp+44], edx } // And copy it to the brand id string - strncpy(CPUInfo.strBrandID, tmp,sizeof(CPUInfo.strBrandID-1)); /* Flawfinder: ignore */ - CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID-1)]='\0'; + strncpy(CPUInfo.strBrandID, tmp,sizeof(CPUInfo.strBrandID)-1); + CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; } else { @@ -1280,17 +1280,17 @@ void CProcessor::DecodeProcessorConfiguration(unsigned int cfg) CPUInfo._L1.Data.uiAssociativeWays = 4; CPUInfo._L1.Data.uiLineSize = 64; break; - case 0x70: // cfg = 0x70: trace L1 cache present, 12 KµOPs, 4 ways + case 0x70: // cfg = 0x70: trace L1 cache present, 12 KuOPs, 4 ways CPUInfo._Trace.bPresent = true; strcpy(CPUInfo._Trace.strSize, "12 K-micro-ops"); /* Flawfinder: ignore */ CPUInfo._Trace.uiAssociativeWays = 4; break; - case 0x71: // cfg = 0x71: trace L1 cache present, 16 KµOPs, 4 ways + case 0x71: // cfg = 0x71: trace L1 cache present, 16 KuOPs, 4 ways CPUInfo._Trace.bPresent = true; strcpy(CPUInfo._Trace.strSize, "16 K-micro-ops"); /* Flawfinder: ignore */ CPUInfo._Trace.uiAssociativeWays = 4; break; - case 0x72: // cfg = 0x72: trace L1 cache present, 32 KµOPs, 4 ways + case 0x72: // cfg = 0x72: trace L1 cache present, 32 KuOPs, 4 ways CPUInfo._Trace.bPresent = true; strcpy(CPUInfo._Trace.strSize, "32 K-micro-ops"); /* Flawfinder: ignore */ CPUInfo._Trace.uiAssociativeWays = 4; diff --git a/linden/indra/llcommon/llsd.cpp b/linden/indra/llcommon/llsd.cpp index 376a0de..f6d8d0e 100644 --- a/linden/indra/llcommon/llsd.cpp +++ b/linden/indra/llcommon/llsd.cpp @@ -26,6 +26,7 @@ * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" #include "llsd.h" #include diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp index 04cdd57..85d3883 100644 --- a/linden/indra/llcommon/llsdserialize_xml.cpp +++ b/linden/indra/llcommon/llsdserialize_xml.cpp @@ -398,7 +398,10 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) status = XML_ParseBuffer(mParser, 0, true); if (status == XML_STATUS_ERROR && !mGracefullStop) { - ((char*) buffer)[count? count - 1 : 0] = '\0'; + if (buffer) + { + ((char*) buffer)[count ? count - 1 : 0] = '\0'; + } llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; data = LLSD(); return -1; diff --git a/linden/indra/llcommon/llsdutil.cpp b/linden/indra/llcommon/llsdutil.cpp index 85718ba..e8b3ac5 100644 --- a/linden/indra/llcommon/llsdutil.cpp +++ b/linden/indra/llcommon/llsdutil.cpp @@ -297,4 +297,4 @@ char* ll_pretty_print_sd(const LLSD& sd) strncpy(buffer, stream.str().c_str(), bufferSize); buffer[bufferSize - 1] = '\0'; return buffer; -} \ No newline at end of file +} diff --git a/linden/indra/llcommon/llstreamtools.cpp b/linden/indra/llcommon/llstreamtools.cpp index d70fa60..e6cd909 100644 --- a/linden/indra/llcommon/llstreamtools.cpp +++ b/linden/indra/llcommon/llstreamtools.cpp @@ -26,6 +26,8 @@ * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" + #include #include diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp index 22d7b47..b5e307f 100644 --- a/linden/indra/llcommon/llstring.cpp +++ b/linden/indra/llcommon/llstring.cpp @@ -673,6 +673,26 @@ std::string mbcsstring_makeASCII(const std::string& wstr) } return out_str; } +std::string utf8str_removeCRLF(const std::string& utf8str) +{ + if (0 == utf8str.length()) + { + return std::string(); + } + const char CR = 13; + + std::string out; + out.reserve(utf8str.length()); + const S32 len = (S32)utf8str.length(); + for( S32 i = 0; i < len; i++ ) + { + if( utf8str[i] != CR ) + { + out.push_back(utf8str[i]); + } + } + return out; +} #if LL_WINDOWS /* If the size of the passed in buffer is not large enough to hold the string, diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index 8a2c24c..a24f944 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h @@ -457,6 +457,9 @@ std::string utf8str_makeASCII(const std::string& utf8str); // Hack - used for evil notecards. std::string mbcsstring_makeASCII(const std::string& str); +std::string utf8str_removeCRLF(const std::string& utf8str); + + template std::ostream& operator<<(std::ostream &s, const LLStringBase &str) { diff --git a/linden/indra/llcommon/lluri.cpp b/linden/indra/llcommon/lluri.cpp index c838b25..83de022 100644 --- a/linden/indra/llcommon/lluri.cpp +++ b/linden/indra/llcommon/lluri.cpp @@ -188,6 +188,55 @@ LLURI::LLURI(const std::string& escaped_str) } } +static BOOL isDefault(const std::string& scheme, U16 port) +{ + if (scheme == "http") + return port == 80; + if (scheme == "https") + return port == 443; + if (scheme == "ftp") + return port == 21; + + return FALSE; +} + +LLURI::LLURI(const std::string& scheme, + const std::string& userName, + const std::string& password, + const std::string& hostName, + U16 port, + const std::string& escapedPath, + const std::string& escapedQuery) + : mScheme(scheme), + mEscapedPath(escapedPath), + mEscapedQuery(escapedQuery) +{ + std::ostringstream auth; + std::ostringstream opaque; + + opaque << "//"; + + if (!userName.empty()) + { + auth << escape(userName); + if (!password.empty()) + { + auth << ':' << escape(password); + } + auth << '@'; + } + auth << hostName; + if (!isDefault(scheme, port)) + { + auth << ':' << port; + } + mEscapedAuthority = auth.str(); + + opaque << mEscapedAuthority << escapedPath << escapedQuery; + + mEscapedOpaque = opaque.str(); +} + LLURI::~LLURI() { } @@ -447,6 +496,35 @@ std::string LLURI::hostName() const return unescape(host); } +std::string LLURI::userName() const +{ + std::string user, userPass, host, port; + findAuthorityParts(mEscapedAuthority, userPass, host, port); + std::string::size_type pos = userPass.find(':'); + if (pos != std::string::npos) + { + user = userPass.substr(0, pos); + } + return unescape(user); +} + +std::string LLURI::password() const +{ + std::string pass, userPass, host, port; + findAuthorityParts(mEscapedAuthority, userPass, host, port); + std::string::size_type pos = userPass.find(':'); + if (pos != std::string::npos) + { + pass = userPass.substr(pos + 1); + } + return unescape(pass); +} + +BOOL LLURI::defaultPort() const +{ + return isDefault(mScheme, hostPort()); +} + U16 LLURI::hostPort() const { std::string user, host, port; diff --git a/linden/indra/llcommon/lluri.h b/linden/indra/llcommon/lluri.h index d1499b8..3f24799 100644 --- a/linden/indra/llcommon/lluri.h +++ b/linden/indra/llcommon/lluri.h @@ -48,6 +48,14 @@ class LLURI public: LLURI(); LLURI(const std::string& escaped_str); + LLURI(const std::string& scheme, + const std::string& userName, + const std::string& password, + const std::string& hostName, + U16 hostPort, + const std::string& escapedPath, + const std::string& escapedQuery); + // construct from escaped string, as would be transmitted on the net ~LLURI(); @@ -68,8 +76,6 @@ public: const U32& port, const LLSD& path, const LLSD& query); - - std::string asString() const; // the whole URI, escaped as needed @@ -84,10 +90,15 @@ public: // for schemes that follow path like syntax (http, https, ftp) std::string authority() const; // ex.: "host.com:80" std::string hostName() const; // ex.: "host.com" + std::string userName() const; + std::string password() const; U16 hostPort() const; // ex.: 80, will include implicit port + BOOL defaultPort() const; // true if port is default for scheme + const std::string& escapedPath() const { return mEscapedPath; } std::string path() const; // ex.: "/abc/def", includes leading slash // LLSD pathArray() const; // above decoded into an array of strings std::string query() const; // ex.: "x=34", section after "?" + const std::string& escapedQuery() const { return mEscapedQuery; } LLSD queryMap() const; // above decoded into a map static LLSD queryMap(std::string escaped_query_string); static std::string mapToQueryString(const LLSD& queryMap); diff --git a/linden/indra/llcommon/llversion.h b/linden/indra/llcommon/llversion.h index 57b1512..2623c3a 100644 --- a/linden/indra/llcommon/llversion.h +++ b/linden/indra/llcommon/llversion.h @@ -31,7 +31,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 17; -const S32 LL_VERSION_PATCH = 0; -const S32 LL_VERSION_BUILD = 12; +const S32 LL_VERSION_PATCH = 1; +const S32 LL_VERSION_BUILD = 0; #endif diff --git a/linden/indra/llcommon/processor.h b/linden/indra/llcommon/processor.h index 367d540..34d970e 100644 --- a/linden/indra/llcommon/processor.h +++ b/linden/indra/llcommon/processor.h @@ -2,7 +2,7 @@ * @file processor.h * @brief Legacy wrapper header. * - * Copyright (c) 2000-2007 Linden Research, Inc. + * 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 diff --git a/linden/indra/llcommon/string_table.h b/linden/indra/llcommon/string_table.h index 790741d..3d30c9f 100644 --- a/linden/indra/llcommon/string_table.h +++ b/linden/indra/llcommon/string_table.h @@ -2,7 +2,7 @@ * @file string_table.h * @brief Legacy wrapper header. * - * Copyright (c) 2000-2007 Linden Research, Inc. + * 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 diff --git a/linden/indra/llcommon/timer.h b/linden/indra/llcommon/timer.h index 31e6db6..3a098ec 100644 --- a/linden/indra/llcommon/timer.h +++ b/linden/indra/llcommon/timer.h @@ -2,7 +2,7 @@ * @file timer.h * @brief Legacy wrapper header. * - * Copyright (c) 2000-2007 Linden Research, Inc. + * 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 diff --git a/linden/indra/llcommon/timing.cpp b/linden/indra/llcommon/timing.cpp index 342bf19..0737beb 100644 --- a/linden/indra/llcommon/timing.cpp +++ b/linden/indra/llcommon/timing.cpp @@ -2,7 +2,7 @@ * @file timing.cpp * @brief This file will be deprecated in the future. * - * Copyright (c) 2000-2007 Linden Research, Inc. + * 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 diff --git a/linden/indra/llimage/files.lst b/linden/indra/llimage/files.lst index 9e14118..a6ac342 100644 --- a/linden/indra/llimage/files.lst +++ b/linden/indra/llimage/files.lst @@ -3,5 +3,7 @@ llimage/llimage.cpp llimage/llimagedxt.cpp llimage/llimagej2c.cpp llimage/llimagejpeg.cpp +llimage/llimagepng.cpp llimage/llimagetga.cpp llimage/llimageworker.cpp +llimage/llpngwrapper.cpp diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp index 5175314..b846606 100644 --- a/linden/indra/llimage/llimage.cpp +++ b/linden/indra/llimage/llimage.cpp @@ -1105,7 +1105,8 @@ file_extensions[] = { "jpg", IMG_CODEC_JPEG }, { "jpeg", IMG_CODEC_JPEG }, { "mip", IMG_CODEC_DXT }, - { "dxt", IMG_CODEC_DXT } + { "dxt", IMG_CODEC_DXT }, + { "png", IMG_CODEC_PNG } }; #define NUM_FILE_EXTENSIONS sizeof(file_extensions)/sizeof(file_extensions[0]) diff --git a/linden/indra/llimage/llimage.h b/linden/indra/llimage/llimage.h index 489fb27..cd559ec 100644 --- a/linden/indra/llimage/llimage.h +++ b/linden/indra/llimage/llimage.h @@ -67,7 +67,8 @@ enum IMG_CODEC_TGA = 4, IMG_CODEC_JPEG = 5, IMG_CODEC_DXT = 6, - IMG_CODEC_EOF = 7 + IMG_CODEC_PNG = 7, + IMG_CODEC_EOF = 8 }; //============================================================================ diff --git a/linden/indra/llimage/llimage.vcproj b/linden/indra/llimage/llimage.vcproj index 1f8a6ad..984d84e 100644 --- a/linden/indra/llimage/llimage.vcproj +++ b/linden/indra/llimage/llimage.vcproj @@ -169,11 +169,17 @@ RelativePath=".\llimagejpeg.cpp"> + + + + + + + + + + @@ -255,6 +259,10 @@ RelativePath=".\llimageworker.cpp" > + + + + @@ -293,6 +305,10 @@ RelativePath=".\llimageworker.h" > + + +#include /** * Use the boost random number generators if you want a stateful diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 327f1bf..5764c38 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -1799,6 +1799,8 @@ void LLVolume::createVolumeFaces() // sculpt replaces generate() for sculpted surfaces void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level) { + U8 sculpt_type = mParams.getSculptType(); + BOOL data_is_empty = FALSE; if (sculpt_width == 0 || sculpt_height == 0 || sculpt_data == NULL) @@ -1880,6 +1882,7 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, line += sizeT; } } + else { S32 line = 0; @@ -1894,18 +1897,52 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, U32 x = (U32) ((F32)t/(sizeT-1) * (F32) sculpt_width); U32 y = (U32) ((F32)s/(sizeS-1) * (F32) sculpt_height); - if (y == sculpt_height) // stitch bottom row + if (y == 0) // top row stitching { - y = sculpt_height - 1; - x = sculpt_width / 2; + // pinch? + if (sculpt_type == LL_SCULPT_TYPE_SPHERE) + { + x = sculpt_width / 2; + } } - if (x == sculpt_width) // stitch sides - x = 0; + if (y == sculpt_height) // bottom row stitching + { + // wrap? + if (sculpt_type == LL_SCULPT_TYPE_TORUS) + { + y = 0; + } + else + { + y = sculpt_height - 1; + } - if (y == 0) // stitch top row - x = sculpt_width / 2; - + // pinch? + if (sculpt_type == LL_SCULPT_TYPE_SPHERE) + { + x = sculpt_width / 2; + } + } + + if (x == sculpt_width) // side stitching + { + // wrap? + if ((sculpt_type == LL_SCULPT_TYPE_SPHERE) || + (sculpt_type == LL_SCULPT_TYPE_TORUS) || + (sculpt_type == LL_SCULPT_TYPE_CYLINDER)) + { + x = 0; + } + + else + { + x = sculpt_width - 1; + } + } + + + U32 index = (x + y * sculpt_width) * sculpt_components; pt.mPos.mV[0] = sculpt_data[index ] / 256.f - 0.5f; pt.mPos.mV[1] = sculpt_data[index+1] / 256.f - 0.5f; @@ -4615,82 +4652,130 @@ BOOL LLVolumeFace::createSide() } } + // adjust normals based on wrapping and stitching + BOOL s_bottom_converges = ((mVertices[0].mPosition - mVertices[mNumS*(mNumT-2)].mPosition).magVecSquared() < 0.000001f); BOOL s_top_converges = ((mVertices[mNumS-1].mPosition - mVertices[mNumS*(mNumT-2)+mNumS-1].mPosition).magVecSquared() < 0.000001f); - - if (mVolumep->getPath().isOpen() == FALSE) { //wrap normals on T - for (S32 i = 0; i < mNumS; i++) { - LLVector3 norm = mVertices[i].mNormal + mVertices[mNumS*(mNumT-1)+i].mNormal; - mVertices[i].mNormal = norm; - mVertices[mNumS*(mNumT-1)+i].mNormal = norm; + U8 sculpt_type = mVolumep->getParams().getSculptType(); + + if (sculpt_type == LL_SCULPT_TYPE_NONE) // logic for non-sculpt volumes + { + if (mVolumep->getPath().isOpen() == FALSE) + { //wrap normals on T + for (S32 i = 0; i < mNumS; i++) + { + LLVector3 norm = mVertices[i].mNormal + mVertices[mNumS*(mNumT-1)+i].mNormal; + mVertices[i].mNormal = norm; + mVertices[mNumS*(mNumT-1)+i].mNormal = norm; + } } - } - if ((mVolumep->getProfile().isOpen() == FALSE) && - !(s_bottom_converges)) + if ((mVolumep->getProfile().isOpen() == FALSE) && !(s_bottom_converges)) { //wrap normals on S - for (S32 i = 0; i < mNumT; i++) { + for (S32 i = 0; i < mNumT; i++) + { LLVector3 norm = mVertices[mNumS*i].mNormal + mVertices[mNumS*i+mNumS-1].mNormal; mVertices[mNumS * i].mNormal = norm; mVertices[mNumS * i+mNumS-1].mNormal = norm; } } - if (mVolumep->getPathType() == LL_PCODE_PATH_CIRCLE && - ((mVolumep->getProfileType() & LL_PCODE_PROFILE_MASK) == LL_PCODE_PROFILE_CIRCLE_HALF)) - { - if (s_bottom_converges) - { //all lower S have same normal - for (S32 i = 0; i < mNumT; i++) { - mVertices[mNumS*i].mNormal = LLVector3(1,0,0); + if (mVolumep->getPathType() == LL_PCODE_PATH_CIRCLE && + ((mVolumep->getProfileType() & LL_PCODE_PROFILE_MASK) == LL_PCODE_PROFILE_CIRCLE_HALF)) + { + if (s_bottom_converges) + { //all lower S have same normal + for (S32 i = 0; i < mNumT; i++) + { + mVertices[mNumS*i].mNormal = LLVector3(1,0,0); + } } - } - if (s_top_converges) - { //all upper S have same normal - for (S32 i = 0; i < mNumT; i++) { - mVertices[mNumS*i+mNumS-1].mNormal = LLVector3(-1,0,0); + if (s_top_converges) + { //all upper S have same normal + for (S32 i = 0; i < mNumT; i++) + { + mVertices[mNumS*i+mNumS-1].mNormal = LLVector3(-1,0,0); + } } } } - - U8 sculpt_type = mVolumep->getParams().getSculptType(); - if (sculpt_type == LL_SCULPT_TYPE_SPHERE) + else // logic for sculpt volumes { - // average normals for north pole + BOOL average_poles = FALSE; + BOOL wrap_s = FALSE; + BOOL wrap_t = FALSE; + + if (sculpt_type == LL_SCULPT_TYPE_SPHERE) + average_poles = TRUE; + + if ((sculpt_type == LL_SCULPT_TYPE_SPHERE) || + (sculpt_type == LL_SCULPT_TYPE_TORUS) || + (sculpt_type == LL_SCULPT_TYPE_CYLINDER)) + wrap_s = TRUE; + + if (sculpt_type == LL_SCULPT_TYPE_TORUS) + wrap_t = TRUE; + - LLVector3 average(0.0, 0.0, 0.0); - for (S32 i = 0; i < mNumS; i++) + if (average_poles) { - average += mVertices[i].mNormal; - } + // average normals for north pole + + LLVector3 average(0.0, 0.0, 0.0); + for (S32 i = 0; i < mNumS; i++) + { + average += mVertices[i].mNormal; + } + + // set average + for (S32 i = 0; i < mNumS; i++) + { + mVertices[i].mNormal = average; + } + + // average normals for south pole + + average = LLVector3(0.0, 0.0, 0.0); + for (S32 i = 0; i < mNumS; i++) + { + average += mVertices[i + mNumS * (mNumT - 1)].mNormal; + } + + // set average + for (S32 i = 0; i < mNumS; i++) + { + mVertices[i + mNumS * (mNumT - 1)].mNormal = average; + } - // set average - for (S32 i = 0; i < mNumS; i++) - { - mVertices[i].mNormal = average; } - } - - if (sculpt_type == LL_SCULPT_TYPE_SPHERE) - { - // average normals for south pole - LLVector3 average(0.0, 0.0, 0.0); - for (S32 i = 0; i < mNumS; i++) + if (wrap_s) { - average += mVertices[i + mNumS * (mNumT - 1)].mNormal; + for (S32 i = 0; i < mNumT; i++) + { + LLVector3 norm = mVertices[mNumS*i].mNormal + mVertices[mNumS*i+mNumS-1].mNormal; + mVertices[mNumS * i].mNormal = norm; + mVertices[mNumS * i+mNumS-1].mNormal = norm; + } } - // set average - for (S32 i = 0; i < mNumS; i++) + + + if (wrap_t) { - mVertices[i + mNumS * (mNumT - 1)].mNormal = average; + for (S32 i = 0; i < mNumS; i++) + { + LLVector3 norm = mVertices[i].mNormal + mVertices[mNumS*(mNumT-1)+i].mNormal; + mVertices[i].mNormal = norm; + mVertices[mNumS*(mNumT-1)+i].mNormal = norm; + } + } - } + } //normalize normals and binormals here so the meshes that reference diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index 6ac07f5..3973f70 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h @@ -174,7 +174,7 @@ const LLFaceID LL_FACE_OUTER_SIDE_3 = 0x1 << 8; const U8 LL_SCULPT_TYPE_NONE = 0; const U8 LL_SCULPT_TYPE_SPHERE = 1; const U8 LL_SCULPT_TYPE_TORUS = 2; -const U8 LL_SCULPT_TYPE_PLAIN = 3; +const U8 LL_SCULPT_TYPE_PLANE = 3; const U8 LL_SCULPT_TYPE_CYLINDER = 4; @@ -860,9 +860,6 @@ public: BOOL isUnique() const { return mUnique; } S32 getSculptLevel() const { return mSculptLevel; } - void setSculptLevel(S32 level) { mSculptLevel = level; } - - U8 getSculptType() const { return mSculptType; } S32 *getTriangleIndices(U32 &num_indices) const; void generateSilhouetteVertices(std::vector &vertices, std::vector &normals, std::vector &segments, const LLVector3& view_vec, @@ -908,7 +905,6 @@ protected: BOOL mUnique; F32 mDetail; S32 mSculptLevel; - U8 mSculptType; LLVolumeParams mParams; LLPath *mPathp; diff --git a/linden/indra/llmath/v3color.cpp b/linden/indra/llmath/v3color.cpp index 5464a0b..5378bc5 100644 --- a/linden/indra/llmath/v3color.cpp +++ b/linden/indra/llmath/v3color.cpp @@ -110,4 +110,4 @@ void LLColor3::calcHSL(F32* hue, F32* saturation, F32* luminance) const if (hue) *hue = H; if (saturation) *saturation = S; if (luminance) *luminance = L; -} \ No newline at end of file +} diff --git a/linden/indra/llmedia/llmediaengine.cpp b/linden/indra/llmedia/llmediaengine.cpp index 34f63b7..c75ed32 100644 --- a/linden/indra/llmedia/llmediaengine.cpp +++ b/linden/indra/llmedia/llmediaengine.cpp @@ -26,6 +26,7 @@ * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" #include "llmediaengine.h" #include "indra_constants.h" diff --git a/linden/indra/llmessage/llassetstorage.cpp b/linden/indra/llmessage/llassetstorage.cpp index c8610a7..8696438 100644 --- a/linden/indra/llmessage/llassetstorage.cpp +++ b/linden/indra/llmessage/llassetstorage.cpp @@ -162,6 +162,8 @@ LLAssetRequest::LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType type mHost(), mIsTemp( FALSE ), mIsLocal(FALSE), + mIsUserWaiting(FALSE), + mTimeout(LL_ASSET_STORAGE_TIMEOUT), mIsPriority(FALSE), mDataSentInFirstPacket(FALSE), mDataIsInVFS( FALSE ) @@ -1270,7 +1272,9 @@ void LLAssetStorage::storeAssetData( void* user_data, bool temp_file, bool is_priority, - bool store_local) + bool store_local, + bool user_waiting, + F64 timeout) { llwarns << "storeAssetData: wrong version called" << llendl; } @@ -1285,7 +1289,9 @@ void LLAssetStorage::storeAssetData( bool temp_file , bool is_priority, bool store_local, - const LLUUID& requesting_agent_id) + const LLUUID& requesting_agent_id, + bool user_waiting, + F64 timeout) { llwarns << "storeAssetData: wrong version called" << llendl; } @@ -1299,7 +1305,9 @@ void LLAssetStorage::storeAssetData( LLStoreAssetCallback callback, void* user_data, bool temp_file, - bool is_priority) + bool is_priority, + bool user_waiting, + F64 timeout) { llwarns << "storeAssetData: wrong version called" << llendl; } @@ -1313,7 +1321,9 @@ void LLAssetStorage::storeAssetData( LLStoreAssetCallback callback, void* user_data, bool temp_file, - bool is_priority) + bool is_priority, + bool user_waiting, + F64 timeout) { llwarns << "storeAssetData: wrong version called" << llendl; } diff --git a/linden/indra/llmessage/llassetstorage.h b/linden/indra/llmessage/llassetstorage.h index f80a77d..ab12b7a 100644 --- a/linden/indra/llmessage/llassetstorage.h +++ b/linden/indra/llmessage/llassetstorage.h @@ -95,6 +95,7 @@ public: void setUUID(const LLUUID& id) { mUUID = id; } void setType(LLAssetType::EType type) { mType = type; } + void setTimeout (F64 timeout) { mTimeout = timeout; } protected: LLUUID mUUID; @@ -109,7 +110,9 @@ public: LLHost mHost; BOOL mIsTemp; BOOL mIsLocal; + BOOL mIsUserWaiting; // We don't want to try forever if a user is waiting for a result. F64 mTime; // Message system time + F64 mTimeout; // Amount of time before timing out. BOOL mIsPriority; BOOL mDataSentInFirstPacket; BOOL mDataIsInVFS; @@ -252,7 +255,9 @@ public: void* user_data, bool temp_file = false, bool is_priority = false, - bool store_local = false); + bool store_local = false, + bool user_waiting= false, + F64 timeout=LL_ASSET_STORAGE_TIMEOUT); /* * AssetID version @@ -266,7 +271,9 @@ public: bool temp_file = false, bool is_priority = false, bool store_local = false, - const LLUUID& requesting_agent_id = LLUUID::null); + const LLUUID& requesting_agent_id = LLUUID::null, + bool user_waiting= false, + F64 timeout=LL_ASSET_STORAGE_TIMEOUT); virtual void checkForTimeouts(); @@ -360,7 +367,9 @@ public: LLStoreAssetCallback callback, void* user_data, bool temp_file = false, - bool is_priority = false); + bool is_priority = false, + bool user_waiting = false, + F64 timeout = LL_ASSET_STORAGE_TIMEOUT); /* * TransactionID version @@ -372,7 +381,9 @@ public: LLStoreAssetCallback callback, void *user_data, bool temp_file = false, - bool is_priority = false); + bool is_priority = false, + 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); diff --git a/linden/indra/llmessage/llblowfishcipher.cpp b/linden/indra/llmessage/llblowfishcipher.cpp index 1772078..62464de 100644 --- a/linden/indra/llmessage/llblowfishcipher.cpp +++ b/linden/indra/llmessage/llblowfishcipher.cpp @@ -1,5 +1,5 @@ /** - * @file llblowcipher.cpp + * @file llblowfishcipher.cpp * @brief Wrapper around OpenSSL Blowfish encryption algorithm. * * We do not have OpenSSL headers or libraries on Windows, so this @@ -85,33 +85,33 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) << " iv_len " << iv_length << llendl; - int output_len = 0; - int temp_len = 0; - if (!EVP_EncryptUpdate(&context, - dst, - &output_len, - src, - src_len)) - { - llwarns << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << llendl; - goto ERROR; - } - - // There may be some final data left to encrypt if the input is - // not an exact multiple of the block size. - if (!EVP_EncryptFinal_ex(&context, (unsigned char*)(dst + output_len), &temp_len)) - { - llwarns << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << llendl; - goto ERROR; - } - output_len += temp_len; - - EVP_CIPHER_CTX_cleanup(&context); - return output_len; - -ERROR: - EVP_CIPHER_CTX_cleanup(&context); - return 0; + int output_len = 0; + int temp_len = 0; + if (!EVP_EncryptUpdate(&context, + dst, + &output_len, + src, + src_len)) + { + llwarns << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << llendl; + goto ERROR; + } + + // There may be some final data left to encrypt if the input is + // not an exact multiple of the block size. + if (!EVP_EncryptFinal_ex(&context, (unsigned char*)(dst + output_len), &temp_len)) + { + llwarns << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << llendl; + goto ERROR; + } + output_len += temp_len; + + EVP_CIPHER_CTX_cleanup(&context); + return output_len; + +ERROR: + EVP_CIPHER_CTX_cleanup(&context); + return 0; } // virtual diff --git a/linden/indra/llmessage/llcachename.cpp b/linden/indra/llmessage/llcachename.cpp index 2a21b5a..d960429 100644 --- a/linden/indra/llmessage/llcachename.cpp +++ b/linden/indra/llmessage/llcachename.cpp @@ -66,132 +66,130 @@ LLCacheName* gCacheName = NULL; /// class LLCacheNameEntry /// --------------------------------------------------------------------------- -namespace { - class LLCacheNameEntry - { - public: - LLCacheNameEntry(); +class LLCacheNameEntry +{ +public: + LLCacheNameEntry(); - public: - bool mIsGroup; - U32 mCreateTime; // unix time_t - char mFirstName[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ - char mLastName[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ - char mGroupName[DB_GROUP_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ - }; +public: + bool mIsGroup; + U32 mCreateTime; // unix time_t + char mFirstName[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ + char mLastName[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ + char mGroupName[DB_GROUP_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ +}; - LLCacheNameEntry::LLCacheNameEntry() - { - mFirstName[0] = '\0'; - mLastName[0] = '\0'; - mGroupName[0] = '\0'; - } +LLCacheNameEntry::LLCacheNameEntry() +{ + mFirstName[0] = '\0'; + mLastName[0] = '\0'; + mGroupName[0] = '\0'; +} - class PendingReply - { - public: - LLUUID mID; - LLCacheNameCallback mCallback; - LLHost mHost; - void* mData; - PendingReply(const LLUUID& id, LLCacheNameCallback callback, void* data = NULL) - : mID(id), mCallback(callback), mData(data) - { } +class PendingReply +{ +public: + LLUUID mID; + LLCacheNameCallback mCallback; + LLHost mHost; + void* mData; + PendingReply(const LLUUID& id, LLCacheNameCallback callback, void* data = NULL) + : mID(id), mCallback(callback), mData(data) + { } - PendingReply(const LLUUID& id, const LLHost& host) - : mID(id), mCallback(0), mHost(host) - { } + PendingReply(const LLUUID& id, const LLHost& host) + : mID(id), mCallback(0), mHost(host) + { } - void done() { mID.setNull(); } - bool isDone() const { return mID.isNull() != FALSE; } - }; + void done() { mID.setNull(); } + bool isDone() const { return mID.isNull() != FALSE; } +}; - class ReplySender - { - public: - ReplySender(LLMessageSystem* msg); - ~ReplySender(); +class ReplySender +{ +public: + ReplySender(LLMessageSystem* msg); + ~ReplySender(); - void send(const LLUUID& id, - const LLCacheNameEntry& entry, const LLHost& host); + void send(const LLUUID& id, + const LLCacheNameEntry& entry, const LLHost& host); - private: - void flush(); +private: + void flush(); - LLMessageSystem* mMsg; - bool mPending; - bool mCurrIsGroup; - LLHost mCurrHost; - }; + LLMessageSystem* mMsg; + bool mPending; + bool mCurrIsGroup; + LLHost mCurrHost; +}; - ReplySender::ReplySender(LLMessageSystem* msg) - : mMsg(msg), mPending(false) - { } +ReplySender::ReplySender(LLMessageSystem* msg) + : mMsg(msg), mPending(false) +{ } - ReplySender::~ReplySender() - { - flush(); - } +ReplySender::~ReplySender() +{ + flush(); +} - void ReplySender::send(const LLUUID& id, - const LLCacheNameEntry& entry, const LLHost& host) +void ReplySender::send(const LLUUID& id, + const LLCacheNameEntry& entry, const LLHost& host) +{ + if (mPending) { - if (mPending) + if (mCurrIsGroup != entry.mIsGroup + || mCurrHost != host) { - if (mCurrIsGroup != entry.mIsGroup - || mCurrHost != host) - { - flush(); - } + flush(); } + } - if (!mPending) - { - mPending = true; - mCurrIsGroup = entry.mIsGroup; - mCurrHost = host; - - if(mCurrIsGroup) - mMsg->newMessageFast(_PREHASH_UUIDGroupNameReply); - else - mMsg->newMessageFast(_PREHASH_UUIDNameReply); - } + if (!mPending) + { + mPending = true; + mCurrIsGroup = entry.mIsGroup; + mCurrHost = host; - mMsg->nextBlockFast(_PREHASH_UUIDNameBlock); - mMsg->addUUIDFast(_PREHASH_ID, id); if(mCurrIsGroup) - { - mMsg->addStringFast(_PREHASH_GroupName, entry.mGroupName); - } + mMsg->newMessageFast(_PREHASH_UUIDGroupNameReply); else - { - mMsg->addStringFast(_PREHASH_FirstName, entry.mFirstName); - mMsg->addStringFast(_PREHASH_LastName, entry.mLastName); - } + mMsg->newMessageFast(_PREHASH_UUIDNameReply); + } - if(mMsg->isSendFullFast(_PREHASH_UUIDNameBlock)) - { - flush(); - } + mMsg->nextBlockFast(_PREHASH_UUIDNameBlock); + mMsg->addUUIDFast(_PREHASH_ID, id); + if(mCurrIsGroup) + { + mMsg->addStringFast(_PREHASH_GroupName, entry.mGroupName); + } + else + { + mMsg->addStringFast(_PREHASH_FirstName, entry.mFirstName); + mMsg->addStringFast(_PREHASH_LastName, entry.mLastName); } - void ReplySender::flush() + if(mMsg->isSendFullFast(_PREHASH_UUIDNameBlock)) { - if (mPending) - { - mMsg->sendReliable(mCurrHost); - mPending = false; - } + flush(); } +} +void ReplySender::flush() +{ + if (mPending) + { + mMsg->sendReliable(mCurrHost); + mPending = false; + } +} - typedef std::set AskQueue; - typedef std::vector ReplyQueue; - typedef std::map PendingQueue; - typedef std::map Cache; - typedef std::vector Observers; -}; + +typedef std::set AskQueue; +typedef std::vector ReplyQueue; +typedef std::map PendingQueue; +typedef std::map Cache; +typedef std::vector Observers; class LLCacheName::Impl { diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp index 5eaaab0..362204a 100644 --- a/linden/indra/llmessage/llcurl.cpp +++ b/linden/indra/llmessage/llcurl.cpp @@ -28,6 +28,8 @@ * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" + #include "llcurl.h" #include diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp index 5a0cdad..d83349b 100644 --- a/linden/indra/llmessage/llhttpassetstorage.cpp +++ b/linden/indra/llmessage/llhttpassetstorage.cpp @@ -428,14 +428,18 @@ void LLHTTPAssetStorage::storeAssetData( bool temp_file, bool is_priority, bool store_local, - const LLUUID& requesting_agent_id) + const LLUUID& requesting_agent_id, + bool user_waiting, + F64 timeout) { if (mVFS->getExists(uuid, type)) { LLAssetRequest *req = new LLAssetRequest(uuid, type); - req->mUpCallback = callback; - req->mUserData = user_data; + req->mUpCallback = callback; + req->mUserData = user_data; req->mRequestingAgentID = requesting_agent_id; + req->mIsUserWaiting = user_waiting; + req->mTimeout = timeout; // this will get picked up and transmitted in checkForTimeouts if(store_local) @@ -469,7 +473,9 @@ void LLHTTPAssetStorage::storeAssetData( LLStoreAssetCallback callback, void* user_data, bool temp_file, - bool is_priority) + bool is_priority, + bool user_waiting, + F64 timeout) { llinfos << "LLAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; @@ -509,7 +515,11 @@ void LLHTTPAssetStorage::storeAssetData( legacyStoreDataCallback, (void**)legacy, temp_file, - is_priority); + is_priority, + false, + LLUUID::null, + user_waiting, + timeout); } else { @@ -608,7 +618,19 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt, // This request was found in the pending list. Move it to the end! LLAssetRequest* pending_req = *result; pending->remove(pending_req); - pending->push_back(pending_req); + + if (!pending_req->mIsUserWaiting) //A user is waiting on this request. Toss it. + { + pending->push_back(pending_req); + } + else + { + 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); + } + + } llinfos << "Asset " << getRequestName(rt) << " request for " << asset_id << "." << LLAssetType::lookup(asset_type) @@ -744,6 +766,14 @@ void LLHTTPAssetStorage::checkForTimeouts() LLHTTPAssetRequest *new_req = new LLHTTPAssetRequest(this, req->getUUID(), req->getType(), RT_UPLOAD, tmp_url, mCurlMultiHandle); + + if (req->mIsUserWaiting) //If a user is waiting on a realtime response, we want to perserve information across upload attempts. + { + new_req->mTime = req->mTime; + new_req->mTimeout = req->mTimeout; + new_req->mIsUserWaiting = req->mIsUserWaiting; + } + if (do_compress) { new_req->prepareCompressedUpload(); @@ -839,11 +869,12 @@ void LLHTTPAssetStorage::checkForTimeouts() if (curl_msg && curl_msg->msg == CURLMSG_DONE) { long curl_result = 0; - S32 xfer_result = 0; + S32 xfer_result = LL_ERR_NOERR; LLHTTPAssetRequest *req = NULL; curl_easy_getinfo(curl_msg->easy_handle, CURLINFO_PRIVATE, &req); + // TODO: Throw curl_result at all callbacks. curl_easy_getinfo(curl_msg->easy_handle, CURLINFO_HTTP_CODE, &curl_result); if (RT_UPLOAD == req->mRequestType || RT_LOCALUPLOAD == req->mRequestType) { @@ -865,6 +896,12 @@ void LLHTTPAssetStorage::checkForTimeouts() { llwarns << "Re-requesting upload for " << req->getUUID() << ". Received upload error to " << req->mURLBuffer << " with result " << curl_easy_strerror(curl_msg->data.result) << ", http result " << curl_result << llendl; + + ////HACK (probably) I am sick of this getting requeued and driving me mad. + //if (req->mIsUserWaiting) + //{ + // deletePendingRequest(RT_UPLOAD, req->getType(), req->getUUID()); + //} } else { @@ -949,14 +986,23 @@ void LLHTTPAssetStorage::checkForTimeouts() void LLHTTPAssetStorage::bumpTimedOutUploads() { + bool user_waiting=FALSE; + + F64 mt_secs = LLMessageSystem::getMessageTimeSeconds(); + + if (mPendingUploads.size()) + { + request_list_t::iterator it = mPendingUploads.begin(); + LLAssetRequest* req = *it; + user_waiting=req->mIsUserWaiting; + } + // No point bumping currently running uploads if there are no others in line. - if (!(mPendingUploads.size() > mRunningUploads.size())) + if (!(mPendingUploads.size() > mRunningUploads.size()) && !user_waiting) { return; } - F64 mt_secs = LLMessageSystem::getMessageTimeSeconds(); - // deletePendingRequest will modify the mRunningUploads list so we don't want to iterate over it. request_list_t temp_running = mRunningUploads; @@ -967,7 +1013,7 @@ void LLHTTPAssetStorage::bumpTimedOutUploads() //request_list_t::iterator curiter = iter++; LLAssetRequest* req = *it; - if ( LL_ASSET_STORAGE_TIMEOUT < (mt_secs - req->mTime) ) + if ( req->mTimeout < (mt_secs - req->mTime) ) { llwarns << "Asset upload request timed out for " << req->getUUID() << "." diff --git a/linden/indra/llmessage/llhttpassetstorage.h b/linden/indra/llmessage/llhttpassetstorage.h index 2977301..962bece 100644 --- a/linden/indra/llmessage/llhttpassetstorage.h +++ b/linden/indra/llmessage/llhttpassetstorage.h @@ -66,7 +66,9 @@ public: bool temp_file = false, bool is_priority = false, bool store_local = false, - const LLUUID& requesting_agent_id = LLUUID::null); + const LLUUID& requesting_agent_id = LLUUID::null, + bool user_waiting=FALSE, + F64 timeout=LL_ASSET_STORAGE_TIMEOUT); virtual void storeAssetData( const char* filename, @@ -75,7 +77,9 @@ public: LLStoreAssetCallback callback, void* user_data, bool temp_file, - bool is_priority); + bool is_priority, + bool user_waiting=FALSE, + F64 timeout=LL_ASSET_STORAGE_TIMEOUT); virtual LLSD getPendingDetails(ERequestType rt, LLAssetType::EType asset_type, diff --git a/linden/indra/llmessage/llhttpnode.cpp b/linden/indra/llmessage/llhttpnode.cpp index 97064a1..25413b4 100644 --- a/linden/indra/llmessage/llhttpnode.cpp +++ b/linden/indra/llmessage/llhttpnode.cpp @@ -29,7 +29,7 @@ #include "linden_common.h" #include "llhttpnode.h" -#include "boost/tokenizer.hpp" +#include #include "llstl.h" diff --git a/linden/indra/llmessage/lliohttpserver.cpp b/linden/indra/llmessage/lliohttpserver.cpp index d7fc54e..5c96102 100644 --- a/linden/indra/llmessage/lliohttpserver.cpp +++ b/linden/indra/llmessage/lliohttpserver.cpp @@ -49,7 +49,7 @@ #include -#include "boost/tokenizer.hpp" +#include static const char HTTP_VERSION_STR[] = "HTTP/1.0"; static const std::string CONTEXT_REQUEST("request"); diff --git a/linden/indra/llmessage/lliosocket.cpp b/linden/indra/llmessage/lliosocket.cpp index 0ceb436..8bc347c 100644 --- a/linden/indra/llmessage/lliosocket.cpp +++ b/linden/indra/llmessage/lliosocket.cpp @@ -441,6 +441,8 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( #if LL_WINDOWS if (status == 730035) break; +#else + (void) status; #endif mLastWritten = segment.data() + len - 1; diff --git a/linden/indra/llmessage/llmessagethrottle.cpp b/linden/indra/llmessage/llmessagethrottle.cpp index 07c22a5..bbaa9d8 100644 --- a/linden/indra/llmessage/llmessagethrottle.cpp +++ b/linden/indra/llmessage/llmessagethrottle.cpp @@ -26,6 +26,8 @@ * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" + #include "llhash.h" #include "llmessagethrottle.h" diff --git a/linden/indra/llmessage/llservicebuilder.cpp b/linden/indra/llmessage/llservicebuilder.cpp index 86b7d9d..91040c0 100644 --- a/linden/indra/llmessage/llservicebuilder.cpp +++ b/linden/indra/llmessage/llservicebuilder.cpp @@ -26,6 +26,7 @@ * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" #include "llapp.h" #include "llfile.h" #include "llservicebuilder.h" diff --git a/linden/indra/llmessage/lltemplatemessagereader.cpp b/linden/indra/llmessage/lltemplatemessagereader.cpp index 892efb8..bb3f4f4 100644 --- a/linden/indra/llmessage/lltemplatemessagereader.cpp +++ b/linden/indra/llmessage/lltemplatemessagereader.cpp @@ -594,7 +594,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender tsize = tsizeh; break; case 4: - htonmemcpy(&tsizeb, &buffer[decode_pos], MVT_U32, 4); + htonmemcpy(&tsize, &buffer[decode_pos], MVT_U32, 4); break; default: llerrs << "Attempting to read variable field with unknown size of " << data_size << llendl; diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp index ab41cca..d1c2875 100644 --- a/linden/indra/llmessage/message.cpp +++ b/linden/indra/llmessage/message.cpp @@ -1341,7 +1341,7 @@ LLMessageSystem::~LLMessageSystem() if (!mbError) { - end_net(); + end_net(mSocket); } delete mTemplateMessageReader; @@ -1355,6 +1355,9 @@ LLMessageSystem::~LLMessageSystem() delete mLLSDMessageReader; mLLSDMessageReader = NULL; + delete mLLSDMessageBuilder; + mLLSDMessageBuilder = NULL; + delete mPollInfop; mPollInfop = NULL; @@ -4164,11 +4167,13 @@ void LLMessageSystem::dumpPacketToLog() char line_buffer[256]; /* Flawfinder: ignore */ S32 i; S32 cur_line_pos = 0; - S32 cur_line = 0; + for (i = 0; i < mTrueReceiveSize; i++) { - snprintf(line_buffer + cur_line_pos*3, sizeof(line_buffer),"%02x ", mTrueReceiveBuffer[i]); /* Flawfinder: ignore */ + S32 offset = cur_line_pos * 3; + snprintf(line_buffer + offset, sizeof(line_buffer) - offset, + "%02x ", mTrueReceiveBuffer[i]); /* Flawfinder: ignore */ cur_line_pos++; if (cur_line_pos >= 16) { @@ -4345,11 +4350,6 @@ std::string get_shared_secret() typedef std::map BuilderMap; -static void setBuilder(BuilderMap& map, const char* name, LLMessageBuilder* builder) -{ - map[gMessageStringTable.getString(name)] = builder; -} - void LLMessageSystem::newMessageFast(const char *name) { if(LLMessageConfig::isMessageBuiltTemplate(name)) diff --git a/linden/indra/llmessage/net.cpp b/linden/indra/llmessage/net.cpp index c61f4a2..1395093 100644 --- a/linden/indra/llmessage/net.cpp +++ b/linden/indra/llmessage/net.cpp @@ -289,8 +289,12 @@ S32 start_net(S32& socket_out, int& nPort) return 0; } -void end_net() +void end_net(S32& socket_out) { + if (socket_out < 0) + { + closesocket(socket_out); + } WSACleanup(); } @@ -457,8 +461,12 @@ S32 start_net(S32& socket_out, int& nPort) return 0; } -void end_net() +void end_net(S32& socket_out) { + if (socket_out < 0) + { + close(socket_out); + } } int receive_packet(int hSocket, char * receiveBuffer) diff --git a/linden/indra/llmessage/net.h b/linden/indra/llmessage/net.h index b2f931f..cfc1f88 100644 --- a/linden/indra/llmessage/net.h +++ b/linden/indra/llmessage/net.h @@ -40,7 +40,7 @@ class LLHost; // Returns 0 on success, non-zero on error. // Sets socket handler/descriptor, changes nPort if port requested is unavailable. S32 start_net(S32& socket_out, int& nPort); -void end_net(); +void end_net(S32& socket_out); // returns size of packet or -1 in case of error S32 receive_packet(int hSocket, char * receiveBuffer); diff --git a/linden/indra/llrender/llvertexbuffer.cpp b/linden/indra/llrender/llvertexbuffer.cpp index 45d706f..7f24313 100644 --- a/linden/indra/llrender/llvertexbuffer.cpp +++ b/linden/indra/llrender/llvertexbuffer.cpp @@ -164,56 +164,6 @@ void LLVertexBuffer::clientCopy(F64 max_time) //---------------------------------------------------------------------------- -// For debugging -struct VTNC /// Simple -{ - F32 v1,v2,v3; - F32 n1,n2,n3; - F32 t1,t2; - U32 c; -}; -static VTNC dbg_vtnc; - -struct VTUNCB // Simple + Bump -{ - F32 v1,v2,v3; - F32 n1,n2,n3; - F32 t1,t2; - F32 u1,u2; - F32 b1,b2,b3; - U32 c; -}; -static VTUNCB dbg_vtuncb; - -struct VTUNC // Surfacepatch -{ - F32 v1,v2,v3; - F32 n1,n2,n3; - F32 t1,t2; - F32 u1,u2; - U32 c; -}; -static VTUNC dbg_vtunc; - -struct VTNW /// Avatar -{ - F32 v1,v2,v3; - F32 n1,n2,n3; - F32 t1,t2; - F32 w; -}; -static VTNW dbg_vtnw; - -struct VTNPAD /// Avatar Output -{ - F32 v1,v2,v3,p1; - F32 n1,n2,n3,p2; - F32 t1,t2,p3,p4; -}; -static VTNPAD dbg_vtnpad; - -//---------------------------------------------------------------------------- - LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) : LLRefCount(), mNumVerts(0), mNumIndices(0), mUsage(usage), mGLBuffer(0), mGLIndices(0), diff --git a/linden/indra/llui/llalertdialog.h b/linden/indra/llui/llalertdialog.h index d389236..1add4a4 100644 --- a/linden/indra/llui/llalertdialog.h +++ b/linden/indra/llui/llalertdialog.h @@ -162,6 +162,15 @@ public: return FALSE; } } + + void setIgnore(bool state) + { + if (mIgnorable) + { + LLAlertDialog::sSettings->setWarning(mIgnoreLabel, !state); + } + } + public: LLString mLabel; // Handle for access from code, etc diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index e00454a..27df619 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp @@ -66,8 +66,8 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString mAllowTextEntry(FALSE), mMaxChars(20), mTextEntryTentative(TRUE), - mPrearrangeCallback( NULL ), mListPosition(BELOW), + mPrearrangeCallback( NULL ), mTextEntryCallback( NULL ) { // For now, all comboboxes don't take keyboard focus when clicked. diff --git a/linden/indra/llui/llctrlselectioninterface.cpp b/linden/indra/llui/llctrlselectioninterface.cpp index 3b71942..d3b83a2 100644 --- a/linden/indra/llui/llctrlselectioninterface.cpp +++ b/linden/indra/llui/llctrlselectioninterface.cpp @@ -25,6 +25,7 @@ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" #include "llctrlselectioninterface.h" diff --git a/linden/indra/llui/lleditmenuhandler.cpp b/linden/indra/llui/lleditmenuhandler.cpp index 85b4464..559cef4 100644 --- a/linden/indra/llui/lleditmenuhandler.cpp +++ b/linden/indra/llui/lleditmenuhandler.cpp @@ -26,7 +26,7 @@ * COMPLETENESS OR PERFORMANCE. */ -#include "stdtypes.h" +#include "linden_common.h" #include "lleditmenuhandler.h" diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 44616b9..98286fa 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -220,6 +220,9 @@ LLString LLLineEditor::getWidgetTag() const void LLLineEditor::onFocusLost() { + // Need to notify early when loosing focus. + getWindow()->allowLanguageTextInput(FALSE); + LLUICtrl::onFocusLost(); if( mCommitOnFocusLost && mText.getString() != mPrevText) @@ -1130,7 +1133,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) // handle ctrl-uparrow if we have a history enabled line editor. case KEY_UP: - if( mHaveHistory && ( MASK_CONTROL & mask ) ) + if( mHaveHistory && ( MASK_CONTROL == mask ) ) { if( mCurrentHistoryLine > 0 ) { @@ -1147,7 +1150,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) // handle ctrl-downarrow if we have a history enabled line editor case KEY_DOWN: - if( mHaveHistory && ( MASK_CONTROL & mask ) ) + if( mHaveHistory && ( MASK_CONTROL == mask ) ) { if( !mLineHistory.empty() && mCurrentHistoryLine < mLineHistory.size() - 1 ) { @@ -1646,6 +1649,12 @@ void LLLineEditor::setFocus( BOOL new_state ) { BOOL old_state = hasFocus(); + if (!new_state) + { + getWindow()->allowLanguageTextInput(FALSE); + } + + // getting focus when we didn't have it before, and we want to select all if (!old_state && new_state && mSelectAllonFocusReceived) { @@ -1676,6 +1685,16 @@ void LLLineEditor::setFocus( BOOL new_state ) } LLUICtrl::setFocus( new_state ); + + if (new_state) + { + // Allow Language Text Input only when this LineEditor has + // no prevalidate function attached. This criterion works + // fine on 1.15.0.2, since all prevalidate func reject any + // non-ASCII characters. I'm not sure on future versions, + // however. + getWindow()->allowLanguageTextInput(mPrevalidateFunc == NULL); + } } //virtual diff --git a/linden/indra/llui/llrootview.cpp b/linden/indra/llui/llrootview.cpp index d78244d..bf231f1 100644 --- a/linden/indra/llui/llrootview.cpp +++ b/linden/indra/llui/llrootview.cpp @@ -25,6 +25,7 @@ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" #include "llrootview.h" diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp index cf43ee1..be41aa8 100644 --- a/linden/indra/llui/llscrollcontainer.cpp +++ b/linden/indra/llui/llscrollcontainer.cpp @@ -292,7 +292,26 @@ BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks ) // Opaque return TRUE; } +BOOL LLScrollableContainerView::needsToScroll(S32 x, S32 y, LLScrollableContainerView::SCROLL_ORIENTATION axis) +{ + if(mScrollbar[axis]->getVisible()) + { + LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 ); + const S32 AUTOSCROLL_SIZE = 10; + if(mScrollbar[axis]->getVisible()) + { + inner_rect_local.mRight -= SCROLLBAR_SIZE; + inner_rect_local.mTop += AUTOSCROLL_SIZE; + inner_rect_local.mBottom = inner_rect_local.mTop - AUTOSCROLL_SIZE; + } + if( inner_rect_local.pointInRect( x, y ) && (mScrollbar[axis]->getDocPos() > 0) ) + { + return TRUE; + } + } + return FALSE; +} BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, diff --git a/linden/indra/llui/llscrollcontainer.h b/linden/indra/llui/llscrollcontainer.h index 3b3bbef..34fff9c 100644 --- a/linden/indra/llui/llscrollcontainer.h +++ b/linden/indra/llui/llscrollcontainer.h @@ -35,6 +35,7 @@ #endif #include "stdenums.h" #include "llcoord.h" +#include "llscrollbar.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLScrollableContainerView @@ -47,7 +48,6 @@ // This class is a decorator class. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLScrollbar; class LLViewBorder; class LLUICtrlFactory; @@ -55,6 +55,10 @@ class LLUICtrlFactory; class LLScrollableContainerView : public LLUICtrl { public: + // Note: vertical comes before horizontal because vertical + // scrollbars have priority for mouse and keyboard events. + enum SCROLL_ORIENTATION { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT }; + LLScrollableContainerView( const LLString& name, const LLRect& rect, LLView* scrolled_view, BOOL is_opaque = FALSE, const LLColor4& bg_color = LLColor4(0,0,0,0) ); @@ -88,6 +92,8 @@ public: void goToBottom(); S32 getBorderWidth(); + BOOL needsToScroll(S32 x, S32 y, SCROLL_ORIENTATION axis); + // LLView functionality virtual void reshape(S32 width, S32 height, BOOL called_from_parent); virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); @@ -110,10 +116,6 @@ protected: virtual void scrollVertical( S32 new_pos ); void updateScroll(); - // Note: vertical comes before horizontal because vertical - // scrollbars have priority for mouse and keyboard events. - enum { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT }; - LLScrollbar* mScrollbar[SCROLLBAR_COUNT]; LLView* mScrolledView; S32 mSize; diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index fd98bd5..5571d39 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp @@ -98,8 +98,10 @@ protected: // // LLScrollListIcon // -LLScrollListIcon::LLScrollListIcon(LLImageGL* icon, S32 width, LLUUID image_id) : -mIcon(icon), mColor(LLColor4::white), mImageUUID(image_id.asString()) +LLScrollListIcon::LLScrollListIcon(LLImageGL* icon, S32 width, LLUUID image_id) + : mIcon(icon), + mImageUUID(image_id.asString()), + mColor(LLColor4::white) { if (width) { @@ -431,21 +433,20 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, mFgUnselectedColor( LLUI::sColorsGroup->getColor("ScrollUnselectedColor") ), mFgDisabledColor( LLUI::sColorsGroup->getColor("ScrollDisabledColor") ), mHighlightedColor( LLUI::sColorsGroup->getColor("ScrollHighlightedColor") ), - mHighlightedItem(-1), mBorderThickness( 2 ), mOnDoubleClickCallback( NULL ), mOnMaximumSelectCallback( NULL ), mOnSortChangedCallback( NULL ), - mDrewSelected(FALSE), + mHighlightedItem(-1), mBorder(NULL), - mSearchColumn(0), mDefaultColumn("SIMPLE"), - + mSearchColumn(0), mNumDynamicWidthColumns(0), mTotalStaticColumnWidth(0), mSortColumn(-1), + mSortAscending(TRUE), mSorted(TRUE), - mSortAscending(TRUE) + mDrewSelected(FALSE) { mItemListRect.setOriginAndSize( mBorderThickness + LIST_BORDER_PAD, diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index 429985b..9829832 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h @@ -328,7 +328,7 @@ public: S32 getNumColumns() const { return mColumns.size(); } - LLScrollListCell *getColumn(const S32 i) const { if (i < (S32)mColumns.size()) { return mColumns[i]; } return NULL; } + LLScrollListCell *getColumn(const S32 i) const { if (0 <= i && i < (S32)mColumns.size()) { return mColumns[i]; } return NULL; } virtual BOOL handleClick(S32 x, S32 y, MASK mask); diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp index 44940ae..01c06c3 100644 --- a/linden/indra/llui/lltabcontainer.cpp +++ b/linden/indra/llui/lltabcontainer.cpp @@ -51,6 +51,7 @@ #include "llglheaders.h" const F32 SCROLL_STEP_TIME = 0.4f; +const F32 SCROLL_DELAY_TIME = 0.5f; const S32 TAB_PADDING = 15; const S32 TABCNTR_TAB_MIN_WIDTH = 60; const S32 TABCNTR_TAB_MAX_WIDTH = 150; @@ -81,6 +82,7 @@ LLTabContainerCommon::LLTabContainerCommon( mLockedTabCount(0) { setMouseOpaque(FALSE); + mDragAndDropDelayTimer.stop(); } @@ -101,9 +103,11 @@ LLTabContainerCommon::LLTabContainerCommon( mCallbackUserdata( callback_userdata ), mTitleBox(NULL), mTopBorderHeight(LLPANEL_BORDER_WIDTH), - mTabPosition(pos) + mTabPosition(pos), + mLockedTabCount(0) { setMouseOpaque(FALSE); + mDragAndDropDelayTimer.stop(); } @@ -731,8 +735,8 @@ LLTabContainer::LLTabContainer( : LLTabContainerCommon(name, rect, pos, close_callback, callback_userdata, bordered), mLeftArrowBtn(NULL), - mRightArrowBtn(NULL), mJumpLeftArrowBtn(NULL), + mRightArrowBtn(NULL), mJumpRightArrowBtn(NULL), mRightTabBtnOffset(0), mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), @@ -749,8 +753,8 @@ LLTabContainer::LLTabContainer( : LLTabContainerCommon(name, rect_control, pos, close_callback, callback_userdata, bordered), mLeftArrowBtn(NULL), - mRightArrowBtn(NULL), mJumpLeftArrowBtn(NULL), + mRightArrowBtn(NULL), mJumpRightArrowBtn(NULL), mRightTabBtnOffset(0), mMinTabWidth(TABCNTR_TAB_MIN_WIDTH), @@ -1576,43 +1580,48 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag { BOOL has_scroll_arrows = (mMaxScrollPos > 0); - if (has_scroll_arrows) + if( mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME ) { - if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) - { - S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; - S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; - mJumpLeftArrowBtn->handleHover(local_x, local_y, mask); - } - if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) - { - S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; - S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; - mJumpRightArrowBtn->handleHover(local_x, local_y, mask); - } - if (mLeftArrowBtn->getRect().pointInRect(x, y)) - { - S32 local_x = x - mLeftArrowBtn->getRect().mLeft; - S32 local_y = y - mLeftArrowBtn->getRect().mBottom; - mLeftArrowBtn->handleHover(local_x, local_y, mask); - } - else if (mRightArrowBtn->getRect().pointInRect(x, y)) + + if (has_scroll_arrows) { - S32 local_x = x - mRightArrowBtn->getRect().mLeft; - S32 local_y = y - mRightArrowBtn->getRect().mBottom; - mRightArrowBtn->handleHover(local_x, local_y, mask); + if (mJumpLeftArrowBtn->getRect().pointInRect(x, y)) + { + S32 local_x = x - mJumpLeftArrowBtn->getRect().mLeft; + S32 local_y = y - mJumpLeftArrowBtn->getRect().mBottom; + mJumpLeftArrowBtn->handleHover(local_x, local_y, mask); + } + if (mJumpRightArrowBtn->getRect().pointInRect(x, y)) + { + S32 local_x = x - mJumpRightArrowBtn->getRect().mLeft; + S32 local_y = y - mJumpRightArrowBtn->getRect().mBottom; + mJumpRightArrowBtn->handleHover(local_x, local_y, mask); + } + if (mLeftArrowBtn->getRect().pointInRect(x, y)) + { + S32 local_x = x - mLeftArrowBtn->getRect().mLeft; + S32 local_y = y - mLeftArrowBtn->getRect().mBottom; + mLeftArrowBtn->handleHover(local_x, local_y, mask); + } + else if (mRightArrowBtn->getRect().pointInRect(x, y)) + { + S32 local_x = x - mRightArrowBtn->getRect().mLeft; + S32 local_y = y - mRightArrowBtn->getRect().mBottom; + mRightArrowBtn->handleHover(local_x, local_y, mask); + } } - } - for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) - { - LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( TRUE ); - S32 local_x = x - tuple->mButton->getRect().mLeft; - S32 local_y = y - tuple->mButton->getRect().mBottom; - if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible()) + for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { - tuple->mButton->onCommit(); + LLTabTuple* tuple = *iter; + tuple->mButton->setVisible( TRUE ); + S32 local_x = x - tuple->mButton->getRect().mLeft; + S32 local_y = y - tuple->mButton->getRect().mBottom; + if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible()) + { + tuple->mButton->onCommit(); + mDragAndDropDelayTimer.stop(); + } } } @@ -1641,4 +1650,4 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name) // tabs have changed size, might need to scroll to see current tab updateMaxScrollPos(); } -} \ No newline at end of file +} diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h index 7d501d2..f3365c3 100644 --- a/linden/indra/llui/lltabcontainer.h +++ b/linden/indra/llui/lltabcontainer.h @@ -117,7 +117,9 @@ public: virtual void setTabImage(LLPanel* child, std::string img_name); void setTitle( const LLString& title ); const LLString getPanelTitle(S32 index); - + + void setDragAndDropDelayTimer() { mDragAndDropDelayTimer.start(); } + virtual void setTopBorderHeight(S32 height); virtual void setTabChangeCallback(LLPanel* tab, void (*on_tab_clicked)(void*,bool)); @@ -175,6 +177,8 @@ protected: S32 mScrollPosPixels; S32 mMaxScrollPos; + LLFrameTimer mDragAndDropDelayTimer; + void (*mCloseCallback)(void*); void* mCallbackUserdata; diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 80205d3..513670b 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -46,6 +46,7 @@ #include "llclipboard.h" #include "llscrollbar.h" #include "llstl.h" +#include "llstring.h" #include "llkeyboard.h" #include "llkeywords.h" #include "llundo.h" @@ -514,8 +515,10 @@ void LLTextEditor::truncate() void LLTextEditor::setText(const LLString &utf8str) { - mUTF8Text = utf8str; - mWText = utf8str_to_wstring(utf8str); + // LLString::removeCRLF(utf8str); + mUTF8Text = utf8str_removeCRLF(utf8str); + // mUTF8Text = utf8str; + mWText = utf8str_to_wstring(mUTF8Text); mTextIsUpToDate = TRUE; truncate(); @@ -2491,6 +2494,8 @@ void LLTextEditor::redo() // virtual, from LLView void LLTextEditor::onFocusLost() { + getWindow()->allowLanguageTextInput(FALSE); + // Route menu back to the default if( gEditMenuHandler == this ) { @@ -3057,6 +3062,12 @@ void LLTextEditor::setFocus( BOOL new_state ) // Don't change anything if the focus state didn't change if (new_state == old_state) return; + // Notify early if we are loosing focus. + if (!new_state) + { + getWindow()->allowLanguageTextInput(FALSE); + } + LLUICtrl::setFocus( new_state ); if( new_state ) @@ -3077,6 +3088,12 @@ void LLTextEditor::setFocus( BOOL new_state ) endSelection(); } + + // Notify late if we are gaining focus. + if (new_state && !mReadOnly) + { + getWindow()->allowLanguageTextInput(TRUE); + } } BOOL LLTextEditor::acceptsTextInput() const diff --git a/linden/indra/llui/llviewquery.cpp b/linden/indra/llui/llviewquery.cpp index 3f9ccf4..65f191b 100644 --- a/linden/indra/llui/llviewquery.cpp +++ b/linden/indra/llui/llviewquery.cpp @@ -26,6 +26,8 @@ * COMPLETENESS OR PERFORMANCE. */ +#include "linden_common.h" + #include "llview.h" #include "lluictrl.h" #include "llviewquery.h" diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp index b83d12c..dd5854c 100644 --- a/linden/indra/llvfs/llvfs.cpp +++ b/linden/indra/llvfs/llvfs.cpp @@ -504,7 +504,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r } // Figure out where the last block ended. - U32 loc = last_file_block->mLocation+last_file_block->mLength; + S32 loc = last_file_block->mLocation+last_file_block->mLength; // Figure out how much space there is between where // the last block ended and this block begins. @@ -512,7 +512,7 @@ LLVFS::LLVFS(const char *index_filename, const char *data_filename, const BOOL r // Check for more errors... Seeing if the current // entry and the last entry make sense together. - if (length < 0 || loc < 0 || loc > data_size) + if (length < 0 || loc < 0 || (U32)loc > data_size) { // Invalid VFS unlockAndClose( mIndexFP ); @@ -1790,53 +1790,46 @@ void LLVFS::audit() delete[] buffer; - if (vfs_corrupt) + if (!vfs_corrupt) { - for (std::vector::iterator iter = audit_blocks.begin(); - iter != audit_blocks.end(); ++iter) + for (fileblock_map::iterator it = mFileBlocks.begin(); it != mFileBlocks.end(); ++it) { - delete *iter; - } - audit_blocks.clear(); - return; - } - - for (fileblock_map::iterator it = mFileBlocks.begin(); it != mFileBlocks.end(); ++it) - { - LLVFSFileBlock* block = (*it).second; + LLVFSFileBlock* block = (*it).second; - if (block->mSize > 0) - { - if (! found_files.count(*block)) + if (block->mSize > 0) { - llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " in memory, not on disk, loc " << block->mIndexLocation<< llendl; - fseek(mIndexFP, block->mIndexLocation, SEEK_SET); - U8 buf[LLVFSFileBlock::SERIAL_SIZE]; - fread(buf, LLVFSFileBlock::SERIAL_SIZE, 1, mIndexFP); + if (! found_files.count(*block)) + { + llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " in memory, not on disk, loc " << block->mIndexLocation<< llendl; + fseek(mIndexFP, block->mIndexLocation, SEEK_SET); + U8 buf[LLVFSFileBlock::SERIAL_SIZE]; + fread(buf, LLVFSFileBlock::SERIAL_SIZE, 1, mIndexFP); - LLVFSFileBlock disk_block; - disk_block.deserialize(buf, block->mIndexLocation); + LLVFSFileBlock disk_block; + disk_block.deserialize(buf, block->mIndexLocation); - llwarns << "Instead found " << disk_block.mFileID << ":" << block->mFileType << llendl; - } - else - { - block = found_files.find(*block)->second; - found_files.erase(*block); - delete block; + llwarns << "Instead found " << disk_block.mFileID << ":" << block->mFileType << llendl; + } + else + { + block = found_files.find(*block)->second; + found_files.erase(*block); + } } } - } - for (std::map::iterator iter = found_files.begin(); - iter != found_files.end(); iter++) - { - LLVFSFileBlock* block = iter->second; - llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " szie:" << block->mSize << " leftover" << llendl; - } + for (std::map::iterator iter = found_files.begin(); + iter != found_files.end(); iter++) + { + LLVFSFileBlock* block = iter->second; + llwarns << "VFile " << block->mFileID << ":" << block->mFileType << " szie:" << block->mSize << " leftover" << llendl; + } - llinfos << "VFS: audit OK" << llendl; - // mutex released by LLMutexLock() destructor. + llinfos << "VFS: audit OK" << llendl; + // mutex released by LLMutexLock() destructor. + } + + for_each(audit_blocks.begin(), audit_blocks.end(), DeletePointer()); } diff --git a/linden/indra/llwindow/llwindow.cpp b/linden/indra/llwindow/llwindow.cpp index cad1dc4..faa5e61 100644 --- a/linden/indra/llwindow/llwindow.cpp +++ b/linden/indra/llwindow/llwindow.cpp @@ -241,7 +241,8 @@ LLWindow::LLWindow(BOOL fullscreen, U32 flags) mIsMouseClipping(FALSE), mSwapMethod(SWAP_METHOD_UNDEFINED), mHideCursorPermanent(FALSE), - mFlags(flags) + mFlags(flags), + mHighSurrogate(0) { for (U32 i = 0; i < 6; i++) { @@ -296,6 +297,53 @@ void LLWindow::setCallbacks(LLWindowCallbacks *callbacks) } } +#define UTF16_IS_HIGH_SURROGATE(U) ((U16)((U) - 0xD800) < 0x0400) +#define UTF16_IS_LOW_SURROGATE(U) ((U16)((U) - 0xDC00) < 0x0400) +#define UTF16_SURROGATE_PAIR_TO_UTF32(H,L) (((H) << 10) + (L) - (0xD800 << 10) - 0xDC00 + 0x00010000) + +void LLWindow::handleUnicodeUTF16(U16 utf16, MASK mask) +{ + // Note that we could discard unpaired surrogates, but I'm + // following the Unicode Consortium's recommendation here; + // that is, to preserve those unpaired surrogates in UTF-32 + // values. _To_preserve_ means to pass to the callback in our + // context. + + if (mHighSurrogate == 0) + { + if (UTF16_IS_HIGH_SURROGATE(utf16)) + { + mHighSurrogate = utf16; + } + else + { + mCallbacks->handleUnicodeChar(utf16, mask); + } + } + else + { + if (UTF16_IS_LOW_SURROGATE(utf16)) + { + /* A legal surrogate pair. */ + mCallbacks->handleUnicodeChar(UTF16_SURROGATE_PAIR_TO_UTF32(mHighSurrogate, utf16), mask); + mHighSurrogate = 0; + } + else if (UTF16_IS_HIGH_SURROGATE(utf16)) + { + /* Two consecutive high surrogates. */ + mCallbacks->handleUnicodeChar(mHighSurrogate, mask); + mHighSurrogate = utf16; + } + else + { + /* A non-low-surrogate preceeded by a high surrogate. */ + mCallbacks->handleUnicodeChar(mHighSurrogate, mask); + mHighSurrogate = 0; + mCallbacks->handleUnicodeChar(utf16, mask); + } + } +} + // // LLSplashScreen // diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h index 2bb49e9..1016bce 100644 --- a/linden/indra/llwindow/llwindow.h +++ b/linden/indra/llwindow/llwindow.h @@ -218,6 +218,10 @@ public: // return a platform-specific window reference (HWND on Windows, WindowRef on the Mac) virtual void *getPlatformWindow() = 0; + // control platform's Language Text Input mechanisms. + virtual void allowLanguageTextInput( BOOL b ) {}; + virtual void setLanguageTextInput( LLCoordWindow pos ) {}; + protected: LLWindow(BOOL fullscreen, U32 flags); virtual ~LLWindow() {} @@ -246,6 +250,15 @@ protected: U32 mFlags; F32 mJoyAxis[6]; U8 mJoyButtonState[16]; + U16 mHighSurrogate; + + // Handle a UTF-16 encoding unit received from keyboard. + // Converting the series of UTF-16 encoding units to UTF-32 data, + // this method passes the resulting UTF-32 data to mCallback's + // handleUnicodeChar. The mask should be that to be passed to the + // callback. This method uses mHighSurrogate as a dedicated work + // variable. + void handleUnicodeUTF16(U16 utf16, MASK mask); friend class LLWindowManager; }; diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp index 0c5d6ed..021d7a4 100644 --- a/linden/indra/llwindow/llwindowmacosx.cpp +++ b/linden/indra/llwindow/llwindowmacosx.cpp @@ -239,6 +239,10 @@ LLWindowMacOSX::LLWindowMacOSX(char *title, char *name, S32 x, S32 y, S32 width, mNeedsResize = FALSE; mOverrideAspectRatio = 0.f; mMinimized = FALSE; + mTSMDocument = NULL; // Just in case. + mLanguageTextInputAllowed = FALSE; + mTSMScriptCode = 0; + mTSMLangCode = 0; // For reasons that aren't clear to me, LLTimers seem to be created in the "started" state. // Since the started state of this one is used to track whether the NMRec has been installed, it wants to start out in the "stopped" state. @@ -479,6 +483,29 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits } + { + // Create and initialize our TSM document for language text input. + // If an error occured, we can do nothing better than simply ignore it. + // mTSMDocument will be kept NULL in case. + if (mTSMDocument) + { + DeactivateTSMDocument(mTSMDocument); + DeleteTSMDocument(mTSMDocument); + mTSMDocument = NULL; + } + static InterfaceTypeList types = { kUnicodeDocument }; + OSErr err = NewTSMDocument(1, types, &mTSMDocument, 0); + if (err != noErr) + { + llwarns << "createContext: couldn't create a TSMDocument (" << err << ")" << llendl; + } + if (mTSMDocument) + { + UseInputWindow(mTSMDocument, TRUE); + ActivateTSMDocument(mTSMDocument); + } + } + if(mContext == NULL) { AGLRendererInfo rendererInfo = NULL; @@ -924,6 +951,15 @@ void LLWindowMacOSX::destroyContext() mWindowHandlerRef = NULL; } + // Cleanup any TSM document we created. + if(mTSMDocument != NULL) + { + llinfos << "destroyContext: deleting TSM document" << llendl; + DeactivateTSMDocument(mTSMDocument); + DeleteTSMDocument(mTSMDocument); + mTSMDocument = NULL; + } + // Close the window if(mWindow != NULL) { @@ -1529,7 +1565,7 @@ void LLWindowMacOSX::flashIcon(F32 seconds) OSErr err; mBounceTime = seconds; - memset(&mBounceRec, sizeof(mBounceRec), 0); + memset(&mBounceRec, 0, sizeof(mBounceRec)); mBounceRec.qType = nmType; mBounceRec.nmMark = 1; err = NMInstall(&mBounceRec); @@ -2241,6 +2277,10 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e switch(evtKind) { case kEventWindowActivated: + if (mTSMDocument) + { + ActivateTSMDocument(mTSMDocument); + } mCallbacks->handleFocus(this); break; case kEventWindowDeactivated: @@ -2952,4 +2992,37 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key) return int_value; // otherwise return the long value } +void LLWindowMacOSX::allowLanguageTextInput(BOOL b) +{ + ScriptLanguageRecord script_language; + + if (b == mLanguageTextInputAllowed) + { + return; + } + mLanguageTextInputAllowed = b; + + if (b) + { + if (mTSMScriptCode != smRoman) + { + script_language.fScript = mTSMScriptCode; + script_language.fLanguage = mTSMLangCode; + SetTextServiceLanguage(&script_language); + } + } + else + { + GetTextServiceLanguage(&script_language); + mTSMScriptCode = script_language.fScript; + mTSMLangCode = script_language.fLanguage; + if (mTSMScriptCode != smRoman) + { + script_language.fScript = smRoman; + script_language.fLanguage = langEnglish; + SetTextServiceLanguage(&script_language); + } + } +} + #endif // LL_DARWIN diff --git a/linden/indra/llwindow/llwindowmacosx.h b/linden/indra/llwindow/llwindowmacosx.h index 63d846e..01b9303 100644 --- a/linden/indra/llwindow/llwindowmacosx.h +++ b/linden/indra/llwindow/llwindowmacosx.h @@ -108,6 +108,8 @@ public: /*virtual*/ void *getPlatformWindow(); /*virtual*/ void bringToFront() {}; + /*virtual*/ void allowLanguageTextInput(BOOL b); + protected: LLWindowMacOSX( char *title, char *name, int x, int y, int width, int height, U32 flags, @@ -183,6 +185,12 @@ protected: NMRec mBounceRec; LLTimer mBounceTimer; + // Imput method management through Text Service Manager. + TSMDocumentID mTSMDocument; + BOOL mLanguageTextInputAllowed; + ScriptCode mTSMScriptCode; + LangCode mTSMLangCode; + friend class LLWindowManager; }; diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index a1cdeb3..94111e7 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp @@ -42,7 +42,9 @@ #include "indra_constants.h" #if LL_GTK +extern "C" { # include "gtk/gtk.h" +} #endif // LL_GTK #if LL_LINUX @@ -1984,7 +1986,10 @@ void LLWindowSDL::gatherInput() SDLReallyCaptureInput(TRUE); if (event.key.keysym.unicode) - mCallbacks->handleUnicodeChar(event.key.keysym.unicode, gKeyboard->currentMask(FALSE)); + { + handleUnicodeUTF16(event.key.keysym.unicode, + gKeyboard->currentMask(FALSE)); + } break; case SDL_KEYUP: diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp index 2cd1353..0b3cdd4 100644 --- a/linden/indra/llwindow/llwindowwin32.cpp +++ b/linden/indra/llwindow/llwindowwin32.cpp @@ -37,6 +37,7 @@ #include #include // for _spawn #include +#include // Require DirectInput version 8 #define DIRECTINPUT_VERSION 0x0800 @@ -84,6 +85,98 @@ void show_window_creation_error(const char* title) //static BOOL LLWindowWin32::sIsClassRegistered = FALSE; +BOOL LLWindowWin32::sLanguageTextInputAllowed = TRUE; /* XXX */ +BOOL LLWindowWin32::sWinIMEOpened = FALSE; +HKL LLWindowWin32::sWinInputLocale; +DWORD LLWindowWin32::sWinIMEConversionMode; +DWORD LLWindowWin32::sWinIMESentenceMode; + +// The following class LLWinImm delegates Windows IMM APIs. +// We need this because some language versions of Windows, +// e.g., US version of Windows XP, doesn't install IMM32.DLL +// as a default, and we can't link against imm32.lib statically. +// I believe DLL loading of this type is best suited to do +// in a static initialization of a class. What I'm not sure is +// whether it follows the Linden Conding Standard... +// See http://wiki.secondlife.com/wiki/Coding_standards#Static_Members + +class LLWinImm +{ +public: + static bool isAvailable() { return sTheInstance.mHImmDll != NULL; } + +public: + // Wrappers for IMM API. + static BOOL isIME(HKL hkl) { return sTheInstance.mImmIsIME(hkl); } + static HIMC getContext(HWND hwnd) { return sTheInstance.mImmGetContext(hwnd); } + static BOOL releaseContext(HWND hwnd, HIMC himc) { return sTheInstance.mImmReleaseContext(hwnd, himc); } + static BOOL getOpenStatus(HIMC himc) { return sTheInstance.mImmGetOpenStatus(himc); } + static BOOL setOpenStatus(HIMC himc, BOOL status) { return sTheInstance.mImmSetOpenStatus(himc, status); } + static BOOL getConversionStatus(HIMC himc, LPDWORD conversion, LPDWORD sentence) { return sTheInstance.mImmGetConversionStatus(himc, conversion, sentence); } + static BOOL setConversionStatus(HIMC himc, DWORD conversion, DWORD sentence) { return sTheInstance.mImmSetConversionStatus(himc, conversion, sentence); } + +private: + LLWinImm(); + ~LLWinImm(); + +private: + // Pointers to IMM API. + BOOL (WINAPI *mImmIsIME)(HKL); + HIMC (WINAPI *mImmGetContext)(HWND); + BOOL (WINAPI *mImmReleaseContext)(HWND, HIMC); + BOOL (WINAPI *mImmGetOpenStatus)(HIMC); + BOOL (WINAPI *mImmSetOpenStatus)(HIMC, BOOL); + BOOL (WINAPI *mImmGetConversionStatus)(HIMC, LPDWORD, LPDWORD); + BOOL (WINAPI *mImmSetConversionStatus)(HIMC, DWORD, DWORD); + +private: + HMODULE mHImmDll; + static LLWinImm sTheInstance; +}; + +LLWinImm LLWinImm::sTheInstance; + +LLWinImm::LLWinImm() +{ + mHImmDll = LoadLibraryA("Imm32"); + if (mHImmDll != NULL) + { + mImmIsIME = (BOOL (WINAPI *)(HKL)) GetProcAddress(mHImmDll, "ImmIsIME"); + mImmGetContext = (HIMC (WINAPI *)(HWND)) GetProcAddress(mHImmDll, "ImmGetContext"); + mImmReleaseContext = (BOOL (WINAPI *)(HWND, HIMC)) GetProcAddress(mHImmDll, "ImmReleaseContext"); + mImmGetOpenStatus = (BOOL (WINAPI *)(HIMC)) GetProcAddress(mHImmDll, "ImmGetOpenStatus"); + mImmSetOpenStatus = (BOOL (WINAPI *)(HIMC, BOOL)) GetProcAddress(mHImmDll, "ImmSetOpenStatus"); + mImmGetConversionStatus = (BOOL (WINAPI *)(HIMC, LPDWORD, LPDWORD)) GetProcAddress(mHImmDll, "ImmGetConversionStatus"); + mImmSetConversionStatus = (BOOL (WINAPI *)(HIMC, DWORD, DWORD)) GetProcAddress(mHImmDll, "ImmSetConversionStatus"); + if (mImmIsIME == NULL || + mImmGetContext == NULL || + mImmReleaseContext == NULL || + mImmGetOpenStatus == NULL || + mImmSetOpenStatus == NULL || + mImmGetConversionStatus == NULL || + mImmSetConversionStatus == NULL) + { + // If any of the above API entires are not found, we can't use IMM API. + // So, turn off the IMM support. We should log some warning message in + // the case, since it is very unusual; these APIs are available from + // the beginning, and all versions of IMM32.DLL should have them all. + // Unfortunately, this code may be executed before initialization of + // the logging channel (llwarns), and we can't do it here... Yes, this + // is one of disadvantages to use static constraction to DLL loading. + FreeLibrary(mHImmDll); + mHImmDll = NULL; + } + } +} + +LLWinImm::~LLWinImm() +{ + if (mHImmDll != NULL) + { + FreeLibrary(mHImmDll); + mHImmDll = NULL; + } +} LPDIRECTINPUT8 g_pDI = NULL; @@ -111,6 +204,10 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width, // Initialize the keyboard gKeyboard = new LLKeyboardWin32(); + // Initialize (boot strap) the Language text input management, + // based on the system's (user's) default settings. + allowLanguageTextInput(FALSE); + GLuint pixel_format; WNDCLASS wc; DWORD dw_ex_style; @@ -347,7 +444,6 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width, if (!mWindowHandle) { - DestroyWindow(mWindowHandle); OSMessageBox("Window creation error", "Error", OSMB_OK); return; } @@ -1926,6 +2022,15 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_CHAR: // Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need // to figure out how that works. - Doug + // + // ... Well, I don't think so. + // How it works is explained in Win32 API document, but WM_UNICHAR didn't work + // as specified at least on Windows XP SP1 Japanese version. I have never used + // it since then, and I'm not sure whether it has been fixed now, but I don't think + // it is worth trying. The good old WM_CHAR works just fine even for supplementary + // characters. We just need to take care of surrogate pairs sent as two WM_CHAR's + // by ourselves. It is not that tough. -- Alissa Sabre @ SL + // // llinfos << "WM_CHAR: " << w_param << llendl; if (gDebugWindowProc) { @@ -1933,11 +2038,10 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ << " key " << S32(w_param) << llendl; } - if (window_imp->mCallbacks->handleUnicodeChar(w_param, gKeyboard->currentMask(FALSE))) - { - return 0; - } - break; + // Even if LLWindowCallbacks::handleUnicodeChar(llwchar, BOOL) returned FALSE, + // we *did* processed the event, so I believe we should not pass it to DefWindowProc... + window_imp->handleUnicodeUTF16((U16)w_param, gKeyboard->currentMask(FALSE)); + return 0; case WM_LBUTTONDOWN: { @@ -2971,7 +3075,7 @@ void spawn_web_browser(const char* escaped_url ) char reg_path_str[256]; /* Flawfinder: ignore */ snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); /* Flawfinder: ignore */ WCHAR reg_path_wstr[256]; - mbstowcs(reg_path_wstr, reg_path_str, 1024); + mbstowcs(reg_path_wstr, reg_path_str, sizeof(reg_path_wstr)/sizeof(reg_path_wstr[0])); HKEY key; WCHAR browser_open_wstr[1024]; @@ -3102,6 +3206,58 @@ void LLWindowWin32::bringToFront() void LLWindowWin32::focusClient() { SetFocus ( mWindowHandle ); -}; +} + +void LLWindowWin32::allowLanguageTextInput(BOOL b) +{ + if (b == sLanguageTextInputAllowed || !LLWinImm::isAvailable()) + { + /* Not actually allowing/disallowing. Do nothing. */ + return; + } + sLanguageTextInputAllowed = b; + + if (b) + { + /* Allowing: Restore the previous IME status, + so that the user has a feeling that the previous + text input continues naturally. Be careful, however, + the IME status is meaningful only during the user keeps + using same Input Locale (aka Keyboard Layout). */ + if (sWinIMEOpened && GetKeyboardLayout(0) == sWinInputLocale) + { + HIMC himc = LLWinImm::getContext(mWindowHandle); + LLWinImm::setOpenStatus(himc, TRUE); + LLWinImm::setConversionStatus(himc, sWinIMEConversionMode, sWinIMESentenceMode); + LLWinImm::releaseContext(mWindowHandle, himc); + } + } + else + { + /* Disallowing: Turn off the IME so that succeeding + key events bypass IME and come to us directly. + However, do it after saving the current IME + status. We need to restore the status when + allowing language text input again. */ + sWinInputLocale = GetKeyboardLayout(0); + sWinIMEOpened = LLWinImm::isIME(sWinInputLocale); + if (sWinIMEOpened) + { + HIMC himc = LLWinImm::getContext(mWindowHandle); + sWinIMEOpened = LLWinImm::getOpenStatus(himc); + if (sWinIMEOpened) + { + LLWinImm::getConversionStatus(himc, &sWinIMEConversionMode, &sWinIMESentenceMode); + + /* We need both ImmSetConversionStatus and ImmSetOpenStatus here + to surely disable IME's keyboard hooking, because Some IME reacts + only on the former and some other on the latter... */ + LLWinImm::setConversionStatus(himc, IME_CMODE_NOCONVERSION, sWinIMESentenceMode); + LLWinImm::setOpenStatus(himc, FALSE); + } + LLWinImm::releaseContext(mWindowHandle, himc); + } + } +} #endif // LL_WINDOWS diff --git a/linden/indra/llwindow/llwindowwin32.h b/linden/indra/llwindow/llwindowwin32.h index 691c648..0f0cf7c 100644 --- a/linden/indra/llwindow/llwindowwin32.h +++ b/linden/indra/llwindow/llwindowwin32.h @@ -106,6 +106,8 @@ public: /*virtual*/ void bringToFront(); /*virtual*/ void focusClient(); + /*virtual*/ void allowLanguageTextInput(BOOL b); + protected: LLWindowWin32( char *title, char *name, int x, int y, int width, int height, U32 flags, @@ -174,6 +176,15 @@ protected: BOOL mMousePositionModified; BOOL mInputProcessingPaused; + // The following five variables are for Language Text Input control. + // They are all static, since one context is shared by all LLWindowWin32 + // instances. + static BOOL sLanguageTextInputAllowed; + static BOOL sWinIMEOpened; + static HKL sWinInputLocale; + static DWORD sWinIMEConversionMode; + static DWORD sWinIMESentenceMode; + friend class LLWindowManager; }; diff --git a/linden/indra/llxml/llxmlnode.cpp b/linden/indra/llxml/llxmlnode.cpp index 26906a4..bdbb606 100644 --- a/linden/indra/llxml/llxmlnode.cpp +++ b/linden/indra/llxml/llxmlnode.cpp @@ -41,6 +41,7 @@ #include "v3dmath.h" #include "v4math.h" #include "llquaternion.h" +#include "llstring.h" #include "lluuid.h" const S32 MAX_COLUMN_WIDTH = 80; @@ -3088,6 +3089,8 @@ LLString LLXMLNode::getTextContents() const msg = mValue.substr(start); } } + // Convert any internal CR to LF + msg = utf8str_removeCRLF(msg); } } return msg; diff --git a/linden/indra/llxml/llxmlparser.cpp b/linden/indra/llxml/llxmlparser.cpp index 4162e7d..5f931d9 100644 --- a/linden/indra/llxml/llxmlparser.cpp +++ b/linden/indra/llxml/llxmlparser.cpp @@ -2,7 +2,7 @@ * @file llxmlparser.cpp * @brief LLXmlParser implementation * - * Copyright (c) 2002-2007`, Linden Research, Inc. + * 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 diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l index 6b4e67d..c219cec 100644 --- a/linden/indra/lscript/lscript_compile/indra.l +++ b/linden/indra/lscript/lscript_compile/indra.l @@ -1,8 +1,7 @@ -D [-]?[0-9] N [0-9] L [a-zA-Z_] H [a-fA-F0-9] -E [Ee][+-]?{D}+ +E [Ee][+-]?{N}+ FS (f|F) %e 10000 %n 4000 @@ -41,7 +40,7 @@ void parse_string(); #define YYLMAX 16384 #define YY_NEVER_INTERACTIVE 1 /* stops flex from calling isatty() */ - + #if defined(__cplusplus) extern "C" { int yylex( void ); } extern "C" { int yyparse( void ); } @@ -111,7 +110,7 @@ extern "C" { int yyerror(const char *fmt, ...); } 0[xX]{H}+ { count(); yylval.ival = strtoul(yytext, NULL, 0); return(INTEGER_CONSTANT); } -{D}+ { count(); yylval.ival = strtoul(yytext, NULL, 10); return(INTEGER_CONSTANT); } +{N}+ { count(); yylval.ival = strtoul(yytext, NULL, 10); return(INTEGER_CONSTANT); } "TRUE" { count(); yylval.ival = 1; return(INTEGER_TRUE); } "FALSE" { count(); yylval.ival = 0; return(INTEGER_FALSE); } "STATUS_PHYSICS" { count(); yylval.ival = 0x1; return(INTEGER_CONSTANT); } @@ -571,9 +570,9 @@ extern "C" { int yyerror(const char *fmt, ...); } {L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); } -{D}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } -{D}*"."{D}+({E})?{FS}? { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } -{D}+"."{D}*({E})?{FS}? { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } +{N}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } +{N}*"."{N}+({E})?{FS}? { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } +{N}+"."{N}*({E})?{FS}? { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } L?\"(\\.|[^\\"])*\" { parse_string(); count(); return(STRING_CONSTANT); } @@ -751,6 +750,10 @@ BOOL lscript_compile(char *filename, BOOL is_god_like = FALSE) S32 yywrap() { +#ifdef FLEX_SCANNER + // get gcc to stop complaining about lack of use of yyunput + (void) yyunput; +#endif return(1); } diff --git a/linden/indra/lscript/lscript_compile/indra.y b/linden/indra/lscript/lscript_compile/indra.y index 7744649..c7a4fd6 100644 --- a/linden/indra/lscript/lscript_compile/indra.y +++ b/linden/indra/lscript/lscript_compile/indra.y @@ -143,6 +143,8 @@ %type simple_assignable %type simple_assignable_no_list %type constant +%type integer_constant +%type fp_constant %type special_constant %type vector_constant %type quaternion_constant @@ -352,30 +354,50 @@ simple_assignable_no_list ; constant - : INTEGER_CONSTANT + : integer_constant { $$ = new LLScriptConstantInteger(gLine, gColumn, $1); gAllocationManager->addAllocation($$); } - | INTEGER_TRUE + | fp_constant { - $$ = new LLScriptConstantInteger(gLine, gColumn, $1); + $$ = new LLScriptConstantFloat(gLine, gColumn, $1); gAllocationManager->addAllocation($$); } - | INTEGER_FALSE + | STRING_CONSTANT { - $$ = new LLScriptConstantInteger(gLine, gColumn, $1); + $$ = new LLScriptConstantString(gLine, gColumn, $1); gAllocationManager->addAllocation($$); } - | FP_CONSTANT + ; + +fp_constant + : FP_CONSTANT { - $$ = new LLScriptConstantFloat(gLine, gColumn, $1); - gAllocationManager->addAllocation($$); + $$ = $1; } - | STRING_CONSTANT + | '-' FP_CONSTANT { - $$ = new LLScriptConstantString(gLine, gColumn, $1); - gAllocationManager->addAllocation($$); + $$ = -$2; + } + ; + +integer_constant + : INTEGER_CONSTANT + { + $$ = $1; + } + | INTEGER_TRUE + { + $$ = $1; + } + | INTEGER_FALSE + { + $$ = $1; + } + | '-' INTEGER_CONSTANT + { + $$ = -$2; } ; diff --git a/linden/indra/lscript/lscript_execute/lscript_execute.cpp b/linden/indra/lscript/lscript_execute/lscript_execute.cpp index 4d8389a..2f81416 100644 --- a/linden/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_execute.cpp @@ -1387,7 +1387,7 @@ void integer_integer_operation(U8 *buffer, LSCRIPTOpCodesEnum opcode) break; case LOPC_DIV: if (rside){ - if( ( rside == -1 ) || ( rside == 0xffffffff ) )// division by -1 can have funny results: multiplication is OK: SL-31252 + if( ( rside == -1 ) || ( rside == (S32) 0xffffffff ) )// division by -1 can have funny results: multiplication is OK: SL-31252 { result = -1 * lside; } diff --git a/linden/indra/mac_updater/GenLinkedList.c b/linden/indra/mac_updater/GenLinkedList.c index f1cde85..50a3761 100644 --- a/linden/indra/mac_updater/GenLinkedList.c +++ b/linden/indra/mac_updater/GenLinkedList.c @@ -209,4 +209,4 @@ void Next( GenIteratorPtr *pIter ) GenDataPtr GetData( GenIteratorPtr pIter ) { return ( pIter != NULL ) ? ((GenNode*)pIter)->pData : NULL; -} \ No newline at end of file +} diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index 9df6a82..318a129 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.17.0.12"; -CFBundleGetInfoString = "Second Life version 1.17.0.12, Copyright 2004-2007 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.17.1.0"; +CFBundleGetInfoString = "Second Life version 1.17.1.0, Copyright 2004-2007 Linden Research, Inc."; diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist index a02f664..080f898 100644 --- a/linden/indra/newview/Info-SecondLife.plist +++ b/linden/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.17.0.12 + 1.17.1.0 CSResourcesFileMapped diff --git a/linden/indra/newview/app_settings/colors_base.xml b/linden/indra/newview/app_settings/colors_base.xml index 2ef8908..5a9261b 100644 --- a/linden/indra/newview/app_settings/colors_base.xml +++ b/linden/indra/newview/app_settings/colors_base.xml @@ -10,6 +10,8 @@ + + @@ -95,6 +97,10 @@ + + + + diff --git a/linden/indra/newview/files.lst b/linden/indra/newview/files.lst index 2967bed..d6794d7 100644 --- a/linden/indra/newview/files.lst +++ b/linden/indra/newview/files.lst @@ -225,6 +225,7 @@ newview/llsky.cpp newview/llspatialpartition.cpp newview/llsphere.cpp newview/llsprite.cpp +newview/llsrv.cpp newview/llstartup.cpp newview/llstatbar.cpp newview/llstatgraph.cpp diff --git a/linden/indra/newview/fmodwrapper.cpp b/linden/indra/newview/fmodwrapper.cpp index 6d74325..b6f1dc7 100644 --- a/linden/indra/newview/fmodwrapper.cpp +++ b/linden/indra/newview/fmodwrapper.cpp @@ -36,4 +36,4 @@ void* fmodwrapper(void) // When building the fmodwrapper library, the linker doesn't seem to want to bring in libfmod.a unless I explicitly // reference at least one symbol in the library. This seemed like the simplest way. return (void*)&FSOUND_Init; -} \ No newline at end of file +} diff --git a/linden/indra/newview/installers/windows/installer_template.nsi b/linden/indra/newview/installers/windows/installer_template.nsi index 1b5226c..7a225fa 100644 --- a/linden/indra/newview/installers/windows/installer_template.nsi +++ b/linden/indra/newview/installers/windows/installer_template.nsi @@ -37,9 +37,9 @@ XPStyle on ; add an XP manifest to the installer ;; (these files are in the same place as the nsi template but the python script generates a new nsi file in the ;; application directory so we have to add a path to these include files) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#!include "installers\windows\lang_de.nsi" +!include "installers\windows\lang_de.nsi" !include "installers\windows\lang_en-us.nsi" -#!include "installers\windows\lang_ja.nsi" +!include "installers\windows\lang_ja.nsi" !include "installers\windows\lang_ko.nsi" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -890,10 +890,10 @@ Function .onInit Push "" Push ${LANG_ENGLISH} Push English -# Push ${LANG_GERMAN} -# Push German -# Push ${LANG_JAPANESE} -# Push Japanese + Push ${LANG_GERMAN} + Push German + Push ${LANG_JAPANESE} + Push Japanese Push ${LANG_KOREAN} Push Korean Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain @@ -909,12 +909,15 @@ Function .onInit StrCmp $LANGUAGE "1042" 0 +3 StrCpy $LANGFLAGS " -set SystemLanguage ko" Goto EndOfFunc -# StrCmp $LANGUAGE "1041" 0 +3 -# StrCpy $LANGFLAGS " -set SystemLanguage ja" -# Goto EndOfFunc -# StrCmp $LANGUAGE "1031" 0 +3 -# StrCpy $LANGFLAGS " -set SystemLanguage de" -# Goto EndOfFunc + + StrCmp $LANGUAGE "1041" 0 +3 + StrCpy $LANGFLAGS " -set SystemLanguage ja" + Goto EndOfFunc + + StrCmp $LANGUAGE "1031" 0 +3 + StrCpy $LANGFLAGS " -set SystemLanguage de" + Goto EndOfFunc + StrCmp $LANGUAGE "1033" 0 +3 StrCpy $LANGFLAGS " -set SystemLanguage en-us" Goto EndOfFunc diff --git a/linden/indra/newview/licenses-linux.txt b/linden/indra/newview/licenses-linux.txt index 1892b81..826e044 100644 --- a/linden/indra/newview/licenses-linux.txt +++ b/linden/indra/newview/licenses-linux.txt @@ -547,3 +547,96 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============== +libpng license +============== + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are +Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors: + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and +must not be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from + any source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. diff --git a/linden/indra/newview/licenses-mac.txt b/linden/indra/newview/licenses-mac.txt index 6fcf461..24539e5 100644 --- a/linden/indra/newview/licenses-mac.txt +++ b/linden/indra/newview/licenses-mac.txt @@ -432,3 +432,96 @@ jloup@gzip.org Mark Adler madler@alumni.caltech.edu + +============== +libpng license +============== + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are +Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors: + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and +must not be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from + any source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. diff --git a/linden/indra/newview/licenses-win32.txt b/linden/indra/newview/licenses-win32.txt index 6fcf461..24539e5 100644 --- a/linden/indra/newview/licenses-win32.txt +++ b/linden/indra/newview/licenses-win32.txt @@ -432,3 +432,96 @@ jloup@gzip.org Mark Adler madler@alumni.caltech.edu + +============== +libpng license +============== + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are +Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors: + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and +must not be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from + any source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh index 048aaf6..d77da88 100755 --- a/linden/indra/newview/linux_tools/wrapper.sh +++ b/linden/indra/newview/linux_tools/wrapper.sh @@ -38,7 +38,7 @@ export LL_GL_BASICEXT=x ## you're building your own viewer, bear in mind that the executable ## in the bin directory will be stripped: you should replace it with ## an unstripped binary before you run. -#export LL_WRAPPER='valgrind --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp' +#export LL_WRAPPER='valgrind --smc-check=all --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp' ## - Avoids an often-buggy X feature that doesn't really benefit us anyway. export SDL_VIDEO_X11_DGAMOUSE=0 diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 83b8c0c..150e35f 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -2019,11 +2019,6 @@ void LLAgent::setAFK() return; } - if (!gAllowAFK) - { - return; - } - if (!gAgent.getRegion()) { // Don't set AFK if we're not talking to a region yet. @@ -4983,7 +4978,7 @@ BOOL LLAgent::allowOperation(PermissionBit op, const LLPermissions& perm, U64 group_proxy_power, U8 god_minimum) - { +{ // Check god level. if (getGodLevel() >= god_minimum) return TRUE; diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index e375227..0ca9f22 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h @@ -240,7 +240,7 @@ public: const LLUUID &getGroupID() const { return mGroupID; } ECameraMode getCameraMode() const { return mCameraMode; } BOOL getFocusOnAvatar() const { return mFocusOnAvatar; } - LLViewerObject* getFocusObject() const { return mFocusObject; } + LLPointer& getFocusObject() { return mFocusObject; } F32 getFocusObjectDist() const { return mFocusObjectDist; } BOOL inPrelude(); BOOL canManageEstate() const; diff --git a/linden/indra/newview/llassetuploadresponders.cpp b/linden/indra/newview/llassetuploadresponders.cpp index 789beaa..79faec1 100644 --- a/linden/indra/newview/llassetuploadresponders.cpp +++ b/linden/indra/newview/llassetuploadresponders.cpp @@ -122,7 +122,7 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content) else { LLHTTPClient::postFile(uploader, mFileName, this); - } + } } void LLAssetUploadResponder::uploadFailure(const LLSD& content) diff --git a/linden/indra/newview/llcape.h b/linden/indra/newview/llcape.h index 64cf2c4..1ccdc9c 100644 --- a/linden/indra/newview/llcape.h +++ b/linden/indra/newview/llcape.h @@ -211,7 +211,7 @@ class LLVOCloth : public LLViewerObject //-------------------------------------- LLClothAttributes mAttributes; // these determine the characteristics of the cloth LLVector3 mAvatarCollisionSpherePosition; // derived from the avatar - LLViewerObject* mDummyVO [ CLOTH_MAX_STRANDS ]; + LLPointer mDummyVO [ CLOTH_MAX_STRANDS ]; LLVolumeImplFlexible* mStrand [ CLOTH_MAX_STRANDS ]; // the array of strands that make up the cloth diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 539c935..66ffdc4 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -447,7 +447,7 @@ void LLChatBar::sendChat( EChatType type ) if (!text.empty()) { // store sent line in history, duplicates will get filtered - mInputEditor->updateHistory(); + if (mInputEditor) mInputEditor->updateHistory(); // Check if this is destined for another channel S32 channel = 0; stripChannelNumber(text, &channel); diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp index 2b394e9..7481d99 100644 --- a/linden/indra/newview/llcontroldef.cpp +++ b/linden/indra/newview/llcontroldef.cpp @@ -61,6 +61,7 @@ void declare_settings() gSavedSettings.declareColor4("SystemChatColor", LLColor4(0.8f, 1.f, 1.f, 1.f), "Color of chat messages from SL System"); gSavedSettings.declareColor4("AgentChatColor", LLColor4(1.0f, 1.0f, 1.0f, 1.0f), "Color of chat messages from other residents"); gSavedSettings.declareColor4("ObjectChatColor", LLColor4(0.7f, 0.9f, 0.7f, 1.0f), "Color of chat messages from objects"); + gSavedSettings.declareColor4("llOwnerSayChatColor", LLColor4(0.7f, 0.0f, 0.7f, 1.0f), "Color of chat messages from objects only visible to the owner"); gSavedSettings.declareColor4("BackgroundChatColor", LLColor4(0.f, 0.f, 0.f, 1.0f), "Color of chat bubble background"); gSavedSettings.declareColor4("ScriptErrorColor", LLColor4(0.82f, 0.82f, 0.99f, 1.0f), "Color of script error messages"); gSavedSettings.declareColor4("HTMLLinkColor", LLColor4(0.6f, 0.6f, 1.0f, 1.0f), "Color of hyperlinks"); @@ -228,7 +229,7 @@ void declare_settings() gSavedSettings.declareBOOL("UseChatBubbles", FALSE, "Show chat above avatars head in chat bubbles"); gSavedSettings.declareF32("ChatBubbleOpacity", 0.5f, "Opacity of chat bubble background (0.0 = completely transparent, 1.0 = completely opaque)"); - gSavedSettings.declareBOOL("AllowAFK", TRUE, "Automatically set AFK (away from keyboard) mode when idle"); + gSavedSettings.declareBOOL("AllowIdleAFK", TRUE, "Automatically set AFK (away from keyboard) mode when idle"); gSavedSettings.declareF32("AFKTimeout", 300.f, "Time before automatically setting AFK (away from keyboard) mode (seconds)"); // 5 minutes gSavedSettings.declareBOOL("SmallAvatarNames", TRUE, "Display avatar name text in smaller font"); @@ -237,6 +238,13 @@ void declare_settings() gSavedSettings.declareBOOL("ChatShowTimestamps", TRUE, "Show timestamps in chat"); //------------------------------------------------------------------------ + // Caution Script Permission Prompts + //------------------------------------------------------------------------ + + gSavedSettings.declareBOOL("PermissionsCautionEnabled", TRUE, "When enabled, changes the handling of script permission requests to help avoid accidental granting of certain permissions, such as the debit permission", NO_PERSIST); + gSavedSettings.declareS32("PermissionsCautionNotifyBoxHeight", 344, "Height of caution-style notification messages", NO_PERSIST); + + //------------------------------------------------------------------------ // Other.... //------------------------------------------------------------------------ @@ -624,8 +632,10 @@ void declare_settings() LLFirstUse::addConfigVariable("FirstInventory"); LLFirstUse::addConfigVariable("FirstSandbox"); LLFirstUse::addConfigVariable("FirstFlexible"); + LLFirstUse::addConfigVariable("FirstDebugMenus"); LLFirstUse::addConfigVariable("FirstStreamingMusic"); LLFirstUse::addConfigVariable("FirstStreamingVideo"); + LLFirstUse::addConfigVariable("FirstSculptedPrim"); gSavedSettings.declareBOOL("ShowDebugConsole", FALSE, "Show log in SL window"); gSavedSettings.declareBOOL("ShowDebugStats", FALSE, "Show performance stats display"); @@ -826,6 +836,10 @@ void declare_settings() gSavedPerAccountSettings.declareBOOL("LogInstantMessages", FALSE, "Log Instant Messages"); gSavedPerAccountSettings.declareBOOL("LogChat", FALSE, "Log Chat"); gSavedPerAccountSettings.declareBOOL("LogShowHistory", FALSE, "Log Show History"); + gSavedPerAccountSettings.declareBOOL("IMLogTimestamp", FALSE, "Log Timestamp of Instant Messages"); + gSavedPerAccountSettings.declareBOOL("LogChatTimestamp", FALSE, "Log Timestamp of Chat"); + gSavedPerAccountSettings.declareBOOL("LogChatIM", FALSE, "Log Incoming Instant Messages with Chat"); + gSavedPerAccountSettings.declareBOOL("LogTimestampDate", FALSE, "Include Date with Timestamp"); // Inventory gSavedSettings.declareRect("FloaterInventoryRect", LLRect(0, 400, 300, 0), "Rectangle for inventory window" ); @@ -973,7 +987,7 @@ void declare_settings() gSavedSettings.declareU32("RegionTextureSize", 256, "Terrain texture dimensions (power of 2)"); // Selection option - gSavedSettings.declareBOOL("SelectLinkedSet", TRUE, "", NO_PERSIST); + gSavedSettings.declareBOOL("EditLinkedParts", FALSE, "Select individual parts of linked objects", NO_PERSIST); // Selection beam gSavedSettings.declareBOOL("ShowSelectionBeam", TRUE, "Show selection particle beam when selecting or interacting with objects."); diff --git a/linden/indra/newview/lldebugmessagebox.cpp b/linden/indra/newview/lldebugmessagebox.cpp index e238800..948b96a 100644 --- a/linden/indra/newview/lldebugmessagebox.cpp +++ b/linden/indra/newview/lldebugmessagebox.cpp @@ -77,6 +77,9 @@ LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarTy addChild(mSlider2); addChild(mSlider3); break; + default: + llwarns << "Unhandled var type " << var_type << llendl; + break; } mAnimateButton = new LLButton("Animate", LLRect(20, 45, 180, 25), "", onAnimateClicked, this); @@ -185,12 +188,17 @@ void LLDebugVarMessageBox::slider_changed(LLUICtrl* ctrl, void* user_data) *((S32*)msg_box->mVarData) = (S32)msg_box->mSlider1->getValue().asInteger(); break; case VAR_TYPE_VEC3: + { LLVector3* vec_p = (LLVector3*)msg_box->mVarData; vec_p->setVec((F32)msg_box->mSlider1->getValue().asReal(), (F32)msg_box->mSlider2->getValue().asReal(), (F32)msg_box->mSlider3->getValue().asReal()); break; } + default: + llwarns << "Unhandled var type " << msg_box->mVarType << llendl; + break; + } } void LLDebugVarMessageBox::onAnimateClicked(void* user_data) @@ -217,10 +225,15 @@ void LLDebugVarMessageBox::draw() snprintf(text, sizeof(text), "%d", *((S32*)mVarData)); /* Flawfinder: ignore */ break; case VAR_TYPE_VEC3: + { LLVector3* vec_p = (LLVector3*)mVarData; snprintf(text, sizeof(text), "%.3f %.3f %.3f", vec_p->mV[VX], vec_p->mV[VY], vec_p->mV[VZ]); /* Flawfinder: ignore */ break; } + default: + llwarns << "Unhandled var type " << mVarType << llendl; + break; + } mText->setText(text); if(mAnimate) diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp index a39416c..f5f69ea 100644 --- a/linden/indra/newview/lldrawable.cpp +++ b/linden/indra/newview/lldrawable.cpp @@ -1324,7 +1324,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector* if (parent) { - av = (LLVOAvatar*) parent->getVObj(); + av = (LLVOAvatar*) parent->getVObj().get(); if (!av->isVisible()) { diff --git a/linden/indra/newview/lldrawable.h b/linden/indra/newview/lldrawable.h index 7429292..97e512f 100644 --- a/linden/indra/newview/lldrawable.h +++ b/linden/indra/newview/lldrawable.h @@ -82,8 +82,8 @@ public: const LLViewerRegion* getRegion() const { return mVObjp->getRegion(); } const LLTextureEntry* getTextureEntry(U8 which) const { return mVObjp->getTE(which); } - LLViewerObject* getVObj() { return mVObjp; } - const LLViewerObject* getVObj() const { return mVObjp; } + LLPointer& getVObj() { return mVObjp; } + const LLViewerObject *getVObj() const { return mVObjp; } LLVOVolume* getVOVolume() const; // cast mVObjp tp LLVOVolume if OK const LLMatrix4& getWorldMatrix() const { return mXform.getWorldMatrix(); } diff --git a/linden/indra/newview/lldrawpool.cpp b/linden/indra/newview/lldrawpool.cpp index 4a1794e..0ab5b54 100644 --- a/linden/indra/newview/lldrawpool.cpp +++ b/linden/indra/newview/lldrawpool.cpp @@ -486,15 +486,20 @@ void LLRenderPass::renderInvisible(U32 mask) std::vector& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE]; - U32* indices_pointer = NULL; for (std::vector::iterator i = draw_info.begin(); i != draw_info.end(); ++i) { LLDrawInfo& params = **i; - params.mVertexBuffer->setBuffer(mask); - 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) + { + 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; + } } } diff --git a/linden/indra/newview/lldrawpoolavatar.cpp b/linden/indra/newview/lldrawpoolavatar.cpp index b864449..ae76aeb 100644 --- a/linden/indra/newview/lldrawpoolavatar.cpp +++ b/linden/indra/newview/lldrawpoolavatar.cpp @@ -319,7 +319,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) { return; } - avatarp = (LLVOAvatar *)(facep->getDrawable()->getVObj()); + avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); } if (avatarp->isDead() || avatarp->mDrawable.isNull()) @@ -525,7 +525,7 @@ void LLDrawPoolAvatar::renderForSelect() { return; } - LLVOAvatar *avatarp = (LLVOAvatar *)(facep->getDrawable()->getVObj()); + LLVOAvatar *avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); if (avatarp->isDead() || avatarp->mIsDummy || avatarp->mDrawable.isNull()) { diff --git a/linden/indra/newview/lldrawpooltree.cpp b/linden/indra/newview/lldrawpooltree.cpp index 2f380f8..6749178 100644 --- a/linden/indra/newview/lldrawpooltree.cpp +++ b/linden/indra/newview/lldrawpooltree.cpp @@ -164,7 +164,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting) U32* indicesp = (U32*) face->mVertexBuffer->getIndicesPointer(); // Render each of the trees - LLVOTree *treep = (LLVOTree *)drawablep->getVObj(); + LLVOTree *treep = (LLVOTree *)drawablep->getVObj().get(); LLColor4U color(255,255,255,255); diff --git a/linden/indra/newview/lldriverparam.h b/linden/indra/newview/lldriverparam.h index e96d5ce..f7b0819 100644 --- a/linden/indra/newview/lldriverparam.h +++ b/linden/indra/newview/lldriverparam.h @@ -104,7 +104,7 @@ protected: typedef std::vector entry_list_t; entry_list_t mDriven; LLViewerVisualParam* mCurrentDistortionParam; - LLVOAvatar* mAvatarp; + LLPointer mAvatarp; }; #endif // LL_LLDRIVERPARAM_H diff --git a/linden/indra/newview/lleventpoll.cpp b/linden/indra/newview/lleventpoll.cpp index 7430fc3..dd59a06 100644 --- a/linden/indra/newview/lleventpoll.cpp +++ b/linden/indra/newview/lleventpoll.cpp @@ -1,8 +1,8 @@ -/** +/** * @file lleventpoll.cpp - * @brief Implementation of the LLEventPoll class. + * @brief Implementation of the LLEventPoll class. * - * Copyright (c) 2006-2007, Linden Research, Inc. + * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/linden/indra/newview/llface.cpp b/linden/indra/newview/llface.cpp index 342c76e..782048c 100644 --- a/linden/indra/newview/llface.cpp +++ b/linden/indra/newview/llface.cpp @@ -1398,7 +1398,7 @@ void LLFace::enableLights() const } if (isState(LIGHT)) { - const LLVOVolume* vovolume = (const LLVOVolume*)(mDrawablep->getVObj()); + const LLVOVolume* vovolume = (const LLVOVolume*)mDrawablep->getVObj(); gPipeline.setAmbient(vovolume->getLightColor()); } } diff --git a/linden/indra/newview/llfilepicker.cpp b/linden/indra/newview/llfilepicker.cpp index 24d3932..3620c05 100644 --- a/linden/indra/newview/llfilepicker.cpp +++ b/linden/indra/newview/llfilepicker.cpp @@ -49,7 +49,7 @@ LLFilePicker LLFilePicker::sInstance; #if LL_WINDOWS #define SOUND_FILTER L"Sounds (*.wav)\0*.wav\0" -#define IMAGE_FILTER L"Images (*.tga; *.bmp; *.jpg; *.jpeg)\0*.tga;*.bmp;*.jpg;*.jpeg\0" +#define IMAGE_FILTER L"Images (*.tga; *.bmp; *.jpg; *.jpeg; *.png)\0*.tga;*.bmp;*.jpg;*.jpeg;*.png\0" #define ANIM_FILTER L"Animations (*.bvh)\0*.bvh\0" #ifdef _CORY_TESTING #define GEOMETRY_FILTER L"SL Geometry (*.slg)\0*.slg\0" @@ -511,10 +511,12 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB if (fileInfo.filetype != 'JPEG' && fileInfo.filetype != 'JPG ' && fileInfo.filetype != 'BMP ' && fileInfo.filetype != 'TGA ' && fileInfo.filetype != 'BMPf' && fileInfo.filetype != 'TPIC' && + fileInfo.filetype != 'PNG ' && (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("jpeg"), kCFCompareCaseInsensitive) != kCFCompareEqualTo && CFStringCompare(fileInfo.extension, CFSTR("jpg"), kCFCompareCaseInsensitive) != kCFCompareEqualTo && CFStringCompare(fileInfo.extension, CFSTR("bmp"), kCFCompareCaseInsensitive) != kCFCompareEqualTo && - CFStringCompare(fileInfo.extension, CFSTR("tga"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) + CFStringCompare(fileInfo.extension, CFSTR("tga"), kCFCompareCaseInsensitive) != kCFCompareEqualTo && + CFStringCompare(fileInfo.extension, CFSTR("png"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) ) { result = false; @@ -1169,7 +1171,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter ) case FFLOAD_ANIM: caption += "Animations (*.bvh)"; break; case FFLOAD_IMAGE: - caption += "Images (*.tga; *.bmp; *.jpg; *.jpeg)"; break; + caption += "Images (*.tga; *.bmp; *.jpg; *.jpeg; *.png)"; break; default:; break; } diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index 74381dc..1ddac8e 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -60,6 +60,18 @@ void LLFirstUse::disableFirstUse() } } +// static +void LLFirstUse::resetFirstUse() +{ + // Set all first-use warnings to disabled + for (std::set::iterator iter = sConfigVariables.begin(); + iter != sConfigVariables.end(); ++iter) + { + gSavedSettings.setWarning(*iter, TRUE); + } +} + + // Called whenever the viewer detects that your balance went up void LLFirstUse::useBalanceIncrease(S32 delta) { @@ -214,3 +226,25 @@ void LLFirstUse::useFlexible() } } +// static +void LLFirstUse::useDebugMenus() +{ + if (gSavedSettings.getWarning("FirstDebugMenus")) + { + gSavedSettings.setWarning("FirstDebugMenus", FALSE); + + LLNotifyBox::showXml("FirstDebugMenus"); + } +} + +// static +void LLFirstUse::useSculptedPrim() +{ + if (gSavedSettings.getWarning("FirstSculptedPrim")) + { + gSavedSettings.setWarning("FirstSculptedPrim", FALSE); + + LLNotifyBox::showXml("FirstSculptedPrim"); + + } +} diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h index 4d0e754..d48ae96 100644 --- a/linden/indra/newview/llfirstuse.h +++ b/linden/indra/newview/llfirstuse.h @@ -66,6 +66,10 @@ object or from inventory. 11. FIrst time you run the client on a system without QuickTime installed. 12. First time you create a flexible object. + +13. First time you open the debug menus (ctrl-alt-shift D) + +14. First time you create/edit a sculpted prim. */ class LLFirstUse @@ -76,6 +80,7 @@ public: // Sets all controls back to show the dialogs. static void disableFirstUse(); + static void resetFirstUse(); // These methods are called each time the appropriate action is // taken. The functions themselves handle only showing the dialog @@ -94,6 +99,8 @@ public: static void useInventory(); static void useSandbox(); static void useFlexible(); + static void useDebugMenus(); + static void useSculptedPrim(); protected: static std::set sConfigVariables; diff --git a/linden/indra/newview/llflexibleobject.cpp b/linden/indra/newview/llflexibleobject.cpp index 0dce348..8e4fe91 100644 --- a/linden/indra/newview/llflexibleobject.cpp +++ b/linden/indra/newview/llflexibleobject.cpp @@ -252,12 +252,6 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons //--------------------------------------------------------------------------------- BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) - { - return FALSE; // (we are not initialized or updated) - } - - LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); if (mVO->mDrawable.isNull()) { @@ -272,6 +266,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 LLViewerObject* parent = (LLViewerObject*) mVO->getParent(); parent->mDrawable->mQuietCount = 0; } + + LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); S32 new_res = mAttributes->getSimulateLOD(); @@ -284,6 +280,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 { mRenderRes = FLEXIBLE_OBJECT_MAX_SECTIONS; } + + // Bottom cap at 1/4 the original number of sections if (mRenderRes < mAttributes->getSimulateLOD()-1) { @@ -301,6 +299,10 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 setAttributesOfAllSections(); mInitialized = TRUE; } + if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) + { + return FALSE; // (we are not initialized or updated) + } if (mVO->mDrawable->isVisible() && !mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) && @@ -624,7 +626,7 @@ void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped) BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) { - LLVOVolume *volume = (LLVOVolume*)mVO; + LLVOVolume *volume = (LLVOVolume*)mVO.get(); if (volume->mDrawable.isNull()) // Not sure why this is happening, but it is... { @@ -740,7 +742,7 @@ void LLVolumeImplFlexible::updateRelativeXform() { LLQuaternion delta_rot; LLVector3 delta_pos, delta_scale; - LLVOVolume* vo = (LLVOVolume*) mVO; + LLVOVolume* vo = (LLVOVolume*) mVO.get(); //matrix from local space to parent relative/global space delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation(); diff --git a/linden/indra/newview/llflexibleobject.h b/linden/indra/newview/llflexibleobject.h index 3d35dd2..507073b 100644 --- a/linden/indra/newview/llflexibleobject.h +++ b/linden/indra/newview/llflexibleobject.h @@ -111,7 +111,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface //-------------------------------------- // private members //-------------------------------------- - LLViewerObject* mVO; + LLPointer mVO; LLTimer mTimer; LLVector3 mAnchorPosition; LLVector3 mParentPosition; diff --git a/linden/indra/newview/llfloateranimpreview.h b/linden/indra/newview/llfloateranimpreview.h index f6d9589..c536fb5 100644 --- a/linden/indra/newview/llfloateranimpreview.h +++ b/linden/indra/newview/llfloateranimpreview.h @@ -61,7 +61,7 @@ protected: F32 mCameraZoom; LLVector3 mCameraOffset; LLVector3 mCameraRelPos; - LLVOAvatar* mDummyAvatar; + LLPointer mDummyAvatar; }; class LLFloaterAnimPreview : public LLFloaterNameDesc diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index d31532f..5e416d4 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -150,12 +150,22 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLString& line, const edit->appendColoredText(line, false, prepend_newline, color); } +void log_chat_text(const LLChat& chat) +{ + LLString histstr; + if (gSavedPerAccountSettings.getBOOL("LogChatTimestamp")) + histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + chat.mText; + else + histstr = chat.mText; + + LLLogChat::saveHistory("chat",histstr); +} // static void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) { if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file) { - LLLogChat::saveHistory("chat",chat.mText); + log_chat_text(chat); } LLColor4 color = get_text_color(chat); @@ -364,10 +374,14 @@ void LLFloaterChat::addChat(const LLChat& chat, gConsole->addLine(chat.mText, size, text_color); } - if( !from_instant_message || gSavedSettings.getBOOL("IMInChatHistory") ) - { + if(from_instant_message && gSavedPerAccountSettings.getBOOL("LogChatIM")) + log_chat_text(chat); + + if(from_instant_message && gSavedSettings.getBOOL("IMInChatHistory")) + addChatHistory(chat,false); + + if(!from_instant_message) addChatHistory(chat); - } } LLColor4 get_text_color(const LLChat& chat) @@ -400,6 +414,10 @@ LLColor4 get_text_color(const LLChat& chat) { text_color = gSavedSettings.getColor4("ScriptErrorColor"); } + else if ( chat.mChatType == CHAT_TYPE_OWNER ) + { + text_color = gSavedSettings.getColor4("llOwnerSayChatColor"); + } else { text_color = gSavedSettings.getColor4("ObjectChatColor"); diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp index ee83bf9..62ead8f 100644 --- a/linden/indra/newview/llfloatercustomize.cpp +++ b/linden/indra/newview/llfloatercustomize.cpp @@ -422,6 +422,8 @@ public: static void onTextureCommit( LLUICtrl* ctrl, void* userdata ); static void onColorCommit( LLUICtrl* ctrl, void* userdata ); static void onCommitSexChange( LLUICtrl*, void* userdata ); + static void onSelectAutoWearOption(S32 option, void* data); + private: @@ -662,6 +664,11 @@ void LLPanelEditWearable::onBtnRevert( void* userdata ) void LLPanelEditWearable::onBtnCreateNew( void* userdata ) { LLPanelEditWearable* self = (LLPanelEditWearable*) userdata; + gViewerWindow->alertXml("AutoWearNewClothing", onSelectAutoWearOption, self); +} +void LLPanelEditWearable::onSelectAutoWearOption(S32 option, void* data) +{ + LLPanelEditWearable* self = (LLPanelEditWearable*) data; LLVOAvatar* avatar = gAgent.getAvatarObject(); if(avatar) { @@ -673,14 +680,15 @@ void LLPanelEditWearable::onBtnCreateNew( void* userdata ) // regular UI, items get created in normal folder folder_id = gInventory.findCategoryUUIDForType(asset_type); - LLPointer cb = new WearOnAvatarCallback; + // Only auto wear the new item if the AutoWearNewClothing checkbox is selected. + LLPointer cb = option == 0 ? + new WearOnAvatarCallback : NULL; create_inventory_item(gAgent.getID(), gAgent.getSessionID(), folder_id, wearable->getTransactionID(), wearable->getName(), wearable->getDescription(), asset_type, LLInventoryType::IT_WEARABLE, wearable->getType(), wearable->getPermissions().getMaskNextOwner(), cb); } } - void LLPanelEditWearable::addColorSwatch( LLVOAvatar::ETextureIndex te, const LLString& name ) { childSetCommitCallback(name, LLPanelEditWearable::onColorCommit, this); diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index 4612674..9cae4cc 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp @@ -34,6 +34,8 @@ #include "llwebbrowserctrl.h" #include "llviewerwindow.h" #include "llviewercontrol.h" +#include "llweb.h" +#include "llui.h" #if LL_LIBXUL_ENABLED @@ -63,7 +65,9 @@ public: // used for some stats logging - will be removed at some point static BOOL sFloaterOpened; - + + static void onClickF1HelpLoadURL(S32 option, void* userdata); + protected: LLWebBrowserCtrl* mWebBrowser; static LLFloaterHtmlHelp* sInstance; @@ -163,24 +167,55 @@ void LLFloaterHtmlHelp::draw() // void LLFloaterHtmlHelp::show(std::string url) { - sFloaterOpened = true; + gViewerWindow->alertXml("ClickOpenF1Help", onClickF1HelpLoadURL, (void*) NULL); - if ( sInstance ) + // switching this out for the moment - will come back later + // want it still to be compiled so not using comments of #if 0 + if ( false ) { - if (sInstance->mWebBrowser) + sFloaterOpened = true; + + if ( sInstance ) { - sInstance->mWebBrowser->navigateTo(url); + if (sInstance->mWebBrowser) + { + sInstance->mWebBrowser->navigateTo(url); + } + sInstance->setVisibleAndFrontmost(); + return; } - sInstance->setVisibleAndFrontmost(); - return; - } - LLFloaterHtmlHelp* self = new LLFloaterHtmlHelp(url); + LLFloaterHtmlHelp* self = new LLFloaterHtmlHelp(url); + + // reposition floater from saved settings + LLRect rect = gSavedSettings.getRect( "HtmlHelpRect" ); + self->reshape( rect.getWidth(), rect.getHeight(), FALSE ); + self->setRect( rect ); + }; +} + +// static +void LLFloaterHtmlHelp::onClickF1HelpLoadURL(S32 option, void* userdata) +{ + if (option == 0) + { + // choose HELP url based on selected language - default to english language support page + LLString lang = LLUI::sConfigGroup->getString("Language"); + + // this sucks but there isn't a way to grab an arbitrary string from an XML file + // (using llcontroldef strings causes problems if string don't exist) + LLString help_url( "https://support.secondlife.com/" ); + if ( lang == "ja" ) + help_url = "http://help.secondlife.com/jp"; + else + if ( lang == "ko" ) + help_url = "http://help.secondlife.com/kr"; + else + if ( lang == "pt" ) + help_url = "http://help.secondlife.com/pt"; - // reposition floater from saved settings - LLRect rect = gSavedSettings.getRect( "HtmlHelpRect" ); - self->reshape( rect.getWidth(), rect.getHeight(), FALSE ); - self->setRect( rect ); + LLWeb::loadURL( help_url ); + }; } //////////////////////////////////////////////////////////////////////////////// diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 9dfaa49..0a91563 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp @@ -33,6 +33,7 @@ #include "llimagebmp.h" #include "llimagetga.h" #include "llimagejpeg.h" +#include "llimagepng.h" #include "llagent.h" #include "llbutton.h" @@ -325,6 +326,10 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename) { codec = IMG_CODEC_JPEG; } + else if( 0 == strnicmp(ext, ".png", 4) ) + { + codec = IMG_CODEC_PNG; + } LLPointer raw_image = new LLImageRaw; @@ -382,6 +387,21 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename) } } break; + case IMG_CODEC_PNG: + { + LLPointer png_image = new LLImagePNG; + + if (!png_image->load(src_filename)) + { + return false; + } + + if (!png_image->decode(raw_image)) + { + return false; + } + } + break; default: return false; } diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp index 4899649..85cfc4e 100644 --- a/linden/indra/newview/llfloaterinspect.cpp +++ b/linden/indra/newview/llfloaterinspect.cpp @@ -2,7 +2,7 @@ * @file llfloaterinspect.cpp * @brief Floater for object inspection tool * - * Copyright (c) 2002-2007, Linden Research, Inc. + * Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/linden/indra/newview/llfloaterinspect.h b/linden/indra/newview/llfloaterinspect.h index ab453b4..ed4ebd1 100644 --- a/linden/indra/newview/llfloaterinspect.h +++ b/linden/indra/newview/llfloaterinspect.h @@ -1,10 +1,10 @@ /** -* @file llfloaterfriends.h +* @file llfloaterinspect.h * @author Cube * @date 2006-12-16 * @brief Declaration of class for displaying object attributes * -* Copyright (c) 2005-2007, Linden Research, Inc. +* Copyright (c) 2006-2007, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp index 82b50ec..ee89975 100644 --- a/linden/indra/newview/llfloaterland.cpp +++ b/linden/indra/newview/llfloaterland.cpp @@ -1557,6 +1557,13 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo { LLPanelLandObjects* self = LLFloaterLand::getCurrentPanelLandObjects(); + if (!self) + { + llwarns << "Received message for nonexistent LLPanelLandObject" + << llendl; + return; + } + const LLFontGL* FONT = LLFontGL::sSansSerif; // Extract all of the owners. diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp index 2c80300..82bab03 100644 --- a/linden/indra/newview/llfloaterpostcard.cpp +++ b/linden/indra/newview/llfloaterpostcard.cpp @@ -76,12 +76,12 @@ LLFloaterPostcard::LLFloaterPostcard(LLImageJPEG* jpeg, LLImageGL *img, const LL mJPEGImage(jpeg), mViewerImage(img), mImageScale(img_scale), - mPosTakenGlobal(pos_taken_global) + mPosTakenGlobal(pos_taken_global), + mHasFirstMsgFocus(false) { init(); } - void LLFloaterPostcard::init() { // pick up the user's up-to-date email address @@ -128,25 +128,24 @@ BOOL LLFloaterPostcard::postBuild() gAgent.buildFullname(name_string); childSetValue("name_form", LLSD(name_string)); - - // XUI:translate - LLString msg("Postcard from "); - msg += gSecondLife; - childSetValue("subject_form", LLSD(msg)); LLTextEditor *MsgField = LLUICtrlFactory::getTextEditorByName(this, "msg_form"); if (MsgField) { - MsgField->setText("Check this out!"); MsgField->setWordWrap(TRUE); - } - childSetFocus("to_form", TRUE); + // For the first time a user focusess to .the msg box, all text will be selected. + MsgField->setFocusChangedCallback(onMsgFormFocusRecieved); + MsgField->setCallbackUserData(this); + } + childSetFocus("to_form", TRUE); + return TRUE; } + // static LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLImageGL *img, const LLVector2 &image_scale, const LLVector3d& pos_taken_global) { @@ -267,46 +266,16 @@ void LLFloaterPostcard::onClickSend(void* data) return; } - if (self->mJPEGImage.notNull()) + LLString subject(self->childGetValue("subject_form").asString().c_str()); + if(subject.empty() || !self->mHasFirstMsgFocus) { - self->mTransactionID.generate(); - self->mAssetID = self->mTransactionID.makeAssetID(gAgent.getSecureSessionID()); - LLVFile::writeFile(self->mJPEGImage->getData(), self->mJPEGImage->getDataSize(), gVFS, self->mAssetID, LLAssetType::AT_IMAGE_JPEG); - - // upload the image - std::string url = gAgent.getRegion()->getCapability("SendPostcard"); - if(!url.empty()) - { - llinfos << "Send Postcard via capability" << llendl; - LLSD body = LLSD::emptyMap(); - // the capability already encodes: agent ID, region ID - body["pos-global"] = self->mPosTakenGlobal.getValue(); - body["to"] = self->childGetValue("to_form").asString(); - body["from"] = self->childGetValue("from_form").asString(); - body["name"] = self->childGetValue("name_form").asString(); - body["subject"] = self->childGetValue("subject_form").asString(); - body["msg"] = self->childGetValue("msg_form").asString(); - body["allow-publish"] = self->childGetValue("allow_publish_check").asBoolean(); - body["mature-publish"] = self->childGetValue("mature_check").asBoolean(); - LLHTTPClient::post(url, body, new LLSendPostcardResponder(body, self->mAssetID, LLAssetType::AT_IMAGE_JPEG)); - } - else - { - gAssetStorage->storeAssetData(self->mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)self, FALSE); - } - - LLUploadDialog::modalUploadDialog("Uploading...\n\nPostcard"); - - // don't destroy the window until the upload is done - // this way we keep the information in the form - self->setVisible(FALSE); + gViewerWindow->alertXml("PromptMissingSubjMsg", missingSubjMsgAlertCallback, self); + return; + } - // also remove any dependency on another floater - // so that we can be sure to outlive it while we - // need to. - LLFloater* dependee = self->getDependee(); - if (dependee) - dependee->removeDependentFloater(self); + if (self->mJPEGImage.notNull()) + { + self->sendPostcard(); } else { @@ -375,3 +344,86 @@ void LLFloaterPostcard::updateUserInfo(const char *email) } } } + +void LLFloaterPostcard::onMsgFormFocusRecieved(LLUICtrl* receiver, void* data) +{ + LLFloaterPostcard* self = (LLFloaterPostcard *)data; + if(self) + { + LLTextEditor* msgForm = LLUICtrlFactory::getTextEditorByName(self, "msg_form"); + if(msgForm && msgForm == receiver && msgForm->hasFocus() && !(self->mHasFirstMsgFocus)) + { + self->mHasFirstMsgFocus = true; + msgForm->setText(LLString("")); + } + } +} + +void LLFloaterPostcard::missingSubjMsgAlertCallback(S32 option, void* data) +{ + if(data) + { + LLFloaterPostcard* self = static_cast(data); + if(0 == option) + { + // User clicked OK + if((self->childGetValue("subject_form").asString()).empty()) + { + // Stuff the subject back into the form. + self->childSetValue("subject_form", self->childGetText("default_subject")); + } + + if(!self->mHasFirstMsgFocus) + { + // The user never switched focus to the messagee window. + // Using the default string. + // XUI: translate + self->childSetValue("msg_form", self->childGetText("default_message")); + } + + self->sendPostcard(); + } + } +} + +void LLFloaterPostcard::sendPostcard() +{ + mTransactionID.generate(); + mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID()); + LLVFile::writeFile(mJPEGImage->getData(), mJPEGImage->getDataSize(), gVFS, mAssetID, LLAssetType::AT_IMAGE_JPEG); + + // upload the image + std::string url = gAgent.getRegion()->getCapability("SendPostcard"); + if(!url.empty()) + { + llinfos << "Send Postcard via capability" << llendl; + LLSD body = LLSD::emptyMap(); + // the capability already encodes: agent ID, region ID + body["pos-global"] = mPosTakenGlobal.getValue(); + body["to"] = childGetValue("to_form").asString(); + body["from"] = childGetValue("from_form").asString(); + body["name"] = childGetValue("name_form").asString(); + body["subject"] = childGetValue("subject_form").asString(); + body["msg"] = childGetValue("msg_form").asString(); + body["allow-publish"] = childGetValue("allow_publish_check").asBoolean(); + body["mature-publish"] = childGetValue("mature_check").asBoolean(); + LLHTTPClient::post(url, body, new LLSendPostcardResponder(body, mAssetID, LLAssetType::AT_IMAGE_JPEG)); + } + else + { + gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE); + } + + LLUploadDialog::modalUploadDialog("Uploading...\n\nPostcard"); + + // don't destroy the window until the upload is done + // this way we keep the information in the form + setVisible(FALSE); + + // also remove any dependency on another floater + // so that we can be sure to outlive it while we + // need to. + LLFloater* dependee = getDependee(); + if (dependee) + dependee->removeDependentFloater(this); +} diff --git a/linden/indra/newview/llfloaterpostcard.h b/linden/indra/newview/llfloaterpostcard.h index bd44e22..33a5e92 100644 --- a/linden/indra/newview/llfloaterpostcard.h +++ b/linden/indra/newview/llfloaterpostcard.h @@ -49,7 +49,7 @@ public: virtual void init(); virtual BOOL postBuild(); virtual void draw(); - + static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLImageGL *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global); static void onClickCancel(void* data); @@ -62,6 +62,11 @@ public: static void updateUserInfo(const char *email); + static void onMsgFormFocusRecieved(LLUICtrl* receiver, void* data); + static void missingSubjMsgAlertCallback(S32 option, void* data); + + void sendPostcard(); + protected: LLPointer mJPEGImage; @@ -70,6 +75,7 @@ protected: LLAssetID mAssetID; LLVector2 mImageScale; LLVector3d mPosTakenGlobal; + boolean mHasFirstMsgFocus; static LLLinkedList sInstances; }; diff --git a/linden/indra/newview/llfloaterreporter.cpp b/linden/indra/newview/llfloaterreporter.cpp index bcbab5b..7e6bf4d 100644 --- a/linden/indra/newview/llfloaterreporter.cpp +++ b/linden/indra/newview/llfloaterreporter.cpp @@ -325,6 +325,8 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) } childSetText("object_name", object_owner); childSetText("owner_name", object_owner); + childSetText("abuser_name_edit", object_owner); + mAbuserID = object_id; } else { @@ -576,10 +578,12 @@ LLFloaterReporter* LLFloaterReporter::createNewBugReporter() -void LLFloaterReporter::setPickedObjectProperties(const char *object_name, const char *owner_name) +void LLFloaterReporter::setPickedObjectProperties(const char *object_name, const char *owner_name, const LLUUID owner_id) { childSetText("object_name", object_name); childSetText("owner_name", owner_name); + childSetText("abuser_name_edit", owner_name); + mAbuserID = owner_id; } diff --git a/linden/indra/newview/llfloaterreporter.h b/linden/indra/newview/llfloaterreporter.h index 4cb72b9..9cb8557 100644 --- a/linden/indra/newview/llfloaterreporter.h +++ b/linden/indra/newview/llfloaterreporter.h @@ -106,7 +106,7 @@ public: // static static void processRegionInfo(LLMessageSystem* msg); - void setPickedObjectProperties(const char *object_name, const char *owner_name); + void setPickedObjectProperties(const char *object_name, const char *owner_name, const LLUUID owner_id); private: void takeScreenshot(); diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 3931acb..3748131 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp @@ -216,7 +216,7 @@ BOOL LLFloaterTools::postBuild() mRadioSelectFace = LLUICtrlFactory::getCheckBoxByName(this,"radio select face"); childSetCommitCallback("radio select face",commit_select_tool,gToolFace); mCheckSelectIndividual = LLUICtrlFactory::getCheckBoxByName(this,"checkbox edit linked parts"); - childSetValue("checkbox edit linked parts",(BOOL)!gSavedSettings.getBOOL("SelectLinkedSet")); + childSetValue("checkbox edit linked parts",(BOOL)gSavedSettings.getBOOL("EditLinkedParts")); childSetCommitCallback("checkbox edit linked parts",commit_select_component,this); mCheckSnapToGrid = LLUICtrlFactory::getCheckBoxByName(this,"checkbox snap to grid"); childSetValue("checkbox snap to grid",(BOOL)gSavedSettings.getBOOL("SnapEnabled")); @@ -456,7 +456,7 @@ void LLFloaterTools::draw() mDirty = FALSE; } - mCheckSelectIndividual->set(!gSavedSettings.getBOOL("SelectLinkedSet")); + // mCheckSelectIndividual->set(gSavedSettings.getBOOL("EditLinkedParts")); LLFloater::draw(); } @@ -567,7 +567,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckSelectIndividual) { mCheckSelectIndividual->setVisible(edit_visible); - mCheckSelectIndividual->set(!gSavedSettings.getBOOL("SelectLinkedSet")); + //mCheckSelectIndividual->set(gSavedSettings.getBOOL("EditLinkedParts")); } mRadioPosition ->set( tool == gToolTranslate ); @@ -746,7 +746,7 @@ void LLFloaterTools::onClose(bool app_quitting) // exit component selection mode gSelectMgr->promoteSelectionToRoot(); - gSavedSettings.setBOOL("SelectLinkedSet", TRUE); + gSavedSettings.setBOOL("EditLinkedParts", FALSE); gViewerWindow->showCursor(); @@ -922,7 +922,7 @@ void commit_select_component(LLUICtrl *ctrl, void *data) } BOOL select_individuals = floaterp->mCheckSelectIndividual->get(); - gSavedSettings.setBOOL("SelectLinkedSet", !select_individuals); + gSavedSettings.setBOOL("EditLinkedParts", select_individuals); floaterp->dirty(); if (select_individuals) diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index bd5be8e..36d0b40 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp @@ -2522,6 +2522,7 @@ LLFolderView::LLFolderView( const LLString& name, LLViewerImage* root_folder_ico mLastScrollItem( NULL ), mNeedsAutoSelect( FALSE ), mAutoSelectOverride(FALSE), + mNeedsAutoRename(FALSE), mDebugFilters(FALSE), mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME), // This gets overridden by a pref immediately mFilter(name), @@ -4954,3 +4955,39 @@ LLString LLInventoryFilter::getFilterText() } return mFilterText; } + +void LLInventoryFilter::toLLSD(LLSD& data) +{ + data["filter_types"] = (LLSD::Integer)getFilterTypes(); + data["min_date"] = (LLSD::Integer)getMinDate(); + data["max_date"] = (LLSD::Integer)getMaxDate(); + data["hours_ago"] = (LLSD::Integer)getHoursAgo(); + data["show_folder_state"] = (LLSD::Integer)getShowFolderState(); + data["permissions"] = (LLSD::Integer)getFilterPermissions(); + data["substring"] = (LLSD::String)getFilterSubString(); + data["sort_order"] = (LLSD::Integer)getSortOrder(); +} + +void LLInventoryFilter::fromLLSD(LLSD& data) +{ + if(data.has("filter_types")) + setFilterTypes((U32)data["filter_types"].asInteger()); + + if(data.has("min_date") && data.has("max_date")) + setDateRange((U32)data["min_date"].asInteger(), (U32)data["max_date"].asInteger()); + + if(data.has("hours_ago")) + setHoursAgo((U32)data["hours_ago"].asInteger()); + + if(data.has("show_folder_state")) + setShowFolderState((EFolderShow)data["show_folder_state"].asInteger()); + + if(data.has("permissions")) + setFilterPermissions((PermissionMask)data["permissions"].asInteger()); + + if(data.has("substring")) + setFilterSubString(LLString(data["substring"].asString())); + + if(data.has("sort_order")) + setSortOrder((U32)data["sort_order"].asInteger()); +} diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h index ec70b90..9482b96 100644 --- a/linden/indra/newview/llfolderview.h +++ b/linden/indra/newview/llfolderview.h @@ -236,6 +236,9 @@ public: //RN: this is public to allow system to externally force a global refilter void setModified(EFilterBehavior behavior = FILTER_RESTART); + void toLLSD(LLSD& data); + void fromLLSD(LLSD& data); + protected: struct filter_ops { @@ -859,6 +862,9 @@ public: static void idle(void* user_data); BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } + BOOL needsAutoRename() { return mNeedsAutoRename; } + void setNeedsAutoRename(BOOL val) { mNeedsAutoRename = val; } + BOOL getDebugFilters() { return mDebugFilters; } // DEBUG only @@ -890,6 +896,7 @@ protected: LLCoordGL mLastScrollOffset; BOOL mNeedsAutoSelect; BOOL mAutoSelectOverride; + BOOL mNeedsAutoRename; BOOL mDebugFilters; U32 mSortOrder; diff --git a/linden/indra/newview/llgenepool.cpp b/linden/indra/newview/llgenepool.cpp index 3cc57e9..40dd5cd 100644 --- a/linden/indra/newview/llgenepool.cpp +++ b/linden/indra/newview/llgenepool.cpp @@ -127,6 +127,7 @@ BOOL LLGenePool::loadNodeArchetype( LLXmlTreeNode* node ) LLVOAvatar* avatar = gAgent.getAvatarObject(); if( !avatar ) { + delete archetype; return FALSE; } diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index 5250b57..813f924 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp @@ -476,6 +476,7 @@ void LLHUDEffectLookAt::calcTargetPosition() { //sets the lookat point in front of the avatar mTargetOffsetGlobal.setVec(5.0, 0.0, 0.0); + local_offset.setVec(mTargetOffsetGlobal); } mTargetPos = avatarp->mHeadp->getWorldPosition(); diff --git a/linden/indra/newview/llhudicon.cpp b/linden/indra/newview/llhudicon.cpp index 93e730e..15988fa 100644 --- a/linden/indra/newview/llhudicon.cpp +++ b/linden/indra/newview/llhudicon.cpp @@ -65,7 +65,8 @@ LLHUDIcon::LLHUDIcon(const U8 type) : LLHUDObject(type), mImagep(NULL), mPickID(0), - mScale(0.1f) + mScale(0.1f), + mHidden(FALSE) { sIconInstances.push_back(this); } @@ -81,6 +82,9 @@ void LLHUDIcon::renderIcon(BOOL for_select) LLGLDepthTest gls_depth(GL_TRUE); LLGLState no_texture(GL_TEXTURE_2D, for_select ? FALSE : TRUE); + if (mHidden) + return; + if (mSourceObject.isNull() || mImagep.isNull()) { markDead(); diff --git a/linden/indra/newview/llhudicon.h b/linden/indra/newview/llhudicon.h index f26abb4..7f8b435 100644 --- a/linden/indra/newview/llhudicon.h +++ b/linden/indra/newview/llhudicon.h @@ -71,6 +71,9 @@ public: static BOOL iconsNearby(); + BOOL getHidden() const { return mHidden; } + void setHidden( BOOL hide ) { mHidden = hide; } + protected: LLHUDIcon(const U8 type); ~LLHUDIcon(); @@ -84,6 +87,7 @@ private: F32 mDistance; S32 mPickID; F32 mScale; + BOOL mHidden; typedef std::vector > icon_instance_t; static icon_instance_t sIconInstances; diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp index 740cce0..fce52f1 100644 --- a/linden/indra/newview/llhudtext.cpp +++ b/linden/indra/newview/llhudtext.cpp @@ -93,7 +93,8 @@ LLHUDText::LLHUDText(const U8 type) : mOffsetY(0), mTextAlignment(ALIGN_TEXT_CENTER), mVertAlignment(ALIGN_VERT_CENTER), - mLOD(0) + mLOD(0), + mHidden(FALSE) { mColor = LLColor4(1.f, 1.f, 1.f, 1.f); mDoFade = TRUE; @@ -133,7 +134,7 @@ void LLHUDText::renderForSelect() void LLHUDText::renderText(BOOL for_select) { - if (!mVisible) + if (!mVisible || mHidden) { return; } diff --git a/linden/indra/newview/llhudtext.h b/linden/indra/newview/llhudtext.h index 033702b..bd6988b 100644 --- a/linden/indra/newview/llhudtext.h +++ b/linden/indra/newview/llhudtext.h @@ -115,8 +115,9 @@ public: void setUseBubble(BOOL use_bubble) { mUseBubble = use_bubble; } S32 getLOD() { return mLOD; } BOOL getVisible() { return mVisible; } + BOOL getHidden() const { return mHidden; } + void setHidden( BOOL hide ) { mHidden = hide; } void setOnHUDAttachment(BOOL on_hud) { mOnHUDAttachment = on_hud; } - static void renderAllHUD(); static void addPickable(std::set &pick_list); static void reshape(); @@ -164,6 +165,7 @@ private: ETextAlignment mTextAlignment; EVertAlignment mVertAlignment; S32 mLOD; + BOOL mHidden; static std::set > sTextObjects; static std::vector > sVisibleTextObjects; diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index 3c89131..b74fff0 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp @@ -174,6 +174,8 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& name, mInputEditor(NULL), mHistoryEditor(NULL), mSessionUUID(session_id), + mSessionInitRequested(FALSE), + mSessionInitialized(FALSE), mOtherParticipantUUID(other_participant_id), mDialog(dialog), mTyping(FALSE), @@ -181,9 +183,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& name, mTypingLineStartIndex(0), mSentTypingState(TRUE), mFirstKeystrokeTimer(), - mLastKeystrokeTimer(), - mSessionInitialized(FALSE), - mSessionInitRequested(FALSE) + mLastKeystrokeTimer() { init(session_label); } @@ -199,6 +199,8 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& name, mInputEditor(NULL), mHistoryEditor(NULL), mSessionUUID(session_id), + mSessionInitRequested(FALSE), + mSessionInitialized(FALSE), mOtherParticipantUUID(other_participant_id), mDialog(dialog), mTyping(FALSE), @@ -206,9 +208,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& name, mTypingLineStartIndex(0), mSentTypingState(TRUE), mFirstKeystrokeTimer(), - mLastKeystrokeTimer(), - mSessionInitialized(FALSE), - mSessionInitRequested(FALSE) + mLastKeystrokeTimer() { mSessionInitialTargetIDs = ids; init(session_label); @@ -427,7 +427,11 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 if (log_to_file && gSavedPerAccountSettings.getBOOL("LogInstantMessages") ) { - LLString histstr = timestring + utf8msg; + LLString histstr; + if (gSavedPerAccountSettings.getBOOL("IMLogTimestamp")) + histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + utf8msg; + else + histstr = utf8msg; LLLogChat::saveHistory(getTitle(),histstr); } diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp index 900a729..af4e16b 100644 --- a/linden/indra/newview/llinventoryactions.cpp +++ b/linden/indra/newview/llinventoryactions.cpp @@ -324,16 +324,18 @@ void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, LLString type, LL { if ("category" == type) { + LLUUID category; if (self) { - model->createNewCategory(self->getUUID(), LLAssetType::AT_NONE, NULL); + category = model->createNewCategory(self->getUUID(), LLAssetType::AT_NONE, NULL); } else { - model->createNewCategory(gAgent.getInventoryRootID(), + category = model->createNewCategory(gAgent.getInventoryRootID(), LLAssetType::AT_NONE, NULL); } model->notifyObservers(); + ptr->setSelection(category, TRUE); } else if ("lsl" == type) { @@ -427,6 +429,8 @@ void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, LLString type, LL LLUUID parent_id = self ? self->getUUID() : gInventory.findCategoryUUIDForType(LLAssetType::AT_BODYPART); LLFolderBridge::createWearable(parent_id, WT_EYES); } + + ptr->getRootFolder()->setNeedsAutoRename(TRUE); } class LLDoCreate : public inventory_panel_listener_t diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 0d5c30e..27be9f6 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp @@ -822,7 +822,7 @@ LLString LLItemBridge::getLabelSuffix() const if(item) { // it's a bit confusing to put nocopy/nomod/etc on calling cards. - if( LLAssetType::AT_CALLINGCARD != item->getType() + if(LLAssetType::AT_CALLINGCARD != item->getType() && item->getPermissions().getOwner() == gAgent.getID()) { BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); @@ -834,32 +834,14 @@ LLString LLItemBridge::getLabelSuffix() const const char* NO_MOD = " (no modify)"; const char* NO_XFER = " (no transfer)"; const char* scopy; - if(copy) - { - scopy = EMPTY; - } - else - { - scopy = NO_COPY; - }; + if(copy) scopy = EMPTY; + else scopy = NO_COPY; const char* smod; - if(mod) - { - smod = EMPTY; - } - else - { - smod = NO_MOD; - }; + if(mod) smod = EMPTY; + else smod = NO_MOD; const char* sxfer; - if(xfer) - { - sxfer = EMPTY; - } - else - { - sxfer = NO_XFER; - }; + if(xfer) sxfer = EMPTY; + else sxfer = NO_XFER; char buffer[MAX_STRING]; /*Flawfinder: ignore*/ snprintf( /* Flawfinder: ignore */ buffer, diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index bb70ea4..8ac5f21 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp @@ -64,6 +64,7 @@ #include "llpreviewtexture.h" #include "llresmgr.h" #include "llscrollcontainer.h" +#include "llscrollbar.h" #include "llimview.h" #include "lltooldraganddrop.h" #include "llviewerimagelist.h" @@ -78,6 +79,8 @@ #include "llvieweruictrlfactory.h" #include "llselectmgr.h" +#include "llsdserialize.h" + LLDynamicArray LLInventoryView::sActiveViews; //BOOL LLInventoryView::sOpenNextNewItem = FALSE; @@ -464,6 +467,9 @@ void LLInventoryView::init(LLInventoryModel* inventory) gUICtrlFactory->buildFloater(this, "floater_inventory.xml", NULL); + mFilterTabs = (LLTabContainer*)LLUICtrlFactory::getTabContainerByName(this, "inventory filter tabs"); + + // Set up the default inv. panel/filter settings. mActivePanel = (LLInventoryPanel*)getCtrlByNameAndType("All Items", WIDGET_TYPE_INVENTORY_PANEL); if (mActivePanel) { @@ -471,6 +477,7 @@ void LLInventoryView::init(LLInventoryModel* inventory) mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder")); mActivePanel->getFilter()->markDefault(); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); + mActivePanel->setSelectCallback(onSelectionChange, mActivePanel); } LLInventoryPanel* recent_items_panel = (LLInventoryPanel*)getCtrlByNameAndType("Recent Items", WIDGET_TYPE_INVENTORY_PANEL); if (recent_items_panel) @@ -479,7 +486,29 @@ void LLInventoryView::init(LLInventoryModel* inventory) recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); recent_items_panel->getFilter()->markDefault(); - } + recent_items_panel->setSelectCallback(onSelectionChange, recent_items_panel); + } + + // Now load the stored settings from disk, if available. + std::ostringstream filterSaveName; + filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); + llinfos << "LLInventoryView::init: reading from " << filterSaveName << llendl; + llifstream file(filterSaveName.str().c_str()); + LLSD savedFilterState; + if (file.is_open()) + { + LLSDSerialize::fromXML(savedFilterState, file); + file.close(); + + // Load the persistent "Recent Items" settings. + // Note that the "All Items" settings do not persist. + if(savedFilterState.has(recent_items_panel->getFilter()->getName())) + { + LLSD recent_items = savedFilterState.get(recent_items_panel->getFilter()->getName()); + recent_items_panel->getFilter()->fromLLSD(recent_items); + } + } + mSearchEditor = (LLSearchEditor*)getCtrlByNameAndType("inventory search editor", WIDGET_TYPE_SEARCH_EDITOR); if (mSearchEditor) @@ -504,6 +533,36 @@ BOOL LLInventoryView::postBuild() // Destroys the object LLInventoryView::~LLInventoryView( void ) { + // Save the filters state. + LLSD filterRoot; + LLInventoryPanel* all_items_panel = (LLInventoryPanel*)getCtrlByNameAndType("All Items", WIDGET_TYPE_INVENTORY_PANEL); + if (all_items_panel) + { + LLInventoryFilter* filter = all_items_panel->getFilter(); + LLSD filterState; + filter->toLLSD(filterState); + filterRoot[filter->getName()] = filterState; + } + + LLInventoryPanel* recent_items_panel = (LLInventoryPanel*)getCtrlByNameAndType("Recent Items", WIDGET_TYPE_INVENTORY_PANEL); + if (recent_items_panel) + { + LLInventoryFilter* filter = recent_items_panel->getFilter(); + LLSD filterState; + filter->toLLSD(filterState); + filterRoot[filter->getName()] = filterState; + } + + std::ostringstream filterSaveName; + filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); + llofstream filtersFile(filterSaveName.str().c_str()); + if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile)) + { + llwarns << "Could not write to filters save file " << filterSaveName << llendl; + } + else + filtersFile.close(); + sActiveViews.removeObj(this); gInventory.removeObserver(this); delete mSavedFolderState; @@ -630,7 +689,9 @@ void LLInventoryView::onClose(bool app_quitting) mSavedFolderState->setApply(FALSE); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); } - onClearSearch(this); + + // onClearSearch(this); + // pass up LLFloater::setVisible(FALSE); } @@ -930,6 +991,7 @@ void LLInventoryView::onFilterSelected(void* userdata, bool from_click) LLInventoryViewFinder *finder = self->getFinder(); // Find my index self->mActivePanel = (LLInventoryPanel*)self->childGetVisibleTab("inventory filter tabs"); + if (!self->mActivePanel) { return; @@ -947,6 +1009,42 @@ void LLInventoryView::onFilterSelected(void* userdata, bool from_click) self->setFilterTextFromFilter(); } +// static +void LLInventoryView::onSelectionChange(const std::deque &items, BOOL user_action, void* data) +{ + LLInventoryPanel* panel = (LLInventoryPanel*)data; + LLFolderView* fv = panel->getRootFolder(); + if (fv->needsAutoRename()) // auto-selecting a new user-created asset and preparing to rename + { + fv->setNeedsAutoRename(FALSE); + if (items.size()) // new asset is visible and selected + { + fv->startRenamingSelectedItem(); + } + } +} + +BOOL LLInventoryView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + LLString& tooltip_msg) +{ + // Check to see if we are auto scrolling from the last frame + LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel(); + BOOL needsToScroll = panel->getScrollableContainer()->needsToScroll(x, y, LLScrollableContainerView::VERTICAL); + if(mFilterTabs) + { + if(needsToScroll) + { + mFilterTabs->setDragAndDropDelayTimer(); + } + } + + BOOL handled = LLFloater::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + + return handled; +} LLUUID get_item_icon_uuid(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type, U32 attachment_point, @@ -1142,6 +1240,7 @@ BOOL LLInventoryPanel::postBuild() } mFolders->setSortOrder(mFolders->getFilter()->getSortOrder()); + return TRUE; } @@ -1302,6 +1401,14 @@ void LLInventoryPanel::modelChanged(U32 mask) llwarns << *id_it << " is in model but not in view, but ADD flag not set" << llendl; } buildNewViews(*id_it); + + // select any newly created object + // that has the auto rename at top of folder + // root set + if(mFolders->getRoot()->needsAutoRename()) + { + setSelection(*id_it, FALSE); + } } else { @@ -1526,6 +1633,7 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* accept, LLString& tooltip_msg) { + BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); if (handled) @@ -1586,6 +1694,7 @@ void LLInventoryPanel::createNewItem(const char* name, create_inventory_item(gAgent.getID(), gAgent.getSessionID(), parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, NOT_WEARABLE, next_owner_perm, cb); + } // static DEBUG ONLY: diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index 536370b..cba1d16 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h @@ -119,6 +119,7 @@ public: // This method is called when something has changed about the inventory. void modelChanged(U32 mask); LLFolderView* getRootFolder() { return mFolders; } + LLScrollableContainerView* getScrollableContainer() { return mScroller; } // DEBUG ONLY: static void dumpSelectionInformation(void* user_data); @@ -223,6 +224,13 @@ public: virtual void draw(); virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + LLString& tooltip_msg); + + LLInventoryPanel* getPanel() { return mActivePanel; } LLInventoryPanel* getActivePanel() { return mActivePanel; } @@ -233,6 +241,7 @@ public: static void onSearchEdit(const LLString& search_string, void* user_data ); //static void onSearchCommit(LLUICtrl* caller, void* user_data ); static void onFilterSelected(void* userdata, bool from_click); + static void onSelectionChange(const std::deque &items, BOOL user_action, void* data); static BOOL incrementalFind(LLFolderViewItem* first_item, const char* find_text, BOOL backward); const LLString getFilterSubString() { return mActivePanel->getFilterSubString(); } diff --git a/linden/indra/newview/lllogchat.cpp b/linden/indra/newview/lllogchat.cpp index aaa19ea..ec9b9f5 100644 --- a/linden/indra/newview/lllogchat.cpp +++ b/linden/indra/newview/lllogchat.cpp @@ -29,18 +29,40 @@ #include "llviewerprecompiledheaders.h" #include "lllogchat.h" - +#include "viewer.h" + const S32 LOG_RECALL_SIZE = 2048; //static LLString LLLogChat::makeLogFileName(LLString filename) { - filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename.c_str()); filename += ".txt"; return filename; } +LLString LLLogChat::timestamp(bool withdate) +{ + U32 utc_time; + utc_time = time_corrected(); + + // There's only one internal tm buffer. + struct tm* timep; + + // Convert to Pacific, based on server's opinion of whether + // it's daylight savings time there. + timep = utc_to_pacific_time(utc_time, gPacificDaylightTime); + + LLString text; + if (withdate) + text = llformat("[%d/%02d/%02d %d:%02d] ", (timep->tm_year-100)+2000, timep->tm_mon+1, timep->tm_mday, timep->tm_hour, timep->tm_min); + else + text = llformat("[%d:%02d] ", timep->tm_hour, timep->tm_min); + + return text; +} + + //static void LLLogChat::saveHistory(LLString filename, LLString line) { diff --git a/linden/indra/newview/lllogchat.h b/linden/indra/newview/lllogchat.h index 56ea04b..c82f04e 100644 --- a/linden/indra/newview/lllogchat.h +++ b/linden/indra/newview/lllogchat.h @@ -33,6 +33,7 @@ class LLLogChat { public: + static LLString timestamp(bool withdate = false); static LLString makeLogFileName(LLString(filename)); static void saveHistory(LLString filename, LLString line); static void loadHistory(LLString filename, void (*callback)(LLString,void*),void* userdata); diff --git a/linden/indra/newview/llmanip.cpp b/linden/indra/newview/llmanip.cpp index 1db0a6c..3d27256 100644 --- a/linden/indra/newview/llmanip.cpp +++ b/linden/indra/newview/llmanip.cpp @@ -560,7 +560,7 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const char* suffi LLGLEnable tex(GL_TEXTURE_2D); if (fractional_portion != 0) { - snprintf(fraction_string, sizeof(fraction_string), "%c%d%s", gResMgr->getDecimalPoint(), fractional_portion, suffix); /* Flawfinder: ignore */ + snprintf(fraction_string, sizeof(fraction_string), "%c%02d%s", gResMgr->getDecimalPoint(), fractional_portion, suffix); /* Flawfinder: ignore */ gViewerWindow->setupViewport(1, -1); hud_render_utf8text(val_string, render_pos, *big_fontp, LLFontGL::NORMAL, -1.f * big_fontp->getWidthF32(val_string), 3.f, shadow_color, hud_selection); diff --git a/linden/indra/newview/llmaniprotate.cpp b/linden/indra/newview/llmaniprotate.cpp index aaab416..940e78a 100644 --- a/linden/indra/newview/llmaniprotate.cpp +++ b/linden/indra/newview/llmaniprotate.cpp @@ -381,7 +381,7 @@ BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) objectp; objectp = mObjectSelection->getNextObject()) { - can_rotate = can_rotate && objectp->permMove() && (objectp->permModify() || gSavedSettings.getBOOL("SelectLinkedSet")); + can_rotate = can_rotate && objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); } if (!can_rotate) diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp index 648be34..c130824 100644 --- a/linden/indra/newview/llmanipscale.cpp +++ b/linden/indra/newview/llmanipscale.cpp @@ -1222,7 +1222,7 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat mLastUpdateFlags = update_flags; // enforce minimum update delay and don't stream updates on sub-object selections - if( elapsed_time > UPDATE_DELAY && gSavedSettings.getBOOL("SelectLinkedSet") ) + if( elapsed_time > UPDATE_DELAY && !gSavedSettings.getBOOL("EditLinkedParts") ) { gSelectMgr->sendMultipleUpdate( update_flags ); update_timer.reset(); diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index 0bdfbb3..a7312fc 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp @@ -298,7 +298,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) objectp; objectp = mObjectSelection->getNextObject()) { - can_move = can_move && objectp->permMove() && (objectp->permModify() || gSavedSettings.getBOOL("SelectLinkedSet")); + can_move = can_move && objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); } if (!can_move) diff --git a/linden/indra/newview/llmapresponders.cpp b/linden/indra/newview/llmapresponders.cpp index ddf5701..9d84064 100644 --- a/linden/indra/newview/llmapresponders.cpp +++ b/linden/indra/newview/llmapresponders.cpp @@ -1,5 +1,5 @@ /** - * @file llmapresponders.h + * @file llmapresponders.cpp * @brief Processes responses received for map requests. * * Copyright (c) 2006-2007, Linden Research, Inc. diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp index c2ca740..bca9080 100644 --- a/linden/indra/newview/llmutelist.cpp +++ b/linden/indra/newview/llmutelist.cpp @@ -376,8 +376,10 @@ BOOL LLMuteList::loadFromFile(const LLString& filename) id_buffer[0] = '\0'; name_buffer[0] = '\0'; S32 type = 0; + U32 flags = 0; sscanf( /* Flawfinder: ignore */ - buffer, " %d %254s %254[^|]", &type, id_buffer, name_buffer); + buffer, " %d %254s %254[^|]| %u\n", &type, id_buffer, name_buffer, + &flags); LLUUID id = LLUUID(id_buffer); LLMute mute(id, name_buffer, (LLMute::EType)type); if (mute.mID.isNull() diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index e2626b4..7822d00 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp @@ -71,6 +71,16 @@ void LLNotifyBox::showXml( const LLString& xml_desc, notify_callback_t callback, return showXml(xml_desc, LLString::format_map_t(), callback, user_data); } + +//static +void LLNotifyBox::showXml( const LLString& xml_desc, const LLString::format_map_t& args, BOOL is_caution, + notify_callback_t callback, void *user_data) +{ + // for script permission prompts + LLNotifyBox* notify = new LLNotifyBox(xml_desc, args, callback, user_data, is_caution); + gNotifyBoxView->addChild(notify); +} + //static void LLNotifyBox::showXml( const LLString& xml_desc, const LLString::format_map_t& args, notify_callback_t callback, void *user_data) @@ -85,7 +95,7 @@ void LLNotifyBox::showXml( const LLString& xml_desc, const LLString::format_map_ const option_list_t& options, BOOL layout_script_dialog) { - LLNotifyBox* notify = new LLNotifyBox(xml_desc, args, callback, user_data, options, layout_script_dialog); + LLNotifyBox* notify = new LLNotifyBox(xml_desc, args, callback, user_data, FALSE, options, layout_script_dialog); gNotifyBoxView->addChild(notify); } @@ -99,7 +109,7 @@ void LLNotifyBox::cleanup() //--------------------------------------------------------------------------- LLNotifyBox::LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& args, - notify_callback_t callback, void* user_data, + notify_callback_t callback, void* user_data, BOOL is_caution, const option_list_t& extra_options, BOOL layout_script_dialog) : LLPanel("notify", LLRect(), BORDER_NO), @@ -152,9 +162,19 @@ LLNotifyBox::LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& options.insert(options.end(), extra_options.begin(), extra_options.end()); // initialize - + mIsTip = xml_template->mIsTip; mIsFocusRoot = !mIsTip; + + // caution flag can be set explicitly by specifying it in the + // call to the c'tor, or it can be set implicitly if the + // notify xml template specifies that it is a caution + // + // (but a tip-style notification cannot be a caution notification, + // since the rendering of the additional top textbox doesn't + // account for the special layout of a tip notification) + mIsCaution = ((xml_template->mIsCaution | is_caution) && (!mIsTip)); + mAnimating = TRUE; mCallback = callback; mData = user_data; @@ -162,7 +182,7 @@ LLNotifyBox::LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& mDefaultOption = xml_template->mDefaultOption; LLRect rect = mIsTip ? getNotifyTipRect(message) - : getNotifyRect(mNumOptions, layout_script_dialog); + : getNotifyRect(mNumOptions, layout_script_dialog, mIsCaution); setRect(rect); setFollows(mIsTip ? (FOLLOWS_BOTTOM|FOLLOWS_RIGHT) : (FOLLOWS_TOP|FOLLOWS_RIGHT)); setBackgroundVisible(FALSE); @@ -171,18 +191,57 @@ LLNotifyBox::LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& LLIconCtrl* icon; LLTextEditor* text; - S32 x = HPAD + HPAD; const S32 TOP = mRect.getHeight() - (mIsTip ? (S32)sFont->getLineHeight() : 32); const S32 BOTTOM = (S32)sFont->getLineHeight(); + S32 x = HPAD + HPAD; + S32 y = TOP; + + if (mIsTip) + { + // use the tip notification icon + icon = new LLIconCtrl("icon", LLRect(x, y, x+32, TOP-32), "notify_tip_icon.tga"); + } + else if (mIsCaution) + { + // use the caution notification icon + icon = new LLIconCtrl("icon", LLRect(x, y, x+32, TOP-32), "notify_caution_icon.tga"); + } + else + { + // use the default notification icon + icon = new LLIconCtrl("icon", LLRect(x, y, x+32, TOP-32), "notify_box_icon.tga"); + } - icon = new LLIconCtrl("icon", - LLRect(x, TOP, x+32, TOP-32), - mIsTip ? "notify_tip_icon.tga" : "notify_box_icon.tga"); icon->setMouseOpaque(FALSE); addChild(icon); x += HPAD + HPAD + 32; + // add a caution textbox at the top of a caution notification + LLTextBox* caution_box = NULL; + if (mIsCaution) + { + S32 caution_height = ((S32)sFont->getLineHeight() * 2) + VPAD; + caution_box = new LLTextBox( + "caution_box", + LLRect(x, y, mRect.getWidth() - 2, caution_height), + "", + sFont, + FALSE); + + caution_box->setFontStyle(LLFontGL::BOLD); + caution_box->setColor(gColors.getColor("NotifyCautionWarnColor")); + caution_box->setBackgroundColor(gColors.getColor("NotifyCautionBoxColor")); + caution_box->setBorderVisible(FALSE); + caution_box->setWrappedText(LLNotifyBox::getTemplateMessage("ScriptQuestionCautionWarn")); + + addChild(caution_box); + + // adjust the vertical position of the next control so that + // it appears below the caution textbox + y = y - caution_height; + } + const S32 BOTTOM_PAD = VPAD * 3; const S32 BTN_TOP = BOTTOM_PAD + (((mNumOptions-1+2)/3)) * (BTN_HEIGHT+VPAD); @@ -194,7 +253,7 @@ LLNotifyBox::LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& DB_INV_ITEM_NAME_BUF_SIZE; // For script dialogs: add space for title. text = new LLTextEditor("box", - LLRect(x, TOP, mRect.getWidth()-2, mIsTip ? BOTTOM : BTN_TOP+16), + LLRect(x, y, mRect.getWidth()-2, mIsTip ? BOTTOM : BTN_TOP+16), MAX_LENGTH, message, sFont, @@ -235,7 +294,9 @@ LLNotifyBox::LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& addChild(btn); mNextBtn = btn; - S32 btn_width = 90; + // make caution notification buttons slightly narrower + // so that 3 of them can fit without overlapping the "next" button + S32 btn_width = mIsCaution? 84 : 90; LLRect btn_rect; for (S32 i = 0; i < mNumOptions; i++) @@ -271,6 +332,13 @@ LLNotifyBox::LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& btn = new LLButton(options[i], btn_rect, "", onClickButton, userdata); btn->setFont(font); + + if (mIsCaution) + { + btn->setImageColor(LLUI::sColorsGroup->getColor("ButtonCautionImageColor")); + btn->setDisabledImageColor(LLUI::sColorsGroup->getColor("ButtonCautionImageColor")); + } + addChild(btn, -1); if (i == mDefaultOption) @@ -374,7 +442,8 @@ void LLNotifyBox::drawBackground() const { LLGLSTexture texture_enabled; LLViewerImage::bindTexture(imagep); - LLColor4 color = gColors.getColor("NotifyBoxColor"); + // set proper background color depending on whether notify box is a caution or not + LLColor4 color = mIsCaution? gColors.getColor("NotifyCautionBoxColor") : gColors.getColor("NotifyBoxColor"); if(gFocusMgr.childHasKeyboardFocus( this )) { const S32 focus_width = 2; @@ -387,7 +456,12 @@ void LLNotifyBox::drawBackground() const color = gColors.getColor("ColorDropShadow"); glColor4fv(color.mV); gl_segmented_rect_2d_tex(0, mRect.getHeight(), mRect.getWidth(), 0, imagep->getWidth(), imagep->getHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); - color = gColors.getColor("NotifyBoxColor"); + + if( mIsCaution ) + color = gColors.getColor("NotifyCautionBoxColor"); + else + color = gColors.getColor("NotifyBoxColor"); + glColor4fv(color.mV); gl_segmented_rect_2d_tex(1, mRect.getHeight()-1, mRect.getWidth()-1, 1, imagep->getWidth(), imagep->getHeight(), 16, mIsTip ? ROUNDED_RECT_TOP : ROUNDED_RECT_BOTTOM); } @@ -467,9 +541,17 @@ void LLNotifyBox::moveToBack() // static -LLRect LLNotifyBox::getNotifyRect(S32 num_options, BOOL layout_script_dialog) +LLRect LLNotifyBox::getNotifyRect(S32 num_options, BOOL layout_script_dialog, BOOL is_caution) { S32 notify_height = gSavedSettings.getS32("NotifyBoxHeight"); + if (is_caution) + { + // make caution-style dialog taller to accomodate extra text, + // as well as causing the accept/decline buttons to be drawn + // in a different position, to help prevent "quick-click-through" + // of many permissions prompts + notify_height = gSavedSettings.getS32("PermissionsCautionNotifyBoxHeight"); + } const S32 NOTIFY_WIDTH = gSavedSettings.getS32("NotifyBoxWidth"); const S32 TOP = gNotifyBoxView->getRect().getHeight(); @@ -588,6 +670,17 @@ void LLNotifyBox::onClickButton(void* data) LLNotifyBox* self = self_and_button->mSelf; S32 button = self_and_button->mButton; + // for caution notifications, check if the last button in the prompt was clicked + // unless it is the only button, in which case it will just be an "OK" button + if ((self->mIsCaution) && (button > 0) && (button == (self->mNumOptions - 1))) + { + // show an alert dialog containing more explanation about the debit permission + LLAlertDialog::showXml("DebitPermissionDetails"); + + // keep this notification open + return; + } + if (self->mCallback) { self->mCallback(button, self->mData); @@ -620,6 +713,20 @@ const LLString& LLNotifyBox::getTemplateMessage(const LLString& xml_desc) } } +// method to check whether a given notify template show as a caution or not +BOOL LLNotifyBox::getTemplateIsCaution(const LLString& xml_desc) +{ + BOOL is_caution = FALSE; + + template_map_t::iterator iter = sNotifyTemplates.find(xml_desc); + if (iter != sNotifyTemplates.end()) + { + is_caution = iter->second->mIsCaution; + } + + return is_caution; +} + //static bool LLNotifyBox::parseNotify(const LLString& xml_filename) { @@ -660,6 +767,18 @@ bool LLNotifyBox::parseNotify(const LLString& xml_filename) { xml_template->mIsTip = tip; } + + // parse a bool attribute named "caution" to determine + // whether this notification gets cautionary special handling + BOOL caution = FALSE; + if (notify->getAttributeBOOL("caution", caution)) + { + if (xml_template) + { + xml_template->mIsCaution = caution; + } + } + S32 btn_idx = 0; for (LLXMLNode* child = notify->getFirstChild(); diff --git a/linden/indra/newview/llnotify.h b/linden/indra/newview/llnotify.h index 8136cfc..eec27ec 100644 --- a/linden/indra/newview/llnotify.h +++ b/linden/indra/newview/llnotify.h @@ -46,7 +46,8 @@ public: static void showXml( const LLString& xml_desc, notify_callback_t callback = NULL, void *user_data = NULL); - + static void showXml( const LLString& xml_desc, const LLString::format_map_t& args, BOOL is_caution, + notify_callback_t callback = NULL, void *user_data = NULL); static void showXml( const LLString& xml_desc, const LLString::format_map_t& args, notify_callback_t callback = NULL, void *user_data = NULL); // For script notifications: @@ -57,8 +58,10 @@ public: static bool parseNotify(const LLString& xml_filename); static const LLString& getTemplateMessage(const LLString& xml_desc); + static BOOL getTemplateIsCaution(const LLString& xml_desc); BOOL isTip() const { return mIsTip; } + BOOL isCaution() const { return mIsCaution; } /*virtual*/ void setVisible(BOOL visible); notify_callback_t getNotifyCallback() { return mCallback; } @@ -69,6 +72,7 @@ public: protected: LLNotifyBox(const LLString& xml_desc, const LLString::format_map_t& args, notify_callback_t callback, void* user_data, + BOOL is_caution = FALSE, const option_list_t& extra_options = option_list_t(), BOOL layout_script_dialog = FALSE); /*virtual*/ ~LLNotifyBox(); @@ -86,7 +90,7 @@ protected: // Returns the rect, relative to gNotifyView, where this // notify box should be placed. - static LLRect getNotifyRect(S32 num_options, BOOL layout_script_dialog); + static LLRect getNotifyRect(S32 num_options, BOOL layout_script_dialog, BOOL is_caution); static LLRect getNotifyTipRect(const LLString &message); // internal handler for button being clicked @@ -102,6 +106,7 @@ private: protected: BOOL mIsTip; + BOOL mIsCaution; // is this a caution notification? BOOL mAnimating; // Are we sliding onscreen? // Time since this notification was displayed. @@ -149,7 +154,7 @@ extern LLNotifyBoxView* gNotifyBoxView; class LLNotifyBoxTemplate : public LLRefCount { public: - LLNotifyBoxTemplate() : mIsTip(FALSE), mDefaultOption(0) {} + LLNotifyBoxTemplate() : mIsTip(FALSE), mIsCaution(FALSE), mDefaultOption(0) {} void setMessage(const LLString& message) { @@ -169,6 +174,7 @@ public: LLString mLabel; // Handle for access from code, etc LLString mMessage; // Message to display BOOL mIsTip; + BOOL mIsCaution; LLNotifyBox::option_list_t mOptions; S32 mDefaultOption; }; diff --git a/linden/indra/newview/llpaneldirbrowser.cpp b/linden/indra/newview/llpaneldirbrowser.cpp index b65480b..52bd0f7 100644 --- a/linden/indra/newview/llpaneldirbrowser.cpp +++ b/linden/indra/newview/llpaneldirbrowser.cpp @@ -128,8 +128,11 @@ void LLPanelDirBrowser::draw() LLCtrlListInterface *list = childGetListInterface("results"); if (list) { - list->selectFirstItem(); // select first item by default - childSetFocus("results", TRUE); + if (list->getCanSelect()) + { + list->selectFirstItem(); // select first item by default + childSetFocus("results", TRUE); + } // Request specific data from the server onCommitList(NULL, this); } diff --git a/linden/indra/newview/llpaneldirclassified.cpp b/linden/indra/newview/llpaneldirclassified.cpp index 8b4a49d..276b608 100644 --- a/linden/indra/newview/llpaneldirclassified.cpp +++ b/linden/indra/newview/llpaneldirclassified.cpp @@ -55,6 +55,7 @@ #include "llpaneldirbrowser.h" #include "lltextbox.h" #include "llviewermessage.h" +#include "llvieweruictrlfactory.h" #include "llworldmap.h" // @@ -85,7 +86,8 @@ BOOL LLPanelDirClassified::postBuild() childSetKeystrokeCallback("name", onKeystrokeNameClassified, this); childSetAction("Search", onClickSearchCore, this); - setDefaultBtn( "Search" ); + childSetAction("Browse", onClickSearchCore, this); + setDefaultBtn( "Browse" ); childSetAction("Place an Ad...", onClickCreateNewClassified, this); @@ -186,6 +188,7 @@ void LLPanelDirClassified::performQuery() void LLPanelDirClassified::onKeystrokeNameClassified(LLLineEditor* line, void* data) { LLPanelDirClassified *self = (LLPanelDirClassified*)data; + S32 len = line->getLength(); if (len == 0 || len >= 3) @@ -199,4 +202,17 @@ void LLPanelDirClassified::onKeystrokeNameClassified(LLLineEditor* line, void* d self->setDefaultBtn(); self->childDisable("Search"); } + + // Change the Browse to Search or vice versa + if (len > 0) + { + self->childSetVisible("Search", TRUE); + self->childSetVisible("Browse", FALSE); + } + else + { + self->setDefaultBtn( "Browse" ); + self->childSetVisible("Search", FALSE); + self->childSetVisible("Browse", TRUE); + } } diff --git a/linden/indra/newview/llpanelgroupvoting.cpp b/linden/indra/newview/llpanelgroupvoting.cpp index 8b8cd76..e21af7a 100644 --- a/linden/indra/newview/llpanelgroupvoting.cpp +++ b/linden/indra/newview/llpanelgroupvoting.cpp @@ -1,5 +1,5 @@ /** - * @file llpanelgroupvoting.h + * @file llpanelgroupvoting.cpp * @brief LLPanelGroupVoting class definition. * * Copyright (c) 2003-2007, Linden Research, Inc. diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 13cee05..13f07c0 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp @@ -223,39 +223,38 @@ void LLTaskInvFVBridge::buyItem() { gViewerWindow->alertXml("Cannot_Purchase_an_Attachment"); llinfos << "Attempt to purchase an attachment" << llendl; + delete inv; } else { - - - LLString::format_map_t args; - args["[PRICE]"] = llformat("%d",sale_info.getSalePrice()); - args["[OWNER]"] = owner_name; - if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS) - { - U32 next_owner_mask = perm.getMaskNextOwner(); - args["[MODIFYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo"); - args["[COPYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo"); - args["[RESELLPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo"); - } - - LLString alertdesc; - switch(sale_info.getSaleType()) - { - case LLSaleInfo::FS_ORIGINAL: - alertdesc = owner_name.empty() ? "BuyOriginalNoOwner" : "BuyOriginal"; - break; - case LLSaleInfo::FS_COPY: - default: - alertdesc = owner_name.empty() ? "BuyCopyNoOwner" : "BuyCopy"; - break; - case LLSaleInfo::FS_CONTENTS: - alertdesc = owner_name.empty() ? "BuyContentsNoOwner" : "BuyContents"; - break; - } - - gViewerWindow->alertXml(alertdesc, args, LLTaskInvFVBridge::commitBuyItem, (void*)inv); + LLString::format_map_t args; + args["[PRICE]"] = llformat("%d",sale_info.getSalePrice()); + args["[OWNER]"] = owner_name; + if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS) + { + U32 next_owner_mask = perm.getMaskNextOwner(); + args["[MODIFYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo"); + args["[COPYPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo"); + args["[RESELLPERM]"] = LLAlertDialog::getTemplateMessage((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo"); } + + LLString alertdesc; + switch(sale_info.getSaleType()) + { + case LLSaleInfo::FS_ORIGINAL: + alertdesc = owner_name.empty() ? "BuyOriginalNoOwner" : "BuyOriginal"; + break; + case LLSaleInfo::FS_CONTENTS: + alertdesc = owner_name.empty() ? "BuyContentsNoOwner" : "BuyContents"; + break; + case LLSaleInfo::FS_COPY: + default: + alertdesc = owner_name.empty() ? "BuyCopyNoOwner" : "BuyCopy"; + break; + } + + gViewerWindow->alertXml(alertdesc, args, LLTaskInvFVBridge::commitBuyItem, (void*)inv); + } } S32 LLTaskInvFVBridge::getPrice() diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp index 3a8729c..a758800 100644 --- a/linden/indra/newview/llpanelmsgs.cpp +++ b/linden/indra/newview/llpanelmsgs.cpp @@ -34,6 +34,7 @@ #include "llviewerwindow.h" #include "llviewercontrol.h" #include "llvieweruictrlfactory.h" +#include "llfirstuse.h" class LLPopupData { @@ -68,6 +69,7 @@ BOOL LLPanelMsgs::postBuild() mEnabledPopups = LLViewerUICtrlFactory::getScrollListByName(this, "enabled_popups"); childSetAction("enable_popup", onClickEnablePopup, this); childSetAction("reset_dialogs_btn", onClickResetDialogs, this); + childSetAction("skip_dialogs_btn", onClickSkipDialogs, this); buildLists(); sPopupData.mAutoAcceptNewInventory = gSavedSettings.getBOOL("AutoAcceptNewInventory"); @@ -163,6 +165,27 @@ void LLPanelMsgs::cancel() gSavedSettings.setBOOL("AutoAcceptNewInventory", sPopupData.mAutoAcceptNewInventory); } +void LLPanelMsgs::resetAllIgnored() +{ + for(LLAlertDialog::template_map_t::iterator iter = LLAlertDialog::sIgnorableTemplates.begin(); + iter != LLAlertDialog::sIgnorableTemplates.end(); ++iter) + { + LLAlertDialogTemplate* alert_temp = iter->second; + S32 ignore = alert_temp->getIgnore(); + if(ignore) + alert_temp->setIgnore(false); + } +} + +void LLPanelMsgs::setAllIgnored() +{ + for(LLAlertDialog::template_map_t::iterator iter = LLAlertDialog::sIgnorableTemplates.begin(); + iter != LLAlertDialog::sIgnorableTemplates.end(); ++iter) + { + LLAlertDialogTemplate* alert_temp = iter->second; + alert_temp->setIgnore(true); + } +} //static void LLPanelMsgs::onClickEnablePopup(void* user_data) @@ -188,10 +211,13 @@ void callback_reset_dialogs(S32 option, void* data) { if (0 == option) { - gSavedSettings.resetWarnings(); // resets all ignorable dialogs LLPanelMsgs* panelp = (LLPanelMsgs*)data; if ( panelp ) + { + panelp->resetAllIgnored(); + LLFirstUse::resetFirstUse(); panelp->buildLists(); + } } } @@ -200,3 +226,23 @@ void LLPanelMsgs::onClickResetDialogs(void* user_data) { gViewerWindow->alertXml("ResetShowNextTimeDialogs",callback_reset_dialogs,user_data); } + +void callback_skip_dialogs(S32 option, void* data) +{ + if (0 == option) + { + LLPanelMsgs* panelp = (LLPanelMsgs*)data; + if ( panelp ) + { + panelp->setAllIgnored(); + LLFirstUse::disableFirstUse(); + panelp->buildLists(); + } + } +} + +// static +void LLPanelMsgs::onClickSkipDialogs(void* user_data) +{ + gViewerWindow->alertXml("SkipShowNextTimeDialogs", callback_skip_dialogs, user_data); +} diff --git a/linden/indra/newview/llpanelmsgs.h b/linden/indra/newview/llpanelmsgs.h index 58b6b95..72fc26a 100644 --- a/linden/indra/newview/llpanelmsgs.h +++ b/linden/indra/newview/llpanelmsgs.h @@ -47,9 +47,13 @@ public: static void onClickEnablePopup(void* user_data); static void onClickResetDialogs(void* user_data); + static void onClickSkipDialogs(void* user_data); void buildLists(); + void resetAllIgnored(); + void setAllIgnored(); + protected: LLScrollListCtrl* mDisabledPopups; LLScrollListCtrl* mEnabledPopups; diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index ae1c213..3e7be68 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -67,6 +67,7 @@ #include "pipeline.h" #include "viewer.h" #include "llvieweruictrlfactory.h" +#include "llfirstuse.h" #include "lldrawpool.h" @@ -256,32 +257,36 @@ BOOL LLPanelObject::postBuild() // Sculpt mCtrlSculptTexture = LLUICtrlFactory::getTexturePickerByName(this,"sculpt texture control"); - mCtrlSculptTexture->setDefaultImageAssetID(LLUUID(SCULPT_DEFAULT_TEXTURE)); - mCtrlSculptTexture->setCommitCallback( LLPanelObject::onCommitSculpt ); - mCtrlSculptTexture->setOnCancelCallback( LLPanelObject::onCancelSculpt ); - mCtrlSculptTexture->setOnSelectCallback( LLPanelObject::onSelectSculpt ); - mCtrlSculptTexture->setDropCallback(LLPanelObject::onDropSculpt); - mCtrlSculptTexture->setCallbackUserData( this ); - // Don't allow (no copy) or (no transfer) textures to be selected during immediate mode - mCtrlSculptTexture->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); - // Allow any texture to be used during non-immediate mode. - mCtrlSculptTexture->setNonImmediateFilterPermMask(PERM_NONE); - LLAggregatePermissions texture_perms; - if (gSelectMgr->selectGetAggregateTexturePermissions(texture_perms)) - { - BOOL can_copy = - texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || - texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_ALL; - BOOL can_transfer = - texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_EMPTY || - texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_ALL; - mCtrlSculptTexture->setCanApplyImmediately(can_copy && can_transfer); - } - else - { - mCtrlSculptTexture->setCanApplyImmediately(FALSE); + if (mCtrlSculptTexture) + { + mCtrlSculptTexture->setDefaultImageAssetID(LLUUID(SCULPT_DEFAULT_TEXTURE)); + mCtrlSculptTexture->setCommitCallback( LLPanelObject::onCommitSculpt ); + mCtrlSculptTexture->setOnCancelCallback( LLPanelObject::onCancelSculpt ); + mCtrlSculptTexture->setOnSelectCallback( LLPanelObject::onSelectSculpt ); + mCtrlSculptTexture->setDropCallback(LLPanelObject::onDropSculpt); + mCtrlSculptTexture->setCallbackUserData( this ); + // Don't allow (no copy) or (no transfer) textures to be selected during immediate mode + mCtrlSculptTexture->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); + // Allow any texture to be used during non-immediate mode. + mCtrlSculptTexture->setNonImmediateFilterPermMask(PERM_NONE); + LLAggregatePermissions texture_perms; + if (gSelectMgr->selectGetAggregateTexturePermissions(texture_perms)) + { + BOOL can_copy = + texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || + texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_ALL; + BOOL can_transfer = + texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_EMPTY || + texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_ALL; + mCtrlSculptTexture->setCanApplyImmediately(can_copy && can_transfer); + } + else + { + mCtrlSculptTexture->setCanApplyImmediately(FALSE); + } } + // Start with everyone disabled clearCtrls(); @@ -347,9 +352,9 @@ void LLPanelObject::getState( ) } // can move or rotate only linked group with move permissions, or sub-object with move and modify perms - BOOL enable_move = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || gSavedSettings.getBOOL("SelectLinkedSet")); + BOOL enable_move = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); BOOL enable_scale = objectp->permMove() && objectp->permModify(); - BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || gSavedSettings.getBOOL("SelectLinkedSet")); + BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); LLVector3 vec; if (enable_move) @@ -638,6 +643,7 @@ void LLPanelObject::getState( ) if (objectp->getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) { selected_item = MI_SCULPT; + LLFirstUse::useSculptedPrim(); } @@ -1044,7 +1050,11 @@ void LLPanelObject::getState( ) { mTextureCtrl->setTentative(FALSE); mTextureCtrl->setEnabled(editable); - mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture()); + 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(); diff --git a/linden/indra/newview/llpolymesh.h b/linden/indra/newview/llpolymesh.h index f3022f5..9634dbf 100644 --- a/linden/indra/newview/llpolymesh.h +++ b/linden/indra/newview/llpolymesh.h @@ -360,7 +360,7 @@ protected: typedef LLAssocList LLPolyMeshSharedDataTable; static LLPolyMeshSharedDataTable sGlobalSharedMeshList; - LLVOAvatar* mAvatarp; + LLPointer mAvatarp; }; //----------------------------------------------------------------------------- @@ -426,7 +426,7 @@ protected: joint_vec_map_t mJointScales; joint_vec_map_t mJointOffsets; LLVector3 mDefaultVec; - LLVOAvatar* mAvatar; + LLPointer mAvatar; }; #endif // LL_LLPOLYMESH_H diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index 28434ec..70f7833 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp @@ -64,6 +64,7 @@ protected: LLColor4 mSystemChatColor; LLColor4 mAgentChatColor; LLColor4 mObjectChatColor; + LLColor4 mOwnerSayChatColor; LLColor4 mBGChatColor; LLColor4 mScriptErrorColor; LLColor4 mHTMLLinkColor; @@ -98,6 +99,7 @@ void LLPrefsChatImpl::refresh() mSystemChatColor = gSavedSettings.getColor4("SystemChatColor"); mAgentChatColor = gSavedSettings.getColor4("AgentChatColor"); mObjectChatColor = gSavedSettings.getColor4("ObjectChatColor"); + mOwnerSayChatColor = gSavedSettings.getColor4("llOwnerSayChatColor"); mBGChatColor = gSavedSettings.getColor4("BackgroundChatColor"); mScriptErrorColor = gSavedSettings.getColor4("ScriptErrorColor"); mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); @@ -119,6 +121,7 @@ void LLPrefsChatImpl::cancel() gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); gSavedSettings.setColor4("AgentChatColor", mAgentChatColor); gSavedSettings.setColor4("ObjectChatColor", mObjectChatColor); + gSavedSettings.setColor4("llOwnerSayChatColor", mOwnerSayChatColor); gSavedSettings.setColor4("BackgroundChatColor", mBGChatColor); gSavedSettings.setColor4("ScriptErrorColor", mScriptErrorColor); gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 8575113..738c340 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -68,6 +68,11 @@ protected: BOOL mLogChat; BOOL mLogShowHistory; BOOL mShowTimestamps; + BOOL mIMLogTimestamp; + BOOL mLogChatTimestamp; + BOOL mLogIMChat; + BOOL mLogTimestampDate; + LLString mIMBusyResponse; LLString mLogPath; @@ -95,6 +100,10 @@ void LLPrefsIMImpl::refresh() mLogInstantMessages= gSavedPerAccountSettings.getBOOL("LogInstantMessages"); mLogChat = gSavedPerAccountSettings.getBOOL("LogChat"); mLogShowHistory = gSavedPerAccountSettings.getBOOL("LogShowHistory"); + mIMLogTimestamp = gSavedPerAccountSettings.getBOOL("IMLogTimestamp"); + mLogChatTimestamp = gSavedPerAccountSettings.getBOOL("LogChatTimestamp"); + mLogIMChat = gSavedPerAccountSettings.getBOOL("LogChatIM"); + mLogTimestampDate = gSavedPerAccountSettings.getBOOL("LogTimestampDate"); } void LLPrefsIMImpl::cancel() @@ -106,6 +115,10 @@ void LLPrefsIMImpl::cancel() gSavedPerAccountSettings.setBOOL("LogInstantMessages",mLogInstantMessages); gSavedPerAccountSettings.setBOOL("LogChat",mLogChat); gSavedPerAccountSettings.setBOOL("LogShowHistory",mLogShowHistory); + gSavedPerAccountSettings.setBOOL("IMLogTimestamp",mIMLogTimestamp); + gSavedPerAccountSettings.setBOOL("LogChatTimestamp",mLogChatTimestamp); + gSavedPerAccountSettings.setBOOL("LogChatIM",mLogIMChat); + gSavedPerAccountSettings.setBOOL("LogTimestampDate",mLogTimestampDate); } BOOL LLPrefsIMImpl::postBuild() @@ -130,6 +143,10 @@ BOOL LLPrefsIMImpl::postBuild() childDisable("log_show_history"); childDisable("log_path_button"); childDisable("busy_response"); + childDisable("log_instant_messages_timestamp"); + childDisable("log_chat_timestamp"); + childDisable("log_chat_IM"); + childDisable("log_date_timestamp"); childSetText("busy_response", childGetText("log_in_to_change")); @@ -138,7 +155,11 @@ BOOL LLPrefsIMImpl::postBuild() childSetText("log_path_string", mLogPath); childSetValue("log_instant_messages", mLogInstantMessages); childSetValue("log_chat", mLogChat); - childSetValue("log_show_history", mLogShowHistory); + childSetValue("log_show_history", mIMLogTimestamp); + childSetValue("log_instant_messages_timestamp", mIMLogTimestamp); + childSetValue("log_chat_timestamp", mLogChatTimestamp); + childSetValue("log_chat_IM", mLogIMChat); + childSetValue("log_date_timestamp",mLogTimestampDate); childSetAction("log_path_button", onClickLogPath, this); childSetCommitCallback("log_chat",onCommitLogging,this); childSetCommitCallback("log_instant_messages",onCommitLogging,this); @@ -179,6 +200,10 @@ void LLPrefsIMImpl::apply() gSavedPerAccountSettings.setBOOL("LogInstantMessages",childGetValue("log_instant_messages").asBoolean()); gSavedPerAccountSettings.setBOOL("LogChat",childGetValue("log_chat").asBoolean()); gSavedPerAccountSettings.setBOOL("LogShowHistory",childGetValue("log_show_history").asBoolean()); + gSavedPerAccountSettings.setBOOL("IMLogTimestamp",childGetValue("log_instant_messages_timestamp").asBoolean()); + gSavedPerAccountSettings.setBOOL("LogChatTimestamp",childGetValue("log_chat_timestamp").asBoolean()); + gSavedPerAccountSettings.setBOOL("LogChatIM",childGetValue("log_chat_IM").asBoolean()); + gSavedPerAccountSettings.setBOOL("LogTimestampDate",childGetValue("log_date_timestamp").asBoolean()); gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath")); @@ -246,6 +271,10 @@ void LLPrefsIMImpl::setPersonalInfo( childEnable("log_instant_messages"); childEnable("log_chat"); childEnable("busy_response"); + childEnable("log_instant_messages_timestamp"); + childEnable("log_chat_timestamp"); + childEnable("log_chat_IM"); + childEnable("log_date_timestamp"); //RN: get wide string so replace char can work (requires fixed-width encoding) LLWString busy_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("BusyModeResponse") ); diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 5086432..e2be9fd 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -395,9 +395,9 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, root->resetRot(); // leave component mode - if (!gSavedSettings.getBOOL("SelectLinkedSet")) + if (gSavedSettings.getBOOL("EditLinkedParts")) { - gSavedSettings.setBOOL("SelectLinkedSet", TRUE); + gSavedSettings.setBOOL("EditLinkedParts", FALSE); promoteSelectionToRoot(); } @@ -463,9 +463,9 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const LLDynamicArray< } // leave component mode - if (!gSavedSettings.getBOOL("SelectLinkedSet")) + if (gSavedSettings.getBOOL("EditLinkedParts")) { - gSavedSettings.setBOOL("SelectLinkedSet", TRUE); + gSavedSettings.setBOOL("EditLinkedParts", FALSE); promoteSelectionToRoot(); } @@ -948,7 +948,7 @@ LLObjectSelectionHandle LLSelectMgr::selectHighlightedObjects() void LLSelectMgr::deselectHighlightedObjects() { - BOOL select_linked_set = gSavedSettings.getBOOL("SelectLinkedSet"); + BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); for (std::set >::iterator iter = mRectSelectedObjects.begin(); iter != mRectSelectedObjects.end(); iter++) { @@ -3249,7 +3249,7 @@ void LLSelectMgr::sendMultipleUpdate(U32 type) { if (type == UPD_NONE) return; // send individual updates when selecting textures or individual objects - ESendType send_type = (gSavedSettings.getBOOL("SelectLinkedSet") && !getTEMode()) ? SEND_ONLY_ROOTS : SEND_ROOTS_FIRST; + ESendType send_type = (!gSavedSettings.getBOOL("EditLinkedParts") && !getTEMode()) ? SEND_ONLY_ROOTS : SEND_ROOTS_FIRST; if (send_type == SEND_ONLY_ROOTS) { // tell simulator to apply to whole linked sets @@ -4506,7 +4506,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use LLString fullname(first_name); fullname.append(" "); fullname.append(last_name); - reporterp->setPickedObjectProperties(name, fullname.c_str()); + reporterp->setPickedObjectProperties(name, fullname.c_str(), owner_id); } } @@ -4669,7 +4669,7 @@ void LLSelectMgr::updateSilhouettes() // persists from frame to frame to avoid regenerating object silhouettes // mHighlightedObjects includes all siblings of rect selected objects - BOOL select_linked_set = gSavedSettings.getBOOL("SelectLinkedSet"); + BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); // generate list of roots from current object selection for (std::set >::iterator iter = mRectSelectedObjects.begin(); @@ -5619,7 +5619,7 @@ BOOL LLSelectMgr::canUndo() //----------------------------------------------------------------------------- void LLSelectMgr::undo() { - BOOL select_linked_set = gSavedSettings.getBOOL("SelectLinkedSet"); + BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); LLUUID group_id(gAgent.getGroupID()); sendListToRegions("Undo", packAgentAndSessionAndGroupID, packObjectID, &group_id, select_linked_set ? SEND_ONLY_ROOTS : SEND_CHILDREN_FIRST); } @@ -5637,7 +5637,7 @@ BOOL LLSelectMgr::canRedo() //----------------------------------------------------------------------------- void LLSelectMgr::redo() { - BOOL select_linked_set = gSavedSettings.getBOOL("SelectLinkedSet"); + BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); LLUUID group_id(gAgent.getGroupID()); sendListToRegions("Redo", packAgentAndSessionAndGroupID, packObjectID, &group_id, select_linked_set ? SEND_ONLY_ROOTS : SEND_CHILDREN_FIRST); } @@ -5814,7 +5814,7 @@ void LLObjectSelection::deleteAllNodes() LLSelectNode* LLObjectSelection::findNode(LLViewerObject* objectp) { - std::map::iterator found_it = mSelectNodeMap.find(objectp); + std::map, LLSelectNode*>::iterator found_it = mSelectNodeMap.find(objectp); if (found_it != mSelectNodeMap.end()) { return found_it->second; diff --git a/linden/indra/newview/llselectmgr.h b/linden/indra/newview/llselectmgr.h index c344181..5f76ce2 100644 --- a/linden/indra/newview/llselectmgr.h +++ b/linden/indra/newview/llselectmgr.h @@ -188,7 +188,7 @@ private: LLPointer mPrimaryObject; std::list::iterator mCurrentNode; S32 mCurrentTE; - std::map mSelectNodeMap; + std::map, LLSelectNode*> mSelectNodeMap; ESelectType mSelectType; }; diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index dbda813..283b38b 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp @@ -1524,7 +1524,7 @@ public: for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) { LLDrawable* drawable = *i; - if (drawable->getVObj() && !group->mSpatialPartition->mRenderByGroup) + if (drawable->getVObj().notNull() && !group->mSpatialPartition->mRenderByGroup) { gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL, TRUE); } diff --git a/linden/indra/newview/llsrv.cpp b/linden/indra/newview/llsrv.cpp new file mode 100644 index 0000000..4dec48d --- /dev/null +++ b/linden/indra/newview/llsrv.cpp @@ -0,0 +1,213 @@ +/** + * @file llsrv.cpp + * @brief Wrapper for DNS SRV record lookups + * + * 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. + */ + +#include "llviewerprecompiledheaders.h" + +#include "llsrv.h" + +using namespace std; + +#if LL_WINDOWS + +#undef UNICODE +#include +#include + +vector LLSRV::query(const string& name) +{ + vector recs; + DNS_RECORD *rec; + DNS_STATUS status; + + status = DnsQuery(name.c_str(), DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &rec, NULL); + if (!status) + { + for (DNS_RECORD *cur = rec; cur != NULL; cur = cur->pNext) + { + if (cur->wType != DNS_TYPE_SRV) + { + continue; + } + recs.push_back(LLSRVRecord(cur->Data.Srv.wPriority, + cur->Data.Srv.wWeight, + cur->Data.Srv.pNameTarget, + cur->Data.Srv.wPort)); + } + DnsRecordListFree(rec, DnsFreeRecordListDeep); + } + + return recs; +} + +#else // !LL_WINDOWS + +#include +#include +#include +#include + +#include + +vector LLSRV::query(const string& queryName) +{ + unsigned char response[16384]; + vector recs; + char name[1024]; + int len; + + len = res_query(queryName.c_str(), ns_c_in, ns_t_srv, response, + sizeof(response)); + + if (len == -1) + { + llinfos << "Query failed for " << queryName << llendl; + return recs; + } + else if (len > (int) sizeof(response)) + { + llinfos << "Response too big for " << queryName + << " (capacity " << sizeof(response) + << ", response " << len << ")" << llendl; + return recs; + } + + // We "should" be using libresolv's ns_initparse and ns_parserr to + // parse the result of our query. However, libresolv isn't + // packaged correctly on Linux (as of BIND 9), so neither of these + // functions is available without statically linking against + // libresolv. Ugh! So we parse the response ourselves. + + const unsigned char *pos = response + sizeof(HEADER); + const unsigned char *end = response + len; + const HEADER *hdr = (const HEADER *) response; + + // Skip over the query embedded in the response. + + for (int q = ntohs(hdr->qdcount); q > 0; --q) + { + len = dn_expand(response, end, pos, name, sizeof(name)); + + if (len == -1) + { + llinfos << "Could not expand queried name in RR response" << llendl; + return recs; + } + + pos += len + NS_QFIXEDSZ; + } + + for (int a = ntohs(hdr->ancount); a > 0; --a) + { + static const ns_rr *rr; + + len = dn_expand(response, end, pos, name, sizeof(name) - 1); + if (len == -1) + { + llinfos << "Could not expand response name in RR response" << llendl; + return recs; + } + + // Skip over the resource name and headers we don't care about. + + pos += len + sizeof(rr->type) + sizeof(rr->rr_class) + + sizeof(rr->ttl) + sizeof(rr->rdlength); + + U16 prio; + U16 weight; + U16 port; + + NS_GET16(prio, pos); + NS_GET16(weight, pos); + NS_GET16(port, pos); + + len = dn_expand(response, end, pos, name, sizeof(name) - 1); + + if (len == -1) + { + llinfos << "Could not expand name in RR response" << llendl; + return recs; + } + + recs.push_back(LLSRVRecord(prio, weight, name, port)); + } + + // There are likely to be more records in the response, but we + // don't care about those, at least for now. + + return recs; +} + +#endif // LL_WINDOWS + +vector LLSRV::rewriteURI(const string& uriStr) +{ + LLURI uri(uriStr); + const string& scheme = uri.scheme(); + llinfos << "Rewriting " << uriStr << llendl; + string serviceName("_" + scheme + "._tcp." + uri.hostName()); + llinfos << "Querying for " << serviceName << llendl; + vector srvs(LLSRV::query(serviceName)); + vector rewritten; + + if (srvs.empty()) + { + llinfos << "No query results; using " << uriStr << llendl; + rewritten.push_back(uriStr); + } + else + { + vector::const_iterator iter; + size_t maxSrvs = 3; + size_t i; + + llinfos << "Got " << srvs.size() << " results" << llendl; + if (srvs.size() > maxSrvs) + { + llinfos << "Clamping to " << maxSrvs << llendl; + } + + for (iter = srvs.begin(), i = 0; + iter != srvs.end() && i < maxSrvs; ++iter, ++i) + { + LLURI newUri(scheme, + uri.userName(), + uri.password(), + iter->target(), + uri.defaultPort() ? iter->port() : uri.hostPort(), + uri.escapedPath(), + uri.escapedQuery()); + string newUriStr(newUri.asString()); + + llinfos << "Rewrite[" << i << "] " << newUriStr << llendl; + + rewritten.push_back(newUriStr); + } + } + + return rewritten; +} diff --git a/linden/indra/newview/llsrv.h b/linden/indra/newview/llsrv.h new file mode 100644 index 0000000..fca646d --- /dev/null +++ b/linden/indra/newview/llsrv.h @@ -0,0 +1,66 @@ +/** + * @file llsrv.h + * @brief Wrapper for DNS SRV record lookups + * + * 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_LLSRV_H +#define LL_LLSRV_H + +class LLSRV; + +class LLSRVRecord +{ + friend class LLSRV; + +protected: + U16 mPriority; + U16 mWeight; + std::string mTarget; + U16 mPort; + + LLSRVRecord(U16 priority, U16 weight, const std::string& target, + U16 port) : + mPriority(priority), + mWeight(weight), + mTarget(target), + mPort(port) { + } + +public: + U16 priority() const { return mPriority; } + U16 weight() const { return mWeight; } + const std::string& target() const { return mTarget; } + U16 port() const { return mPort; } +}; + +class LLSRV +{ +public: + static std::vector query(const std::string& name); + static std::vector rewriteURI(const std::string& uri); +}; + +#endif // LL_LLSRV_H diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 4af02cb..0130edf 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -117,6 +117,7 @@ #include "llpreviewscript.h" #include "llselectmgr.h" #include "llsky.h" +#include "llsrv.h" #include "llstatview.h" #include "llsurface.h" #include "lltexturecache.h" @@ -285,7 +286,8 @@ BOOL idle_startup() // auth/transform loop will do. static F32 progress = 0.10f; - static std::string auth_uri; + static std::vector auth_uris; + static int auth_uri_num = -1; static std::string auth_method; static std::string auth_desc; static std::string auth_message; @@ -1109,7 +1111,11 @@ BOOL idle_startup() gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.push_back("god-connect"); } - auth_uri = getLoginURI(); + if (auth_uris.empty()) + { + auth_uris = getLoginURIs(); + } + auth_uri_num = 0; auth_method = "login_to_simulator"; auth_desc = "Logging in. "; auth_desc += gSecondLife; @@ -1152,7 +1158,7 @@ BOOL idle_startup() hashed_mac.hex_digest(hashed_mac_string); gUserAuthp->authenticate( - auth_uri.c_str(), + auth_uris[auth_uri_num].c_str(), auth_method.c_str(), firstname.c_str(), lastname.c_str(), @@ -1248,7 +1254,8 @@ BOOL idle_startup() else if(login_response && (0 == strcmp(login_response, "indeterminate"))) { llinfos << "Indeterminate login..." << llendl; - auth_uri = gUserAuthp->getResponse("next_url"); + auth_uris = LLSRV::rewriteURI(gUserAuthp->getResponse("next_url")); + auth_uri_num = 0; auth_method = gUserAuthp->getResponse("next_method"); auth_message = gUserAuthp->getResponse("message"); if(auth_method.substr(0, 5) == "login") @@ -1351,13 +1358,33 @@ BOOL idle_startup() case LLUserAuth::E_SSL_PEER_CERTIFICATE: case LLUserAuth::E_UNHANDLED_ERROR: default: - emsg << "Unable to connect to " << gSecondLife << ".\n"; - emsg << gUserAuthp->errorMessage(); + if (auth_uri_num >= (int) auth_uris.size()) + { + emsg << "Unable to connect to " << gSecondLife << ".\n"; + emsg << gUserAuthp->errorMessage(); + } else { + std::ostringstream s; + s << "Logging in (attempt " << (auth_uri_num + 1) << "). "; + auth_desc = s.str(); + gStartupState = STATE_LOGIN_AUTHENTICATE; + auth_uri_num++; + return do_normal_idle; + } break; case LLUserAuth::E_SSL_CACERT: case LLUserAuth::E_SSL_CONNECT_ERROR: - emsg << "Unable to establish a secure connection to the login server.\n"; - emsg << gUserAuthp->errorMessage(); + if (auth_uri_num >= (int) auth_uris.size()) + { + emsg << "Unable to establish a secure connection to the login server.\n"; + emsg << gUserAuthp->errorMessage(); + } else { + std::ostringstream s; + s << "Logging in (attempt " << (auth_uri_num + 1) << "). "; + auth_desc = s.str(); + gStartupState = STATE_LOGIN_AUTHENTICATE; + auth_uri_num++; + return do_normal_idle; + } break; } diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp index 2005e39..26ee098 100644 --- a/linden/indra/newview/lltexlayer.cpp +++ b/linden/indra/newview/lltexlayer.cpp @@ -2314,7 +2314,7 @@ LLColor4 LLTexParamColor::getNetColor() { llassert( getInfo()->mNumColors >= 1 ); - F32 effective_weight = ( mAvatar && (mAvatar->getSex() & getSex()) ) ? mCurWeight : getDefaultWeight(); + F32 effective_weight = ( mAvatar.notNull() && (mAvatar->getSex() & getSex()) ) ? mCurWeight : getDefaultWeight(); S32 index_last = getInfo()->mNumColors - 1; F32 scaled_weight = effective_weight * index_last; diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h index c5a34a6..920ae4a 100644 --- a/linden/indra/newview/lltexlayer.h +++ b/linden/indra/newview/lltexlayer.h @@ -286,7 +286,7 @@ protected: typedef std::vector layer_list_t; layer_list_t mLayerList; LLTexLayerSetBuffer* mComposite; - LLVOAvatar* mAvatar; + LLPointer mAvatar; BOOL mUpdatesEnabled; BOOL mHasBump; @@ -443,7 +443,7 @@ public: protected: typedef std::vector param_list_t; param_list_t mParamList; - LLVOAvatar* mAvatar; + LLPointer mAvatar; LLTexGlobalColorInfo *mInfo; }; @@ -489,7 +489,7 @@ protected: LLVector3 mAvgDistortionVec; LLTexGlobalColor* mTexGlobalColor; // either has mTexGlobalColor or mTexLayer as its parent LLTexLayer* mTexLayer; - LLVOAvatar* mAvatar; // redundant, but simplifies the code + LLPointer mAvatar; // redundant, but simplifies the code }; //----------------------------------------------------------------------------- @@ -569,7 +569,7 @@ public: ~LLBakedUploadData() {} LLUUID mID; - LLVOAvatar* mAvatar; + LLPointer mAvatar; LLTexLayerSetBuffer* mLayerSetBuffer; LLUUID mWearableAssets[WT_COUNT]; }; diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index 2008fda..81b4343 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -1,5 +1,5 @@ /** - * @file texturecache.cpp + * @file lltexturecache.cpp * @brief Object which handles local texture caching * * Copyright (c) 2000-2007, Linden Research, Inc. @@ -1284,6 +1284,7 @@ LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 prio { if (mReadOnly) { + delete responder; return LLWorkerThread::nullHandle(); } if (mDoPurge) @@ -1305,6 +1306,7 @@ LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 prio mWriters[handle] = worker; return handle; } + delete responder; return LLWorkerThread::nullHandle(); } diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index b5c1ace..6602096 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp @@ -119,7 +119,8 @@ public: // LLFloater overrides virtual void onClose(bool app_quitting); - + virtual BOOL postBuild(); + // New functions void setImageID( const LLUUID& image_asset_id); void updateImageStats(); @@ -163,6 +164,8 @@ protected: LLUUID mSpecialCurrentImageAssetID; // Used when the asset id has no corresponding texture in the user's inventory. LLUUID mOriginalImageAssetID; + std::string mLabel; + LLTextBox* mTentativeLabel; LLTextBox* mResolutionLabel; @@ -197,6 +200,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mImageAssetID( owner->getImageAssetID() ), mWhiteImageAssetID( gSavedSettings.getString( "UIImgWhiteUUID" ) ), mOriginalImageAssetID(owner->getImageAssetID()), + mLabel(label), mTentativeLabel(NULL), mResolutionLabel(NULL), mIsDirty( FALSE ), @@ -456,6 +460,21 @@ void LLFloaterTexturePicker::onClose(bool app_quitting) } // virtual +BOOL LLFloaterTexturePicker::postBuild() +{ + LLFloater::postBuild(); + + if (!mLabel.empty()) + { + std::string pick = childGetText("pick title"); + + setTitle(pick + mLabel); + } + + return TRUE; +} + +// virtual void LLFloaterTexturePicker::draw() { if (mOwner) diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 5cdc854..7bdd98b 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -1,5 +1,5 @@ /** - * @file lltexturecache.cpp + * @file lltexturefetch.cpp * @brief Object which fetches textures from the cache and/or network * * Copyright (c) 2000-2007, Linden Research, Inc. diff --git a/linden/indra/newview/lltoolcomp.cpp b/linden/indra/newview/lltoolcomp.cpp index fd1152d..555f25e 100644 --- a/linden/indra/newview/lltoolcomp.cpp +++ b/linden/indra/newview/lltoolcomp.cpp @@ -121,7 +121,7 @@ BOOL LLToolComposite::isSelecting() void LLToolComposite::handleSelect() { - if (gSavedSettings.getBOOL("SelectLinkedSet")) + if (!gSavedSettings.getBOOL("EditLinkedParts")) { gSelectMgr->promoteSelectionToRoot(); } @@ -162,7 +162,7 @@ void LLToolCompInspect::pickCallback(S32 x, S32 y, MASK mask) if (!gToolInspect->mMouseDown) { // fast click on object, but mouse is already up...just do select - gToolInspect->mSelectRect->handleObjectSelection(hit_obj, mask, !gSavedSettings.getBOOL("SelectLinkedSet"), FALSE); + gToolInspect->mSelectRect->handleObjectSelection(hit_obj, mask, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); return; } @@ -236,7 +236,7 @@ void LLToolCompTranslate::pickCallback(S32 x, S32 y, MASK mask) if (!gToolTranslate->mMouseDown) { // fast click on object, but mouse is already up...just do select - gToolTranslate->mSelectRect->handleObjectSelection(hit_obj, mask, !gSavedSettings.getBOOL("SelectLinkedSet"), FALSE); + gToolTranslate->mSelectRect->handleObjectSelection(hit_obj, mask, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); return; } @@ -250,7 +250,7 @@ void LLToolCompTranslate::pickCallback(S32 x, S32 y, MASK mask) BOOL can_move = gToolTranslate->mManip->getSelection()->getObjectCount() != 0; for (LLViewerObject* objectp = gToolTranslate->mManip->getSelection()->getFirstObject(); objectp; objectp = gToolTranslate->mManip->getSelection()->getNextObject()) { - can_move = can_move && objectp->permMove() && (objectp->permModify() || gSavedSettings.getBOOL("SelectLinkedSet")); + can_move = can_move && objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); } if( LLManip::LL_NO_PART != gToolTranslate->mManip->getHighlightedPart() && can_move) @@ -364,7 +364,7 @@ void LLToolCompScale::pickCallback(S32 x, S32 y, MASK mask) if (!gToolStretch->mMouseDown) { // fast click on object, but mouse is already up...just do select - gToolStretch->mSelectRect->handleObjectSelection(hit_obj, mask, !gSavedSettings.getBOOL("SelectLinkedSet"), FALSE); + gToolStretch->mSelectRect->handleObjectSelection(hit_obj, mask, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); return; } @@ -565,7 +565,7 @@ void LLToolCompRotate::pickCallback(S32 x, S32 y, MASK mask) if (!gToolRotate->mMouseDown) { // fast click on object, but mouse is already up...just do select - gToolRotate->mSelectRect->handleObjectSelection(hit_obj, mask, !gSavedSettings.getBOOL("SelectLinkedSet"), FALSE); + gToolRotate->mSelectRect->handleObjectSelection(hit_obj, mask, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); return; } diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 7231286..0e3a5fe 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp @@ -62,7 +62,7 @@ LLToolPie *gToolPie = NULL; -LLViewerObject* LLToolPie::sClickActionObject = NULL; +LLPointer LLToolPie::sClickActionObject; LLHandle LLToolPie::sLeftClickSelection = NULL; U8 LLToolPie::sClickAction = 0; diff --git a/linden/indra/newview/lltoolpie.h b/linden/indra/newview/lltoolpie.h index 949013f..2fba989 100644 --- a/linden/indra/newview/lltoolpie.h +++ b/linden/indra/newview/lltoolpie.h @@ -73,7 +73,7 @@ protected: BOOL mHitLand; LLUUID mHitObjectID; BOOL mMouseOutsideSlop; // for this drag, has mouse moved outside slop region - static LLViewerObject* sClickActionObject; + static LLPointer sClickActionObject; static U8 sClickAction; static LLHandle sLeftClickSelection; }; diff --git a/linden/indra/newview/lltoolselect.cpp b/linden/indra/newview/lltoolselect.cpp index 9d02756..329801f 100644 --- a/linden/indra/newview/lltoolselect.cpp +++ b/linden/indra/newview/lltoolselect.cpp @@ -229,7 +229,7 @@ LLHandle LLToolSelect::handleObjectSelection(LLViewerObject * BOOL LLToolSelect::handleMouseUp(S32 x, S32 y, MASK mask) { - mIgnoreGroup = !gSavedSettings.getBOOL("SelectLinkedSet"); + mIgnoreGroup = gSavedSettings.getBOOL("EditLinkedParts"); LLViewerObject* object = gObjectList.findObject(mSelectObjectID); LLToolSelect::handleObjectSelection(object, mask, mIgnoreGroup, FALSE); diff --git a/linden/indra/newview/llviewerassetstorage.cpp b/linden/indra/newview/llviewerassetstorage.cpp index 95ef983..d9a5ada 100644 --- a/linden/indra/newview/llviewerassetstorage.cpp +++ b/linden/indra/newview/llviewerassetstorage.cpp @@ -57,7 +57,9 @@ void LLViewerAssetStorage::storeAssetData( void* user_data, bool temp_file, bool is_priority, - bool store_local) + bool store_local, + bool user_waiting, + F64 timeout) { LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); llinfos << "LLViewerAssetStorage::storeAssetData (legacy) " << tid << ":" << LLAssetType::lookup(asset_type) @@ -161,7 +163,9 @@ void LLViewerAssetStorage::storeAssetData( LLStoreAssetCallback callback, void* user_data, bool temp_file, - bool is_priority) + bool is_priority, + bool user_waiting, + F64 timeout) { if(!filename) { diff --git a/linden/indra/newview/llviewerassetstorage.h b/linden/indra/newview/llviewerassetstorage.h index 8532e23..46840cb 100644 --- a/linden/indra/newview/llviewerassetstorage.h +++ b/linden/indra/newview/llviewerassetstorage.h @@ -52,7 +52,9 @@ public: void* user_data, bool temp_file = false, bool is_priority = false, - bool store_local = false); + bool store_local = false, + bool user_waiting=FALSE, + F64 timeout=LL_ASSET_STORAGE_TIMEOUT); virtual void storeAssetData( const char* filename, @@ -61,7 +63,9 @@ public: LLStoreAssetCallback callback, void* user_data, bool temp_file = false, - bool is_priority = false); + bool is_priority = false, + bool user_waiting=FALSE, + F64 timeout=LL_ASSET_STORAGE_TIMEOUT); }; #endif diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp index 2a7f346..b129a9a 100644 --- a/linden/indra/newview/llviewerimage.cpp +++ b/linden/indra/newview/llviewerimage.cpp @@ -156,7 +156,7 @@ void LLViewerImage::updateClass(const F32 velocity, const F32 angular_velocity) sMaxTotalTextureMem -= sMaxBoundTextureMem/4; } - if (sMaxTotalTextureMem > (S32)gSysMemory.getPhysicalMemory() - min_non_tex_system_mem) + if ((U32)sMaxTotalTextureMem > gSysMemory.getPhysicalMemory() - (U32)min_non_tex_system_mem) { sMaxTotalTextureMem = (S32)gSysMemory.getPhysicalMemory() - min_non_tex_system_mem; } diff --git a/linden/indra/newview/llviewerimage.h b/linden/indra/newview/llviewerimage.h index c62e5e4..ee19cfb 100644 --- a/linden/indra/newview/llviewerimage.h +++ b/linden/indra/newview/llviewerimage.h @@ -226,6 +226,7 @@ public: BOOST_AVATAR_BAKED = 1, BOOST_AVATAR = 2, BOOST_CLOUDS = 3, + BOOST_SCULPTED = 4, BOOST_HIGH = 10, BOOST_TERRAIN = 11, // has to be high priority for minimap / low detail diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp index 4e87905..fce719f 100644 --- a/linden/indra/newview/llviewerimagelist.cpp +++ b/linden/indra/newview/llviewerimagelist.cpp @@ -38,6 +38,7 @@ #include "llimagej2c.h" #include "llimagetga.h" #include "llimagejpeg.h" +#include "llimagepng.h" #include "llmediaengine.h" #include "llsdserialize.h" @@ -1081,6 +1082,21 @@ BOOL LLViewerImageList::createUploadFile(const LLString& filename, } } break; + case IMG_CODEC_PNG: + { + LLPointer png_image = new LLImagePNG; + + if (!png_image->load(filename)) + { + return FALSE; + } + + if (!png_image->decode(raw_image)) + { + return FALSE; + } + } + break; default: return FALSE; } diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp index 0a65b8b..f24b7c7 100644 --- a/linden/indra/newview/llviewerinventory.cpp +++ b/linden/indra/newview/llviewerinventory.cpp @@ -571,7 +571,7 @@ U32 LLInventoryCallbackManager::registerCB(LLPointer cb) void LLInventoryCallbackManager::fire(U32 callback_id, const LLUUID& item_id) { - if (!callback_id) + if (!callback_id || item_id.isNull()) return; std::map >::iterator i; diff --git a/linden/indra/newview/llviewerjointattachment.h b/linden/indra/newview/llviewerjointattachment.h index 0c8469c..a8c2c71 100644 --- a/linden/indra/newview/llviewerjointattachment.h +++ b/linden/indra/newview/llviewerjointattachment.h @@ -79,7 +79,7 @@ public: S32 getGroup() { return mGroup; } S32 getPieSlice() { return mPieSlice; } - BOOL getAttachmentDirty() { return mAttachmentDirty && mAttachedObject; } + BOOL getAttachmentDirty() { return mAttachmentDirty && mAttachedObject.notNull(); } LLViewerObject *getObject() { return mAttachedObject; } S32 getNumObjects() { return (mAttachedObject ? 1 : 0); } const LLUUID& getItemID() { return mItemID; } @@ -99,7 +99,7 @@ protected: protected: LLJoint* mJoint; - LLViewerObject* mAttachedObject; + LLPointer mAttachedObject; BOOL mAttachmentDirty; // does attachment drawable need to be fixed up? BOOL mVisibleInFirst; LLVector3 mOriginalPos; diff --git a/linden/indra/newview/llviewerkeyboard.cpp b/linden/indra/newview/llviewerkeyboard.cpp index fcb1550..ad931cd 100644 --- a/linden/indra/newview/llviewerkeyboard.cpp +++ b/linden/indra/newview/llviewerkeyboard.cpp @@ -121,11 +121,7 @@ void agent_slide_left( EKeystate s ) if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES) { - if (frame_count == 0) - { - // only send nudge on first frame - gAgent.moveLeftNudge(1); - } + gAgent.moveLeftNudge(1); } else { @@ -142,11 +138,7 @@ void agent_slide_right( EKeystate s ) if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES) { - if (frame_count == 0) - { - // only send nudge on first frame - gAgent.moveLeftNudge(-1); - } + gAgent.moveLeftNudge(-1); } else { diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 4119573..b36b9a2 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -244,7 +244,7 @@ const LLString SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"); #if LL_WINDOWS static const char* SOUND_EXTENSIONS = ".wav"; -static const char* IMAGE_EXTENSIONS = ".tga .bmp .jpg .jpeg"; +static const char* IMAGE_EXTENSIONS = ".tga .bmp .jpg .jpeg .png"; static const char* ANIM_EXTENSIONS = ".bvh"; #ifdef _CORY_TESTING static const char* GEOMETRY_EXTENSIONS = ".slg"; @@ -1259,7 +1259,7 @@ void init_debug_avatar_menu(LLMenuGL* menu) sub_menu = new LLMenuGL("Character Tests"); sub_menu->append(new LLMenuItemToggleGL("Go Away/AFK When Idle", - &gAllowAFK)); + &gAllowIdleAFK)); sub_menu->append(new LLMenuItemCallGL("Appearance To XML", &LLVOAvatar::dumpArchetypeXML)); @@ -4150,7 +4150,7 @@ class LLToolsBuyOrTake : public view_listener_t { S32 total_price = selection_price(); - if (total_price <= gStatusBar->getBalance()) + if (total_price <= gStatusBar->getBalance() || total_price == 0) { handle_buy(NULL); } @@ -4442,7 +4442,7 @@ class LLToolsEnableLink : public view_listener_t // user can modify at least one of the selected objects. // in component mode, can't link - if (gSavedSettings.getBOOL("SelectLinkedSet")) + if (!gSavedSettings.getBOOL("EditLinkedParts")) { if(gSelectMgr->selectGetAllRootsValid() && gSelectMgr->getSelection()->getRootObjectCount() >= 2) { @@ -4842,6 +4842,12 @@ void show_debug_menus() if ( gMenuBarView ) { BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); + + if(debug) + { + LLFirstUse::useDebugMenus(); + } + gMenuBarView->setItemVisible(CLIENT_MENU_NAME, debug); gMenuBarView->setItemEnabled(CLIENT_MENU_NAME, debug); gMenuBarView->setItemVisible(SERVER_MENU_NAME, debug); @@ -6927,6 +6933,23 @@ class LLToolsShowSelectionLightRadius : public view_listener_t } }; +class LLToolsEditLinkedParts : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + BOOL select_individuals = gSavedSettings.getBOOL("EditLinkedParts"); + if (select_individuals) + { + gSelectMgr->demoteSelectionToIndividuals(); + } + else + { + gSelectMgr->promoteSelectionToRoot(); + } + return true; + } +}; + void reload_personal_settings_overrides(void *) { llinfos << "Loading overrides from " << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml") << llendl; @@ -7620,6 +7643,7 @@ void initialize_menus() addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection"); addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius"); + addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts"); addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY"); addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid"); addMenu(new LLToolsLink(), "Tools.Link"); diff --git a/linden/indra/newview/llviewermenufile.cpp b/linden/indra/newview/llviewermenufile.cpp index 6954b1c..19dfebe 100644 --- a/linden/indra/newview/llviewermenufile.cpp +++ b/linden/indra/newview/llviewermenufile.cpp @@ -561,6 +561,21 @@ void upload_new_resource(const LLString& src_filename, std::string name, return; } } + else if( LLString::compareInsensitive(ext.c_str(),".png") == 0 ) + { + asset_type = LLAssetType::AT_TEXTURE; + if (!LLViewerImageList::createUploadFile(src_filename, + filename, + IMG_CODEC_PNG )) + { + sprintf(error_message, "Problem with file %s:\n\n%s\n", + src_filename.c_str(), LLImageBase::getLastError().c_str()); + args["[FILE]"] = src_filename; + args["[ERROR]"] = LLImageBase::getLastError(); + upload_error(error_message, "ProblemWithFile", filename, args); + return; + } + } else if(LLString::compareInsensitive(ext.c_str(),".wav") == 0) { asset_type = LLAssetType::AT_SOUND; // tag it as audio diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 87ff5aa..8f2fc1a 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -154,6 +154,22 @@ LLFrameTimer gThrottleTimer; const U32 OFFER_THROTTLE_MAX_COUNT=5; //number of items per time period const F32 OFFER_THROTTLE_TIME=10.f; //time period in seconds +//script permissions +const LLString SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] = + { + "ScriptTakeMoney", + "ActOnControlInputs", + "RemapControlInputs", + "AnimateYourAvatar", + "AttachToYourAvatar", + "ReleaseOwnership", + "LinkAndDelink", + "AddAndRemoveJoints", + "ChangePermissions", + "TrackYourCamera", + "ControlYourCamera" + }; + struct LLFriendshipOffer { LLUUID mFromID; @@ -4243,8 +4259,8 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) class LLScriptQuestionCBData { public: - LLScriptQuestionCBData(const LLUUID &taskid, const LLUUID &itemid, const LLHost &sender, S32 questions) - : mTaskID(taskid), mItemID(itemid), mSender(sender), mQuestions(questions) + LLScriptQuestionCBData(const LLUUID &taskid, const LLUUID &itemid, const LLHost &sender, S32 questions, const char *object_name, const char *owner_name) + : mTaskID(taskid), mItemID(itemid), mSender(sender), mQuestions(questions), mObjectName(object_name), mOwnerName(owner_name) { } @@ -4252,17 +4268,138 @@ public: LLUUID mItemID; LLHost mSender; S32 mQuestions; + LLString mObjectName; + LLString mOwnerName; }; +void notify_cautioned_script_question(LLScriptQuestionCBData* cbdata, S32 orig_questions, BOOL granted) +{ + // only continue if at least some permissions were requested + if (orig_questions) + { + // "'[OBJECTNAME]', an object owned by '[OWNERNAME]', + // located in [REGIONNAME] at [REGIONPOS], + // has been permission to: [PERMISSIONS]." + + LLUIString notice(LLNotifyBox::getTemplateMessage(granted ? "ScriptQuestionCautionChatGranted" : "ScriptQuestionCautionChatDenied")); + + // always include the object name and owner name + notice.setArg("[OBJECTNAME]", cbdata->mObjectName); + notice.setArg("[OWNERNAME]", cbdata->mOwnerName); + + // try to lookup viewerobject that corresponds to the object that + // requested permissions (here, taskid->requesting object id) + BOOL foundpos = FALSE; + LLViewerObject* viewobj = gObjectList.findObject(cbdata->mTaskID); + if (viewobj) + { + // found the viewerobject, get it's position in its region + LLVector3 objpos(viewobj->getPosition()); + + // try to lookup the name of the region the object is in + LLViewerRegion* viewregion = viewobj->getRegion(); + if (viewregion) + { + // got the region, so include the region and 3d coordinates of the object + notice.setArg("[REGIONNAME]", viewregion->getName()); + LLString formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]); + notice.setArg("[REGIONPOS]", formatpos); + + foundpos = TRUE; + } + } + + if (!foundpos) + { + // unable to determine location of the object + notice.setArg("[REGIONNAME]", "(unknown region)"); + notice.setArg("[REGIONPOS]", "(unknown position)"); + } + + // check each permission that was requested, and list each + // permission that has been flagged as a caution permission + BOOL caution = FALSE; + S32 count = 0; + LLString perms; + for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++) + { + if ((orig_questions & LSCRIPTRunTimePermissionBits[i]) && LLNotifyBox::getTemplateIsCaution(SCRIPT_QUESTIONS[i])) + { + count++; + caution = TRUE; + + // add a comma before the permission description if it is not the first permission + // added to the list or the last permission to check + if ((count > 1) && (i < SCRIPT_PERMISSION_EOF)) + { + perms.append(", "); + } + + perms.append(LLNotifyBox::getTemplateMessage(SCRIPT_QUESTIONS[i])); + } + } + + notice.setArg("[PERMISSIONS]", perms); + + // log a chat message as long as at least one requested permission + // is a caution permission + if (caution) + { + LLChat chat(notice.getString()); + LLFloaterChat::addChat(chat, FALSE, FALSE); + } + } +} + +void script_question_decline_cb(S32 option, void* user_data) +{ + LLMessageSystem *msg = gMessageSystem; + LLScriptQuestionCBData *cbdata = (LLScriptQuestionCBData *)user_data; + + // remember the permissions requested so they can be checked + // when it comes time to log a chat message + S32 orig = cbdata->mQuestions; + + // this callback will always decline all permissions requested + // (any question flags set in the ScriptAnswerYes message + // will be interpreted as having been granted, so clearing all + // the bits will deny every permission) + cbdata->mQuestions = 0; + + // respond with the permissions denial + msg->newMessageFast(_PREHASH_ScriptAnswerYes); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_Data); + msg->addUUIDFast(_PREHASH_TaskID, cbdata->mTaskID); + msg->addUUIDFast(_PREHASH_ItemID, cbdata->mItemID); + msg->addS32Fast(_PREHASH_Questions, cbdata->mQuestions); + msg->sendReliable(cbdata->mSender); + + // log a chat message, if appropriate + notify_cautioned_script_question(cbdata, orig, FALSE); + + delete cbdata; +} void script_question_cb(S32 option, void* user_data) { LLMessageSystem *msg = gMessageSystem; LLScriptQuestionCBData *cbdata = (LLScriptQuestionCBData *)user_data; + S32 orig = cbdata->mQuestions; + + // check whether permissions were granted or denied + BOOL allowed = TRUE; + // the "yes/accept" button is the first button in the template, making it button 0 + // if any other button was clicked, the permissions were denied if (option != 0) { cbdata->mQuestions = 0; - } + allowed = FALSE; + } + + // reply with the permissions granted or denied msg->newMessageFast(_PREHASH_ScriptAnswerYes); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -4272,27 +4409,20 @@ void script_question_cb(S32 option, void* user_data) msg->addUUIDFast(_PREHASH_ItemID, cbdata->mItemID); msg->addS32Fast(_PREHASH_Questions, cbdata->mQuestions); msg->sendReliable(cbdata->mSender); + + // only log a chat message if caution prompts are enabled + if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) + { + // log a chat message, if appropriate + notify_cautioned_script_question(cbdata, orig, allowed); + } + delete cbdata; } - void process_script_question(LLMessageSystem *msg, void **user_data) { // XUI:translate owner name -> [FIRST] [LAST] - const LLString script_questions[SCRIPT_PERMISSION_EOF] = - { - "ScriptTakeMoney", - "ActOnControlInputs", - "RemapControlInputs", - "AnimateYourAvatar", - "AttachToYourAvatar", - "ReleaseOwnership", - "LinkAndDelink", - "AddAndRemoveJoints", - "ChangePermissions", - "TrackYourCamera", - "ControlYourCamera" - }; LLHost sender = msg->getSender(); @@ -4302,7 +4432,9 @@ void process_script_question(LLMessageSystem *msg, void **user_data) char object_name[255]; /* Flawfinder: ignore */ char owner_name[DB_FULL_NAME_BUF_SIZE]; /* Flawfinder: ignore */ + // taskid -> object key of object requesting permissions msg->getUUIDFast(_PREHASH_Data, _PREHASH_TaskID, taskid ); + // itemid -> script asset key of script requesting permissions msg->getUUIDFast(_PREHASH_Data, _PREHASH_ItemID, itemid ); msg->getStringFast(_PREHASH_Data, _PREHASH_ObjectName, 255, object_name); msg->getStringFast(_PREHASH_Data, _PREHASH_ObjectOwner, DB_FULL_NAME_BUF_SIZE, owner_name); @@ -4311,23 +4443,48 @@ void process_script_question(LLMessageSystem *msg, void **user_data) LLString script_question; if (questions) { + BOOL caution = FALSE; S32 count = 0; LLString::format_map_t args; args["[OBJECTNAME]"] = object_name; args["[NAME]"] = owner_name; + + // check the received permission flags against each permission for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++) { if (questions & LSCRIPTRunTimePermissionBits[i]) { count++; - script_question += " " + LLNotifyBox::getTemplateMessage(script_questions[i]) + "\n"; + script_question += " " + LLNotifyBox::getTemplateMessage(SCRIPT_QUESTIONS[i]) + "\n"; + + // check whether permission question should cause special caution dialog + caution |= LLNotifyBox::getTemplateIsCaution(SCRIPT_QUESTIONS[i]); } } args["[QUESTIONS]"] = script_question; - LLScriptQuestionCBData *cbdata = new LLScriptQuestionCBData(taskid, itemid, sender, questions); + LLScriptQuestionCBData *cbdata = new LLScriptQuestionCBData(taskid, itemid, sender, questions, object_name, owner_name); + + // check whether cautions are even enabled or not + if (gSavedSettings.getBOOL("PermissionsCautionEnabled")) + { + if (caution) + { + // display the caution permissions prompt + LLNotifyBox::showXml("ScriptQuestionCaution", args, TRUE, script_question_cb, cbdata); + } + else + { + // display the permissions request normally + LLNotifyBox::showXml("ScriptQuestion", args, FALSE, script_question_cb, cbdata); + } + } + else + { + // fall back to default behavior if cautions are entirely disabled + LLNotifyBox::showXml("ScriptQuestion", args, FALSE, script_question_cb, cbdata); + } - LLNotifyBox::showXml("ScriptQuestion", args, script_question_cb, cbdata); } } diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index 5a7ef9d..d237614 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -1571,7 +1571,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Bad, we got a cycle somehow. // Kill both the parent and the child, and // set cache misses for both of them. - llwarns << "Attempting to recover from parenting cycle!" << llendl + llwarns << "Attempting to recover from parenting cycle!" << llendl; llwarns << "Killing " << sent_parentp->getID() << " and " << getID() << llendl; llwarns << "Adding to cache miss list" << llendl; setParent(NULL); @@ -1595,6 +1595,24 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, sent_parentp->addChild(this); } + if( mPartSourcep.notNull() ) + { + LLViewerPartSourceScript *partSourceScript = mPartSourcep.get(); + partSourceScript->setSuspended( FALSE ); + } + + if( mText.notNull() ) + { + LLHUDText *hudText = mText.get(); + hudText->setHidden( FALSE ); + } + + if( mIcon.notNull() ) + { + LLHUDIcon *hudIcon = mIcon.get(); + hudIcon->setHidden( FALSE ); + } + setChanged(MOVED | SILHOUETTE); } else @@ -1609,6 +1627,23 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U32 port = mesgsys->getSenderPort(); gObjectList.orphanize(this, parent_id, ip, port); + if( mPartSourcep.notNull() ) + { + LLViewerPartSourceScript *partSourceScript = mPartSourcep.get(); + partSourceScript->setSuspended( TRUE ); + } + + if( mText.notNull() ) + { + LLHUDText *hudText = mText.get(); + hudText->setHidden( TRUE ); + } + + if( mIcon.notNull() ) + { + LLHUDIcon *hudIcon = mIcon.get(); + hudIcon->setHidden( TRUE ); + } } } } @@ -1686,7 +1721,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Bad, we got a cycle somehow. // Kill both the parent and the child, and // set cache misses for both of them. - llwarns << "Attempting to recover from parenting cycle!" << llendl + llwarns << "Attempting to recover from parenting cycle!" << llendl; llwarns << "Killing " << sent_parentp->getID() << " and " << getID() << llendl; llwarns << "Adding to cache miss list" << llendl; setParent(NULL); @@ -4148,7 +4183,11 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow if (audio_uuid.isNull()) { - if (mAudioSourcep && mAudioSourcep->isLoop() && !mAudioSourcep->hasPendingPreloads()) + if (!mAudioSourcep) + { + return; + } + if (mAudioSourcep->isLoop() && !mAudioSourcep->hasPendingPreloads()) { // We don't clear the sound if it's a loop, it'll go away on its own. // At least, this appears to be how the scripts work. @@ -4158,29 +4197,22 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow gAudiop->cleanupAudioSource(mAudioSourcep); mAudioSourcep = NULL; } - else if (mAudioSourcep) - { - if (mAudioSourcep->isLoop()) - { - // Just shut off the sound - mAudioSourcep->play(LLUUID::null); - } + else if (flags & LL_SOUND_FLAG_STOP) + { + // Just shut off the sound + mAudioSourcep->play(LLUUID::null); } return; } - if (flags & LL_SOUND_FLAG_LOOP) + if (flags & LL_SOUND_FLAG_LOOP + && mAudioSourcep && mAudioSourcep->isLoop() && mAudioSourcep->getCurrentData() + && mAudioSourcep->getCurrentData()->getID() == audio_uuid) { - if (mAudioSourcep && mAudioSourcep->isLoop() && mAudioSourcep->getCurrentData()) - { - if (mAudioSourcep->getCurrentData()->getID() == audio_uuid) - { - //llinfos << "Already playing this sound on a loop, ignoring" << llendl; - return; - } - } + //llinfos << "Already playing this sound on a loop, ignoring" << llendl; + return; } - // don't clean up before previous sound is done. Solves: SL-33486 + // don't clean up before previous sound is done. Solves: SL-33486 if ( mAudioSourcep && mAudioSourcep->isDone() ) { gAudiop->cleanupAudioSource(mAudioSourcep); @@ -4191,11 +4223,16 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow if (mAudioSourcep) { + BOOL queue = flags & LL_SOUND_FLAG_QUEUE; mAudioSourcep->setGain(gain); - mAudioSourcep->setLoop((flags & LL_SOUND_FLAG_LOOP) ? TRUE : FALSE); - mAudioSourcep->setSyncMaster((flags & LL_SOUND_FLAG_SYNC_MASTER) ? TRUE : FALSE); - mAudioSourcep->setSyncSlave((flags & LL_SOUND_FLAG_SYNC_SLAVE) ? TRUE : FALSE); - mAudioSourcep->setQueueSounds((flags & LL_SOUND_FLAG_QUEUE) ? TRUE : FALSE); + mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); + mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER); + mAudioSourcep->setSyncSlave(flags & LL_SOUND_FLAG_SYNC_SLAVE); + mAudioSourcep->setQueueSounds(queue); + if(!queue) // stop any current sound first to avoid "farts of doom" (SL-1541) -MG + { + mAudioSourcep->play(LLUUID::null); + } //llinfos << "Playing attached sound " << audio_uuid << llendl; mAudioSourcep->play(audio_uuid); } diff --git a/linden/indra/newview/llviewerpartsource.cpp b/linden/indra/newview/llviewerpartsource.cpp index e440eae..c0de13a 100644 --- a/linden/indra/newview/llviewerpartsource.cpp +++ b/linden/indra/newview/llviewerpartsource.cpp @@ -47,6 +47,7 @@ LLViewerPartSource::LLViewerPartSource(const U32 type) : mLastUpdateTime = 0.f; mLastPartTime = 0.f; mIsDead = FALSE; + mIsSuspended = FALSE; static U32 id_seed = 0; mID = ++id_seed; } @@ -93,6 +94,9 @@ void LLViewerPartSourceScript::setDead() void LLViewerPartSourceScript::update(const F32 dt) { + if( mIsSuspended ) + return; + LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 old_update_time = mLastUpdateTime; mLastUpdateTime += dt; diff --git a/linden/indra/newview/llviewerpartsource.h b/linden/indra/newview/llviewerpartsource.h index 9d22e72..32e1475 100644 --- a/linden/indra/newview/llviewerpartsource.h +++ b/linden/indra/newview/llviewerpartsource.h @@ -61,9 +61,10 @@ public: virtual void update(const F32 dt); // Return FALSE if this source is dead... virtual void setDead(); - BOOL isDead() const { return mIsDead; } - - U32 getType() const { return mType; } + BOOL isDead() const { return mIsDead; } + void setSuspended( BOOL state ) { mIsSuspended = state; } + BOOL isSuspended() const { return mIsSuspended; } + U32 getType() const { return mType; } static void updatePart(LLViewerPart &part, const F32 dt); void setOwnerUUID(const LLUUID& owner_id) { mOwnerUUID = owner_id; } LLUUID getOwnerUUID() const { return mOwnerUUID; } @@ -77,6 +78,7 @@ public: protected: U32 mType; BOOL mIsDead; + BOOL mIsSuspended; F32 mLastUpdateTime; F32 mLastPartTime; LLUUID mOwnerUUID; diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index 6a8d53e..f6829d4 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp @@ -1425,7 +1425,8 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF LLFontGL* font = LLView::selectFont(node); - LLString text = node->getValue(); + // LLString text = node->getValue(); + LLString text = node->getTextContents().substr(0, max_text_length - 1); if (text.size() > max_text_length) { diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 0f5bffd..116df89 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -2400,13 +2400,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) case KEY_RIGHT: case KEY_UP: // let CTRL UP through for chat line history - if( MASK_CONTROL & mask ) + if( MASK_CONTROL == mask ) { break; } case KEY_DOWN: // let CTRL DOWN through for chat line history - if( MASK_CONTROL & mask ) + if( MASK_CONTROL == mask ) { break; } @@ -3173,7 +3173,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL moveable_object_selected = FALSE; BOOL all_selected_objects_move = TRUE; BOOL all_selected_objects_modify = TRUE; - BOOL selecting_linked_set = gSavedSettings.getBOOL("SelectLinkedSet"); + BOOL selecting_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); for( object = gSelectMgr->getSelection()->getFirstObject(); object; object = gSelectMgr->getSelection()->getNextObject() ) { BOOL this_object_movable = FALSE; @@ -3532,6 +3532,18 @@ void LLViewerWindow::performPick() objectp = gObjectList.getSelectedObject(name); if (objectp) { + LLViewerObject* parent = (LLViewerObject*)(objectp->getParent()); + if (NULL == parent) { + // if you are the parent + parent = objectp; + } + std::vector,std::allocator > > children = parent->getChildren(); + for( std::vector,std::allocator > >::iterator i= children.begin(); i!= children.end(); ++i ) + { + //go through + LLViewerObject* foo = *i; + foo->getRotation(); + } if (objectp->mbCanSelect) { te_offset = (te_offset == 16) ? NO_FACE : te_offset; diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 4de4e36..a375d84 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -5739,6 +5739,7 @@ void LLVOAvatar::requestLayerSetUpdate( LLVOAvatar::ELocTexIndex i ) break; + case LOCTEX_UPPER_JACKET: case LOCTEX_LOWER_JACKET: if( mUpperBodyLayerSet ) { @@ -5750,6 +5751,10 @@ void LLVOAvatar::requestLayerSetUpdate( LLVOAvatar::ELocTexIndex i ) mLowerBodyLayerSet->requestUpdate(); } break; + + case LOCTEX_NUM_ENTRIES: + llerrs << "Bogus texture value " << i << llendl; + break; } } @@ -7409,6 +7414,24 @@ void LLVOAvatar::setCachedBakedTexture( ETextureIndex te, const LLUUID& uuid ) mSkirtLayerSet->cancelUpload(); } break; + + case TEX_HEAD_BODYPAINT: + case TEX_UPPER_SHIRT: + case TEX_LOWER_PANTS: + case TEX_EYES_IRIS: + case TEX_HAIR: + case TEX_UPPER_BODYPAINT: + case TEX_LOWER_BODYPAINT: + case TEX_LOWER_SHOES: + case TEX_LOWER_SOCKS: + case TEX_UPPER_JACKET: + case TEX_LOWER_JACKET: + case TEX_UPPER_GLOVES: + case TEX_UPPER_UNDERSHIRT: + case TEX_LOWER_UNDERPANTS: + case TEX_SKIRT: + case TEX_NUM_ENTRIES: + break; } } diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index 2a2c0f0..427293a 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h @@ -256,8 +256,7 @@ public: (1 << LLVertexBuffer::TYPE_TEXCOORD) | (1 << LLVertexBuffer::TYPE_WEIGHT) | (1 << LLVertexBuffer::TYPE_CLOTHWEIGHT) - } - eVertexDataMask; + }; LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); /*virtual*/ void markDead(); diff --git a/linden/indra/newview/llvoinventorylistener.cpp b/linden/indra/newview/llvoinventorylistener.cpp index 739cd0b..1a50682 100644 --- a/linden/indra/newview/llvoinventorylistener.cpp +++ b/linden/indra/newview/llvoinventorylistener.cpp @@ -33,7 +33,7 @@ void LLVOInventoryListener::removeVOInventoryListener() { - if (mListenerVObject != NULL) + if (mListenerVObject) { mListenerVObject->removeInventoryListener(this); mListenerVObject = NULL; @@ -52,7 +52,7 @@ void LLVOInventoryListener::registerVOInventoryListener(LLViewerObject* object, void LLVOInventoryListener::requestVOInventory() { - if (mListenerVObject != NULL) + if (mListenerVObject) { mListenerVObject->requestInventory(); } diff --git a/linden/indra/newview/llvoinventorylistener.h b/linden/indra/newview/llvoinventorylistener.h index 4cb90a6..022713e 100644 --- a/linden/indra/newview/llvoinventorylistener.h +++ b/linden/indra/newview/llvoinventorylistener.h @@ -56,7 +56,7 @@ protected: void requestVOInventory(); private: - LLViewerObject* mListenerVObject; + LLPointer mListenerVObject; }; #endif diff --git a/linden/indra/newview/llvopartgroup.cpp b/linden/indra/newview/llvopartgroup.cpp index fbf753a..94027a3 100644 --- a/linden/indra/newview/llvopartgroup.cpp +++ b/linden/indra/newview/llvopartgroup.cpp @@ -421,7 +421,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co continue; } - LLAlphaObject* obj = (LLAlphaObject*) drawablep->getVObj(); + LLAlphaObject* obj = (LLAlphaObject*) drawablep->getVObj().get(); obj->mDepth = 0.f; if (drawablep->isAnimating()) diff --git a/linden/indra/newview/llvopartgroup.h b/linden/indra/newview/llvopartgroup.h index f3e10c5..f301a48 100644 --- a/linden/indra/newview/llvopartgroup.h +++ b/linden/indra/newview/llvopartgroup.h @@ -39,14 +39,13 @@ class LLViewerPartGroup; class LLVOPartGroup : public LLAlphaObject { public: - enum + enum { VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | (1 << LLVertexBuffer::TYPE_NORMAL) | (1 << LLVertexBuffer::TYPE_TEXCOORD) | (1 << LLVertexBuffer::TYPE_COLOR) - } - eVertexDataMask; + }; LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); diff --git a/linden/indra/newview/llvosurfacepatch.h b/linden/indra/newview/llvosurfacepatch.h index a21763d..e6a6f44 100644 --- a/linden/indra/newview/llvosurfacepatch.h +++ b/linden/indra/newview/llvosurfacepatch.h @@ -39,15 +39,14 @@ class LLVector2; class LLVOSurfacePatch : public LLStaticViewerObject { public: - enum + enum { VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | (1 << LLVertexBuffer::TYPE_NORMAL) | (1 << LLVertexBuffer::TYPE_TEXCOORD) | (1 << LLVertexBuffer::TYPE_TEXCOORD2) | (1 << LLVertexBuffer::TYPE_COLOR) - } - eVertexDataMask; + }; LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); diff --git a/linden/indra/newview/llvotree.h b/linden/indra/newview/llvotree.h index 4ec148d..6de7c0d 100644 --- a/linden/indra/newview/llvotree.h +++ b/linden/indra/newview/llvotree.h @@ -43,13 +43,12 @@ protected: ~LLVOTree(); public: - enum + enum { VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | (1 << LLVertexBuffer::TYPE_NORMAL) | (1 << LLVertexBuffer::TYPE_TEXCOORD) - } - eVertexDataMask; + }; LLVOTree(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index b9bdddc..ccf0cba 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -66,6 +66,7 @@ const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; +const S32 SCULPT_REZ = 128; BOOL gAnimateTextures = TRUE; extern BOOL gHideSelectedObjects; @@ -272,9 +273,9 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, void LLVOVolume::animateTextures() { F32 off_s = 0.f, off_t = 0.f, scale_s = 1.f, scale_t = 1.f, rot = 0.f; - S32 result; + S32 result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot); - if (result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot)) + if (result) { if (!mTexAnimMode) { @@ -484,10 +485,11 @@ void LLVOVolume::updateTextures() mSculptTexture = gImageList.getImage(id); if (mSculptTexture.notNull()) { - mSculptTexture->addTextureStats(mPixelArea); + mSculptTexture->addTextureStats(SCULPT_REZ * SCULPT_REZ); + mSculptTexture->setBoostLevel(LLViewerImage::BOOST_SCULPTED); } - S32 desired_discard = MAX_LOD - mLOD; + S32 desired_discard = 0; // lower discard levels have MUCH less resolution - (old=MAX_LOD - mLOD) S32 current_discard = getVolume()->getSculptLevel(); if (desired_discard != current_discard) @@ -701,7 +703,7 @@ void LLVOVolume::sculpt() if (mSculptTexture.notNull()) { S32 discard_level; - S32 desired_discard = MAX_LOD - mLOD; // desired + S32 desired_discard = 0; // lower discard levels have MUCH less resolution discard_level = desired_discard; @@ -2210,7 +2212,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { LLDrawable* drawablep = *drawable_iter; - if (drawablep->isDead()) + if (drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) ) { continue; } diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h index f5dfeb0..5881c04 100644 --- a/linden/indra/newview/llvovolume.h +++ b/linden/indra/newview/llvovolume.h @@ -83,8 +83,7 @@ public: (1 << LLVertexBuffer::TYPE_TEXCOORD) | (1 << LLVertexBuffer::TYPE_TEXCOORD2) | (1 << LLVertexBuffer::TYPE_COLOR) - } - eVertexDataMask; + }; public: LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); diff --git a/linden/indra/newview/llvowater.h b/linden/indra/newview/llvowater.h index 8ed795c..0bb0c46 100644 --- a/linden/indra/newview/llvowater.h +++ b/linden/indra/newview/llvowater.h @@ -52,8 +52,7 @@ public: VERTEX_DATA_MASK = (1 << LLVertexBuffer::TYPE_VERTEX) | (1 << LLVertexBuffer::TYPE_NORMAL) | (1 << LLVertexBuffer::TYPE_TEXCOORD) - } - eVertexDataMask; + }; LLVOWater(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); diff --git a/linden/indra/newview/llwebbrowserctrl.h b/linden/indra/newview/llwebbrowserctrl.h index 7097036..785f28b 100644 --- a/linden/indra/newview/llwebbrowserctrl.h +++ b/linden/indra/newview/llwebbrowserctrl.h @@ -154,6 +154,8 @@ class LLWebBrowserCtrlEventEmitter ObserverContainer observers; }; +class LLUICtrlFactory; + //////////////////////////////////////////////////////////////////////////////// // class LLWebBrowserCtrl : @@ -249,7 +251,7 @@ class LLWebBrowserCtrl : class LLWebBrowserTexture : public LLDynamicTexture { public: - LLWebBrowserTexture::LLWebBrowserTexture( S32 width, S32 height, LLWebBrowserCtrl* browserCtrl, int browserWindow ); + LLWebBrowserTexture( S32 width, S32 height, LLWebBrowserCtrl* browserCtrl, int browserWindow ); virtual ~LLWebBrowserTexture(); virtual void preRender( BOOL clear_depth = TRUE ) {}; diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 9c71ee4..7696431 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -501,6 +501,8 @@ F32 LLWorld::resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d land_intersection.mdV[VZ] = regionp->getLand().resolveHeightGlobal(point_a); normalized_land_distance = (F32)(point_a.mdV[VZ] - land_intersection.mdV[VZ]) / segment_length; + intersection = land_intersection; + intersection_normal = resolveLandNormalGlobal(land_intersection); if (avatarp && !avatarp->mFootPlane.isExactlyClear()) { @@ -511,17 +513,13 @@ F32 LLWorld::resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d norm_dist_from_plane = llclamp(norm_dist_from_plane / segment_length, 0.f, 1.f); if (norm_dist_from_plane < normalized_land_distance) { + // collided with object before land normalized_land_distance = norm_dist_from_plane; intersection = point_a; intersection.mdV[VZ] -= norm_dist_from_plane * segment_length; intersection_normal = foot_plane_normal; } } - else - { - intersection = land_intersection; - intersection_normal = resolveLandNormalGlobal(land_intersection); - } return normalized_land_distance; } diff --git a/linden/indra/newview/llxmlrpctransaction.cpp b/linden/indra/newview/llxmlrpctransaction.cpp index 896508c..887b69d 100644 --- a/linden/indra/newview/llxmlrpctransaction.cpp +++ b/linden/indra/newview/llxmlrpctransaction.cpp @@ -228,22 +228,22 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) // tell curl about the settings curl_easy_setopt(mCurl, CURLOPT_PROXY, mProxyAddress.c_str()); - curl_easy_setopt(mCurl, CURLOPT_PROXYPORT, (long)port); - curl_easy_setopt(mCurl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + curl_easy_setopt(mCurl, CURLOPT_PROXYPORT, (long) port); + curl_easy_setopt(mCurl, CURLOPT_PROXYTYPE, (long) CURLPROXY_HTTP); }; -// curl_easy_setopt(mCurl, CURLOPT_VERBOSE, 1); // usefull for debugging - curl_easy_setopt(mCurl, CURLOPT_NOSIGNAL, 1); +// curl_easy_setopt(mCurl, CURLOPT_VERBOSE, 1L); // usefull for debugging + curl_easy_setopt(mCurl, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt(mCurl, CURLOPT_WRITEFUNCTION, &curlDownloadCallback); curl_easy_setopt(mCurl, CURLOPT_WRITEDATA, this); curl_easy_setopt(mCurl, CURLOPT_ERRORBUFFER, &mCurlErrorBuffer); curl_easy_setopt(mCurl, CURLOPT_CAINFO, gDirUtilp->getCAFile().c_str()); - curl_easy_setopt(mCurl, CURLOPT_SSL_VERIFYPEER, gVerifySSLCert); - curl_easy_setopt(mCurl, CURLOPT_SSL_VERIFYHOST, gVerifySSLCert? 2 : 0); + curl_easy_setopt(mCurl, CURLOPT_SSL_VERIFYPEER, (long) gVerifySSLCert); + curl_easy_setopt(mCurl, CURLOPT_SSL_VERIFYHOST, gVerifySSLCert? 2L : 0L); /* Setting the DNS cache timeout to -1 disables it completely. This might help with bug #503 */ - curl_easy_setopt(mCurl, CURLOPT_DNS_CACHE_TIMEOUT, -1); + curl_easy_setopt(mCurl, CURLOPT_DNS_CACHE_TIMEOUT, -1L); mHeaders = curl_slist_append(mHeaders, "Content-Type: text/xml"); curl_easy_setopt(mCurl, CURLOPT_URL, mURI.c_str()); @@ -257,7 +257,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) if (mRequestText) { curl_easy_setopt(mCurl, CURLOPT_POSTFIELDS, mRequestText); - curl_easy_setopt(mCurl, CURLOPT_POSTFIELDSIZE, mRequestTextSize); + curl_easy_setopt(mCurl, CURLOPT_POSTFIELDSIZE, (long) mRequestTextSize); } else { diff --git a/linden/indra/newview/macview.xcodeproj/project.pbxproj b/linden/indra/newview/macview.xcodeproj/project.pbxproj index 8bc52b1..02be1d5 100644 --- a/linden/indra/newview/macview.xcodeproj/project.pbxproj +++ b/linden/indra/newview/macview.xcodeproj/project.pbxproj @@ -429,6 +429,11 @@ 61923D70074AE3C0005E1F34 /* llvisualparam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 61923D29074AE3C0005E1F34 /* llvisualparam.cpp */; }; 84401E2F0A13CC9A006720A5 /* llfloatergroupinvite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84401E2D0A13CC9A006720A5 /* llfloatergroupinvite.cpp */; }; 84401E320A13CCB2006720A5 /* llpanelgroupinvite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84401E300A13CCB2006720A5 /* llpanelgroupinvite.cpp */; }; + 8833693F0C18AF33007F52DA /* llimagepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8833693B0C18AF33007F52DA /* llimagepng.cpp */; }; + 883369400C18AF33007F52DA /* llpngwrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8833693C0C18AF33007F52DA /* llpngwrapper.cpp */; }; + 88A95BB20C14D5FC0027E363 /* llsrv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 88A95BB10C14D5FC0027E363 /* llsrv.cpp */; }; + 88A95BCA0C14D92C0027E363 /* libresolv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 88A95BC90C14D92C0027E363 /* libresolv.dylib */; }; + 88AA282C0C17720D0032DF53 /* libpng12.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 88AA282B0C17720D0032DF53 /* libpng12.a */; }; 9104C0CC0778AE0F001EC4F6 /* llpanelmsgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9104C0CB0778AE0F001EC4F6 /* llpanelmsgs.cpp */; }; 910D255306484F1A0034E66F /* llvolumesliderctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 910D255206484F1A0034E66F /* llvolumesliderctrl.cpp */; }; 9118669B07F4FAF700E3D5BC /* llmediaremotectrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9118669907F4FAF700E3D5BC /* llmediaremotectrl.cpp */; }; @@ -1487,6 +1492,13 @@ 84401E2E0A13CC9A006720A5 /* llfloatergroupinvite.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llfloatergroupinvite.h; sourceTree = ""; }; 84401E300A13CCB2006720A5 /* llpanelgroupinvite.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpanelgroupinvite.cpp; sourceTree = ""; }; 84401E310A13CCB2006720A5 /* llpanelgroupinvite.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llpanelgroupinvite.h; sourceTree = ""; }; + 8833693B0C18AF33007F52DA /* llimagepng.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llimagepng.cpp; sourceTree = ""; }; + 8833693C0C18AF33007F52DA /* llpngwrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpngwrapper.cpp; sourceTree = ""; }; + 8833693D0C18AF33007F52DA /* llpngwrapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llpngwrapper.h; sourceTree = ""; }; + 8833693E0C18AF33007F52DA /* llimagepng.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llimagepng.h; sourceTree = ""; }; + 88A95BB10C14D5FC0027E363 /* llsrv.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llsrv.cpp; sourceTree = SOURCE_ROOT; }; + 88A95BC90C14D92C0027E363 /* libresolv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libresolv.dylib; path = /usr/lib/libresolv.dylib; sourceTree = ""; }; + 88AA282B0C17720D0032DF53 /* libpng12.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpng12.a; sourceTree = BUILT_PRODUCTS_DIR; }; 8B2ECF9E0534C17A00A80059 /* llfirstuse.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llfirstuse.h; sourceTree = ""; }; 8B2ECFA00534C21A00A80059 /* llfirstuse.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfirstuse.cpp; sourceTree = ""; }; 9104C0CB0778AE0F001EC4F6 /* llpanelmsgs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpanelmsgs.cpp; sourceTree = ""; }; @@ -2195,6 +2207,8 @@ 99F998FB0BAA34B90034E41C /* libopenjpeg.a in Frameworks */, 99F99A160BAA3D4C0034E41C /* AGL.framework in Frameworks */, 99F99A190BAA3D520034E41C /* OpenGL.framework in Frameworks */, + 88A95BCA0C14D92C0027E363 /* libresolv.dylib in Frameworks */, + 88AA282C0C17720D0032DF53 /* libpng12.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2338,230 +2352,156 @@ 26F529A0051F61CD00A80050 /* newview */ = { isa = PBXGroup; children = ( - 1A83767C0BA2169600F28979 /* llviewergenericmessage.h */, - 1A83767D0BA2169600F28979 /* llviewergenericmessage.cpp */, - 9C18425A0B9F951500208356 /* llcaphttpsender.cpp */, - 1A8870E30BCC5A9500E89AA6 /* llviewermenufile.h */, - 1A8870E40BCC5A9500E89AA6 /* llviewermenufile.cpp */, - A3C20E4B0BB0BD12007E872B /* llviewerjoystick.cpp */, - A3C20E490BB0BCDF007E872B /* llglslshader.cpp */, - AAF5FFD00B13F71900D28A84 /* lltexturecache.cpp */, - AAF5FFD10B13F71900D28A84 /* lltexturecache.h */, - AA02B9BA0B0CE44D00F2996D /* lltexturefetch.cpp */, - AA02B9BB0B0CE44D00F2996D /* lltexturefetch.h */, - C16C084E0B4AE6C7009AD67F /* llfloaterinspect.cpp */, - C16C084F0B4AE6C7009AD67F /* llfloaterinspect.h */, - C64F67400AFBED91009732B5 /* lldirpicker.cpp */, - C64F67410AFBED91009732B5 /* lldirpicker.h */, - C64F673D0AFBED80009732B5 /* lllogchat.cpp */, - C64F673E0AFBED80009732B5 /* lllogchat.h */, - 1AF7C1E30AF6C44800C4BF4A /* llweb.cpp */, - FDCB55270AFBD4310033B433 /* lleventpoll.cpp */, - FDCB55280AFBD4310033B433 /* lleventpoll.h */, - FD59ED5D0AF2AF460086642A /* llassetuploadresponders.cpp */, - FD59ED5E0AF2AF460086642A /* llassetuploadresponders.h */, - 1A5104580ABF60BF00520F6D /* llviewerassetstorage.h */, - 1A5104560ABF60A800520F6D /* llviewerassetstorage.cpp */, - 1AF9CA460AE972DA003EFF2D /* llfloateravatartextures.cpp */, - 1AD61F6A0AC09B1900507FB9 /* llimview.cpp */, - A3285A3A0A71425100F619A5 /* llinventoryactions.cpp */, - A3285A340A71419F00F619A5 /* llinventorybridge.cpp */, - 1A5B3B540A70147000A90391 /* llfloaterbump.cpp */, - 1A61A7EF0A5ED446009FE3D2 /* llfloateravatarpicker.cpp */, - A3D968F00A6EBCA7007E8BD2 /* llfloaternewim.cpp */, - A3AF6BCE0A544EF0005B5E2C /* llpanellogin.cpp */, - 1A758C950A436FDE00589675 /* llpanellandoptions.cpp */, - 1A758C930A436FD800589675 /* llpanellandobjects.cpp */, - 1A758C910A436FCA00589675 /* llagentdata.cpp */, - AAC121A30A93A8380080E8A9 /* llfloatersellland.cpp */, - AAC121A40A93A8380080E8A9 /* llfloatersellland.h */, - 9C1853AD0A91175E00DA7B01 /* llviewercontrol.cpp */, - AA0E2A620A2FDB340066250A /* lltoolpipette.cpp */, - AA0E2A630A2FDB340066250A /* lltoolpipette.h */, - 1AFA40B40A2DFD7200C13F70 /* llsavedsettingsglue.cpp */, - 1A8BF3780A1AAB99005B9D5A /* llfloatertest.cpp */, - 1A3143E00A02B73D005B87E7 /* llprefschat.cpp */, - 1A3143DE0A02B737005B87E7 /* llprefsim.cpp */, - 1A3143D00A02B701005B87E7 /* llviewernetwork.cpp */, - FD870C4F09EAC19700F5956C /* lldrawpoolclouds.h */, - A3077BFB09DCB8140059ED75 /* lldrawpoolstars.cpp */, - A3077BFC09DCB8140059ED75 /* lldrawpoolstars.h */, - A3077BFF09DCB8140059ED75 /* llfloaterhtmlhelp.cpp */, - A3077C0009DCB8140059ED75 /* llfloaterhtmlhelp.h */, - 99C6BFA80A1BBD4800419AE7 /* llfloaterhtmlfind.h */, - 99C6BFA90A1BBD4800419AE7 /* llfloaterhtmlfind.cpp */, - A3077C0309DCB8140059ED75 /* llpanelvolume.cpp */, - A3077C0409DCB8140059ED75 /* llpanelvolume.h */, - A3077C0509DCB8140059ED75 /* llvostars.cpp */, - A3077C0609DCB8140059ED75 /* llvostars.h */, - 9CD49D5909D0BB1500192434 /* lllocalanimationobject.cpp */, - 9CD49D5A09D0BB1500192434 /* lllocalanimationobject.h */, - 9CD49D5809D0BAD600192434 /* llflexibleobject.h */, - 9CD49D5609D0BAC100192434 /* llflexibleobject.cpp */, - 84401E2D0A13CC9A006720A5 /* llfloatergroupinvite.cpp */, - FD6C9A4209C75B8900AA1849 /* llfloatertopobjects.cpp */, - 2EFEA8E809F4556F00CB0193 /* llgroupnotify.cpp */, - 84401E300A13CCB2006720A5 /* llpanelgroupinvite.cpp */, - 2EA4CEEC09F83AC2008F60F7 /* llpanelgrouproles.cpp */, - 2EA4CEED09F83BE8008F60F7 /* llpanelgrouplandmoney.cpp */, - FD6C9A4309C75B8900AA1849 /* llfloatertopobjects.h */, - FD6C9A3409C75A8500AA1849 /* llfloaterpermissionsmgr.cpp */, - 2E6FE90D09FD560A00AF02FF /* llpanelgroupnotices.cpp */, - FD6C9A3509C75A8500AA1849 /* llfloaterpermissionsmgr.h */, - FD6C9A2109C758BC00AA1849 /* llfloaterscriptdebug.cpp */, - FD6C9A2209C758BC00AA1849 /* llfloaterscriptdebug.h */, - FD6C9A2309C758BC00AA1849 /* llfloatertelehub.cpp */, - 2EFEA8F009F4588B00CB0193 /* llpanelgroupgeneral.cpp */, - FD6C9A2409C758BC00AA1849 /* llfloatertelehub.h */, - FD6C9A2509C758BC00AA1849 /* llfollowcam.cpp */, - FD6C9A2609C758BC00AA1849 /* llfollowcam.h */, - FD6C9A2709C758BC00AA1849 /* llhudicon.cpp */, - FD6C9A2809C758BC00AA1849 /* llhudicon.h */, - 99E43515092D64E6003AE728 /* llvoinventorylistener.h */, - 99E43516092D64E6003AE728 /* llvoinventorylistener.cpp */, - 99E43512092D64CC003AE728 /* llmemoryview.h */, - 99E43513092D64CC003AE728 /* llmemoryview.cpp */, - 99E4350F092D64A4003AE728 /* llfloaterbuycurrency.cpp */, - 99E43510092D64A4003AE728 /* llfloaterbuycurrency.h */, - 99BB5166099ABDEB004BF9F2 /* llfloaterbuyland.cpp */, - 99BB5167099ABDEB004BF9F2 /* llfloaterbuyland.h */, - 99BB5169099AC1AE004BF9F2 /* llxmlrpctransaction.h */, - 99BB516A099AC1AE004BF9F2 /* llxmlrpctransaction.cpp */, - 99BB516D099AC1E9004BF9F2 /* llviewchildren.cpp */, - 99BB516E099AC1E9004BF9F2 /* llviewchildren.h */, - 99BB5170099AC1FC004BF9F2 /* llcurrencyuimanager.cpp */, - 99BB5171099AC1FC004BF9F2 /* llcurrencyuimanager.h */, - 99BB5174099AC2A4004BF9F2 /* llconfirmationmanager.cpp */, - 99BB5175099AC2A4004BF9F2 /* llconfirmationmanager.h */, - 1A89230608B12D2E00A04AA9 /* llfloateropenobject.cpp */, - 1A89230708B12D2E00A04AA9 /* llfloateropenobject.h */, - 1A89230308B12D1000A04AA9 /* llurlwhitelist.cpp */, - 1A89230408B12D1000A04AA9 /* llurlwhitelist.h */, - E224ACBC0874D6150039C1A6 /* llfloaterimport.cpp */, - E224ACBD0874D6150039C1A6 /* llfloaterimport.h */, - 1A47B8DD0860FDF100F73746 /* llpanelweb.h */, - 1A47B8DE0860FDF100F73746 /* llpanelweb.cpp */, - 1AE5D70F0844FBD200278605 /* llwebbrowserctrl.h */, - 1AE5D7100844FBD300278605 /* llwebbrowserctrl.cpp */, - EB3EE709083AC23D002BF676 /* lldynamictexture.h */, - EB3EE70A083AC23D002BF676 /* llfloateranimpreview.h */, - 1A9EC23A083EA01F0023D510 /* llfloatereditui.h */, - 1A9EC236083EA0100023D510 /* llfloatereditui.cpp */, - EB3EE70B083AC23D002BF676 /* llfloaterimagepreview.h */, - EB3EE70C083AC23D002BF676 /* llgroupmgr.h */, - EB3EE70D083AC23D002BF676 /* llpreviewanim.h */, - EB3EE70F083AC23D002BF676 /* llviewercontrol.h */, - EB3EE712083AC23D002BF676 /* llviewertexteditor.cpp */, - EB3EE713083AC23D002BF676 /* llviewertexteditor.h */, - EB3EE714083AC23D002BF676 /* llvieweruictrlfactory.cpp */, - EB3EE715083AC23D002BF676 /* llvieweruictrlfactory.h */, - EB3EE716083AC23D002BF676 /* llvolumesliderctrl.h */, - 91A15600081EE8060089988C /* llfloaterhtml.h */, - 91A155FE081EE7F70089988C /* llfloaterhtml.cpp */, - 9118669907F4FAF700E3D5BC /* llmediaremotectrl.cpp */, - 9118669A07F4FAF700E3D5BC /* llmediaremotectrl.h */, - 91E86C3107BD3B3A00F56E75 /* llfloatersaveavatar.cpp */, - A241CB7B07B3DE0D001A39E3 /* llviewerprecompiledheaders.cpp */, - A241CB7C07B3DE0D001A39E3 /* llviewerprecompiledheaders.h */, - 913AA1FC079855E900D111CE /* llfloaterfriends.cpp */, - 91287B4A078DE4B300E958B2 /* llviewerkeyboard.cpp */, - 91287B4B078DE4B300E958B2 /* llviewerkeyboard.h */, - 9104C0CB0778AE0F001EC4F6 /* llpanelmsgs.cpp */, - 911CAD92075BEAAC00CD1090 /* lltoolselect.cpp */, - 911CAD8A075BE90600CD1090 /* llgroupmgr.cpp */, - 911CAD86075BE87B00CD1090 /* llinventoryview.cpp */, - 916724C407551DF600CA4513 /* llfloatercolorpicker.cpp */, - 916724C207551DE400CA4513 /* llfloatercolorpicker.h */, - 918166CA06516C59005727DC /* llaudiosourcevo.cpp */, - 915F492806B5738A00F629BF /* lleventinfo.cpp */, - 915F492006B572E700F629BF /* lleventnotifier.cpp */, - 912541AD0691FF79008C66F7 /* llfasttimerview.cpp */, - 91FC1C8706527F19009CF498 /* llpreviewanim.cpp */, - 91DF401F06A739BA00CA7FE5 /* llstartup.cpp */, - 910D255206484F1A0034E66F /* llvolumesliderctrl.cpp */, - 91B9EB8206370586007B3F3E /* lldynamictexture.cpp */, - 91F8BBAB062DF91A00DE42BA /* llgesturemgr.cpp */, - 91F8BBA3062DF7AB00DE42BA /* llpreviewgesture.cpp */, - 91E7BB2105EFCBA40026CC40 /* llviewerdisplay.cpp */, - 019200F004DD7D2B00A800A7 /* macview_Prefix.h */, - 26C5F3E605DB1E3C00994065 /* llfloaterpostcard.cpp */, - 2613A6D905D843D80041A7A9 /* llfloatersnapshot.cpp */, - 91D2527605C9C0620099BB54 /* llfloaterauction.cpp */, - 9131094305C6D5A300A18084 /* llpanelpick.cpp */, - 91E36BB705B4C70600C919E4 /* llpanelinput.cpp */, 26F52A9D051F61DF00A80050 /* head.cpp */, 26F52A41051F61DF00A80050 /* llagent.cpp */, + 1A758C910A436FCA00589675 /* llagentdata.cpp */, 26F52A5D051F61DF00A80050 /* llagentpilot.cpp */, + FD59ED5D0AF2AF460086642A /* llassetuploadresponders.cpp */, + FD59ED5E0AF2AF460086642A /* llassetuploadresponders.h */, 26F52AB2051F61DF00A80050 /* llasynchostbyname.cpp */, + 918166CA06516C59005727DC /* llaudiosourcevo.cpp */, 26F52AB3051F61DF00A80050 /* llaudiostatus.cpp */, 26F52A33051F61DF00A80050 /* llbbox.cpp */, 26F52ABF051F61DF00A80050 /* llbox.cpp */, 26F529F0051F61DF00A80050 /* llcallbacklist.cpp */, 26F52A8C051F61DF00A80050 /* llcallingcard.cpp */, 26F52AC5051F61DF00A80050 /* llcameraview.cpp */, + 9C18425A0B9F951500208356 /* llcaphttpsender.cpp */, + 91D530D2056EE57900CD1AD7 /* llchatbar.cpp */, 991ED2DF0883646B003EC818 /* llclassifiedinfo.cpp */, 26F52A3B051F61DF00A80050 /* llcloud.cpp */, 26F52AA9051F61DF00A80050 /* llcolorscheme.cpp */, 26F52A83051F61DF00A80050 /* llcolorswatch.cpp */, 26F52AA8051F61DF00A80050 /* llcompass.cpp */, 26F52AC6051F61DF00A80050 /* llcompilequeue.cpp */, + 99BB5174099AC2A4004BF9F2 /* llconfirmationmanager.cpp */, + 99BB5175099AC2A4004BF9F2 /* llconfirmationmanager.h */, 26F52A03051F61DF00A80050 /* llconsole.cpp */, 26F52A78051F61DF00A80050 /* llcontainerview.cpp */, 26F52A1B051F61DF00A80050 /* llcontroldef.cpp */, 26F52A1A051F61DF00A80050 /* llcountdown.cpp */, 26F52ACB051F61DF00A80050 /* llcubemap.cpp */, + 99BB5170099AC1FC004BF9F2 /* llcurrencyuimanager.cpp */, + 99BB5171099AC1FC004BF9F2 /* llcurrencyuimanager.h */, 26F52A86051F61DF00A80050 /* llcylinder.cpp */, 26F52AA2051F61DF00A80050 /* lldebugview.cpp */, + C64F67400AFBED91009732B5 /* lldirpicker.cpp */, + C64F67410AFBED91009732B5 /* lldirpicker.h */, 26F52A64051F61DF00A80050 /* lldrawable.cpp */, 26F52A2C051F61DF00A80050 /* lldrawpool.cpp */, 26F52A26051F61DF00A80050 /* lldrawpoolalpha.cpp */, 26F52A5E051F61DF00A80050 /* lldrawpoolavatar.cpp */, 26F52A53051F61DF00A80050 /* lldrawpoolbump.cpp */, + FD870C4F09EAC19700F5956C /* lldrawpoolclouds.h */, 26F52A95051F61DF00A80050 /* lldrawpoolground.cpp */, 26F52ACA051F61DF00A80050 /* lldrawpoolsimple.cpp */, 26F52A14051F61DF00A80050 /* lldrawpoolsky.cpp */, + A3077BFB09DCB8140059ED75 /* lldrawpoolstars.cpp */, + A3077BFC09DCB8140059ED75 /* lldrawpoolstars.h */, 26F529EF051F61DF00A80050 /* lldrawpoolterrain.cpp */, 26F52A7B051F61DF00A80050 /* lldrawpooltree.cpp */, 26F52A3F051F61DF00A80050 /* lldrawpoolwater.cpp */, 26F52A84051F61DF00A80050 /* lldriverparam.cpp */, + 91B9EB8206370586007B3F3E /* lldynamictexture.cpp */, + EB3EE709083AC23D002BF676 /* lldynamictexture.h */, 26F52A62051F61DF00A80050 /* llemote.cpp */, + 915F492806B5738A00F629BF /* lleventinfo.cpp */, + 915F492006B572E700F629BF /* lleventnotifier.cpp */, + FDCB55270AFBD4310033B433 /* lleventpoll.cpp */, + FDCB55280AFBD4310033B433 /* lleventpoll.h */, 26F52A3A051F61DF00A80050 /* llface.cpp */, + 912541AD0691FF79008C66F7 /* llfasttimerview.cpp */, 263E02FE05239C9A00A80050 /* llfeaturemanager.cpp */, 26F52AAC051F61DF00A80050 /* llfft.cpp */, 26F52AD3051F61DF00A80050 /* llfilepicker.cpp */, + 8B2ECFA00534C21A00A80059 /* llfirstuse.cpp */, 8B2ECF9E0534C17A00A80059 /* llfirstuse.h */, + 9CD49D5609D0BAC100192434 /* llflexibleobject.cpp */, + 9CD49D5809D0BAD600192434 /* llflexibleobject.h */, 26F52A82051F61DF00A80050 /* llfloaterabout.cpp */, 916083920649560B00CAF63E /* llfloateranimpreview.cpp */, + EB3EE70A083AC23D002BF676 /* llfloateranimpreview.h */, + 91D2527605C9C0620099BB54 /* llfloaterauction.cpp */, 26F52A8B051F61DF00A80050 /* llfloateravatarinfo.cpp */, + 1A61A7EF0A5ED446009FE3D2 /* llfloateravatarpicker.cpp */, + 1AF9CA460AE972DA003EFF2D /* llfloateravatartextures.cpp */, 26F52A05051F61DF00A80050 /* llfloaterbuildoptions.cpp */, + 1A5B3B540A70147000A90391 /* llfloaterbump.cpp */, 26F52AB6051F61DF00A80050 /* llfloaterbuy.cpp */, + 9130442A057428D800571B0A /* llfloaterbuycontents.cpp */, + 99E4350F092D64A4003AE728 /* llfloaterbuycurrency.cpp */, + 99E43510092D64A4003AE728 /* llfloaterbuycurrency.h */, + 99BB5166099ABDEB004BF9F2 /* llfloaterbuyland.cpp */, + 99BB5167099ABDEB004BF9F2 /* llfloaterbuyland.h */, 26F52A02051F61DF00A80050 /* llfloaterchat.cpp */, 91CB311506FB584C00DBCE1E /* llfloaterclothing.cpp */, + 916724C407551DF600CA4513 /* llfloatercolorpicker.cpp */, + 916724C207551DE400CA4513 /* llfloatercolorpicker.h */, 26F52A34051F61DF00A80050 /* llfloatercustomize.cpp */, 26F52A56051F61DF00A80050 /* llfloaterdirectory.cpp */, + 1A9EC236083EA0100023D510 /* llfloatereditui.cpp */, + 1A9EC23A083EA01F0023D510 /* llfloatereditui.h */, + 913AA1FC079855E900D111CE /* llfloaterfriends.cpp */, 26F52A63051F61DF00A80050 /* llfloatergesture.cpp */, + 91C8C05405922AC100633E8C /* llfloatergodtools.cpp */, 26F52A71051F61DF00A80050 /* llfloatergroupinfo.cpp */, + 84401E2D0A13CC9A006720A5 /* llfloatergroupinvite.cpp */, 26F52A7E051F61DF00A80050 /* llfloatergroups.cpp */, + 91A155FE081EE7F70089988C /* llfloaterhtml.cpp */, + 91A15600081EE8060089988C /* llfloaterhtml.h */, + 99C6BFA90A1BBD4800419AE7 /* llfloaterhtmlfind.cpp */, + 99C6BFA80A1BBD4800419AE7 /* llfloaterhtmlfind.h */, + A3077BFF09DCB8140059ED75 /* llfloaterhtmlhelp.cpp */, + A3077C0009DCB8140059ED75 /* llfloaterhtmlhelp.h */, 91B9EC4C06370E4D007B3F3E /* llfloaterimagepreview.cpp */, + EB3EE70B083AC23D002BF676 /* llfloaterimagepreview.h */, + E224ACBC0874D6150039C1A6 /* llfloaterimport.cpp */, + E224ACBD0874D6150039C1A6 /* llfloaterimport.h */, + C16C084E0B4AE6C7009AD67F /* llfloaterinspect.cpp */, + C16C084F0B4AE6C7009AD67F /* llfloaterinspect.h */, 26F52A17051F61DF00A80050 /* llfloaterland.cpp */, 99EDDF5B05892E720031B20D /* llfloaterlandholdings.cpp */, 26F52AAD051F61DF00A80050 /* llfloatermap.cpp */, 26F52A66051F61DF00A80050 /* llfloatermute.cpp */, 26F52A9F051F61DF00A80050 /* llfloaternamedesc.cpp */, + A3D968F00A6EBCA7007E8BD2 /* llfloaternewim.cpp */, + 1A89230608B12D2E00A04AA9 /* llfloateropenobject.cpp */, + 1A89230708B12D2E00A04AA9 /* llfloateropenobject.h */, + FD6C9A3409C75A8500AA1849 /* llfloaterpermissionsmgr.cpp */, + FD6C9A3509C75A8500AA1849 /* llfloaterpermissionsmgr.h */, + 26C5F3E605DB1E3C00994065 /* llfloaterpostcard.cpp */, 26F52A6B051F61DF00A80050 /* llfloaterpreference.cpp */, 26F52A5B051F61DF00A80050 /* llfloaterproperties.cpp */, 26F52A7C051F61DF00A80050 /* llfloaterrate.cpp */, 9174D2C00653FC2600A7E32B /* llfloaterregioninfo.cpp */, 26F52AC2051F61DF00A80050 /* llfloaterreporter.cpp */, + 91E86C3107BD3B3A00F56E75 /* llfloatersaveavatar.cpp */, + FD6C9A2109C758BC00AA1849 /* llfloaterscriptdebug.cpp */, + FD6C9A2209C758BC00AA1849 /* llfloaterscriptdebug.h */, + AAC121A30A93A8380080E8A9 /* llfloatersellland.cpp */, + AAC121A40A93A8380080E8A9 /* llfloatersellland.h */, + 2613A6D905D843D80041A7A9 /* llfloatersnapshot.cpp */, + FD6C9A2309C758BC00AA1849 /* llfloatertelehub.cpp */, + FD6C9A2409C758BC00AA1849 /* llfloatertelehub.h */, + 1A8BF3780A1AAB99005B9D5A /* llfloatertest.cpp */, 26F52A8F051F61DF00A80050 /* llfloatertools.cpp */, + FD6C9A4209C75B8900AA1849 /* llfloatertopobjects.cpp */, + FD6C9A4309C75B8900AA1849 /* llfloatertopobjects.h */, 26F52A8E051F61DF00A80050 /* llfloatertos.cpp */, 26F52A69051F61DF00A80050 /* llfloaterworldmap.cpp */, 26F52AA5051F61DF00A80050 /* llfolderview.cpp */, + FD6C9A2509C758BC00AA1849 /* llfollowcam.cpp */, + FD6C9A2609C758BC00AA1849 /* llfollowcam.h */, 26F52A1F051F61DF00A80050 /* llframestats.cpp */, 26F52A1E051F61DF00A80050 /* llframestatview.cpp */, 26F529A1051F61DF00A80050 /* llgenepool.cpp */, + 91F8BBAB062DF91A00DE42BA /* llgesturemgr.cpp */, 26F52AA7051F61DF00A80050 /* llgivemoney.cpp */, 26F52AA6051F61DF00A80050 /* llglsandbox.cpp */, + A3C20E490BB0BCDF007E872B /* llglslshader.cpp */, + 911CAD8A075BE90600CD1090 /* llgroupmgr.cpp */, + EB3EE70C083AC23D002BF676 /* llgroupmgr.h */, + 2EFEA8E809F4556F00CB0193 /* llgroupnotify.cpp */, 26F52A87051F61DF00A80050 /* llhippo.cpp */, 26F52A85051F61DF00A80050 /* llhoverview.cpp */, 26F52A52051F61DF00A80050 /* llhudconnector.cpp */, @@ -2570,20 +2510,35 @@ 26F52ADB051F61DF00A80050 /* llhudeffectlookat.cpp */, 26F52ADA051F61DF00A80050 /* llhudeffectpointat.cpp */, 26F52A65051F61DF00A80050 /* llhudeffecttrail.cpp */, + FD6C9A2709C758BC00AA1849 /* llhudicon.cpp */, + FD6C9A2809C758BC00AA1849 /* llhudicon.h */, 26F52A25051F61DF00A80050 /* llhudmanager.cpp */, 26F52A24051F61DF00A80050 /* llhudobject.cpp */, 26F52A5C051F61DF00A80050 /* llhudrender.cpp */, 26F52A3E051F61DF00A80050 /* llhudtext.cpp */, 26F52A3D051F61DF00A80050 /* llhudview.cpp */, 26F52AD6051F61DF00A80050 /* llimpanel.cpp */, + 1AD61F6A0AC09B1900507FB9 /* llimview.cpp */, + A3285A3A0A71425100F619A5 /* llinventoryactions.cpp */, + A3285A340A71419F00F619A5 /* llinventorybridge.cpp */, 26F52A57051F61DF00A80050 /* llinventoryclipboard.cpp */, 26F529F8051F61DF00A80050 /* llinventorymodel.cpp */, + 911CAD86075BE87B00CD1090 /* llinventoryview.cpp */, 26F52ACC051F61DF00A80050 /* lljoystickbutton.cpp */, 26F52A04051F61DF00A80050 /* lllandmarklist.cpp */, + 9CD49D5909D0BB1500192434 /* lllocalanimationobject.cpp */, + 9CD49D5A09D0BB1500192434 /* lllocalanimationobject.h */, + C64F673D0AFBED80009732B5 /* lllogchat.cpp */, + C64F673E0AFBED80009732B5 /* lllogchat.h */, 26F529A9051F61DF00A80050 /* llmanip.cpp */, 26F52A40051F61DF00A80050 /* llmaniprotate.cpp */, 26F52A9B051F61DF00A80050 /* llmanipscale.cpp */, 26F52A9A051F61DF00A80050 /* llmaniptranslate.cpp */, + E34C14730AE6A3F0009BF4DE /* llmapresponders.cpp */, + 9118669907F4FAF700E3D5BC /* llmediaremotectrl.cpp */, + 9118669A07F4FAF700E3D5BC /* llmediaremotectrl.h */, + 99E43513092D64CC003AE728 /* llmemoryview.cpp */, + 99E43512092D64CC003AE728 /* llmemoryview.h */, 26F52AD8051F61DF00A80050 /* llmenucommands.cpp */, 26F52A67051F61DF00A80050 /* llmorphview.cpp */, 26F52AAB051F61DF00A80050 /* llmoveview.cpp */, @@ -2592,6 +2547,8 @@ 2617306405221AB700A80050 /* llnameeditor.cpp */, 26F52A98051F61DF00A80050 /* llnamelistctrl.cpp */, 26F52A97051F61DF00A80050 /* llnetmap.cpp */, + 91D61FD0057ED9DF005B4B69 /* llnotify.cpp */, + 91D530CE056EE55C00CD1AD7 /* lloverlaybar.cpp */, 26F52AB5051F61DF00A80050 /* llpanelaudioprefs.cpp */, 26F52AB4051F61DF00A80050 /* llpanelavatar.cpp */, 99FBB044087362B60048A5CC /* llpanelclassified.cpp */, @@ -2606,23 +2563,43 @@ 26F52AA4051F61DF00A80050 /* llpaneldirpeople.cpp */, 26F52AA3051F61DF00A80050 /* llpaneldirplaces.cpp */, 9900330005EC0ADD0035CB09 /* llpaneldirpopular.cpp */, - 2EFEA8EB09F455B900CB0193 /* llpanelgroup.cpp */, 26F52A47051F61DF00A80050 /* llpaneldisplay.cpp */, 26F52A19051F61DF00A80050 /* llpanelevent.cpp */, 26F52A18051F61DF00A80050 /* llpanelface.cpp */, 26F529FD051F61DF00A80050 /* llpanelgeneral.cpp */, + 2EFEA8EB09F455B900CB0193 /* llpanelgroup.cpp */, + 2EFEA8F009F4588B00CB0193 /* llpanelgroupgeneral.cpp */, + 84401E300A13CCB2006720A5 /* llpanelgroupinvite.cpp */, + 2EA4CEED09F83BE8008F60F7 /* llpanelgrouplandmoney.cpp */, + 2E6FE90D09FD560A00AF02FF /* llpanelgroupnotices.cpp */, + 2EA4CEEC09F83AC2008F60F7 /* llpanelgrouproles.cpp */, 26F52AC7051F61DF00A80050 /* llpanelgroupvoting.cpp */, + 91E36BB705B4C70600C919E4 /* llpanelinput.cpp */, 26F529EE051F61DF00A80050 /* llpanelinventory.cpp */, 26F529ED051F61DF00A80050 /* llpanelland.cpp */, + 1A758C930A436FD800589675 /* llpanellandobjects.cpp */, + 1A758C950A436FDE00589675 /* llpanellandoptions.cpp */, + A3AF6BCE0A544EF0005B5E2C /* llpanellogin.cpp */, 26F52A5A051F61DF00A80050 /* llpanelmorph.cpp */, + 9104C0CB0778AE0F001EC4F6 /* llpanelmsgs.cpp */, 26F52A2B051F61DF00A80050 /* llpanelnetwork.cpp */, 26F52A2A051F61DF00A80050 /* llpanelobject.cpp */, 26F52AA1051F61DF00A80050 /* llpanelpermissions.cpp */, + 9131094305C6D5A300A18084 /* llpanelpick.cpp */, 26F52AA0051F61DF00A80050 /* llpanelplace.cpp */, + A3077C0309DCB8140059ED75 /* llpanelvolume.cpp */, + A3077C0409DCB8140059ED75 /* llpanelvolume.h */, + 1A47B8DE0860FDF100F73746 /* llpanelweb.cpp */, + 1A47B8DD0860FDF100F73746 /* llpanelweb.h */, 26F52A5F051F61DF00A80050 /* llpatchvertexarray.cpp */, 26F529F3051F61DF00A80050 /* llpolymesh.cpp */, 26F529F2051F61DF00A80050 /* llpolymorph.cpp */, + 1A3143E00A02B73D005B87E7 /* llprefschat.cpp */, + 1A3143DE0A02B737005B87E7 /* llprefsim.cpp */, 26F52ABD051F61DF00A80050 /* llpreview.cpp */, + 91FC1C8706527F19009CF498 /* llpreviewanim.cpp */, + EB3EE70D083AC23D002BF676 /* llpreviewanim.h */, + 91F8BBA3062DF7AB00DE42BA /* llpreviewgesture.cpp */, 26F52ABC051F61DF00A80050 /* llpreviewlandmark.cpp */, 26F52A73051F61DF00A80050 /* llpreviewnotecard.cpp */, 26F52A72051F61DF00A80050 /* llpreviewscript.cpp */, @@ -2631,11 +2608,14 @@ 26F52AD5051F61DF00A80050 /* llprogressview.cpp */, 26F52AAF051F61DF00A80050 /* llregionposition.cpp */, 26F52A22051F61DF00A80050 /* llroam.cpp */, + 1AFA40B40A2DFD7200C13F70 /* llsavedsettingsglue.cpp */, 26F52AD2051F61DF00A80050 /* llselectmgr.cpp */, 26F52AD1051F61DF00A80050 /* llsky.cpp */, 26F529EB051F61DF00A80050 /* llspatialpartition.cpp */, 26F529E7051F61DF00A80050 /* llsphere.cpp */, 26F529E5051F61DF00A80050 /* llsprite.cpp */, + 88A95BB10C14D5FC0027E363 /* llsrv.cpp */, + 91DF401F06A739BA00CA7FE5 /* llstartup.cpp */, 26F529B3051F61DF00A80050 /* llstatbar.cpp */, 26F529B2051F61DF00A80050 /* llstatgraph.cpp */, 26F52A94051F61DF00A80050 /* llstatusbar.cpp */, @@ -2643,7 +2623,11 @@ 26F52A43051F61DF00A80050 /* llsurface.cpp */, 26F52A42051F61DF00A80050 /* llsurfacepatch.cpp */, 26F52AB8051F61DF00A80050 /* lltexlayer.cpp */, + AAF5FFD00B13F71900D28A84 /* lltexturecache.cpp */, + AAF5FFD10B13F71900D28A84 /* lltexturecache.h */, 26F52A28051F61DF00A80050 /* lltexturectrl.cpp */, + AA02B9BA0B0CE44D00F2996D /* lltexturefetch.cpp */, + AA02B9BB0B0CE44D00F2996D /* lltexturefetch.h */, 26F52A27051F61DF00A80050 /* lltexturetable.cpp */, 26F529F6051F61DF00A80050 /* lltextureview.cpp */, 26F529F5051F61DF00A80050 /* lltool.cpp */, @@ -2660,16 +2644,30 @@ 26F52A6E051F61DF00A80050 /* lltoolmorph.cpp */, 26F52A6D051F61DF00A80050 /* lltoolobjpicker.cpp */, 26F529AE051F61DF00A80050 /* lltoolpie.cpp */, + AA0E2A620A2FDB340066250A /* lltoolpipette.cpp */, + AA0E2A630A2FDB340066250A /* lltoolpipette.h */, 26F529AD051F61DF00A80050 /* lltoolplacer.cpp */, + 911CAD92075BEAAC00CD1090 /* lltoolselect.cpp */, 26F529FC051F61DF00A80050 /* lltoolselectland.cpp */, 26F529FB051F61DF00A80050 /* lltoolselectrect.cpp */, 26F529FA051F61DF00A80050 /* lltoolview.cpp */, 26F52A4E051F61DF00A80050 /* lltracker.cpp */, 26F52A0E051F61DF00A80050 /* lluploaddialog.cpp */, 26F52A0D051F61DF00A80050 /* llurl.cpp */, + 1A89230308B12D1000A04AA9 /* llurlwhitelist.cpp */, + 1A89230408B12D1000A04AA9 /* llurlwhitelist.h */, 26F52A0C051F61DF00A80050 /* lluserauth.cpp */, 26F529A5051F61DF00A80050 /* llvelocitybar.cpp */, + 99BB516D099AC1E9004BF9F2 /* llviewchildren.cpp */, + 99BB516E099AC1E9004BF9F2 /* llviewchildren.h */, + 1A5104560ABF60A800520F6D /* llviewerassetstorage.cpp */, + 1A5104580ABF60BF00520F6D /* llviewerassetstorage.h */, 26F529A2051F61DF00A80050 /* llviewercamera.cpp */, + 9C1853AD0A91175E00DA7B01 /* llviewercontrol.cpp */, + EB3EE70F083AC23D002BF676 /* llviewercontrol.h */, + 91E7BB2105EFCBA40026CC40 /* llviewerdisplay.cpp */, + 1A83767D0BA2169600F28979 /* llviewergenericmessage.cpp */, + 1A83767C0BA2169600F28979 /* llviewergenericmessage.h */, 26F52A32051F61DF00A80050 /* llviewergesture.cpp */, 26F52A31051F61DF00A80050 /* llviewerimage.cpp */, 26F52A30051F61DF00A80050 /* llviewerimagelist.cpp */, @@ -2678,20 +2676,32 @@ 26F52A38051F61DF00A80050 /* llviewerjointattachment.cpp */, 26F52A37051F61DF00A80050 /* llviewerjointmesh.cpp */, 26F52A36051F61DF00A80050 /* llviewerjointshape.cpp */, + A3C20E4B0BB0BD12007E872B /* llviewerjoystick.cpp */, + 91287B4A078DE4B300E958B2 /* llviewerkeyboard.cpp */, + 91287B4B078DE4B300E958B2 /* llviewerkeyboard.h */, 26F52A35051F61DF00A80050 /* llviewerlayer.cpp */, 26F529E4051F61DF00A80050 /* llviewermenu.cpp */, + 1A8870E40BCC5A9500E89AA6 /* llviewermenufile.cpp */, + 1A8870E30BCC5A9500E89AA6 /* llviewermenufile.h */, 26F529E3051F61DF00A80050 /* llviewermessage.cpp */, + 1A3143D00A02B701005B87E7 /* llviewernetwork.cpp */, 26F529E2051F61DF00A80050 /* llviewerobject.cpp */, 26F529E1051F61DF00A80050 /* llviewerobjectlist.cpp */, 26F529E0051F61DF00A80050 /* llviewerparcelmgr.cpp */, 26F529DF051F61DF00A80050 /* llviewerparceloverlay.cpp */, 26F529DE051F61DF00A80050 /* llviewerpartsim.cpp */, 26F529DD051F61DF00A80050 /* llviewerpartsource.cpp */, + A241CB7B07B3DE0D001A39E3 /* llviewerprecompiledheaders.cpp */, + A241CB7C07B3DE0D001A39E3 /* llviewerprecompiledheaders.h */, 26F529DC051F61DF00A80050 /* llviewerregion.cpp */, 26F529DB051F61DF00A80050 /* llviewerreputation.cpp */, 26F529DA051F61DF00A80050 /* llviewerstats.cpp */, + EB3EE712083AC23D002BF676 /* llviewertexteditor.cpp */, + EB3EE713083AC23D002BF676 /* llviewertexteditor.h */, 26F529D9051F61DF00A80050 /* llviewertextureanim.cpp */, 26F529D8051F61DF00A80050 /* llviewerthrottle.cpp */, + EB3EE714083AC23D002BF676 /* llvieweruictrlfactory.cpp */, + EB3EE715083AC23D002BF676 /* llvieweruictrlfactory.h */, 26F529D7051F61DF00A80050 /* llviewervisualparam.cpp */, 26F529D6051F61DF00A80050 /* llviewerwindow.cpp */, 26F529D5051F61DF00A80050 /* llvlcomposition.cpp */, @@ -2701,8 +2711,14 @@ 26F529D1051F61DF00A80050 /* llvoclouds.cpp */, 26F529D0051F61DF00A80050 /* llvograss.cpp */, 26F529CF051F61DF00A80050 /* llvoground.cpp */, + 99E43516092D64E6003AE728 /* llvoinventorylistener.cpp */, + 99E43515092D64E6003AE728 /* llvoinventorylistener.h */, + 910D255206484F1A0034E66F /* llvolumesliderctrl.cpp */, + EB3EE716083AC23D002BF676 /* llvolumesliderctrl.h */, 26F529CD051F61DF00A80050 /* llvopartgroup.cpp */, 26F529CC051F61DF00A80050 /* llvosky.cpp */, + A3077C0509DCB8140059ED75 /* llvostars.cpp */, + A3077C0609DCB8140059ED75 /* llvostars.h */, 26F529CB051F61DF00A80050 /* llvosurfacepatch.cpp */, 26F529CA051F61DF00A80050 /* llvotextbubble.cpp */, 26F529C9051F61DF00A80050 /* llvotree.cpp */, @@ -2711,21 +2727,20 @@ 26F529C5051F61DF00A80050 /* llwaterpatch.cpp */, 26F529C4051F61DF00A80050 /* llwearable.cpp */, 26F529C3051F61DF00A80050 /* llwearablelist.cpp */, + 1AF7C1E30AF6C44800C4BF4A /* llweb.cpp */, + 1AE5D7100844FBD300278605 /* llwebbrowserctrl.cpp */, + 1AE5D70F0844FBD200278605 /* llwebbrowserctrl.h */, 26F529C2051F61DF00A80050 /* llwind.cpp */, 26F529C1051F61DF00A80050 /* llworld.cpp */, 26F529C0051F61DF00A80050 /* llworldmap.cpp */, 26F529BF051F61DF00A80050 /* llworldmapview.cpp */, + 99BB516A099AC1AE004BF9F2 /* llxmlrpctransaction.cpp */, + 99BB5169099AC1AE004BF9F2 /* llxmlrpctransaction.h */, + 019200F004DD7D2B00A800A7 /* macview_Prefix.h */, 26F529BE051F61DF00A80050 /* moviemaker.cpp */, 26F529BD051F61DF00A80050 /* noise.cpp */, 26F529BA051F61DF00A80050 /* pipeline.cpp */, 26E79A760520BEC400A80050 /* viewer.cpp */, - 8B2ECFA00534C21A00A80059 /* llfirstuse.cpp */, - 91D530CE056EE55C00CD1AD7 /* lloverlaybar.cpp */, - 91D530D2056EE57900CD1AD7 /* llchatbar.cpp */, - 9130442A057428D800571B0A /* llfloaterbuycontents.cpp */, - 91D61FD0057ED9DF005B4B69 /* llnotify.cpp */, - 91C8C05405922AC100633E8C /* llfloatergodtools.cpp */, - E34C14730AE6A3F0009BF4DE /* llmapresponders.cpp */, ); name = newview; sourceTree = ""; @@ -3466,6 +3481,10 @@ 61923DA4074AE4F2005E1F34 /* llimagetga.cpp */, 61923DA5074AE4F2005E1F34 /* llimagetga.h */, 61923DA8074AE4F3005E1F34 /* llmapimagetype.h */, + 8833693B0C18AF33007F52DA /* llimagepng.cpp */, + 8833693C0C18AF33007F52DA /* llpngwrapper.cpp */, + 8833693D0C18AF33007F52DA /* llpngwrapper.h */, + 8833693E0C18AF33007F52DA /* llimagepng.h */, ); name = llimage; path = ../llimage; @@ -3860,6 +3879,7 @@ FDAA36C209B919F600FBF1CA /* libmx.dylib */, FDAA36B609B919AD00FBF1CA /* libssl.dylib */, FDAA36BE09B919DF00FBF1CA /* libz.dylib */, + 88A95BC90C14D92C0027E363 /* libresolv.dylib */, 26E79A630520BC6D00A80050 /* libSystem.dylib */, ); name = "System Libraries"; @@ -3879,6 +3899,7 @@ FDE8765409BEA39600AF6316 /* libogg.a */, 99F998FA0BAA34B90034E41C /* libopenjpeg.a */, FDE8765509BEA39600AF6316 /* libvorbis.a */, + 88AA282B0C17720D0032DF53 /* libpng12.a */, FDE8765609BEA39600AF6316 /* libvorbisenc.a */, FDE8765709BEA39600AF6316 /* libvorbisfile.a */, FDE8765809BEA39700AF6316 /* libxmlrpc.a */, @@ -4100,7 +4121,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Glue together intel and ppc versions of .a files\nLIBS=\"apr-1 aprutil-1 expat ogg vorbis fmod freetype cares llcurl lljpeg openjpeg vorbisenc vorbisfile xmlrpc\"\nLIBDIR=\"${SRCROOT}/../../libraries\"\n\ncd \"${LIBDIR}\"\n\nif [ \\! -e ppc-darwin ]\nthen\n\tln -s powerpc-darwin ppc-darwin\nfi\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}\"\n\nfor i in ${LIBS}; do\n\tNEED_UPDATE=false\n\tARCH_COUNT=0\n\tOUT=\"${BUILT_PRODUCTS_DIR}/lib$i.a\"\n\tTEST_ARCH=`echo \"${ARCHS}\" | grep i386`\n\tif [ -n \"$TEST_ARCH\" ]; then\n\t\tIN_i386=\"i386-darwin/lib_release/lib$i.a\"\n\t\tARCH_COUNT=`expr $ARCH_COUNT \"+\" 1`\n\t\tif [ \"$IN_i386\" -nt \"$OUT\" ]; then\n\t\t\tNEED_UPDATE=true\n\t\tfi\n\tfi\n\tTEST_ARCH=`echo \"${ARCHS}\" | grep ppc`\n\tif [ -n \"$TEST_ARCH\" ]; then\n\t\tIN_ppc=\"ppc-darwin/lib_release/lib$i.a\"\n\t\tARCH_COUNT=`expr $ARCH_COUNT \"+\" 1`\n\t\tif [ \"$IN_ppc\" -nt \"$OUT\" ]; then\n\t\t\tNEED_UPDATE=true\n\t\tfi\n\tfi\n\tif [ $ARCH_COUNT -eq 0 ]; then\n\t\techo \"No supported architectures found.\"\n\t\texit 1\n\tfi\n\tif [ ! -f \"$OUT\" -o NEED_UPDATE = \"true\" ]; then\n\t\techo Preparing third party library lib$i.a\n\t\tif [ $ARCH_COUNT -eq 1 ]; then\n\t\t\tIN=\"$IN_i386\"\"$IN_ppc\"\n\t\t\t#echo cp \"$IN\" \"$OUT\"\n\t\t\tcp \"$IN\" \"$OUT\"\n\t\telse\n\t\t\t#echo libtool -static -o \"$OUT\" \"$IN_i386\" \"$IN_ppc\"\n\t\t\tlibtool -static -o \"$OUT\" \"$IN_i386\" \"$IN_ppc\"\n\t\tfi\n\t\tranlib \"$OUT\"\n\telse\n\t\techo Third party library lib$i.a is up to date\n\tfi\ndone\n"; + shellScript = "# Glue together intel and ppc versions of .a files\nLIBS=\"apr-1 aprutil-1 expat ogg vorbis fmod freetype cares llcurl lljpeg png12 openjpeg vorbisenc vorbisfile xmlrpc\"\nLIBDIR=\"${SRCROOT}/../../libraries\"\n\ncd \"${LIBDIR}\"\n\nif [ \\! -e ppc-darwin ]\nthen\n\tln -s powerpc-darwin ppc-darwin\nfi\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}\"\n\nfor i in ${LIBS}; do\n\tNEED_UPDATE=false\n\tARCH_COUNT=0\n\tOUT=\"${BUILT_PRODUCTS_DIR}/lib$i.a\"\n\tTEST_ARCH=`echo \"${ARCHS}\" | grep i386`\n\tif [ -n \"$TEST_ARCH\" ]; then\n\t\tIN_i386=\"i386-darwin/lib_release/lib$i.a\"\n\t\tARCH_COUNT=`expr $ARCH_COUNT \"+\" 1`\n\t\tif [ \"$IN_i386\" -nt \"$OUT\" ]; then\n\t\t\tNEED_UPDATE=true\n\t\tfi\n\tfi\n\tTEST_ARCH=`echo \"${ARCHS}\" | grep ppc`\n\tif [ -n \"$TEST_ARCH\" ]; then\n\t\tIN_ppc=\"ppc-darwin/lib_release/lib$i.a\"\n\t\tARCH_COUNT=`expr $ARCH_COUNT \"+\" 1`\n\t\tif [ \"$IN_ppc\" -nt \"$OUT\" ]; then\n\t\t\tNEED_UPDATE=true\n\t\tfi\n\tfi\n\tif [ $ARCH_COUNT -eq 0 ]; then\n\t\techo \"No supported architectures found.\"\n\t\texit 1\n\tfi\n\tif [ ! -f \"$OUT\" -o NEED_UPDATE = \"true\" ]; then\n\t\techo Preparing third party library lib$i.a\n\t\tif [ $ARCH_COUNT -eq 1 ]; then\n\t\t\tIN=\"$IN_i386\"\"$IN_ppc\"\n\t\t\t#echo cp \"$IN\" \"$OUT\"\n\t\t\tcp \"$IN\" \"$OUT\"\n\t\telse\n\t\t\t#echo libtool -static -o \"$OUT\" \"$IN_i386\" \"$IN_ppc\"\n\t\t\tlibtool -static -o \"$OUT\" \"$IN_i386\" \"$IN_ppc\"\n\t\tfi\n\t\tranlib \"$OUT\"\n\telse\n\t\techo Third party library lib$i.a is up to date\n\tfi\ndone\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -4552,6 +4573,9 @@ A3C20E4C0BB0BD12007E872B /* llviewerjoystick.cpp in Sources */, 1A8870D50BCC5A6300E89AA6 /* llinventorytype.cpp in Sources */, 1A8870E50BCC5A9500E89AA6 /* llviewermenufile.cpp in Sources */, + 88A95BB20C14D5FC0027E363 /* llsrv.cpp in Sources */, + 8833693F0C18AF33007F52DA /* llimagepng.cpp in Sources */, + 883369400C18AF33007F52DA /* llpngwrapper.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4906,10 +4930,26 @@ ); GCC_ALTIVEC_EXTENSIONS = YES; GCC_OPTIMIZATION_LEVEL = 3; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_SHADOW = NO; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = NO; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "../../libraries/$(arch)-darwin/include", ../../libraries/include, @@ -5150,10 +5190,26 @@ buildSettings = { GCC_ALTIVEC_EXTENSIONS = YES; GCC_OPTIMIZATION_LEVEL = 0; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_SHADOW = NO; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = NO; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "../../libraries/$(arch)-darwin/include", ../../libraries/include, @@ -5188,10 +5244,26 @@ buildSettings = { GCC_ALTIVEC_EXTENSIONS = YES; GCC_OPTIMIZATION_LEVEL = 3; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_SHADOW = NO; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNINITIALIZED_AUTOS = NO; GCC_WARN_UNKNOWN_PRAGMAS = NO; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "../../libraries/$(arch)-darwin/include", ../../libraries/include, diff --git a/linden/indra/newview/newview.vcproj b/linden/indra/newview/newview.vcproj index 699a2bc..ae0c02d 100644 --- a/linden/indra/newview/newview.vcproj +++ b/linden/indra/newview/newview.vcproj @@ -20,7 +20,7 @@ + + + + + + @@ -2662,6 +2666,10 @@ > + + diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 408be2e..7d03e64 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -1406,7 +1406,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) if (gHideSelectedObjects) { - if (drawablep->getVObj() && + if (drawablep->getVObj().notNull() && drawablep->getVObj()->isSelected()) { return; @@ -1435,7 +1435,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) } else if (drawablep->isAvatar() && drawablep->isVisible()) { - LLVOAvatar* vobj = (LLVOAvatar*) drawablep->getVObj(); + LLVOAvatar* vobj = (LLVOAvatar*) drawablep->getVObj().get(); vobj->updateVisibility(FALSE); } @@ -3498,7 +3498,7 @@ BOOL LLPipeline::getRenderSoundBeacons(void*) LLViewerObject* LLPipeline::pickObject(const LLVector3 &start, const LLVector3 &end, LLVector3 &collision) { LLDrawable* drawable = mObjectPartition[PARTITION_VOLUME]->pickDrawable(start, end, collision); - return drawable ? drawable->getVObj() : NULL; + return drawable ? drawable->getVObj().get() : NULL; } LLSpatialPartition* LLPipeline::getSpatialPartition(LLViewerObject* vobj) diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt index 2f7971c..76f356b 100644 --- a/linden/indra/newview/releasenotes.txt +++ b/linden/indra/newview/releasenotes.txt @@ -1,3 +1,71 @@ +Release Notes for Second Life 1.17.1(0) June 22, 2007 +===================================== +Changes: +* VWR-650: Make "Give money" permissions look different than the other permissions +* VWR-427: Added new menu item: Tools > Edit Linked Parts +* VWR-79: PNG image support submission +* Sculpties now include a one-time explanation the first time a sculptie is created. +* Client and Server menus now have a one-time dialog box to explain what they are. +* "Skip 'Show next time' Dialogs..." button added to Preferences > Popups tab to skip all one time dialog boxes. +* Added Japanese and German language installers (Windows only) +* The version of Mozilla used in the client is updated to 1.8.0.12 +* F1 help now opens an external browser to the Second Life support web site. +* F1 Help will now open an external browser to language specific support websites for Japanese, Korean and Portuguese based on client's language. +* Delay added to folder opening while dragging items in an inventory window with a vertical scroll bar. +* Default messages for postcards are replaced when adding text. +* In the Inventory window the Filter menu is consolidated into the File menu. +* The sculptie texture picker UI has changed to differentiate it from the surface texture picker. + +LSL changes: +* Added support for alternate sculptie edge stitching. +* VWR-68: LSL constant expression folding and proper constant parsing + +Bug fixes: +* Fixed MISC-217: Accounts with negative L$ balance can't buy L$0 freebie +* Fixed SVC-306: Objects are visible at <0,0,0> (sometimes before moving to their correct position) +* Fixed SVC-225: Searching for Classifieds with blank field results no results +* Fixed VWR-1296: Minor memory leak in lltexturecache.cpp +* Fixed VWR-1223: Camera Controls keyboard shortcuts broke +* Fixed VWR-1221: Possible crash in llfloaterland.cpp / line 1556 +* Fixed VWR-1217: Built-in avatar animations stop suddenly, rather than fading out. (jerky head movement) +* Fixed VWR-1203: Avatars eyes are constantly crossing in 1.17 +* Fixed VWR-1170: LLMuteList::loadFromFile() improperly parses the mute list returned from the service +* Fixed VWR-1140: About Land floater is not resizable, ban and access lists too small +* Fixed VWR-1049: Trivial sizeof() miscalculatuion results in incomplete copying of CPU Brand ID string in CProcessor::AnalyzeAMDProcessor() +* Fixed VWR-1044: Unchecking "Go Away/AFK When Idle" doesn't work when manually setting Away status +* Fixed VWR-944: Boost inclusion is inconsistent +* Fixed VWR-941: Reading length data for a four-byte Variable template message misstores the length +* Fixed VWR-938: ELFIO is technically optional, make this easy to capitalise on +* Fixed VWR-876: sculpt texture map does not load or low priority when the texture itself is not visible in viewer frame or not cached +* Fixed VWR-873: Dead members "eVertexDataMask;" in various objects +* Fixed VWR-856: llvfs.cpp: possible loss of memory blocks in LLVFS:audit() +* Fixed VWR-822: "Create new..." clothing buttons don't auto-wear items +* Fixed VWR-796: llStopSound() not working +* Fixed VWR-746: Incorrect menu item referred to when member of maximum number of groups and a group invite is received +* Fixed VWR-660: When turning off Flexible Object rendering, flexible objects become permanently invisible +* Fixed VWR-652: A harmless compiler warning in indra.l.cpp +* Fixed VWR-606: Some source files (llprocessor.cpp and llsdserialize_tut.cpp) contain non-ASCII characters +* Fixed VWR-597: Abuse report tool should autofill abuser name when reporting an object +* Fixed VWR-560: Crash in llscrolllistctl.cpp when sorting scroll list +* Fixed VWR-459: Unicode supplementary characters typed in from keybaord are not handled properly on Windows (and potentially on Linux) +* Fixed VWR-446: Automatically start renaming new user-created assets and automatically select new user-created folders +* Fixed VWR-383: Chat logs do not have timestamps +* Fixed VWR-364: Viewer memory leak +* Fixed VWR-287: Inconsistent behaviour between agent_slide_left / agent_slide_right, and the rest of the movement functions. +* Fixed VWR-251: Keystrokes are eaten by IME when no text input is possible, on Windows using Japanese +* Fixed VWR-248: Inexplicable folding of Avatars such that they are walking around with their heads up their arses +* Fixed VWR-247: Viewer generates undesired dialog when IM comes in while minimized +* Fixed VWR-227: If a Find/Search returns no results, the results list is still focused and an attempt is made to select the first result anyway. +* Fixed VWR-218: SConstruct script makes many assumptions that are invalid outside LL +* Fixed VWR-213: Calling DestroyWindow with NULL window handle (win32 version) +* Fixed VWR-207: Textures become increasingly blurry over time on systems with > ~2GB RAM +* Fixed VWR-143: Compiler errors in llwebbrowserctrl.h +* Fixed VWR-132: seg fault in lldrawpool.cpp +* Fixed VWR-119: Zero missing in Sub-unit snap grid. for small fraction like 1/16 and 1/32 +* Fixed VWR-101: Get rid of "Return All" +* Fixed Inventory's "Recent Items" tab settings not persisting across logins +* Fixed line breaks showing up as * in various windows. + Release Notes for Second Life 1.17.0(12) June 13, 2007 ===================================== Changes: diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc index 0b4a5ba..8315deb 100644 --- a/linden/indra/newview/res/newViewRes.rc +++ b/linden/indra/newview/res/newViewRes.rc @@ -227,8 +227,8 @@ TOOLPIPETTE CURSOR "toolpipette.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,17,0,12 - PRODUCTVERSION 1,17,0,12 + FILEVERSION 1,17,1,0 + PRODUCTVERSION 1,17,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -245,12 +245,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "1.17.0.12" + VALUE "FileVersion", "1.17.1.0" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "1.17.0.12" + VALUE "ProductVersion", "1.17.1.0" END END BLOCK "VarFileInfo" diff --git a/linden/indra/newview/skins/textures/textures.xml b/linden/indra/newview/skins/textures/textures.xml index 89e4f53..79e910a 100644 --- a/linden/indra/newview/skins/textures/textures.xml +++ b/linden/indra/newview/skins/textures/textures.xml @@ -230,6 +230,7 @@ + diff --git a/linden/indra/newview/skins/xui/en-us/alerts.xml b/linden/indra/newview/skins/xui/en-us/alerts.xml index d32b46a..6c11a06 100644 --- a/linden/indra/newview/skins/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/xui/en-us/alerts.xml @@ -561,13 +561,12 @@ Objects: [N] - Are you sure you want to return all objects -in this region back to their owner's inventory? + Are you sure you want to return all listed objects back to their owner's inventory? - @@ -620,6 +619,17 @@ to set its Landing Point. Please enter your email address. + + + Send postcard with the default subject or message? + + + + Error processing snapshot data @@ -798,6 +808,17 @@ Apply those changes and quit Cancel + + + Disable all 'Show next time' dialogs? + + + + Cache will be cleared after you restart [SECOND_LIFE]. @@ -3074,7 +3095,7 @@ can be attached to notecards. You are a member of too many groups to join another one. Please leave at least one group before joining this one, or decline the offer. -To leave a group select the 'My Groups..' option +To leave a group select the 'Groups..' option from the 'Edit' menu. [NAME] has invited you to join a group as a member. [INVITE] @@ -3091,7 +3112,7 @@ from the 'Edit' menu. You are a member of too many groups to join another one. Please leave at least one group before joining this one, or decline the offer. -To leave a group select the 'My Groups..' option +To leave a group select the 'Groups..' option from the 'Edit' menu. [NAME] has invited you to join a group as an officer. [INVITE] @@ -4067,6 +4088,20 @@ will only work if a script is added with a money() event. Cancel + + + Visit the Second Life Support Web site? + + + Ignore + + + + Use this tool to report violations of the Terms of Service @@ -4342,5 +4377,27 @@ the contents of your Lost And Found folder? they are part of an attachment. - + + + +

Granting this request gives a script ongoing permission to take Linden dollars (L$) from your account. To revoke this permission, the object's owner must delete the object or reset the scripts in the object.

+
+ +
+ + + Would you like to automatically wear the clothing item you create? + + + Automatically wear new clothing + + + + diff --git a/linden/indra/newview/skins/xui/en-us/floater_about_land.xml b/linden/indra/newview/skins/xui/en-us/floater_about_land.xml index 5d85deb..9366154 100644 --- a/linden/indra/newview/skins/xui/en-us/floater_about_land.xml +++ b/linden/indra/newview/skins/xui/en-us/floater_about_land.xml @@ -1,11 +1,11 @@