From a8a62201ba762e98dff92cf49033e577fc34d8d4 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:27 -0500 Subject: Second Life viewer sources 1.19.0.0 --- linden/indra/SConstruct | 37 +- linden/indra/indra_complete/indra_complete_vc8.sln | 170 +- linden/indra/indra_complete/indra_complete_vc9.sln | 570 +++ linden/indra/lib/python/indra/base/lluuid.py | 7 +- linden/indra/lib/python/indra/base/metrics.py | 42 + linden/indra/lib/python/indra/ipc/mysql_pool.py | 2 +- linden/indra/lib/python/indra/ipc/saranwrap.py | 28 +- linden/indra/lib/python/indra/util/llmanifest.py | 1 + linden/indra/lib/python/indra/util/named_query.py | 387 +- .../linux_crash_logger/linux_crash_logger.cpp | 4 +- .../linux_crash_logger/llcrashloggerlinux.cpp | 4 +- .../indra/linux_crash_logger/llcrashloggerlinux.h | 4 +- linden/indra/llaudio/audioengine.cpp | 4 +- linden/indra/llaudio/audioengine.h | 4 +- linden/indra/llaudio/audioengine_fmod.cpp | 4 +- linden/indra/llaudio/audioengine_fmod.h | 4 +- linden/indra/llaudio/listener.cpp | 4 +- linden/indra/llaudio/listener.h | 4 +- linden/indra/llaudio/listener_ds3d.h | 4 +- linden/indra/llaudio/listener_fmod.cpp | 4 +- linden/indra/llaudio/listener_fmod.h | 4 +- linden/indra/llaudio/listener_openal.h | 4 +- linden/indra/llaudio/llaudio_vc9.vcproj | 324 ++ linden/indra/llaudio/llaudiodecodemgr.cpp | 4 +- linden/indra/llaudio/llaudiodecodemgr.h | 4 +- linden/indra/llaudio/vorbisdecode.cpp | 4 +- linden/indra/llaudio/vorbisdecode.h | 4 +- linden/indra/llaudio/vorbisencode.cpp | 24 +- linden/indra/llaudio/vorbisencode.h | 5 +- linden/indra/llcharacter/llanimationstates.cpp | 4 +- linden/indra/llcharacter/llanimationstates.h | 4 +- linden/indra/llcharacter/llbvhloader.cpp | 4 +- linden/indra/llcharacter/llbvhloader.h | 4 +- linden/indra/llcharacter/llcharacter.cpp | 4 +- linden/indra/llcharacter/llcharacter.h | 4 +- linden/indra/llcharacter/llcharacter_vc9.vcproj | 420 ++ linden/indra/llcharacter/lleditingmotion.cpp | 88 +- linden/indra/llcharacter/lleditingmotion.h | 14 +- linden/indra/llcharacter/llgesture.cpp | 4 +- linden/indra/llcharacter/llgesture.h | 4 +- linden/indra/llcharacter/llhandmotion.cpp | 4 +- linden/indra/llcharacter/llhandmotion.h | 6 +- linden/indra/llcharacter/llheadrotmotion.cpp | 73 +- linden/indra/llcharacter/llheadrotmotion.h | 14 +- linden/indra/llcharacter/lljoint.cpp | 4 +- linden/indra/llcharacter/lljoint.h | 8 +- linden/indra/llcharacter/lljointsolverrp3.cpp | 4 +- linden/indra/llcharacter/lljointsolverrp3.h | 4 +- linden/indra/llcharacter/lljointstate.h | 40 +- linden/indra/llcharacter/llkeyframefallmotion.cpp | 19 +- linden/indra/llcharacter/llkeyframefallmotion.h | 6 +- linden/indra/llcharacter/llkeyframemotion.cpp | 241 +- linden/indra/llcharacter/llkeyframemotion.h | 18 +- linden/indra/llcharacter/llkeyframemotionparam.cpp | 5 +- linden/indra/llcharacter/llkeyframemotionparam.h | 5 +- linden/indra/llcharacter/llkeyframestandmotion.cpp | 4 +- linden/indra/llcharacter/llkeyframestandmotion.h | 18 +- linden/indra/llcharacter/llkeyframewalkmotion.cpp | 47 +- linden/indra/llcharacter/llkeyframewalkmotion.h | 10 +- linden/indra/llcharacter/llmotion.cpp | 6 +- linden/indra/llcharacter/llmotion.h | 6 +- linden/indra/llcharacter/llmotioncontroller.cpp | 4 +- linden/indra/llcharacter/llmotioncontroller.h | 4 +- linden/indra/llcharacter/llmultigesture.cpp | 4 +- linden/indra/llcharacter/llmultigesture.h | 4 +- linden/indra/llcharacter/llpose.cpp | 20 +- linden/indra/llcharacter/llpose.h | 22 +- linden/indra/llcharacter/llstatemachine.cpp | 4 +- linden/indra/llcharacter/llstatemachine.h | 4 +- linden/indra/llcharacter/lltargetingmotion.cpp | 18 +- linden/indra/llcharacter/lltargetingmotion.h | 6 +- linden/indra/llcharacter/llvisualparam.cpp | 4 +- linden/indra/llcharacter/llvisualparam.h | 4 +- linden/indra/llcommon/bitpack.h | 4 +- linden/indra/llcommon/ctype_workaround.h | 4 +- linden/indra/llcommon/doublelinkedlist.h | 4 +- linden/indra/llcommon/files.lst | 1 + linden/indra/llcommon/imageids.h | 4 +- linden/indra/llcommon/indra_constants.h | 4 +- linden/indra/llcommon/linden_common.h | 4 +- linden/indra/llcommon/linked_lists.h | 4 +- linden/indra/llcommon/llagentconstants.h | 4 +- linden/indra/llcommon/llapp.cpp | 4 +- linden/indra/llcommon/llapp.h | 4 +- linden/indra/llcommon/llapr.cpp | 4 +- linden/indra/llcommon/llapr.h | 4 +- linden/indra/llcommon/llares.cpp | 4 +- linden/indra/llcommon/llares.h | 4 +- linden/indra/llcommon/llassettype.cpp | 4 +- linden/indra/llcommon/llassettype.h | 4 +- linden/indra/llcommon/llassoclist.h | 4 +- linden/indra/llcommon/llavatarconstants.h | 4 +- linden/indra/llcommon/llbase32.cpp | 4 +- linden/indra/llcommon/llbase32.h | 4 +- linden/indra/llcommon/llbase64.cpp | 4 +- linden/indra/llcommon/llbase64.h | 4 +- linden/indra/llcommon/llboost.h | 4 +- linden/indra/llcommon/llchat.h | 4 +- linden/indra/llcommon/llclickaction.h | 4 +- linden/indra/llcommon/llcommon.cpp | 4 +- linden/indra/llcommon/llcommon.h | 4 +- linden/indra/llcommon/llcommon.vcproj | 6 + linden/indra/llcommon/llcommon_vc8.vcproj | 8 + linden/indra/llcommon/llcommon_vc9.vcproj | 808 ++++ linden/indra/llcommon/llcriticaldamp.cpp | 4 +- linden/indra/llcommon/llcriticaldamp.h | 4 +- linden/indra/llcommon/lldarray.h | 4 +- linden/indra/llcommon/lldarrayptr.h | 4 +- linden/indra/llcommon/lldate.cpp | 4 +- linden/indra/llcommon/lldate.h | 4 +- linden/indra/llcommon/lldefs.h | 22 +- linden/indra/llcommon/lldepthstack.h | 4 +- linden/indra/llcommon/lldlinked.h | 4 +- linden/indra/llcommon/lldqueueptr.h | 4 +- linden/indra/llcommon/llendianswizzle.h | 4 +- linden/indra/llcommon/llenum.h | 4 +- linden/indra/llcommon/llerror.cpp | 4 +- linden/indra/llcommon/llerror.h | 4 +- linden/indra/llcommon/llerrorcontrol.h | 4 +- linden/indra/llcommon/llerrorlegacy.h | 4 +- linden/indra/llcommon/llerrorthread.cpp | 4 +- linden/indra/llcommon/llerrorthread.h | 4 +- linden/indra/llcommon/llevent.cpp | 4 +- linden/indra/llcommon/llevent.h | 6 +- linden/indra/llcommon/lleventemitter.h | 4 +- linden/indra/llcommon/llextendedstatus.h | 4 +- linden/indra/llcommon/llfasttimer.cpp | 4 +- linden/indra/llcommon/llfasttimer.h | 4 +- linden/indra/llcommon/llfile.cpp | 4 +- linden/indra/llcommon/llfile.h | 4 +- linden/indra/llcommon/llfixedbuffer.cpp | 4 +- linden/indra/llcommon/llfixedbuffer.h | 4 +- linden/indra/llcommon/llformat.cpp | 4 +- linden/indra/llcommon/llformat.h | 4 +- linden/indra/llcommon/llframetimer.cpp | 4 +- linden/indra/llcommon/llframetimer.h | 4 +- linden/indra/llcommon/llhash.h | 4 +- linden/indra/llcommon/llindexedqueue.h | 4 +- linden/indra/llcommon/llkeythrottle.h | 36 +- linden/indra/llcommon/lllinkedqueue.h | 4 +- linden/indra/llcommon/llliveappconfig.cpp | 4 +- linden/indra/llcommon/llliveappconfig.h | 4 +- linden/indra/llcommon/lllivefile.cpp | 4 +- linden/indra/llcommon/lllivefile.h | 4 +- linden/indra/llcommon/lllocalidhashmap.h | 4 +- linden/indra/llcommon/lllog.cpp | 115 + linden/indra/llcommon/lllog.h | 57 + linden/indra/llcommon/lllslconstants.h | 4 +- linden/indra/llcommon/llmap.h | 4 +- linden/indra/llcommon/llmemory.cpp | 4 +- linden/indra/llcommon/llmemory.h | 4 +- linden/indra/llcommon/llmemorystream.cpp | 4 +- linden/indra/llcommon/llmemorystream.h | 4 +- linden/indra/llcommon/llmemtype.h | 4 +- linden/indra/llcommon/llmetrics.cpp | 4 +- linden/indra/llcommon/llmetrics.h | 4 +- linden/indra/llcommon/llmortician.cpp | 16 +- linden/indra/llcommon/llmortician.h | 6 +- linden/indra/llcommon/llnametable.h | 4 +- linden/indra/llcommon/llpreprocessor.h | 4 +- linden/indra/llcommon/llpriqueuemap.h | 4 +- linden/indra/llcommon/llprocessor.cpp | 4 +- linden/indra/llcommon/llprocessor.h | 4 +- linden/indra/llcommon/llptrskiplist.h | 4 +- linden/indra/llcommon/llptrskipmap.h | 4 +- linden/indra/llcommon/llqueuedthread.cpp | 4 +- linden/indra/llcommon/llqueuedthread.h | 4 +- linden/indra/llcommon/llrun.cpp | 4 +- linden/indra/llcommon/llrun.h | 4 +- linden/indra/llcommon/llsd.cpp | 43 +- linden/indra/llcommon/llsd.h | 14 +- linden/indra/llcommon/llsdserialize.cpp | 4 +- linden/indra/llcommon/llsdserialize.h | 4 +- linden/indra/llcommon/llsdserialize_xml.cpp | 4 +- linden/indra/llcommon/llsdserialize_xml.h | 4 +- linden/indra/llcommon/llsdutil.cpp | 124 +- linden/indra/llcommon/llsdutil.h | 14 +- linden/indra/llcommon/llsecondlifeurls.cpp | 7 +- linden/indra/llcommon/llsecondlifeurls.h | 7 +- linden/indra/llcommon/llsimplehash.h | 4 +- linden/indra/llcommon/llskiplist.h | 4 +- linden/indra/llcommon/llskipmap.h | 4 +- linden/indra/llcommon/llstack.h | 4 +- linden/indra/llcommon/llstat.cpp | 4 +- linden/indra/llcommon/llstat.h | 4 +- linden/indra/llcommon/llstatenums.h | 4 +- linden/indra/llcommon/llstl.h | 4 +- linden/indra/llcommon/llstreamtools.cpp | 4 +- linden/indra/llcommon/llstreamtools.h | 4 +- linden/indra/llcommon/llstrider.h | 4 +- linden/indra/llcommon/llstring.cpp | 82 +- linden/indra/llcommon/llstring.h | 54 +- linden/indra/llcommon/llstringtable.cpp | 4 +- linden/indra/llcommon/llstringtable.h | 4 +- linden/indra/llcommon/llsys.cpp | 4 +- linden/indra/llcommon/llsys.h | 4 +- linden/indra/llcommon/llthread.cpp | 4 +- linden/indra/llcommon/llthread.h | 4 +- linden/indra/llcommon/lltimer.cpp | 4 +- linden/indra/llcommon/lltimer.h | 4 +- linden/indra/llcommon/lluri.cpp | 87 +- linden/indra/llcommon/lluri.h | 50 +- linden/indra/llcommon/lluuidhashmap.h | 4 +- linden/indra/llcommon/llversionserver.h | 6 +- linden/indra/llcommon/llversionviewer.h | 10 +- linden/indra/llcommon/llworkerthread.cpp | 4 +- linden/indra/llcommon/llworkerthread.h | 4 +- linden/indra/llcommon/metaclass.cpp | 4 +- linden/indra/llcommon/metaclass.h | 4 +- linden/indra/llcommon/metaclasst.h | 4 +- linden/indra/llcommon/metaproperty.cpp | 4 +- linden/indra/llcommon/metaproperty.h | 4 +- linden/indra/llcommon/metapropertyt.h | 4 +- linden/indra/llcommon/processor.h | 4 +- linden/indra/llcommon/reflective.cpp | 4 +- linden/indra/llcommon/reflective.h | 4 +- linden/indra/llcommon/reflectivet.h | 4 +- linden/indra/llcommon/roles_constants.h | 26 +- linden/indra/llcommon/stdenums.h | 4 +- linden/indra/llcommon/stdtypes.h | 4 +- linden/indra/llcommon/string_table.h | 4 +- linden/indra/llcommon/timer.h | 4 +- linden/indra/llcommon/timing.cpp | 4 +- linden/indra/llcommon/timing.h | 4 +- linden/indra/llcommon/u64.cpp | 8 +- linden/indra/llcommon/u64.h | 34 +- linden/indra/llcrashlogger/llcrashlogger.cpp | 602 +-- linden/indra/llcrashlogger/llcrashlogger.h | 124 +- linden/indra/llimage/llimage.cpp | 4 +- linden/indra/llimage/llimage.h | 4 +- linden/indra/llimage/llimage_vc9.vcproj | 326 ++ linden/indra/llimage/llimagebmp.cpp | 4 +- linden/indra/llimage/llimagebmp.h | 4 +- linden/indra/llimage/llimagedxt.cpp | 4 +- linden/indra/llimage/llimagedxt.h | 4 +- linden/indra/llimage/llimagej2c.cpp | 4 +- linden/indra/llimage/llimagej2c.h | 4 +- linden/indra/llimage/llimagejpeg.cpp | 4 +- linden/indra/llimage/llimagejpeg.h | 4 +- linden/indra/llimage/llimagepng.cpp | 4 +- linden/indra/llimage/llimagepng.h | 4 +- linden/indra/llimage/llimagetga.cpp | 4 +- linden/indra/llimage/llimagetga.h | 4 +- linden/indra/llimage/llimageworker.cpp | 4 +- linden/indra/llimage/llimageworker.h | 4 +- linden/indra/llimage/llmapimagetype.h | 4 +- linden/indra/llimage/llpngwrapper.cpp | 4 +- linden/indra/llimage/llpngwrapper.h | 4 +- linden/indra/llimagej2coj/llimagej2coj.cpp | 57 +- linden/indra/llimagej2coj/llimagej2coj.h | 4 +- linden/indra/llinventory/llcategory.cpp | 4 +- linden/indra/llinventory/llcategory.h | 4 +- linden/indra/llinventory/lleconomy.cpp | 4 +- linden/indra/llinventory/lleconomy.h | 4 +- linden/indra/llinventory/llinventory.cpp | 4 +- linden/indra/llinventory/llinventory.h | 4 +- linden/indra/llinventory/llinventory_vc9.vcproj | 348 ++ linden/indra/llinventory/llinventorytype.cpp | 4 +- linden/indra/llinventory/llinventorytype.h | 4 +- linden/indra/llinventory/lllandmark.cpp | 4 +- linden/indra/llinventory/lllandmark.h | 4 +- linden/indra/llinventory/llnotecard.cpp | 4 +- linden/indra/llinventory/llnotecard.h | 4 +- linden/indra/llinventory/llparcel.cpp | 4 +- linden/indra/llinventory/llparcel.h | 4 +- linden/indra/llinventory/llparcelflags.h | 4 +- linden/indra/llinventory/llpermissions.cpp | 4 +- linden/indra/llinventory/llpermissions.h | 4 +- linden/indra/llinventory/llpermissionsflags.h | 4 +- linden/indra/llinventory/llsaleinfo.cpp | 4 +- linden/indra/llinventory/llsaleinfo.h | 4 +- linden/indra/llinventory/lltransactionflags.cpp | 4 +- linden/indra/llinventory/lltransactionflags.h | 4 +- linden/indra/llinventory/lltransactiontypes.h | 4 +- linden/indra/llinventory/lluserrelations.cpp | 9 +- linden/indra/llinventory/lluserrelations.h | 19 +- linden/indra/llmath/camera.h | 4 +- linden/indra/llmath/coordframe.h | 4 +- linden/indra/llmath/llbboxlocal.cpp | 4 +- linden/indra/llmath/llbboxlocal.h | 4 +- linden/indra/llmath/llcamera.cpp | 4 +- linden/indra/llmath/llcamera.h | 4 +- linden/indra/llmath/llcoord.h | 4 +- linden/indra/llmath/llcoordframe.cpp | 4 +- linden/indra/llmath/llcoordframe.h | 4 +- linden/indra/llmath/llcrc.cpp | 4 +- linden/indra/llmath/llcrc.h | 4 +- linden/indra/llmath/llinterp.h | 4 +- linden/indra/llmath/llmath.h | 4 +- linden/indra/llmath/llmath_vc9.vcproj | 473 +++ linden/indra/llmath/llmd5.cpp | 4 +- linden/indra/llmath/llmd5.h | 4 +- linden/indra/llmath/lloctree.h | 4 +- linden/indra/llmath/llperlin.cpp | 4 +- linden/indra/llmath/llperlin.h | 4 +- linden/indra/llmath/llplane.h | 4 +- linden/indra/llmath/llquantize.h | 4 +- linden/indra/llmath/llquaternion.cpp | 4 +- linden/indra/llmath/llquaternion.h | 4 +- linden/indra/llmath/llrand.cpp | 4 +- linden/indra/llmath/llrand.h | 4 +- linden/indra/llmath/llrect.cpp | 4 +- linden/indra/llmath/llrect.h | 11 +- linden/indra/llmath/lltreenode.h | 4 +- linden/indra/llmath/lluuid.cpp | 4 +- linden/indra/llmath/lluuid.h | 4 +- linden/indra/llmath/llv4math.h | 4 +- linden/indra/llmath/llv4matrix3.h | 4 +- linden/indra/llmath/llv4matrix4.h | 4 +- linden/indra/llmath/llv4vector3.h | 4 +- linden/indra/llmath/llvolume.cpp | 12 +- linden/indra/llmath/llvolume.h | 4 +- linden/indra/llmath/llvolumemgr.cpp | 4 +- linden/indra/llmath/llvolumemgr.h | 4 +- linden/indra/llmath/m3math.cpp | 4 +- linden/indra/llmath/m3math.h | 4 +- linden/indra/llmath/m4math.cpp | 4 +- linden/indra/llmath/m4math.h | 4 +- linden/indra/llmath/raytrace.cpp | 4 +- linden/indra/llmath/raytrace.h | 4 +- linden/indra/llmath/v2math.cpp | 4 +- linden/indra/llmath/v2math.h | 4 +- linden/indra/llmath/v3color.cpp | 4 +- linden/indra/llmath/v3color.h | 5 +- linden/indra/llmath/v3dmath.cpp | 4 +- linden/indra/llmath/v3dmath.h | 4 +- linden/indra/llmath/v3math.cpp | 4 +- linden/indra/llmath/v3math.h | 4 +- linden/indra/llmath/v4color.cpp | 4 +- linden/indra/llmath/v4color.h | 5 +- linden/indra/llmath/v4coloru.cpp | 4 +- linden/indra/llmath/v4coloru.h | 4 +- linden/indra/llmath/v4math.cpp | 4 +- linden/indra/llmath/v4math.h | 4 +- linden/indra/llmath/xform.cpp | 4 +- linden/indra/llmath/xform.h | 4 +- linden/indra/llmedia/llmedia_vc9.vcproj | 300 ++ linden/indra/llmedia/llmediabase.cpp | 4 +- linden/indra/llmedia/llmediabase.h | 4 +- linden/indra/llmedia/llmediaemitter.h | 4 +- linden/indra/llmedia/llmediaemitterevents.h | 4 +- linden/indra/llmedia/llmediaengine.cpp | 4 +- linden/indra/llmedia/llmediaengine.h | 9 +- linden/indra/llmedia/llmediaimplgstreamer.cpp | 4 +- linden/indra/llmedia/llmediaimplgstreamer.h | 4 +- linden/indra/llmedia/llmediaimplgstreamer_syms.cpp | 4 +- linden/indra/llmedia/llmediaimplgstreamer_syms.h | 4 +- .../indra/llmedia/llmediaimplgstreamervidplug.cpp | 4 +- linden/indra/llmedia/llmediaimplgstreamervidplug.h | 4 +- linden/indra/llmedia/llmediaimplquicktime.cpp | 4 +- linden/indra/llmedia/llmediaimplquicktime.h | 4 +- linden/indra/llmedia/llmediamoviebase.cpp | 4 +- linden/indra/llmedia/llmediamoviebase.h | 4 +- linden/indra/llmedia/llmediaobservers.h | 4 +- linden/indra/llmessage/files.lst | 1 - linden/indra/llmessage/llassetstorage.cpp | 4 +- linden/indra/llmessage/llassetstorage.h | 4 +- linden/indra/llmessage/llblowfishcipher.cpp | 4 +- linden/indra/llmessage/llblowfishcipher.h | 4 +- linden/indra/llmessage/llbuffer.cpp | 4 +- linden/indra/llmessage/llbuffer.h | 4 +- linden/indra/llmessage/llbufferstream.cpp | 4 +- linden/indra/llmessage/llbufferstream.h | 4 +- linden/indra/llmessage/llcachename.cpp | 4 +- linden/indra/llmessage/llcachename.h | 4 +- linden/indra/llmessage/llcallbacklisth.h | 4 +- linden/indra/llmessage/llchainio.cpp | 4 +- linden/indra/llmessage/llchainio.h | 4 +- linden/indra/llmessage/llcipher.h | 4 +- linden/indra/llmessage/llcircuit.cpp | 4 +- linden/indra/llmessage/llcircuit.h | 4 +- linden/indra/llmessage/llclassifiedflags.cpp | 4 +- linden/indra/llmessage/llclassifiedflags.h | 4 +- linden/indra/llmessage/llcurl.cpp | 4 +- linden/indra/llmessage/llcurl.h | 4 +- linden/indra/llmessage/lldatapacker.cpp | 4 +- linden/indra/llmessage/lldatapacker.h | 4 +- linden/indra/llmessage/lldbstrings.h | 4 +- linden/indra/llmessage/lldispatcher.cpp | 4 +- linden/indra/llmessage/lldispatcher.h | 4 +- linden/indra/llmessage/lleventflags.h | 4 +- linden/indra/llmessage/llfiltersd2xmlrpc.cpp | 4 +- linden/indra/llmessage/llfiltersd2xmlrpc.h | 4 +- linden/indra/llmessage/llfollowcamparams.h | 4 +- linden/indra/llmessage/llhost.cpp | 4 +- linden/indra/llmessage/llhost.h | 4 +- linden/indra/llmessage/llhttpassetstorage.cpp | 4 +- linden/indra/llmessage/llhttpassetstorage.h | 4 +- linden/indra/llmessage/llhttpclient.cpp | 4 +- linden/indra/llmessage/llhttpclient.h | 4 +- linden/indra/llmessage/llhttpnode.cpp | 4 +- linden/indra/llmessage/llhttpnode.h | 4 +- linden/indra/llmessage/llhttpsender.cpp | 4 +- linden/indra/llmessage/llhttpsender.h | 4 +- linden/indra/llmessage/llinstantmessage.cpp | 4 +- linden/indra/llmessage/llinstantmessage.h | 4 +- linden/indra/llmessage/llinvite.h | 4 +- linden/indra/llmessage/lliobuffer.cpp | 4 +- linden/indra/llmessage/lliobuffer.h | 4 +- linden/indra/llmessage/lliohttpserver.cpp | 8 +- linden/indra/llmessage/lliohttpserver.h | 4 +- linden/indra/llmessage/lliopipe.cpp | 5 +- linden/indra/llmessage/lliopipe.h | 13 +- linden/indra/llmessage/lliosocket.cpp | 42 +- linden/indra/llmessage/lliosocket.h | 4 +- linden/indra/llmessage/llioutil.cpp | 4 +- linden/indra/llmessage/llioutil.h | 4 +- linden/indra/llmessage/llloginflags.h | 4 +- linden/indra/llmessage/lllogtextmessage.cpp | 122 - linden/indra/llmessage/lllogtextmessage.h | 99 - linden/indra/llmessage/llmail.cpp | 4 +- linden/indra/llmessage/llmail.h | 4 +- linden/indra/llmessage/llmessage.vcproj | 6 - linden/indra/llmessage/llmessage_vc8.vcproj | 8 - linden/indra/llmessage/llmessage_vc9.vcproj | 926 ++++ linden/indra/llmessage/llmessagebuilder.cpp | 4 +- linden/indra/llmessage/llmessagebuilder.h | 4 +- linden/indra/llmessage/llmessageconfig.cpp | 4 +- linden/indra/llmessage/llmessageconfig.h | 4 +- linden/indra/llmessage/llmessagereader.cpp | 4 +- linden/indra/llmessage/llmessagereader.h | 4 +- linden/indra/llmessage/llmessagetemplate.cpp | 4 +- linden/indra/llmessage/llmessagetemplate.h | 4 +- linden/indra/llmessage/llmessagetemplateparser.cpp | 4 +- linden/indra/llmessage/llmessagetemplateparser.h | 4 +- linden/indra/llmessage/llmessagethrottle.cpp | 35 +- linden/indra/llmessage/llmessagethrottle.h | 8 +- linden/indra/llmessage/llmime.cpp | 4 +- linden/indra/llmessage/llmime.h | 4 +- linden/indra/llmessage/llmsgvariabletype.h | 4 +- linden/indra/llmessage/llnamevalue.cpp | 4 +- linden/indra/llmessage/llnamevalue.h | 4 +- linden/indra/llmessage/llnullcipher.cpp | 4 +- linden/indra/llmessage/llnullcipher.h | 4 +- linden/indra/llmessage/llpacketack.cpp | 4 +- linden/indra/llmessage/llpacketack.h | 4 +- linden/indra/llmessage/llpacketbuffer.cpp | 4 +- linden/indra/llmessage/llpacketbuffer.h | 4 +- linden/indra/llmessage/llpacketring.cpp | 4 +- linden/indra/llmessage/llpacketring.h | 4 +- linden/indra/llmessage/llpartdata.cpp | 4 +- linden/indra/llmessage/llpartdata.h | 4 +- linden/indra/llmessage/llpumpio.cpp | 222 +- linden/indra/llmessage/llpumpio.h | 18 +- linden/indra/llmessage/llqueryflags.h | 4 +- linden/indra/llmessage/llregionflags.h | 4 +- linden/indra/llmessage/llregionhandle.h | 4 +- linden/indra/llmessage/llsdappservices.cpp | 4 +- linden/indra/llmessage/llsdappservices.h | 4 +- linden/indra/llmessage/llsdhttpserver.cpp | 4 +- linden/indra/llmessage/llsdhttpserver.h | 4 +- linden/indra/llmessage/llsdmessagebuilder.cpp | 4 +- linden/indra/llmessage/llsdmessagebuilder.h | 4 +- linden/indra/llmessage/llsdmessagereader.cpp | 4 +- linden/indra/llmessage/llsdmessagereader.h | 4 +- linden/indra/llmessage/llsdrpcclient.cpp | 4 +- linden/indra/llmessage/llsdrpcclient.h | 4 +- linden/indra/llmessage/llsdrpcserver.cpp | 4 +- linden/indra/llmessage/llsdrpcserver.h | 4 +- linden/indra/llmessage/llservice.cpp | 4 +- linden/indra/llmessage/llservice.h | 4 +- linden/indra/llmessage/llservicebuilder.cpp | 103 +- linden/indra/llmessage/llservicebuilder.h | 4 +- linden/indra/llmessage/lltaskname.h | 4 +- linden/indra/llmessage/llteleportflags.h | 4 +- .../indra/llmessage/lltemplatemessagebuilder.cpp | 4 +- linden/indra/llmessage/lltemplatemessagebuilder.h | 4 +- linden/indra/llmessage/lltemplatemessagereader.cpp | 4 +- linden/indra/llmessage/lltemplatemessagereader.h | 4 +- linden/indra/llmessage/llthrottle.cpp | 4 +- linden/indra/llmessage/llthrottle.h | 4 +- linden/indra/llmessage/lltransfermanager.cpp | 85 +- linden/indra/llmessage/lltransfermanager.h | 4 +- linden/indra/llmessage/lltransfersourceasset.cpp | 4 +- linden/indra/llmessage/lltransfersourceasset.h | 4 +- linden/indra/llmessage/lltransfersourcefile.cpp | 4 +- linden/indra/llmessage/lltransfersourcefile.h | 4 +- linden/indra/llmessage/lltransfertargetfile.cpp | 4 +- linden/indra/llmessage/lltransfertargetfile.h | 4 +- linden/indra/llmessage/lltransfertargetvfile.cpp | 4 +- linden/indra/llmessage/lltransfertargetvfile.h | 4 +- linden/indra/llmessage/llurlrequest.cpp | 5 +- linden/indra/llmessage/llurlrequest.h | 6 +- linden/indra/llmessage/lluseroperation.cpp | 4 +- linden/indra/llmessage/lluseroperation.h | 4 +- linden/indra/llmessage/llvehicleparams.h | 4 +- linden/indra/llmessage/llxfer.cpp | 4 +- linden/indra/llmessage/llxfer.h | 4 +- linden/indra/llmessage/llxfer_file.cpp | 4 +- linden/indra/llmessage/llxfer_file.h | 4 +- linden/indra/llmessage/llxfer_mem.cpp | 4 +- linden/indra/llmessage/llxfer_mem.h | 4 +- linden/indra/llmessage/llxfer_vfile.cpp | 4 +- linden/indra/llmessage/llxfer_vfile.h | 4 +- linden/indra/llmessage/llxfermanager.cpp | 4 +- linden/indra/llmessage/llxfermanager.h | 4 +- linden/indra/llmessage/llxorcipher.cpp | 4 +- linden/indra/llmessage/llxorcipher.h | 4 +- linden/indra/llmessage/machine.h | 4 +- linden/indra/llmessage/mean_collision_data.h | 4 +- linden/indra/llmessage/message.cpp | 65 +- linden/indra/llmessage/message.h | 11 +- linden/indra/llmessage/message_prehash.cpp | 4 +- linden/indra/llmessage/message_prehash.h | 4 +- linden/indra/llmessage/message_string_table.cpp | 4 +- linden/indra/llmessage/net.cpp | 4 +- linden/indra/llmessage/net.h | 4 +- linden/indra/llmessage/network.cpp | 4 +- linden/indra/llmessage/network.h | 4 +- linden/indra/llmessage/partsyspacket.cpp | 4 +- linden/indra/llmessage/partsyspacket.h | 4 +- linden/indra/llmessage/patch_code.cpp | 4 +- linden/indra/llmessage/patch_code.h | 4 +- linden/indra/llmessage/patch_dct.cpp | 4 +- linden/indra/llmessage/patch_dct.h | 4 +- linden/indra/llmessage/patch_idct.cpp | 4 +- linden/indra/llmessage/sound_ids.h | 4 +- linden/indra/llprimitive/legacy_object_types.h | 4 +- linden/indra/llprimitive/llmaterialtable.cpp | 4 +- linden/indra/llprimitive/llmaterialtable.h | 4 +- linden/indra/llprimitive/llprimitive.cpp | 130 +- linden/indra/llprimitive/llprimitive.h | 16 +- linden/indra/llprimitive/llprimitive_vc9.vcproj | 320 ++ linden/indra/llprimitive/lltextureanim.cpp | 4 +- linden/indra/llprimitive/lltextureanim.h | 4 +- linden/indra/llprimitive/lltextureentry.cpp | 4 +- linden/indra/llprimitive/lltextureentry.h | 4 +- linden/indra/llprimitive/lltree_common.h | 4 +- linden/indra/llprimitive/lltreeparams.cpp | 4 +- linden/indra/llprimitive/lltreeparams.h | 4 +- linden/indra/llprimitive/llvolumemessage.cpp | 4 +- linden/indra/llprimitive/llvolumemessage.h | 4 +- linden/indra/llprimitive/llvolumexml.cpp | 4 +- linden/indra/llprimitive/llvolumexml.h | 4 +- linden/indra/llprimitive/material_codes.h | 4 +- linden/indra/llprimitive/object_flags.h | 4 +- linden/indra/llrender/llfont.cpp | 8 +- linden/indra/llrender/llfont.h | 4 +- linden/indra/llrender/llfontgl.cpp | 4 +- linden/indra/llrender/llfontgl.h | 4 +- linden/indra/llrender/llgldbg.cpp | 4 +- linden/indra/llrender/llgldbg.h | 4 +- linden/indra/llrender/llimagegl.cpp | 4 +- linden/indra/llrender/llimagegl.h | 14 +- linden/indra/llrender/llrender_vc9.vcproj | 314 ++ linden/indra/llrender/llvertexbuffer.cpp | 4 +- linden/indra/llrender/llvertexbuffer.h | 4 +- linden/indra/llrender/llvertexprogramgl.cpp | 4 +- linden/indra/llrender/llvertexprogramgl.h | 4 +- linden/indra/llui/llalertdialog.cpp | 47 +- linden/indra/llui/llalertdialog.h | 9 +- linden/indra/llui/llbutton.cpp | 281 +- linden/indra/llui/llbutton.h | 72 +- linden/indra/llui/llcallbackmap.h | 4 +- linden/indra/llui/llcheckboxctrl.cpp | 23 +- linden/indra/llui/llcheckboxctrl.h | 4 +- linden/indra/llui/llclipboard.cpp | 4 +- linden/indra/llui/llclipboard.h | 4 +- linden/indra/llui/llcombobox.cpp | 514 ++- linden/indra/llui/llcombobox.h | 61 +- linden/indra/llui/llctrlselectioninterface.cpp | 4 +- linden/indra/llui/llctrlselectioninterface.h | 6 +- linden/indra/llui/lldraghandle.cpp | 4 +- linden/indra/llui/lldraghandle.h | 5 +- linden/indra/llui/lleditmenuhandler.cpp | 4 +- linden/indra/llui/lleditmenuhandler.h | 4 +- linden/indra/llui/llfloater.cpp | 39 +- linden/indra/llui/llfloater.h | 4 +- linden/indra/llui/llfocusmgr.cpp | 45 +- linden/indra/llui/llfocusmgr.h | 13 +- linden/indra/llui/llhtmlhelp.h | 5 +- linden/indra/llui/lliconctrl.cpp | 20 +- linden/indra/llui/lliconctrl.h | 6 +- linden/indra/llui/llkeywords.cpp | 18 +- linden/indra/llui/llkeywords.h | 8 +- linden/indra/llui/lllineeditor.cpp | 363 +- linden/indra/llui/lllineeditor.h | 42 +- linden/indra/llui/llmemberlistener.h | 4 +- linden/indra/llui/llmenugl.cpp | 11 +- linden/indra/llui/llmenugl.h | 4 +- linden/indra/llui/llmodaldialog.cpp | 16 +- linden/indra/llui/llmodaldialog.h | 6 +- linden/indra/llui/llpanel.cpp | 236 +- linden/indra/llui/llpanel.h | 13 +- linden/indra/llui/llradiogroup.cpp | 6 +- linden/indra/llui/llradiogroup.h | 6 +- linden/indra/llui/llresizebar.cpp | 4 +- linden/indra/llui/llresizebar.h | 4 +- linden/indra/llui/llresizehandle.cpp | 6 +- linden/indra/llui/llresizehandle.h | 4 +- linden/indra/llui/llresmgr.cpp | 4 +- linden/indra/llui/llresmgr.h | 4 +- linden/indra/llui/llrootview.cpp | 4 +- linden/indra/llui/llrootview.h | 4 +- linden/indra/llui/llscrollbar.cpp | 48 +- linden/indra/llui/llscrollbar.h | 7 +- linden/indra/llui/llscrollcontainer.cpp | 42 +- linden/indra/llui/llscrollcontainer.h | 4 +- linden/indra/llui/llscrollingpanellist.cpp | 4 +- linden/indra/llui/llscrollingpanellist.h | 4 +- linden/indra/llui/llscrolllistctrl.cpp | 1048 +++-- linden/indra/llui/llscrolllistctrl.h | 197 +- linden/indra/llui/llslider.cpp | 149 +- linden/indra/llui/llslider.h | 11 +- linden/indra/llui/llsliderctrl.cpp | 8 +- linden/indra/llui/llsliderctrl.h | 6 +- linden/indra/llui/llspinctrl.cpp | 10 +- linden/indra/llui/llspinctrl.h | 6 +- linden/indra/llui/llstyle.cpp | 6 +- linden/indra/llui/llstyle.h | 4 +- linden/indra/llui/lltabcontainer.cpp | 43 +- linden/indra/llui/lltabcontainer.h | 7 +- linden/indra/llui/lltabcontainervertical.cpp | 14 +- linden/indra/llui/lltabcontainervertical.h | 4 +- linden/indra/llui/lltextbox.cpp | 14 +- linden/indra/llui/lltextbox.h | 6 +- linden/indra/llui/lltexteditor.cpp | 539 ++- linden/indra/llui/lltexteditor.h | 57 +- linden/indra/llui/llui.cpp | 461 +- linden/indra/llui/llui.h | 90 +- linden/indra/llui/llui_vc9.vcproj | 596 +++ linden/indra/llui/lluiconstants.h | 4 +- linden/indra/llui/lluictrl.cpp | 203 +- linden/indra/llui/lluictrl.h | 59 +- linden/indra/llui/lluictrlfactory.cpp | 18 +- linden/indra/llui/lluictrlfactory.h | 4 +- linden/indra/llui/lluistring.cpp | 4 +- linden/indra/llui/lluistring.h | 4 +- linden/indra/llui/lluixmltags.h | 5 +- linden/indra/llui/llundo.cpp | 4 +- linden/indra/llui/llundo.h | 4 +- linden/indra/llui/llview.cpp | 440 +- linden/indra/llui/llview.h | 36 +- linden/indra/llui/llviewborder.cpp | 6 +- linden/indra/llui/llviewborder.h | 4 +- linden/indra/llui/llviewquery.cpp | 65 +- linden/indra/llui/llviewquery.h | 36 +- linden/indra/llvfs/lldir.cpp | 4 +- linden/indra/llvfs/lldir.h | 4 +- linden/indra/llvfs/lldir_linux.cpp | 4 +- linden/indra/llvfs/lldir_linux.h | 4 +- linden/indra/llvfs/lldir_mac.cpp | 4 +- linden/indra/llvfs/lldir_mac.h | 4 +- linden/indra/llvfs/lldir_solaris.cpp | 4 +- linden/indra/llvfs/lldir_solaris.h | 4 +- linden/indra/llvfs/lldir_win32.cpp | 4 +- linden/indra/llvfs/lldir_win32.h | 4 +- linden/indra/llvfs/lllfsthread.cpp | 4 +- linden/indra/llvfs/lllfsthread.h | 4 +- linden/indra/llvfs/llvfile.cpp | 4 +- linden/indra/llvfs/llvfile.h | 4 +- linden/indra/llvfs/llvfs.cpp | 4 +- linden/indra/llvfs/llvfs.h | 4 +- linden/indra/llvfs/llvfs_vc9.vcproj | 296 ++ linden/indra/llvfs/llvfsthread.cpp | 4 +- linden/indra/llvfs/llvfsthread.h | 4 +- linden/indra/llwindow/lldxhardware.cpp | 4 +- linden/indra/llwindow/lldxhardware.h | 4 +- linden/indra/llwindow/llgl.cpp | 4 +- linden/indra/llwindow/llgl.h | 4 +- linden/indra/llwindow/llglheaders.h | 4 +- linden/indra/llwindow/llglstates.h | 4 +- linden/indra/llwindow/llglstubs.h | 4 +- linden/indra/llwindow/llgltypes.h | 4 +- linden/indra/llwindow/llkeyboard.cpp | 4 +- linden/indra/llwindow/llkeyboard.h | 4 +- linden/indra/llwindow/llkeyboardmacosx.cpp | 4 +- linden/indra/llwindow/llkeyboardmacosx.h | 4 +- linden/indra/llwindow/llkeyboardsdl.cpp | 4 +- linden/indra/llwindow/llkeyboardsdl.h | 4 +- linden/indra/llwindow/llkeyboardwin32.cpp | 4 +- linden/indra/llwindow/llkeyboardwin32.h | 4 +- linden/indra/llwindow/lllogitechlcd.cpp | 9 +- linden/indra/llwindow/lllogitechlcd.h | 6 +- linden/indra/llwindow/llmousehandler.h | 4 +- linden/indra/llwindow/llpreeditor.h | 106 + linden/indra/llwindow/llwindow.cpp | 4 +- linden/indra/llwindow/llwindow.h | 13 +- linden/indra/llwindow/llwindow.vcproj | 3 + linden/indra/llwindow/llwindow_vc9.vcproj | 398 ++ linden/indra/llwindow/llwindowheadless.cpp | 4 +- linden/indra/llwindow/llwindowheadless.h | 4 +- linden/indra/llwindow/llwindowlinux.cpp | 4 +- linden/indra/llwindow/llwindowlinux.h | 4 +- linden/indra/llwindow/llwindowmacosx-objc.h | 4 +- linden/indra/llwindow/llwindowmacosx-objc.mm | 4 +- linden/indra/llwindow/llwindowmacosx.cpp | 428 +- linden/indra/llwindow/llwindowmacosx.h | 12 +- linden/indra/llwindow/llwindowmesaheadless.cpp | 4 +- linden/indra/llwindow/llwindowmesaheadless.h | 4 +- linden/indra/llwindow/llwindowsdl.cpp | 29 +- linden/indra/llwindow/llwindowsdl.h | 6 +- linden/indra/llwindow/llwindowsolaris.cpp | 4 +- linden/indra/llwindow/llwindowsolaris.h | 4 +- linden/indra/llwindow/llwindowwin32.cpp | 663 ++- linden/indra/llwindow/llwindowwin32.h | 20 +- linden/indra/llxml/llcontrol.cpp | 4 +- linden/indra/llxml/llcontrol.h | 4 +- linden/indra/llxml/llxml_vc9.vcproj | 280 ++ linden/indra/llxml/llxmlnode.cpp | 4 +- linden/indra/llxml/llxmlnode.h | 4 +- linden/indra/llxml/llxmlparser.cpp | 4 +- linden/indra/llxml/llxmlparser.h | 4 +- linden/indra/llxml/llxmltree.cpp | 4 +- linden/indra/llxml/llxmltree.h | 4 +- linden/indra/lscript/lscript_alloc.h | 4 +- linden/indra/lscript/lscript_byteconvert.h | 4 +- linden/indra/lscript/lscript_byteformat.h | 4 +- .../lscript/lscript_compile/lscript_alloc.cpp | 4 +- .../lscript/lscript_compile/lscript_bytecode.cpp | 4 +- .../lscript/lscript_compile/lscript_bytecode.h | 4 +- .../lscript_compile/lscript_compile_fb.vcproj | 13 +- .../lscript_compile/lscript_compile_fb_vc8.vcproj | 10 +- .../lscript_compile/lscript_compile_fb_vc9.vcproj | 132 + .../lscript_compile/lscript_compile_vc8.vcproj | 2 +- .../lscript_compile/lscript_compile_vc9.vcproj | 332 ++ .../lscript/lscript_compile/lscript_error.cpp | 4 +- .../indra/lscript/lscript_compile/lscript_error.h | 4 +- .../indra/lscript/lscript_compile/lscript_heap.cpp | 4 +- .../indra/lscript/lscript_compile/lscript_heap.h | 4 +- .../lscript/lscript_compile/lscript_resource.cpp | 4 +- .../lscript/lscript_compile/lscript_resource.h | 4 +- .../lscript/lscript_compile/lscript_scope.cpp | 4 +- .../indra/lscript/lscript_compile/lscript_scope.h | 4 +- .../indra/lscript/lscript_compile/lscript_tree.cpp | 4 +- .../indra/lscript/lscript_compile/lscript_tree.h | 4 +- .../lscript/lscript_compile/lscript_typecheck.cpp | 4 +- .../lscript/lscript_compile/lscript_typecheck.h | 4 +- linden/indra/lscript/lscript_execute.h | 4 +- .../lscript/lscript_execute/lscript_execute.cpp | 4 +- .../lscript_execute/lscript_execute_vc9.vcproj | 280 ++ .../lscript_execute/lscript_heapruntime.cpp | 4 +- .../lscript/lscript_execute/lscript_heapruntime.h | 4 +- .../lscript/lscript_execute/lscript_readlso.cpp | 4 +- .../lscript/lscript_execute/lscript_readlso.h | 4 +- linden/indra/lscript/lscript_export.h | 4 +- linden/indra/lscript/lscript_http.h | 4 +- linden/indra/lscript/lscript_library.h | 4 +- .../lscript/lscript_library/lscript_alloc.cpp | 4 +- .../lscript/lscript_library/lscript_export.cpp | 4 +- .../lscript/lscript_library/lscript_library.cpp | 4 +- .../lscript_library/lscript_library_vc9.vcproj | 272 ++ linden/indra/lscript/lscript_rt_interface.h | 4 +- linden/indra/mac_crash_logger/llcrashloggermac.cpp | 4 +- linden/indra/mac_crash_logger/llcrashloggermac.h | 4 +- linden/indra/mac_crash_logger/mac_crash_logger.cpp | 4 +- linden/indra/mac_updater/FSCopyObject.h | 4 +- linden/indra/mac_updater/GenLinkedList.h | 4 +- linden/indra/mac_updater/MoreFilesX.h | 4 +- linden/indra/mac_updater/mac_updater.cpp | 25 +- .../indra/newview/English.lproj/InfoPlist.strings | 4 +- linden/indra/newview/Info-SecondLife.plist | 2 +- linden/indra/newview/VertexCache.h | 4 +- linden/indra/newview/VorbisFramework.h | 4 +- linden/indra/newview/app_settings/colors_base.ini | 157 - linden/indra/newview/app_settings/colors_base.xml | 16 +- linden/indra/newview/audiosettings.h | 4 +- linden/indra/newview/fakevoicesoundsignal.cpp | 4 +- linden/indra/newview/fakevoicesoundsignal.h | 4 +- linden/indra/newview/files.lst | 1 - linden/indra/newview/fmodwrapper.cpp | 4 +- linden/indra/newview/gpu_table.txt | 4 + linden/indra/newview/head.cpp | 4 +- linden/indra/newview/head.h | 4 +- linden/indra/newview/linux_tools/client-readme.txt | 32 +- linden/indra/newview/linux_tools/wrapper.sh | 5 +- linden/indra/newview/llagent.cpp | 191 +- linden/indra/newview/llagent.h | 16 +- linden/indra/newview/llagentdata.cpp | 4 +- linden/indra/newview/llagentdata.h | 4 +- linden/indra/newview/llagentpilot.cpp | 4 +- linden/indra/newview/llagentpilot.h | 4 +- linden/indra/newview/llanimalcontrols.cpp | 4 +- linden/indra/newview/llanimalcontrols.h | 4 +- linden/indra/newview/llappearance.h | 4 +- linden/indra/newview/llappviewer.cpp | 88 +- linden/indra/newview/llappviewer.h | 4 +- linden/indra/newview/llappviewerlinux.cpp | 4 +- linden/indra/newview/llappviewerlinux.h | 4 +- linden/indra/newview/llappviewermacosx.cpp | 7 +- linden/indra/newview/llappviewermacosx.h | 4 +- linden/indra/newview/llappviewerwin32.cpp | 4 +- linden/indra/newview/llappviewerwin32.h | 4 +- linden/indra/newview/llassetuploadresponders.cpp | 7 +- linden/indra/newview/llassetuploadresponders.h | 4 +- linden/indra/newview/llaudiosourcevo.cpp | 4 +- linden/indra/newview/llaudiosourcevo.h | 4 +- linden/indra/newview/llbbox.cpp | 4 +- linden/indra/newview/llbbox.h | 4 +- linden/indra/newview/llbox.cpp | 4 +- linden/indra/newview/llbox.h | 4 +- linden/indra/newview/llcallbacklist.cpp | 4 +- linden/indra/newview/llcallbacklist.h | 4 +- linden/indra/newview/llcallingcard.cpp | 4 +- linden/indra/newview/llcallingcard.h | 4 +- linden/indra/newview/llcameraview.cpp | 4 +- linden/indra/newview/llcameraview.h | 4 +- linden/indra/newview/llcape.cpp | 4 +- linden/indra/newview/llcape.h | 4 +- linden/indra/newview/llcaphttpsender.cpp | 4 +- linden/indra/newview/llcaphttpsender.h | 4 +- linden/indra/newview/llchatbar.cpp | 172 +- linden/indra/newview/llchatbar.h | 20 +- linden/indra/newview/llclassifiedinfo.cpp | 4 +- linden/indra/newview/llclassifiedinfo.h | 4 +- .../indra/newview/llclassifiedstatsresponder.cpp | 33 +- linden/indra/newview/llclassifiedstatsresponder.h | 32 +- linden/indra/newview/llcloud.cpp | 4 +- linden/indra/newview/llcloud.h | 4 +- linden/indra/newview/llcolorscheme.cpp | 4 +- linden/indra/newview/llcolorscheme.h | 4 +- linden/indra/newview/llcolorswatch.cpp | 4 +- linden/indra/newview/llcolorswatch.h | 4 +- linden/indra/newview/llcommandhandler.cpp | 49 +- linden/indra/newview/llcommandhandler.h | 16 +- linden/indra/newview/llcompass.cpp | 4 +- linden/indra/newview/llcompass.h | 4 +- linden/indra/newview/llcompilequeue.cpp | 16 +- linden/indra/newview/llcompilequeue.h | 4 +- linden/indra/newview/llconfirmationmanager.cpp | 4 +- linden/indra/newview/llconfirmationmanager.h | 4 +- linden/indra/newview/llconsole.cpp | 4 +- linden/indra/newview/llconsole.h | 4 +- linden/indra/newview/llcontainerview.cpp | 4 +- linden/indra/newview/llcontainerview.h | 4 +- linden/indra/newview/llcontroldef.cpp | 29 +- linden/indra/newview/llcubemap.cpp | 4 +- linden/indra/newview/llcubemap.h | 4 +- linden/indra/newview/llcurrencyuimanager.cpp | 4 +- linden/indra/newview/llcurrencyuimanager.h | 4 +- linden/indra/newview/llcylinder.cpp | 4 +- linden/indra/newview/llcylinder.h | 4 +- linden/indra/newview/lldebugmessagebox.cpp | 4 +- linden/indra/newview/lldebugmessagebox.h | 4 +- linden/indra/newview/lldebugview.cpp | 4 +- linden/indra/newview/lldebugview.h | 4 +- linden/indra/newview/lldirpicker.cpp | 4 +- linden/indra/newview/lldirpicker.h | 4 +- linden/indra/newview/lldrawable.cpp | 17 +- linden/indra/newview/lldrawable.h | 4 +- linden/indra/newview/lldrawpool.cpp | 4 +- linden/indra/newview/lldrawpool.h | 4 +- linden/indra/newview/lldrawpoolalpha.cpp | 4 +- linden/indra/newview/lldrawpoolalpha.h | 4 +- linden/indra/newview/lldrawpoolavatar.cpp | 4 +- linden/indra/newview/lldrawpoolavatar.h | 4 +- linden/indra/newview/lldrawpoolbump.cpp | 4 +- linden/indra/newview/lldrawpoolbump.h | 4 +- linden/indra/newview/lldrawpoolclouds.cpp | 4 +- linden/indra/newview/lldrawpoolclouds.h | 4 +- linden/indra/newview/lldrawpoolground.cpp | 4 +- linden/indra/newview/lldrawpoolground.h | 4 +- linden/indra/newview/lldrawpoolsimple.cpp | 4 +- linden/indra/newview/lldrawpoolsimple.h | 4 +- linden/indra/newview/lldrawpoolsky.cpp | 4 +- linden/indra/newview/lldrawpoolsky.h | 4 +- linden/indra/newview/lldrawpoolstars.cpp | 4 +- linden/indra/newview/lldrawpoolstars.h | 4 +- linden/indra/newview/lldrawpoolterrain.cpp | 4 +- linden/indra/newview/lldrawpoolterrain.h | 4 +- linden/indra/newview/lldrawpooltree.cpp | 4 +- linden/indra/newview/lldrawpooltree.h | 4 +- linden/indra/newview/lldrawpoolwater.cpp | 14 +- linden/indra/newview/lldrawpoolwater.h | 4 +- linden/indra/newview/lldriverparam.cpp | 4 +- linden/indra/newview/lldriverparam.h | 4 +- linden/indra/newview/lldynamictexture.cpp | 4 +- linden/indra/newview/lldynamictexture.h | 4 +- linden/indra/newview/llemote.cpp | 4 +- linden/indra/newview/llemote.h | 4 +- linden/indra/newview/lleventinfo.cpp | 4 +- linden/indra/newview/lleventinfo.h | 4 +- linden/indra/newview/lleventnotifier.cpp | 4 +- linden/indra/newview/lleventnotifier.h | 4 +- linden/indra/newview/lleventpoll.cpp | 4 +- linden/indra/newview/lleventpoll.h | 4 +- linden/indra/newview/llface.cpp | 4 +- linden/indra/newview/llface.h | 4 +- linden/indra/newview/llface.inl | 4 +- linden/indra/newview/llfasttimerview.cpp | 4 +- linden/indra/newview/llfasttimerview.h | 4 +- linden/indra/newview/llfeaturemanager.cpp | 10 +- linden/indra/newview/llfeaturemanager.h | 4 +- linden/indra/newview/llfilepicker.cpp | 4 +- linden/indra/newview/llfilepicker.h | 4 +- linden/indra/newview/llfirstuse.cpp | 4 +- linden/indra/newview/llfirstuse.h | 4 +- linden/indra/newview/llflexibleobject.cpp | 4 +- linden/indra/newview/llflexibleobject.h | 4 +- linden/indra/newview/llfloaterabout.cpp | 4 +- linden/indra/newview/llfloaterabout.h | 4 +- linden/indra/newview/llfloateractivespeakers.cpp | 563 ++- linden/indra/newview/llfloateractivespeakers.h | 53 +- linden/indra/newview/llfloateranimpreview.cpp | 6 +- linden/indra/newview/llfloateranimpreview.h | 4 +- linden/indra/newview/llfloaterauction.cpp | 4 +- linden/indra/newview/llfloaterauction.h | 4 +- linden/indra/newview/llfloateravatarinfo.cpp | 36 +- linden/indra/newview/llfloateravatarinfo.h | 8 +- linden/indra/newview/llfloateravatarpicker.cpp | 21 +- linden/indra/newview/llfloateravatarpicker.h | 4 +- linden/indra/newview/llfloateravatartextures.cpp | 4 +- linden/indra/newview/llfloateravatartextures.h | 4 +- linden/indra/newview/llfloaterbuildoptions.cpp | 4 +- linden/indra/newview/llfloaterbuildoptions.h | 4 +- linden/indra/newview/llfloaterbump.cpp | 4 +- linden/indra/newview/llfloaterbump.h | 4 +- linden/indra/newview/llfloaterbuy.cpp | 4 +- linden/indra/newview/llfloaterbuy.h | 4 +- linden/indra/newview/llfloaterbuycontents.cpp | 4 +- linden/indra/newview/llfloaterbuycontents.h | 4 +- linden/indra/newview/llfloaterbuycurrency.cpp | 4 +- linden/indra/newview/llfloaterbuycurrency.h | 4 +- linden/indra/newview/llfloaterbuyland.cpp | 4 +- linden/indra/newview/llfloaterbuyland.h | 4 +- linden/indra/newview/llfloaterchat.cpp | 34 +- linden/indra/newview/llfloaterchat.h | 5 +- linden/indra/newview/llfloaterchatterbox.cpp | 107 +- linden/indra/newview/llfloaterchatterbox.h | 8 +- linden/indra/newview/llfloaterclassified.cpp | 55 +- linden/indra/newview/llfloaterclassified.h | 34 +- linden/indra/newview/llfloaterclothing.cpp | 14 +- linden/indra/newview/llfloaterclothing.h | 4 +- linden/indra/newview/llfloatercolorpicker.cpp | 4 +- linden/indra/newview/llfloatercolorpicker.h | 4 +- linden/indra/newview/llfloatercustomize.cpp | 4 +- linden/indra/newview/llfloatercustomize.h | 4 +- linden/indra/newview/llfloaterdirectory.cpp | 10 +- linden/indra/newview/llfloaterdirectory.h | 4 +- linden/indra/newview/llfloatereditui.cpp | 4 +- linden/indra/newview/llfloatereditui.h | 4 +- linden/indra/newview/llfloaterevent.cpp | 35 +- linden/indra/newview/llfloaterevent.h | 35 +- linden/indra/newview/llfloaterfriends.cpp | 447 +- linden/indra/newview/llfloaterfriends.h | 28 +- linden/indra/newview/llfloatergesture.cpp | 4 +- linden/indra/newview/llfloatergesture.h | 4 +- linden/indra/newview/llfloatergodtools.cpp | 4 +- linden/indra/newview/llfloatergodtools.h | 4 +- linden/indra/newview/llfloatergroupinfo.cpp | 7 +- linden/indra/newview/llfloatergroupinfo.h | 4 +- linden/indra/newview/llfloatergroupinvite.cpp | 4 +- linden/indra/newview/llfloatergroupinvite.h | 4 +- linden/indra/newview/llfloatergroups.cpp | 4 +- linden/indra/newview/llfloatergroups.h | 4 +- linden/indra/newview/llfloaterhtml.cpp | 66 +- linden/indra/newview/llfloaterhtml.h | 22 +- linden/indra/newview/llfloaterhtmlhelp.cpp | 328 -- linden/indra/newview/llfloaterhtmlhelp.h | 53 - linden/indra/newview/llfloaterimagepreview.cpp | 4 +- linden/indra/newview/llfloaterimagepreview.h | 4 +- linden/indra/newview/llfloaterimport.cpp | 10 +- linden/indra/newview/llfloaterimport.h | 4 +- linden/indra/newview/llfloaterinspect.cpp | 5 +- linden/indra/newview/llfloaterinspect.h | 4 +- linden/indra/newview/llfloaterlagmeter.cpp | 4 +- linden/indra/newview/llfloaterlagmeter.h | 4 +- linden/indra/newview/llfloaterland.cpp | 196 +- linden/indra/newview/llfloaterland.h | 19 +- linden/indra/newview/llfloaterlandholdings.cpp | 6 +- linden/indra/newview/llfloaterlandholdings.h | 4 +- linden/indra/newview/llfloaterlandmark.cpp | 29 +- linden/indra/newview/llfloaterlandmark.h | 33 +- linden/indra/newview/llfloatermap.cpp | 4 +- linden/indra/newview/llfloatermap.h | 4 +- linden/indra/newview/llfloatermute.cpp | 177 +- linden/indra/newview/llfloatermute.h | 16 +- linden/indra/newview/llfloaternamedesc.cpp | 19 +- linden/indra/newview/llfloaternamedesc.h | 4 +- linden/indra/newview/llfloaternewim.cpp | 6 +- linden/indra/newview/llfloaternewim.h | 4 +- linden/indra/newview/llfloateropenobject.cpp | 4 +- linden/indra/newview/llfloateropenobject.h | 4 +- linden/indra/newview/llfloaterparcel.cpp | 29 +- linden/indra/newview/llfloaterparcel.h | 37 +- linden/indra/newview/llfloaterpermissionsmgr.cpp | 4 +- linden/indra/newview/llfloaterpermissionsmgr.h | 4 +- linden/indra/newview/llfloaterpostcard.cpp | 9 +- linden/indra/newview/llfloaterpostcard.h | 6 +- linden/indra/newview/llfloaterpreference.cpp | 13 +- linden/indra/newview/llfloaterpreference.h | 4 +- linden/indra/newview/llfloaterproperties.cpp | 4 +- linden/indra/newview/llfloaterproperties.h | 4 +- linden/indra/newview/llfloaterregioninfo.cpp | 95 +- linden/indra/newview/llfloaterregioninfo.h | 22 +- linden/indra/newview/llfloaterreleasemsg.cpp | 34 +- linden/indra/newview/llfloaterreleasemsg.h | 7 +- linden/indra/newview/llfloaterreporter.cpp | 14 +- linden/indra/newview/llfloaterreporter.h | 4 +- linden/indra/newview/llfloatersaveavatar.cpp | 4 +- linden/indra/newview/llfloatersaveavatar.h | 4 +- linden/indra/newview/llfloaterscriptdebug.cpp | 8 +- linden/indra/newview/llfloaterscriptdebug.h | 4 +- linden/indra/newview/llfloatersellland.cpp | 13 +- linden/indra/newview/llfloatersellland.h | 4 +- linden/indra/newview/llfloatersnapshot.cpp | 6 +- linden/indra/newview/llfloatersnapshot.h | 4 +- linden/indra/newview/llfloatertelehub.cpp | 6 +- linden/indra/newview/llfloatertelehub.h | 4 +- linden/indra/newview/llfloatertest.cpp | 8 +- linden/indra/newview/llfloatertest.h | 4 +- linden/indra/newview/llfloatertools.cpp | 7 +- linden/indra/newview/llfloatertools.h | 4 +- linden/indra/newview/llfloatertopobjects.cpp | 12 +- linden/indra/newview/llfloatertopobjects.h | 4 +- linden/indra/newview/llfloatertos.cpp | 4 +- linden/indra/newview/llfloatertos.h | 4 +- linden/indra/newview/llfloaterurldisplay.cpp | 43 +- linden/indra/newview/llfloaterurldisplay.h | 4 +- linden/indra/newview/llfloatervoicewizard.cpp | 45 +- linden/indra/newview/llfloatervoicewizard.h | 7 +- linden/indra/newview/llfloaterworldmap.cpp | 106 +- linden/indra/newview/llfloaterworldmap.h | 26 +- linden/indra/newview/llfolderview.cpp | 32 +- linden/indra/newview/llfolderview.h | 6 +- linden/indra/newview/llfollowcam.cpp | 4 +- linden/indra/newview/llfollowcam.h | 4 +- linden/indra/newview/llframestats.cpp | 4 +- linden/indra/newview/llframestats.h | 4 +- linden/indra/newview/llframestatview.cpp | 4 +- linden/indra/newview/llframestatview.h | 4 +- linden/indra/newview/llgenepool.cpp | 4 +- linden/indra/newview/llgenepool.h | 4 +- linden/indra/newview/llgesturemgr.cpp | 14 +- linden/indra/newview/llgesturemgr.h | 4 +- linden/indra/newview/llgivemoney.cpp | 4 +- linden/indra/newview/llgivemoney.h | 4 +- linden/indra/newview/llglsandbox.cpp | 4 +- linden/indra/newview/llglslshader.cpp | 4 +- linden/indra/newview/llglslshader.h | 4 +- linden/indra/newview/llgroupmgr.cpp | 10 +- linden/indra/newview/llgroupmgr.h | 4 +- linden/indra/newview/llgroupnotify.cpp | 6 +- linden/indra/newview/llgroupnotify.h | 4 +- linden/indra/newview/llhippo.cpp | 4 +- linden/indra/newview/llhippo.h | 4 +- linden/indra/newview/llhoverview.cpp | 4 +- linden/indra/newview/llhoverview.h | 4 +- linden/indra/newview/llhudconnector.cpp | 4 +- linden/indra/newview/llhudconnector.h | 4 +- linden/indra/newview/llhudeffect.cpp | 4 +- linden/indra/newview/llhudeffect.h | 4 +- linden/indra/newview/llhudeffectbeam.cpp | 4 +- linden/indra/newview/llhudeffectbeam.h | 4 +- linden/indra/newview/llhudeffectlookat.cpp | 4 +- linden/indra/newview/llhudeffectlookat.h | 4 +- linden/indra/newview/llhudeffectpointat.cpp | 4 +- linden/indra/newview/llhudeffectpointat.h | 4 +- linden/indra/newview/llhudeffecttrail.cpp | 4 +- linden/indra/newview/llhudeffecttrail.h | 4 +- linden/indra/newview/llhudicon.cpp | 4 +- linden/indra/newview/llhudicon.h | 4 +- linden/indra/newview/llhudmanager.cpp | 4 +- linden/indra/newview/llhudmanager.h | 4 +- linden/indra/newview/llhudobject.cpp | 4 +- linden/indra/newview/llhudobject.h | 4 +- linden/indra/newview/llhudrender.cpp | 4 +- linden/indra/newview/llhudrender.h | 4 +- linden/indra/newview/llhudtext.cpp | 4 +- linden/indra/newview/llhudtext.h | 4 +- linden/indra/newview/llhudview.cpp | 8 +- linden/indra/newview/llhudview.h | 10 +- linden/indra/newview/llimpanel.cpp | 530 ++- linden/indra/newview/llimpanel.h | 58 +- linden/indra/newview/llimview.cpp | 503 ++- linden/indra/newview/llimview.h | 36 +- linden/indra/newview/llinventoryactions.cpp | 15 +- linden/indra/newview/llinventorybridge.cpp | 67 +- linden/indra/newview/llinventorybridge.h | 4 +- linden/indra/newview/llinventoryclipboard.cpp | 4 +- linden/indra/newview/llinventoryclipboard.h | 4 +- linden/indra/newview/llinventorymodel.cpp | 6 +- linden/indra/newview/llinventorymodel.h | 4 +- linden/indra/newview/llinventoryview.cpp | 19 +- linden/indra/newview/llinventoryview.h | 4 +- linden/indra/newview/lljoystickbutton.cpp | 16 +- linden/indra/newview/lljoystickbutton.h | 4 +- linden/indra/newview/lllandmarklist.cpp | 4 +- linden/indra/newview/lllandmarklist.h | 4 +- linden/indra/newview/lllcd.cpp | 4 +- linden/indra/newview/lllcd.h | 4 +- linden/indra/newview/lllightconstants.h | 4 +- linden/indra/newview/lllocalanimationobject.cpp | 4 +- linden/indra/newview/lllocalanimationobject.h | 4 +- linden/indra/newview/lllogchat.cpp | 4 +- linden/indra/newview/lllogchat.h | 4 +- linden/indra/newview/llmanip.cpp | 4 +- linden/indra/newview/llmanip.h | 4 +- linden/indra/newview/llmaniprotate.cpp | 4 +- linden/indra/newview/llmaniprotate.h | 4 +- linden/indra/newview/llmanipscale.cpp | 4 +- linden/indra/newview/llmanipscale.h | 4 +- linden/indra/newview/llmaniptranslate.cpp | 19 +- linden/indra/newview/llmaniptranslate.h | 4 +- linden/indra/newview/llmapresponders.cpp | 4 +- linden/indra/newview/llmapresponders.h | 4 +- linden/indra/newview/llmediaremotectrl.cpp | 112 +- linden/indra/newview/llmediaremotectrl.h | 23 +- linden/indra/newview/llmemoryview.cpp | 4 +- linden/indra/newview/llmemoryview.h | 4 +- linden/indra/newview/llmenucommands.cpp | 4 +- linden/indra/newview/llmenucommands.h | 4 +- linden/indra/newview/llmorphview.cpp | 4 +- linden/indra/newview/llmorphview.h | 4 +- linden/indra/newview/llmoveview.cpp | 4 +- linden/indra/newview/llmoveview.h | 4 +- linden/indra/newview/llmutelist.cpp | 75 +- linden/indra/newview/llmutelist.h | 10 +- linden/indra/newview/llnamebox.cpp | 4 +- linden/indra/newview/llnamebox.h | 4 +- linden/indra/newview/llnameeditor.cpp | 6 +- linden/indra/newview/llnameeditor.h | 6 +- linden/indra/newview/llnamelistctrl.cpp | 30 +- linden/indra/newview/llnamelistctrl.h | 4 +- linden/indra/newview/llnetmap.cpp | 4 +- linden/indra/newview/llnetmap.h | 4 +- linden/indra/newview/llnotify.cpp | 33 +- linden/indra/newview/llnotify.h | 4 +- linden/indra/newview/lloverlaybar.cpp | 506 +-- linden/indra/newview/lloverlaybar.h | 25 +- linden/indra/newview/llpanelLCD.cpp | 4 +- linden/indra/newview/llpanelLCD.h | 4 +- linden/indra/newview/llpanelaudioprefs.cpp | 8 +- linden/indra/newview/llpanelaudioprefs.h | 4 +- linden/indra/newview/llpanelaudiovolume.cpp | 85 +- linden/indra/newview/llpanelaudiovolume.h | 18 +- linden/indra/newview/llpanelavatar.cpp | 27 +- linden/indra/newview/llpanelavatar.h | 5 +- linden/indra/newview/llpanelclassified.cpp | 40 +- linden/indra/newview/llpanelclassified.h | 6 +- linden/indra/newview/llpanelcontents.cpp | 4 +- linden/indra/newview/llpanelcontents.h | 4 +- linden/indra/newview/llpaneldebug.cpp | 4 +- linden/indra/newview/llpaneldebug.h | 4 +- linden/indra/newview/llpaneldirbrowser.cpp | 16 +- linden/indra/newview/llpaneldirbrowser.h | 4 +- linden/indra/newview/llpaneldirclassified.cpp | 4 +- linden/indra/newview/llpaneldirclassified.h | 4 +- linden/indra/newview/llpaneldirevents.cpp | 4 +- linden/indra/newview/llpaneldirevents.h | 4 +- linden/indra/newview/llpaneldirfind.cpp | 7 +- linden/indra/newview/llpaneldirfind.h | 4 +- linden/indra/newview/llpaneldirgroups.cpp | 4 +- linden/indra/newview/llpaneldirgroups.h | 4 +- linden/indra/newview/llpaneldirland.cpp | 4 +- linden/indra/newview/llpaneldirland.h | 4 +- linden/indra/newview/llpaneldirpeople.cpp | 4 +- linden/indra/newview/llpaneldirpeople.h | 4 +- linden/indra/newview/llpaneldirplaces.cpp | 4 +- linden/indra/newview/llpaneldirplaces.h | 4 +- linden/indra/newview/llpaneldirpopular.cpp | 4 +- linden/indra/newview/llpaneldirpopular.h | 4 +- linden/indra/newview/llpaneldisplay.cpp | 4 +- linden/indra/newview/llpaneldisplay.h | 4 +- linden/indra/newview/llpanelevent.cpp | 4 +- linden/indra/newview/llpanelevent.h | 4 +- linden/indra/newview/llpanelface.cpp | 6 +- linden/indra/newview/llpanelface.h | 4 +- linden/indra/newview/llpanelgeneral.cpp | 6 +- linden/indra/newview/llpanelgeneral.h | 4 +- linden/indra/newview/llpanelgroup.cpp | 4 +- linden/indra/newview/llpanelgroup.h | 4 +- linden/indra/newview/llpanelgroupgeneral.cpp | 16 +- linden/indra/newview/llpanelgroupgeneral.h | 5 +- linden/indra/newview/llpanelgroupinvite.cpp | 4 +- linden/indra/newview/llpanelgroupinvite.h | 4 +- linden/indra/newview/llpanelgrouplandmoney.cpp | 8 +- linden/indra/newview/llpanelgrouplandmoney.h | 4 +- linden/indra/newview/llpanelgroupnotices.cpp | 6 +- linden/indra/newview/llpanelgroupnotices.h | 4 +- linden/indra/newview/llpanelgrouproles.cpp | 25 +- linden/indra/newview/llpanelgrouproles.h | 5 +- linden/indra/newview/llpanelgroupvoting.cpp | 226 +- linden/indra/newview/llpanelgroupvoting.h | 12 +- linden/indra/newview/llpanelinput.cpp | 4 +- linden/indra/newview/llpanelinput.h | 4 +- linden/indra/newview/llpanelinventory.cpp | 4 +- linden/indra/newview/llpanelinventory.h | 4 +- linden/indra/newview/llpanelland.cpp | 4 +- linden/indra/newview/llpanelland.h | 4 +- linden/indra/newview/llpanellandobjects.cpp | 4 +- linden/indra/newview/llpanellandobjects.h | 4 +- linden/indra/newview/llpanellandoptions.cpp | 4 +- linden/indra/newview/llpanellandoptions.h | 4 +- linden/indra/newview/llpanellogin.cpp | 481 ++- linden/indra/newview/llpanellogin.h | 32 +- linden/indra/newview/llpanelmorph.cpp | 4 +- linden/indra/newview/llpanelmorph.h | 4 +- linden/indra/newview/llpanelmsgs.cpp | 4 +- linden/indra/newview/llpanelmsgs.h | 4 +- linden/indra/newview/llpanelnetwork.cpp | 4 +- linden/indra/newview/llpanelnetwork.h | 4 +- linden/indra/newview/llpanelobject.cpp | 12 +- linden/indra/newview/llpanelobject.h | 4 +- linden/indra/newview/llpanelpermissions.cpp | 4 +- linden/indra/newview/llpanelpermissions.h | 4 +- linden/indra/newview/llpanelpick.cpp | 4 +- linden/indra/newview/llpanelpick.h | 4 +- linden/indra/newview/llpanelplace.cpp | 4 +- linden/indra/newview/llpanelplace.h | 4 +- linden/indra/newview/llpanelvolume.cpp | 6 +- linden/indra/newview/llpanelvolume.h | 4 +- linden/indra/newview/llpanelweb.cpp | 4 +- linden/indra/newview/llpanelweb.h | 4 +- linden/indra/newview/llpatchvertexarray.cpp | 4 +- linden/indra/newview/llpatchvertexarray.h | 4 +- linden/indra/newview/llpolymesh.cpp | 20 +- linden/indra/newview/llpolymesh.h | 13 +- linden/indra/newview/llpolymorph.cpp | 4 +- linden/indra/newview/llpolymorph.h | 4 +- linden/indra/newview/llprefschat.cpp | 4 +- linden/indra/newview/llprefschat.h | 4 +- linden/indra/newview/llprefsim.cpp | 4 +- linden/indra/newview/llprefsim.h | 4 +- linden/indra/newview/llprefsvoice.cpp | 16 +- linden/indra/newview/llprefsvoice.h | 4 +- linden/indra/newview/llpreview.cpp | 43 +- linden/indra/newview/llpreview.h | 17 +- linden/indra/newview/llpreviewanim.cpp | 4 +- linden/indra/newview/llpreviewanim.h | 7 +- linden/indra/newview/llpreviewgesture.cpp | 15 +- linden/indra/newview/llpreviewgesture.h | 6 +- linden/indra/newview/llpreviewlandmark.cpp | 7 +- linden/indra/newview/llpreviewlandmark.h | 6 +- linden/indra/newview/llpreviewnotecard.cpp | 10 +- linden/indra/newview/llpreviewnotecard.h | 9 +- linden/indra/newview/llpreviewscript.cpp | 18 +- linden/indra/newview/llpreviewscript.h | 8 +- linden/indra/newview/llpreviewsound.cpp | 6 +- linden/indra/newview/llpreviewsound.h | 7 +- linden/indra/newview/llpreviewtexture.cpp | 6 +- linden/indra/newview/llpreviewtexture.h | 6 +- linden/indra/newview/llprogressview.cpp | 4 +- linden/indra/newview/llprogressview.h | 4 +- linden/indra/newview/llregionposition.cpp | 4 +- linden/indra/newview/llregionposition.h | 4 +- linden/indra/newview/llremoteparcelrequest.cpp | 34 +- linden/indra/newview/llremoteparcelrequest.h | 32 +- linden/indra/newview/llresourcedata.h | 4 +- linden/indra/newview/llroam.cpp | 4 +- linden/indra/newview/llroam.h | 4 +- linden/indra/newview/llsavedsettingsglue.cpp | 4 +- linden/indra/newview/llsavedsettingsglue.h | 4 +- linden/indra/newview/llselectmgr.cpp | 22 +- linden/indra/newview/llselectmgr.h | 4 +- linden/indra/newview/llsky.cpp | 4 +- linden/indra/newview/llsky.h | 4 +- linden/indra/newview/llspatialpartition.cpp | 4 +- linden/indra/newview/llspatialpartition.h | 4 +- linden/indra/newview/llsphere.cpp | 4 +- linden/indra/newview/llsphere.h | 4 +- linden/indra/newview/llsprite.cpp | 4 +- linden/indra/newview/llsprite.h | 4 +- linden/indra/newview/llsrv.cpp | 4 +- linden/indra/newview/llsrv.h | 4 +- linden/indra/newview/llstartup.cpp | 232 +- linden/indra/newview/llstartup.h | 4 +- linden/indra/newview/llstatbar.cpp | 4 +- linden/indra/newview/llstatbar.h | 4 +- linden/indra/newview/llstatgraph.cpp | 4 +- linden/indra/newview/llstatgraph.h | 4 +- linden/indra/newview/llstatusbar.cpp | 94 +- linden/indra/newview/llstatusbar.h | 4 +- linden/indra/newview/llstatview.cpp | 4 +- linden/indra/newview/llstatview.h | 4 +- linden/indra/newview/llsurface.cpp | 4 +- linden/indra/newview/llsurface.h | 4 +- linden/indra/newview/llsurfacepatch.cpp | 4 +- linden/indra/newview/llsurfacepatch.h | 4 +- linden/indra/newview/lltable.h | 4 +- linden/indra/newview/lltexlayer.cpp | 4 +- linden/indra/newview/lltexlayer.h | 4 +- linden/indra/newview/lltexturecache.cpp | 4 +- linden/indra/newview/lltexturecache.h | 4 +- linden/indra/newview/lltexturectrl.cpp | 4 +- linden/indra/newview/lltexturectrl.h | 4 +- linden/indra/newview/lltexturefetch.cpp | 4 +- linden/indra/newview/lltexturefetch.h | 4 +- linden/indra/newview/lltextureview.cpp | 5 +- linden/indra/newview/lltextureview.h | 4 +- linden/indra/newview/lltool.cpp | 4 +- linden/indra/newview/lltool.h | 4 +- linden/indra/newview/lltoolbar.cpp | 186 +- linden/indra/newview/lltoolbar.h | 13 +- linden/indra/newview/lltoolbrush.cpp | 4 +- linden/indra/newview/lltoolbrush.h | 4 +- linden/indra/newview/lltoolcomp.cpp | 4 +- linden/indra/newview/lltoolcomp.h | 4 +- linden/indra/newview/lltooldraganddrop.cpp | 28 +- linden/indra/newview/lltooldraganddrop.h | 4 +- linden/indra/newview/lltoolface.cpp | 4 +- linden/indra/newview/lltoolface.h | 4 +- linden/indra/newview/lltoolfocus.cpp | 4 +- linden/indra/newview/lltoolfocus.h | 4 +- linden/indra/newview/lltoolgrab.cpp | 4 +- linden/indra/newview/lltoolgrab.h | 4 +- linden/indra/newview/lltoolgun.cpp | 4 +- linden/indra/newview/lltoolgun.h | 4 +- linden/indra/newview/lltoolindividual.cpp | 4 +- linden/indra/newview/lltoolindividual.h | 4 +- linden/indra/newview/lltoolmgr.cpp | 4 +- linden/indra/newview/lltoolmgr.h | 4 +- linden/indra/newview/lltoolmorph.cpp | 4 +- linden/indra/newview/lltoolmorph.h | 4 +- linden/indra/newview/lltoolobjpicker.cpp | 4 +- linden/indra/newview/lltoolobjpicker.h | 4 +- linden/indra/newview/lltoolpie.cpp | 4 +- linden/indra/newview/lltoolpie.h | 4 +- linden/indra/newview/lltoolpipette.cpp | 4 +- linden/indra/newview/lltoolpipette.h | 4 +- linden/indra/newview/lltoolplacer.cpp | 6 +- linden/indra/newview/lltoolplacer.h | 4 +- linden/indra/newview/lltoolselect.cpp | 4 +- linden/indra/newview/lltoolselect.h | 4 +- linden/indra/newview/lltoolselectland.cpp | 4 +- linden/indra/newview/lltoolselectland.h | 4 +- linden/indra/newview/lltoolselectrect.cpp | 4 +- linden/indra/newview/lltoolselectrect.h | 4 +- linden/indra/newview/lltoolview.cpp | 4 +- linden/indra/newview/lltoolview.h | 4 +- linden/indra/newview/lltracker.cpp | 8 +- linden/indra/newview/lltracker.h | 7 +- linden/indra/newview/lluiconstants.h | 4 +- linden/indra/newview/lluploaddialog.cpp | 4 +- linden/indra/newview/lluploaddialog.h | 4 +- linden/indra/newview/llurl.cpp | 4 +- linden/indra/newview/llurl.h | 4 +- linden/indra/newview/llurldispatcher.cpp | 68 +- linden/indra/newview/llurldispatcher.h | 13 +- linden/indra/newview/llurlsimstring.cpp | 4 +- linden/indra/newview/llurlsimstring.h | 4 +- linden/indra/newview/llurlwhitelist.cpp | 4 +- linden/indra/newview/llurlwhitelist.h | 4 +- linden/indra/newview/lluserauth.cpp | 92 +- linden/indra/newview/lluserauth.h | 22 +- linden/indra/newview/llvectorperfoptions.cpp | 30 +- linden/indra/newview/llvectorperfoptions.h | 28 +- linden/indra/newview/llvelocitybar.cpp | 4 +- linden/indra/newview/llvelocitybar.h | 4 +- linden/indra/newview/llviewchildren.cpp | 4 +- linden/indra/newview/llviewchildren.h | 4 +- linden/indra/newview/llviewerassetstorage.cpp | 4 +- linden/indra/newview/llviewerassetstorage.h | 4 +- linden/indra/newview/llvieweraudio.cpp | 44 +- linden/indra/newview/llvieweraudio.h | 28 +- linden/indra/newview/llviewerbuild.h | 4 +- linden/indra/newview/llviewercamera.cpp | 8 +- linden/indra/newview/llviewercamera.h | 4 +- linden/indra/newview/llviewercontrol.cpp | 4 +- linden/indra/newview/llviewercontrol.h | 4 +- linden/indra/newview/llviewerdisplay.cpp | 4 +- linden/indra/newview/llviewerdisplay.h | 4 +- linden/indra/newview/llviewergenericmessage.cpp | 4 +- linden/indra/newview/llviewergenericmessage.h | 4 +- linden/indra/newview/llviewergesture.cpp | 4 +- linden/indra/newview/llviewergesture.h | 4 +- linden/indra/newview/llviewerimage.cpp | 4 +- linden/indra/newview/llviewerimage.h | 4 +- linden/indra/newview/llviewerimagelist.cpp | 902 ++-- linden/indra/newview/llviewerimagelist.h | 13 +- linden/indra/newview/llviewerinventory.cpp | 35 +- linden/indra/newview/llviewerinventory.h | 10 +- linden/indra/newview/llviewerjoint.cpp | 4 +- linden/indra/newview/llviewerjoint.h | 4 +- linden/indra/newview/llviewerjointattachment.cpp | 4 +- linden/indra/newview/llviewerjointattachment.h | 4 +- linden/indra/newview/llviewerjointmesh.cpp | 4 +- linden/indra/newview/llviewerjointmesh.h | 4 +- linden/indra/newview/llviewerjointmesh_sse.cpp | 4 +- linden/indra/newview/llviewerjointmesh_sse2.cpp | 4 +- linden/indra/newview/llviewerjointmesh_vec.cpp | 4 +- linden/indra/newview/llviewerjointshape.cpp | 4 +- linden/indra/newview/llviewerjointshape.h | 4 +- linden/indra/newview/llviewerjoystick.cpp | 4 +- linden/indra/newview/llviewerjoystick.h | 4 +- linden/indra/newview/llviewerkeyboard.cpp | 4 +- linden/indra/newview/llviewerkeyboard.h | 4 +- linden/indra/newview/llviewerlayer.cpp | 4 +- linden/indra/newview/llviewerlayer.h | 4 +- linden/indra/newview/llviewermenu.cpp | 59 +- linden/indra/newview/llviewermenu.h | 4 +- linden/indra/newview/llviewermenufile.cpp | 14 +- linden/indra/newview/llviewermenufile.h | 4 +- linden/indra/newview/llviewermessage.cpp | 125 +- linden/indra/newview/llviewermessage.h | 6 +- linden/indra/newview/llviewernetwork.cpp | 72 +- linden/indra/newview/llviewernetwork.h | 21 +- linden/indra/newview/llviewerobject.cpp | 26 +- linden/indra/newview/llviewerobject.h | 5 +- linden/indra/newview/llviewerobjectlist.cpp | 4 +- linden/indra/newview/llviewerobjectlist.h | 4 +- linden/indra/newview/llviewerparcelmgr.cpp | 62 +- linden/indra/newview/llviewerparcelmgr.h | 6 +- linden/indra/newview/llviewerparceloverlay.cpp | 4 +- linden/indra/newview/llviewerparceloverlay.h | 4 +- linden/indra/newview/llviewerpartsim.cpp | 4 +- linden/indra/newview/llviewerpartsim.h | 4 +- linden/indra/newview/llviewerpartsource.cpp | 4 +- linden/indra/newview/llviewerpartsource.h | 4 +- .../indra/newview/llviewerprecompiledheaders.cpp | 4 +- linden/indra/newview/llviewerprecompiledheaders.h | 5 +- linden/indra/newview/llviewerregion.cpp | 20 +- linden/indra/newview/llviewerregion.h | 6 +- linden/indra/newview/llviewerstats.cpp | 16 +- linden/indra/newview/llviewerstats.h | 6 +- linden/indra/newview/llviewertexteditor.cpp | 96 +- linden/indra/newview/llviewertexteditor.h | 4 +- linden/indra/newview/llviewertextureanim.cpp | 4 +- linden/indra/newview/llviewertextureanim.h | 4 +- linden/indra/newview/llviewerthrottle.cpp | 4 +- linden/indra/newview/llviewerthrottle.h | 4 +- linden/indra/newview/llvieweruictrlfactory.cpp | 4 +- linden/indra/newview/llvieweruictrlfactory.h | 4 +- linden/indra/newview/llviewervisualparam.cpp | 4 +- linden/indra/newview/llviewervisualparam.h | 4 +- linden/indra/newview/llviewerwindow.cpp | 271 +- linden/indra/newview/llviewerwindow.h | 15 +- linden/indra/newview/llvlcomposition.cpp | 4 +- linden/indra/newview/llvlcomposition.h | 4 +- linden/indra/newview/llvlmanager.cpp | 4 +- linden/indra/newview/llvlmanager.h | 4 +- linden/indra/newview/llvoavatar.cpp | 58 +- linden/indra/newview/llvoavatar.h | 4 +- linden/indra/newview/llvocache.cpp | 4 +- linden/indra/newview/llvocache.h | 4 +- linden/indra/newview/llvoclouds.cpp | 4 +- linden/indra/newview/llvoclouds.h | 4 +- linden/indra/newview/llvograss.cpp | 4 +- linden/indra/newview/llvograss.h | 4 +- linden/indra/newview/llvoground.cpp | 4 +- linden/indra/newview/llvoground.h | 4 +- linden/indra/newview/llvoiceclient.cpp | 202 +- linden/indra/newview/llvoiceclient.h | 14 +- linden/indra/newview/llvoiceremotectrl.cpp | 146 +- linden/indra/newview/llvoiceremotectrl.h | 8 +- linden/indra/newview/llvoicevisualizer.cpp | 6 +- linden/indra/newview/llvoicevisualizer.h | 4 +- linden/indra/newview/llvoinventorylistener.cpp | 4 +- linden/indra/newview/llvoinventorylistener.h | 4 +- linden/indra/newview/llvopartgroup.cpp | 4 +- linden/indra/newview/llvopartgroup.h | 4 +- linden/indra/newview/llvosky.cpp | 4 +- linden/indra/newview/llvosky.h | 4 +- linden/indra/newview/llvostars.cpp | 4 +- linden/indra/newview/llvostars.h | 4 +- linden/indra/newview/llvosurfacepatch.cpp | 4 +- linden/indra/newview/llvosurfacepatch.h | 4 +- linden/indra/newview/llvotextbubble.cpp | 4 +- linden/indra/newview/llvotextbubble.h | 4 +- linden/indra/newview/llvotree.cpp | 4 +- linden/indra/newview/llvotree.h | 4 +- linden/indra/newview/llvotreenew.h | 4 +- linden/indra/newview/llvovolume.cpp | 4 +- linden/indra/newview/llvovolume.h | 4 +- linden/indra/newview/llvowater.cpp | 4 +- linden/indra/newview/llvowater.h | 4 +- linden/indra/newview/llwearable.cpp | 4 +- linden/indra/newview/llwearable.h | 4 +- linden/indra/newview/llwearablelist.cpp | 4 +- linden/indra/newview/llwearablelist.h | 4 +- linden/indra/newview/llweb.cpp | 4 +- linden/indra/newview/llweb.h | 4 +- linden/indra/newview/llwebbrowserctrl.cpp | 40 +- linden/indra/newview/llwebbrowserctrl.h | 18 +- linden/indra/newview/llwind.cpp | 4 +- linden/indra/newview/llwind.h | 4 +- linden/indra/newview/llwindebug.cpp | 4 +- linden/indra/newview/llwindebug.h | 4 +- linden/indra/newview/llworld.cpp | 9 +- linden/indra/newview/llworld.h | 4 +- linden/indra/newview/llworldmap.cpp | 4 +- linden/indra/newview/llworldmap.h | 4 +- linden/indra/newview/llworldmapview.cpp | 21 +- linden/indra/newview/llworldmapview.h | 11 +- linden/indra/newview/llxmlrpctransaction.cpp | 4 +- linden/indra/newview/llxmlrpctransaction.h | 4 +- linden/indra/newview/macmain.h | 4 +- linden/indra/newview/macutil_Prefix.h | 4 +- .../newview/macview.xcodeproj/project.pbxproj | 39 +- linden/indra/newview/macview_Prefix.h | 6 +- linden/indra/newview/moviemaker.cpp | 4 +- linden/indra/newview/moviemaker.h | 4 +- linden/indra/newview/newview.vcproj | 44 +- linden/indra/newview/newview_vc8.vcproj | 174 +- linden/indra/newview/newview_vc9.vcproj | 4400 ++++++++++++++++++++ linden/indra/newview/noise.cpp | 4 +- linden/indra/newview/noise.h | 4 +- linden/indra/newview/pipeline.cpp | 9 +- linden/indra/newview/pipeline.h | 4 +- linden/indra/newview/randgauss.h | 4 +- linden/indra/newview/releasenotes.txt | 211 +- linden/indra/newview/res/newViewRes.rc | 8 +- linden/indra/newview/res/resource.h | 30 + linden/indra/newview/skins/textures/textures.xml | 51 +- linden/indra/newview/skins/xui/de/alerts.xml | 112 +- .../newview/skins/xui/de/floater_about_land.xml | 10 +- .../skins/xui/de/floater_active_speakers.xml | 5 +- .../newview/skins/xui/de/floater_chat_history.xml | 6 + .../newview/skins/xui/de/floater_directory.xml | 54 + linden/indra/newview/skins/xui/de/floater_html.xml | 2 +- .../newview/skins/xui/de/floater_html_help.xml | 10 - linden/indra/newview/skins/xui/de/floater_im.xml | 18 + .../skins/xui/de/floater_instant_message.xml | 10 +- .../xui/de/floater_instant_message_ad_hoc.xml | 3 + .../skins/xui/de/floater_instant_message_group.xml | 29 +- .../newview/skins/xui/de/floater_mute_object.xml | 12 + .../skins/xui/de/floater_preview_gesture.xml | 6 + .../newview/skins/xui/de/floater_region_info.xml | 2 + linden/indra/newview/skins/xui/de/menu_login.xml | 1 + .../newview/skins/xui/de/need_to_translate.xml | 553 +-- .../indra/newview/skins/xui/de/need_to_update.xml | 3424 +-------------- linden/indra/newview/skins/xui/de/notify.xml | 41 +- linden/indra/newview/skins/xui/de/panel_avatar.xml | 7 +- .../indra/newview/skins/xui/de/panel_chat_bar.xml | 4 +- .../indra/newview/skins/xui/de/panel_friends.xml | 8 +- .../newview/skins/xui/de/panel_group_voting.xml | 12 +- linden/indra/newview/skins/xui/de/panel_login.xml | 46 +- .../newview/skins/xui/de/panel_media_controls.xml | 8 + .../skins/xui/de/panel_media_remote_expanded.xml | 4 + .../newview/skins/xui/de/panel_overlaybar.xml | 25 +- .../skins/xui/de/panel_preferences_general.xml | 4 +- .../skins/xui/de/panel_preferences_graphics1.xml | 3 + .../skins/xui/de/panel_preferences_voice.xml | 6 +- .../newview/skins/xui/de/panel_preferences_web.xml | 9 + .../skins/xui/de/panel_speaker_controls.xml | 30 + .../newview/skins/xui/de/panel_status_bar.xml | 6 +- .../indra/newview/skins/xui/de/panel_toolbar.xml | 8 +- .../newview/skins/xui/de/panel_voice_controls.xml | 10 + .../newview/skins/xui/de/panel_voice_enable.xml | 2 +- .../skins/xui/de/panel_voice_remote_expanded.xml | 4 + linden/indra/newview/skins/xui/en-us/alerts.xml | 110 +- .../newview/skins/xui/en-us/floater_about_land.xml | 24 +- .../skins/xui/en-us/floater_active_speakers.xml | 23 +- .../skins/xui/en-us/floater_audio_volume.xml | 6 +- .../skins/xui/en-us/floater_chat_history.xml | 69 +- .../skins/xui/en-us/floater_device_settings.xml | 2 +- .../newview/skins/xui/en-us/floater_directory.xml | 36 +- .../newview/skins/xui/en-us/floater_groups.xml | 10 +- .../indra/newview/skins/xui/en-us/floater_html.xml | 12 +- .../newview/skins/xui/en-us/floater_html_help.xml | 25 - .../indra/newview/skins/xui/en-us/floater_im.xml | 25 +- .../skins/xui/en-us/floater_instant_message.xml | 130 +- .../xui/en-us/floater_instant_message_ad_hoc.xml | 81 +- .../xui/en-us/floater_instant_message_group.xml | 236 +- .../en-us/floater_inventory_item_properties.xml | 2 +- .../indra/newview/skins/xui/en-us/floater_mute.xml | 2 +- .../skins/xui/en-us/floater_mute_object.xml | 18 + .../newview/skins/xui/en-us/floater_my_friends.xml | 16 +- .../skins/xui/en-us/floater_preview_url.xml | 4 +- .../skins/xui/en-us/floater_region_info.xml | 5 + .../skins/xui/en-us/floater_report_abuse.xml | 4 +- .../skins/xui/en-us/floater_sound_preview.xml | 25 - .../newview/skins/xui/en-us/floater_world_map.xml | 2 +- .../newview/skins/xui/en-us/menu_inventory.xml | 9 +- .../indra/newview/skins/xui/en-us/menu_viewer.xml | 2 +- linden/indra/newview/skins/xui/en-us/notify.xml | 51 +- .../indra/newview/skins/xui/en-us/panel_audio.xml | 95 +- .../newview/skins/xui/en-us/panel_audio_device.xml | 9 +- .../indra/newview/skins/xui/en-us/panel_avatar.xml | 5 +- .../indra/newview/skins/xui/en-us/panel_bars.xml | 11 + .../indra/newview/skins/xui/en-us/panel_bg_tab.xml | 12 + .../newview/skins/xui/en-us/panel_chat_bar.xml | 43 +- .../newview/skins/xui/en-us/panel_friends.xml | 44 +- .../newview/skins/xui/en-us/panel_group_roles.xml | 10 +- .../newview/skins/xui/en-us/panel_group_voting.xml | 6 + .../indra/newview/skins/xui/en-us/panel_groups.xml | 10 +- .../indra/newview/skins/xui/en-us/panel_login.xml | 91 +- .../skins/xui/en-us/panel_master_volume.xml | 22 +- .../skins/xui/en-us/panel_media_controls.xml | 23 + .../newview/skins/xui/en-us/panel_media_remote.xml | 34 +- .../xui/en-us/panel_media_remote_expanded.xml | 8 + .../newview/skins/xui/en-us/panel_overlaybar.xml | 93 +- .../skins/xui/en-us/panel_preferences_audio.xml | 27 - .../skins/xui/en-us/panel_preferences_voice.xml | 95 +- .../skins/xui/en-us/panel_preferences_web.xml | 2 +- .../skins/xui/en-us/panel_speaker_controls.xml | 67 + .../newview/skins/xui/en-us/panel_status_bar.xml | 77 +- .../newview/skins/xui/en-us/panel_toolbar.xml | 17 +- .../skins/xui/en-us/panel_voice_controls.xml | 18 + .../newview/skins/xui/en-us/panel_voice_enable.xml | 4 +- .../newview/skins/xui/en-us/panel_voice_remote.xml | 16 +- .../xui/en-us/panel_voice_remote_expanded.xml | 18 + .../newview/skins/xui/es/floater_html_help.xml | 10 - .../indra/newview/skins/xui/es/panel_chat_bar.xml | 2 +- linden/indra/newview/skins/xui/es/panel_login.xml | 36 +- .../indra/newview/skins/xui/es/panel_toolbar.xml | 2 +- .../newview/skins/xui/fr/floater_html_help.xml | 10 - .../indra/newview/skins/xui/fr/panel_chat_bar.xml | 2 +- linden/indra/newview/skins/xui/fr/panel_login.xml | 38 +- .../indra/newview/skins/xui/fr/panel_toolbar.xml | 2 +- linden/indra/newview/skins/xui/ja/alerts.xml | 136 +- .../newview/skins/xui/ja/floater_about_land.xml | 11 +- .../skins/xui/ja/floater_active_speakers.xml | 3 +- .../newview/skins/xui/ja/floater_chat_history.xml | 6 + .../newview/skins/xui/ja/floater_directory.xml | 54 + linden/indra/newview/skins/xui/ja/floater_html.xml | 2 +- .../newview/skins/xui/ja/floater_html_help.xml | 10 - linden/indra/newview/skins/xui/ja/floater_im.xml | 18 + .../skins/xui/ja/floater_instant_message.xml | 13 +- .../xui/ja/floater_instant_message_ad_hoc.xml | 3 + .../skins/xui/ja/floater_instant_message_group.xml | 31 +- .../newview/skins/xui/ja/floater_mute_object.xml | 12 + .../skins/xui/ja/floater_preview_gesture.xml | 6 + .../newview/skins/xui/ja/floater_region_info.xml | 2 + linden/indra/newview/skins/xui/ja/menu_login.xml | 1 + linden/indra/newview/skins/xui/ja/need_to_long.xml | 94 - .../newview/skins/xui/ja/need_to_translate.xml | 561 +-- .../indra/newview/skins/xui/ja/need_to_update.xml | 3330 +-------------- linden/indra/newview/skins/xui/ja/notify.xml | 43 +- linden/indra/newview/skins/xui/ja/panel_avatar.xml | 7 +- .../indra/newview/skins/xui/ja/panel_chat_bar.xml | 4 +- .../indra/newview/skins/xui/ja/panel_friends.xml | 11 +- .../newview/skins/xui/ja/panel_group_voting.xml | 8 +- linden/indra/newview/skins/xui/ja/panel_login.xml | 46 +- .../newview/skins/xui/ja/panel_media_controls.xml | 10 + .../skins/xui/ja/panel_media_remote_expanded.xml | 4 + .../newview/skins/xui/ja/panel_overlaybar.xml | 19 + .../skins/xui/ja/panel_preferences_general.xml | 4 +- .../skins/xui/ja/panel_preferences_graphics1.xml | 3 + .../newview/skins/xui/ja/panel_preferences_im.xml | 2 +- .../skins/xui/ja/panel_preferences_voice.xml | 7 +- .../newview/skins/xui/ja/panel_preferences_web.xml | 11 + .../skins/xui/ja/panel_speaker_controls.xml | 31 + .../newview/skins/xui/ja/panel_status_bar.xml | 7 +- .../indra/newview/skins/xui/ja/panel_toolbar.xml | 9 +- .../newview/skins/xui/ja/panel_voice_controls.xml | 10 + .../newview/skins/xui/ja/panel_voice_enable.xml | 2 +- .../newview/skins/xui/ja/panel_voice_options.xml | 2 +- .../skins/xui/ja/panel_voice_remote_expanded.xml | 4 + linden/indra/newview/skins/xui/ko/alerts.xml | 147 +- .../newview/skins/xui/ko/floater_about_land.xml | 10 +- .../skins/xui/ko/floater_active_speakers.xml | 2 +- .../newview/skins/xui/ko/floater_chat_history.xml | 6 + .../newview/skins/xui/ko/floater_directory.xml | 54 + linden/indra/newview/skins/xui/ko/floater_html.xml | 2 +- .../newview/skins/xui/ko/floater_html_help.xml | 10 - linden/indra/newview/skins/xui/ko/floater_im.xml | 18 + .../skins/xui/ko/floater_instant_message.xml | 12 +- .../xui/ko/floater_instant_message_ad_hoc.xml | 3 + .../skins/xui/ko/floater_instant_message_group.xml | 29 +- .../newview/skins/xui/ko/floater_mute_object.xml | 12 + .../skins/xui/ko/floater_preview_gesture.xml | 6 + .../newview/skins/xui/ko/floater_region_info.xml | 2 + linden/indra/newview/skins/xui/ko/menu_login.xml | 1 + linden/indra/newview/skins/xui/ko/need_to_long.xml | 57 +- .../newview/skins/xui/ko/need_to_translate.xml | 561 +-- .../indra/newview/skins/xui/ko/need_to_update.xml | 3413 +-------------- linden/indra/newview/skins/xui/ko/notify.xml | 43 +- linden/indra/newview/skins/xui/ko/panel_avatar.xml | 7 +- .../indra/newview/skins/xui/ko/panel_chat_bar.xml | 4 +- .../indra/newview/skins/xui/ko/panel_friends.xml | 27 +- .../newview/skins/xui/ko/panel_group_voting.xml | 6 + linden/indra/newview/skins/xui/ko/panel_login.xml | 45 +- .../newview/skins/xui/ko/panel_media_controls.xml | 8 + .../skins/xui/ko/panel_media_remote_expanded.xml | 4 + .../newview/skins/xui/ko/panel_overlaybar.xml | 19 + .../skins/xui/ko/panel_preferences_general.xml | 9 +- .../skins/xui/ko/panel_preferences_graphics1.xml | 3 + .../skins/xui/ko/panel_preferences_voice.xml | 6 +- .../newview/skins/xui/ko/panel_preferences_web.xml | 9 + .../skins/xui/ko/panel_speaker_controls.xml | 30 + .../newview/skins/xui/ko/panel_status_bar.xml | 7 +- .../indra/newview/skins/xui/ko/panel_toolbar.xml | 8 +- .../newview/skins/xui/ko/panel_voice_controls.xml | 10 + .../newview/skins/xui/ko/panel_voice_enable.xml | 2 +- .../newview/skins/xui/ko/panel_voice_options.xml | 3 +- .../skins/xui/ko/panel_voice_remote_expanded.xml | 4 + .../newview/skins/xui/pt/floater_html_help.xml | 10 - .../indra/newview/skins/xui/pt/panel_chat_bar.xml | 2 +- linden/indra/newview/skins/xui/pt/panel_login.xml | 27 +- .../indra/newview/skins/xui/pt/panel_toolbar.xml | 2 +- .../newview/skins/xui/zh/floater_html_help.xml | 10 - .../indra/newview/skins/xui/zh/panel_chat_bar.xml | 2 +- linden/indra/newview/skins/xui/zh/panel_login.xml | 36 +- .../indra/newview/skins/xui/zh/panel_toolbar.xml | 2 +- linden/indra/newview/viewer_manifest.py | 15 +- linden/indra/test/common.cpp | 4 +- linden/indra/test/inventory.cpp | 4 +- linden/indra/test/io.cpp | 68 +- linden/indra/test/llapp_tut.cpp | 4 +- linden/indra/test/llbase64_tut.cpp | 4 +- linden/indra/test/llbitpack_tut.cpp | 4 +- linden/indra/test/llblowfish_tut.cpp | 4 +- linden/indra/test/llbuffer_tut.cpp | 4 +- linden/indra/test/lldatapacker_tut.cpp | 4 +- linden/indra/test/lldate_tut.cpp | 4 +- linden/indra/test/llerror_tut.cpp | 4 +- linden/indra/test/llhost_tut.cpp | 4 +- linden/indra/test/llhttpclient_tut.cpp | 4 +- linden/indra/test/llhttpdate_tut.cpp | 4 +- linden/indra/test/llhttpnode_tut.cpp | 4 +- linden/indra/test/llinventoryparcel_tut.cpp | 4 +- linden/indra/test/lliohttpserver_tut.cpp | 4 +- linden/indra/test/lljoint_tut.cpp | 4 +- linden/indra/test/llmessageconfig_tut.cpp | 4 +- linden/indra/test/llmessagetemplateparser_tut.cpp | 4 +- linden/indra/test/llmime_tut.cpp | 4 +- linden/indra/test/llnamevalue_tut.cpp | 4 +- linden/indra/test/llpartdata_tut.cpp | 4 +- linden/indra/test/llpermissions_tut.cpp | 4 +- linden/indra/test/llpipeutil.cpp | 26 +- linden/indra/test/llpipeutil.h | 24 +- linden/indra/test/llquaternion_tut.cpp | 4 +- linden/indra/test/llrandom_tut.cpp | 4 +- linden/indra/test/llsaleinfo_tut.cpp | 4 +- linden/indra/test/llsd_new_tut.cpp | 4 +- linden/indra/test/llsdmessagebuilder_tut.cpp | 4 +- linden/indra/test/llsdmessagereader_tut.cpp | 4 +- linden/indra/test/llsdserialize_tut.cpp | 4 +- linden/indra/test/llsdtraits.h | 4 +- linden/indra/test/llsdutil_tut.cpp | 4 +- linden/indra/test/llservicebuilder_tut.cpp | 65 +- linden/indra/test/llstreamtools_tut.cpp | 4 +- linden/indra/test/llstring_tut.cpp | 4 +- linden/indra/test/lltemplatemessagebuilder_tut.cpp | 4 +- linden/indra/test/lltiming_tut.cpp | 4 +- linden/indra/test/lltut.cpp | 4 +- linden/indra/test/lltut.h | 4 +- linden/indra/test/lluri_tut.cpp | 83 +- linden/indra/test/lluserrelations_tut.cpp | 4 +- linden/indra/test/lluuidhashmap_tut.cpp | 4 +- linden/indra/test/llxfer_tut.cpp | 4 +- linden/indra/test/llxorcipher_tut.cpp | 4 +- linden/indra/test/m3math_tut.cpp | 4 +- linden/indra/test/math.cpp | 4 +- linden/indra/test/message_tut.cpp | 4 +- linden/indra/test/reflection_tut.cpp | 4 +- linden/indra/test/test.cpp | 13 +- linden/indra/test/test.vcproj | 2 +- linden/indra/test/test_llmanifest.py | 4 +- linden/indra/test/test_vc9.vcproj | 453 ++ linden/indra/test/v2math_tut.cpp | 4 +- linden/indra/test/v3color_tut.cpp | 4 +- linden/indra/test/v3dmath_tut.cpp | 4 +- linden/indra/test/v3math_tut.cpp | 4 +- linden/indra/test/v4color_tut.cpp | 4 +- linden/indra/test/v4coloru_tut.cpp | 4 +- linden/indra/test/v4math_tut.cpp | 4 +- linden/indra/test/xform_tut.cpp | 4 +- linden/indra/win_crash_logger/StdAfx.cpp | 4 +- linden/indra/win_crash_logger/StdAfx.h | 4 +- .../win_crash_logger/llcrashloggerwindows.cpp | 4 +- .../indra/win_crash_logger/llcrashloggerwindows.h | 4 +- linden/indra/win_crash_logger/resource.h | 4 +- linden/indra/win_crash_logger/win_crash_logger.cpp | 4 +- linden/indra/win_crash_logger/win_crash_logger.h | 4 +- .../indra/win_crash_logger/win_crash_logger.vcproj | 6 +- .../win_crash_logger/win_crash_logger_vc8.vcproj | 2 +- .../win_crash_logger/win_crash_logger_vc9.vcproj | 334 ++ linden/indra/win_updater/updater.cpp | 14 +- linden/indra/win_updater/win_updater_vc9.vcproj | 293 ++ 1751 files changed, 33858 insertions(+), 22227 deletions(-) create mode 100644 linden/indra/indra_complete/indra_complete_vc9.sln create mode 100644 linden/indra/lib/python/indra/base/metrics.py create mode 100644 linden/indra/llaudio/llaudio_vc9.vcproj create mode 100644 linden/indra/llcharacter/llcharacter_vc9.vcproj create mode 100644 linden/indra/llcommon/llcommon_vc9.vcproj create mode 100644 linden/indra/llcommon/lllog.cpp create mode 100644 linden/indra/llcommon/lllog.h create mode 100644 linden/indra/llimage/llimage_vc9.vcproj create mode 100644 linden/indra/llinventory/llinventory_vc9.vcproj create mode 100644 linden/indra/llmath/llmath_vc9.vcproj create mode 100644 linden/indra/llmedia/llmedia_vc9.vcproj delete mode 100644 linden/indra/llmessage/lllogtextmessage.cpp delete mode 100644 linden/indra/llmessage/lllogtextmessage.h create mode 100644 linden/indra/llmessage/llmessage_vc9.vcproj create mode 100644 linden/indra/llprimitive/llprimitive_vc9.vcproj create mode 100644 linden/indra/llrender/llrender_vc9.vcproj create mode 100644 linden/indra/llui/llui_vc9.vcproj create mode 100644 linden/indra/llvfs/llvfs_vc9.vcproj create mode 100644 linden/indra/llwindow/llpreeditor.h create mode 100644 linden/indra/llwindow/llwindow_vc9.vcproj create mode 100644 linden/indra/llxml/llxml_vc9.vcproj create mode 100644 linden/indra/lscript/lscript_compile/lscript_compile_fb_vc9.vcproj create mode 100644 linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj create mode 100644 linden/indra/lscript/lscript_execute/lscript_execute_vc9.vcproj create mode 100644 linden/indra/lscript/lscript_library/lscript_library_vc9.vcproj delete mode 100644 linden/indra/newview/app_settings/colors_base.ini delete mode 100644 linden/indra/newview/llfloaterhtmlhelp.cpp delete mode 100644 linden/indra/newview/llfloaterhtmlhelp.h create mode 100644 linden/indra/newview/newview_vc9.vcproj delete mode 100644 linden/indra/newview/skins/xui/de/floater_html_help.xml create mode 100644 linden/indra/newview/skins/xui/de/floater_mute_object.xml create mode 100644 linden/indra/newview/skins/xui/de/floater_region_info.xml create mode 100644 linden/indra/newview/skins/xui/de/panel_media_controls.xml create mode 100644 linden/indra/newview/skins/xui/de/panel_media_remote_expanded.xml create mode 100644 linden/indra/newview/skins/xui/de/panel_speaker_controls.xml create mode 100644 linden/indra/newview/skins/xui/de/panel_voice_controls.xml create mode 100644 linden/indra/newview/skins/xui/de/panel_voice_remote_expanded.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/floater_html_help.xml create mode 100644 linden/indra/newview/skins/xui/en-us/floater_mute_object.xml create mode 100644 linden/indra/newview/skins/xui/en-us/floater_region_info.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_bars.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_bg_tab.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_media_controls.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_media_remote_expanded.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_speaker_controls.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_voice_controls.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_voice_remote_expanded.xml delete mode 100644 linden/indra/newview/skins/xui/es/floater_html_help.xml delete mode 100644 linden/indra/newview/skins/xui/fr/floater_html_help.xml delete mode 100644 linden/indra/newview/skins/xui/ja/floater_html_help.xml create mode 100644 linden/indra/newview/skins/xui/ja/floater_mute_object.xml create mode 100644 linden/indra/newview/skins/xui/ja/floater_region_info.xml create mode 100644 linden/indra/newview/skins/xui/ja/panel_media_controls.xml create mode 100644 linden/indra/newview/skins/xui/ja/panel_media_remote_expanded.xml create mode 100644 linden/indra/newview/skins/xui/ja/panel_speaker_controls.xml create mode 100644 linden/indra/newview/skins/xui/ja/panel_voice_controls.xml create mode 100644 linden/indra/newview/skins/xui/ja/panel_voice_remote_expanded.xml delete mode 100644 linden/indra/newview/skins/xui/ko/floater_html_help.xml create mode 100644 linden/indra/newview/skins/xui/ko/floater_mute_object.xml create mode 100644 linden/indra/newview/skins/xui/ko/floater_region_info.xml create mode 100644 linden/indra/newview/skins/xui/ko/panel_media_controls.xml create mode 100644 linden/indra/newview/skins/xui/ko/panel_media_remote_expanded.xml create mode 100644 linden/indra/newview/skins/xui/ko/panel_speaker_controls.xml create mode 100644 linden/indra/newview/skins/xui/ko/panel_voice_controls.xml create mode 100644 linden/indra/newview/skins/xui/ko/panel_voice_remote_expanded.xml delete mode 100644 linden/indra/newview/skins/xui/pt/floater_html_help.xml delete mode 100644 linden/indra/newview/skins/xui/zh/floater_html_help.xml create mode 100644 linden/indra/test/test_vc9.vcproj create mode 100644 linden/indra/win_crash_logger/win_crash_logger_vc9.vcproj create mode 100644 linden/indra/win_updater/win_updater_vc9.vcproj (limited to 'linden/indra') diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index d07b17d..d06b5b6 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct @@ -91,11 +91,12 @@ opts.AddOptions( BoolOption('GSTREAMER', 'Enabled GStreamer support', True), BoolOption('COLORGCC', 'Enabled colorgcc', True), EnumOption('GRID', 'Client package\'s default grid', 'default', - allowed_values=('default', 'aditi', 'agni', 'dmz', 'durga', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak', 'yami')), + allowed_values=('default', 'aditi', 'agni', 'durga', 'ganga', 'shakti', 'siva', 'soma', 'uma', 'vaak', 'yami')), EnumOption('CHANNEL', 'Client package\'s default channel', 'Release', allowed_values=('Release', 'Release Candidate', 'WindLight')), BoolOption('ELFIO', 'Enabled enhanced backtraces with libELFIO symbol extraction support', True), BoolOption('STANDALONE', 'Build using system packages (implies OPENSOURCE)', False), + BoolOption('RUNTESTS', 'Run tests at end of compilation', True), BoolOption('OPENSOURCE', 'Build using only non-proprietary dependencies', True) # OPENSOURCE: do not edit this line ) optenv = Environment(options = opts) @@ -111,6 +112,7 @@ enable_colorgcc = optenv['COLORGCC'] grid = optenv['GRID'] channel = optenv['CHANNEL'] standalone = optenv['STANDALONE'] +runtests = optenv['RUNTESTS'] opensource = standalone or optenv['OPENSOURCE'] enable_fmod = not opensource and optenv['FMOD'] elfio = optenv['ELFIO'] @@ -811,21 +813,24 @@ for build_target in targets: internal_libs + external_libs) # Run tests - test_results_file = 'test/test_results' + file_suffix + '.txt' - env.Command(test_results_file, - test_executable, - "$SOURCE 2>&1") # tee masks segfaults - Depends(test_results_file, test_executable) - Default(test_results_file) - - test_script = 'test/test.py' - script_test_results = 'test/script_test_result' + file_suffix + '.txt' - env.Command(script_test_results, - test_script, - "$SOURCE 2>&1") # tee masks segfaults - - Depends(script_test_results, test_results_file) - Default(script_test_results) + if runtests: + test_results_file = 'test/test_results' + file_suffix + '.txt' + env.Command(test_results_file, + test_executable, + "$SOURCE 2>&1") # tee masks segfaults + Depends(test_results_file, test_executable) + Default(test_results_file) + + test_script = 'test/test.py' + script_test_results = 'test/script_test_result' + file_suffix + '.txt' + env.Command(script_test_results, + test_script, + "$SOURCE 2>&1") # tee masks segfaults + + Depends(script_test_results, test_results_file) + Default(script_test_results) + else: + print '============= SKIPPING TESTS =============' ######### # DONE # diff --git a/linden/indra/indra_complete/indra_complete_vc8.sln b/linden/indra/indra_complete/indra_complete_vc8.sln index f677d2c..372ea06 100644 --- a/linden/indra/indra_complete/indra_complete_vc8.sln +++ b/linden/indra/indra_complete/indra_complete_vc8.sln @@ -26,27 +26,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llinventory", "..\llinvento EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "newview", "..\newview\newview_vc8.vcproj", "{E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}" ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {648685F3-8760-4CC5-BB2B-CAF9DECC25A4} = {648685F3-8760-4CC5-BB2B-CAF9DECC25A4} - {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} - {4C8D64D5-649F-481E-96BE-EF1E82A77ACB} = {4C8D64D5-649F-481E-96BE-EF1E82A77ACB} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} - {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} - {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} - {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} - {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} - {076DD042-2E58-42EA-9401-53210B65C1FC} = {076DD042-2E58-42EA-9401-53210B65C1FC} - {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} - {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} - {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} - {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} - {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} - {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} {9D0C7E02-6506-4EE7-BC5C-75671D28D594} = {9D0C7E02-6506-4EE7-BC5C-75671D28D594} + {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} + {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B} = {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} + {076DD042-2E58-42EA-9401-53210B65C1FC} = {076DD042-2E58-42EA-9401-53210B65C1FC} + {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB} = {4C8D64D5-649F-481E-96BE-EF1E82A77ACB} + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4} = {648685F3-8760-4CC5-BB2B-CAF9DECC25A4} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject EndProject @@ -69,41 +69,41 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_compile", "..\lscri EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} = {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} - {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} - {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} - {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} - {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} - {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} - {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} - {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} = {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} - {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} - {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject @@ -116,11 +116,11 @@ EndProject EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_crash_logger", "..\win_crash_logger\win_crash_logger_vc8.vcproj", "{648685F3-8760-4CC5-BB2B-CAF9DECC25A4}" ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_updater", "..\win_updater\win_updater_vc8.vcproj", "{E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}" @@ -130,16 +130,16 @@ EndProject EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} - {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} - {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} - {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} - {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} - {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} + {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llmedia", "..\llmedia\llmedia_vc8.vcproj", "{9D0C7E02-6506-4EE7-BC5C-75671D28D594}" @@ -147,46 +147,46 @@ EndProject EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "..\test\test_vc8.vcproj", "{BBAA6588-CA96-4A87-A988-B02270B8D02B}" ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {777F38BE-2DFE-4051-9AAD-2832ABC474CC} = {777F38BE-2DFE-4051-9AAD-2832ABC474CC} - {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} - {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} - {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC} = {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} - {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} - {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} - {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} - {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC} = {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + {777F38BE-2DFE-4051-9AAD-2832ABC474CC} = {777F38BE-2DFE-4051-9AAD-2832ABC474CC} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} - {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} - {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} - {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} - {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} + {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject EndProject EndProject ProjectSection(ProjectDependencies) = postProject - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llimagej2coj", "..\llimagej2coj\llimagej2coj_vc8.vcproj", "{4C8D64D5-649F-481E-96BE-EF1E82A77ACB}" @@ -322,8 +322,8 @@ Global {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseForDownload|Win32.Build.0 = Release|Win32 {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 - {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug|Win32.ActiveCfg = ReleaseNoOpt|Win32 - {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug|Win32.Build.0 = ReleaseNoOpt|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug|Win32.ActiveCfg = Debug|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug|Win32.Build.0 = Debug|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/linden/indra/indra_complete/indra_complete_vc9.sln b/linden/indra/indra_complete/indra_complete_vc9.sln new file mode 100644 index 0000000..8424eb3 --- /dev/null +++ b/linden/indra/indra_complete/indra_complete_vc9.sln @@ -0,0 +1,570 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llcommon", "..\llcommon\llcommon_vc9.vcproj", "{7BCB4B2C-8378-4186-88EA-5742B5ABE17F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llmath", "..\llmath\llmath_vc9.vcproj", "{E87FD9BE-BE42-4EA3-BF4D-D992223046D9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llmessage", "..\llmessage\llmessage_vc9.vcproj", "{E5D94794-5671-4BD6-A16D-26EC18F3DB34}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvfs", "..\llvfs\llvfs_vc9.vcproj", "{D37774F4-253D-4760-BF64-372A943224A1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llxml", "..\llxml\llxml_vc9.vcproj", "{A5470DA6-0C3A-4602-B930-43DB25511A59}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llui", "..\llui\llui_vc9.vcproj", "{DE55D666-6A3D-476C-937F-109269B83681}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llimage", "..\llimage\llimage_vc9.vcproj", "{681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llprimitive", "..\llprimitive\llprimitive_vc9.vcproj", "{FCC4483C-5B84-4944-B91F-4589A219BC0B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llcharacter", "..\llcharacter\llcharacter_vc9.vcproj", "{5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llaudio", "..\llaudio\llaudio_vc9.vcproj", "{93B2BA29-FBE9-4376-92C1-6108DCFE09D3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llrender", "..\llrender\llrender_vc9.vcproj", "{2ADE3C14-94C4-40BF-B033-70F3C954EE90}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llinventory", "..\llinventory\llinventory_vc9.vcproj", "{328D1968-924F-4863-AAE8-5F9A95BA68E5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "newview", "..\newview\newview_vc9.vcproj", "{E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}" + ProjectSection(ProjectDependencies) = postProject + {9D0C7E02-6506-4EE7-BC5C-75671D28D594} = {9D0C7E02-6506-4EE7-BC5C-75671D28D594} + {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} + {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B} = {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} + {076DD042-2E58-42EA-9401-53210B65C1FC} = {076DD042-2E58-42EA-9401-53210B65C1FC} + {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB} = {4C8D64D5-649F-481E-96BE-EF1E82A77ACB} + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4} = {648685F3-8760-4CC5-BB2B-CAF9DECC25A4} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llwindow", "..\llwindow\llwindow_vc9.vcproj", "{B5B53617-416F-404A-BF10-22EBCCA0E4FB}" + ProjectSection(ProjectDependencies) = postProject + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_library", "..\lscript\lscript_library\lscript_library_vc9.vcproj", "{BFA102B0-C891-4E13-B1CF-C2F28073DA8E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_execute", "..\lscript\lscript_execute\lscript_execute_vc9.vcproj", "{F882263E-4F2A-43D9-A45A-FA4C8EC66552}" + ProjectSection(ProjectDependencies) = postProject + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_compile", "..\lscript\lscript_compile\lscript_compile_vc9.vcproj", "{44CE6D82-7320-4609-8FC3-5965C19F4808}" + ProjectSection(ProjectDependencies) = postProject + {B771CF1B-E253-47BD-8B0A-6B0440CC9228} = {B771CF1B-E253-47BD-8B0A-6B0440CC9228} + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} = {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_crash_logger", "..\win_crash_logger\win_crash_logger_vc9.vcproj", "{648685F3-8760-4CC5-BB2B-CAF9DECC25A4}" + ProjectSection(ProjectDependencies) = postProject + {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win_updater", "..\win_updater\win_updater_vc9.vcproj", "{E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}" +EndProject + ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} + {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llmedia", "..\llmedia\llmedia_vc9.vcproj", "{9D0C7E02-6506-4EE7-BC5C-75671D28D594}" +EndProject +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "..\test\test_vc9.vcproj", "{BBAA6588-CA96-4A87-A988-B02270B8D02B}" + ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {F882263E-4F2A-43D9-A45A-FA4C8EC66552} = {F882263E-4F2A-43D9-A45A-FA4C8EC66552} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {328D1968-924F-4863-AAE8-5F9A95BA68E5} = {328D1968-924F-4863-AAE8-5F9A95BA68E5} + {44CE6D82-7320-4609-8FC3-5965C19F4808} = {44CE6D82-7320-4609-8FC3-5965C19F4808} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC} = {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC} + {A5470DA6-0C3A-4602-B930-43DB25511A59} = {A5470DA6-0C3A-4602-B930-43DB25511A59} + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} = {BFA102B0-C891-4E13-B1CF-C2F28073DA8E} + {777F38BE-2DFE-4051-9AAD-2832ABC474CC} = {777F38BE-2DFE-4051-9AAD-2832ABC474CC} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} + {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {FCC4483C-5B84-4944-B91F-4589A219BC0B} = {FCC4483C-5B84-4944-B91F-4589A219BC0B} + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} = {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4} + {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject +EndProject +EndProject + ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + EndProjectSection +EndProject + ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llimagej2coj", "..\llimagej2coj\llimagej2coj_vc9.vcproj", "{4C8D64D5-649F-481E-96BE-EF1E82A77ACB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_compile_fb_vc9", "..\lscript\lscript_compile\lscript_compile_fb_vc9.vcproj", "{B771CF1B-E253-47BD-8B0A-6B0440CC9228}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + DebugMesaHeadless|Win32 = DebugMesaHeadless|Win32 + Release|Win32 = Release|Win32 + ReleaseForDownload|Win32 = ReleaseForDownload|Win32 + ReleaseNoOpt|Win32 = ReleaseNoOpt|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Debug|Win32.Build.0 = Debug|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Release|Win32.ActiveCfg = Release|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Release|Win32.Build.0 = Release|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Debug|Win32.Build.0 = Debug|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Release|Win32.ActiveCfg = Release|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Release|Win32.Build.0 = Release|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Debug|Win32.ActiveCfg = Debug|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Debug|Win32.Build.0 = Debug|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Release|Win32.ActiveCfg = Release|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Release|Win32.Build.0 = Release|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.Debug|Win32.Build.0 = Debug|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.Release|Win32.ActiveCfg = Release|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.Release|Win32.Build.0 = Release|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.Debug|Win32.ActiveCfg = Debug|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.Debug|Win32.Build.0 = Debug|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.Release|Win32.ActiveCfg = Release|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.Release|Win32.Build.0 = Release|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.Debug|Win32.ActiveCfg = Debug|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.Debug|Win32.Build.0 = Debug|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.Release|Win32.ActiveCfg = Release|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.Release|Win32.Build.0 = Release|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Debug|Win32.ActiveCfg = Debug|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Debug|Win32.Build.0 = Debug|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Release|Win32.ActiveCfg = Release|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Release|Win32.Build.0 = Release|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Debug|Win32.ActiveCfg = Debug|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Debug|Win32.Build.0 = Debug|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Release|Win32.ActiveCfg = Release|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Release|Win32.Build.0 = Release|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Debug|Win32.Build.0 = Debug|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Release|Win32.ActiveCfg = Release|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Release|Win32.Build.0 = Release|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Debug|Win32.Build.0 = Debug|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Release|Win32.ActiveCfg = Release|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Release|Win32.Build.0 = Release|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Debug|Win32.ActiveCfg = Debug|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Debug|Win32.Build.0 = Debug|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Release|Win32.ActiveCfg = Release|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Release|Win32.Build.0 = Release|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Debug|Win32.ActiveCfg = Debug|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Debug|Win32.Build.0 = Debug|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Release|Win32.ActiveCfg = Release|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Release|Win32.Build.0 = Release|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug|Win32.ActiveCfg = Debug|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug|Win32.Build.0 = Debug|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Release|Win32.ActiveCfg = Release|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Release|Win32.Build.0 = Release|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.ReleaseForDownload|Win32.ActiveCfg = ReleaseForDownload|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.ReleaseForDownload|Win32.Build.0 = ReleaseForDownload|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Debug|Win32.Build.0 = Debug|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Release|Win32.ActiveCfg = Release|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Release|Win32.Build.0 = Release|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Debug|Win32.Build.0 = Debug|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.DebugMesaHeadless|Win32.ActiveCfg = DebugMesaHeadless|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.DebugMesaHeadless|Win32.Build.0 = DebugMesaHeadless|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Release|Win32.ActiveCfg = Release|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Release|Win32.Build.0 = Release|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Debug|Win32.ActiveCfg = Debug|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Debug|Win32.Build.0 = Debug|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Release|Win32.ActiveCfg = Release|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Release|Win32.Build.0 = Release|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Debug|Win32.ActiveCfg = Debug|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Debug|Win32.Build.0 = Debug|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Release|Win32.ActiveCfg = Release|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Release|Win32.Build.0 = Release|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.Debug|Win32.ActiveCfg = Debug|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.Debug|Win32.Build.0 = Debug|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.Release|Win32.ActiveCfg = Release|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.Release|Win32.Build.0 = Release|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Debug|Win32.ActiveCfg = Debug|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Debug|Win32.Build.0 = Debug|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Release|Win32.ActiveCfg = Release|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Release|Win32.Build.0 = Release|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Debug|Win32.Build.0 = Debug|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Release|Win32.ActiveCfg = Release|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Release|Win32.Build.0 = Release|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Debug|Win32.ActiveCfg = Debug|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Debug|Win32.Build.0 = Debug|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Release|Win32.ActiveCfg = Release|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Release|Win32.Build.0 = Release|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Debug|Win32.Build.0 = Debug|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Release|Win32.ActiveCfg = Release|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Release|Win32.Build.0 = Release|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.ReleaseNoOpt|Win32.ActiveCfg = Release|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.ReleaseNoOpt|Win32.Build.0 = Release|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Debug|Win32.ActiveCfg = Debug|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Debug|Win32.Build.0 = Debug|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Release|Win32.ActiveCfg = Release|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Release|Win32.Build.0 = Release|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.ReleaseNoOpt|Win32.ActiveCfg = Release|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.ReleaseNoOpt|Win32.Build.0 = Release|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Debug|Win32.Build.0 = Debug|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Release|Win32.ActiveCfg = Release|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Release|Win32.Build.0 = Release|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Debug|Win32.ActiveCfg = Debug|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Debug|Win32.Build.0 = Debug|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Release|Win32.ActiveCfg = Release|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Release|Win32.Build.0 = Release|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {F56CA265-93E9-4068-8A67-8B104C876D70}.Debug|Win32.ActiveCfg = Debug|Win32 + {F56CA265-93E9-4068-8A67-8B104C876D70}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {F56CA265-93E9-4068-8A67-8B104C876D70}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {F56CA265-93E9-4068-8A67-8B104C876D70}.Release|Win32.ActiveCfg = Release|Win32 + {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Debug|Win32.Build.0 = Debug|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Release|Win32.ActiveCfg = Release|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Release|Win32.Build.0 = Release|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug|Win32.ActiveCfg = Debug|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug|Win32.Build.0 = Debug|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Release|Win32.ActiveCfg = Release|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Release|Win32.Build.0 = Release|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Debug|Win32.ActiveCfg = Debug|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Debug|Win32.Build.0 = Debug|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Release|Win32.ActiveCfg = Release|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Release|Win32.Build.0 = Release|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Debug|Win32.ActiveCfg = Debug|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Debug|Win32.Build.0 = Debug|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Release|Win32.ActiveCfg = Release|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Release|Win32.Build.0 = Release|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Debug|Win32.ActiveCfg = Debug|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Debug|Win32.Build.0 = Debug|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Release|Win32.ActiveCfg = Release|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Release|Win32.Build.0 = Release|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug|Win32.ActiveCfg = Debug|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug|Win32.Build.0 = Debug|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release|Win32.ActiveCfg = Release|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release|Win32.Build.0 = Release|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug|Win32.ActiveCfg = Debug|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug|Win32.Build.0 = Debug|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Release|Win32.ActiveCfg = Release|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Release|Win32.Build.0 = Release|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.Debug|Win32.Build.0 = Debug|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.Release|Win32.ActiveCfg = Release|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.Release|Win32.Build.0 = Release|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Debug|Win32.Build.0 = Debug|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Release|Win32.ActiveCfg = Release|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Release|Win32.Build.0 = Release|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Debug|Win32.ActiveCfg = Debug|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Debug|Win32.Build.0 = Debug|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Release|Win32.ActiveCfg = Release|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Release|Win32.Build.0 = Release|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Debug|Win32.ActiveCfg = Debug|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Debug|Win32.Build.0 = Debug|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Release|Win32.ActiveCfg = Release|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Release|Win32.Build.0 = Release|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseForDownload|Win32.Build.0 = Release|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseNoOpt|Win32.ActiveCfg = Release|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseNoOpt|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/linden/indra/lib/python/indra/base/lluuid.py b/linden/indra/lib/python/indra/base/lluuid.py index e9916a1..f173310 100644 --- a/linden/indra/lib/python/indra/base/lluuid.py +++ b/linden/indra/lib/python/indra/base/lluuid.py @@ -212,6 +212,10 @@ class UUID(object): _int2binstr(v3,4) + \ _int2binstr(v4,4) + +# module-level null constant +NULL = UUID() + def printTranslatedMemory(four_hex_uints): """ We expect to get the string as four hex units. eg: @@ -276,7 +280,8 @@ try: from mulib import stacked stacked.NoProducer() # just to exercise stacked except: - print "Couldn't import mulib.stacked, not registering UUID converter" + #print "Couldn't import mulib.stacked, not registering UUID converter" + pass else: def convertUUID(uuid, req): req.write(str(uuid)) diff --git a/linden/indra/lib/python/indra/base/metrics.py b/linden/indra/lib/python/indra/base/metrics.py new file mode 100644 index 0000000..e640c45 --- /dev/null +++ b/linden/indra/lib/python/indra/base/metrics.py @@ -0,0 +1,42 @@ +"""\ +@file metrics.py +@author Phoenix +@date 2007-11-27 +@brief simple interface for logging metrics + +$LicenseInfo:firstyear=2007&license=mit$ + +Copyright (c) 2007-2008, Linden Research, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +$/LicenseInfo$ +""" + +import sys +from indra.base import llsd + +def log(location, stats, file=None): + "Write a standard llmetrics log" + metrics = {'location':location, 'stats':stats} + if file is None: + # do this check here in case sys.stdout changes at some + # point. as a default parameter, it will never be + # re-evaluated. + file = sys.stdout + print >>file, "LLMETRICS:", llsd.format_notation(metrics) diff --git a/linden/indra/lib/python/indra/ipc/mysql_pool.py b/linden/indra/lib/python/indra/ipc/mysql_pool.py index bdc7eff..0a06cdd 100644 --- a/linden/indra/lib/python/indra/ipc/mysql_pool.py +++ b/linden/indra/lib/python/indra/ipc/mysql_pool.py @@ -97,7 +97,7 @@ class ConnectionPool(Pool): except (AttributeError, DeadProcess), e: conn = self.create() # TODO figure out if we're still connected to the database - if conn: + if conn is not None: Pool.put(self, conn) else: self.current_size -= 1 diff --git a/linden/indra/lib/python/indra/ipc/saranwrap.py b/linden/indra/lib/python/indra/ipc/saranwrap.py index 5a2cf72..e0205bf 100644 --- a/linden/indra/lib/python/indra/ipc/saranwrap.py +++ b/linden/indra/lib/python/indra/ipc/saranwrap.py @@ -110,6 +110,12 @@ _g_debug_mode = False if _g_debug_mode: import traceback +def pythonpath_sync(): + """ +@brief apply the current sys.path to the environment variable PYTHONPATH, so that child processes have the same paths as the caller does. +""" + pypath = os.pathsep.join(sys.path) + os.environ['PYTHONPATH'] = pypath def wrap(obj, dead_callback = None): """ @@ -119,6 +125,7 @@ def wrap(obj, dead_callback = None): if type(obj).__name__ == 'module': return wrap_module(obj.__name__, dead_callback) + pythonpath_sync() p = Process('python', [__file__, '--child'], dead_callback) prox = Proxy(p, p) prox.obj = obj @@ -129,6 +136,7 @@ def wrap_module(fqname, dead_callback = None): @brief wrap a module in another process through a saranwrap proxy @param fqname The fully qualified name of the module. @param dead_callback A callable to invoke if the process exits.""" + pythonpath_sync() global _g_debug_mode if _g_debug_mode: p = Process('python', [__file__, '--module', fqname, '--logfile', '/tmp/saranwrap.log'], dead_callback) @@ -277,12 +285,13 @@ not supported, so you have to know what has been exported. my_in = self.__local_dict['_in'] my_out = self.__local_dict['_out'] my_id = self.__local_dict['_id'] + _dead_list = self.__local_dict['_dead_list'] - for dead_object in _dead_list: - request = Request('del', {'id':dead_object}) - _write_request(request, my_out) - response = _read_response(my_id, attribute, my_in, my_out, _dead_list) - _dead_list.clear() + for dead_object in _dead_list.copy(): + request = Request('del', {'id':dead_object}) + _write_request(request, my_out) + response = _read_response(my_id, attribute, my_in, my_out, _dead_list) + _dead_list.remove(dead_object) # Pass all public attributes across to find out if it is # callable or a simple attribute. @@ -327,7 +336,7 @@ not need to deal with this class directly.""" def __del__(self): my_id = self.__local_dict['_id'] - #_prnt"ObjectProxy::__del__ %s" % my_id + _prnt("ObjectProxy::__del__ %s" % my_id) self.__local_dict['_dead_list'].add(my_id) def __getitem__(self, key): @@ -369,6 +378,11 @@ not need to deal with this class directly.""" # tack anything on to the return value here because str values are used as data. return self.__str__() + def __len__(self): + # see description for __repr__, len(obj) is the same. Unfortunately, __len__ is also + # used when determining whether an object is boolean or not, e.g. if proxied_object: + return self.__len__() + def proxied_type(self): if type(self) is not ObjectProxy: return type(self) @@ -554,7 +568,7 @@ when the id is None.""" @param value The value to test. @return Returns true if value is a simple serializeable set of data. """ - return type(value) in (str,int,float,long,bool,type(None)) + return type(value) in (str,unicode,int,float,long,bool,type(None)) def respond(self, body): _log("responding with: %s" % body) diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py index 2e6f410..e5a732d 100644 --- a/linden/indra/lib/python/indra/util/llmanifest.py +++ b/linden/indra/lib/python/indra/util/llmanifest.py @@ -28,6 +28,7 @@ $/LicenseInfo$ """ import commands +import errno import filecmp import fnmatch import getopt diff --git a/linden/indra/lib/python/indra/util/named_query.py b/linden/indra/lib/python/indra/util/named_query.py index 1e1701c..c462d9f 100644 --- a/linden/indra/lib/python/indra/util/named_query.py +++ b/linden/indra/lib/python/indra/util/named_query.py @@ -28,20 +28,33 @@ THE SOFTWARE. $/LicenseInfo$ """ +import errno import MySQLdb +import MySQLdb.cursors import os import os.path +import re import time +#import sys # *TODO: remove. only used in testing. +#import pprint # *TODO: remove. only used in testing. + +try: + set = set +except NameError: + from sets import Set as set + from indra.base import llsd from indra.base import config -from indra.ipc import russ _g_named_manager = None -# this function is entirely intended for testing purposes, -# because it's tricky to control the config from inside a test def _init_g_named_manager(sql_dir = None): + """Initializes a global NamedManager object to point at a + specified named queries hierarchy. + + This function is intended entirely for testing purposes, + because it's tricky to control the config from inside a test.""" if sql_dir is None: sql_dir = config.get('named-query-base-dir') global _g_named_manager @@ -49,14 +62,14 @@ def _init_g_named_manager(sql_dir = None): os.path.abspath(os.path.realpath(sql_dir))) def get(name): - "@brief get the named query object to be used to perform queries" + "Get the named query object to be used to perform queries" if _g_named_manager is None: _init_g_named_manager() return _g_named_manager.get(name) -def sql(name, params): +def sql(connection, name, params): # use module-global NamedQuery object to perform default substitution - return get(name).sql(params) + return get(name).sql(connection, params) def run(connection, name, params, expect_rows = None): """\ @@ -72,66 +85,243 @@ Note that this function will fetch ALL rows. return get(name).run(connection, params, expect_rows) class ExpectationFailed(Exception): + """ Exception that is raised when an expectation for an sql query + is not met.""" def __init__(self, message): + Exception.__init__(self, message) self.message = message class NamedQuery(object): def __init__(self, name, filename): - self._stat_interval = 5000 # 5 seconds + """ Construct a NamedQuery object. The name argument is an + arbitrary name as a handle for the query, and the filename is + a path to a file containing an llsd named query document.""" + self._stat_interval_seconds = 5 # 5 seconds self._name = name self._location = filename + self._alternative = dict() + self._last_mod_time = 0 + self._last_check_time = 0 + self.deleted = False self.load_contents() def name(self): + """ The name of the query. """ return self._name def get_modtime(self): - return os.path.getmtime(self._location) + """ Returns the mtime (last modified time) of the named query + file, if such exists.""" + if self._location: + return os.path.getmtime(self._location) + return 0 def load_contents(self): - self._contents = llsd.parse(open(self._location).read()) + """ Loads and parses the named query file into self. Does + nothing if self.location is nonexistant.""" + if self._location: + self._reference_contents(llsd.parse(open(self._location).read())) + # Check for alternative implementations + try: + for name, alt in self._contents['alternative'].items(): + nq = NamedQuery(name, None) + nq._reference_contents(alt) + self._alternative[name] = nq + except KeyError, e: + pass + self._last_mod_time = self.get_modtime() + self._last_check_time = time.time() + + def _reference_contents(self, contents): + "Helper method which builds internal structure from parsed contents" + self._contents = contents self._ttl = int(self._contents.get('ttl', 0)) self._return_as_map = bool(self._contents.get('return_as_map', False)) self._legacy_dbname = self._contents.get('legacy_dbname', None) - self._legacy_query = self._contents.get('legacy_query', None) - self._options = self._contents.get('options', {}) - self._base_query = self._contents['base_query'] - self._last_mod_time = self.get_modtime() - self._last_check_time = time.time() + # reset these before doing the sql conversion because we will + # read them there. reset these while loading so we pick up + # changes. + self._around = set() + self._append = set() + self._integer = set() + self._options = self._contents.get('dynamic_where', {}) + for key in self._options: + if isinstance(self._options[key], basestring): + self._options[key] = self._convert_sql(self._options[key]) + elif isinstance(self._options[key], list): + lines = [] + for line in self._options[key]: + lines.append(self._convert_sql(line)) + self._options[key] = lines + else: + moreopt = {} + for kk in self._options[key]: + moreopt[kk] = self._convert_sql(self._options[key][kk]) + self._options[key] = moreopt + self._base_query = self._convert_sql(self._contents['base_query']) + self._query_suffix = self._convert_sql( + self._contents.get('query_suffix', '')) + + def _convert_sql(self, sql): + """convert the parsed sql into a useful internal structure. + + This function has to turn the named query format into a pyformat + style. It also has to look for %:name% and :name% and + ready them for use in LIKE statements""" + if sql: + #print >>sys.stderr, "sql:",sql + expr = re.compile("(%?):([a-zA-Z][a-zA-Z0-9_-]*)%") + sql = expr.sub(self._prepare_like, sql) + expr = re.compile("#:([a-zA-Z][a-zA-Z0-9_-]*)") + sql = expr.sub(self._prepare_integer, sql) + expr = re.compile(":([a-zA-Z][a-zA-Z0-9_-]*)") + sql = expr.sub("%(\\1)s", sql) + return sql + + def _prepare_like(self, match): + """This function changes LIKE statement replace behavior + + It works by turning %:name% to %(_name_around)s and :name% to + %(_name_append)s. Since a leading '_' is not a valid keyname + input (enforced via unit tests), it will never clash with + existing keys. Then, when building the statement, the query + runner will generate corrected strings.""" + if match.group(1) == '%': + # there is a leading % so this is treated as prefix/suffix + self._around.add(match.group(2)) + return "%(" + self._build_around_key(match.group(2)) + ")s" + else: + # there is no leading %, so this is suffix only + self._append.add(match.group(2)) + return "%(" + self._build_append_key(match.group(2)) + ")s" + + def _build_around_key(self, key): + return "_" + key + "_around" + + def _build_append_key(self, key): + return "_" + key + "_append" + + def _prepare_integer(self, match): + """This function adjusts the sql for #:name replacements + + It works by turning #:name to %(_name_as_integer)s. Since a + leading '_' is not a valid keyname input (enforced via unit + tests), it will never clash with existing keys. Then, when + building the statement, the query runner will generate + corrected strings.""" + self._integer.add(match.group(1)) + return "%(" + self._build_integer_key(match.group(1)) + ")s" + + def _build_integer_key(self, key): + return "_" + key + "_as_integer" + + def _strip_wildcards_to_list(self, value): + """Take string, and strip out the LIKE special characters. + + Technically, this is database dependant, but postgresql and + mysql use the same wildcards, and I am not aware of a general + way to handle this. I think you need a sql statement of the + form: + + LIKE_STRING( [ANY,ONE,str]... ) + + which would treat ANY as their any string, and ONE as their + single glyph, and str as something that needs database + specific encoding to not allow any % or _ to affect the query. + + As it stands, I believe it's impossible to write a named query + style interface which uses like to search the entire space of + text available. Imagine the query: + + % of brain used by average linden + + In order to search for %, it must be escaped, so once you have + escaped the string to not do wildcard searches, and be escaped + for the database, and then prepended the wildcard you come + back with one of: + + 1) %\% of brain used by average linden + 2) %%% of brain used by average linden + + Then, when passed to the database to be escaped to be database + safe, you get back: + + 1) %\\% of brain used by average linden + : which means search for any character sequence, followed by a + backslash, followed by any sequence, followed by ' of + brain...' + 2) %%% of brain used by average linden + : which (I believe) means search for a % followed by any + character sequence followed by 'of brain...' + + Neither of which is what we want! + + So, we need a vendor (or extention) for LIKE_STRING. Anyone + want to write it?""" + utf8_value = unicode(value, "utf-8") + esc_list = [] + remove_chars = set(u"%_") + for glyph in utf8_value: + if glyph in remove_chars: + continue + esc_list.append(glyph.encode("utf-8")) + return esc_list + + def delete(self): + """ Makes this query unusable by deleting all the members and + setting the deleted member. This is desired when the on-disk + query has been deleted but the in-memory copy remains.""" + # blow away all members except _name, _location, and deleted + name, location = self._name, self._location + for key in self.__dict__.keys(): + del self.__dict__[key] + self.deleted = True + self._name, self._location = name, location def ttl(self): + """ Estimated time to live of this query. Used for web + services to set the Expires header.""" return self._ttl def legacy_dbname(self): return self._legacy_dbname - def legacy_query(self): - return self._legacy_query - def return_as_map(self): + """ Returns true if this query is configured to return its + results as a single map (as opposed to a list of maps, the + normal behavior).""" + return self._return_as_map - def run(self, connection, params, expect_rows = None, use_dictcursor = True): - """\ -@brief given a connection, run a named query with the params + def for_schema(self, db_name): + "Look trough the alternates and return the correct query" + try: + return self._alternative[db_name] + except KeyError, e: + pass + return self -Note that this function will fetch ALL rows. We do this because it -opens and closes the cursor to generate the values, and this isn't a generator so the -cursor has no life beyond the method call. -@param cursor The connection to use (this generates its own cursor for the query) -@param name The name of the query to run -@param params The parameters passed into the query -@param expect_rows The number of rows expected. Set to 1 if return_as_map is true. Raises ExpectationFailed if the number of returned rows doesn't exactly match. Kind of a hack. -@param use_dictcursor Set to false to use a normal cursor and manually convert the rows to dicts. -@return Returns the result set as a list of dicts, or, if the named query has return_as_map set to true, returns a single dict. + def run(self, connection, params, expect_rows = None, use_dictcursor = True): + """given a connection, run a named query with the params + + Note that this function will fetch ALL rows. We do this because it + opens and closes the cursor to generate the values, and this + isn't a generator so the cursor has no life beyond the method call. + + @param cursor The connection to use (this generates its own cursor for the query) + @param name The name of the query to run + @param params The parameters passed into the query + @param expect_rows The number of rows expected. Set to 1 if return_as_map is true. Raises ExpectationFailed if the number of returned rows doesn't exactly match. Kind of a hack. + @param use_dictcursor Set to false to use a normal cursor and manually convert the rows to dicts. + @return Returns the result set as a list of dicts, or, if the named query has return_as_map set to true, returns a single dict. """ if use_dictcursor: cursor = connection.cursor(MySQLdb.cursors.DictCursor) else: cursor = connection.cursor() - statement = self.sql(params) + statement = self.sql(connection, params) #print "SQL:", statement rows = cursor.execute(statement) @@ -169,47 +359,152 @@ cursor has no life beyond the method call. return result_set[0] return result_set - def sql(self, params): + def sql(self, connection, params): + """ Generates an SQL statement from the named query document + and a dictionary of parameters. + + """ self.refresh() # build the query from the options available and the params base_query = [] base_query.append(self._base_query) + #print >>sys.stderr, "base_query:",base_query for opt, extra_where in self._options.items(): - if opt in params and (params[opt] == 0 or params[opt]): - if type(extra_where) in (dict, list, tuple): + if type(extra_where) in (dict, list, tuple): + if opt in params: base_query.append(extra_where[params[opt]]) - else: + else: + if opt in params and params[opt]: base_query.append(extra_where) - + if self._query_suffix: + base_query.append(self._query_suffix) + #print >>sys.stderr, "base_query:",base_query full_query = '\n'.join(base_query) - - # do substitution - sql = russ.format(full_query, params) + + # Go through the query and rewrite all of the ones with the + # @:name syntax. + rewrite = _RewriteQueryForArray(params) + expr = re.compile("@%\(([a-zA-Z][a-zA-Z0-9_-]*)\)s") + full_query = expr.sub(rewrite.operate, full_query) + params.update(rewrite.new_params) + + # build out the params for like. We only have to do this + # parameters which were detected to have ued the where syntax + # during load. + # + # * treat the incoming string as utf-8 + # * strip wildcards + # * append or prepend % as appropriate + new_params = {} + for key in params: + if key in self._around: + new_value = ['%'] + new_value.extend(self._strip_wildcards_to_list(params[key])) + new_value.append('%') + new_params[self._build_around_key(key)] = ''.join(new_value) + if key in self._append: + new_value = self._strip_wildcards_to_list(params[key]) + new_value.append('%') + new_params[self._build_append_key(key)] = ''.join(new_value) + if key in self._integer: + new_params[self._build_integer_key(key)] = int(params[key]) + params.update(new_params) + + # do substitution using the mysql (non-standard) 'literal' + # function to do the escaping. + sql = full_query % connection.literal(params) return sql def refresh(self): - # only stat the file every so often + """ Refresh self from the file on the filesystem. + + This is optimized to be callable as frequently as you wish, + without adding too much load. It does so by only stat-ing the + file every N seconds, where N defaults to 5 and is + configurable through the member _stat_interval_seconds. If the stat + reveals that the file has changed, refresh will re-parse the + contents of the file and use them to update the named query + instance. If the stat reveals that the file has been deleted, + refresh will call self.delete to make the in-memory + representation unusable.""" now = time.time() - if(now - self._last_check_time > self._stat_interval): + if(now - self._last_check_time > self._stat_interval_seconds): self._last_check_time = now - modtime = self.get_modtime() - if(modtime > self._last_mod_time): - self.load_contents() + try: + modtime = self.get_modtime() + if(modtime > self._last_mod_time): + self.load_contents() + except OSError, e: + if e.errno == errno.ENOENT: # file not found + self.delete() # clean up self + raise # pass the exception along to the caller so they know that this query disappeared class NamedQueryManager(object): + """ Manages the lifespan of NamedQuery objects, drawing from a + directory hierarchy of named query documents. + + In practice this amounts to a memory cache of NamedQuery objects.""" + def __init__(self, named_queries_dir): + """ Initializes a manager to look for named queries in a + directory.""" self._dir = os.path.abspath(os.path.realpath(named_queries_dir)) self._cached_queries = {} - def sql(self, name, params): + def sql(self, connection, name, params): nq = self.get(name) - return nq.sql(params) + return nq.sql(connection, params) def get(self, name): - # new up/refresh a NamedQuery based on the name + """ Returns a NamedQuery instance based on the name, either + from memory cache, or by parsing from disk. + + The name is simply a relative path to the directory associated + with the manager object. Before returning the instance, the + NamedQuery object is cached in memory, so that subsequent + accesses don't have to read from disk or do any parsing. This + means that NamedQuery objects returned by this method are + shared across all users of the manager object. + NamedQuery.refresh is used to bring the NamedQuery objects in + sync with the actual files on disk.""" nq = self._cached_queries.get(name) if nq is None: nq = NamedQuery(name, os.path.join(self._dir, name)) self._cached_queries[name] = nq + else: + try: + nq.refresh() + except OSError, e: + if e.errno == errno.ENOENT: # file not found + del self._cached_queries[name] + raise # pass exception along to caller so they know that the query disappeared + return nq + +class _RewriteQueryForArray(object): + "Helper class for rewriting queries with the @:name syntax" + def __init__(self, params): + self.params = params + self.new_params = dict() + + def operate(self, match): + "Given a match, return the string that should be in use" + key = match.group(1) + value = self.params[key] + if type(value) in (list,tuple): + rv = [] + for idx in range(len(value)): + new_key = "_" + key + "_" + str(idx) + self.new_params[new_key] = value[idx] + rv.append("%(" + new_key + ")s") + return ','.join(rv) + else: + # not something that can be expanded, so just drop the + # leading @ in the front of the match. This will mean that + # the single value we have, be it a string, int, whatever + # (other than dict) will correctly show up, eg: + # + # where foo in (@:foobar) -- foobar is a string, so we get + # where foo in (:foobar) + return match.group(0)[1:] diff --git a/linden/indra/linux_crash_logger/linux_crash_logger.cpp b/linden/indra/linux_crash_logger/linux_crash_logger.cpp index eaa818e..22c38c6 100644 --- a/linden/indra/linux_crash_logger/linux_crash_logger.cpp +++ b/linden/indra/linux_crash_logger/linux_crash_logger.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp b/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp index 735105f..e96264e 100644 --- a/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp +++ b/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/linux_crash_logger/llcrashloggerlinux.h b/linden/indra/linux_crash_logger/llcrashloggerlinux.h index da6f302..f34c934 100644 --- a/linden/indra/linux_crash_logger/llcrashloggerlinux.h +++ b/linden/indra/linux_crash_logger/llcrashloggerlinux.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp index 91dde29..3e1fdf8 100644 --- a/linden/indra/llaudio/audioengine.cpp +++ b/linden/indra/llaudio/audioengine.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/audioengine.h b/linden/indra/llaudio/audioengine.h index 2fc1158..ac84b77 100644 --- a/linden/indra/llaudio/audioengine.h +++ b/linden/indra/llaudio/audioengine.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/audioengine_fmod.cpp b/linden/indra/llaudio/audioengine_fmod.cpp index af7e7b1..0fb5146 100644 --- a/linden/indra/llaudio/audioengine_fmod.cpp +++ b/linden/indra/llaudio/audioengine_fmod.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/audioengine_fmod.h b/linden/indra/llaudio/audioengine_fmod.h index 6e86421..3ee4334 100644 --- a/linden/indra/llaudio/audioengine_fmod.h +++ b/linden/indra/llaudio/audioengine_fmod.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/listener.cpp b/linden/indra/llaudio/listener.cpp index 2f01569..849b143 100644 --- a/linden/indra/llaudio/listener.cpp +++ b/linden/indra/llaudio/listener.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/listener.h b/linden/indra/llaudio/listener.h index e5fc07e..07664f7 100644 --- a/linden/indra/llaudio/listener.h +++ b/linden/indra/llaudio/listener.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/listener_ds3d.h b/linden/indra/llaudio/listener_ds3d.h index 2bcacf3..33367a5 100644 --- a/linden/indra/llaudio/listener_ds3d.h +++ b/linden/indra/llaudio/listener_ds3d.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/listener_fmod.cpp b/linden/indra/llaudio/listener_fmod.cpp index f9bfb1f..e80a775 100644 --- a/linden/indra/llaudio/listener_fmod.cpp +++ b/linden/indra/llaudio/listener_fmod.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/listener_fmod.h b/linden/indra/llaudio/listener_fmod.h index 98e7f9b..71604bd 100644 --- a/linden/indra/llaudio/listener_fmod.h +++ b/linden/indra/llaudio/listener_fmod.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/listener_openal.h b/linden/indra/llaudio/listener_openal.h index 93ed2d7..cc4bb9e 100644 --- a/linden/indra/llaudio/listener_openal.h +++ b/linden/indra/llaudio/listener_openal.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/llaudio_vc9.vcproj b/linden/indra/llaudio/llaudio_vc9.vcproj new file mode 100644 index 0000000..a1a8d91 --- /dev/null +++ b/linden/indra/llaudio/llaudio_vc9.vcproj @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llaudio/llaudiodecodemgr.cpp b/linden/indra/llaudio/llaudiodecodemgr.cpp index 8a67d46..af7ab92 100644 --- a/linden/indra/llaudio/llaudiodecodemgr.cpp +++ b/linden/indra/llaudio/llaudiodecodemgr.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/llaudiodecodemgr.h b/linden/indra/llaudio/llaudiodecodemgr.h index 1fc42d8..ccd5ded 100644 --- a/linden/indra/llaudio/llaudiodecodemgr.h +++ b/linden/indra/llaudio/llaudiodecodemgr.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/vorbisdecode.cpp b/linden/indra/llaudio/vorbisdecode.cpp index 6f243a4..23e02aa 100644 --- a/linden/indra/llaudio/vorbisdecode.cpp +++ b/linden/indra/llaudio/vorbisdecode.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/vorbisdecode.h b/linden/indra/llaudio/vorbisdecode.h index e3e498f..a9e1cfb 100644 --- a/linden/indra/llaudio/vorbisdecode.h +++ b/linden/indra/llaudio/vorbisdecode.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llaudio/vorbisencode.cpp b/linden/indra/llaudio/vorbisencode.cpp index 4e85685..805e666 100644 --- a/linden/indra/llaudio/vorbisencode.cpp +++ b/linden/indra/llaudio/vorbisencode.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -195,11 +195,6 @@ S32 check_for_invalid_wav_formats(const char *in_fname, char *error_msg) S32 encode_vorbis_file(const char *in_fname, const char *out_fname) { - return(encode_vorbis_file_at(in_fname,out_fname, 128000)); -} - -S32 encode_vorbis_file_at(const char *in_fname, const char *out_fname, S32 bitrate) -{ #define READ_BUFFER 1024 unsigned char readbuffer[READ_BUFFER*4+44]; /* out of the data segment, not the stack */ /*Flawfinder: ignore*/ @@ -294,20 +289,21 @@ S32 encode_vorbis_file_at(const char *in_fname, const char *out_fname, S32 bitra vorbis_info_init(&vi); // always encode to mono -// vorbis_encode_init(&vi, /* num_channels */ 1 ,sample_rate, -1, bitrate, -1); -// if (vorbis_encode_init(&vi, /* num_channels */ 1 ,sample_rate, -1, bitrate, -1)) -// F32 quality = 0; + // SL-52913 & SL-53779 determined this quality level to be our 'good + // enough' general-purpose quality level with a nice low bitrate. + // Equivalent to oggenc -q0.5 + F32 quality = 0.05f; // quality = (bitrate==128000 ? 0.4f : 0.1); - if (vorbis_encode_init(&vi, /* num_channels */ 1 ,sample_rate, -1, bitrate, -1)) -// if (vorbis_encode_init_vbr(&vi, /* num_channels */ 1 ,sample_rate, quality)) +// if (vorbis_encode_init(&vi, /* num_channels */ 1 ,sample_rate, -1, bitrate, -1)) + if (vorbis_encode_init_vbr(&vi, /* num_channels */ 1 ,sample_rate, quality)) // if (vorbis_encode_setup_managed(&vi,1,sample_rate,-1,bitrate,-1) || // vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE_AVG,NULL) || // vorbis_encode_setup_init(&vi)) { -// llwarns << "unable to initialize vorbis codec at quality " << quality << llendl; - llwarns << "unable to initialize vorbis codec at bitrate " << bitrate << llendl; + llwarns << "unable to initialize vorbis codec at quality " << quality << llendl; + // llwarns << "unable to initialize vorbis codec at bitrate " << bitrate << llendl; return(LLVORBISENC_DEST_OPEN_ERR); } diff --git a/linden/indra/llaudio/vorbisencode.h b/linden/indra/llaudio/vorbisencode.h index 489879e..2dae529 100644 --- a/linden/indra/llaudio/vorbisencode.h +++ b/linden/indra/llaudio/vorbisencode.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -47,7 +47,6 @@ const S32 LLVORBISENC_CLIP_TOO_LONG = 10; // source file is too l S32 check_for_invalid_wav_formats(const char *in_fname, char *error_msg); S32 encode_vorbis_file(const char *in_fname, const char *out_fname); -S32 encode_vorbis_file_at(const char *in_fname, const char *out_fname, S32 bitrate); #endif diff --git a/linden/indra/llcharacter/llanimationstates.cpp b/linden/indra/llcharacter/llanimationstates.cpp index 05c0ca3..81e15c7 100644 --- a/linden/indra/llcharacter/llanimationstates.cpp +++ b/linden/indra/llcharacter/llanimationstates.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llanimationstates.h b/linden/indra/llcharacter/llanimationstates.h index e23f3b5..b2ed27a 100644 --- a/linden/indra/llcharacter/llanimationstates.h +++ b/linden/indra/llcharacter/llanimationstates.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llbvhloader.cpp b/linden/indra/llcharacter/llbvhloader.cpp index 26dc4e1..e6e49f8 100644 --- a/linden/indra/llcharacter/llbvhloader.cpp +++ b/linden/indra/llcharacter/llbvhloader.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llbvhloader.h b/linden/indra/llcharacter/llbvhloader.h index c9a49f7..3935ebe 100644 --- a/linden/indra/llcharacter/llbvhloader.h +++ b/linden/indra/llcharacter/llbvhloader.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp index 5718a20..af4c5aa 100644 --- a/linden/indra/llcharacter/llcharacter.cpp +++ b/linden/indra/llcharacter/llcharacter.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llcharacter.h b/linden/indra/llcharacter/llcharacter.h index a0de93d..6699796 100644 --- a/linden/indra/llcharacter/llcharacter.h +++ b/linden/indra/llcharacter/llcharacter.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llcharacter_vc9.vcproj b/linden/indra/llcharacter/llcharacter_vc9.vcproj new file mode 100644 index 0000000..13e3b14 --- /dev/null +++ b/linden/indra/llcharacter/llcharacter_vc9.vcproj @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llcharacter/lleditingmotion.cpp b/linden/indra/llcharacter/lleditingmotion.cpp index c2519c2..c693e6d 100644 --- a/linden/indra/llcharacter/lleditingmotion.cpp +++ b/linden/indra/llcharacter/lleditingmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -64,6 +64,12 @@ LLEditingMotion::LLEditingMotion( const LLUUID &id) : LLMotion(id) mElbowJoint.addChild( &mWristJoint ); mName = "editing"; + + mParentState = new LLJointState; + mShoulderState = new LLJointState; + mElbowState = new LLJointState; + mWristState = new LLJointState; + mTorsoState = new LLJointState; } @@ -93,13 +99,13 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte } // get the shoulder, elbow, wrist joints from the character - mParentState.setJoint( mCharacter->getJoint("mShoulderLeft")->getParent() ); - mShoulderState.setJoint( mCharacter->getJoint("mShoulderLeft") ); - mElbowState.setJoint( mCharacter->getJoint("mElbowLeft") ); - mWristState.setJoint( mCharacter->getJoint("mWristLeft") ); - mTorsoState.setJoint( mCharacter->getJoint("mTorso")); + mParentState->setJoint( mCharacter->getJoint("mShoulderLeft")->getParent() ); + mShoulderState->setJoint( mCharacter->getJoint("mShoulderLeft") ); + mElbowState->setJoint( mCharacter->getJoint("mElbowLeft") ); + mWristState->setJoint( mCharacter->getJoint("mWristLeft") ); + mTorsoState->setJoint( mCharacter->getJoint("mTorso")); - if ( ! mParentState.getJoint() ) + if ( ! mParentState->getJoint() ) { llinfos << getName() << ": Can't get parent joint." << llendl; return STATUS_FAILURE; @@ -108,25 +114,25 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte mWristOffset = LLVector3(0.0f, 0.2f, 0.0f); // add joint states to the pose - mShoulderState.setUsage(LLJointState::ROT); - mElbowState.setUsage(LLJointState::ROT); - mTorsoState.setUsage(LLJointState::ROT); - mWristState.setUsage(LLJointState::ROT); - addJointState( &mShoulderState ); - addJointState( &mElbowState ); - addJointState( &mTorsoState ); - addJointState( &mWristState ); + mShoulderState->setUsage(LLJointState::ROT); + mElbowState->setUsage(LLJointState::ROT); + mTorsoState->setUsage(LLJointState::ROT); + mWristState->setUsage(LLJointState::ROT); + addJointState( mShoulderState ); + addJointState( mElbowState ); + addJointState( mTorsoState ); + addJointState( mWristState ); // propagate joint positions to kinematic chain - mParentJoint.setPosition( mParentState.getJoint()->getWorldPosition() ); - mShoulderJoint.setPosition( mShoulderState.getJoint()->getPosition() ); - mElbowJoint.setPosition( mElbowState.getJoint()->getPosition() ); - mWristJoint.setPosition( mWristState.getJoint()->getPosition() + mWristOffset ); + mParentJoint.setPosition( mParentState->getJoint()->getWorldPosition() ); + mShoulderJoint.setPosition( mShoulderState->getJoint()->getPosition() ); + mElbowJoint.setPosition( mElbowState->getJoint()->getPosition() ); + mWristJoint.setPosition( mWristState->getJoint()->getPosition() + mWristOffset ); // propagate current joint rotations to kinematic chain - mParentJoint.setRotation( mParentState.getJoint()->getWorldRotation() ); - mShoulderJoint.setRotation( mShoulderState.getJoint()->getRotation() ); - mElbowJoint.setRotation( mElbowState.getJoint()->getRotation() ); + mParentJoint.setRotation( mParentState->getJoint()->getWorldRotation() ); + mShoulderJoint.setRotation( mShoulderState->getJoint()->getRotation() ); + mElbowJoint.setRotation( mElbowState->getJoint()->getRotation() ); // connect the ikSolver to the chain mIKSolver.setPoleVector( LLVector3( -1.0f, 1.0f, 0.0f ) ); @@ -144,15 +150,15 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte BOOL LLEditingMotion::onActivate() { // propagate joint positions to kinematic chain - mParentJoint.setPosition( mParentState.getJoint()->getWorldPosition() ); - mShoulderJoint.setPosition( mShoulderState.getJoint()->getPosition() ); - mElbowJoint.setPosition( mElbowState.getJoint()->getPosition() ); - mWristJoint.setPosition( mWristState.getJoint()->getPosition() + mWristOffset ); + mParentJoint.setPosition( mParentState->getJoint()->getWorldPosition() ); + mShoulderJoint.setPosition( mShoulderState->getJoint()->getPosition() ); + mElbowJoint.setPosition( mElbowState->getJoint()->getPosition() ); + mWristJoint.setPosition( mWristState->getJoint()->getPosition() + mWristOffset ); // propagate current joint rotations to kinematic chain - mParentJoint.setRotation( mParentState.getJoint()->getWorldRotation() ); - mShoulderJoint.setRotation( mShoulderState.getJoint()->getRotation() ); - mElbowJoint.setRotation( mElbowState.getJoint()->getRotation() ); + mParentJoint.setRotation( mParentState->getJoint()->getWorldRotation() ); + mShoulderJoint.setRotation( mShoulderState->getJoint()->getRotation() ); + mElbowJoint.setRotation( mElbowState->getJoint()->getRotation() ); return TRUE; } @@ -182,15 +188,15 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) focus_pt += mCharacter->getCharacterPosition(); // propagate joint positions to kinematic chain - mParentJoint.setPosition( mParentState.getJoint()->getWorldPosition() ); - mShoulderJoint.setPosition( mShoulderState.getJoint()->getPosition() ); - mElbowJoint.setPosition( mElbowState.getJoint()->getPosition() ); - mWristJoint.setPosition( mWristState.getJoint()->getPosition() + mWristOffset ); + mParentJoint.setPosition( mParentState->getJoint()->getWorldPosition() ); + mShoulderJoint.setPosition( mShoulderState->getJoint()->getPosition() ); + mElbowJoint.setPosition( mElbowState->getJoint()->getPosition() ); + mWristJoint.setPosition( mWristState->getJoint()->getPosition() + mWristOffset ); // propagate current joint rotations to kinematic chain - mParentJoint.setRotation( mParentState.getJoint()->getWorldRotation() ); - mShoulderJoint.setRotation( mShoulderState.getJoint()->getRotation() ); - mElbowJoint.setRotation( mElbowState.getJoint()->getRotation() ); + mParentJoint.setRotation( mParentState->getJoint()->getWorldRotation() ); + mShoulderJoint.setRotation( mShoulderState->getJoint()->getRotation() ); + mElbowJoint.setRotation( mElbowState->getJoint()->getRotation() ); // update target position from character LLVector3 target = focus_pt - mParentJoint.getPosition(); @@ -199,7 +205,7 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) LLVector3 edit_plane_normal(1.f / F_SQRT2, 1.f / F_SQRT2, 0.f); edit_plane_normal.normVec(); - edit_plane_normal.rotVec(mTorsoState.getJoint()->getWorldRotation()); + edit_plane_normal.rotVec(mTorsoState->getJoint()->getWorldRotation()); F32 dot = edit_plane_normal * target; @@ -236,9 +242,9 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) // now put blended values back into joints llassert(shoulderRot.isFinite()); llassert(elbowRot.isFinite()); - mShoulderState.setRotation(shoulderRot); - mElbowState.setRotation(elbowRot); - mWristState.setRotation(LLQuaternion::DEFAULT); + mShoulderState->setRotation(shoulderRot); + mElbowState->setRotation(elbowRot); + mWristState->setRotation(LLQuaternion::DEFAULT); } mCharacter->setAnimationData("Hand Pose", &sHandPose); diff --git a/linden/indra/llcharacter/lleditingmotion.h b/linden/indra/llcharacter/lleditingmotion.h index 06828fa..3d46343 100644 --- a/linden/indra/llcharacter/lleditingmotion.h +++ b/linden/indra/llcharacter/lleditingmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -116,11 +116,11 @@ public: LLCharacter *mCharacter; LLVector3 mWristOffset; - LLJointState mParentState; - LLJointState mShoulderState; - LLJointState mElbowState; - LLJointState mWristState; - LLJointState mTorsoState; + LLPointer mParentState; + LLPointer mShoulderState; + LLPointer mElbowState; + LLPointer mWristState; + LLPointer mTorsoState; LLJoint mParentJoint; LLJoint mShoulderJoint; diff --git a/linden/indra/llcharacter/llgesture.cpp b/linden/indra/llcharacter/llgesture.cpp index b3d3127..c124ad0 100644 --- a/linden/indra/llcharacter/llgesture.cpp +++ b/linden/indra/llcharacter/llgesture.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llgesture.h b/linden/indra/llcharacter/llgesture.h index f245a1c..0e4b781 100644 --- a/linden/indra/llcharacter/llgesture.h +++ b/linden/indra/llcharacter/llgesture.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llhandmotion.cpp b/linden/indra/llcharacter/llhandmotion.cpp index bdaf0f3..3902518 100644 --- a/linden/indra/llcharacter/llhandmotion.cpp +++ b/linden/indra/llcharacter/llhandmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llhandmotion.h b/linden/indra/llcharacter/llhandmotion.h index 3729659..548e4de 100644 --- a/linden/indra/llcharacter/llhandmotion.h +++ b/linden/indra/llcharacter/llhandmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -124,6 +124,8 @@ public: // called when a motion is deactivated virtual void onDeactivate(); + virtual BOOL canDeprecate() { return FALSE; } + static LLString getHandPoseName(eHandPose pose); static eHandPose getHandPose(LLString posename); diff --git a/linden/indra/llcharacter/llheadrotmotion.cpp b/linden/indra/llcharacter/llheadrotmotion.cpp index e8afb82..f01dfcc 100644 --- a/linden/indra/llcharacter/llheadrotmotion.cpp +++ b/linden/indra/llcharacter/llheadrotmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -82,6 +82,10 @@ LLHeadRotMotion::LLHeadRotMotion(const LLUUID &id) : mHeadJoint(NULL) { mName = "head_rot"; + + mTorsoState = new LLJointState; + mNeckState = new LLJointState; + mHeadState = new LLJointState; } @@ -130,34 +134,34 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte return STATUS_FAILURE; } - mTorsoState.setJoint( character->getJoint("mTorso") ); - if ( ! mTorsoState.getJoint() ) + mTorsoState->setJoint( character->getJoint("mTorso") ); + if ( ! mTorsoState->getJoint() ) { llinfos << getName() << ": Can't get torso joint." << llendl; return STATUS_FAILURE; } - mNeckState.setJoint( character->getJoint("mNeck") ); - if ( ! mNeckState.getJoint() ) + mNeckState->setJoint( character->getJoint("mNeck") ); + if ( ! mNeckState->getJoint() ) { llinfos << getName() << ": Can't get neck joint." << llendl; return STATUS_FAILURE; } - mHeadState.setJoint( character->getJoint("mHead") ); - if ( ! mHeadState.getJoint() ) + mHeadState->setJoint( character->getJoint("mHead") ); + if ( ! mHeadState->getJoint() ) { llinfos << getName() << ": Can't get head joint." << llendl; return STATUS_FAILURE; } - mTorsoState.setUsage(LLJointState::ROT); - mNeckState.setUsage(LLJointState::ROT); - mHeadState.setUsage(LLJointState::ROT); + mTorsoState->setUsage(LLJointState::ROT); + mNeckState->setUsage(LLJointState::ROT); + mHeadState->setUsage(LLJointState::ROT); - addJointState( &mTorsoState ); - addJointState( &mNeckState ); - addJointState( &mHeadState ); + addJointState( mTorsoState ); + addJointState( mNeckState ); + addJointState( mHeadState ); mLastHeadRot.loadIdentity(); @@ -240,16 +244,16 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask) // Set torso target rotation such that it lags behind the head rotation // by a fixed amount. LLQuaternion torso_rot_local = nlerp(TORSO_LAG, LLQuaternion::DEFAULT, head_rot_local ); - mTorsoState.setRotation( nlerp(torso_slerp_amt, mTorsoState.getRotation(), torso_rot_local) ); + mTorsoState->setRotation( nlerp(torso_slerp_amt, mTorsoState->getRotation(), torso_rot_local) ); head_rot_local = nlerp(head_slerp_amt, mLastHeadRot, head_rot_local); mLastHeadRot = head_rot_local; // Set the head rotation. - LLQuaternion torsoRotLocal = mNeckState.getJoint()->getParent()->getWorldRotation() * currentInvRootRotWorld; + LLQuaternion torsoRotLocal = mNeckState->getJoint()->getParent()->getWorldRotation() * currentInvRootRotWorld; head_rot_local = head_rot_local * ~torsoRotLocal; - mNeckState.setRotation( nlerp(NECK_LAG, LLQuaternion::DEFAULT, head_rot_local) ); - mHeadState.setRotation( nlerp(1.f - NECK_LAG, LLQuaternion::DEFAULT, head_rot_local)); + mNeckState->setRotation( nlerp(NECK_LAG, LLQuaternion::DEFAULT, head_rot_local) ); + mHeadState->setRotation( nlerp(1.f - NECK_LAG, LLQuaternion::DEFAULT, head_rot_local)); return TRUE; } @@ -284,6 +288,9 @@ LLEyeMotion::LLEyeMotion(const LLUUID &id) : LLMotion(id) mHeadJoint = NULL; mName = "eye_rot"; + + mLeftEyeState = new LLJointState; + mRightEyeState = new LLJointState; } @@ -309,25 +316,25 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character) return STATUS_FAILURE; } - mLeftEyeState.setJoint( character->getJoint("mEyeLeft") ); - if ( ! mLeftEyeState.getJoint() ) + mLeftEyeState->setJoint( character->getJoint("mEyeLeft") ); + if ( ! mLeftEyeState->getJoint() ) { llinfos << getName() << ": Can't get left eyeball joint." << llendl; return STATUS_FAILURE; } - mRightEyeState.setJoint( character->getJoint("mEyeRight") ); - if ( ! mRightEyeState.getJoint() ) + mRightEyeState->setJoint( character->getJoint("mEyeRight") ); + if ( ! mRightEyeState->getJoint() ) { llinfos << getName() << ": Can't get Right eyeball joint." << llendl; return STATUS_FAILURE; } - mLeftEyeState.setUsage(LLJointState::ROT); - mRightEyeState.setUsage(LLJointState::ROT); + mLeftEyeState->setUsage(LLJointState::ROT); + mRightEyeState->setUsage(LLJointState::ROT); - addJointState( &mLeftEyeState ); - addJointState( &mRightEyeState ); + addJointState( mLeftEyeState ); + addJointState( mRightEyeState ); return STATUS_SUCCESS; } @@ -443,11 +450,15 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask) target_eye_rot = LLQuaternion(eye_look_at, left, up); // convert target rotation to head-local coordinates target_eye_rot *= ~mHeadJoint->getWorldRotation(); + // eliminate any Euler roll - we're lucky that roll is applied last. + F32 roll, pitch, yaw; + target_eye_rot.getEulerAngles(&roll, &pitch, &yaw); + target_eye_rot.setQuat(0.0f, pitch, yaw); // constrain target orientation to be in front of avatar's face target_eye_rot.constrain(EYE_ROT_LIMIT_ANGLE); // calculate vergence - F32 interocular_dist = (mLeftEyeState.getJoint()->getWorldPosition() - mRightEyeState.getJoint()->getWorldPosition()).magVec(); + F32 interocular_dist = (mLeftEyeState->getJoint()->getWorldPosition() - mRightEyeState->getJoint()->getWorldPosition()).magVec(); vergence = -atan2((interocular_dist / 2.f), lookAtDistance); llclamp(vergence, -F_PI_BY_TWO, 0.f); } @@ -495,8 +506,8 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask) vergence_quat.transQuat(); right_eye_rot = vergence_quat * eye_jitter_rot * right_eye_rot; - mLeftEyeState.setRotation( left_eye_rot ); - mRightEyeState.setRotation( right_eye_rot ); + mLeftEyeState->setRotation( left_eye_rot ); + mRightEyeState->setRotation( right_eye_rot ); return TRUE; } @@ -507,13 +518,13 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask) //----------------------------------------------------------------------------- void LLEyeMotion::onDeactivate() { - LLJoint* joint = mLeftEyeState.getJoint(); + LLJoint* joint = mLeftEyeState->getJoint(); if (joint) { joint->setRotation(LLQuaternion::DEFAULT); } - joint = mRightEyeState.getJoint(); + joint = mRightEyeState->getJoint(); if (joint) { joint->setRotation(LLQuaternion::DEFAULT); diff --git a/linden/indra/llcharacter/llheadrotmotion.h b/linden/indra/llcharacter/llheadrotmotion.h index bc9c8ea..d13cdb4 100644 --- a/linden/indra/llcharacter/llheadrotmotion.h +++ b/linden/indra/llcharacter/llheadrotmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -117,9 +117,9 @@ public: LLJoint *mRootJoint; LLJoint *mPelvisJoint; - LLJointState mTorsoState; - LLJointState mNeckState; - LLJointState mHeadState; + LLPointer mTorsoState; + LLPointer mNeckState; + LLPointer mHeadState; LLQuaternion mLastHeadRot; }; @@ -196,8 +196,8 @@ public: LLCharacter *mCharacter; LLJoint *mHeadJoint; - LLJointState mLeftEyeState; - LLJointState mRightEyeState; + LLPointer mLeftEyeState; + LLPointer mRightEyeState; LLFrameTimer mEyeJitterTimer; F32 mEyeJitterTime; diff --git a/linden/indra/llcharacter/lljoint.cpp b/linden/indra/llcharacter/lljoint.cpp index 052d5e2..b7a51f1 100644 --- a/linden/indra/llcharacter/lljoint.cpp +++ b/linden/indra/llcharacter/lljoint.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/lljoint.h b/linden/indra/llcharacter/lljoint.h index c05412d..6492fe2 100644 --- a/linden/indra/llcharacter/lljoint.h +++ b/linden/indra/llcharacter/lljoint.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -115,7 +115,7 @@ public: void touch(U32 flags = ALL_DIRTY); // get/set name - const std::string &getName() { return mName; } + const std::string& getName() const { return mName; } void setName( const std::string &name ) { mName = name; } // getParent @@ -175,7 +175,7 @@ public: virtual BOOL isAnimatable() { return TRUE; } - S32 getJointNum() { return mJointNum; } + S32 getJointNum() const { return mJointNum; } void setJointNum(S32 joint_num) { mJointNum = joint_num; } }; #endif // LL_LLJOINT_H diff --git a/linden/indra/llcharacter/lljointsolverrp3.cpp b/linden/indra/llcharacter/lljointsolverrp3.cpp index c6ae76e..0356912 100644 --- a/linden/indra/llcharacter/lljointsolverrp3.cpp +++ b/linden/indra/llcharacter/lljointsolverrp3.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/lljointsolverrp3.h b/linden/indra/llcharacter/lljointsolverrp3.h index 370360f..511351a 100644 --- a/linden/indra/llcharacter/lljointsolverrp3.h +++ b/linden/indra/llcharacter/lljointsolverrp3.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/lljointstate.h b/linden/indra/llcharacter/lljointstate.h index ef74150..15dfd6d 100644 --- a/linden/indra/llcharacter/lljointstate.h +++ b/linden/indra/llcharacter/lljointstate.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -36,11 +36,12 @@ // Header Files //----------------------------------------------------------------------------- #include "lljoint.h" +#include "llmemory.h" //----------------------------------------------------------------------------- // class LLJointState //----------------------------------------------------------------------------- -class LLJointState +class LLJointState : public LLRefCount { public: enum BlendPhase @@ -85,13 +86,9 @@ public: mPriority = LLJoint::USE_MOTION_PRIORITY; } - // Destructor - virtual ~LLJointState() - { - } - // joint that this state is applied to - LLJoint *getJoint() { return mJoint; } + LLJoint* getJoint() { return mJoint; } + const LLJoint* getJoint() const { return mJoint; } BOOL setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; } // transform type (bitwise flags can be combined) @@ -103,26 +100,33 @@ public: ROT = 2, SCALE = 4, }; - U32 getUsage() { return mUsage; } - void setUsage( U32 usage ) { mUsage = usage; } - F32 getWeight() { return mWeight; } + U32 getUsage() const { return mUsage; } + void setUsage( U32 usage ) { mUsage = usage; } + F32 getWeight() const { return mWeight; } void setWeight( F32 weight ) { mWeight = weight; } // get/set position - const LLVector3& getPosition() { return mPosition; } + const LLVector3& getPosition() const { return mPosition; } void setPosition( const LLVector3& pos ) { llassert(mUsage & POS); mPosition = pos; } // get/set rotation - const LLQuaternion& getRotation() { return mRotation; } + const LLQuaternion& getRotation() const { return mRotation; } void setRotation( const LLQuaternion& rot ) { llassert(mUsage & ROT); mRotation = rot; } // get/set scale - const LLVector3& getScale() { return mScale; } - void setScale( const LLVector3& scale ) { llassert(mUsage & SCALE); mScale = scale; } + const LLVector3& getScale() const { return mScale; } + void setScale( const LLVector3& scale ) { llassert(mUsage & SCALE); mScale = scale; } // get/set priority - LLJoint::JointPriority getPriority() { return mPriority; } - void setPriority( const LLJoint::JointPriority priority ) { mPriority = priority; } + LLJoint::JointPriority getPriority() const { return mPriority; } + void setPriority( LLJoint::JointPriority priority ) { mPriority = priority; } + +protected: + // Destructor + virtual ~LLJointState() + { + } + }; #endif // LL_LLJOINTSTATE_H diff --git a/linden/indra/llcharacter/llkeyframefallmotion.cpp b/linden/indra/llcharacter/llkeyframefallmotion.cpp index d3113fa..4a1f525 100644 --- a/linden/indra/llcharacter/llkeyframefallmotion.cpp +++ b/linden/indra/llcharacter/llkeyframefallmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -75,13 +75,13 @@ LLMotion::LLMotionInitStatus LLKeyframeFallMotion::onInitialize(LLCharacter *cha // load keyframe data, setup pose and joint states LLMotion::LLMotionInitStatus result = LLKeyframeMotion::onInitialize(character); - for (U32 jm=0; jmmNumJointMotions; jm++) + for (U32 jm=0; jmgetNumJointMotions(); jm++) { - if (!mJointStates[jm].getJoint()) + if (!mJointStates[jm]->getJoint()) continue; - if (mJointStates[jm].getJoint()->getName() == std::string("mPelvis")) + if (mJointStates[jm]->getJoint()->getName() == std::string("mPelvis")) { - mPelvisStatep = &mJointStates[jm]; + mPelvisState = mJointStates[jm]; } } @@ -124,8 +124,11 @@ BOOL LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask) BOOL result = LLKeyframeMotion::onUpdate(activeTime, joint_mask); F32 slerp_amt = clamp_rescale(activeTime / getDuration(), 0.5f, 0.75f, 0.f, 1.f); - mPelvisStatep->setRotation(mPelvisStatep->getRotation() * slerp(slerp_amt, mRotationToGroundNormal, LLQuaternion())); - + if (mPelvisState.notNull()) + { + mPelvisState->setRotation(mPelvisState->getRotation() * slerp(slerp_amt, mRotationToGroundNormal, LLQuaternion())); + } + return result; } diff --git a/linden/indra/llcharacter/llkeyframefallmotion.h b/linden/indra/llcharacter/llkeyframefallmotion.h index 9f6ed6b..b35925f 100644 --- a/linden/indra/llcharacter/llkeyframefallmotion.h +++ b/linden/indra/llcharacter/llkeyframefallmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -75,7 +75,7 @@ protected: //------------------------------------------------------------------------- LLCharacter* mCharacter; F32 mVelocityZ; - LLJointState* mPelvisStatep; + LLPointer mPelvisState; LLQuaternion mRotationToGroundNormal; }; diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp index 9979750..4288b8d 100644 --- a/linden/indra/llcharacter/llkeyframemotion.cpp +++ b/linden/indra/llcharacter/llkeyframemotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -71,24 +71,22 @@ static F32 MAX_CONSTRAINTS = 10; // JointMotionList //----------------------------------------------------------------------------- LLKeyframeMotion::JointMotionList::JointMotionList() - : mNumJointMotions(0), - mJointMotionArray(NULL) { } LLKeyframeMotion::JointMotionList::~JointMotionList() { for_each(mConstraints.begin(), mConstraints.end(), DeletePointer()); - delete [] mJointMotionArray; + for_each(mJointMotionArray.begin(), mJointMotionArray.end(), DeletePointer()); } U32 LLKeyframeMotion::JointMotionList::dumpDiagInfo() { S32 total_size = sizeof(JointMotionList); - for (U32 i = 0; i < mNumJointMotions; i++) + for (U32 i = 0; i < getNumJointMotions(); i++) { - LLKeyframeMotion::JointMotion* joint_motion_p = &mJointMotionArray[i]; + LLKeyframeMotion::JointMotion* joint_motion_p = mJointMotionArray[i]; llinfos << "\tJoint " << joint_motion_p->mJointName << llendl; if (joint_motion_p->mUsage & LLJointState::SCALE) @@ -385,10 +383,10 @@ void LLKeyframeMotion::JointMotion::update(LLJointState* joint_state, F32 time, { // this value being 0 is the cause of https://jira.lindenlab.com/browse/SL-22678 but I haven't // managed to get a stack to see how it got here. Testing for 0 here will stop the crash. - if ( joint_state == 0 ) + if ( joint_state == NULL ) { return; - }; + } U32 usage = joint_state->getUsage(); @@ -431,7 +429,6 @@ void LLKeyframeMotion::JointMotion::update(LLJointState* joint_state, F32 time, LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id) : LLMotion(id), mJointMotionList(NULL), - mJointStates(NULL), mPelvisp(NULL), mLastSkeletonSerialNum(0), mLastUpdateTime(0.f), @@ -448,10 +445,6 @@ LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id) //----------------------------------------------------------------------------- LLKeyframeMotion::~LLKeyframeMotion() { - if (mJointStates) - { - delete [] mJointStates; - } for_each(mConstraints.begin(), mConstraints.end(), DeletePointer()); } @@ -464,6 +457,26 @@ LLMotion *LLKeyframeMotion::create(const LLUUID &id) } //----------------------------------------------------------------------------- +// getJointState() +//----------------------------------------------------------------------------- +LLPointer& LLKeyframeMotion::getJointState(U32 index) +{ + llassert_always (index < (S32)mJointStates.size()); + return mJointStates[index]; +} + +//----------------------------------------------------------------------------- +// getJoin() +//----------------------------------------------------------------------------- +LLJoint* LLKeyframeMotion::getJoint(U32 index) +{ + llassert_always (index < (S32)mJointStates.size()); + LLJoint* joint = mJointStates[index]->getJoint(); + llassert_always (joint); + return joint; +} + +//----------------------------------------------------------------------------- // LLKeyframeMotion::onInitialize(LLCharacter *character) //----------------------------------------------------------------------------- LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *character) @@ -506,17 +519,25 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact // motion already existed in cache, so grab it mJointMotionList = joint_motion_list; + mJointStates.reserve(mJointMotionList->getNumJointMotions()); + // don't forget to allocate joint states - mJointStates = new LLJointState[mJointMotionList->mNumJointMotions]; - // set up joint states to point to character joints - for(U32 i = 0; i < mJointMotionList->mNumJointMotions; i++) + for(U32 i = 0; i < mJointMotionList->getNumJointMotions(); i++) { - if (LLJoint *jointp = mCharacter->getJoint(mJointMotionList->mJointMotionArray[i].mJointName)) + JointMotion* joint_motion = mJointMotionList->getJointMotion(i); + if (LLJoint *joint = mCharacter->getJoint(joint_motion->mJointName)) + { + LLPointer joint_state = new LLJointState; + mJointStates.push_back(joint_state); + joint_state->setJoint(joint); + joint_state->setUsage(joint_motion->mUsage); + joint_state->setPriority(joint_motion->mPriority); + } + else { - mJointStates[i].setJoint(jointp); - mJointStates[i].setUsage(mJointMotionList->mJointMotionArray[i].mUsage); - mJointStates[i].setPriority(joint_motion_list->mJointMotionArray[i].mPriority); + // add dummy joint state with no associated joint + mJointStates.push_back(new LLJointState); } } mAssetStatus = ASSET_LOADED; @@ -587,11 +608,12 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact BOOL LLKeyframeMotion::setupPose() { // add all valid joint states to the pose - for (U32 jm=0; jmmNumJointMotions; jm++) + for (U32 jm=0; jmgetNumJointMotions(); jm++) { - if ( mJointStates[jm].getJoint() ) + LLPointer joint_state = getJointState(jm); + if ( joint_state->getJoint() ) { - addJointState( &mJointStates[jm] ); + addJointState( joint_state ); } } @@ -692,13 +714,12 @@ BOOL LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask) //----------------------------------------------------------------------------- void LLKeyframeMotion::applyKeyframes(F32 time) { - U32 i; - for (i=0; imNumJointMotions; i++) + llassert_always (mJointMotionList->getNumJointMotions() <= mJointStates.size()); + for (U32 i=0; igetNumJointMotions(); i++) { - mJointMotionList->mJointMotionArray[i].update( - &mJointStates[i], - time, - mJointMotionList->mDuration ); + mJointMotionList->getJointMotion(i)->update(mJointStates[i], + time, + mJointMotionList->mDuration ); } LLJoint::JointPriority* pose_priority = (LLJoint::JointPriority* )mCharacter->getAnimationData("Hand Pose Priority"); @@ -793,7 +814,7 @@ void LLKeyframeMotion::initializeConstraint(JointConstraint* constraint) S32 joint_num; LLVector3 source_pos = mCharacter->getVolumePos(shared_data->mSourceConstraintVolume, shared_data->mSourceConstraintOffset); - LLJoint* cur_joint = mJointStates[shared_data->mJointStateIndices[0]].getJoint(); + LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[0]); F32 source_pos_offset = dist_vec(source_pos, cur_joint->getWorldPosition()); @@ -802,7 +823,7 @@ void LLKeyframeMotion::initializeConstraint(JointConstraint* constraint) // grab joint lengths for (joint_num = 1; joint_num < shared_data->mChainLength; joint_num++) { - cur_joint = mJointStates[shared_data->mJointStateIndices[joint_num]].getJoint(); + cur_joint = getJointState(shared_data->mJointStateIndices[joint_num])->getJoint(); if (!cur_joint) { return; @@ -844,7 +865,7 @@ void LLKeyframeMotion::activateConstraint(JointConstraint* constraint) for (joint_num = 1; joint_num < shared_data->mChainLength; joint_num++) { - LLJoint* cur_joint = mJointStates[shared_data->mJointStateIndices[joint_num]].getJoint(); + LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]); constraint->mPositions[joint_num] = (cur_joint->getWorldPosition() - mPelvisp->getWorldPosition()) * ~mPelvisp->getWorldRotation(); } @@ -884,7 +905,6 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 LLVector3 velocities[MAX_CHAIN_LENGTH - 1]; LLQuaternion old_rots[MAX_CHAIN_LENGTH]; S32 joint_num; - LLJoint* cur_joint; if (time < shared_data->mEaseInStartTime) { @@ -905,7 +925,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 activateConstraint(constraint); } - LLJoint* root_joint = mJointStates[shared_data->mJointStateIndices[shared_data->mChainLength]].getJoint(); + LLJoint* root_joint = getJoint(shared_data->mJointStateIndices[shared_data->mChainLength]); LLVector3 root_pos = root_joint->getWorldPosition(); // LLQuaternion root_rot = root_joint->getParent()->getWorldRotation(); @@ -916,14 +936,14 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 //apply underlying keyframe animation to get nominal "kinematic" joint positions for (joint_num = 0; joint_num <= shared_data->mChainLength; joint_num++) { - cur_joint = mJointStates[shared_data->mJointStateIndices[joint_num]].getJoint(); + LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]); if (joint_mask[cur_joint->getJointNum()] >= (0xff >> (7 - getPriority()))) { // skip constraint return; } old_rots[joint_num] = cur_joint->getRotation(); - cur_joint->setRotation(mJointStates[shared_data->mJointStateIndices[joint_num]].getRotation()); + cur_joint->setRotation(getJointState(shared_data->mJointStateIndices[joint_num])->getRotation()); } @@ -1007,7 +1027,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 if (shared_data->mChainLength) { - LLQuaternion end_rot = mJointStates[shared_data->mJointStateIndices[0]].getJoint()->getWorldRotation(); + LLQuaternion end_rot = getJoint(shared_data->mJointStateIndices[0])->getWorldRotation(); // slam start and end of chain to the proper positions (rest of chain stays put) positions[0] = lerp(keyframe_source_pos, target_pos, weight); @@ -1016,7 +1036,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 // grab keyframe-specified positions of joints for (joint_num = 1; joint_num < shared_data->mChainLength; joint_num++) { - LLVector3 kinematic_position = mJointStates[shared_data->mJointStateIndices[joint_num]].getJoint()->getWorldPosition() + + LLVector3 kinematic_position = getJoint(shared_data->mJointStateIndices[joint_num])->getWorldPosition() + (source_to_target * constraint->mJointLengthFractions[joint_num]); // convert intermediate joint positions to world coordinates @@ -1061,9 +1081,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 for (joint_num = shared_data->mChainLength; joint_num > 0; joint_num--) { - LLQuaternion parent_rot = mJointStates[shared_data->mJointStateIndices[joint_num]].getJoint()->getParent()->getWorldRotation(); - cur_joint = mJointStates[shared_data->mJointStateIndices[joint_num]].getJoint(); - LLJoint* child_joint = mJointStates[shared_data->mJointStateIndices[joint_num - 1]].getJoint(); + LLJoint* cur_joint = getJoint(shared_data->mJointStateIndices[joint_num]); + LLJoint* child_joint = getJoint(shared_data->mJointStateIndices[joint_num - 1]); + LLQuaternion parent_rot = cur_joint->getParent()->getWorldRotation(); LLQuaternion cur_rot = cur_joint->getWorldRotation(); LLQuaternion fixup_rot; @@ -1088,25 +1108,25 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 if (weight != 1.f) { - LLQuaternion cur_rot = mJointStates[shared_data->mJointStateIndices[joint_num]].getRotation(); + LLQuaternion cur_rot = getJointState(shared_data->mJointStateIndices[joint_num])->getRotation(); target_rot = nlerp(weight, cur_rot, target_rot); } - mJointStates[shared_data->mJointStateIndices[joint_num]].setRotation(target_rot); + getJointState(shared_data->mJointStateIndices[joint_num])->setRotation(target_rot); cur_joint->setRotation(target_rot); } - LLJoint* end_joint = mJointStates[shared_data->mJointStateIndices[0]].getJoint(); + LLJoint* end_joint = getJoint(shared_data->mJointStateIndices[0]); LLQuaternion end_local_rot = end_rot * ~end_joint->getParent()->getWorldRotation(); if (weight == 1.f) { - mJointStates[shared_data->mJointStateIndices[0]].setRotation(end_local_rot); + getJointState(shared_data->mJointStateIndices[0])->setRotation(end_local_rot); } else { - LLQuaternion cur_rot = mJointStates[shared_data->mJointStateIndices[0]].getRotation(); - mJointStates[shared_data->mJointStateIndices[0]].setRotation(nlerp(weight, cur_rot, end_local_rot)); + LLQuaternion cur_rot = getJointState(shared_data->mJointStateIndices[0])->getRotation(); + getJointState(shared_data->mJointStateIndices[0])->setRotation(nlerp(weight, cur_rot, end_local_rot)); } // save simulated positions in pelvis-space and calculate total fixup distance @@ -1124,17 +1144,17 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 //reset old joint rots for (joint_num = 0; joint_num <= shared_data->mChainLength; joint_num++) { - mJointStates[shared_data->mJointStateIndices[joint_num]].getJoint()->setRotation(old_rots[joint_num]); + getJoint(shared_data->mJointStateIndices[joint_num])->setRotation(old_rots[joint_num]); } } // simple positional constraint (pelvis only) - else if (mJointStates[shared_data->mJointStateIndices[0]].getUsage() & LLJointState::POS) + else if (getJointState(shared_data->mJointStateIndices[0])->getUsage() & LLJointState::POS) { LLVector3 delta = source_to_target * weight; - LLJointState* current_joint_statep = &mJointStates[shared_data->mJointStateIndices[0]]; - LLQuaternion parent_rot = current_joint_statep->getJoint()->getParent()->getWorldRotation(); + LLPointer current_joint_state = getJointState(shared_data->mJointStateIndices[0]); + LLQuaternion parent_rot = current_joint_state->getJoint()->getParent()->getWorldRotation(); delta = delta * ~parent_rot; - current_joint_statep->setPosition(current_joint_statep->getJoint()->getPosition() + delta); + current_joint_state->setPosition(current_joint_state->getJoint()->getPosition() + delta); } } @@ -1145,7 +1165,6 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) { BOOL old_version = FALSE; mJointMotionList = new LLKeyframeMotion::JointMotionList; - mJointMotionList->mNumJointMotions = 0; //------------------------------------------------------------------------- // get base priority @@ -1261,40 +1280,38 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //------------------------------------------------------------------------- // get number of joint motions //------------------------------------------------------------------------- - if (!dp.unpackU32(mJointMotionList->mNumJointMotions, "num_joints")) + U32 num_motions = 0; + if (!dp.unpackU32(num_motions, "num_joints")) { llwarns << "can't read number of joints" << llendl; return FALSE; } - if (mJointMotionList->mNumJointMotions == 0) + if (num_motions == 0) { llwarns << "no joints in animation" << llendl; return FALSE; } - else if (mJointMotionList->mNumJointMotions > LL_CHARACTER_MAX_JOINTS) + else if (num_motions > LL_CHARACTER_MAX_JOINTS) { llwarns << "too many joints in animation" << llendl; return FALSE; } - mJointMotionList->mJointMotionArray = new JointMotion[mJointMotionList->mNumJointMotions]; - mJointStates = new LLJointState[mJointMotionList->mNumJointMotions]; - - if (!mJointMotionList->mJointMotionArray) - { - mJointMotionList->mDuration = 0.0f; - mJointMotionList->mEaseInDuration = 0.0f; - mJointMotionList->mEaseOutDuration = 0.0f; - return FALSE; - } + mJointMotionList->mJointMotionArray.clear(); + mJointMotionList->mJointMotionArray.reserve(num_motions); + mJointStates.clear(); + mJointStates.reserve(num_motions); //------------------------------------------------------------------------- // initialize joint motions //------------------------------------------------------------------------- - S32 k; - for(U32 i=0; imNumJointMotions; ++i) + + for(U32 i=0; imJointMotionArray.push_back(joint_motion); + std::string joint_name; if (!dp.unpackString(joint_name, "joint_name")) { @@ -1316,9 +1333,12 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //return FALSE; } - mJointMotionList->mJointMotionArray[i].mJointName = joint_name; - mJointStates[i].setJoint( joint ); - mJointStates[i].setUsage( 0 ); + joint_motion->mJointName = joint_name; + + LLPointer joint_state = new LLJointState; + mJointStates.push_back(joint_state); + joint_state->setJoint( joint ); + joint_state->setUsage( 0 ); //--------------------------------------------------------------------- // get joint priority @@ -1330,36 +1350,36 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) return FALSE; } - mJointMotionList->mJointMotionArray[i].mPriority = (LLJoint::JointPriority)joint_priority; + joint_motion->mPriority = (LLJoint::JointPriority)joint_priority; if (joint_priority != LLJoint::USE_MOTION_PRIORITY && joint_priority > mJointMotionList->mMaxPriority) { mJointMotionList->mMaxPriority = (LLJoint::JointPriority)joint_priority; } - mJointStates[i].setPriority((LLJoint::JointPriority)joint_priority); + joint_state->setPriority((LLJoint::JointPriority)joint_priority); //--------------------------------------------------------------------- // scan rotation curve header //--------------------------------------------------------------------- - if (!dp.unpackS32(mJointMotionList->mJointMotionArray[i].mRotationCurve.mNumKeys, "num_rot_keys")) + if (!dp.unpackS32(joint_motion->mRotationCurve.mNumKeys, "num_rot_keys")) { llwarns << "can't read number of rotation keys" << llendl; return FALSE; } - mJointMotionList->mJointMotionArray[i].mRotationCurve.mInterpolationType = IT_LINEAR; - if (mJointMotionList->mJointMotionArray[i].mRotationCurve.mNumKeys != 0) + joint_motion->mRotationCurve.mInterpolationType = IT_LINEAR; + if (joint_motion->mRotationCurve.mNumKeys != 0) { - mJointStates[i].setUsage(mJointStates[i].getUsage() | LLJointState::ROT ); + joint_state->setUsage(joint_state->getUsage() | LLJointState::ROT ); } //--------------------------------------------------------------------- // scan rotation curve keys //--------------------------------------------------------------------- - RotationCurve *rCurve = &mJointMotionList->mJointMotionArray[i].mRotationCurve; + RotationCurve *rCurve = &joint_motion->mRotationCurve; - for (k = 0; k < mJointMotionList->mJointMotionArray[i].mRotationCurve.mNumKeys; k++) + for (S32 k = 0; k < joint_motion->mRotationCurve.mNumKeys; k++) { F32 time; U16 time_short; @@ -1424,24 +1444,24 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) //--------------------------------------------------------------------- // scan position curve header //--------------------------------------------------------------------- - if (!dp.unpackS32(mJointMotionList->mJointMotionArray[i].mPositionCurve.mNumKeys, "num_pos_keys")) + if (!dp.unpackS32(joint_motion->mPositionCurve.mNumKeys, "num_pos_keys")) { llwarns << "can't read number of position keys" << llendl; return FALSE; } - mJointMotionList->mJointMotionArray[i].mPositionCurve.mInterpolationType = IT_LINEAR; - if (mJointMotionList->mJointMotionArray[i].mPositionCurve.mNumKeys != 0) + joint_motion->mPositionCurve.mInterpolationType = IT_LINEAR; + if (joint_motion->mPositionCurve.mNumKeys != 0) { - mJointStates[i].setUsage(mJointStates[i].getUsage() | LLJointState::POS ); + joint_state->setUsage(joint_state->getUsage() | LLJointState::POS ); } //--------------------------------------------------------------------- // scan position curve keys //--------------------------------------------------------------------- - PositionCurve *pCurve = &mJointMotionList->mJointMotionArray[i].mPositionCurve; - BOOL is_pelvis = mJointMotionList->mJointMotionArray[i].mJointName == "mPelvis"; - for (k = 0; k < mJointMotionList->mJointMotionArray[i].mPositionCurve.mNumKeys; k++) + PositionCurve *pCurve = &joint_motion->mPositionCurve; + BOOL is_pelvis = joint_motion->mJointName == "mPelvis"; + for (S32 k = 0; k < joint_motion->mPositionCurve.mNumKeys; k++) { U16 time_short; PositionKey* pos_key = new PositionKey; @@ -1501,7 +1521,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } } - mJointMotionList->mJointMotionArray[i].mUsage = mJointStates[i].getUsage(); + joint_motion->mUsage = joint_state->getUsage(); } //------------------------------------------------------------------------- @@ -1655,9 +1675,9 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) } joint = parent; constraintp->mJointStateIndices[i] = -1; - for (U32 j = 0; j < mJointMotionList->mNumJointMotions; j++) + for (U32 j = 0; j < mJointMotionList->getNumJointMotions(); j++) { - if(mJointStates[j].getJoint() == joint) + if(getJoint(j) == joint) { constraintp->mJointStateIndices[i] = (S32)j; break; @@ -1695,11 +1715,11 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const success &= dp.packF32(mJointMotionList->mEaseInDuration, "ease_in_duration"); success &= dp.packF32(mJointMotionList->mEaseOutDuration, "ease_out_duration"); success &= dp.packU32(mJointMotionList->mHandPose, "hand_pose"); - success &= dp.packU32(mJointMotionList->mNumJointMotions, "num_joints"); + success &= dp.packU32(mJointMotionList->getNumJointMotions(), "num_joints"); - for (U32 i = 0; i < mJointMotionList->mNumJointMotions; i++) + for (U32 i = 0; i < mJointMotionList->getNumJointMotions(); i++) { - JointMotion* joint_motionp = &mJointMotionList->mJointMotionArray[i]; + JointMotion* joint_motionp = mJointMotionList->getJointMotion(i); success &= dp.packString(joint_motionp->mJointName.c_str(), "joint_name"); success &= dp.packS32(joint_motionp->mPriority, "joint_priority"); success &= dp.packS32(joint_motionp->mRotationCurve.mNumKeys, "num_rot_keys"); @@ -1806,13 +1826,14 @@ void LLKeyframeMotion::setPriority(S32 priority) mJointMotionList->mBasePriority = (LLJoint::JointPriority)priority; mJointMotionList->mMaxPriority = mJointMotionList->mBasePriority; - for (U32 i = 0; i < mJointMotionList->mNumJointMotions; i++) + for (U32 i = 0; i < mJointMotionList->getNumJointMotions(); i++) { - mJointMotionList->mJointMotionArray[i].mPriority = (LLJoint::JointPriority)llclamp( - (S32)mJointMotionList->mJointMotionArray[i].mPriority + priority_delta, + JointMotion* joint_motion = mJointMotionList->getJointMotion(i); + joint_motion->mPriority = (LLJoint::JointPriority)llclamp( + (S32)joint_motion->mPriority + priority_delta, (S32)LLJoint::LOW_PRIORITY, (S32)LLJoint::HIGHEST_PRIORITY); - mJointStates[i].setPriority(mJointMotionList->mJointMotionArray[i].mPriority); + getJointState(i)->setPriority(joint_motion->mPriority); } } } @@ -1888,11 +1909,13 @@ void LLKeyframeMotion::setLoopIn(F32 in_point) mJointMotionList->mLoopInPoint = in_point; // set up loop keys - for (U32 i = 0; i < mJointMotionList->mNumJointMotions; i++) + for (U32 i = 0; i < mJointMotionList->getNumJointMotions(); i++) { - PositionCurve* pos_curve = &mJointMotionList->mJointMotionArray[i].mPositionCurve; - RotationCurve* rot_curve = &mJointMotionList->mJointMotionArray[i].mRotationCurve; - ScaleCurve* scale_curve = &mJointMotionList->mJointMotionArray[i].mScaleCurve; + JointMotion* joint_motion = mJointMotionList->getJointMotion(i); + + PositionCurve* pos_curve = &joint_motion->mPositionCurve; + RotationCurve* rot_curve = &joint_motion->mRotationCurve; + ScaleCurve* scale_curve = &joint_motion->mScaleCurve; pos_curve->mLoopInKey.mTime = mJointMotionList->mLoopInPoint; rot_curve->mLoopInKey.mTime = mJointMotionList->mLoopInPoint; @@ -1915,11 +1938,13 @@ void LLKeyframeMotion::setLoopOut(F32 out_point) mJointMotionList->mLoopOutPoint = out_point; // set up loop keys - for (U32 i = 0; i < mJointMotionList->mNumJointMotions; i++) + for (U32 i = 0; i < mJointMotionList->getNumJointMotions(); i++) { - PositionCurve* pos_curve = &mJointMotionList->mJointMotionArray[i].mPositionCurve; - RotationCurve* rot_curve = &mJointMotionList->mJointMotionArray[i].mRotationCurve; - ScaleCurve* scale_curve = &mJointMotionList->mJointMotionArray[i].mScaleCurve; + JointMotion* joint_motion = mJointMotionList->getJointMotion(i); + + PositionCurve* pos_curve = &joint_motion->mPositionCurve; + RotationCurve* rot_curve = &joint_motion->mRotationCurve; + ScaleCurve* scale_curve = &joint_motion->mScaleCurve; pos_curve->mLoopOutKey.mTime = mJointMotionList->mLoopOutPoint; rot_curve->mLoopOutKey.mTime = mJointMotionList->mLoopOutPoint; @@ -2020,10 +2045,10 @@ void LLKeyframeMotion::writeCAL3D(apr_file_t* fp) // // - apr_file_printf(fp, "\n", getDuration(), mJointMotionList->mNumJointMotions); - for (U32 joint_index = 0; joint_index < mJointMotionList->mNumJointMotions; joint_index++) + apr_file_printf(fp, "\n", getDuration(), mJointMotionList->getNumJointMotions()); + for (U32 joint_index = 0; joint_index < mJointMotionList->getNumJointMotions(); joint_index++) { - JointMotion* joint_motionp = &mJointMotionList->mJointMotionArray[joint_index]; + JointMotion* joint_motionp = mJointMotionList->getJointMotion(joint_index); LLJoint* animated_joint = mCharacter->getJoint(joint_motionp->mJointName); S32 joint_num = animated_joint->mJointNum + 1; diff --git a/linden/indra/llcharacter/llkeyframemotion.h b/linden/indra/llcharacter/llkeyframemotion.h index ef3f6dd..0ad0181 100644 --- a/linden/indra/llcharacter/llkeyframemotion.h +++ b/linden/indra/llcharacter/llkeyframemotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -73,6 +73,11 @@ public: // Destructor virtual ~LLKeyframeMotion(); +private: + // private helper functions to wrap some asserts + LLPointer& getJointState(U32 index); + LLJoint* getJoint(U32 index); + public: //------------------------------------------------------------------------- // functions to support MotionController and MotionRegistry @@ -388,7 +393,7 @@ public: U32 mUsage; LLJoint::JointPriority mPriority; - void update(LLJointState *joint_state, F32 time, F32 duration); + void update(LLJointState* joint_state, F32 time, F32 duration); }; //------------------------------------------------------------------------- @@ -397,8 +402,7 @@ public: class JointMotionList { public: - U32 mNumJointMotions; - JointMotion* mJointMotionArray; + std::vector mJointMotionArray; F32 mDuration; BOOL mLoop; F32 mLoopInPoint; @@ -415,6 +419,8 @@ public: JointMotionList(); ~JointMotionList(); U32 dumpDiagInfo(); + JointMotion* getJointMotion(U32 index) const { llassert(index < mJointMotionArray.size()); return mJointMotionArray[index]; } + U32 getNumJointMotions() const { return mJointMotionArray.size(); } }; @@ -425,7 +431,7 @@ protected: // Member Data //------------------------------------------------------------------------- JointMotionList* mJointMotionList; - LLJointState* mJointStates; + std::vector > mJointStates; LLJoint* mPelvisp; LLCharacter* mCharacter; std::string mEmoteName; diff --git a/linden/indra/llcharacter/llkeyframemotionparam.cpp b/linden/indra/llcharacter/llkeyframemotionparam.cpp index 12b7296..2dd935c 100644 --- a/linden/indra/llcharacter/llkeyframemotionparam.cpp +++ b/linden/indra/llcharacter/llkeyframemotionparam.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -61,7 +61,6 @@ BOOL LLKeyframeMotionParam::sortFunc(ParameterizedMotion *new_motion, Parameteri //----------------------------------------------------------------------------- LLKeyframeMotionParam::LLKeyframeMotionParam( const LLUUID &id) : LLMotion(id) { - mJointStates = NULL; mDefaultKeyframeMotion = NULL; mCharacter = NULL; diff --git a/linden/indra/llcharacter/llkeyframemotionparam.h b/linden/indra/llcharacter/llkeyframemotionparam.h index 75977ee..a5bc2cb 100644 --- a/linden/indra/llcharacter/llkeyframemotionparam.h +++ b/linden/indra/llcharacter/llkeyframemotionparam.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -145,7 +145,6 @@ protected: typedef LLLinkedList < ParameterizedMotion > motion_list_t; LLAssocList mParameterizedMotions; - LLJointState* mJointStates; LLMotion* mDefaultKeyframeMotion; LLCharacter* mCharacter; LLPoseBlender mPoseBlender; diff --git a/linden/indra/llcharacter/llkeyframestandmotion.cpp b/linden/indra/llcharacter/llkeyframestandmotion.cpp index 9e850a4..6517681 100644 --- a/linden/indra/llcharacter/llkeyframestandmotion.cpp +++ b/linden/indra/llcharacter/llkeyframestandmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llkeyframestandmotion.h b/linden/indra/llcharacter/llkeyframestandmotion.h index 0fcda27..6772b6e 100644 --- a/linden/indra/llcharacter/llkeyframestandmotion.h +++ b/linden/indra/llcharacter/llkeyframestandmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -78,15 +78,15 @@ public: BOOL mFlipFeet; - LLJointState *mPelvisState; + LLPointer mPelvisState; - LLJointState *mHipLeftState; - LLJointState *mKneeLeftState; - LLJointState *mAnkleLeftState; + LLPointer mHipLeftState; + LLPointer mKneeLeftState; + LLPointer mAnkleLeftState; - LLJointState *mHipRightState; - LLJointState *mKneeRightState; - LLJointState *mAnkleRightState; + LLPointer mHipRightState; + LLPointer mKneeRightState; + LLPointer mAnkleRightState; LLJoint mPelvisJoint; diff --git a/linden/indra/llcharacter/llkeyframewalkmotion.cpp b/linden/indra/llcharacter/llkeyframewalkmotion.cpp index 83c1c49..d5f6b81 100644 --- a/linden/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/linden/indra/llcharacter/llkeyframewalkmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -143,6 +143,8 @@ LLWalkAdjustMotion::LLWalkAdjustMotion(const LLUUID &id) : LLMotion(id) { mLastTime = 0.f; mName = "walk_adjust"; + + mPelvisState = new LLJointState; } //----------------------------------------------------------------------------- @@ -155,15 +157,15 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara mRightAnkleJoint = mCharacter->getJoint("mAnkleRight"); mPelvisJoint = mCharacter->getJoint("mPelvis"); - mPelvisState.setJoint( mPelvisJoint ); + mPelvisState->setJoint( mPelvisJoint ); if ( !mPelvisJoint ) { llwarns << getName() << ": Can't get pelvis joint." << llendl; return STATUS_FAILURE; } - mPelvisState.setUsage(LLJointState::POS); - addJointState( &mPelvisState ); + mPelvisState->setUsage(LLJointState::POS); + addJointState( mPelvisState ); return STATUS_SUCCESS; } @@ -178,7 +180,7 @@ BOOL LLWalkAdjustMotion::onActivate() mAnimSpeed = 0.f; mAvgSpeed = 0.f; mRelativeDir = 1.f; - mPelvisState.setPosition(LLVector3::zero); + mPelvisState->setPosition(LLVector3::zero); // store ankle positions for next frame mLastLeftAnklePos = mCharacter->getPosGlobalFromAgent(mLeftAnkleJoint->getWorldPosition()); mLastRightAnklePos = mCharacter->getPosGlobalFromAgent(mRightAnkleJoint->getWorldPosition()); @@ -271,7 +273,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) // calculate ideal pelvis offset so that foot is glued to ground and damp towards it // the amount of foot slippage this frame + the offset applied last frame - mPelvisOffset = mPelvisState.getPosition() + lerp(LLVector3::zero, footCorrection, LLCriticalDamp::getInterpolant(0.2f)); + mPelvisOffset = mPelvisState->getPosition() + lerp(LLVector3::zero, footCorrection, LLCriticalDamp::getInterpolant(0.2f)); // pelvis drift (along walk direction) mAvgCorrection = lerp(mAvgCorrection, footCorrection.mV[VX] * mRelativeDir, LLCriticalDamp::getInterpolant(0.1f)); @@ -319,7 +321,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 drift_comp_max = llclamp(speed, 0.f, DRIFT_COMP_MAX_SPEED) / DRIFT_COMP_MAX_SPEED; drift_comp_max *= DRIFT_COMP_MAX_TOTAL; - LLVector3 currentPelvisPos = mPelvisState.getJoint()->getPosition(); + LLVector3 currentPelvisPos = mPelvisState->getJoint()->getPosition(); // NB: this is an ADDITIVE amount that is accumulated every frame, so clamping it alone won't do the trick // must clamp with absolute position of pelvis in mind @@ -328,7 +330,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) mPelvisOffset.mV[VZ] = 0.f; // set position - mPelvisState.setPosition(mPelvisOffset); + mPelvisState->setPosition(mPelvisOffset); mCharacter->setAnimationData("Pelvis Offset", &mPelvisOffset); @@ -344,6 +346,17 @@ void LLWalkAdjustMotion::onDeactivate() } //----------------------------------------------------------------------------- +// LLFlyAdjustMotion::LLFlyAdjustMotion() +//----------------------------------------------------------------------------- +LLFlyAdjustMotion::LLFlyAdjustMotion(const LLUUID &id) + : LLMotion(id) +{ + mName = "fly_adjust"; + + mPelvisState = new LLJointState; +} + +//----------------------------------------------------------------------------- // LLFlyAdjustMotion::onInitialize() //----------------------------------------------------------------------------- LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *character) @@ -351,15 +364,15 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac mCharacter = character; LLJoint* pelvisJoint = mCharacter->getJoint("mPelvis"); - mPelvisState.setJoint( pelvisJoint ); + mPelvisState->setJoint( pelvisJoint ); if ( !pelvisJoint ) { llwarns << getName() << ": Can't get pelvis joint." << llendl; return STATUS_FAILURE; } - mPelvisState.setUsage(LLJointState::POS | LLJointState::ROT); - addJointState( &mPelvisState ); + mPelvisState->setUsage(LLJointState::POS | LLJointState::ROT); + addJointState( mPelvisState ); return STATUS_SUCCESS; } @@ -369,8 +382,8 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac //----------------------------------------------------------------------------- BOOL LLFlyAdjustMotion::onActivate() { - mPelvisState.setPosition(LLVector3::zero); - mPelvisState.setRotation(LLQuaternion::DEFAULT); + mPelvisState->setPosition(LLVector3::zero); + mPelvisState->setRotation(LLQuaternion::DEFAULT); mRoll = 0.f; return TRUE; } @@ -392,11 +405,11 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) // llinfos << mRoll << llendl; LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); - mPelvisState.setRotation(roll); + mPelvisState->setRotation(roll); // F32 lerp_amt = LLCriticalDamp::getInterpolant(0.2f); // -// LLVector3 pelvis_correction = mPelvisState.getPosition() - lerp(LLVector3::zero, mPelvisState.getJoint()->getPosition() + mPelvisState.getPosition(), lerp_amt); -// mPelvisState.setPosition(pelvis_correction); +// LLVector3 pelvis_correction = mPelvisState->getPosition() - lerp(LLVector3::zero, mPelvisState->getJoint()->getPosition() + mPelvisState->getPosition(), lerp_amt); +// mPelvisState->setPosition(pelvis_correction); return TRUE; } diff --git a/linden/indra/llcharacter/llkeyframewalkmotion.h b/linden/indra/llcharacter/llkeyframewalkmotion.h index 3c5a0cb..1a4e39f 100644 --- a/linden/indra/llcharacter/llkeyframewalkmotion.h +++ b/linden/indra/llcharacter/llkeyframewalkmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -123,7 +123,7 @@ public: LLCharacter *mCharacter; LLJoint* mLeftAnkleJoint; LLJoint* mRightAnkleJoint; - LLJointState mPelvisState; + LLPointer mPelvisState; LLJoint* mPelvisJoint; LLVector3d mLastLeftAnklePos; LLVector3d mLastRightAnklePos; @@ -141,7 +141,7 @@ class LLFlyAdjustMotion : public LLMotion { public: // Constructor - LLFlyAdjustMotion(const LLUUID &id) : LLMotion(id) {mName = "fly_adjust";} + LLFlyAdjustMotion(const LLUUID &id); public: //------------------------------------------------------------------------- @@ -173,7 +173,7 @@ protected: // Member Data //------------------------------------------------------------------------- LLCharacter *mCharacter; - LLJointState mPelvisState; + LLPointer mPelvisState; F32 mRoll; }; diff --git a/linden/indra/llcharacter/llmotion.cpp b/linden/indra/llcharacter/llmotion.cpp index aa5e542..899796c 100644 --- a/linden/indra/llcharacter/llmotion.cpp +++ b/linden/indra/llcharacter/llmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -106,7 +106,7 @@ void LLMotion::fadeIn() //----------------------------------------------------------------------------- // addJointState() //----------------------------------------------------------------------------- -void LLMotion::addJointState(LLJointState* jointState) +void LLMotion::addJointState(const LLPointer& jointState) { mPose.addJointState(jointState); S32 priority = jointState->getPriority(); diff --git a/linden/indra/llcharacter/llmotion.h b/linden/indra/llcharacter/llmotion.h index 1d21edc..188937d 100644 --- a/linden/indra/llcharacter/llmotion.h +++ b/linden/indra/llcharacter/llmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -163,7 +163,7 @@ protected: // it will be deactivated virtual BOOL onActivate() = 0; - void addJointState(LLJointState* jointState); + void addJointState(const LLPointer& jointState); protected: LLPose mPose; diff --git a/linden/indra/llcharacter/llmotioncontroller.cpp b/linden/indra/llcharacter/llmotioncontroller.cpp index 8dc90b8..d1a2a53 100644 --- a/linden/indra/llcharacter/llmotioncontroller.cpp +++ b/linden/indra/llcharacter/llmotioncontroller.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llmotioncontroller.h b/linden/indra/llcharacter/llmotioncontroller.h index 76f5c68..e66edcb 100644 --- a/linden/indra/llcharacter/llmotioncontroller.h +++ b/linden/indra/llcharacter/llmotioncontroller.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llmultigesture.cpp b/linden/indra/llcharacter/llmultigesture.cpp index 080627a..02016a0 100644 --- a/linden/indra/llcharacter/llmultigesture.cpp +++ b/linden/indra/llcharacter/llmultigesture.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llmultigesture.h b/linden/indra/llcharacter/llmultigesture.h index 23c9c0f..08748b7 100644 --- a/linden/indra/llcharacter/llmultigesture.h +++ b/linden/indra/llcharacter/llmultigesture.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llpose.cpp b/linden/indra/llcharacter/llpose.cpp index e74517f..3a6a221 100644 --- a/linden/indra/llcharacter/llpose.cpp +++ b/linden/indra/llcharacter/llpose.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -54,7 +54,7 @@ LLPose::~LLPose() //----------------------------------------------------------------------------- // getFirstJointState() //----------------------------------------------------------------------------- -LLJointState *LLPose::getFirstJointState() +LLJointState* LLPose::getFirstJointState() { mListIter = mJointMap.begin(); if (mListIter == mJointMap.end()) @@ -86,7 +86,7 @@ LLJointState *LLPose::getNextJointState() //----------------------------------------------------------------------------- // addJointState() //----------------------------------------------------------------------------- -BOOL LLPose::addJointState(LLJointState *jointState) +BOOL LLPose::addJointState(const LLPointer& jointState) { if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end()) { @@ -98,7 +98,7 @@ BOOL LLPose::addJointState(LLJointState *jointState) //----------------------------------------------------------------------------- // removeJointState() //----------------------------------------------------------------------------- -BOOL LLPose::removeJointState(LLJointState *jointState) +BOOL LLPose::removeJointState(const LLPointer& jointState) { mJointMap.erase(jointState->getJoint()->getName()); return TRUE; @@ -199,7 +199,7 @@ LLJointStateBlender::~LLJointStateBlender() //----------------------------------------------------------------------------- // addJointState() //----------------------------------------------------------------------------- -BOOL LLJointStateBlender::addJointState(LLJointState *joint_state, S32 priority, BOOL additive_blend) +BOOL LLJointStateBlender::addJointState(const LLPointer& joint_state, S32 priority, BOOL additive_blend) { llassert(joint_state); @@ -209,7 +209,7 @@ BOOL LLJointStateBlender::addJointState(LLJointState *joint_state, S32 priority, for(S32 i = 0; i < JSB_NUM_JOINT_STATES; i++) { - if (NULL == mJointStates[i]) + if (mJointStates[i].isNull()) { mJointStates[i] = joint_state; mPriorities[i] = priority; @@ -246,7 +246,7 @@ void LLJointStateBlender::blendJointStates(BOOL apply_now) // we need at least one joint to blend // if there is one, it will be in slot zero according to insertion logic // instead of resetting joint state to default, just leave it unchanged from last frame - if (NULL == mJointStates[0]) + if (mJointStates[0].isNull()) { return; } @@ -275,7 +275,7 @@ void LLJointStateBlender::blendJointStates(BOOL apply_now) sum_weights[SCALE_WEIGHT] = 0.f; for(S32 joint_state_index = 0; - joint_state_index < JSB_NUM_JOINT_STATES && mJointStates[joint_state_index] != NULL; + joint_state_index < JSB_NUM_JOINT_STATES && mJointStates[joint_state_index].notNull(); joint_state_index++) { LLJointState* jsp = mJointStates[joint_state_index]; @@ -468,7 +468,7 @@ BOOL LLPoseBlender::addMotion(LLMotion* motion) { LLPose* pose = motion->getPose(); - for(LLJointState *jsp = pose->getFirstJointState(); jsp; jsp = pose->getNextJointState()) + for(LLJointState* jsp = pose->getFirstJointState(); jsp; jsp = pose->getNextJointState()) { LLJoint *jointp = jsp->getJoint(); LLJointStateBlender* joint_blender; diff --git a/linden/indra/llcharacter/llpose.h b/linden/indra/llcharacter/llpose.h index 5ea586f..f67a26b 100644 --- a/linden/indra/llcharacter/llpose.h +++ b/linden/indra/llcharacter/llpose.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -52,7 +52,7 @@ class LLPose { friend class LLPoseBlender; protected: - typedef std::map joint_map; + typedef std::map > joint_map; typedef joint_map::iterator joint_map_iterator; typedef joint_map::value_type joint_map_value_type; @@ -61,19 +61,19 @@ protected: joint_map_iterator mListIter; public: // Iterate through jointStates - LLJointState *getFirstJointState(); - LLJointState *getNextJointState(); - LLJointState *findJointState(LLJoint *joint); - LLJointState *findJointState(const std::string &name); + LLJointState* getFirstJointState(); + LLJointState* getNextJointState(); + LLJointState* findJointState(LLJoint *joint); + LLJointState* findJointState(const std::string &name); public: // Constructor LLPose() : mWeight(0.f) {} // Destructor ~LLPose(); // add a joint state in this pose - BOOL addJointState(LLJointState *jointState); + BOOL addJointState(const LLPointer& jointState); // remove a joint state from this pose - BOOL removeJointState(LLJointState *jointState); + BOOL removeJointState(const LLPointer& jointState); // removes all joint states from this pose BOOL removeAllJointStates(); // set weight for all joint states in this pose @@ -89,14 +89,14 @@ const S32 JSB_NUM_JOINT_STATES = 6; class LLJointStateBlender { protected: - LLJointState* mJointStates[JSB_NUM_JOINT_STATES]; + LLPointer mJointStates[JSB_NUM_JOINT_STATES]; S32 mPriorities[JSB_NUM_JOINT_STATES]; BOOL mAdditiveBlends[JSB_NUM_JOINT_STATES]; public: LLJointStateBlender(); ~LLJointStateBlender(); void blendJointStates(BOOL apply_now = TRUE); - BOOL addJointState(LLJointState *joint_state, S32 priority, BOOL additive_blend); + BOOL addJointState(const LLPointer& joint_state, S32 priority, BOOL additive_blend); void interpolate(F32 u); void clear(); void resetCachedJoint(); diff --git a/linden/indra/llcharacter/llstatemachine.cpp b/linden/indra/llcharacter/llstatemachine.cpp index 47cdfff..eab6e7f 100644 --- a/linden/indra/llcharacter/llstatemachine.cpp +++ b/linden/indra/llcharacter/llstatemachine.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llstatemachine.h b/linden/indra/llcharacter/llstatemachine.h index a4d3145..f46e4bf 100644 --- a/linden/indra/llcharacter/llstatemachine.h +++ b/linden/indra/llcharacter/llstatemachine.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/lltargetingmotion.cpp b/linden/indra/llcharacter/lltargetingmotion.cpp index 1676a08..0f160a4 100644 --- a/linden/indra/llcharacter/lltargetingmotion.cpp +++ b/linden/indra/llcharacter/lltargetingmotion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -55,6 +55,8 @@ LLTargetingMotion::LLTargetingMotion(const LLUUID &id) : LLMotion(id) { mCharacter = NULL; mName = "targeting"; + + mTorsoState = new LLJointState; } @@ -87,11 +89,11 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac return STATUS_FAILURE; } - mTorsoState.setJoint( mTorsoJoint ); + mTorsoState->setJoint( mTorsoJoint ); // add joint states to the pose - mTorsoState.setUsage(LLJointState::ROT); - addJointState( &mTorsoState ); + mTorsoState->setUsage(LLJointState::ROT); + addJointState( mTorsoState ); return STATUS_SUCCESS; } @@ -127,7 +129,7 @@ BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask) } //LLVector3 target_plane_normal = LLVector3(1.f, 0.f, 0.f) * mPelvisJoint->getWorldRotation(); - //LLVector3 torso_dir = LLVector3(1.f, 0.f, 0.f) * (mTorsoJoint->getWorldRotation() * mTorsoState.getRotation()); + //LLVector3 torso_dir = LLVector3(1.f, 0.f, 0.f) * (mTorsoJoint->getWorldRotation() * mTorsoState->getRotation()); LLVector3 skyward(0.f, 0.f, 1.f); LLVector3 left(skyward % target); @@ -151,14 +153,14 @@ BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask) new_torso_rot = new_torso_rot * ~cur_torso_rot; // slerp from current additive rotation to ideal additive rotation - new_torso_rot = nlerp(slerp_amt, mTorsoState.getRotation(), new_torso_rot); + new_torso_rot = nlerp(slerp_amt, mTorsoState->getRotation(), new_torso_rot); // constraint overall torso rotation LLQuaternion total_rot = new_torso_rot * mTorsoJoint->getRotation(); total_rot.constrain(F_PI_BY_TWO * 0.8f); new_torso_rot = total_rot * ~mTorsoJoint->getRotation(); - mTorsoState.setRotation(new_torso_rot); + mTorsoState->setRotation(new_torso_rot); return result; } diff --git a/linden/indra/llcharacter/lltargetingmotion.h b/linden/indra/llcharacter/lltargetingmotion.h index 1436c21..e83fb00 100644 --- a/linden/indra/llcharacter/lltargetingmotion.h +++ b/linden/indra/llcharacter/lltargetingmotion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -111,7 +111,7 @@ public: public: LLCharacter *mCharacter; - LLJointState mTorsoState; + LLPointer mTorsoState; LLJoint* mPelvisJoint; LLJoint* mTorsoJoint; LLJoint* mRightHandJoint; diff --git a/linden/indra/llcharacter/llvisualparam.cpp b/linden/indra/llcharacter/llvisualparam.cpp index d14664e..00b1072 100644 --- a/linden/indra/llcharacter/llvisualparam.cpp +++ b/linden/indra/llcharacter/llvisualparam.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcharacter/llvisualparam.h b/linden/indra/llcharacter/llvisualparam.h index 177d08c..41b8a05 100644 --- a/linden/indra/llcharacter/llvisualparam.h +++ b/linden/indra/llcharacter/llvisualparam.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/bitpack.h b/linden/indra/llcommon/bitpack.h index 89c3752..74e1d0d 100644 --- a/linden/indra/llcommon/bitpack.h +++ b/linden/indra/llcommon/bitpack.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/ctype_workaround.h b/linden/indra/llcommon/ctype_workaround.h index 3d0faaf..0b9acf9 100644 --- a/linden/indra/llcommon/ctype_workaround.h +++ b/linden/indra/llcommon/ctype_workaround.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/doublelinkedlist.h b/linden/indra/llcommon/doublelinkedlist.h index 4e5a871..ce2493f 100644 --- a/linden/indra/llcommon/doublelinkedlist.h +++ b/linden/indra/llcommon/doublelinkedlist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/files.lst b/linden/indra/llcommon/files.lst index f7bf5e3..6f03155 100644 --- a/linden/indra/llcommon/files.lst +++ b/linden/indra/llcommon/files.lst @@ -15,6 +15,7 @@ llcommon/llfile.cpp llcommon/llfixedbuffer.cpp llcommon/llformat.cpp llcommon/llframetimer.cpp +llcommon/lllog.cpp llcommon/llliveappconfig.cpp llcommon/lllivefile.cpp llcommon/llmemory.cpp diff --git a/linden/indra/llcommon/imageids.h b/linden/indra/llcommon/imageids.h index 43409ba..4a1e221 100644 --- a/linden/indra/llcommon/imageids.h +++ b/linden/indra/llcommon/imageids.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h index 75a83c6..6cb2e29 100644 --- a/linden/indra/llcommon/indra_constants.h +++ b/linden/indra/llcommon/indra_constants.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/linden_common.h b/linden/indra/llcommon/linden_common.h index 79c027e..01540c1 100644 --- a/linden/indra/llcommon/linden_common.h +++ b/linden/indra/llcommon/linden_common.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/linked_lists.h b/linden/indra/llcommon/linked_lists.h index ec168fc..5d5a707 100644 --- a/linden/indra/llcommon/linked_lists.h +++ b/linden/indra/llcommon/linked_lists.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llagentconstants.h b/linden/indra/llcommon/llagentconstants.h index 7c2a0ed..5757751 100644 --- a/linden/indra/llcommon/llagentconstants.h +++ b/linden/indra/llcommon/llagentconstants.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llapp.cpp b/linden/indra/llcommon/llapp.cpp index efb2ba6..5ae0727 100644 --- a/linden/indra/llcommon/llapp.cpp +++ b/linden/indra/llcommon/llapp.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llapp.h b/linden/indra/llcommon/llapp.h index 769c2b5..1a700cc 100644 --- a/linden/indra/llcommon/llapp.h +++ b/linden/indra/llcommon/llapp.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp index ca28ef0..a577cc7 100644 --- a/linden/indra/llcommon/llapr.cpp +++ b/linden/indra/llcommon/llapr.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llapr.h b/linden/indra/llcommon/llapr.h index 0389071..695b93e 100644 --- a/linden/indra/llcommon/llapr.h +++ b/linden/indra/llcommon/llapr.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llares.cpp b/linden/indra/llcommon/llares.cpp index ed42736..cf5ff18 100644 --- a/linden/indra/llcommon/llares.cpp +++ b/linden/indra/llcommon/llares.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llares.h b/linden/indra/llcommon/llares.h index 495a215..07957f1 100644 --- a/linden/indra/llcommon/llares.h +++ b/linden/indra/llcommon/llares.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llassettype.cpp b/linden/indra/llcommon/llassettype.cpp index db619b6..4b2a862 100644 --- a/linden/indra/llcommon/llassettype.cpp +++ b/linden/indra/llcommon/llassettype.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llassettype.h b/linden/indra/llcommon/llassettype.h index d18d509..f5ef05b 100644 --- a/linden/indra/llcommon/llassettype.h +++ b/linden/indra/llcommon/llassettype.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llassoclist.h b/linden/indra/llcommon/llassoclist.h index d289f03..78a332e 100644 --- a/linden/indra/llcommon/llassoclist.h +++ b/linden/indra/llcommon/llassoclist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llavatarconstants.h b/linden/indra/llcommon/llavatarconstants.h index 5278b31..98ce499 100644 --- a/linden/indra/llcommon/llavatarconstants.h +++ b/linden/indra/llcommon/llavatarconstants.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llbase32.cpp b/linden/indra/llcommon/llbase32.cpp index 3daf7ef..0212e1f 100644 --- a/linden/indra/llcommon/llbase32.cpp +++ b/linden/indra/llcommon/llbase32.cpp @@ -17,12 +17,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llbase32.h b/linden/indra/llcommon/llbase32.h index 7d4aad0..cb939d2 100644 --- a/linden/indra/llcommon/llbase32.h +++ b/linden/indra/llcommon/llbase32.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llbase64.cpp b/linden/indra/llcommon/llbase64.cpp index dffb953..950ce6e 100644 --- a/linden/indra/llcommon/llbase64.cpp +++ b/linden/indra/llcommon/llbase64.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llbase64.h b/linden/indra/llcommon/llbase64.h index c32a720..4101a23 100644 --- a/linden/indra/llcommon/llbase64.h +++ b/linden/indra/llcommon/llbase64.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llboost.h b/linden/indra/llcommon/llboost.h index 782c237..36f4daf 100644 --- a/linden/indra/llcommon/llboost.h +++ b/linden/indra/llcommon/llboost.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llchat.h b/linden/indra/llcommon/llchat.h index d8d33e7..a46b8aa 100644 --- a/linden/indra/llcommon/llchat.h +++ b/linden/indra/llcommon/llchat.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llclickaction.h b/linden/indra/llcommon/llclickaction.h index 2b95bae..20bfbfd 100644 --- a/linden/indra/llcommon/llclickaction.h +++ b/linden/indra/llcommon/llclickaction.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llcommon.cpp b/linden/indra/llcommon/llcommon.cpp index 27dd692..b21b687 100644 --- a/linden/indra/llcommon/llcommon.cpp +++ b/linden/indra/llcommon/llcommon.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llcommon.h b/linden/indra/llcommon/llcommon.h index 61a0901..4d99c3d 100644 --- a/linden/indra/llcommon/llcommon.h +++ b/linden/indra/llcommon/llcommon.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llcommon.vcproj b/linden/indra/llcommon/llcommon.vcproj index f16092b..6b4a0e8 100644 --- a/linden/indra/llcommon/llcommon.vcproj +++ b/linden/indra/llcommon/llcommon.vcproj @@ -214,6 +214,9 @@ RelativePath=".\lllivefile.cpp"> + + + + + + @@ -599,6 +603,10 @@ > + + diff --git a/linden/indra/llcommon/llcommon_vc9.vcproj b/linden/indra/llcommon/llcommon_vc9.vcproj new file mode 100644 index 0000000..752d13f --- /dev/null +++ b/linden/indra/llcommon/llcommon_vc9.vcproj @@ -0,0 +1,808 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llcommon/llcriticaldamp.cpp b/linden/indra/llcommon/llcriticaldamp.cpp index 456f591..2acd133 100644 --- a/linden/indra/llcommon/llcriticaldamp.cpp +++ b/linden/indra/llcommon/llcriticaldamp.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llcriticaldamp.h b/linden/indra/llcommon/llcriticaldamp.h index e6f31cf..7d9256c 100644 --- a/linden/indra/llcommon/llcriticaldamp.h +++ b/linden/indra/llcommon/llcriticaldamp.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lldarray.h b/linden/indra/llcommon/lldarray.h index 0068b57..9bffd63 100644 --- a/linden/indra/llcommon/lldarray.h +++ b/linden/indra/llcommon/lldarray.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lldarrayptr.h b/linden/indra/llcommon/lldarrayptr.h index 8fab4b9..108b7f6 100644 --- a/linden/indra/llcommon/lldarrayptr.h +++ b/linden/indra/llcommon/lldarrayptr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lldate.cpp b/linden/indra/llcommon/lldate.cpp index 6783a80..5d36d2b 100644 --- a/linden/indra/llcommon/lldate.cpp +++ b/linden/indra/llcommon/lldate.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lldate.h b/linden/indra/llcommon/lldate.h index e144052..8a929d9 100644 --- a/linden/indra/llcommon/lldate.h +++ b/linden/indra/llcommon/lldate.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lldefs.h b/linden/indra/llcommon/lldefs.h index 69bfaa7..d081245 100644 --- a/linden/indra/llcommon/lldefs.h +++ b/linden/indra/llcommon/lldefs.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -183,7 +183,15 @@ template inline LLDATATYPE llmax(const LLDATATYPE& d1, const LLDATATYPE& d2, const LLDATATYPE& d3) { LLDATATYPE r = llmax(d1,d2); - return (r > d3 ? r : d3); + return llmax(r, d3); +} + +template +inline LLDATATYPE llmax(const LLDATATYPE& d1, const LLDATATYPE& d2, const LLDATATYPE& d3, const LLDATATYPE& d4) +{ + LLDATATYPE r1 = llmax(d1,d2); + LLDATATYPE r2 = llmax(d3,d4); + return llmax(r1, r2); } template @@ -200,6 +208,14 @@ inline LLDATATYPE llmin(const LLDATATYPE& d1, const LLDATATYPE& d2, const LLDATA } template +inline LLDATATYPE llmin(const LLDATATYPE& d1, const LLDATATYPE& d2, const LLDATATYPE& d3, const LLDATATYPE& d4) +{ + LLDATATYPE r1 = llmin(d1,d2); + LLDATATYPE r2 = llmin(d3,d4); + return llmin(r1, r2); +} + +template inline LLDATATYPE llclamp(const LLDATATYPE& a, const LLDATATYPE& minval, const LLDATATYPE& maxval) { return llmin(llmax(a, minval), maxval); diff --git a/linden/indra/llcommon/lldepthstack.h b/linden/indra/llcommon/lldepthstack.h index 2be52f8..65492d2 100644 --- a/linden/indra/llcommon/lldepthstack.h +++ b/linden/indra/llcommon/lldepthstack.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lldlinked.h b/linden/indra/llcommon/lldlinked.h index 108b245..7278ee4 100644 --- a/linden/indra/llcommon/lldlinked.h +++ b/linden/indra/llcommon/lldlinked.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lldqueueptr.h b/linden/indra/llcommon/lldqueueptr.h index df543e8..248357e 100644 --- a/linden/indra/llcommon/lldqueueptr.h +++ b/linden/indra/llcommon/lldqueueptr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llendianswizzle.h b/linden/indra/llcommon/llendianswizzle.h index 0df4d65..0b101f9 100644 --- a/linden/indra/llcommon/llendianswizzle.h +++ b/linden/indra/llcommon/llendianswizzle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llenum.h b/linden/indra/llcommon/llenum.h index b73dfd3..1ec305f 100644 --- a/linden/indra/llcommon/llenum.h +++ b/linden/indra/llcommon/llenum.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llerror.cpp b/linden/indra/llcommon/llerror.cpp index 68383ce..d9ab57c 100644 --- a/linden/indra/llcommon/llerror.cpp +++ b/linden/indra/llcommon/llerror.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llerror.h b/linden/indra/llcommon/llerror.h index 16f6ad6..e1ace39 100644 --- a/linden/indra/llcommon/llerror.h +++ b/linden/indra/llcommon/llerror.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llerrorcontrol.h b/linden/indra/llcommon/llerrorcontrol.h index 5cd7547..2c36871 100644 --- a/linden/indra/llcommon/llerrorcontrol.h +++ b/linden/indra/llcommon/llerrorcontrol.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llerrorlegacy.h b/linden/indra/llcommon/llerrorlegacy.h index e6388b0..e88b09c 100644 --- a/linden/indra/llcommon/llerrorlegacy.h +++ b/linden/indra/llcommon/llerrorlegacy.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llerrorthread.cpp b/linden/indra/llcommon/llerrorthread.cpp index 9622628..d6fed78 100644 --- a/linden/indra/llcommon/llerrorthread.cpp +++ b/linden/indra/llcommon/llerrorthread.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llerrorthread.h b/linden/indra/llcommon/llerrorthread.h index 09bb8a8..f0865e1 100644 --- a/linden/indra/llcommon/llerrorthread.h +++ b/linden/indra/llcommon/llerrorthread.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llevent.cpp b/linden/indra/llcommon/llevent.cpp index 78fb4d7..33af028 100644 --- a/linden/indra/llcommon/llevent.cpp +++ b/linden/indra/llcommon/llevent.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llevent.h b/linden/indra/llcommon/llevent.h index 5a24d09..83cb79f 100644 --- a/linden/indra/llcommon/llevent.h +++ b/linden/indra/llcommon/llevent.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -179,7 +179,7 @@ public: if (mDispatcher.notNull()) mDispatcher->removeListener(listener); } // Notifies the dispatcher of an event being fired. - void fireEvent(LLPointer event, LLSD filter); + void fireEvent(LLPointer event, LLSD filter = LLSD()); protected: LLPointer mDispatcher; diff --git a/linden/indra/llcommon/lleventemitter.h b/linden/indra/llcommon/lleventemitter.h index 0d7c84b..cdd3932 100644 --- a/linden/indra/llcommon/lleventemitter.h +++ b/linden/indra/llcommon/lleventemitter.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llextendedstatus.h b/linden/indra/llcommon/llextendedstatus.h index 93259da..5bd9856 100644 --- a/linden/indra/llcommon/llextendedstatus.h +++ b/linden/indra/llcommon/llextendedstatus.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llfasttimer.cpp b/linden/indra/llcommon/llfasttimer.cpp index 19e42e2..01db945 100644 --- a/linden/indra/llcommon/llfasttimer.cpp +++ b/linden/indra/llcommon/llfasttimer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llfasttimer.h b/linden/indra/llcommon/llfasttimer.h index 62383fa..b953960 100644 --- a/linden/indra/llcommon/llfasttimer.h +++ b/linden/indra/llcommon/llfasttimer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp index fb73b9b..38157df 100644 --- a/linden/indra/llcommon/llfile.cpp +++ b/linden/indra/llcommon/llfile.cpp @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llfile.h b/linden/indra/llcommon/llfile.h index 6e90168..062b183 100644 --- a/linden/indra/llcommon/llfile.h +++ b/linden/indra/llcommon/llfile.h @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llfixedbuffer.cpp b/linden/indra/llcommon/llfixedbuffer.cpp index 448846b..776de0d 100644 --- a/linden/indra/llcommon/llfixedbuffer.cpp +++ b/linden/indra/llcommon/llfixedbuffer.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llfixedbuffer.h b/linden/indra/llcommon/llfixedbuffer.h index c044ed8..06a7f45 100644 --- a/linden/indra/llcommon/llfixedbuffer.h +++ b/linden/indra/llcommon/llfixedbuffer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llformat.cpp b/linden/indra/llcommon/llformat.cpp index 8e5a549..8a8c699 100644 --- a/linden/indra/llcommon/llformat.cpp +++ b/linden/indra/llcommon/llformat.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llformat.h b/linden/indra/llcommon/llformat.h index a3e4f6a..52eca0b 100644 --- a/linden/indra/llcommon/llformat.h +++ b/linden/indra/llcommon/llformat.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llframetimer.cpp b/linden/indra/llcommon/llframetimer.cpp index af46f96..9de3be2 100644 --- a/linden/indra/llcommon/llframetimer.cpp +++ b/linden/indra/llcommon/llframetimer.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llframetimer.h b/linden/indra/llcommon/llframetimer.h index 915f1d4..bc0d79d 100644 --- a/linden/indra/llcommon/llframetimer.h +++ b/linden/indra/llcommon/llframetimer.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llhash.h b/linden/indra/llcommon/llhash.h index a86a2d5..716d9df 100644 --- a/linden/indra/llcommon/llhash.h +++ b/linden/indra/llcommon/llhash.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llindexedqueue.h b/linden/indra/llcommon/llindexedqueue.h index 35d30e4..d15417b 100644 --- a/linden/indra/llcommon/llindexedqueue.h +++ b/linden/indra/llcommon/llindexedqueue.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llkeythrottle.h b/linden/indra/llcommon/llkeythrottle.h index 26009bb..c2dc9d2 100644 --- a/linden/indra/llcommon/llkeythrottle.h +++ b/linden/indra/llcommon/llkeythrottle.h @@ -1,17 +1,26 @@ /** * @file llkeythrottle.h - * @brief LLKeyThrottle class definition * - * $LicenseInfo:firstyear=2005&license=internal$ + * $LicenseInfo:firstyear=2005&license=viewergpl$ * * Copyright (c) 2005-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, @@ -34,11 +43,16 @@ #include +// forward declaration so LLKeyThrottleImpl can befriend it +template class LLKeyThrottle; + + // Implementation utility class - use LLKeyThrottle, not this template class LLKeyThrottleImpl { -public: + friend class LLKeyThrottle; +protected: struct Entry { U32 count; BOOL blocked; @@ -60,7 +74,9 @@ public: // currMap started counting at this time // prevMap covers the previous interval - LLKeyThrottleImpl() : prevMap(0), currMap(0) { } + LLKeyThrottleImpl() : prevMap(0), currMap(0), + countLimit(0), interval_usec(0), + start_usec(0) { }; static U64 getTime() { diff --git a/linden/indra/llcommon/lllinkedqueue.h b/linden/indra/llcommon/lllinkedqueue.h index 7e2a5ab..aa64ac6 100644 --- a/linden/indra/llcommon/lllinkedqueue.h +++ b/linden/indra/llcommon/lllinkedqueue.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llliveappconfig.cpp b/linden/indra/llcommon/llliveappconfig.cpp index 8967e9e..ad11987 100644 --- a/linden/indra/llcommon/llliveappconfig.cpp +++ b/linden/indra/llcommon/llliveappconfig.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llliveappconfig.h b/linden/indra/llcommon/llliveappconfig.h index 2a29c04..fc845db 100644 --- a/linden/indra/llcommon/llliveappconfig.h +++ b/linden/indra/llcommon/llliveappconfig.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lllivefile.cpp b/linden/indra/llcommon/lllivefile.cpp index 3e45684..6e027ef 100644 --- a/linden/indra/llcommon/lllivefile.cpp +++ b/linden/indra/llcommon/lllivefile.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lllivefile.h b/linden/indra/llcommon/lllivefile.h index ef37095..1d55f7b 100644 --- a/linden/indra/llcommon/lllivefile.h +++ b/linden/indra/llcommon/lllivefile.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lllocalidhashmap.h b/linden/indra/llcommon/lllocalidhashmap.h index 091e217..ced83a1 100644 --- a/linden/indra/llcommon/lllocalidhashmap.h +++ b/linden/indra/llcommon/lllocalidhashmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lllog.cpp b/linden/indra/llcommon/lllog.cpp new file mode 100644 index 0000000..147b2d3 --- /dev/null +++ b/linden/indra/llcommon/lllog.cpp @@ -0,0 +1,115 @@ +/** + * @file lllog.cpp + * @author Don + * @date 2007-11-27 + * @brief Class to log messages to syslog for streambase to process. + * + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007-2008, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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. + * $/LicenseInfo$ + */ + +#include "linden_common.h" +#include "lllog.h" + +#include "llapp.h" +#include "llsd.h" +#include "llsdserialize.h" + + +class LLLogImpl +{ +public: + LLLogImpl(LLApp* app) : mApp(app) {} + ~LLLogImpl() {} + + void log(const std::string message, LLSD& info); + bool useLegacyLogMessage(const std::string message); + +private: + LLApp* mApp; +}; + + +//@brief Function to log a message to syslog for streambase to collect. +void LLLogImpl::log(const std::string message, LLSD& info) +{ + static S32 sequence = 0; + LLSD log_config = mApp->getOption("log-messages"); + if (log_config.has(message)) + { + LLSD message_config = log_config[message]; + if (message_config.has("use-syslog")) + { + if (! message_config["use-syslog"].asBoolean()) + { + return; + } + } + } + llinfos << "LLLOGMESSAGE (" << (sequence++) << ") " << message << " " << LLSDNotationStreamer(info) << llendl; +} + +//@brief Function to check if specified legacy log message should be sent. +bool LLLogImpl::useLegacyLogMessage(const std::string message) +{ + LLSD log_config = mApp->getOption("log-messages"); + if (log_config.has(message)) + { + LLSD message_config = log_config[message]; + if (message_config.has("use-legacy")) + { + return message_config["use-legacy"].asBoolean(); + } + } + return true; +} + + +LLLog::LLLog(LLApp* app) +{ + mImpl = new LLLogImpl(app); +} + +LLLog::~LLLog() +{ + delete mImpl; + mImpl = NULL; +} + +void LLLog::log(const std::string message, LLSD& info) +{ + if (mImpl) mImpl->log(message, info); +} + +bool LLLog::useLegacyLogMessage(const std::string message) +{ + if (mImpl) + { + return mImpl->useLegacyLogMessage(message); + } + return true; +} + diff --git a/linden/indra/llcommon/lllog.h b/linden/indra/llcommon/lllog.h new file mode 100644 index 0000000..a852a39 --- /dev/null +++ b/linden/indra/llcommon/lllog.h @@ -0,0 +1,57 @@ +/** + * @file lllog.h + * @author Don + * @date 2007-11-27 + * @brief Class to log messages to syslog for streambase to process. + * + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007-2008, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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. + * $/LicenseInfo$ + */ + +#ifndef LL_LLLOG_H +#define LL_LLLOG_H + +#include + +class LLLogImpl; +class LLApp; +class LLSD; + +class LLLog +{ +public: + LLLog(LLApp* app); + virtual ~LLLog(); + + virtual void log(const std::string message, LLSD& info); + virtual bool useLegacyLogMessage(const std::string message); + +private: + LLLogImpl* mImpl; +}; + +#endif /* LL_LLLOG_H */ + diff --git a/linden/indra/llcommon/lllslconstants.h b/linden/indra/llcommon/lllslconstants.h index f6157c4..ba39098 100644 --- a/linden/indra/llcommon/lllslconstants.h +++ b/linden/indra/llcommon/lllslconstants.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmap.h b/linden/indra/llcommon/llmap.h index d26ad0f..5f74d22 100644 --- a/linden/indra/llcommon/llmap.h +++ b/linden/indra/llcommon/llmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmemory.cpp b/linden/indra/llcommon/llmemory.cpp index 2df7071..0f08877 100644 --- a/linden/indra/llcommon/llmemory.cpp +++ b/linden/indra/llcommon/llmemory.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmemory.h b/linden/indra/llcommon/llmemory.h index 1819745..8a3ca0b 100644 --- a/linden/indra/llcommon/llmemory.h +++ b/linden/indra/llcommon/llmemory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmemorystream.cpp b/linden/indra/llcommon/llmemorystream.cpp index bb1ac26..bcb1874 100644 --- a/linden/indra/llcommon/llmemorystream.cpp +++ b/linden/indra/llcommon/llmemorystream.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmemorystream.h b/linden/indra/llcommon/llmemorystream.h index b2c5726..3d5e6db 100644 --- a/linden/indra/llcommon/llmemorystream.h +++ b/linden/indra/llcommon/llmemorystream.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmemtype.h b/linden/indra/llcommon/llmemtype.h index 0dba663..df228a6 100644 --- a/linden/indra/llcommon/llmemtype.h +++ b/linden/indra/llcommon/llmemtype.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmetrics.cpp b/linden/indra/llcommon/llmetrics.cpp index 4f01636..7cdcff4 100644 --- a/linden/indra/llcommon/llmetrics.cpp +++ b/linden/indra/llcommon/llmetrics.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmetrics.h b/linden/indra/llcommon/llmetrics.h index 07121c8..bfde659 100644 --- a/linden/indra/llcommon/llmetrics.h +++ b/linden/indra/llcommon/llmetrics.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llmortician.cpp b/linden/indra/llcommon/llmortician.cpp index 9341dc1..4d449ff 100644 --- a/linden/indra/llcommon/llmortician.cpp +++ b/linden/indra/llcommon/llmortician.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -33,20 +33,20 @@ #include -std::list gGraveyard; +std::list LLMortician::sGraveyard; BOOL LLMortician::sDestroyImmediate = FALSE; LLMortician::~LLMortician() { - gGraveyard.remove(this); + sGraveyard.remove(this); } void LLMortician::updateClass() { - while (!gGraveyard.empty()) + while (!sGraveyard.empty()) { - LLMortician* dead = gGraveyard.front(); + LLMortician* dead = sGraveyard.front(); delete dead; } } @@ -56,7 +56,7 @@ void LLMortician::die() // It is valid to call die() more than once on something that hasn't died yet if (sDestroyImmediate) { - // *NOTE: This is a hack to ensure destruction order on shutdown. + // *NOTE: This is a hack to ensure destruction order on shutdown (relative to non-mortician controlled classes). mIsDead = TRUE; delete this; return; @@ -64,7 +64,7 @@ void LLMortician::die() else if (!mIsDead) { mIsDead = TRUE; - gGraveyard.push_back(this); + sGraveyard.push_back(this); } } diff --git a/linden/indra/llcommon/llmortician.h b/linden/indra/llcommon/llmortician.h index 3a35513..5aed8bf 100644 --- a/linden/indra/llcommon/llmortician.h +++ b/linden/indra/llcommon/llmortician.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,6 +50,8 @@ private: static BOOL sDestroyImmediate; BOOL mIsDead; + + static std::list sGraveyard; }; #endif diff --git a/linden/indra/llcommon/llnametable.h b/linden/indra/llcommon/llnametable.h index 7b8e295..16b9358 100644 --- a/linden/indra/llcommon/llnametable.h +++ b/linden/indra/llcommon/llnametable.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llpreprocessor.h b/linden/indra/llcommon/llpreprocessor.h index bb07f5d..8bcad34 100644 --- a/linden/indra/llcommon/llpreprocessor.h +++ b/linden/indra/llcommon/llpreprocessor.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llpriqueuemap.h b/linden/indra/llcommon/llpriqueuemap.h index d48db47..ad79683 100644 --- a/linden/indra/llcommon/llpriqueuemap.h +++ b/linden/indra/llcommon/llpriqueuemap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llprocessor.cpp b/linden/indra/llcommon/llprocessor.cpp index eb136f5..d67a9c4 100644 --- a/linden/indra/llcommon/llprocessor.cpp +++ b/linden/indra/llcommon/llprocessor.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llprocessor.h b/linden/indra/llcommon/llprocessor.h index 6c2b431..a188b1a 100644 --- a/linden/indra/llcommon/llprocessor.h +++ b/linden/indra/llcommon/llprocessor.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llptrskiplist.h b/linden/indra/llcommon/llptrskiplist.h index 52473bb..df35d30 100644 --- a/linden/indra/llcommon/llptrskiplist.h +++ b/linden/indra/llcommon/llptrskiplist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llptrskipmap.h b/linden/indra/llcommon/llptrskipmap.h index 82cddf1..b369d77 100644 --- a/linden/indra/llcommon/llptrskipmap.h +++ b/linden/indra/llcommon/llptrskipmap.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llqueuedthread.cpp b/linden/indra/llcommon/llqueuedthread.cpp index c964e7a..67ce9a2 100644 --- a/linden/indra/llcommon/llqueuedthread.cpp +++ b/linden/indra/llcommon/llqueuedthread.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llqueuedthread.h b/linden/indra/llcommon/llqueuedthread.h index 8ad2251..e3c9c5c 100644 --- a/linden/indra/llcommon/llqueuedthread.h +++ b/linden/indra/llcommon/llqueuedthread.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llrun.cpp b/linden/indra/llcommon/llrun.cpp index 100d65f..d13b863 100644 --- a/linden/indra/llcommon/llrun.cpp +++ b/linden/indra/llcommon/llrun.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llrun.h b/linden/indra/llcommon/llrun.h index 2a8c0e2..443eb41 100644 --- a/linden/indra/llcommon/llrun.h +++ b/linden/indra/llcommon/llrun.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llsd.cpp b/linden/indra/llcommon/llsd.cpp index a6e504a..fa0531b 100644 --- a/linden/indra/llcommon/llsd.cpp +++ b/linden/indra/llcommon/llsd.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -35,6 +35,7 @@ #include "llerror.h" #include "../llmath/llmath.h" #include "llformat.h" +#include "llsdserialize.h" #ifndef LL_RELEASE_FOR_DOWNLOAD #define NAME_UNNAMED_NAMESPACE @@ -765,6 +766,44 @@ const LLSD& LLSD::operator[](Integer i) const U32 LLSD::allocationCount() { return Impl::sAllocationCount; } U32 LLSD::outstandingCount() { return Impl::sOutstandingCount; } +static const char *llsd_dump(const LLSD &llsd, bool useXMLFormat) +{ + // sStorage is used to hold the string representation of the llsd last + // passed into this function. If this function is never called (the + // normal case when not debugging), nothing is allocated. Otherwise + // sStorage will point to the result of the last call. This will actually + // be one leak, but since this is used only when running under the + // debugger, it should not be an issue. + static char *sStorage = NULL; + delete[] sStorage; + std::string out_string; + { + std::ostringstream out; + if (useXMLFormat) + out << LLSDXMLStreamer(llsd); + else + out << LLSDNotationStreamer(llsd); + out_string = out.str(); + } + int len = out_string.length(); + sStorage = new char[len + 1]; + memcpy(sStorage, out_string.c_str(), len); + sStorage[len] = '\0'; + return sStorage; +} + +/// Returns XML version of llsd -- only to be called from debugger +const char *LLSD::dumpXML(const LLSD &llsd) +{ + return llsd_dump(llsd, true); +} + +/// Returns Notation version of llsd -- only to be called from debugger +const char *LLSD::dump(const LLSD &llsd) +{ + return llsd_dump(llsd, false); +} + LLSD::map_iterator LLSD::beginMap() { return makeMap(impl).beginMap(); } LLSD::map_iterator LLSD::endMap() { return makeMap(impl).endMap(); } LLSD::map_const_iterator LLSD::beginMap() const { return safe(impl).beginMap(); } diff --git a/linden/indra/llcommon/llsd.h b/linden/indra/llcommon/llsd.h index e9e5a7f..3f53735 100644 --- a/linden/indra/llcommon/llsd.h +++ b/linden/indra/llcommon/llsd.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -331,6 +331,16 @@ public: static U32 allocationCount(); ///< how many Impls have been made static U32 outstandingCount(); ///< how many Impls are still alive //@} + +private: + /** @name Debugging Interface */ + //@{ + /// Returns XML version of llsd -- only to be called from debugger + static const char *dumpXML(const LLSD &llsd); + + /// Returns Notation version of llsd -- only to be called from debugger + static const char *dump(const LLSD &llsd); + //@} }; struct llsd_select_bool : public std::unary_function diff --git a/linden/indra/llcommon/llsdserialize.cpp b/linden/indra/llcommon/llsdserialize.cpp index e17e73e..7813cf0 100644 --- a/linden/indra/llcommon/llsdserialize.cpp +++ b/linden/indra/llcommon/llsdserialize.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llsdserialize.h b/linden/indra/llcommon/llsdserialize.h index f3fc54e..e1e81d5 100644 --- a/linden/indra/llcommon/llsdserialize.h +++ b/linden/indra/llcommon/llsdserialize.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp index 4537aeb..b8adcf1 100644 --- a/linden/indra/llcommon/llsdserialize_xml.cpp +++ b/linden/indra/llcommon/llsdserialize_xml.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llsdserialize_xml.h b/linden/indra/llcommon/llsdserialize_xml.h index c793a4e..454d3d1 100644 --- a/linden/indra/llcommon/llsdserialize_xml.h +++ b/linden/indra/llcommon/llsdserialize_xml.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llsdutil.cpp b/linden/indra/llcommon/llsdutil.cpp index c4be282..d1ccce0 100644 --- a/linden/indra/llcommon/llsdutil.cpp +++ b/linden/indra/llcommon/llsdutil.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -301,3 +301,123 @@ char* ll_pretty_print_sd(const LLSD& sd) buffer[bufferSize - 1] = '\0'; return buffer; } + +//compares the structure of an LLSD to a template LLSD and stores the +//"valid" values in a 3rd LLSD. Default values are stored in the template +// +//If the llsd to test has a specific key to a map and the values +//are not of the same type, false is returned or if the LLSDs are not +//of the same value. Ordering of arrays matters +//Otherwise, returns true +BOOL compare_llsd_with_template( + const LLSD& llsd_to_test, + const LLSD& template_llsd, + LLSD& resultant_llsd) +{ + if ( + llsd_to_test.isUndefined() && + template_llsd.isDefined() ) + { + resultant_llsd = template_llsd; + return TRUE; + } + else if ( llsd_to_test.type() != template_llsd.type() ) + { + resultant_llsd = LLSD(); + return FALSE; + } + + if ( llsd_to_test.isArray() ) + { + //they are both arrays + //we loop over all the items in the template + //verifying that the to_test has a subset (in the same order) + //any shortcoming in the testing_llsd are just taken + //to be the rest of the template + LLSD data; + LLSD::array_const_iterator test_iter; + LLSD::array_const_iterator template_iter; + + resultant_llsd = LLSD::emptyArray(); + test_iter = llsd_to_test.beginArray(); + + for ( + template_iter = template_llsd.beginArray(); + (template_iter != template_llsd.endArray() && + test_iter != llsd_to_test.endArray()); + ++template_iter) + { + if ( !compare_llsd_with_template( + *test_iter, + *template_iter, + data) ) + { + resultant_llsd = LLSD(); + return FALSE; + } + else + { + resultant_llsd.append(data); + } + + ++test_iter; + } + + //so either the test or the template ended + //we do another loop now to the end of the template + //grabbing the default values + for (; + template_iter != template_llsd.endArray(); + ++template_iter) + { + resultant_llsd.append(*template_iter); + } + } + else if ( llsd_to_test.isMap() ) + { + //now we loop over the keys of the two maps + //any excess is taken from the template + //excess is ignored in the test + LLSD value; + LLSD::map_const_iterator template_iter; + + resultant_llsd = LLSD::emptyMap(); + for ( + template_iter = template_llsd.beginMap(); + template_iter != template_llsd.endMap(); + ++template_iter) + { + if ( llsd_to_test.has(template_iter->first) ) + { + //the test LLSD has the same key + if ( !compare_llsd_with_template( + llsd_to_test[template_iter->first], + template_iter->second, + value) ) + { + resultant_llsd = LLSD(); + return FALSE; + } + else + { + resultant_llsd[template_iter->first] = value; + } + } + else + { + //test llsd doesn't have it...take the + //template as default value + resultant_llsd[template_iter->first] = + template_iter->second; + } + } + } + else + { + //of same type...take the test llsd's value + resultant_llsd = llsd_to_test; + } + + + return TRUE; +} diff --git a/linden/indra/llcommon/llsdutil.h b/linden/indra/llcommon/llsdutil.h index da6b9a2..c058185 100644 --- a/linden/indra/llcommon/llsdutil.h +++ b/linden/indra/llcommon/llsdutil.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -91,4 +91,14 @@ char* ll_print_sd(const LLSD& sd); // Serializes sd to static buffer and returns pointer, using "pretty printing" mode. char* ll_pretty_print_sd(const LLSD& sd); +//compares the structure of an LLSD to a template LLSD and stores the +//"valid" values in a 3rd LLSD. Default values +//are pulled from the template. Ordering of arrays matters +//Returns false if the test is of same type but values differ in type +//Otherwise, returns true +BOOL compare_llsd_with_template( + const LLSD& llsd_to_test, + const LLSD& template_llsd, + LLSD& resultant_llsd); + #endif // LL_LLSDUTIL_H diff --git a/linden/indra/llcommon/llsecondlifeurls.cpp b/linden/indra/llcommon/llsecondlifeurls.cpp index 4ec52b4..46b8cde 100644 --- a/linden/indra/llcommon/llsecondlifeurls.cpp +++ b/linden/indra/llcommon/llsecondlifeurls.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -62,6 +62,9 @@ const char AMD_AGP_URL[] = const char VIA_URL[] = "http://secondlife.com/support/"; +const char SUPPORT_URL[] = + "http://secondlife.com/support/"; + const char INTEL_CHIPSET_URL[] = "http://secondlife.com/support/"; diff --git a/linden/indra/llcommon/llsecondlifeurls.h b/linden/indra/llcommon/llsecondlifeurls.h index 7388306..3fe086a 100644 --- a/linden/indra/llcommon/llsecondlifeurls.h +++ b/linden/indra/llcommon/llsecondlifeurls.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -57,6 +57,9 @@ extern const char DIRECTX_9_URL[]; // Out of date VIA chipset extern const char VIA_URL[]; +// Support URL +extern const char SUPPORT_URL[]; + // Linden Blogs page extern const char BLOGS_URL[]; diff --git a/linden/indra/llcommon/llsimplehash.h b/linden/indra/llcommon/llsimplehash.h index 44ec37f..f3b5fe8 100644 --- a/linden/indra/llcommon/llsimplehash.h +++ b/linden/indra/llcommon/llsimplehash.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llskiplist.h b/linden/indra/llcommon/llskiplist.h index 182b165..78e6f0a 100644 --- a/linden/indra/llcommon/llskiplist.h +++ b/linden/indra/llcommon/llskiplist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llskipmap.h b/linden/indra/llcommon/llskipmap.h index d8030e9..350bebd 100644 --- a/linden/indra/llcommon/llskipmap.h +++ b/linden/indra/llcommon/llskipmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstack.h b/linden/indra/llcommon/llstack.h index 24c29cd..ffd5875 100644 --- a/linden/indra/llcommon/llstack.h +++ b/linden/indra/llcommon/llstack.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstat.cpp b/linden/indra/llcommon/llstat.cpp index e7bfb20..11e4c64 100644 --- a/linden/indra/llcommon/llstat.cpp +++ b/linden/indra/llcommon/llstat.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstat.h b/linden/indra/llcommon/llstat.h index e09952f..a0a86e6 100644 --- a/linden/indra/llcommon/llstat.h +++ b/linden/indra/llcommon/llstat.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstatenums.h b/linden/indra/llcommon/llstatenums.h index a41b789..6fa61e1 100644 --- a/linden/indra/llcommon/llstatenums.h +++ b/linden/indra/llcommon/llstatenums.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstl.h b/linden/indra/llcommon/llstl.h index 5828649..2719888 100644 --- a/linden/indra/llcommon/llstl.h +++ b/linden/indra/llcommon/llstl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstreamtools.cpp b/linden/indra/llcommon/llstreamtools.cpp index d3f5803..5419b24 100644 --- a/linden/indra/llcommon/llstreamtools.cpp +++ b/linden/indra/llcommon/llstreamtools.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstreamtools.h b/linden/indra/llcommon/llstreamtools.h index f3af931..0114e4c 100644 --- a/linden/indra/llcommon/llstreamtools.h +++ b/linden/indra/llcommon/llstreamtools.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstrider.h b/linden/indra/llcommon/llstrider.h index 2c6f3d0..c29c09b 100644 --- a/linden/indra/llcommon/llstrider.h +++ b/linden/indra/llcommon/llstrider.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp index b99121e..73c80e7 100644 --- a/linden/indra/llcommon/llstring.cpp +++ b/linden/indra/llcommon/llstring.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -246,6 +246,84 @@ LLWString utf16str_to_wstring(const llutf16string &utf16str) return utf16str_to_wstring(utf16str, len); } +// Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string. +S32 utf16str_wstring_length(const llutf16string &utf16str, const S32 utf16_len) +{ + S32 surrogate_pairs = 0; + // ... craziness to make gcc happy (llutf16string.c_str() is tweaked on linux): + const U16 *const utf16_chars = &(*(utf16str.begin())); + S32 i = 0; + while (i < utf16_len) + { + const U16 c = utf16_chars[i++]; + if (c >= 0xD800 && c <= 0xDBFF) // See http://en.wikipedia.org/wiki/UTF-16 + { // Have first byte of a surrogate pair + if (i >= utf16_len) + { + break; + } + const U16 d = utf16_chars[i]; + if (d >= 0xDC00 && d <= 0xDFFF) + { // Have valid second byte of a surrogate pair + surrogate_pairs++; + i++; + } + } + } + return utf16_len - surrogate_pairs; +} + +// Length in utf16string (UTF-16) of wlen wchars beginning at woffset. +S32 wstring_utf16_length(const LLWString &wstr, const S32 woffset, const S32 wlen) +{ + const S32 end = llmin((S32)wstr.length(), woffset + wlen); + if (end < woffset) + { + return 0; + } + else + { + S32 length = end - woffset; + for (S32 i = woffset; i < end; i++) + { + if (wstr[i] >= 0x10000) + { + length++; + } + } + return length; + } +} + +// Given a wstring and an offset in it, returns the length as wstring (i.e., +// number of llwchars) of the longest substring that starts at the offset +// and whose equivalent utf-16 string does not exceeds the given utf16_length. +S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, const S32 woffset, const S32 utf16_length, BOOL *unaligned) +{ + const S32 end = wstr.length(); + BOOL u = FALSE; + S32 n = woffset + utf16_length; + S32 i = woffset; + while (i < end) + { + if (wstr[i] >= 0x10000) + { + --n; + } + if (i >= n) + { + u = (i > n); + break; + } + i++; + } + if (unaligned) + { + *unaligned = u; + } + return i - woffset; +} + S32 wchar_utf8_length(const llwchar wc) { if (wc < 0x80) diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index cd58d11..82ebdc9 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -299,6 +299,10 @@ public: // a.k.a. strdictcmp() static S32 compareDict(const std::basic_string& a, const std::basic_string& b); + // Case *in*sensitive comparison with good handling of numbers. Does not use current locale. + // a.k.a. strdictcmp() + static S32 compareDictInsensitive(const std::basic_string& a, const std::basic_string& b); + // Puts compareDict() in a form appropriate for LL container classes to use for sorting. static BOOL precedesDict( const std::basic_string& a, const std::basic_string& b ); @@ -310,7 +314,7 @@ public: // Copies src into dst at a given offset. static void copyInto(std::basic_string& dst, const std::basic_string& src, size_type offset); -#ifdef _DEBUG +#ifdef _DEBUG static void testHarness(); #endif @@ -433,6 +437,15 @@ S32 wchar_utf8_length(const llwchar wc); std::string utf8str_tolower(const std::string& utf8str); +// Length in llwchar (UTF-32) of the first len units (16 bits) of the given UTF-16 string. +S32 utf16str_wstring_length(const llutf16string &utf16str, S32 len); + +// Length in utf16string (UTF-16) of wlen wchars beginning at woffset. +S32 wstring_utf16_length(const LLWString & wstr, S32 woffset, S32 wlen); + +// Length in wstring (i.e., llwchar count) of a part of a wstring specified by utf16 length (i.e., utf16 units.) +S32 wstring_wstring_length_from_utf16_length(const LLWString & wstr, S32 woffset, S32 utf16_length, BOOL *unaligned = NULL); + /** * @brief Properly truncate a utf8 string to a maximum byte count. * @@ -440,7 +453,7 @@ std::string utf8str_tolower(const std::string& utf8str); * happens in the middle of a glyph. If max_len is longer than the * string passed in, the return value == utf8str. * @param utf8str A valid utf8 string to truncate. - * @param max_len The maximum number of bytes in the returne + * @param max_len The maximum number of bytes in the return value. * @return Returns a valid utf8 string with byte count <= max_len. */ std::string utf8str_truncate(const std::string& utf8str, const S32 max_len); @@ -699,6 +712,39 @@ S32 LLStringBase::compareDict(const std::basic_string& astr, const std::ba return ca-cb; } +template +S32 LLStringBase::compareDictInsensitive(const std::basic_string& astr, const std::basic_string& bstr) +{ + const T* a = astr.c_str(); + const T* b = bstr.c_str(); + T ca, cb; + S32 ai, bi, cnt = 0; + + ca = *(a++); + cb = *(b++); + while( ca && cb ){ + if( LLStringOps::isUpper(ca) ){ ca = LLStringOps::toLower(ca); } + if( LLStringOps::isUpper(cb) ){ cb = LLStringOps::toLower(cb); } + if( LLStringOps::isDigit(ca) ){ + if( cnt-->0 ){ + if( cb!=ca ) break; + }else{ + if( !LLStringOps::isDigit(cb) ) break; + for(ai=0; LLStringOps::isDigit(a[ai]); ai++); + for(bi=0; LLStringOps::isDigit(b[bi]); bi++); + if( ai diff --git a/linden/indra/llcommon/llstringtable.cpp b/linden/indra/llcommon/llstringtable.cpp index a800b1d..c2de6f7 100644 --- a/linden/indra/llcommon/llstringtable.cpp +++ b/linden/indra/llcommon/llstringtable.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llstringtable.h b/linden/indra/llcommon/llstringtable.h index da6f172..4e8f7b7 100644 --- a/linden/indra/llcommon/llstringtable.h +++ b/linden/indra/llcommon/llstringtable.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp index 544eee4..2a6e466 100644 --- a/linden/indra/llcommon/llsys.cpp +++ b/linden/indra/llcommon/llsys.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llsys.h b/linden/indra/llcommon/llsys.h index aacac83..da7f07e 100644 --- a/linden/indra/llcommon/llsys.h +++ b/linden/indra/llcommon/llsys.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llthread.cpp b/linden/indra/llcommon/llthread.cpp index bff2eb5..c0e92ca 100644 --- a/linden/indra/llcommon/llthread.cpp +++ b/linden/indra/llcommon/llthread.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llthread.h b/linden/indra/llcommon/llthread.h index 318170e..5c71c34 100644 --- a/linden/indra/llcommon/llthread.h +++ b/linden/indra/llcommon/llthread.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lltimer.cpp b/linden/indra/llcommon/lltimer.cpp index 5d30ec3..a421dce 100644 --- a/linden/indra/llcommon/lltimer.cpp +++ b/linden/indra/llcommon/lltimer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lltimer.h b/linden/indra/llcommon/lltimer.h index b40e342..bd4c274 100644 --- a/linden/indra/llcommon/lltimer.h +++ b/linden/indra/llcommon/lltimer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/lluri.cpp b/linden/indra/llcommon/lluri.cpp index 536d5b9..7db8f3b 100644 --- a/linden/indra/llcommon/lluri.cpp +++ b/linden/indra/llcommon/lluri.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -43,28 +43,68 @@ // system includes #include +void encode_character(std::ostream& ostr, std::string::value_type val) +{ + ostr << "%" << std::uppercase << std::hex << std::setw(2) << std::setfill('0') + // VWR-4010 Cannot cast to U32 because sign-extension on + // chars > 128 will result in FFFFFFC3 instead of F3. + << static_cast(static_cast(val)); +} + // static -std::string LLURI::escape(const std::string& str, const std::string & allowed) +std::string LLURI::escape( + const std::string& str, + const std::string& allowed, + bool is_allowed_sorted) { - std::ostringstream ostr; + // *NOTE: This size determination feels like a good value to + // me. If someone wante to come up with a more precise heuristic + // with some data to back up the assertion that 'sort is good' + // then feel free to change this test a bit. + if(!is_allowed_sorted && (str.size() > 2 * allowed.size())) + { + // if it's already sorted, or if the url is quite long, we + // want to optimize this process. + std::string sorted_allowed(allowed); + std::sort(sorted_allowed.begin(), sorted_allowed.end()); + return escape(str, sorted_allowed, true); + } + std::ostringstream ostr; std::string::const_iterator it = str.begin(); std::string::const_iterator end = str.end(); - for(; it != end; ++it) + std::string::value_type c; + if(is_allowed_sorted) { - std::string::value_type c = *it; - if(allowed.find(c) == std::string::npos) - { - ostr << "%" - << std::uppercase << std::hex << std::setw(2) << std::setfill('0') - // VWR-4010 Cannot cast to U32 because sign-extension on - // chars > 128 will result in FFFFFFC3 instead of F3. - << static_cast(static_cast(c)); - } - else - { - ostr << c; - } + std::string::const_iterator allowed_begin(allowed.begin()); + std::string::const_iterator allowed_end(allowed.end()); + for(; it != end; ++it) + { + c = *it; + if(std::binary_search(allowed_begin, allowed_end, c)) + { + ostr << c; + } + else + { + encode_character(ostr, c); + } + } + } + else + { + for(; it != end; ++it) + { + c = *it; + if(allowed.find(c) == std::string::npos) + { + encode_character(ostr, c); + } + else + { + ostr << c; + } + } } return ostr.str(); } @@ -121,11 +161,18 @@ namespace { return LLURI::escape(s, unreserved() + ":@!$'()*+,="); } // sub_delims - "&;" + ":@" } -// TODO: USE CURL!! After http textures gets merged everywhere. +// *TODO: Consider using curl. After http textures gets merged everywhere. // static std::string LLURI::escape(const std::string& str) { - return escape(str,unreserved() + ":@!$'()*+,="); + static std::string default_allowed(unreserved() + ":@!$'()*+,=/?&#;"); + static bool initialized = false; + if(!initialized) + { + std::sort(default_allowed.begin(), default_allowed.end()); + initialized = true; + } + return escape(str, default_allowed, true); } LLURI::LLURI() diff --git a/linden/indra/llcommon/lluri.h b/linden/indra/llcommon/lluri.h index d67051a..d6d235d 100644 --- a/linden/indra/llcommon/lluri.h +++ b/linden/indra/llcommon/lluri.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -125,12 +125,52 @@ public: /** @name Escaping Utilities */ //@{ - // Escape a string by urlencoding all the characters that aren't - // in the allowed string. + /** + * @brief Escape a raw url with a reasonable set of allowed characters. + * + * The default set was chosen to match HTTP urls and general + * guidelines for naming resources. Passing in a raw url does not + * produce well defined results because you really need to know + * which segments are path parts because path parts are supposed + * to be escaped individually. The default set chosen is: + * + * ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + * 0123456789 + * -._~ + * :@!$'()*+,=/?&#; + * + * *NOTE: This API is basically broken because it does not + * allow you to specify significant path characters. For example, + * if the filename actually contained a /, then you cannot use + * this function to generate the serialized url for that + * resource. + * + * @param str The raw URI to escape. + * @return Returns the escaped uri or an empty string. + */ static std::string escape(const std::string& str); + + /** + * @brief Escape a string with a specified set of allowed characters. + * + * Escape a string by urlencoding all the characters that aren't + * in the allowed string. + * @param str The raw URI to escape. + * @param allowed Character array of allowed characters + * @param is_allowed_sorted Optimization hint if allowed array is sorted. + * @return Returns the escaped uri or an empty string. + */ static std::string escape( const std::string& str, - const std::string & allowed); + const std::string& allowed, + bool is_allowed_sorted = false); + + /** + * @brief unescape an escaped URI string. + * + * @param str The escped URI to unescape. + * @return Returns the unescaped uri or an empty string. + */ static std::string unescape(const std::string& str); //@} diff --git a/linden/indra/llcommon/lluuidhashmap.h b/linden/indra/llcommon/lluuidhashmap.h index 097ebc9..b2a799b 100644 --- a/linden/indra/llcommon/lluuidhashmap.h +++ b/linden/indra/llcommon/lluuidhashmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llversionserver.h b/linden/indra/llcommon/llversionserver.h index fc56403..079fa85 100644 --- a/linden/indra/llcommon/llversionserver.h +++ b/linden/indra/llcommon/llversionserver.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -35,7 +35,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 18; const S32 LL_VERSION_PATCH = 6; -const S32 LL_VERSION_BUILD = 2; +const S32 LL_VERSION_BUILD = 76747; const char * const LL_CHANNEL = "Second Life Server"; diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index 5a18c3b..6c5a1ce 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -33,9 +33,9 @@ #define LL_LLVERSIONVIEWER_H const S32 LL_VERSION_MAJOR = 1; -const S32 LL_VERSION_MINOR = 18; -const S32 LL_VERSION_PATCH = 6; -const S32 LL_VERSION_BUILD = 4; +const S32 LL_VERSION_MINOR = 19; +const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/linden/indra/llcommon/llworkerthread.cpp b/linden/indra/llcommon/llworkerthread.cpp index 1bc30fd..6301fa1 100644 --- a/linden/indra/llcommon/llworkerthread.cpp +++ b/linden/indra/llcommon/llworkerthread.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/llworkerthread.h b/linden/indra/llcommon/llworkerthread.h index 6795298..58f1ead 100644 --- a/linden/indra/llcommon/llworkerthread.h +++ b/linden/indra/llcommon/llworkerthread.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/metaclass.cpp b/linden/indra/llcommon/metaclass.cpp index a8a9fec..5b792b3 100644 --- a/linden/indra/llcommon/metaclass.cpp +++ b/linden/indra/llcommon/metaclass.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/metaclass.h b/linden/indra/llcommon/metaclass.h index 9cd6ec2..05992fb 100644 --- a/linden/indra/llcommon/metaclass.h +++ b/linden/indra/llcommon/metaclass.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/metaclasst.h b/linden/indra/llcommon/metaclasst.h index b04fe40..a54f66c 100644 --- a/linden/indra/llcommon/metaclasst.h +++ b/linden/indra/llcommon/metaclasst.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/metaproperty.cpp b/linden/indra/llcommon/metaproperty.cpp index 265fcd5..5a8824a 100644 --- a/linden/indra/llcommon/metaproperty.cpp +++ b/linden/indra/llcommon/metaproperty.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/metaproperty.h b/linden/indra/llcommon/metaproperty.h index d1218e8..fbac9ab 100644 --- a/linden/indra/llcommon/metaproperty.h +++ b/linden/indra/llcommon/metaproperty.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/metapropertyt.h b/linden/indra/llcommon/metapropertyt.h index 2df2bfb..5c25ec4 100644 --- a/linden/indra/llcommon/metapropertyt.h +++ b/linden/indra/llcommon/metapropertyt.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/processor.h b/linden/indra/llcommon/processor.h index 625c4d5..a6e2291 100644 --- a/linden/indra/llcommon/processor.h +++ b/linden/indra/llcommon/processor.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/reflective.cpp b/linden/indra/llcommon/reflective.cpp index d134bc3..54fa96b 100644 --- a/linden/indra/llcommon/reflective.cpp +++ b/linden/indra/llcommon/reflective.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/reflective.h b/linden/indra/llcommon/reflective.h index 259a3df..fec2790 100644 --- a/linden/indra/llcommon/reflective.h +++ b/linden/indra/llcommon/reflective.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/reflectivet.h b/linden/indra/llcommon/reflectivet.h index a3eeed6..e960eb1 100644 --- a/linden/indra/llcommon/reflectivet.h +++ b/linden/indra/llcommon/reflectivet.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/roles_constants.h b/linden/indra/llcommon/roles_constants.h index 1d048dd..956a9de 100644 --- a/linden/indra/llcommon/roles_constants.h +++ b/linden/indra/llcommon/roles_constants.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -56,12 +56,12 @@ enum LLRoleChangeType // Powers // -// KNOWN HOLES: -// bit 0x1 << 37 (GP_OBJECT_RETURN) +// KNOWN HOLES: use these for any single bit powers you need +// bit 0x1 << 41 +// bit 0x1 << 46 +// bit 0x1 << 49 and above // These powers were removed to make group roles simpler -// bit 0x1 << 27 (GP_LAND_ALLOW_SCRIPTS) -// bit 0x1 << 16 (GP_LAND_VIEW_OWNED) // bit 0x1 << 41 (GP_ACCOUNTING_VIEW) // bit 0x1 << 46 (GP_PROPOSAL_VIEW) @@ -116,18 +116,19 @@ const U64 GP_LAND_MANAGE_PASSES = 0x1LL << 31; // Change Sell Pass Settings const U64 GP_LAND_ADMIN = 0x1LL << 32; // Eject and Freeze Users on the land // Parcel Content -const U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48; // Return objects on parcel that are owned by the group const U64 GP_LAND_RETURN_GROUP_SET = 0x1LL << 33; // Return objects on parcel that are set to group const U64 GP_LAND_RETURN_NON_GROUP = 0x1LL << 34; // Return objects on parcel that are not set to group +const U64 GP_LAND_RETURN_GROUP_OWNED= 0x1LL << 48; // Return objects on parcel that are owned by the group + // Select a power-bit based on an object's relationship to a parcel. const U64 GP_LAND_RETURN = GP_LAND_RETURN_GROUP_OWNED | GP_LAND_RETURN_GROUP_SET | GP_LAND_RETURN_NON_GROUP; + const U64 GP_LAND_GARDENING = 0x1LL << 35; // Parcel Gardening - plant and move linden trees // Object Management const U64 GP_OBJECT_DEED = 0x1LL << 36; // Deed Object -// HOLE -- 0x1LL << 37 const U64 GP_OBJECT_MANIPULATE = 0x1LL << 38; // Manipulate Group Owned Objects (Move, Copy, Mod) const U64 GP_OBJECT_SET_SALE = 0x1LL << 39; // Set Group Owned Object for Sale @@ -142,17 +143,11 @@ const U64 GP_NOTICES_RECEIVE = 0x1LL << 43; // Receive Notices and View Notice const U64 GP_PROPOSAL_START = 0x1LL << 44; // Start Proposal const U64 GP_PROPOSAL_VOTE = 0x1LL << 45; // Vote on Proposal -const U64 GP_SESSION_JOIN = 0x1LL << 46; //can join session -const U64 GP_SESSION_VOICE = 0x1LL << 47; //can hear/talk -const U64 GP_SESSION_MODERATOR = 0x1LL << 49; //can mute people's session - const U64 GP_DEFAULT_MEMBER = GP_ACCOUNTING_ACCOUNTABLE | GP_LAND_ALLOW_SET_HOME | GP_NOTICES_RECEIVE | GP_PROPOSAL_START | GP_PROPOSAL_VOTE - | GP_SESSION_JOIN - | GP_SESSION_VOICE ; const U64 GP_DEFAULT_OFFICER = GP_ACCOUNTING_ACCOUNTABLE @@ -193,8 +188,5 @@ const U64 GP_DEFAULT_OFFICER = GP_ACCOUNTING_ACCOUNTABLE | GP_PROPOSAL_VOTE | GP_ROLE_ASSIGN_MEMBER_LIMITED | GP_ROLE_PROPERTIES - | GP_SESSION_MODERATOR - | GP_SESSION_JOIN - | GP_SESSION_VOICE ; #endif diff --git a/linden/indra/llcommon/stdenums.h b/linden/indra/llcommon/stdenums.h index ab39e9e..22d6a59 100644 --- a/linden/indra/llcommon/stdenums.h +++ b/linden/indra/llcommon/stdenums.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/stdtypes.h b/linden/indra/llcommon/stdtypes.h index 9ec2368..c1f5303 100644 --- a/linden/indra/llcommon/stdtypes.h +++ b/linden/indra/llcommon/stdtypes.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/string_table.h b/linden/indra/llcommon/string_table.h index c401f04..4de7aac 100644 --- a/linden/indra/llcommon/string_table.h +++ b/linden/indra/llcommon/string_table.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/timer.h b/linden/indra/llcommon/timer.h index 6550c81..502de1f 100644 --- a/linden/indra/llcommon/timer.h +++ b/linden/indra/llcommon/timer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/timing.cpp b/linden/indra/llcommon/timing.cpp index 1b97b8e..78d0cb9 100644 --- a/linden/indra/llcommon/timing.cpp +++ b/linden/indra/llcommon/timing.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/timing.h b/linden/indra/llcommon/timing.h index 937fa96..20d785a 100644 --- a/linden/indra/llcommon/timing.h +++ b/linden/indra/llcommon/timing.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llcommon/u64.cpp b/linden/indra/llcommon/u64.cpp index a668259..bbeed9f 100644 --- a/linden/indra/llcommon/u64.cpp +++ b/linden/indra/llcommon/u64.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -107,8 +107,8 @@ F64 U64_to_F64(const U64 value) U64 llstrtou64(const char* str, char** end, S32 base) { #ifdef LL_WINDOWS - return _strtoui64(str,end,base); + return _strtoui64(str,end,base); #else - return strtoull(str,end,base); + return strtoull(str,end,base); #endif } diff --git a/linden/indra/llcommon/u64.h b/linden/indra/llcommon/u64.h index 2b14018..ab06836 100644 --- a/linden/indra/llcommon/u64.h +++ b/linden/indra/llcommon/u64.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -32,11 +32,41 @@ #ifndef LL_U64_H #define LL_U64_H +/** + * @brief Forgivingly parse a null terminated character array. + * + * @param str The string to parse. + * @return Returns the first U64 value found in the string or 0 on failure. + */ U64 str_to_U64(const char* str); + +/** + * @brief Given a U64 value, return a printable representation. + * + * The client of this function is expected to provide an allocated + * buffer. The function then snprintf() into that buffer, so providing + * NULL has undefined behavior. Providing a buffer which is too small + * will truncate the printable value, so usually you want to declare + * the buffer: + * + * char result[U64_BUF]; + * std::cout << "value: " << U64_to_str(value, result, U64_BUF); + * + * @param value The U64 to turn into a printable character array. + * @param result The buffer to use + * @param result_size The size of the buffer allocated. Use U64_BUF. + * @return Returns the result pointer. + */ char* U64_to_str(U64 value, char* result, S32 result_size); +/** + * @brief Convert a U64 to the closest F64 value. + */ F64 U64_to_F64(const U64 value); +/** + * @brief Helper function to wrap strtoull() which is not available on windows. + */ U64 llstrtou64(const char* str, char** end, S32 base); #endif diff --git a/linden/indra/llcrashlogger/llcrashlogger.cpp b/linden/indra/llcrashlogger/llcrashlogger.cpp index d53e684..3823abf 100755 --- a/linden/indra/llcrashlogger/llcrashlogger.cpp +++ b/linden/indra/llcrashlogger/llcrashlogger.cpp @@ -1,7 +1,7 @@ - /** -* @file llcrashlogger.cpp -* @brief Crash logger implementation -* + /** +* @file llcrashlogger.cpp +* @brief Crash logger implementation +* * $LicenseInfo:firstyear=2003&license=viewergpl$ * * Copyright (c) 2003-2008, Linden Research, Inc. @@ -12,12 +12,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -27,294 +27,302 @@ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ -*/ -#include -#include -#include -#include - -#include "llcrashlogger.h" -#include "linden_common.h" -#include "llstring.h" -#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME -#include "llerror.h" -#include "lltimer.h" -#include "lldir.h" -#include "llsdserialize.h" -#include "lliopipe.h" -#include "llpumpio.h" -#include "llhttpclient.h" -#include "llsdserialize.h" - -LLPumpIO* gServicePump; -BOOL gBreak = false; -BOOL gSent = false; - -class LLCrashLoggerResponder : public LLHTTPClient::Responder -{ -public: - LLCrashLoggerResponder() - { - } - - virtual void error(U32 status, const std::string& reason) - { - gBreak = true; - } - - virtual void result(const LLSD& content) - { - gBreak = true; - gSent = true; - } -}; - -bool LLCrashLoggerText::mainLoop() -{ - std::cout << "Entering main loop" << std::endl; - sendCrashLogs(); - return true; -} - -void LLCrashLoggerText::updateApplication(LLString message) -{ - LLCrashLogger::updateApplication(message); - std::cout << message << std::endl; -} - -LLCrashLogger::LLCrashLogger() : -mSentCrashLogs(false) -{ - -} - -LLCrashLogger::~LLCrashLogger() -{ - -} - -void LLCrashLogger::gatherFiles() -{ - - /* - //TODO:This function needs to be reimplemented somewhere in here... - if(!previous_crash && is_crash_log) - { - // Make sure the file isn't too old. - double age = difftime(gLaunchTime, stat_data.st_mtimespec.tv_sec); - - // llinfos << "age is " << age << llendl; - - if(age > 60.0) - { - // The file was last modified more than 60 seconds before the crash reporter was launched. Assume it's stale. - llwarns << "File " << mFilename << " is too old!" << llendl; - return; - } - } - */ - - updateApplication("Gathering logs..."); - - // Figure out the filename of the debug log - LLString db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log").c_str(); - std::ifstream debug_log_file(db_file_name.c_str()); - - // Look for it in the debug_info.log file - if (debug_log_file.is_open()) - { - LLSDSerialize::fromXML(mDebugLog, debug_log_file); - mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString(); - mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString(); - LLHTTPClient::setCABundle(mDebugLog["CAFilename"].asString()); - llinfos << "Using log file from debug log " << mFileMap["SecondLifeLog"] << llendl; - llinfos << "Using settings file from debug log " << mFileMap["SettingsXml"] << llendl; - } - else - { - // Figure out the filename of the second life log - LLHTTPClient::setCABundle(gDirUtilp->getCAFile()); - mFileMap["SecondLifeLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.log"); - mFileMap["SettingsXml"] = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.xml"); - } - - gatherPlatformSpecificFiles(); - - //Use the debug log to reconstruct the URL to send the crash report to - mCrashHost = "https://"; - mCrashHost += mDebugLog["CurrentSimHost"].asString(); - mCrashHost += ":12043/crash/report"; - // Use login servers as the alternate, since they are already load balanced and have a known name - // First, check to see if we have a valid grid name. If not, use agni. - mAltCrashHost = "https://login."; - if(mDebugLog["GridName"].asString() != "") - { - mAltCrashHost += mDebugLog["GridName"].asString(); - } - else - { - mAltCrashHost += "agni"; - } - mAltCrashHost += ".lindenlab.com:12043/crash/report"; - - mCrashInfo["DebugLog"] = mDebugLog; - mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stats.log"); - mFileMap["StackTrace"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); - - updateApplication("Encoding files..."); - - for(std::map::iterator itr = mFileMap.begin(); itr != mFileMap.end(); ++itr) - { - std::ifstream f((*itr).second.c_str()); - if(!f.is_open()) - { - std::cout << "Can't find file " << (*itr).second.c_str() << std::endl; - continue; - } - std::stringstream s; - s << f.rdbuf(); - mCrashInfo[(*itr).first] = s.str(); - } -} - -LLSD LLCrashLogger::constructPostData() -{ - LLSD ret; - - if(mCrashInPreviousExec) - { - mCrashInfo["CrashInPreviousExecution"] = "Y"; - } - - return mCrashInfo; -} - -S32 LLCrashLogger::loadCrashBehaviorSetting() -{ - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); - - mCrashSettings.loadFromFile(filename); - - S32 value = mCrashSettings.getS32(CRASH_BEHAVIOR_SETTING); - - if (value < CRASH_BEHAVIOR_ASK || CRASH_BEHAVIOR_NEVER_SEND < value) return CRASH_BEHAVIOR_ASK; - - return value; -} - -bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior) -{ - if (crash_behavior < CRASH_BEHAVIOR_ASK) return false; - if (crash_behavior > CRASH_BEHAVIOR_NEVER_SEND) return false; - - mCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior); - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); - - mCrashSettings.saveToFile(filename, FALSE); - - return true; -} - -bool LLCrashLogger::sendCrashLogs() -{ - gatherFiles(); - - LLSD post_data; - post_data = constructPostData(); - - updateApplication("Sending reports..."); - - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, - "SecondLifeCrashReport"); - std::string report_file = dump_path + ".log"; - - std::ofstream out_file(report_file.c_str()); - LLSDSerialize::toPrettyXML(post_data, out_file); - out_file.close(); - LLHTTPClient::post(mCrashHost, post_data, new LLCrashLoggerResponder(), 5); - - gBreak = false; - while(!gBreak) - { - updateApplication("Sending logs..."); - } - - if(!gSent) - { - gBreak = false; - LLHTTPClient::post(mAltCrashHost, post_data, new LLCrashLoggerResponder(), 5); - - while(!gBreak) - { - updateApplication("Sending logs to Alternate Server..."); - } - } - - - mSentCrashLogs = gSent; - - return true; -} - -void LLCrashLogger::updateApplication(LLString message) -{ - gServicePump->pump(); - gServicePump->callback(); -} - -bool LLCrashLogger::init() -{ - // We assume that all the logs we're looking for reside on the current drive - gDirUtilp->initAppDirs("SecondLife"); - - // Default to the product name "Second Life" (this is overridden by the -name argument) - mProductName = "Second Life"; - - mCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes " - "(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)"); - - llinfos << "Loading crash behavior setting" << llendl; - mCrashBehavior = loadCrashBehaviorSetting(); - - //Run through command line options - if(getOption("previous").isDefined()) - { - llinfos << "Previous execution did not remove SecondLife.exec_marker" << llendl; - mCrashInPreviousExec = TRUE; - } - - if(getOption("dialog").isDefined()) - { - llinfos << "Show the user dialog" << llendl; - mCrashBehavior = CRASH_BEHAVIOR_ASK; - } - - LLSD server = getOption("user"); - if(server.isDefined()) - { - mGridName = server.asString(); - llinfos << "Got userserver " << mGridName << llendl; - } - else - { - mGridName = "agni"; - } - - LLSD name = getOption("name"); - if(name.isDefined()) - { - mProductName = name.asString(); - } - - // If user doesn't want to send, bail out - if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND) - { - llinfos << "Crash behavior is never_send, quitting" << llendl; - return false; - } - - gServicePump = new LLPumpIO(gAPRPoolp); - gServicePump->prime(gAPRPoolp); - LLHTTPClient::setPump(*gServicePump); - return true; -} +*/ +#include +#include +#include +#include + +#include "llcrashlogger.h" +#include "linden_common.h" +#include "llstring.h" +#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME +#include "llerror.h" +#include "lltimer.h" +#include "lldir.h" +#include "llsdserialize.h" +#include "lliopipe.h" +#include "llpumpio.h" +#include "llhttpclient.h" +#include "llsdserialize.h" + +LLPumpIO* gServicePump; +BOOL gBreak = false; +BOOL gSent = false; + +class LLCrashLoggerResponder : public LLHTTPClient::Responder +{ +public: + LLCrashLoggerResponder() + { + } + + virtual void error(U32 status, const std::string& reason) + { + gBreak = true; + } + + virtual void result(const LLSD& content) + { + gBreak = true; + gSent = true; + } +}; + +bool LLCrashLoggerText::mainLoop() +{ + std::cout << "Entering main loop" << std::endl; + sendCrashLogs(); + return true; +} + +void LLCrashLoggerText::updateApplication(LLString message) +{ + LLCrashLogger::updateApplication(message); + std::cout << message << std::endl; +} + +LLCrashLogger::LLCrashLogger() : +mSentCrashLogs(false) +{ + +} + +LLCrashLogger::~LLCrashLogger() +{ + +} + +void LLCrashLogger::gatherFiles() +{ + + /* + //TODO:This function needs to be reimplemented somewhere in here... + if(!previous_crash && is_crash_log) + { + // Make sure the file isn't too old. + double age = difftime(gLaunchTime, stat_data.st_mtimespec.tv_sec); + + // llinfos << "age is " << age << llendl; + + if(age > 60.0) + { + // The file was last modified more than 60 seconds before the crash reporter was launched. Assume it's stale. + llwarns << "File " << mFilename << " is too old!" << llendl; + return; + } + } + */ + + updateApplication("Gathering logs..."); + + // Figure out the filename of the debug log + LLString db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log").c_str(); + std::ifstream debug_log_file(db_file_name.c_str()); + + // Look for it in the debug_info.log file + if (debug_log_file.is_open()) + { + LLSDSerialize::fromXML(mDebugLog, debug_log_file); + mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString(); + mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString(); + LLHTTPClient::setCABundle(mDebugLog["CAFilename"].asString()); + llinfos << "Using log file from debug log " << mFileMap["SecondLifeLog"] << llendl; + llinfos << "Using settings file from debug log " << mFileMap["SettingsXml"] << llendl; + } + else + { + // Figure out the filename of the second life log + LLHTTPClient::setCABundle(gDirUtilp->getCAFile()); + mFileMap["SecondLifeLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.log"); + mFileMap["SettingsXml"] = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.xml"); + } + + gatherPlatformSpecificFiles(); + + //Use the debug log to reconstruct the URL to send the crash report to + mCrashHost = "https://"; + mCrashHost += mDebugLog["CurrentSimHost"].asString(); + mCrashHost += ":12043/crash/report"; + // Use login servers as the alternate, since they are already load balanced and have a known name + // First, check to see if we have a valid grid name. If not, use agni. + mAltCrashHost = "https://login."; + if(mDebugLog["GridName"].asString() != "") + { + mAltCrashHost += mDebugLog["GridName"].asString(); + } + else + { + mAltCrashHost += "agni"; + } + mAltCrashHost += ".lindenlab.com:12043/crash/report"; + + mCrashInfo["DebugLog"] = mDebugLog; + mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stats.log"); + mFileMap["StackTrace"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log"); + + updateApplication("Encoding files..."); + + for(std::map::iterator itr = mFileMap.begin(); itr != mFileMap.end(); ++itr) + { + std::ifstream f((*itr).second.c_str()); + if(!f.is_open()) + { + std::cout << "Can't find file " << (*itr).second.c_str() << std::endl; + continue; + } + std::stringstream s; + s << f.rdbuf(); + mCrashInfo[(*itr).first] = s.str(); + } +} + +LLSD LLCrashLogger::constructPostData() +{ + LLSD ret; + + if(mCrashInPreviousExec) + { + mCrashInfo["CrashInPreviousExecution"] = "Y"; + } + + return mCrashInfo; +} + +S32 LLCrashLogger::loadCrashBehaviorSetting() +{ + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); + + mCrashSettings.loadFromFile(filename); + + S32 value = mCrashSettings.getS32(CRASH_BEHAVIOR_SETTING); + + if (value < CRASH_BEHAVIOR_ASK || CRASH_BEHAVIOR_NEVER_SEND < value) return CRASH_BEHAVIOR_ASK; + + return value; +} + +bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior) +{ + if (crash_behavior < CRASH_BEHAVIOR_ASK) return false; + if (crash_behavior > CRASH_BEHAVIOR_NEVER_SEND) return false; + + mCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior); + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); + + mCrashSettings.saveToFile(filename, FALSE); + + return true; +} + +bool LLCrashLogger::sendCrashLogs() +{ + gatherFiles(); + + LLSD post_data; + post_data = constructPostData(); + + updateApplication("Sending reports..."); + + std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, + "SecondLifeCrashReport"); + std::string report_file = dump_path + ".log"; + + std::ofstream out_file(report_file.c_str()); + LLSDSerialize::toPrettyXML(post_data, out_file); + out_file.close(); + LLHTTPClient::post(mCrashHost, post_data, new LLCrashLoggerResponder(), 5); + + gBreak = false; + while(!gBreak) + { + updateApplication("Sending logs..."); + } + + if(!gSent) + { + gBreak = false; + LLHTTPClient::post(mAltCrashHost, post_data, new LLCrashLoggerResponder(), 5); + + while(!gBreak) + { + updateApplication("Sending logs to Alternate Server..."); + } + } + + + mSentCrashLogs = gSent; + + return true; +} + +void LLCrashLogger::updateApplication(LLString message) +{ + gServicePump->pump(); + gServicePump->callback(); +} + +bool LLCrashLogger::init() +{ + // We assume that all the logs we're looking for reside on the current drive + gDirUtilp->initAppDirs("SecondLife"); + + // Default to the product name "Second Life" (this is overridden by the -name argument) + mProductName = "Second Life"; + + mCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes " + "(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)"); + + llinfos << "Loading crash behavior setting" << llendl; + mCrashBehavior = loadCrashBehaviorSetting(); + + //Run through command line options + if(getOption("previous").isDefined()) + { + llinfos << "Previous execution did not remove SecondLife.exec_marker" << llendl; + mCrashInPreviousExec = TRUE; + } + + if(getOption("dialog").isDefined()) + { + llinfos << "Show the user dialog" << llendl; + mCrashBehavior = CRASH_BEHAVIOR_ASK; + } + + LLSD server = getOption("user"); + if(server.isDefined()) + { + mGridName = server.asString(); + llinfos << "Got userserver " << mGridName << llendl; + } + else + { + mGridName = "agni"; + } + + LLSD name = getOption("name"); + if(name.isDefined()) + { + mProductName = name.asString(); + } + + // If user doesn't want to send, bail out + if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND) + { + llinfos << "Crash behavior is never_send, quitting" << llendl; + return false; + } + + gServicePump = new LLPumpIO(gAPRPoolp); + gServicePump->prime(gAPRPoolp); + LLHTTPClient::setPump(*gServicePump); + + //If we've opened the crash logger, assume we can delete the marker file if it exists + if( gDirUtilp ) + { + LLString marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker"); + ll_apr_file_remove( marker_file ); + } + + return true; +} diff --git a/linden/indra/llcrashlogger/llcrashlogger.h b/linden/indra/llcrashlogger/llcrashlogger.h index 73d6884..d5618b7 100755 --- a/linden/indra/llcrashlogger/llcrashlogger.h +++ b/linden/indra/llcrashlogger/llcrashlogger.h @@ -1,7 +1,7 @@ -/** -* @file llcrashlogger.h -* @brief Crash Logger Definition -* +/** +* @file llcrashlogger.h +* @brief Crash Logger Definition +* * $LicenseInfo:firstyear=2003&license=viewergpl$ * * Copyright (c) 2003-2008, Linden Research, Inc. @@ -12,12 +12,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -27,59 +27,59 @@ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ -*/ -#ifndef LLCRASHLOGGER_H -#define LLCRASHLOGGER_H - -#include - -#include "linden_common.h" - -#include "llapp.h" -#include "llsd.h" -#include "llcontrol.h" - -class LLCrashLogger : public LLApp -{ -public: - LLCrashLogger(); - virtual ~LLCrashLogger(); - S32 loadCrashBehaviorSetting(); - void gatherFiles(); - virtual void gatherPlatformSpecificFiles() {} - bool saveCrashBehaviorSetting(S32 crash_behavior); - bool sendCrashLogs(); - LLSD constructPostData(); - virtual void updateApplication(LLString message = ""); - virtual bool init(); - virtual bool mainLoop() = 0; - virtual bool cleanup() { return true; } - void setUserText(LLString& text) { mCrashInfo["UserNotes"] = text; } - S32 getCrashBehavior() { return mCrashBehavior; } -protected: - S32 mCrashBehavior; - BOOL mCrashInPreviousExec; - std::map mFileMap; - static const int mMaxSendSize = 200000; - LLString mGridName; - LLControlGroup mCrashSettings; - LLString mProductName; - LLSD mCrashInfo; - LLString mCrashHost; - LLString mAltCrashHost; - LLSD mDebugLog; - bool mSentCrashLogs; -}; - -class LLCrashLoggerText : public LLCrashLogger -{ -public: - LLCrashLoggerText(void) {} - ~LLCrashLoggerText(void) {} - - virtual bool mainLoop(); - virtual void updateApplication(LLString message = ""); -}; - - -#endif //LLCRASHLOGGER_H +*/ +#ifndef LLCRASHLOGGER_H +#define LLCRASHLOGGER_H + +#include + +#include "linden_common.h" + +#include "llapp.h" +#include "llsd.h" +#include "llcontrol.h" + +class LLCrashLogger : public LLApp +{ +public: + LLCrashLogger(); + virtual ~LLCrashLogger(); + S32 loadCrashBehaviorSetting(); + void gatherFiles(); + virtual void gatherPlatformSpecificFiles() {} + bool saveCrashBehaviorSetting(S32 crash_behavior); + bool sendCrashLogs(); + LLSD constructPostData(); + virtual void updateApplication(LLString message = ""); + virtual bool init(); + virtual bool mainLoop() = 0; + virtual bool cleanup() { return true; } + void setUserText(LLString& text) { mCrashInfo["UserNotes"] = text; } + S32 getCrashBehavior() { return mCrashBehavior; } +protected: + S32 mCrashBehavior; + BOOL mCrashInPreviousExec; + std::map mFileMap; + static const int mMaxSendSize = 200000; + LLString mGridName; + LLControlGroup mCrashSettings; + LLString mProductName; + LLSD mCrashInfo; + LLString mCrashHost; + LLString mAltCrashHost; + LLSD mDebugLog; + bool mSentCrashLogs; +}; + +class LLCrashLoggerText : public LLCrashLogger +{ +public: + LLCrashLoggerText(void) {} + ~LLCrashLoggerText(void) {} + + virtual bool mainLoop(); + virtual void updateApplication(LLString message = ""); +}; + + +#endif //LLCRASHLOGGER_H diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp index 414603f..b9bf26a 100644 --- a/linden/indra/llimage/llimage.cpp +++ b/linden/indra/llimage/llimage.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimage.h b/linden/indra/llimage/llimage.h index 1c85bf0..ef736ec 100644 --- a/linden/indra/llimage/llimage.h +++ b/linden/indra/llimage/llimage.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimage_vc9.vcproj b/linden/indra/llimage/llimage_vc9.vcproj new file mode 100644 index 0000000..67ff6b3 --- /dev/null +++ b/linden/indra/llimage/llimage_vc9.vcproj @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llimage/llimagebmp.cpp b/linden/indra/llimage/llimagebmp.cpp index 9b4562d..5d74c3e 100644 --- a/linden/indra/llimage/llimagebmp.cpp +++ b/linden/indra/llimage/llimagebmp.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagebmp.h b/linden/indra/llimage/llimagebmp.h index c4ddc22..8c83bc5 100644 --- a/linden/indra/llimage/llimagebmp.h +++ b/linden/indra/llimage/llimagebmp.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagedxt.cpp b/linden/indra/llimage/llimagedxt.cpp index c616e62..722ac9b 100644 --- a/linden/indra/llimage/llimagedxt.cpp +++ b/linden/indra/llimage/llimagedxt.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagedxt.h b/linden/indra/llimage/llimagedxt.h index a92cbde..c795d4e 100644 --- a/linden/indra/llimage/llimagedxt.h +++ b/linden/indra/llimage/llimagedxt.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagej2c.cpp b/linden/indra/llimage/llimagej2c.cpp index a895716..0011296 100644 --- a/linden/indra/llimage/llimagej2c.cpp +++ b/linden/indra/llimage/llimagej2c.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagej2c.h b/linden/indra/llimage/llimagej2c.h index 25141d0..da844a1 100644 --- a/linden/indra/llimage/llimagej2c.h +++ b/linden/indra/llimage/llimagej2c.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagejpeg.cpp b/linden/indra/llimage/llimagejpeg.cpp index f058cb8..0ffa838 100644 --- a/linden/indra/llimage/llimagejpeg.cpp +++ b/linden/indra/llimage/llimagejpeg.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagejpeg.h b/linden/indra/llimage/llimagejpeg.h index e35eb94..b143c47 100644 --- a/linden/indra/llimage/llimagejpeg.h +++ b/linden/indra/llimage/llimagejpeg.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagepng.cpp b/linden/indra/llimage/llimagepng.cpp index 159267c..5108066 100644 --- a/linden/indra/llimage/llimagepng.cpp +++ b/linden/indra/llimage/llimagepng.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagepng.h b/linden/indra/llimage/llimagepng.h index f2572aa..982454a 100644 --- a/linden/indra/llimage/llimagepng.h +++ b/linden/indra/llimage/llimagepng.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagetga.cpp b/linden/indra/llimage/llimagetga.cpp index 37c63f8..4da374e 100644 --- a/linden/indra/llimage/llimagetga.cpp +++ b/linden/indra/llimage/llimagetga.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimagetga.h b/linden/indra/llimage/llimagetga.h index e11edf4..475ffed 100644 --- a/linden/indra/llimage/llimagetga.h +++ b/linden/indra/llimage/llimagetga.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimageworker.cpp b/linden/indra/llimage/llimageworker.cpp index dfb067b..2800caf 100644 --- a/linden/indra/llimage/llimageworker.cpp +++ b/linden/indra/llimage/llimageworker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llimageworker.h b/linden/indra/llimage/llimageworker.h index c838f93..bf6c3f2 100644 --- a/linden/indra/llimage/llimageworker.h +++ b/linden/indra/llimage/llimageworker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llmapimagetype.h b/linden/indra/llimage/llmapimagetype.h index 7031eca..156700f 100644 --- a/linden/indra/llimage/llmapimagetype.h +++ b/linden/indra/llimage/llmapimagetype.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llpngwrapper.cpp b/linden/indra/llimage/llpngwrapper.cpp index a19e778..0054adf 100644 --- a/linden/indra/llimage/llpngwrapper.cpp +++ b/linden/indra/llimage/llpngwrapper.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimage/llpngwrapper.h b/linden/indra/llimage/llpngwrapper.h index e784e79..b773b72 100644 --- a/linden/indra/llimage/llpngwrapper.h +++ b/linden/indra/llimage/llpngwrapper.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp index 53acad5..3ca271c 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.cpp +++ b/linden/indra/llimagej2coj/llimagej2coj.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -40,8 +40,10 @@ const char* fallbackEngineInfoLLImageJ2CImpl() { - return (std::string("OpenJPEG: " OPENJPEG_VERSION ", Runtime: ") - + opj_version()).c_str(); + static std::string version_string = + std::string("OpenJPEG: " OPENJPEG_VERSION ", Runtime: ") + + opj_version(); + return version_string.c_str(); } LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl() @@ -183,15 +185,25 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod for (S32 comp = first_channel, dest=0; comp < first_channel + channels; comp++, dest++) { - S32 offset = dest; - for (S32 y = (height - 1); y >= 0; y--) + if (image->comps[comp].data) { - for (S32 x = 0; x < width; x++) + S32 offset = dest; + for (S32 y = (height - 1); y >= 0; y--) { - rawp[offset] = image->comps[comp].data[y*comp_width + x]; - offset += channels; + for (S32 x = 0; x < width; x++) + { + rawp[offset] = image->comps[comp].data[y*comp_width + x]; + offset += channels; + } } } + else // Some rare OpenJPEG versions have this bug. + { + fprintf(stderr, "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)\n"); + opj_image_destroy(image); + + return TRUE; // done + } } /* free image data structure */ @@ -219,10 +231,29 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con /* set encoding parameters to default values */ opj_set_default_encoder_parameters(¶meters); - parameters.tcp_rates[0] = 0; - parameters.tcp_numlayers++; - parameters.cp_disto_alloc = 1; parameters.cod_format = 0; + parameters.cp_disto_alloc = 1; + + if (reversible) + { + parameters.tcp_numlayers = 1; + parameters.tcp_rates[0] = 0.0f; + } + else + { + parameters.tcp_numlayers = 5; + parameters.tcp_rates[0] = 1920.0f; + parameters.tcp_rates[1] = 480.0f; + parameters.tcp_rates[2] = 120.0f; + parameters.tcp_rates[3] = 30.0f; + parameters.tcp_rates[4] = 10.0f; + parameters.irreversible = 1; + if (raw_image.getComponents() >= 3) + { + parameters.tcp_mct = 1; + } + } + if (!comment_text) { parameters.cp_comment = ""; @@ -298,7 +329,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con cio = opj_cio_open((opj_common_ptr)cinfo, NULL, 0); /* encode the image */ - bool bSuccess = opj_encode(cinfo, cio, image, parameters.index); + bool bSuccess = opj_encode(cinfo, cio, image, NULL); if (!bSuccess) { opj_cio_close(cio); diff --git a/linden/indra/llimagej2coj/llimagej2coj.h b/linden/indra/llimagej2coj/llimagej2coj.h index 4ebf773..df061ea 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.h +++ b/linden/indra/llimagej2coj/llimagej2coj.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llcategory.cpp b/linden/indra/llinventory/llcategory.cpp index 2a185a1..cbcba6d 100644 --- a/linden/indra/llinventory/llcategory.cpp +++ b/linden/indra/llinventory/llcategory.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llcategory.h b/linden/indra/llinventory/llcategory.h index 8c32d77..74d401d 100644 --- a/linden/indra/llinventory/llcategory.h +++ b/linden/indra/llinventory/llcategory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lleconomy.cpp b/linden/indra/llinventory/lleconomy.cpp index ea987f8..6ed0510 100644 --- a/linden/indra/llinventory/lleconomy.cpp +++ b/linden/indra/llinventory/lleconomy.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lleconomy.h b/linden/indra/llinventory/lleconomy.h index 757c661..c5caa42 100644 --- a/linden/indra/llinventory/lleconomy.h +++ b/linden/indra/llinventory/lleconomy.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp index 6229cfe..3e3290c 100644 --- a/linden/indra/llinventory/llinventory.cpp +++ b/linden/indra/llinventory/llinventory.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llinventory.h b/linden/indra/llinventory/llinventory.h index 50d3259..76d439b 100644 --- a/linden/indra/llinventory/llinventory.h +++ b/linden/indra/llinventory/llinventory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llinventory_vc9.vcproj b/linden/indra/llinventory/llinventory_vc9.vcproj new file mode 100644 index 0000000..c48b962 --- /dev/null +++ b/linden/indra/llinventory/llinventory_vc9.vcproj @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llinventory/llinventorytype.cpp b/linden/indra/llinventory/llinventorytype.cpp index b5cf8b7..9212947 100644 --- a/linden/indra/llinventory/llinventorytype.cpp +++ b/linden/indra/llinventory/llinventorytype.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llinventorytype.h b/linden/indra/llinventory/llinventorytype.h index 10fb737..3c9abe9 100644 --- a/linden/indra/llinventory/llinventorytype.h +++ b/linden/indra/llinventory/llinventorytype.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lllandmark.cpp b/linden/indra/llinventory/lllandmark.cpp index 7a48607..2d8f466 100644 --- a/linden/indra/llinventory/lllandmark.cpp +++ b/linden/indra/llinventory/lllandmark.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lllandmark.h b/linden/indra/llinventory/lllandmark.h index 4ad63a7..93d84e7 100644 --- a/linden/indra/llinventory/lllandmark.h +++ b/linden/indra/llinventory/lllandmark.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llnotecard.cpp b/linden/indra/llinventory/llnotecard.cpp index caec8a5..6d565e8 100644 --- a/linden/indra/llinventory/llnotecard.cpp +++ b/linden/indra/llinventory/llnotecard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llnotecard.h b/linden/indra/llinventory/llnotecard.h index d4a64f4..2b36ae2 100644 --- a/linden/indra/llinventory/llnotecard.h +++ b/linden/indra/llinventory/llnotecard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llparcel.cpp b/linden/indra/llinventory/llparcel.cpp index 03f3cad..f8fb4d5 100644 --- a/linden/indra/llinventory/llparcel.cpp +++ b/linden/indra/llinventory/llparcel.cpp @@ -12,12 +12,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h index a418f7f..10fe6dc 100644 --- a/linden/indra/llinventory/llparcel.h +++ b/linden/indra/llinventory/llparcel.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llparcelflags.h b/linden/indra/llinventory/llparcelflags.h index 955cc9d..1bf744b 100644 --- a/linden/indra/llinventory/llparcelflags.h +++ b/linden/indra/llinventory/llparcelflags.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llpermissions.cpp b/linden/indra/llinventory/llpermissions.cpp index 3ce71b8..0fec5b8 100644 --- a/linden/indra/llinventory/llpermissions.cpp +++ b/linden/indra/llinventory/llpermissions.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llpermissions.h b/linden/indra/llinventory/llpermissions.h index e6f9285..cb4f4b5 100644 --- a/linden/indra/llinventory/llpermissions.h +++ b/linden/indra/llinventory/llpermissions.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llpermissionsflags.h b/linden/indra/llinventory/llpermissionsflags.h index b126ac3..ca51d64 100644 --- a/linden/indra/llinventory/llpermissionsflags.h +++ b/linden/indra/llinventory/llpermissionsflags.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp index 7cf04f4..e7c429b 100644 --- a/linden/indra/llinventory/llsaleinfo.cpp +++ b/linden/indra/llinventory/llsaleinfo.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/llsaleinfo.h b/linden/indra/llinventory/llsaleinfo.h index d48db76..2fc2fd0 100644 --- a/linden/indra/llinventory/llsaleinfo.h +++ b/linden/indra/llinventory/llsaleinfo.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lltransactionflags.cpp b/linden/indra/llinventory/lltransactionflags.cpp index e2b828d..a45cdba 100644 --- a/linden/indra/llinventory/lltransactionflags.cpp +++ b/linden/indra/llinventory/lltransactionflags.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lltransactionflags.h b/linden/indra/llinventory/lltransactionflags.h index 63feca0..9a27c3f 100644 --- a/linden/indra/llinventory/lltransactionflags.h +++ b/linden/indra/llinventory/lltransactionflags.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lltransactiontypes.h b/linden/indra/llinventory/lltransactiontypes.h index cce39d2..22fbe81 100644 --- a/linden/indra/llinventory/lltransactiontypes.h +++ b/linden/indra/llinventory/lltransactiontypes.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llinventory/lluserrelations.cpp b/linden/indra/llinventory/lluserrelations.cpp index 86d0fdb..09f4f25 100644 --- a/linden/indra/llinventory/lluserrelations.cpp +++ b/linden/indra/llinventory/lluserrelations.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -41,6 +41,7 @@ const LLRelationship LLRelationship::DEFAULT_RELATIONSHIP = LLRelationship(GRANT LLRelationship::LLRelationship() : mGrantToAgent(0), mGrantFromAgent(0), + mChangeSerialNum(0), mIsOnline(false) { } @@ -48,6 +49,7 @@ LLRelationship::LLRelationship() : LLRelationship::LLRelationship(S32 grant_to, S32 grant_from, bool is_online) : mGrantToAgent(grant_to), mGrantFromAgent(grant_from), + mChangeSerialNum(0), mIsOnline(is_online) { } @@ -60,6 +62,7 @@ bool LLRelationship::isOnline() const void LLRelationship::online(bool is_online) { mIsOnline = is_online; + mChangeSerialNum++; } bool LLRelationship::isRightGrantedTo(S32 rights) const @@ -86,12 +89,14 @@ void LLRelationship::grantRights(S32 to_agent, S32 from_agent) { mGrantToAgent |= to_agent; mGrantFromAgent |= from_agent; + mChangeSerialNum++; } void LLRelationship::revokeRights(S32 to_agent, S32 from_agent) { mGrantToAgent &= ~to_agent; mGrantFromAgent &= ~from_agent; + mChangeSerialNum++; } diff --git a/linden/indra/llinventory/lluserrelations.h b/linden/indra/llinventory/lluserrelations.h index 56cb331..c80a0cc 100644 --- a/linden/indra/llinventory/lluserrelations.h +++ b/linden/indra/llinventory/lluserrelations.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -142,8 +142,18 @@ public: */ S32 getRightsGrantedFrom() const; - void setRightsTo(S32 to_agent) { mGrantToAgent = to_agent; } - void setRightsFrom(S32 from_agent) { mGrantFromAgent = from_agent; } + void setRightsTo(S32 to_agent) { mGrantToAgent = to_agent; mChangeSerialNum++; } + void setRightsFrom(S32 from_agent) { mGrantFromAgent = from_agent; mChangeSerialNum++;} + + /** + * @brief Get the change count for this agent + * + * Every change to rights will increment the serial number + * allowing listeners to determine when a relationship value is actually new + * + * @return change serial number for relationship + */ + S32 getChangeSerialNum() const { return mChangeSerialNum; } /** * @brief Grant a set of rights. @@ -171,6 +181,7 @@ public: protected: S32 mGrantToAgent; S32 mGrantFromAgent; + S32 mChangeSerialNum; bool mIsOnline; }; diff --git a/linden/indra/llmath/camera.h b/linden/indra/llmath/camera.h index cc3737d..8ac8fdc 100644 --- a/linden/indra/llmath/camera.h +++ b/linden/indra/llmath/camera.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/coordframe.h b/linden/indra/llmath/coordframe.h index 7cb9d6f..c1b16f8 100644 --- a/linden/indra/llmath/coordframe.h +++ b/linden/indra/llmath/coordframe.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llbboxlocal.cpp b/linden/indra/llmath/llbboxlocal.cpp index e10b1e9..212e276 100644 --- a/linden/indra/llmath/llbboxlocal.cpp +++ b/linden/indra/llmath/llbboxlocal.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llbboxlocal.h b/linden/indra/llmath/llbboxlocal.h index d6c177a..e7a61ce 100644 --- a/linden/indra/llmath/llbboxlocal.h +++ b/linden/indra/llmath/llbboxlocal.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llcamera.cpp b/linden/indra/llmath/llcamera.cpp index 41f6125..82c401f 100644 --- a/linden/indra/llmath/llcamera.cpp +++ b/linden/indra/llmath/llcamera.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llcamera.h b/linden/indra/llmath/llcamera.h index bc7f064..0e20798 100644 --- a/linden/indra/llmath/llcamera.h +++ b/linden/indra/llmath/llcamera.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llcoord.h b/linden/indra/llmath/llcoord.h index d23cd16..1fa1151 100644 --- a/linden/indra/llmath/llcoord.h +++ b/linden/indra/llmath/llcoord.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llcoordframe.cpp b/linden/indra/llmath/llcoordframe.cpp index 8302b05..6d18c8b 100644 --- a/linden/indra/llmath/llcoordframe.cpp +++ b/linden/indra/llmath/llcoordframe.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llcoordframe.h b/linden/indra/llmath/llcoordframe.h index e8b9279..ce14fd7 100644 --- a/linden/indra/llmath/llcoordframe.h +++ b/linden/indra/llmath/llcoordframe.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llcrc.cpp b/linden/indra/llmath/llcrc.cpp index ebf5d25..2338691 100644 --- a/linden/indra/llmath/llcrc.cpp +++ b/linden/indra/llmath/llcrc.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llcrc.h b/linden/indra/llmath/llcrc.h index 18f57db..64e939c 100644 --- a/linden/indra/llmath/llcrc.h +++ b/linden/indra/llmath/llcrc.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llinterp.h b/linden/indra/llmath/llinterp.h index 832ba49..ec5458f 100644 --- a/linden/indra/llmath/llinterp.h +++ b/linden/indra/llmath/llinterp.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llmath.h b/linden/indra/llmath/llmath.h index be3ed40..affdbf1 100644 --- a/linden/indra/llmath/llmath.h +++ b/linden/indra/llmath/llmath.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llmath_vc9.vcproj b/linden/indra/llmath/llmath_vc9.vcproj new file mode 100644 index 0000000..1f6d05b --- /dev/null +++ b/linden/indra/llmath/llmath_vc9.vcproj @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llmath/llmd5.cpp b/linden/indra/llmath/llmd5.cpp index 62ec2d1..a0ac92f 100644 --- a/linden/indra/llmath/llmd5.cpp +++ b/linden/indra/llmath/llmd5.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llmd5.h b/linden/indra/llmath/llmd5.h index 440051b..6d21b31 100644 --- a/linden/indra/llmath/llmd5.h +++ b/linden/indra/llmath/llmd5.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/lloctree.h b/linden/indra/llmath/lloctree.h index 96e8c76..6eee9fb 100644 --- a/linden/indra/llmath/lloctree.h +++ b/linden/indra/llmath/lloctree.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llperlin.cpp b/linden/indra/llmath/llperlin.cpp index 8e117e3..2b53914 100644 --- a/linden/indra/llmath/llperlin.cpp +++ b/linden/indra/llmath/llperlin.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llperlin.h b/linden/indra/llmath/llperlin.h index b539eab..27585f7 100644 --- a/linden/indra/llmath/llperlin.h +++ b/linden/indra/llmath/llperlin.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llplane.h b/linden/indra/llmath/llplane.h index 2d6fe4f..51a972e 100644 --- a/linden/indra/llmath/llplane.h +++ b/linden/indra/llmath/llplane.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llquantize.h b/linden/indra/llmath/llquantize.h index bb7da07..e09b80e 100644 --- a/linden/indra/llmath/llquantize.h +++ b/linden/indra/llmath/llquantize.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llquaternion.cpp b/linden/indra/llmath/llquaternion.cpp index 46702da..ea51e28 100644 --- a/linden/indra/llmath/llquaternion.cpp +++ b/linden/indra/llmath/llquaternion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llquaternion.h b/linden/indra/llmath/llquaternion.h index 526bc58..6805437 100644 --- a/linden/indra/llmath/llquaternion.h +++ b/linden/indra/llmath/llquaternion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llrand.cpp b/linden/indra/llmath/llrand.cpp index 9b5dfbf..bc8c867 100644 --- a/linden/indra/llmath/llrand.cpp +++ b/linden/indra/llmath/llrand.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llrand.h b/linden/indra/llmath/llrand.h index 87f9e69..0a28213 100644 --- a/linden/indra/llmath/llrand.h +++ b/linden/indra/llmath/llrand.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llrect.cpp b/linden/indra/llmath/llrect.cpp index 669951b..41f9e67 100644 --- a/linden/indra/llmath/llrect.cpp +++ b/linden/indra/llmath/llrect.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llrect.h b/linden/indra/llmath/llrect.h index 214d552..76b5a27 100644 --- a/linden/indra/llmath/llrect.h +++ b/linden/indra/llmath/llrect.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -215,7 +215,12 @@ public: mLeft = llmin(mLeft, mRight); mBottom = llmin(mBottom, mTop); } - + + bool isNull() const + { + return mLeft == mRight || mBottom == mTop; + } + void unionWith(const LLRectBase &other) { mLeft = llmin(mLeft, other.mLeft); diff --git a/linden/indra/llmath/lltreenode.h b/linden/indra/llmath/lltreenode.h index d057b07..160a5bd 100644 --- a/linden/indra/llmath/lltreenode.h +++ b/linden/indra/llmath/lltreenode.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/lluuid.cpp b/linden/indra/llmath/lluuid.cpp index 030db93..db9e869 100644 --- a/linden/indra/llmath/lluuid.cpp +++ b/linden/indra/llmath/lluuid.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/lluuid.h b/linden/indra/llmath/lluuid.h index 4445873..190b772 100644 --- a/linden/indra/llmath/lluuid.h +++ b/linden/indra/llmath/lluuid.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llv4math.h b/linden/indra/llmath/llv4math.h index cf3148a..4cf74cd 100644 --- a/linden/indra/llmath/llv4math.h +++ b/linden/indra/llmath/llv4math.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llv4matrix3.h b/linden/indra/llmath/llv4matrix3.h index fa50428..f9bdf8f 100644 --- a/linden/indra/llmath/llv4matrix3.h +++ b/linden/indra/llmath/llv4matrix3.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llv4matrix4.h b/linden/indra/llmath/llv4matrix4.h index b34691e..b76a822 100644 --- a/linden/indra/llmath/llv4matrix4.h +++ b/linden/indra/llmath/llv4matrix4.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llv4vector3.h b/linden/indra/llmath/llv4vector3.h index 4aa1114..92d08f1 100644 --- a/linden/indra/llmath/llv4vector3.h +++ b/linden/indra/llmath/llv4vector3.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index ab4efe6..3316168 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -86,7 +86,7 @@ const S32 SCULPT_REZ_2 = 8; const S32 SCULPT_REZ_3 = 16; const S32 SCULPT_REZ_4 = 32; -const F32 SCULPT_MIN_AREA = 0.005f; +const F32 SCULPT_MIN_AREA = 0.002f; BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm) { @@ -1833,9 +1833,9 @@ inline LLVector3 sculpt_rgb_to_vector(U8 r, U8 g, U8 b) { // maps RGB values to vector values [0..255] -> [-0.5..0.5] LLVector3 value; - value.mV[VX] = r / 256.f - 0.5f; - value.mV[VY] = g / 256.f - 0.5f; - value.mV[VZ] = b / 256.f - 0.5f; + value.mV[VX] = r / 255.f - 0.5f; + value.mV[VY] = g / 255.f - 0.5f; + value.mV[VZ] = b / 255.f - 0.5f; return value; } diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index 909fa22..7b384f2 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llvolumemgr.cpp b/linden/indra/llmath/llvolumemgr.cpp index 3aa6b3c..17bafcd 100644 --- a/linden/indra/llmath/llvolumemgr.cpp +++ b/linden/indra/llmath/llvolumemgr.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/llvolumemgr.h b/linden/indra/llmath/llvolumemgr.h index c5ee6b0..0688163 100644 --- a/linden/indra/llmath/llvolumemgr.h +++ b/linden/indra/llmath/llvolumemgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/m3math.cpp b/linden/indra/llmath/m3math.cpp index 007f0cf..6741f05 100644 --- a/linden/indra/llmath/m3math.cpp +++ b/linden/indra/llmath/m3math.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/m3math.h b/linden/indra/llmath/m3math.h index 42562e6..8bd94d8 100644 --- a/linden/indra/llmath/m3math.h +++ b/linden/indra/llmath/m3math.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/m4math.cpp b/linden/indra/llmath/m4math.cpp index 62da38f..2b51db1 100644 --- a/linden/indra/llmath/m4math.cpp +++ b/linden/indra/llmath/m4math.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/m4math.h b/linden/indra/llmath/m4math.h index 780ddb2..7a51eb2 100644 --- a/linden/indra/llmath/m4math.h +++ b/linden/indra/llmath/m4math.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/raytrace.cpp b/linden/indra/llmath/raytrace.cpp index b4fa92b..a3049cd 100644 --- a/linden/indra/llmath/raytrace.cpp +++ b/linden/indra/llmath/raytrace.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/raytrace.h b/linden/indra/llmath/raytrace.h index d0c809e..9499f84 100644 --- a/linden/indra/llmath/raytrace.h +++ b/linden/indra/llmath/raytrace.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v2math.cpp b/linden/indra/llmath/v2math.cpp index a4a50fc..76fa60f 100644 --- a/linden/indra/llmath/v2math.cpp +++ b/linden/indra/llmath/v2math.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v2math.h b/linden/indra/llmath/v2math.h index 756de94..b951786 100644 --- a/linden/indra/llmath/v2math.h +++ b/linden/indra/llmath/v2math.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v3color.cpp b/linden/indra/llmath/v3color.cpp index e33d842..cc4f874 100644 --- a/linden/indra/llmath/v3color.cpp +++ b/linden/indra/llmath/v3color.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v3color.h b/linden/indra/llmath/v3color.h index 29f41c1..782ccd7 100644 --- a/linden/indra/llmath/v3color.h +++ b/linden/indra/llmath/v3color.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -163,6 +163,7 @@ inline LLColor3::LLColor3(F32 r, F32 g, F32 b) mV[VZ] = b; } + inline LLColor3::LLColor3(const F32 *vec) { mV[VX] = vec[VX]; diff --git a/linden/indra/llmath/v3dmath.cpp b/linden/indra/llmath/v3dmath.cpp index d3f9478..b59f519 100644 --- a/linden/indra/llmath/v3dmath.cpp +++ b/linden/indra/llmath/v3dmath.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v3dmath.h b/linden/indra/llmath/v3dmath.h index f5a016e..60757ba 100644 --- a/linden/indra/llmath/v3dmath.h +++ b/linden/indra/llmath/v3dmath.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v3math.cpp b/linden/indra/llmath/v3math.cpp index 2eeef52..34cce06 100644 --- a/linden/indra/llmath/v3math.cpp +++ b/linden/indra/llmath/v3math.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v3math.h b/linden/indra/llmath/v3math.h index 534f0e6..f1c1b39 100644 --- a/linden/indra/llmath/v3math.h +++ b/linden/indra/llmath/v3math.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v4color.cpp b/linden/indra/llmath/v4color.cpp index e8d59fc..b1884b7 100644 --- a/linden/indra/llmath/v4color.cpp +++ b/linden/indra/llmath/v4color.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v4color.h b/linden/indra/llmath/v4color.h index ab82d22..9ba2690 100644 --- a/linden/indra/llmath/v4color.h +++ b/linden/indra/llmath/v4color.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -260,6 +260,7 @@ inline LLColor4::LLColor4(U32 clr) mV[VW] = (clr>>24) * (1.0f/255.0f); } + inline LLColor4::LLColor4(const F32 *vec) { mV[VX] = vec[VX]; diff --git a/linden/indra/llmath/v4coloru.cpp b/linden/indra/llmath/v4coloru.cpp index f3274b3..56a8413 100644 --- a/linden/indra/llmath/v4coloru.cpp +++ b/linden/indra/llmath/v4coloru.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v4coloru.h b/linden/indra/llmath/v4coloru.h index 5c787cd..c9c5418 100644 --- a/linden/indra/llmath/v4coloru.h +++ b/linden/indra/llmath/v4coloru.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v4math.cpp b/linden/indra/llmath/v4math.cpp index 29e180d..26a47ff 100644 --- a/linden/indra/llmath/v4math.cpp +++ b/linden/indra/llmath/v4math.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/v4math.h b/linden/indra/llmath/v4math.h index 102eb26..f9d0c43 100644 --- a/linden/indra/llmath/v4math.h +++ b/linden/indra/llmath/v4math.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/xform.cpp b/linden/indra/llmath/xform.cpp index ef1ced6..d8d7991 100644 --- a/linden/indra/llmath/xform.cpp +++ b/linden/indra/llmath/xform.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmath/xform.h b/linden/indra/llmath/xform.h index 1e4b7ff..8fd1e9e 100644 --- a/linden/indra/llmath/xform.h +++ b/linden/indra/llmath/xform.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmedia_vc9.vcproj b/linden/indra/llmedia/llmedia_vc9.vcproj new file mode 100644 index 0000000..440f714 --- /dev/null +++ b/linden/indra/llmedia/llmedia_vc9.vcproj @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llmedia/llmediabase.cpp b/linden/indra/llmedia/llmediabase.cpp index a712d79..40acc5c 100644 --- a/linden/indra/llmedia/llmediabase.cpp +++ b/linden/indra/llmedia/llmediabase.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediabase.h b/linden/indra/llmedia/llmediabase.h index ff059d0..ae9c8ee 100644 --- a/linden/indra/llmedia/llmediabase.h +++ b/linden/indra/llmedia/llmediabase.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaemitter.h b/linden/indra/llmedia/llmediaemitter.h index 0f947d7..658486d 100644 --- a/linden/indra/llmedia/llmediaemitter.h +++ b/linden/indra/llmedia/llmediaemitter.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaemitterevents.h b/linden/indra/llmedia/llmediaemitterevents.h index bab6217..8a4111b 100644 --- a/linden/indra/llmedia/llmediaemitterevents.h +++ b/linden/indra/llmedia/llmediaemitterevents.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaengine.cpp b/linden/indra/llmedia/llmediaengine.cpp index f53707a..bd8acd1 100644 --- a/linden/indra/llmedia/llmediaengine.cpp +++ b/linden/indra/llmedia/llmediaengine.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaengine.h b/linden/indra/llmedia/llmediaengine.h index bd1ce6a..264060a 100644 --- a/linden/indra/llmedia/llmediaengine.h +++ b/linden/indra/llmedia/llmediaengine.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -42,8 +42,9 @@ #include "message.h" -// current version on my Windows system after a 7.3.1 update is 120684544 (dec) and 7318000 (hex) -#define LL_MIN_QUICKTIME_VERSION ( 120684544 ) +// older: after a 7.3.1 update version is 120684544 (dec) and 7318000 (hex) +// current version on my Windows system after a 7.4 update version is 121667584 (dec) and 7408000 (hex) +#define LL_MIN_QUICKTIME_VERSION ( 121667584 ) // QT 7.4 ////////////////////////////////////////////////////////////////////////////// // media engine singleton diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index c8b3735..50dc052 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h index 1201869..f1a7956 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.h +++ b/linden/indra/llmedia/llmediaimplgstreamer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp b/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp index f25443b..5d54689 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms.h b/linden/indra/llmedia/llmediaimplgstreamer_syms.h index 5c94a02..92d46b7 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer_syms.h +++ b/linden/indra/llmedia/llmediaimplgstreamer_syms.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp index c4b89cc..7c59caf 100644 --- a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.h b/linden/indra/llmedia/llmediaimplgstreamervidplug.h index 822f8eb..a15798e 100644 --- a/linden/indra/llmedia/llmediaimplgstreamervidplug.h +++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaimplquicktime.cpp b/linden/indra/llmedia/llmediaimplquicktime.cpp index e8528e4..8fcd7bf 100644 --- a/linden/indra/llmedia/llmediaimplquicktime.cpp +++ b/linden/indra/llmedia/llmediaimplquicktime.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaimplquicktime.h b/linden/indra/llmedia/llmediaimplquicktime.h index a529245..b170a06 100644 --- a/linden/indra/llmedia/llmediaimplquicktime.h +++ b/linden/indra/llmedia/llmediaimplquicktime.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediamoviebase.cpp b/linden/indra/llmedia/llmediamoviebase.cpp index 8aebb0a..87b84b9 100644 --- a/linden/indra/llmedia/llmediamoviebase.cpp +++ b/linden/indra/llmedia/llmediamoviebase.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediamoviebase.h b/linden/indra/llmedia/llmediamoviebase.h index 43236af..d763b28 100644 --- a/linden/indra/llmedia/llmediamoviebase.h +++ b/linden/indra/llmedia/llmediamoviebase.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmedia/llmediaobservers.h b/linden/indra/llmedia/llmediaobservers.h index d223869..09dd3b8 100644 --- a/linden/indra/llmedia/llmediaobservers.h +++ b/linden/indra/llmedia/llmediaobservers.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/files.lst b/linden/indra/llmessage/files.lst index 00a22b0..690cc37 100644 --- a/linden/indra/llmessage/files.lst +++ b/linden/indra/llmessage/files.lst @@ -21,7 +21,6 @@ llmessage/lliohttpserver.cpp llmessage/lliopipe.cpp llmessage/lliosocket.cpp llmessage/llioutil.cpp -llmessage/lllogtextmessage.cpp llmessage/llmail.cpp llmessage/llmessagebuilder.cpp llmessage/llmessageconfig.cpp diff --git a/linden/indra/llmessage/llassetstorage.cpp b/linden/indra/llmessage/llassetstorage.cpp index ee6492f..74b55d9 100644 --- a/linden/indra/llmessage/llassetstorage.cpp +++ b/linden/indra/llmessage/llassetstorage.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llassetstorage.h b/linden/indra/llmessage/llassetstorage.h index add7592..b7da197 100644 --- a/linden/indra/llmessage/llassetstorage.h +++ b/linden/indra/llmessage/llassetstorage.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llblowfishcipher.cpp b/linden/indra/llmessage/llblowfishcipher.cpp index 0485de4..cdaa096 100644 --- a/linden/indra/llmessage/llblowfishcipher.cpp +++ b/linden/indra/llmessage/llblowfishcipher.cpp @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llblowfishcipher.h b/linden/indra/llmessage/llblowfishcipher.h index c1a60c3..aeb4dbb 100644 --- a/linden/indra/llmessage/llblowfishcipher.h +++ b/linden/indra/llmessage/llblowfishcipher.h @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llbuffer.cpp b/linden/indra/llmessage/llbuffer.cpp index dbe0bb2..c166c4c 100644 --- a/linden/indra/llmessage/llbuffer.cpp +++ b/linden/indra/llmessage/llbuffer.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llbuffer.h b/linden/indra/llmessage/llbuffer.h index a6e4950..4089a55 100644 --- a/linden/indra/llmessage/llbuffer.h +++ b/linden/indra/llmessage/llbuffer.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llbufferstream.cpp b/linden/indra/llmessage/llbufferstream.cpp index 7d98c29..5a3769b 100644 --- a/linden/indra/llmessage/llbufferstream.cpp +++ b/linden/indra/llmessage/llbufferstream.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llbufferstream.h b/linden/indra/llmessage/llbufferstream.h index a15d9f6..e1330c6 100644 --- a/linden/indra/llmessage/llbufferstream.h +++ b/linden/indra/llmessage/llbufferstream.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcachename.cpp b/linden/indra/llmessage/llcachename.cpp index bb7fb3b..fb6ca5b 100644 --- a/linden/indra/llmessage/llcachename.cpp +++ b/linden/indra/llmessage/llcachename.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcachename.h b/linden/indra/llmessage/llcachename.h index f69e89c..5a0a0d7 100644 --- a/linden/indra/llmessage/llcachename.h +++ b/linden/indra/llmessage/llcachename.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcallbacklisth.h b/linden/indra/llmessage/llcallbacklisth.h index fe2fc9b..9b1e403 100644 --- a/linden/indra/llmessage/llcallbacklisth.h +++ b/linden/indra/llmessage/llcallbacklisth.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llchainio.cpp b/linden/indra/llmessage/llchainio.cpp index 5b922cd..5691749 100644 --- a/linden/indra/llmessage/llchainio.cpp +++ b/linden/indra/llmessage/llchainio.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llchainio.h b/linden/indra/llmessage/llchainio.h index 98a4a29..26af249 100644 --- a/linden/indra/llmessage/llchainio.h +++ b/linden/indra/llmessage/llchainio.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcipher.h b/linden/indra/llmessage/llcipher.h index 7bdca89..183ee63 100644 --- a/linden/indra/llmessage/llcipher.h +++ b/linden/indra/llmessage/llcipher.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcircuit.cpp b/linden/indra/llmessage/llcircuit.cpp index 05a6b50..7b369cb 100644 --- a/linden/indra/llmessage/llcircuit.cpp +++ b/linden/indra/llmessage/llcircuit.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcircuit.h b/linden/indra/llmessage/llcircuit.h index 0a86771..3f1a46a 100644 --- a/linden/indra/llmessage/llcircuit.h +++ b/linden/indra/llmessage/llcircuit.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llclassifiedflags.cpp b/linden/indra/llmessage/llclassifiedflags.cpp index 784f622..e6f9a75 100644 --- a/linden/indra/llmessage/llclassifiedflags.cpp +++ b/linden/indra/llmessage/llclassifiedflags.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llclassifiedflags.h b/linden/indra/llmessage/llclassifiedflags.h index 1ba1a32..d651b61 100644 --- a/linden/indra/llmessage/llclassifiedflags.h +++ b/linden/indra/llmessage/llclassifiedflags.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp index ef10435..3969d18 100644 --- a/linden/indra/llmessage/llcurl.cpp +++ b/linden/indra/llmessage/llcurl.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llcurl.h b/linden/indra/llmessage/llcurl.h index 8c1c014..904bc64 100644 --- a/linden/indra/llmessage/llcurl.h +++ b/linden/indra/llmessage/llcurl.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lldatapacker.cpp b/linden/indra/llmessage/lldatapacker.cpp index 0f3fd2e..ec198f7 100644 --- a/linden/indra/llmessage/lldatapacker.cpp +++ b/linden/indra/llmessage/lldatapacker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lldatapacker.h b/linden/indra/llmessage/lldatapacker.h index 943f7bb..f41fb76 100644 --- a/linden/indra/llmessage/lldatapacker.h +++ b/linden/indra/llmessage/lldatapacker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lldbstrings.h b/linden/indra/llmessage/lldbstrings.h index e395cf8..d4b095d 100644 --- a/linden/indra/llmessage/lldbstrings.h +++ b/linden/indra/llmessage/lldbstrings.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lldispatcher.cpp b/linden/indra/llmessage/lldispatcher.cpp index c2929e3..0270721 100644 --- a/linden/indra/llmessage/lldispatcher.cpp +++ b/linden/indra/llmessage/lldispatcher.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lldispatcher.h b/linden/indra/llmessage/lldispatcher.h index ca81609..c9decb4 100644 --- a/linden/indra/llmessage/lldispatcher.h +++ b/linden/indra/llmessage/lldispatcher.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lleventflags.h b/linden/indra/llmessage/lleventflags.h index 85078a1..2a9d0b4 100644 --- a/linden/indra/llmessage/lleventflags.h +++ b/linden/indra/llmessage/lleventflags.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llfiltersd2xmlrpc.cpp b/linden/indra/llmessage/llfiltersd2xmlrpc.cpp index 931a298..d9e0ad3 100644 --- a/linden/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/linden/indra/llmessage/llfiltersd2xmlrpc.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llfiltersd2xmlrpc.h b/linden/indra/llmessage/llfiltersd2xmlrpc.h index 0a496d1..e44d95f 100644 --- a/linden/indra/llmessage/llfiltersd2xmlrpc.h +++ b/linden/indra/llmessage/llfiltersd2xmlrpc.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llfollowcamparams.h b/linden/indra/llmessage/llfollowcamparams.h index 1406098..12e4fb9 100644 --- a/linden/indra/llmessage/llfollowcamparams.h +++ b/linden/indra/llmessage/llfollowcamparams.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhost.cpp b/linden/indra/llmessage/llhost.cpp index 9a471dc..57677b0 100644 --- a/linden/indra/llmessage/llhost.cpp +++ b/linden/indra/llmessage/llhost.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhost.h b/linden/indra/llmessage/llhost.h index 2aa2f68..c393aa6 100644 --- a/linden/indra/llmessage/llhost.h +++ b/linden/indra/llmessage/llhost.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp index f180bf3..74f5271 100644 --- a/linden/indra/llmessage/llhttpassetstorage.cpp +++ b/linden/indra/llmessage/llhttpassetstorage.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpassetstorage.h b/linden/indra/llmessage/llhttpassetstorage.h index 5ee5cd8..71e973a 100644 --- a/linden/indra/llmessage/llhttpassetstorage.h +++ b/linden/indra/llmessage/llhttpassetstorage.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpclient.cpp b/linden/indra/llmessage/llhttpclient.cpp index 54fe48a..3ede02a 100644 --- a/linden/indra/llmessage/llhttpclient.cpp +++ b/linden/indra/llmessage/llhttpclient.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpclient.h b/linden/indra/llmessage/llhttpclient.h index c97c2a9..703ee61 100644 --- a/linden/indra/llmessage/llhttpclient.h +++ b/linden/indra/llmessage/llhttpclient.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpnode.cpp b/linden/indra/llmessage/llhttpnode.cpp index fc1e06a..afd27e9 100644 --- a/linden/indra/llmessage/llhttpnode.cpp +++ b/linden/indra/llmessage/llhttpnode.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpnode.h b/linden/indra/llmessage/llhttpnode.h index ea24b91..9317e9c 100644 --- a/linden/indra/llmessage/llhttpnode.h +++ b/linden/indra/llmessage/llhttpnode.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpsender.cpp b/linden/indra/llmessage/llhttpsender.cpp index f6b26e0..f0b453d 100644 --- a/linden/indra/llmessage/llhttpsender.cpp +++ b/linden/indra/llmessage/llhttpsender.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llhttpsender.h b/linden/indra/llmessage/llhttpsender.h index aa2ec6c..86dd754 100644 --- a/linden/indra/llmessage/llhttpsender.h +++ b/linden/indra/llmessage/llhttpsender.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llinstantmessage.cpp b/linden/indra/llmessage/llinstantmessage.cpp index 3e3c9e0..390a6fa 100644 --- a/linden/indra/llmessage/llinstantmessage.cpp +++ b/linden/indra/llmessage/llinstantmessage.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llinstantmessage.h b/linden/indra/llmessage/llinstantmessage.h index d2caf20..c6319da 100644 --- a/linden/indra/llmessage/llinstantmessage.h +++ b/linden/indra/llmessage/llinstantmessage.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llinvite.h b/linden/indra/llmessage/llinvite.h index e1adf13..68990ea 100644 --- a/linden/indra/llmessage/llinvite.h +++ b/linden/indra/llmessage/llinvite.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lliobuffer.cpp b/linden/indra/llmessage/lliobuffer.cpp index 7222f54..81d0852 100644 --- a/linden/indra/llmessage/lliobuffer.cpp +++ b/linden/indra/llmessage/lliobuffer.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lliobuffer.h b/linden/indra/llmessage/lliobuffer.h index ac9c396..7526fd8 100644 --- a/linden/indra/llmessage/lliobuffer.h +++ b/linden/indra/llmessage/lliobuffer.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lliohttpserver.cpp b/linden/indra/llmessage/lliohttpserver.cpp index ded115a..40f70c3 100644 --- a/linden/indra/llmessage/lliohttpserver.cpp +++ b/linden/indra/llmessage/lliohttpserver.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -723,7 +723,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( const LLHTTPNode* node = mRootNode.traverse(mPath, context); if(node) { - llinfos << "LLHTTPResponder::process_impl found node for " + lldebugs << "LLHTTPResponder::process_impl found node for " << mAbsPathAndQuery << llendl; // Copy everything after mLast read to the out. @@ -827,7 +827,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( } else { - llinfos << "LLHTTPResponder::process_impl didn't find a node for " + llwarns << "LLHTTPResponder::process_impl didn't find a node for " << mAbsPathAndQuery << llendl; LLBufferStream str(channels, buffer.get()); mState = STATE_SHORT_CIRCUIT; diff --git a/linden/indra/llmessage/lliohttpserver.h b/linden/indra/llmessage/lliohttpserver.h index a81417b..7514b30 100644 --- a/linden/indra/llmessage/lliohttpserver.h +++ b/linden/indra/llmessage/lliohttpserver.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lliopipe.cpp b/linden/indra/llmessage/lliopipe.cpp index 4f86d8f..3b52fae 100644 --- a/linden/indra/llmessage/lliopipe.cpp +++ b/linden/indra/llmessage/lliopipe.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -51,6 +51,7 @@ static const std::string STATUS_ERROR_NAMES[LLIOPipe::STATUS_ERROR_COUNT] = std::string("STATUS_NOT_IMPLEMENTED"), std::string("STATUS_PRECONDITION_NOT_MET"), std::string("STATUS_NO_CONNECTION"), + std::string("STATUS_LOST_CONNECTION"), std::string("STATUS_EXPIRED"), }; diff --git a/linden/indra/llmessage/lliopipe.h b/linden/indra/llmessage/lliopipe.h index b735e0d..97c6246 100644 --- a/linden/indra/llmessage/lliopipe.h +++ b/linden/indra/llmessage/lliopipe.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -148,11 +148,14 @@ public: // This means we could not connect to a remote host. STATUS_NO_CONNECTION = -4, - // This means we could not connect to a remote host. - STATUS_EXPIRED = -5, + // The connection was lost. + STATUS_LOST_CONNECTION = -5, + + // The totoal process time has exceeded the timeout. + STATUS_EXPIRED = -6, // Keep track of the count of codes here. - STATUS_ERROR_COUNT = 5, + STATUS_ERROR_COUNT = 6, }; /** diff --git a/linden/indra/llmessage/lliosocket.cpp b/linden/indra/llmessage/lliosocket.cpp index 2667a0e..26fd0b2 100644 --- a/linden/indra/llmessage/lliosocket.cpp +++ b/linden/indra/llmessage/lliosocket.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -64,6 +64,40 @@ bool is_addr_in_use(apr_status_t status) #endif } +#if LL_LINUX +// Define this to see the actual file descriptors being tossed around. +//#define LL_DEBUG_SOCKET_FILE_DESCRIPTORS 1 +#if LL_DEBUG_SOCKET_FILE_DESCRIPTORS +#include "apr-1/apr_portable.h" +#endif +#endif + + +// Quick function +void ll_debug_socket(const char* msg, apr_socket_t* apr_sock) +{ +#if LL_DEBUG_SOCKET_FILE_DESCRIPTORS + if(!apr_sock) + { + lldebugs << "Socket -- " << (msg?msg:"") << ": no socket." << llendl; + return; + } + // *TODO: Why doesn't this work? + //apr_os_sock_t os_sock; + int os_sock; + if(APR_SUCCESS == apr_os_sock_get(&os_sock, apr_sock)) + { + lldebugs << "Socket -- " << (msg?msg:"") << " on fd " << os_sock + << " at " << apr_sock << llendl; + } + else + { + lldebugs << "Socket -- " << (msg?msg:"") << " no fd " + << " at " << apr_sock << llendl; + } +#endif +} + /// /// LLSocket /// @@ -199,6 +233,7 @@ bool LLSocket::blockingConnect(const LLHost& host) return false; } apr_socket_timeout_set(mSocket, 1000); + ll_debug_socket("Blocking connect", mSocket); if(ll_apr_warn_status(apr_socket_connect(mSocket, sa))) return false; setOptions(); return true; @@ -209,6 +244,7 @@ LLSocket::LLSocket(apr_socket_t* socket, apr_pool_t* pool) : mPool(pool), mPort(PORT_INVALID) { + ll_debug_socket("Constructing wholely formed socket", mSocket); LLMemType m1(LLMemType::MTYPE_IO_TCP); } @@ -216,9 +252,9 @@ LLSocket::~LLSocket() { LLMemType m1(LLMemType::MTYPE_IO_TCP); // *FIX: clean up memory we are holding. - //lldebugs << "Destroying LLSocket" << llendl; if(mSocket) { + ll_debug_socket("Destroying socket", mSocket); apr_socket_close(mSocket); } if(mPool) diff --git a/linden/indra/llmessage/lliosocket.h b/linden/indra/llmessage/lliosocket.h index 4d70656..f0b788e 100644 --- a/linden/indra/llmessage/lliosocket.h +++ b/linden/indra/llmessage/lliosocket.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llioutil.cpp b/linden/indra/llmessage/llioutil.cpp index 61a7901..755689a 100644 --- a/linden/indra/llmessage/llioutil.cpp +++ b/linden/indra/llmessage/llioutil.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llioutil.h b/linden/indra/llmessage/llioutil.h index 3d21011..e6dc2ab 100644 --- a/linden/indra/llmessage/llioutil.h +++ b/linden/indra/llmessage/llioutil.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llloginflags.h b/linden/indra/llmessage/llloginflags.h index 8f1e018..e9d2feb 100644 --- a/linden/indra/llmessage/llloginflags.h +++ b/linden/indra/llmessage/llloginflags.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lllogtextmessage.cpp b/linden/indra/llmessage/lllogtextmessage.cpp deleted file mode 100644 index c44d667..0000000 --- a/linden/indra/llmessage/lllogtextmessage.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @file lllogtextmessage.cpp - * @author Phoenix - * @date 2005-01-12 - * @brief Impelmentation of the text logger. - * - * $LicenseInfo:firstyear=2005&license=viewergpl$ - * - * Copyright (c) 2005-2008, 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. - * $/LicenseInfo$ - */ - -#include "linden_common.h" -#include "lllogtextmessage.h" - -#include "message.h" - - -LLLogTextMessage::~LLLogTextMessage() -{ - S32 queue_size = (S32)mQueue.size(); - if(queue_size > 0) - { - llwarns << "Deleting queus with messages still on it." << llendl; - } -} - -void LLLogTextMessage::log( - const LLUUID& from, - const LLUUID& to, - const char* mesg) -{ - const F64 F64_ZERO = 0.0; - log(from, to, F64_ZERO, F64_ZERO, mesg); -} - -void LLLogTextMessage::log( - const LLUUID& from, - F64 global_x, - F64 global_y, - const char* mesg) -{ - log(from, LLUUID::null, global_x, global_y, mesg); -} - -void LLLogTextMessage::log( - const LLUUID& from, - const LLUUID& to, - F64 global_x, - F64 global_y, - const char* mesg) -{ - const S32 OVERHEAD = (2*sizeof(LLUUID))+(2*sizeof(F64))+(sizeof(S32)); - const U32 MAX_LOGS_PER_MSG = 100; - const U32 LOG_MTU = 4000; - LLLogTextMessageData data(from, to, global_x, global_y, mesg); - mQueue.push_back(data); - mPendingSize += (S32)(OVERHEAD + data.mMessage.size()); - if((mQueue.size() >= MAX_LOGS_PER_MSG) || (mPendingSize > (S32)LOG_MTU)) - { - flush(); - } -} - -void LLLogTextMessage::flush() -{ - mPendingSize = 0; - if(mQueue.empty()) return; - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_LogTextMessage); - while(!mQueue.empty()) - { - LLLogTextMessageData data(mQueue.front()); - mQueue.pop_front(); - msg->nextBlockFast(_PREHASH_DataBlock); - msg->addUUIDFast(_PREHASH_FromAgentId, data.mFromID); - msg->addUUIDFast(_PREHASH_ToAgentId, data.mToID); - msg->addF64Fast(_PREHASH_GlobalX, data.mGlobalX); - msg->addF64Fast(_PREHASH_GlobalY, data.mGlobalY); - msg->addU32Fast(_PREHASH_Time, data.mTime); - msg->addStringFast(_PREHASH_Message, data.mMessage.c_str()); - } - - // Try to make this reliable, but don't try too hard - msg->sendReliable(mDataserver, 3, TRUE, 0.f, NULL, NULL); -} - -LLLogTextMessage::LLLogTextMessageData::LLLogTextMessageData( - const LLUUID& from, - const LLUUID& to, - const F64& global_x, - const F64& gloabl_y, - const char* message) : - mFromID(from), - mToID(to), - mGlobalX(global_x), - mGlobalY(gloabl_y), - mMessage(message) -{ - mTime = (S32)time(NULL); -} diff --git a/linden/indra/llmessage/lllogtextmessage.h b/linden/indra/llmessage/lllogtextmessage.h deleted file mode 100644 index 21730c0..0000000 --- a/linden/indra/llmessage/lllogtextmessage.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file lllogtextmessage.h - * @author Phoenix - * @date 2005-01-11 - * @brief Declaration of class for coalescing text logs generated - * from chat and IM - * - * $LicenseInfo:firstyear=2005&license=viewergpl$ - * - * Copyright (c) 2005-2008, 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. - * $/LicenseInfo$ - */ - -#ifndef LL_LLLOGTEXTMESSAGE_H -#define LL_LLLOGTEXTMESSAGE_H - -#include -#include - -#include "lluuid.h" -#include "llhost.h" - -/** - * @class LLLogTextMessage - * @brief This class represents a coalesced collection of text messages - * generated by agents and their objects. - * - * This class is intended to be used as a singleton. Since use on the - * simulator and userserver is somewhat different the class does not - * enforce a singleton or provide an extern. - */ -class LLLogTextMessage -{ -public: - LLLogTextMessage(const LLHost& dataserver) : - mDataserver(dataserver), - mPendingSize(0) {} - ~LLLogTextMessage(); - - void log(const LLUUID& from, const LLUUID& to, const char* mesg); - void log(const LLUUID& from, F64 global_x, F64 global_y, const char* mesg); - void log( - const LLUUID& from, - const LLUUID& to, - F64 global_x, - F64 global_y, - const char* mesg); - void flush(); - -protected: - struct LLLogTextMessageData - { - LLLogTextMessageData( - const LLUUID& from, - const LLUUID& to, - const F64& global_x, - const F64& gloabl_y, - const char* message); - LLUUID mFromID; - LLUUID mToID; - F64 mGlobalX; - F64 mGlobalY; - std::string mMessage; - S32 mTime; - }; - - // The destination of the messages - LLHost mDataserver; - - // Keep the messages queued in order of arrival. - std::deque mQueue; - - // Tracks the outgoing message size in bytes of the pending queued - // text logs. - S32 mPendingSize; -}; - -#endif // LL_LLLOGTEXTMESSAGE_H diff --git a/linden/indra/llmessage/llmail.cpp b/linden/indra/llmessage/llmail.cpp index 158b332..659803a 100644 --- a/linden/indra/llmessage/llmail.cpp +++ b/linden/indra/llmessage/llmail.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmail.h b/linden/indra/llmessage/llmail.h index 70bb897..86b7793 100644 --- a/linden/indra/llmessage/llmail.h +++ b/linden/indra/llmessage/llmail.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessage.vcproj b/linden/indra/llmessage/llmessage.vcproj index 64551bd..56b7d30 100644 --- a/linden/indra/llmessage/llmessage.vcproj +++ b/linden/indra/llmessage/llmessage.vcproj @@ -224,9 +224,6 @@ RelativePath=".\llioutil.cpp"> - - - - - - @@ -659,10 +655,6 @@ > - - diff --git a/linden/indra/llmessage/llmessage_vc9.vcproj b/linden/indra/llmessage/llmessage_vc9.vcproj new file mode 100644 index 0000000..f197feb --- /dev/null +++ b/linden/indra/llmessage/llmessage_vc9.vcproj @@ -0,0 +1,926 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llmessage/llmessagebuilder.cpp b/linden/indra/llmessage/llmessagebuilder.cpp index 16a2341..fe49786 100644 --- a/linden/indra/llmessage/llmessagebuilder.cpp +++ b/linden/indra/llmessage/llmessagebuilder.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagebuilder.h b/linden/indra/llmessage/llmessagebuilder.h index 3df58d2..cf23d17 100644 --- a/linden/indra/llmessage/llmessagebuilder.h +++ b/linden/indra/llmessage/llmessagebuilder.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessageconfig.cpp b/linden/indra/llmessage/llmessageconfig.cpp index 6d1d625..0e7f768 100644 --- a/linden/indra/llmessage/llmessageconfig.cpp +++ b/linden/indra/llmessage/llmessageconfig.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessageconfig.h b/linden/indra/llmessage/llmessageconfig.h index ec835dc..32702e8 100644 --- a/linden/indra/llmessage/llmessageconfig.h +++ b/linden/indra/llmessage/llmessageconfig.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagereader.cpp b/linden/indra/llmessage/llmessagereader.cpp index dbbe3ed..48ff1fd 100644 --- a/linden/indra/llmessage/llmessagereader.cpp +++ b/linden/indra/llmessage/llmessagereader.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagereader.h b/linden/indra/llmessage/llmessagereader.h index 0515e32..1e74da9 100644 --- a/linden/indra/llmessage/llmessagereader.h +++ b/linden/indra/llmessage/llmessagereader.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagetemplate.cpp b/linden/indra/llmessage/llmessagetemplate.cpp index 54eca0b..4a560ca 100644 --- a/linden/indra/llmessage/llmessagetemplate.cpp +++ b/linden/indra/llmessage/llmessagetemplate.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagetemplate.h b/linden/indra/llmessage/llmessagetemplate.h index 98227ab..d0ef945 100644 --- a/linden/indra/llmessage/llmessagetemplate.h +++ b/linden/indra/llmessage/llmessagetemplate.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagetemplateparser.cpp b/linden/indra/llmessage/llmessagetemplateparser.cpp index c270f1e..969a0d9 100644 --- a/linden/indra/llmessage/llmessagetemplateparser.cpp +++ b/linden/indra/llmessage/llmessagetemplateparser.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagetemplateparser.h b/linden/indra/llmessage/llmessagetemplateparser.h index b120fb7..51fe925 100644 --- a/linden/indra/llmessage/llmessagetemplateparser.h +++ b/linden/indra/llmessage/llmessagetemplateparser.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmessagethrottle.cpp b/linden/indra/llmessage/llmessagethrottle.cpp index d0ae872..84733ba 100644 --- a/linden/indra/llmessage/llmessagethrottle.cpp +++ b/linden/indra/llmessage/llmessagethrottle.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,8 +37,18 @@ #include "llframetimer.h" // This is used for the stl search_n function. +#if _MSC_VER >= 1500 // VC9 has a bug in search_n +struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool > +{ + bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const + { + return a.getHash() == b.getHash(); + } +}; +#else bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b) - { return a.getHash() == b.getHash(); } + { return a.getHash() == b.getHash(); } +#endif const U64 SEC_TO_USEC = 1000000; @@ -113,9 +123,14 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const char* mesg) LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. - message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), - 1, entry, eq_message_throttle_entry); - +#if _MSC_VER >= 1500 // VC9 has a bug in search_n + // SJB: This *should* work but has not been tested yet *TODO: Test! + message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), + std::bind2nd(eq_message_throttle_entry(), entry)); +#else + message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), + 1, entry, eq_message_throttle_entry); +#endif if (found == message_list->end()) { // This message was not found. Add it to the list. @@ -142,9 +157,15 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. +#if _MSC_VER >= 1500 // VC9 has a bug in search_n + // SJB: This *should* work but has not been tested yet *TODO: Test! + message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), + std::bind2nd(eq_message_throttle_entry(), entry)); +#else message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), 1, entry, eq_message_throttle_entry); - +#endif + if (found == message_list->end()) { // This message was not found. Add it to the list. diff --git a/linden/indra/llmessage/llmessagethrottle.h b/linden/indra/llmessage/llmessagethrottle.h index 92a257b..8be08b3 100644 --- a/linden/indra/llmessage/llmessagethrottle.h +++ b/linden/indra/llmessage/llmessagethrottle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,8 +50,8 @@ public: LLMessageThrottleEntry(const size_t hash, const U64 entry_time) : mHash(hash), mEntryTime(entry_time) {} - size_t getHash() { return mHash; } - U64 getEntryTime() { return mEntryTime; } + size_t getHash() const { return mHash; } + U64 getEntryTime() const { return mEntryTime; } protected: size_t mHash; U64 mEntryTime; diff --git a/linden/indra/llmessage/llmime.cpp b/linden/indra/llmessage/llmime.cpp index 3e399b2..48e73fb 100644 --- a/linden/indra/llmessage/llmime.cpp +++ b/linden/indra/llmessage/llmime.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmime.h b/linden/indra/llmessage/llmime.h index bcc2848..3524a67 100644 --- a/linden/indra/llmessage/llmime.h +++ b/linden/indra/llmessage/llmime.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llmsgvariabletype.h b/linden/indra/llmessage/llmsgvariabletype.h index 5112c65..f2430d2 100644 --- a/linden/indra/llmessage/llmsgvariabletype.h +++ b/linden/indra/llmessage/llmsgvariabletype.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llnamevalue.cpp b/linden/indra/llmessage/llnamevalue.cpp index 9616b5c..6c8a2c4 100644 --- a/linden/indra/llmessage/llnamevalue.cpp +++ b/linden/indra/llmessage/llnamevalue.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llnamevalue.h b/linden/indra/llmessage/llnamevalue.h index cbf91cf..123836b 100644 --- a/linden/indra/llmessage/llnamevalue.h +++ b/linden/indra/llmessage/llnamevalue.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llnullcipher.cpp b/linden/indra/llmessage/llnullcipher.cpp index 01edd31..d506eca 100644 --- a/linden/indra/llmessage/llnullcipher.cpp +++ b/linden/indra/llmessage/llnullcipher.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llnullcipher.h b/linden/indra/llmessage/llnullcipher.h index 4d5ba46..80fe91f 100644 --- a/linden/indra/llmessage/llnullcipher.h +++ b/linden/indra/llmessage/llnullcipher.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpacketack.cpp b/linden/indra/llmessage/llpacketack.cpp index 9a7cc09..0648a14 100644 --- a/linden/indra/llmessage/llpacketack.cpp +++ b/linden/indra/llmessage/llpacketack.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpacketack.h b/linden/indra/llmessage/llpacketack.h index abcc8be..7490ba8 100644 --- a/linden/indra/llmessage/llpacketack.h +++ b/linden/indra/llmessage/llpacketack.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpacketbuffer.cpp b/linden/indra/llmessage/llpacketbuffer.cpp index 4276e72..129965e 100644 --- a/linden/indra/llmessage/llpacketbuffer.cpp +++ b/linden/indra/llmessage/llpacketbuffer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpacketbuffer.h b/linden/indra/llmessage/llpacketbuffer.h index 48c08fa..f1c343b 100644 --- a/linden/indra/llmessage/llpacketbuffer.h +++ b/linden/indra/llmessage/llpacketbuffer.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpacketring.cpp b/linden/indra/llmessage/llpacketring.cpp index 42cd67f..12d4e11 100644 --- a/linden/indra/llmessage/llpacketring.cpp +++ b/linden/indra/llmessage/llpacketring.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpacketring.h b/linden/indra/llmessage/llpacketring.h index f52ae3e..2153e96 100644 --- a/linden/indra/llmessage/llpacketring.h +++ b/linden/indra/llmessage/llpacketring.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpartdata.cpp b/linden/indra/llmessage/llpartdata.cpp index 37d1872..606abd0 100644 --- a/linden/indra/llmessage/llpartdata.cpp +++ b/linden/indra/llmessage/llpartdata.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpartdata.h b/linden/indra/llmessage/llpartdata.h index 5a3d879..216e547 100644 --- a/linden/indra/llmessage/llpartdata.h +++ b/linden/indra/llmessage/llpartdata.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llpumpio.cpp b/linden/indra/llmessage/llpumpio.cpp index 57bf45b..f60ee2b 100644 --- a/linden/indra/llmessage/llpumpio.cpp +++ b/linden/indra/llmessage/llpumpio.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -34,6 +34,7 @@ #include "linden_common.h" #include "llpumpio.h" +#include #include #include "apr-1/apr_poll.h" @@ -41,10 +42,15 @@ #include "llmemtype.h" #include "llstl.h" -// This should not be in production, but it is intensely useful during -// development. +// These should not be enabled in production, but they can be +// intensely useful during development for finding certain kinds of +// bugs. #if LL_LINUX -#define LL_DEBUG_PIPE_TYPE_IN_PUMP 0 +//#define LL_DEBUG_PIPE_TYPE_IN_PUMP 1 +//#define LL_DEBUG_POLL_FILE_DESCRIPTORS 1 +#if LL_DEBUG_POLL_FILE_DESCRIPTORS +#include "apr-1/apr_portable.h" +#endif #endif #if LL_DEBUG_PIPE_TYPE_IN_PUMP @@ -73,6 +79,52 @@ extern const F32 NEVER_CHAIN_EXPIRY_SECS = 0.0f; //#define LL_DEBUG_SPEW_BUFFER_CHANNEL_IN 1 //#define LL_DEBUG_SPEW_BUFFER_CHANNEL_OUT 1 +// +// local functions +// +void ll_debug_poll_fd(const char* msg, const apr_pollfd_t* poll) +{ +#if LL_DEBUG_POLL_FILE_DESCRIPTORS + if(!poll) + { + lldebugs << "Poll -- " << (msg?msg:"") << ": no pollfd." << llendl; + return; + } + if(poll->desc.s) + { + apr_os_sock_t os_sock; + if(APR_SUCCESS == apr_os_sock_get(&os_sock, poll->desc.s)) + { + lldebugs << "Poll -- " << (msg?msg:"") << " on fd " << os_sock + << " at " << poll->desc.s << llendl; + } + else + { + lldebugs << "Poll -- " << (msg?msg:"") << " no fd " + << " at " << poll->desc.s << llendl; + } + } + else if(poll->desc.f) + { + apr_os_file_t os_file; + if(APR_SUCCESS == apr_os_file_get(&os_file, poll->desc.f)) + { + lldebugs << "Poll -- " << (msg?msg:"") << " on fd " << os_file + << " at " << poll->desc.f << llendl; + } + else + { + lldebugs << "Poll -- " << (msg?msg:"") << " no fd " + << " at " << poll->desc.f << llendl; + } + } + else + { + lldebugs << "Poll -- " << (msg?msg:"") << ": no descriptor." << llendl; + } +#endif +} + /** * @class */ @@ -217,50 +269,88 @@ bool LLPumpIO::setTimeoutSeconds(F32 timeout) return true; } +static std::string events_2_string(apr_int16_t events) +{ + std::ostringstream ostr; + if(events & APR_POLLIN) + { + ostr << "read,"; + } + if(events & APR_POLLPRI) + { + ostr << "priority,"; + } + if(events & APR_POLLOUT) + { + ostr << "write,"; + } + if(events & APR_POLLERR) + { + ostr << "error,"; + } + if(events & APR_POLLHUP) + { + ostr << "hangup,"; + } + if(events & APR_POLLNVAL) + { + ostr << "invalid,"; + } + return chop_tail_copy(ostr.str(), 1); +} + bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll) { LLMemType m1(LLMemType::MTYPE_IO_PUMP); - //lldebugs << "LLPumpIO::setConditional" << llendl; - if(pipe) + if(!pipe) return false; + ll_debug_poll_fd("Set conditional", poll); + + lldebugs << "Setting conditionals (" << (poll ? events_2_string(poll->reqevents) :"null") + << ") " +#if LL_DEBUG_PIPE_TYPE_IN_PUMP + << "on pipe " << typeid(*pipe).name() +#endif + << " at " << pipe << llendl; + + // remove any matching poll file descriptors for this pipe. + LLIOPipe::ptr_t pipe_ptr(pipe); + LLChainInfo::conditionals_t::iterator it; + it = (*mCurrentChain).mDescriptors.begin(); + while(it != (*mCurrentChain).mDescriptors.end()) { - // remove any matching poll file descriptors for this pipe. - LLIOPipe::ptr_t pipe_ptr(pipe); - LLChainInfo::conditionals_t::iterator it; - it = (*mCurrentChain).mDescriptors.begin(); - while(it != (*mCurrentChain).mDescriptors.end()) + LLChainInfo::pipe_conditional_t& value = (*it); + if(pipe_ptr == value.first) { - LLChainInfo::pipe_conditional_t& value = (*it); - if(pipe_ptr == value.first) - { - ll_delete_apr_pollset_fd_client_data()(value); - it = (*mCurrentChain).mDescriptors.erase(it); - mRebuildPollset = true; - } - else - { - ++it; - } + ll_delete_apr_pollset_fd_client_data()(value); + it = (*mCurrentChain).mDescriptors.erase(it); + mRebuildPollset = true; } - - if(poll) + else { - LLChainInfo::pipe_conditional_t value; - value.first = pipe_ptr; - value.second = *poll; - if(!poll->p) - { - // each fd needs a pool to work with, so if one was - // not specified, use this pool. - // *FIX: Should it always be this pool? - value.second.p = mPool; - } - value.second.client_data = new S32(++mPollsetClientID); - (*mCurrentChain).mDescriptors.push_back(value); - mRebuildPollset = true; + ++it; } + } + + if(!poll) + { + mRebuildPollset = true; return true; } - return false; + LLChainInfo::pipe_conditional_t value; + value.first = pipe_ptr; + value.second = *poll; + value.second.rtnevents = 0; + if(!poll->p) + { + // each fd needs a pool to work with, so if one was + // not specified, use this pool. + // *FIX: Should it always be this pool? + value.second.p = mPool; + } + value.second.client_data = new S32(++mPollsetClientID); + (*mCurrentChain).mDescriptors.push_back(value); + mRebuildPollset = true; + return true; } S32 LLPumpIO::setLock() @@ -412,24 +502,25 @@ void LLPumpIO::pump(const S32& poll_timeout) } // Poll based on the last known pollset - // *FIX: may want to pass in a poll timeout so it works correctly + // *TODO: may want to pass in a poll timeout so it works correctly // in single and multi threaded processes. PUMP_DEBUG; - typedef std::set signal_client_t; + typedef std::map signal_client_t; signal_client_t signalled_client; + const apr_pollfd_t* poll_fd = NULL; if(mPollset) { PUMP_DEBUG; //llinfos << "polling" << llendl; S32 count = 0; S32 client_id = 0; - const apr_pollfd_t* poll_fd = NULL; apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); PUMP_DEBUG; - for(S32 i = 0; i < count; ++i) + for(S32 ii = 0; ii < count; ++ii) { - client_id = *((S32*)poll_fd[i].client_data); - signalled_client.insert(client_id); + ll_debug_poll_fd("Signalled pipe", &poll_fd[ii]); + client_id = *((S32*)poll_fd[ii].client_data); + signalled_client[client_id] = ii; } PUMP_DEBUG; } @@ -515,16 +606,51 @@ void LLPumpIO::pump(const S32& poll_timeout) LLChainInfo::conditionals_t::iterator end; end = (*run_chain).mDescriptors.end(); S32 client_id = 0; + signal_client_t::iterator signal; for(; it != end; ++it) { PUMP_DEBUG; client_id = *((S32*)((*it).second.client_data)); - if(signalled_client.find(client_id) != not_signalled) + signal = signalled_client.find(client_id); + if (signal == not_signalled) continue; + static const apr_int16_t POLL_CHAIN_ERROR = + APR_POLLHUP | APR_POLLNVAL | APR_POLLERR; + const apr_pollfd_t* poll = &(poll_fd[(*signal).second]); + if(poll->rtnevents & POLL_CHAIN_ERROR) { - process_this_chain = true; + // Potential eror condition has been + // returned. If HUP was one of them, we pass + // that as the error even though there may be + // more. If there are in fact more errors, + // we'll just wait for that detection until + // the next pump() cycle to catch it so that + // the logic here gets no more strained than + // it already is. + LLIOPipe::EStatus error_status; + if(poll->rtnevents & APR_POLLHUP) + error_status = LLIOPipe::STATUS_LOST_CONNECTION; + else + error_status = LLIOPipe::STATUS_ERROR; + if(handleChainError(*run_chain, error_status)) break; + ll_debug_poll_fd("Removing pipe", poll); + llwarns << "Removing pipe " + << (*run_chain).mChainLinks[0].mPipe + << " '" +#if LL_DEBUG_PIPE_TYPE_IN_PUMP + << typeid( + *((*run_chain).mChainLinks[0].mPipe)).name() +#endif + << "' because: " + << events_2_string(poll->rtnevents) + << llendl; + (*run_chain).mHead = (*run_chain).mChainLinks.end(); break; } - //llinfos << "no fd ready for this one." << llendl; + + // at least 1 fd got signalled, and there were no + // errors. That means we process this chain. + process_this_chain = true; + break; } } } diff --git a/linden/indra/llmessage/llpumpio.h b/linden/indra/llmessage/llpumpio.h index a5a6419..68db329 100644 --- a/linden/indra/llmessage/llpumpio.h +++ b/linden/indra/llmessage/llpumpio.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -424,6 +424,20 @@ protected: * @return Retuns true if someone handled the error */ bool handleChainError(LLChainInfo& chain, LLIOPipe::EStatus error); + +public: + /** + * @brief Return number of running chains. + * + * *NOTE: This is only used in debugging and not considered + * efficient or safe enough for production use. + */ + running_chains_t::size_type runningChains() const + { + return mRunningChains.size(); + } + + }; diff --git a/linden/indra/llmessage/llqueryflags.h b/linden/indra/llmessage/llqueryflags.h index cf41d4e..1d8d500 100644 --- a/linden/indra/llmessage/llqueryflags.h +++ b/linden/indra/llmessage/llqueryflags.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llregionflags.h b/linden/indra/llmessage/llregionflags.h index bfae3ab..96b66ca 100644 --- a/linden/indra/llmessage/llregionflags.h +++ b/linden/indra/llmessage/llregionflags.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llregionhandle.h b/linden/indra/llmessage/llregionhandle.h index c3910dc..ac7fb14 100644 --- a/linden/indra/llmessage/llregionhandle.h +++ b/linden/indra/llmessage/llregionhandle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdappservices.cpp b/linden/indra/llmessage/llsdappservices.cpp index 849285c..b9cf868 100644 --- a/linden/indra/llmessage/llsdappservices.cpp +++ b/linden/indra/llmessage/llsdappservices.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdappservices.h b/linden/indra/llmessage/llsdappservices.h index bd9565b..e4a4448 100644 --- a/linden/indra/llmessage/llsdappservices.h +++ b/linden/indra/llmessage/llsdappservices.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdhttpserver.cpp b/linden/indra/llmessage/llsdhttpserver.cpp index ab5d6c7..24df589 100644 --- a/linden/indra/llmessage/llsdhttpserver.cpp +++ b/linden/indra/llmessage/llsdhttpserver.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdhttpserver.h b/linden/indra/llmessage/llsdhttpserver.h index a664eff..fedec8d 100644 --- a/linden/indra/llmessage/llsdhttpserver.h +++ b/linden/indra/llmessage/llsdhttpserver.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdmessagebuilder.cpp b/linden/indra/llmessage/llsdmessagebuilder.cpp index ab67d75..141ff79 100755 --- a/linden/indra/llmessage/llsdmessagebuilder.cpp +++ b/linden/indra/llmessage/llsdmessagebuilder.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdmessagebuilder.h b/linden/indra/llmessage/llsdmessagebuilder.h index 473c812..67ddfd8 100755 --- a/linden/indra/llmessage/llsdmessagebuilder.h +++ b/linden/indra/llmessage/llsdmessagebuilder.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdmessagereader.cpp b/linden/indra/llmessage/llsdmessagereader.cpp index 0b3056b..70cc455 100755 --- a/linden/indra/llmessage/llsdmessagereader.cpp +++ b/linden/indra/llmessage/llsdmessagereader.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdmessagereader.h b/linden/indra/llmessage/llsdmessagereader.h index bb04c78..698f751 100755 --- a/linden/indra/llmessage/llsdmessagereader.h +++ b/linden/indra/llmessage/llsdmessagereader.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdrpcclient.cpp b/linden/indra/llmessage/llsdrpcclient.cpp index 9922394..c67992d 100644 --- a/linden/indra/llmessage/llsdrpcclient.cpp +++ b/linden/indra/llmessage/llsdrpcclient.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdrpcclient.h b/linden/indra/llmessage/llsdrpcclient.h index 8ba7514..e8dcce7 100644 --- a/linden/indra/llmessage/llsdrpcclient.h +++ b/linden/indra/llmessage/llsdrpcclient.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdrpcserver.cpp b/linden/indra/llmessage/llsdrpcserver.cpp index 15d5389..5406e02 100644 --- a/linden/indra/llmessage/llsdrpcserver.cpp +++ b/linden/indra/llmessage/llsdrpcserver.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llsdrpcserver.h b/linden/indra/llmessage/llsdrpcserver.h index e539249..c3e1a1d 100644 --- a/linden/indra/llmessage/llsdrpcserver.h +++ b/linden/indra/llmessage/llsdrpcserver.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llservice.cpp b/linden/indra/llmessage/llservice.cpp index fbd2273..27a0053 100644 --- a/linden/indra/llmessage/llservice.cpp +++ b/linden/indra/llmessage/llservice.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llservice.h b/linden/indra/llmessage/llservice.h index ab35b0f..3c43c8f 100644 --- a/linden/indra/llmessage/llservice.h +++ b/linden/indra/llmessage/llservice.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llservicebuilder.cpp b/linden/indra/llmessage/llservicebuilder.cpp index ae46bc0..6ffd480 100644 --- a/linden/indra/llmessage/llservicebuilder.cpp +++ b/linden/indra/llmessage/llservicebuilder.cpp @@ -12,12 +12,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -116,6 +116,104 @@ std::string LLServiceBuilder::buildServiceURI( // Find the Service Name if(!service_url.empty() && option_map.isMap()) { + // throw in a ridiculously large limiter to make sure we don't + // loop forever with bad input. + int iterations = 100; + bool keep_looping = true; + while(keep_looping) + { + if(0 == --iterations) + { + keep_looping = false; + } + + int depth = 0; + int deepest = 0; + bool find_match = false; + std::string::iterator iter(service_url.begin()); + std::string::iterator end(service_url.end()); + std::string::iterator deepest_node(service_url.end()); + std::string::iterator deepest_node_end(service_url.end()); + for(; iter != end; ++iter) + { + switch(*iter) + { + case '{': + ++depth; + if(depth > deepest) + { + deepest = depth; + deepest_node = iter; + find_match = true; + } + break; + case '}': + --depth; + if(find_match) + { + deepest_node_end = iter; + find_match = false; + } + break; + default: + break; + } + } + if((deepest_node == end) || (deepest_node_end == end)) + { + break; + } + + // *NOTE: since the c++ implementation only understands + // params and straight string substitution, so it's a + // known distance of 2 to skip the directive. + std::string key(deepest_node + 2, deepest_node_end); + LLSD value = option_map[key]; + switch(*(deepest_node + 1)) + { + case '$': + if(value.isDefined()) + { + service_url.replace( + deepest_node, + deepest_node_end + 1, + value.asString()); + } + else + { + llinfos << "Unknown key: " << key << llendl; + keep_looping = false; + } + break; + case '%': + { + std::string query_str = LLURI::mapToQueryString(value); + service_url.replace( + deepest_node, + deepest_node_end + 1, + query_str); + } + break; + default: + llinfos << "Unknown directive: " << *(deepest_node + 1) + << llendl; + keep_looping = false; + break; + } + } + } + if (service_url.find('{') != std::string::npos) + { + llwarns << "Constructed a likely bogus service URL: " << service_url + << llendl; + } + return service_url; +} + + + +// Old, not as good implementation. Phoenix 2007-10-15 +#if 0 // Do brace replacements - NOT CURRENTLY RECURSIVE for(LLSD::map_const_iterator option_itr = option_map.beginMap(); option_itr != option_map.endMap(); @@ -157,3 +255,4 @@ std::string LLServiceBuilder::buildServiceURI( return service_url; } +#endif diff --git a/linden/indra/llmessage/llservicebuilder.h b/linden/indra/llmessage/llservicebuilder.h index d619963..f19ba9a 100644 --- a/linden/indra/llmessage/llservicebuilder.h +++ b/linden/indra/llmessage/llservicebuilder.h @@ -12,12 +12,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltaskname.h b/linden/indra/llmessage/lltaskname.h index 7ebb6fb..1a95f5e 100644 --- a/linden/indra/llmessage/lltaskname.h +++ b/linden/indra/llmessage/lltaskname.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llteleportflags.h b/linden/indra/llmessage/llteleportflags.h index 98ebd98..7f40f0a 100644 --- a/linden/indra/llmessage/llteleportflags.h +++ b/linden/indra/llmessage/llteleportflags.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltemplatemessagebuilder.cpp b/linden/indra/llmessage/lltemplatemessagebuilder.cpp index 8adeea4..cd06c07 100644 --- a/linden/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/linden/indra/llmessage/lltemplatemessagebuilder.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltemplatemessagebuilder.h b/linden/indra/llmessage/lltemplatemessagebuilder.h index 6389d8d..8f97711 100644 --- a/linden/indra/llmessage/lltemplatemessagebuilder.h +++ b/linden/indra/llmessage/lltemplatemessagebuilder.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltemplatemessagereader.cpp b/linden/indra/llmessage/lltemplatemessagereader.cpp index e27619d..0d81383 100644 --- a/linden/indra/llmessage/lltemplatemessagereader.cpp +++ b/linden/indra/llmessage/lltemplatemessagereader.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltemplatemessagereader.h b/linden/indra/llmessage/lltemplatemessagereader.h index ccf5a0f..1448c2d 100644 --- a/linden/indra/llmessage/lltemplatemessagereader.h +++ b/linden/indra/llmessage/lltemplatemessagereader.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llthrottle.cpp b/linden/indra/llmessage/llthrottle.cpp index 91a62ac..6afbf81 100644 --- a/linden/indra/llmessage/llthrottle.cpp +++ b/linden/indra/llmessage/llthrottle.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llthrottle.h b/linden/indra/llmessage/llthrottle.h index 0bfa288..55374a9 100644 --- a/linden/indra/llmessage/llthrottle.h +++ b/linden/indra/llmessage/llthrottle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfermanager.cpp b/linden/indra/llmessage/lltransfermanager.cpp index 78c8c50..6fbb4f9 100644 --- a/linden/indra/llmessage/lltransfermanager.cpp +++ b/linden/indra/llmessage/lltransfermanager.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -106,10 +106,15 @@ void LLTransferManager::cleanup() void LLTransferManager::updateTransfers() { - host_tc_map::iterator iter; - for (iter = mTransferConnections.begin(); iter != mTransferConnections.end(); iter++) + host_tc_map::iterator iter,cur; + + iter = mTransferConnections.begin(); + + while (iter !=mTransferConnections.end()) { - iter->second->updateTransfers(); + cur = iter; + iter++; + cur->second->updateTransfers(); } } @@ -571,7 +576,6 @@ void LLTransferManager::processTransferAbort(LLMessageSystem *msgp, void **) msgp->getUUID("TransferInfo", "TransferID", transfer_id); msgp->getS32("TransferInfo", "ChannelType", (S32 &)channel_type); - // See if it's a target that we're trying to abort // Find the transfer associated with this packet. LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(msgp->getSender(), channel_type); @@ -651,10 +655,14 @@ LLTransferConnection::~LLTransferConnection() void LLTransferConnection::updateTransfers() { // Do stuff for source transfers (basically, send data out). - tsc_iter iter; - for (iter = mTransferSourceChannels.begin(); iter != mTransferSourceChannels.end(); iter++) + tsc_iter iter, cur; + iter = mTransferSourceChannels.begin(); + + while (iter !=mTransferSourceChannels.end()) { - (*iter)->updateTransfers(); + cur = iter; + iter++; + (*cur)->updateTransfers(); } // Do stuff for target transfers @@ -768,14 +776,16 @@ void LLTransferSourceChannel::updateTransfers() return; } - LLPriQueueMap::pqm_iter iter; - + LLPriQueueMap::pqm_iter iter, next; BOOL done = FALSE; for (iter = mTransferSources.mMap.begin(); (iter != mTransferSources.mMap.end()) && !done;) { //llinfos << "LLTransferSourceChannel::updateTransfers()" << llendl; - // Do stuff. + // Do stuff. + next = iter; + next++; + LLTransferSource *tsp = iter->second; U8 *datap = NULL; S32 data_size = 0; @@ -793,11 +803,12 @@ void LLTransferSourceChannel::updateTransfers() // We don't have any data, but we're not done, just go on. // This will presumably be used for streaming or async transfers that // are stalled waiting for data from another source. - iter++; + iter=next; continue; } LLUUID *cb_uuid = new LLUUID(tsp->getID()); + LLUUID transaction_id = tsp->getID(); // Send the data now, even if it's an error. // The status code will tell the other end what to do. @@ -822,7 +833,17 @@ void LLTransferSourceChannel::updateTransfers() delete[] datap; datap = NULL; } - + + if (findTransferSource(transaction_id) == NULL) + { + //Warning! In the case of an aborted transfer, the sendReliable call above calls + //AbortTransfer which in turn calls deleteTransfer which means that somewhere way + //down the chain our current iter can get invalidated resulting in an infrequent + //sim crash. This check gets us to a valid transfer source in this event. + iter=next; + continue; + } + // Update the packet counter tsp->setLastPacketID(packet_id); @@ -839,7 +860,8 @@ void LLTransferSourceChannel::updateTransfers() tsp->completionCallback(status); delete tsp; - mTransferSources.mMap.erase(iter++); + mTransferSources.mMap.erase(iter); + iter = next; break; default: llerrs << "Unknown transfer error code!" << llendl; @@ -876,23 +898,20 @@ LLTransferSource *LLTransferSourceChannel::findTransferSource(const LLUUID &tran BOOL LLTransferSourceChannel::deleteTransfer(LLTransferSource *tsp) { + LLPriQueueMap::pqm_iter iter; for (iter = mTransferSources.mMap.begin(); iter != mTransferSources.mMap.end(); iter++) { if (iter->second == tsp) { - break; + delete tsp; + mTransferSources.mMap.erase(iter); + return TRUE; } } - if (iter == mTransferSources.mMap.end()) - { - llerrs << "Unable to find transfer source to delete!" << llendl; - return FALSE; - } - mTransferSources.mMap.erase(iter); - delete tsp; - return TRUE; + llerrs << "Unable to find transfer source to delete!" << llendl; + return FALSE; } @@ -1000,18 +1019,14 @@ BOOL LLTransferTargetChannel::deleteTransfer(LLTransferTarget *ttp) { if (*iter == ttp) { - break; + delete ttp; + mTransferTargets.erase(iter); + return TRUE; } } - if (iter == mTransferTargets.end()) - { - llerrs << "Unable to find transfer target to delete!" << llendl; - return FALSE; - } - mTransferTargets.erase(iter); - delete ttp; - return TRUE; + llerrs << "Unable to find transfer target to delete!" << llendl; + return FALSE; } @@ -1072,7 +1087,7 @@ void LLTransferSource::sendTransferStatus(LLTSCode status) void LLTransferSource::abortTransfer() { // Send a message down, call the completion callback - llinfos << "Aborting transfer " << getID() << " to " << mChannelp->getHost() << llendl; + llinfos << "LLTransferSource::Aborting transfer " << getID() << " to " << mChannelp->getHost() << llendl; gMessageSystem->newMessage("TransferAbort"); gMessageSystem->nextBlock("TransferInfo"); gMessageSystem->addUUID("TransferID", getID()); @@ -1204,7 +1219,7 @@ LLTransferTarget::~LLTransferTarget() void LLTransferTarget::abortTransfer() { // Send a message up, call the completion callback - llinfos << "Aborting transfer " << getID() << " from " << mChannelp->getHost() << llendl; + llinfos << "LLTransferTarget::Aborting transfer " << getID() << " from " << mChannelp->getHost() << llendl; gMessageSystem->newMessage("TransferAbort"); gMessageSystem->nextBlock("TransferInfo"); gMessageSystem->addUUID("TransferID", getID()); diff --git a/linden/indra/llmessage/lltransfermanager.h b/linden/indra/llmessage/lltransfermanager.h index 88bac76..03f94ad 100644 --- a/linden/indra/llmessage/lltransfermanager.h +++ b/linden/indra/llmessage/lltransfermanager.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfersourceasset.cpp b/linden/indra/llmessage/lltransfersourceasset.cpp index 1c019f1..fe04c67 100644 --- a/linden/indra/llmessage/lltransfersourceasset.cpp +++ b/linden/indra/llmessage/lltransfersourceasset.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfersourceasset.h b/linden/indra/llmessage/lltransfersourceasset.h index dafb15d..297521b 100644 --- a/linden/indra/llmessage/lltransfersourceasset.h +++ b/linden/indra/llmessage/lltransfersourceasset.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfersourcefile.cpp b/linden/indra/llmessage/lltransfersourcefile.cpp index 2d9fb91..55f368f 100644 --- a/linden/indra/llmessage/lltransfersourcefile.cpp +++ b/linden/indra/llmessage/lltransfersourcefile.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfersourcefile.h b/linden/indra/llmessage/lltransfersourcefile.h index ee3e893..1a9ff9e 100644 --- a/linden/indra/llmessage/lltransfersourcefile.h +++ b/linden/indra/llmessage/lltransfersourcefile.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfertargetfile.cpp b/linden/indra/llmessage/lltransfertargetfile.cpp index e8f8770..f1f602d 100644 --- a/linden/indra/llmessage/lltransfertargetfile.cpp +++ b/linden/indra/llmessage/lltransfertargetfile.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfertargetfile.h b/linden/indra/llmessage/lltransfertargetfile.h index 9f7560c..3f5284e 100644 --- a/linden/indra/llmessage/lltransfertargetfile.h +++ b/linden/indra/llmessage/lltransfertargetfile.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfertargetvfile.cpp b/linden/indra/llmessage/lltransfertargetvfile.cpp index 7490ea9..4c25f7b 100644 --- a/linden/indra/llmessage/lltransfertargetvfile.cpp +++ b/linden/indra/llmessage/lltransfertargetvfile.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lltransfertargetvfile.h b/linden/indra/llmessage/lltransfertargetvfile.h index 927c45e..29e868e 100644 --- a/linden/indra/llmessage/lltransfertargetvfile.h +++ b/linden/indra/llmessage/lltransfertargetvfile.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llurlrequest.cpp b/linden/indra/llmessage/llurlrequest.cpp index 35ee645..6c826cd 100644 --- a/linden/indra/llmessage/llurlrequest.cpp +++ b/linden/indra/llmessage/llurlrequest.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -487,6 +487,7 @@ bool LLURLRequest::configure() mDetail->mHeaders); } curl_easy_setopt(mDetail->mCurl, CURLOPT_URL, mDetail->mURL); + lldebugs << "URL: " << mDetail->mURL << llendl; curl_multi_add_handle(mDetail->mCurlMulti, mDetail->mCurl); mDetail->mNeedToRemoveEasyHandle = true; } diff --git a/linden/indra/llmessage/llurlrequest.h b/linden/indra/llmessage/llurlrequest.h index 5b67439..3b91a1d 100644 --- a/linden/indra/llmessage/llurlrequest.h +++ b/linden/indra/llmessage/llurlrequest.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -42,6 +42,7 @@ #include #include "lliopipe.h" #include "llchainio.h" +#include "llerror.h" class LLURLRequestDetail; @@ -62,6 +63,7 @@ class LLURLRequestComplete; */ class LLURLRequest : public LLIOPipe { + LOG_CLASS(LLURLRequest); public: /** * @brief This enumeration is for specifying the type of request. diff --git a/linden/indra/llmessage/lluseroperation.cpp b/linden/indra/llmessage/lluseroperation.cpp index 6708386..a891edf 100644 --- a/linden/indra/llmessage/lluseroperation.cpp +++ b/linden/indra/llmessage/lluseroperation.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/lluseroperation.h b/linden/indra/llmessage/lluseroperation.h index 7a1eea8..3421a64 100644 --- a/linden/indra/llmessage/lluseroperation.h +++ b/linden/indra/llmessage/lluseroperation.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llvehicleparams.h b/linden/indra/llmessage/llvehicleparams.h index d361aab..a49a4f4 100644 --- a/linden/indra/llmessage/llvehicleparams.h +++ b/linden/indra/llmessage/llvehicleparams.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer.cpp b/linden/indra/llmessage/llxfer.cpp index d8c180d..5430213 100644 --- a/linden/indra/llmessage/llxfer.cpp +++ b/linden/indra/llmessage/llxfer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer.h b/linden/indra/llmessage/llxfer.h index b8fbad9..603b4d7 100644 --- a/linden/indra/llmessage/llxfer.h +++ b/linden/indra/llmessage/llxfer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer_file.cpp b/linden/indra/llmessage/llxfer_file.cpp index 645d6c6..027bacb 100644 --- a/linden/indra/llmessage/llxfer_file.cpp +++ b/linden/indra/llmessage/llxfer_file.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer_file.h b/linden/indra/llmessage/llxfer_file.h index 75c6b8d..7958af1 100644 --- a/linden/indra/llmessage/llxfer_file.h +++ b/linden/indra/llmessage/llxfer_file.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer_mem.cpp b/linden/indra/llmessage/llxfer_mem.cpp index 3be0d3b..614f027 100644 --- a/linden/indra/llmessage/llxfer_mem.cpp +++ b/linden/indra/llmessage/llxfer_mem.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer_mem.h b/linden/indra/llmessage/llxfer_mem.h index c26208a..a3d6ca5 100644 --- a/linden/indra/llmessage/llxfer_mem.h +++ b/linden/indra/llmessage/llxfer_mem.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer_vfile.cpp b/linden/indra/llmessage/llxfer_vfile.cpp index f86384c..69d580a 100644 --- a/linden/indra/llmessage/llxfer_vfile.cpp +++ b/linden/indra/llmessage/llxfer_vfile.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfer_vfile.h b/linden/indra/llmessage/llxfer_vfile.h index 23262cd..8c0bebb 100644 --- a/linden/indra/llmessage/llxfer_vfile.h +++ b/linden/indra/llmessage/llxfer_vfile.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfermanager.cpp b/linden/indra/llmessage/llxfermanager.cpp index ab52231..e08acd9 100644 --- a/linden/indra/llmessage/llxfermanager.cpp +++ b/linden/indra/llmessage/llxfermanager.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxfermanager.h b/linden/indra/llmessage/llxfermanager.h index 1d29be1..7b3a888 100644 --- a/linden/indra/llmessage/llxfermanager.h +++ b/linden/indra/llmessage/llxfermanager.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxorcipher.cpp b/linden/indra/llmessage/llxorcipher.cpp index 7aea28e..da6123d 100644 --- a/linden/indra/llmessage/llxorcipher.cpp +++ b/linden/indra/llmessage/llxorcipher.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/llxorcipher.h b/linden/indra/llmessage/llxorcipher.h index ea8bc4c..73206b3 100644 --- a/linden/indra/llmessage/llxorcipher.h +++ b/linden/indra/llmessage/llxorcipher.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/machine.h b/linden/indra/llmessage/machine.h index 5cd2812..30da499 100644 --- a/linden/indra/llmessage/machine.h +++ b/linden/indra/llmessage/machine.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/mean_collision_data.h b/linden/indra/llmessage/mean_collision_data.h index bf92efd..1f245f9 100644 --- a/linden/indra/llmessage/mean_collision_data.h +++ b/linden/indra/llmessage/mean_collision_data.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp index fefbb4e..ee295d7 100644 --- a/linden/indra/llmessage/message.cpp +++ b/linden/indra/llmessage/message.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -705,21 +705,28 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) // But we don't want to acknowledge UseCircuitCode until the circuit is // available, which is why the acknowledgement test is done above. JC - valid_packet = mTemplateMessageReader->validateMessage(buffer, - receive_size, - host); + valid_packet = mTemplateMessageReader->validateMessage( + buffer, + receive_size, + host); // UseCircuitCode is allowed in even from an invalid circuit, so that // we can toss circuits around. - if(valid_packet && !cdp && - (mTemplateMessageReader->getMessageName() != _PREHASH_UseCircuitCode)) + if( + valid_packet && + !cdp && + (mTemplateMessageReader->getMessageName() != + _PREHASH_UseCircuitCode)) { logMsgFromInvalidCircuit( host, recv_reliable ); clearReceiveState(); valid_packet = FALSE; } - if(valid_packet && cdp && !cdp->getTrusted() && + if( + valid_packet && + cdp && + !cdp->getTrusted() && mTemplateMessageReader->isTrusted()) { logTrustedMsgFromUntrustedCircuit( host ); @@ -729,8 +736,9 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) valid_packet = FALSE; } - if (valid_packet - && mTemplateMessageReader->isBanned(cdp && cdp->getTrusted())) + if ( + valid_packet && + mTemplateMessageReader->isBanned(cdp && cdp->getTrusted())) { llwarns << "LLMessageSystem::checkMessages " << "received banned message " @@ -1100,6 +1108,17 @@ void LLMessageSystem::forwardReliable(const U32 circuit_code) sendReliable(findHost(circuit_code)); } +S32 LLMessageSystem::forwardReliable( const LLHost &host, + S32 retries, + BOOL ping_based_timeout, + F32 timeout, + void (*callback)(void **,S32), + void ** callback_data) +{ + copyMessageRtoS(); + return sendReliable(host, retries, ping_based_timeout, timeout, callback, callback_data); +} + S32 LLMessageSystem::flushSemiReliable(const LLHost &host, void (*callback)(void **,S32), void ** callback_data) { F32 timeout; @@ -1148,9 +1167,10 @@ LLHTTPClient::ResponderPtr LLMessageSystem::createResponder(const std::string& n { if(mSendReliable) { - return new LLFnPtrResponder(mReliablePacketParams.mCallback, - mReliablePacketParams.mCallbackData, - name); + return new LLFnPtrResponder( + mReliablePacketParams.mCallback, + mReliablePacketParams.mCallbackData, + name); } else { @@ -1159,8 +1179,10 @@ LLHTTPClient::ResponderPtr LLMessageSystem::createResponder(const std::string& n // llwarns << "LLMessageSystem::sendMessage: Sending unreliable " // << mMessageBuilder->getMessageName() << " message via HTTP" // << llendl; - return new LLFnPtrResponder(NULL, NULL, - mMessageBuilder->getMessageName()); + return new LLFnPtrResponder( + NULL, + NULL, + mMessageBuilder->getMessageName()); } } @@ -1230,8 +1252,11 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) LLSD message = mLLSDMessageBuilder->getMessage(); const LLHTTPSender& sender = LLHTTPSender::getSender(host); - sender.send(host, mLLSDMessageBuilder->getMessageName(), - message, createResponder(mLLSDMessageBuilder->getMessageName())); + sender.send( + host, + mLLSDMessageBuilder->getMessageName(), + message, + createResponder(mLLSDMessageBuilder->getMessageName())); mSendReliable = FALSE; mReliablePacketParams.clear(); @@ -1412,8 +1437,10 @@ void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_re } } -S32 LLMessageSystem::sendMessage(const LLHost &host, const char* name, - const LLSD& message) +S32 LLMessageSystem::sendMessage( + const LLHost &host, + const char* name, + const LLSD& message) { if (!(host.isOk())) { diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h index 0d43d6f..424674d 100644 --- a/linden/indra/llmessage/message.h +++ b/linden/indra/llmessage/message.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -464,6 +464,13 @@ public: void forwardMessage(const LLHost &host); void forwardReliable(const LLHost &host); void forwardReliable(const U32 circuit_code); + S32 forwardReliable( + const LLHost &host, + S32 retries, + BOOL ping_based_timeout, + F32 timeout, + void (*callback)(void **,S32), + void ** callback_data); LLHTTPClient::ResponderPtr createResponder(const std::string& name); S32 sendMessage(const LLHost &host); diff --git a/linden/indra/llmessage/message_prehash.cpp b/linden/indra/llmessage/message_prehash.cpp index 8f5edec..39a4f33 100644 --- a/linden/indra/llmessage/message_prehash.cpp +++ b/linden/indra/llmessage/message_prehash.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/message_prehash.h b/linden/indra/llmessage/message_prehash.h index 765dcca..1a22fba 100644 --- a/linden/indra/llmessage/message_prehash.h +++ b/linden/indra/llmessage/message_prehash.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/message_string_table.cpp b/linden/indra/llmessage/message_string_table.cpp index 1255b62..36d1de0 100644 --- a/linden/indra/llmessage/message_string_table.cpp +++ b/linden/indra/llmessage/message_string_table.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/net.cpp b/linden/indra/llmessage/net.cpp index cfe08fa..40c19a7 100644 --- a/linden/indra/llmessage/net.cpp +++ b/linden/indra/llmessage/net.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/net.h b/linden/indra/llmessage/net.h index 884ed82..ce070ed 100644 --- a/linden/indra/llmessage/net.h +++ b/linden/indra/llmessage/net.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/network.cpp b/linden/indra/llmessage/network.cpp index a0a0e55..8a6377b 100644 --- a/linden/indra/llmessage/network.cpp +++ b/linden/indra/llmessage/network.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/network.h b/linden/indra/llmessage/network.h index afb5a45..6cdd004 100644 --- a/linden/indra/llmessage/network.h +++ b/linden/indra/llmessage/network.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/partsyspacket.cpp b/linden/indra/llmessage/partsyspacket.cpp index 7f85613..50299dc 100644 --- a/linden/indra/llmessage/partsyspacket.cpp +++ b/linden/indra/llmessage/partsyspacket.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/partsyspacket.h b/linden/indra/llmessage/partsyspacket.h index dd26c6a..2b80883 100644 --- a/linden/indra/llmessage/partsyspacket.h +++ b/linden/indra/llmessage/partsyspacket.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/patch_code.cpp b/linden/indra/llmessage/patch_code.cpp index 4f3dd7e..29c7387 100644 --- a/linden/indra/llmessage/patch_code.cpp +++ b/linden/indra/llmessage/patch_code.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/patch_code.h b/linden/indra/llmessage/patch_code.h index 0642814..2226422 100644 --- a/linden/indra/llmessage/patch_code.h +++ b/linden/indra/llmessage/patch_code.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/patch_dct.cpp b/linden/indra/llmessage/patch_dct.cpp index 1ffacf8..542aeea 100644 --- a/linden/indra/llmessage/patch_dct.cpp +++ b/linden/indra/llmessage/patch_dct.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/patch_dct.h b/linden/indra/llmessage/patch_dct.h index e908948..db1628f 100644 --- a/linden/indra/llmessage/patch_dct.h +++ b/linden/indra/llmessage/patch_dct.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/patch_idct.cpp b/linden/indra/llmessage/patch_idct.cpp index b4196e7..add6e93 100644 --- a/linden/indra/llmessage/patch_idct.cpp +++ b/linden/indra/llmessage/patch_idct.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llmessage/sound_ids.h b/linden/indra/llmessage/sound_ids.h index 53f6b79..c62254f 100644 --- a/linden/indra/llmessage/sound_ids.h +++ b/linden/indra/llmessage/sound_ids.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/legacy_object_types.h b/linden/indra/llprimitive/legacy_object_types.h index badb848..8528a53 100644 --- a/linden/indra/llprimitive/legacy_object_types.h +++ b/linden/indra/llprimitive/legacy_object_types.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/llmaterialtable.cpp b/linden/indra/llprimitive/llmaterialtable.cpp index 736d63c..ee088d0 100644 --- a/linden/indra/llprimitive/llmaterialtable.cpp +++ b/linden/indra/llprimitive/llmaterialtable.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/llmaterialtable.h b/linden/indra/llprimitive/llmaterialtable.h index 34c1259..b620238 100644 --- a/linden/indra/llprimitive/llmaterialtable.h +++ b/linden/indra/llprimitive/llmaterialtable.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/llprimitive.cpp b/linden/indra/llprimitive/llprimitive.cpp index 99610dd..91d3c4e 100644 --- a/linden/indra/llprimitive/llprimitive.cpp +++ b/linden/indra/llprimitive/llprimitive.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -41,6 +41,7 @@ #include "llvolumemgr.h" #include "llstring.h" #include "lldatapacker.h" +#include "llsdutil.h" /** * exported constants @@ -1795,6 +1796,47 @@ void LLLightParams::copy(const LLNetworkData& data) mFalloff = param->mFalloff; } +LLSD LLLightParams::asLLSD() const +{ + LLSD sd; + + sd["color"] = ll_sd_from_color4(getColor()); + sd["radius"] = getRadius(); + sd["falloff"] = getFalloff(); + sd["cutoff"] = getCutoff(); + + return sd; +} + +bool LLLightParams::fromLLSD(LLSD& sd) +{ + const char *w; + w = "color"; + if (sd.has(w)) + { + setColor( ll_color4_from_sd(sd["color"]) ); + } else goto fail; + w = "radius"; + if (sd.has(w)) + { + setRadius( (F32)sd[w].asReal() ); + } else goto fail; + w = "falloff"; + if (sd.has(w)) + { + setFalloff( (F32)sd[w].asReal() ); + } else goto fail; + w = "cutoff"; + if (sd.has(w)) + { + setCutoff( (F32)sd[w].asReal() ); + } else goto fail; + + return true; + fail: + return false; +} + //============================================================================ LLFlexibleObjectData::LLFlexibleObjectData() @@ -1876,6 +1918,59 @@ void LLFlexibleObjectData::copy(const LLNetworkData& data) //mRenderingCollisionSphere = flex_data->mRenderingCollisionSphere; } +LLSD LLFlexibleObjectData::asLLSD() const +{ + LLSD sd; + + sd["air_friction"] = getAirFriction(); + sd["gravity"] = getGravity(); + sd["simulate_lod"] = getSimulateLOD(); + sd["tension"] = getTension(); + sd["user_force"] = getUserForce().getValue(); + sd["wind_sensitivity"] = getWindSensitivity(); + + return sd; +} + +bool LLFlexibleObjectData::fromLLSD(LLSD& sd) +{ + const char *w; + w = "air_friction"; + if (sd.has(w)) + { + setAirFriction( (F32)sd[w].asReal() ); + } else goto fail; + w = "gravity"; + if (sd.has(w)) + { + setGravity( (F32)sd[w].asReal() ); + } else goto fail; + w = "simulate_lod"; + if (sd.has(w)) + { + setSimulateLOD( sd[w].asInteger() ); + } else goto fail; + w = "tension"; + if (sd.has(w)) + { + setTension( (F32)sd[w].asReal() ); + } else goto fail; + w = "user_force"; + if (sd.has(w)) + { + LLVector3 user_force = ll_vector3_from_sd(sd[w], 0); + setUserForce( user_force ); + } else goto fail; + w = "wind_sensitivity"; + if (sd.has(w)) + { + setWindSensitivity( (F32)sd[w].asReal() ); + } else goto fail; + + return true; + fail: + return false; +} //============================================================================ @@ -1927,3 +2022,34 @@ void LLSculptParams::copy(const LLNetworkData& data) mSculptType = param->mSculptType; } + + +LLSD LLSculptParams::asLLSD() const +{ + LLSD sd; + + sd["texture"] = mSculptTexture; + sd["type"] = mSculptType; + + return sd; +} + +bool LLSculptParams::fromLLSD(LLSD& sd) +{ + const char *w; + w = "texture"; + if (sd.has(w)) + { + setSculptTexture( sd[w] ); + } else goto fail; + w = "type"; + if (sd.has(w)) + { + setSculptType( (U8)sd[w].asInteger() ); + } else goto fail; + + return true; + fail: + return false; +} + diff --git a/linden/indra/llprimitive/llprimitive.h b/linden/indra/llprimitive/llprimitive.h index ca024fb..3b43e8f 100644 --- a/linden/indra/llprimitive/llprimitive.h +++ b/linden/indra/llprimitive/llprimitive.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -141,7 +141,13 @@ public: /*virtual*/ BOOL unpack(LLDataPacker &dp); /*virtual*/ bool operator==(const LLNetworkData& data) const; /*virtual*/ void copy(const LLNetworkData& data); + // LLSD implementations here are provided by Eddy Stryker. + // NOTE: there are currently unused in protocols + LLSD asLLSD() const; + operator LLSD() const { return asLLSD(); } + bool fromLLSD(LLSD& sd); + void setColor(const LLColor4& color) { mColor = color; mColor.clamp(); } void setRadius(F32 radius) { mRadius = llclamp(radius, LIGHT_MIN_RADIUS, LIGHT_MAX_RADIUS); } void setFalloff(F32 falloff) { mFalloff = llclamp(falloff, LIGHT_MIN_FALLOFF, LIGHT_MAX_FALLOFF); } @@ -229,6 +235,9 @@ public: BOOL unpack(LLDataPacker &dp); bool operator==(const LLNetworkData& data) const; void copy(const LLNetworkData& data); + LLSD asLLSD() const; + operator LLSD() const { return asLLSD(); } + bool fromLLSD(LLSD& sd); };// end of attributes structure @@ -245,6 +254,9 @@ public: /*virtual*/ BOOL unpack(LLDataPacker &dp); /*virtual*/ bool operator==(const LLNetworkData& data) const; /*virtual*/ void copy(const LLNetworkData& data); + LLSD asLLSD() const; + operator LLSD() const { return asLLSD(); } + bool fromLLSD(LLSD& sd); void setSculptTexture(const LLUUID& id) { mSculptTexture = id; } LLUUID getSculptTexture() { return mSculptTexture; } diff --git a/linden/indra/llprimitive/llprimitive_vc9.vcproj b/linden/indra/llprimitive/llprimitive_vc9.vcproj new file mode 100644 index 0000000..427e752 --- /dev/null +++ b/linden/indra/llprimitive/llprimitive_vc9.vcproj @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llprimitive/lltextureanim.cpp b/linden/indra/llprimitive/lltextureanim.cpp index 155aa52..afdd3ba 100644 --- a/linden/indra/llprimitive/lltextureanim.cpp +++ b/linden/indra/llprimitive/lltextureanim.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/lltextureanim.h b/linden/indra/llprimitive/lltextureanim.h index 645be19..3fc4772 100644 --- a/linden/indra/llprimitive/lltextureanim.h +++ b/linden/indra/llprimitive/lltextureanim.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/lltextureentry.cpp b/linden/indra/llprimitive/lltextureentry.cpp index 3ad9087..9b13182 100644 --- a/linden/indra/llprimitive/lltextureentry.cpp +++ b/linden/indra/llprimitive/lltextureentry.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/lltextureentry.h b/linden/indra/llprimitive/lltextureentry.h index 3ad35d3..f933872 100644 --- a/linden/indra/llprimitive/lltextureentry.h +++ b/linden/indra/llprimitive/lltextureentry.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/lltree_common.h b/linden/indra/llprimitive/lltree_common.h index 71c2d19..b63e00a 100644 --- a/linden/indra/llprimitive/lltree_common.h +++ b/linden/indra/llprimitive/lltree_common.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/lltreeparams.cpp b/linden/indra/llprimitive/lltreeparams.cpp index faf1728..432707e 100644 --- a/linden/indra/llprimitive/lltreeparams.cpp +++ b/linden/indra/llprimitive/lltreeparams.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/lltreeparams.h b/linden/indra/llprimitive/lltreeparams.h index 1ed32d4..fe9ea62 100644 --- a/linden/indra/llprimitive/lltreeparams.h +++ b/linden/indra/llprimitive/lltreeparams.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/llvolumemessage.cpp b/linden/indra/llprimitive/llvolumemessage.cpp index ea93466..9f98f27 100644 --- a/linden/indra/llprimitive/llvolumemessage.cpp +++ b/linden/indra/llprimitive/llvolumemessage.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/llvolumemessage.h b/linden/indra/llprimitive/llvolumemessage.h index 3d1bb4c..7e52988 100644 --- a/linden/indra/llprimitive/llvolumemessage.h +++ b/linden/indra/llprimitive/llvolumemessage.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/llvolumexml.cpp b/linden/indra/llprimitive/llvolumexml.cpp index 0a904c9..2c83f68 100644 --- a/linden/indra/llprimitive/llvolumexml.cpp +++ b/linden/indra/llprimitive/llvolumexml.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/llvolumexml.h b/linden/indra/llprimitive/llvolumexml.h index 479e6dc..a6d0ed2 100644 --- a/linden/indra/llprimitive/llvolumexml.h +++ b/linden/indra/llprimitive/llvolumexml.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/material_codes.h b/linden/indra/llprimitive/material_codes.h index b0ee49d..968c54e 100644 --- a/linden/indra/llprimitive/material_codes.h +++ b/linden/indra/llprimitive/material_codes.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llprimitive/object_flags.h b/linden/indra/llprimitive/object_flags.h index b6485dd..2407126 100644 --- a/linden/indra/llprimitive/object_flags.h +++ b/linden/indra/llprimitive/object_flags.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llfont.cpp b/linden/indra/llrender/llfont.cpp index 3d0bb51..4b5ee64 100644 --- a/linden/indra/llrender/llfont.cpp +++ b/linden/indra/llrender/llfont.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -304,11 +304,11 @@ void LLFont::resetBitmap() { iter->second->mIsRendered = FALSE; } - + mRawImagep->clear(255, 0); mCurrentOffsetX = 1; mCurrentOffsetY = 1; - // Add the empty glyph + // Add the empty glyph`5 addGlyph(0, 0); } diff --git a/linden/indra/llrender/llfont.h b/linden/indra/llrender/llfont.h index a1eabe8..071e508 100644 --- a/linden/indra/llrender/llfont.h +++ b/linden/indra/llrender/llfont.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp index a7dec30..99f68d6 100644 --- a/linden/indra/llrender/llfontgl.cpp +++ b/linden/indra/llrender/llfontgl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llfontgl.h b/linden/indra/llrender/llfontgl.h index 42a6d2e..f740039 100644 --- a/linden/indra/llrender/llfontgl.h +++ b/linden/indra/llrender/llfontgl.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llgldbg.cpp b/linden/indra/llrender/llgldbg.cpp index 1bb43a2..953ba3a 100644 --- a/linden/indra/llrender/llgldbg.cpp +++ b/linden/indra/llrender/llgldbg.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llgldbg.h b/linden/indra/llrender/llgldbg.h index 1834693..0e1c986 100644 --- a/linden/indra/llrender/llgldbg.h +++ b/linden/indra/llrender/llgldbg.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp index 1fd730b..b2b08e0 100644 --- a/linden/indra/llrender/llimagegl.cpp +++ b/linden/indra/llrender/llimagegl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llimagegl.h b/linden/indra/llrender/llimagegl.h index 9ce7d28..afcb763 100644 --- a/linden/indra/llrender/llimagegl.h +++ b/linden/indra/llrender/llimagegl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -196,14 +196,4 @@ public: #endif }; -//RN: maybe this needs to moved elsewhere? -class LLImageProviderInterface -{ -public: - LLImageProviderInterface() {}; - virtual ~LLImageProviderInterface() {}; - - virtual LLImageGL* getUIImageByID(const LLUUID& id, BOOL clamped = TRUE) = 0; -}; - #endif // LL_LLIMAGEGL_H diff --git a/linden/indra/llrender/llrender_vc9.vcproj b/linden/indra/llrender/llrender_vc9.vcproj new file mode 100644 index 0000000..e4bc1b6 --- /dev/null +++ b/linden/indra/llrender/llrender_vc9.vcproj @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llrender/llvertexbuffer.cpp b/linden/indra/llrender/llvertexbuffer.cpp index 4e0d7fc..d19e885 100644 --- a/linden/indra/llrender/llvertexbuffer.cpp +++ b/linden/indra/llrender/llvertexbuffer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llvertexbuffer.h b/linden/indra/llrender/llvertexbuffer.h index f16c20e..43a32c9 100644 --- a/linden/indra/llrender/llvertexbuffer.h +++ b/linden/indra/llrender/llvertexbuffer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llvertexprogramgl.cpp b/linden/indra/llrender/llvertexprogramgl.cpp index 0935664..9f25582 100644 --- a/linden/indra/llrender/llvertexprogramgl.cpp +++ b/linden/indra/llrender/llvertexprogramgl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llrender/llvertexprogramgl.h b/linden/indra/llrender/llvertexprogramgl.h index b0ad5bb..f9190f9 100644 --- a/linden/indra/llrender/llvertexprogramgl.h +++ b/linden/indra/llrender/llvertexprogramgl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llalertdialog.cpp b/linden/indra/llui/llalertdialog.cpp index fd0262d..204fb10 100644 --- a/linden/indra/llui/llalertdialog.cpp +++ b/linden/indra/llui/llalertdialog.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -41,6 +41,7 @@ #include "llcheckboxctrl.h" #include "llkeyboard.h" #include "llfocusmgr.h" +#include "lliconctrl.h" #include "llui.h" #include "llxmlnode.h" #include "lllineeditor.h" @@ -143,6 +144,7 @@ LLAlertDialog::LLAlertDialog( const LLAlertDialogTemplate* xml_template, mDefaultOption( 0 ), mOptionChosen( -1 ), mCheck(NULL), + mCaution(xml_template->mCaution), mUnique(xml_template->mUnique), mIgnorable(xml_template->mIgnorable), mLabel(xml_template->mLabel), @@ -211,6 +213,16 @@ bool LLAlertDialog::show() } } + // If this is a caution message, change the color and add an icon. + if (mCaution) + { + setBackgroundColor( LLUI::sColorsGroup->getColor( "AlertCautionBoxColor" ) ); + } + else + { + setBackgroundColor( LLUI::sColorsGroup->getColor( "AlertBoxColor" ) ); + } + // Check to see if we are already displaying the alert if (mUnique) { @@ -311,19 +323,35 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa dialog_width = llmax(dialog_width, S32(font->getWidth( edit_text ) + 0.99f)); dialog_height += EDITOR_HEIGHT; } - + if (mCaution) + { + // Make room for the caution icon. + dialog_width += 32 + HPAD; + } reshape( dialog_width, dialog_height, FALSE ); S32 msg_y = mRect.getHeight() - VPAD; + S32 msg_x = HPAD; if (hasTitleBar()) { msg_y -= LINE_HEIGHT; // room for title } + if (mCaution) + { + LLIconCtrl* icon = new LLIconCtrl("icon", LLRect(msg_x, msg_y, msg_x+32, msg_y-32), "notify_caution_icon.tga"); + icon->setMouseOpaque(FALSE); + addChild(icon); + msg_x += 32 + HPAD; + msg_box->setColor( LLUI::sColorsGroup->getColor( "AlertCautionTextColor" ) ); + } + else + { + msg_box->setColor( LLUI::sColorsGroup->getColor( "AlertTextColor" ) ); + } LLRect rect; - rect.setLeftTopAndSize( HPAD, msg_y, text_rect.getWidth(), text_rect.getHeight() ); + rect.setLeftTopAndSize( msg_x, msg_y, text_rect.getWidth(), text_rect.getHeight() ); msg_box->setRect( rect ); - msg_box->setColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ); addChild(msg_box); // Buttons @@ -688,6 +716,15 @@ bool LLAlertDialog::parseAlerts(const LLString& xml_filename, LLControlGroup* se xml_template->mModal = modal; } } + // caution= + BOOL caution; + if (alert->getAttributeBOOL("caution", caution)) + { + if (xml_template) + { + xml_template->mCaution = caution; + } + } // unique= BOOL unique; if (alert->getAttributeBOOL("unique", unique)) diff --git a/linden/indra/llui/llalertdialog.h b/linden/indra/llui/llalertdialog.h index 016a4b4..31f4769 100644 --- a/linden/indra/llui/llalertdialog.h +++ b/linden/indra/llui/llalertdialog.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -78,6 +78,7 @@ public: bool setCheckBox( const LLString&, const LLString& ); void setOptionEnabled( S32 option, BOOL enable ); + void setCaution(BOOL val = TRUE) { mCaution = val; } // If mUnique==TRUE only one copy of this message should exist void setUnique(BOOL val = TRUE) { mUnique = val; } void setEditTextCallback(alert_text_callback_t callback, void *user_data); @@ -129,6 +130,7 @@ protected: S32 mDefaultOption; BOOL mOptionChosen; LLCheckBoxCtrl* mCheck; + BOOL mCaution; BOOL mUnique; S32 mIgnorable; LLString mLabel; @@ -163,7 +165,7 @@ private: class LLAlertDialogTemplate : public LLRefCount { public: - LLAlertDialogTemplate() : mTitle(), mURLOption(0), mModal(FALSE), mUnique(FALSE), mIgnorable(0), mDefaultOption(0) {} + LLAlertDialogTemplate() : mTitle(), mURLOption(0), mModal(FALSE), mCaution(FALSE), mUnique(FALSE), mIgnorable(0), mDefaultOption(0) {} void addOption(const LLString& label, const LLString& ignore_text, BOOL is_default = FALSE) { @@ -205,6 +207,7 @@ public: LLString mURL; // Some alerts will direct the resident to a URL S32 mURLOption; BOOL mModal; + BOOL mCaution; BOOL mUnique; S32 mIgnorable; // 0 = Never Ignore, 1 = Do default option, 2 = Do saved option std::vector mOptions; diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp index 71260b2..9fa1c8e 100644 --- a/linden/indra/llui/llbutton.cpp +++ b/linden/indra/llui/llbutton.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -59,9 +59,6 @@ S32 BTN_HEIGHT = 0; S32 BTN_GRID = 12; S32 BORDER_SIZE = 1; -// static -LLFrameTimer LLButton::sFlashingTimer; - LLButton::LLButton( const LLString& name, const LLRect& rect, const LLString& control_name, void (*click_callback)(void*), void *callback_data) : LLUICtrl(name, rect, TRUE, NULL, NULL), mClickedCallback( click_callback ), @@ -79,6 +76,7 @@ LLButton::LLButton( const LLString& name, const LLRect& rect, const LLString& co mImageDisabled( NULL ), mImageDisabledSelected( NULL ), mToggleState( FALSE ), + mIsToggle( FALSE ), mScaleImage( TRUE ), mDropShadowedText( TRUE ), mBorderEnabled( FALSE ), @@ -86,8 +84,6 @@ LLButton::LLButton( const LLString& name, const LLRect& rect, const LLString& co mHAlign( LLFontGL::HCENTER ), mLeftHPad( LLBUTTON_H_PAD ), mRightHPad( LLBUTTON_H_PAD ), - mFixedWidth( 16 ), - mFixedHeight( 16 ), mHoverGlowStrength(0.15f), mCurGlowStrength(0.f), mNeedsHighlight(FALSE), @@ -134,6 +130,7 @@ LLButton::LLButton(const LLString& name, const LLRect& rect, mImageDisabled( NULL ), mImageDisabledSelected( NULL ), mToggleState( FALSE ), + mIsToggle( FALSE ), mScaleImage( TRUE ), mDropShadowedText( TRUE ), mBorderEnabled( FALSE ), @@ -141,8 +138,6 @@ LLButton::LLButton(const LLString& name, const LLRect& rect, mHAlign( LLFontGL::HCENTER ), mLeftHPad( LLBUTTON_H_PAD ), mRightHPad( LLBUTTON_H_PAD ), - mFixedWidth( 16 ), - mFixedHeight( 16 ), mHoverGlowStrength(0.25f), mCurGlowStrength(0.f), mNeedsHighlight(FALSE), @@ -158,15 +153,11 @@ LLButton::LLButton(const LLString& name, const LLRect& rect, if( unselected_image_name != "" ) { + // user-specified image - don't use fixed borders unless requested setImageUnselected(unselected_image_name); setImageDisabled(unselected_image_name); mDisabledImageColor.mV[VALPHA] = 0.5f; - mImageDisabled = mImageUnselected; - mDisabledImageColor.mV[VALPHA] = 0.5f; - // user-specified image - don't use fixed borders unless requested - mFixedWidth = 0; - mFixedHeight = 0; mScaleImage = FALSE; } else @@ -177,13 +168,11 @@ LLButton::LLButton(const LLString& name, const LLRect& rect, if( selected_image_name != "" ) { + // user-specified image - don't use fixed borders unless requested setImageSelected(selected_image_name); setImageDisabledSelected(selected_image_name); mDisabledImageColor.mV[VALPHA] = 0.5f; - // user-specified image - don't use fixed borders unless requested - mFixedWidth = 0; - mFixedHeight = 0; mScaleImage = FALSE; } else @@ -273,6 +262,12 @@ void LLButton::onCommit() make_ui_sound("UISndClickRelease"); } + if (mIsToggle) + { + toggleState(); + } + + // do this last, as it can result in destroying this button if (mClickedCallback) { (*mClickedCallback)( mCallbackUserData ); @@ -286,6 +281,11 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) BOOL handled = FALSE; if( getVisible() && mEnabled && !called_from_parent && ' ' == uni_char && !gKeyboard->getKeyRepeated(' ')) { + if (mIsToggle) + { + toggleState(); + } + if (mClickedCallback) { (*mClickedCallback)( mCallbackUserData ); @@ -302,11 +302,17 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) { if( mCommitOnReturn && KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key)) { + if (mIsToggle) + { + toggleState(); + } + + handled = TRUE; + if (mClickedCallback) { (*mClickedCallback)( mCallbackUserData ); } - handled = TRUE; } } return handled; @@ -354,6 +360,9 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask) (*mMouseUpCallback)(mCallbackUserData); } + mMouseDownTimer.stop(); + mMouseDownTimer.reset(); + // DO THIS AT THE VERY END to allow the button to be destroyed as a result of being clicked. // If mouseup in the widget, it's been clicked if (pointInView(x, y)) @@ -363,6 +372,11 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask) make_ui_sound("UISndClickRelease"); } + if (mIsToggle) + { + toggleState(); + } + if (mClickedCallback) { (*mClickedCallback)( mCallbackUserData ); @@ -422,8 +436,10 @@ void LLButton::draw() BOOL flash = FALSE; if( mFlashing ) { - F32 elapsed = LLButton::sFlashingTimer.getElapsedTimeF32(); - flash = S32(elapsed * 2) & 1; + F32 elapsed = mFlashingTimer.getElapsedTimeF32(); + S32 flash_count = S32(elapsed * LLUI::sConfigGroup->getF32("ButtonFlashRate") * 2.f); + // flash on or off? + flash = (flash_count % 2 == 0) || flash_count > (F32)LLUI::sConfigGroup->getS32("ButtonFlashCount"); } BOOL pressed_by_keyboard = FALSE; @@ -443,24 +459,14 @@ void LLButton::draw() cursor_pos_gl.mY = llround((F32)cursor_pos_gl.mY / LLUI::sGLScaleFactor.mV[VY]); screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y); - BOOL pressed = pressed_by_keyboard || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)); - - BOOL display_state = FALSE; - if( pressed ) - { - mImagep = mImageSelected; - // show the resulting state after releasing the mouse button while it is down - display_state = mToggleState ? FALSE : TRUE; - } - else - { - display_state = mToggleState || flash; - } + BOOL pressed = pressed_by_keyboard + || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) + || mToggleState; BOOL use_glow_effect = FALSE; - if ( mNeedsHighlight ) + if ( mNeedsHighlight || flash ) { - if (display_state) + if (pressed) { if (mImageHoverSelected) { @@ -485,7 +491,7 @@ void LLButton::draw() } } } - else if ( display_state ) + else if ( pressed ) { mImagep = mImageSelected; } @@ -499,11 +505,11 @@ void LLButton::draw() // enabled and tentative // or // disabled but checked - if (!mImageDisabledSelected.isNull() && ( (mEnabled && mTentative) || (!mEnabled && display_state ) ) ) + if (!mImageDisabledSelected.isNull() && ( (mEnabled && mTentative) || (!mEnabled && pressed ) ) ) { mImagep = mImageDisabledSelected; } - else if (!mImageDisabled.isNull() && !mEnabled && !display_state) + else if (!mImageDisabled.isNull() && !mEnabled && !pressed) { mImagep = mImageDisabled; } @@ -516,33 +522,34 @@ void LLButton::draw() // Figure out appropriate color for the text LLColor4 label_color; + // label changes when button state changes, not when pressed if ( mEnabled ) { - if ( !display_state ) + if ( mToggleState ) { - label_color = mUnselectedLabelColor; + label_color = mSelectedLabelColor; } else { - label_color = mSelectedLabelColor; + label_color = mUnselectedLabelColor; } } else { - if ( !display_state ) + if ( mToggleState ) { - label_color = mDisabledLabelColor; + label_color = mDisabledSelectedLabelColor; } else { - label_color = mDisabledSelectedLabelColor; + label_color = mDisabledLabelColor; } } // Unselected label assignments LLWString label; - if( display_state ) + if( mToggleState ) { if( mEnabled || mDisabledSelectedLabel.empty() ) { @@ -591,24 +598,22 @@ void LLButton::draw() // Otherwise draw basic rectangular button. if( mImagep.notNull() && !mScaleImage) { - gl_draw_image( 0, 0, mImagep, mEnabled ? mImageColor : mDisabledImageColor ); + mImagep->draw(0, 0, mEnabled ? mImageColor : mDisabledImageColor ); if (mCurGlowStrength > 0.01f) { glBlendFunc(GL_SRC_ALPHA, GL_ONE); - gl_draw_scaled_image_with_border(0, 0, 0, 0, mImagep->getWidth(), mImagep->getHeight(), mImagep, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength), TRUE); + mImagep->drawSolid(0, 0, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } } else if ( mImagep.notNull() && mScaleImage) { - gl_draw_scaled_image_with_border(0, 0, mFixedWidth, mFixedHeight, mRect.getWidth(), mRect.getHeight(), - mImagep, mEnabled ? mImageColor : mDisabledImageColor ); + mImagep->draw(0, 0, mRect.getWidth(), mRect.getHeight(), mEnabled ? mImageColor : mDisabledImageColor ); if (mCurGlowStrength > 0.01f) { glBlendFunc(GL_SRC_ALPHA, GL_ONE); - gl_draw_scaled_image_with_border(0, 0, mFixedWidth, mFixedHeight, mRect.getWidth(), mRect.getHeight(), - mImagep, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength), TRUE); + mImagep->drawSolid(0, 0, mRect.getWidth(), mRect.getHeight(), LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } } @@ -620,13 +625,17 @@ void LLButton::draw() gl_rect_2d(0, mRect.getHeight(), mRect.getWidth(), 0, LLColor4::pink1, FALSE); } + // let overlay image and text play well together + S32 text_left = mLeftHPad; + S32 text_right = mRect.getWidth() - mRightHPad; + S32 text_width = mRect.getWidth() - mLeftHPad - mRightHPad; + // draw overlay image if (mImageOverlay.notNull()) { - const S32 IMG_PAD = 5; // get max width and height (discard level 0) - S32 overlay_width = mImageOverlay->getWidth(0); - S32 overlay_height = mImageOverlay->getHeight(0); + S32 overlay_width = mImageOverlay->getWidth(); + S32 overlay_height = mImageOverlay->getHeight(); F32 scale_factor = llmin((F32)mRect.getWidth() / (F32)overlay_width, (F32)mRect.getHeight() / (F32)overlay_height, 1.f); overlay_width = llround((F32)overlay_width * scale_factor); @@ -635,34 +644,49 @@ void LLButton::draw() S32 center_x = getLocalRect().getCenterX(); S32 center_y = getLocalRect().getCenterY(); + //FUGLY HACK FOR "DEPRESSED" BUTTONS + if (pressed) + { + center_y--; + center_x++; + } + + // fade out overlay images on disabled buttons + LLColor4 overlay_color = mImageOverlayColor; + if (!getEnabled()) + { + overlay_color.mV[VALPHA] = 0.5f; + } + switch(mImageOverlayAlignment) { case LLFontGL::LEFT: - gl_draw_scaled_image( - IMG_PAD, + text_left += overlay_width + 1; + text_width -= overlay_width + 1; + mImageOverlay->draw( + mLeftHPad, center_y - (overlay_height / 2), overlay_width, overlay_height, - mImageOverlay, - mImageOverlayColor); + overlay_color); break; case LLFontGL::HCENTER: - gl_draw_scaled_image( + mImageOverlay->draw( center_x - (overlay_width / 2), center_y - (overlay_height / 2), overlay_width, overlay_height, - mImageOverlay, - mImageOverlayColor); + overlay_color); break; case LLFontGL::RIGHT: - gl_draw_scaled_image( - mRect.getWidth() - IMG_PAD - overlay_width, + text_right -= overlay_width + 1; + text_width -= overlay_width + 1; + mImageOverlay->draw( + mRect.getWidth() - mRightHPad - overlay_width, center_y - (overlay_height / 2), overlay_width, overlay_height, - mImageOverlay, - mImageOverlayColor); + overlay_color); break; default: // draw nothing @@ -673,28 +697,26 @@ void LLButton::draw() // Draw label if( !label.empty() ) { - S32 drawable_width = mRect.getWidth() - mLeftHPad - mRightHPad; - LLWString::trim(label); S32 x; switch( mHAlign ) { case LLFontGL::RIGHT: - x = mRect.getWidth() - mRightHPad; + x = text_right; break; case LLFontGL::HCENTER: x = mRect.getWidth() / 2; break; case LLFontGL::LEFT: default: - x = mLeftHPad; + x = text_left; break; } S32 y_offset = 2 + (mRect.getHeight() - 20)/2; - if (pressed || display_state) + if (pressed) { y_offset--; x++; @@ -704,7 +726,7 @@ void LLButton::draw() label_color, mHAlign, LLFontGL::BOTTOM, mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NORMAL, - U32_MAX, drawable_width, + U32_MAX, text_width, NULL, FALSE, FALSE); } @@ -733,13 +755,11 @@ void LLButton::drawBorder(const LLColor4& color, S32 size) if (mScaleImage) { - gl_draw_scaled_image_with_border(left, bottom, mFixedWidth, mFixedHeight, right-left, top-bottom, - mImagep, color, TRUE ); + mImagep->drawSolid(left, bottom, right-left, top-bottom, color); } else { - gl_draw_scaled_image_with_border(left, bottom, 0, 0, mImagep->getWidth() + size * 2, - mImagep->getHeight() + size * 2, mImagep, color, TRUE ); + mImagep->drawSolid(left, bottom, mImagep->getWidth() + size * 2, mImagep->getHeight() + size * 2, color); } } @@ -763,6 +783,22 @@ void LLButton::setToggleState(BOOL b) } } +void LLButton::setFlashing( BOOL b ) +{ + if (b != mFlashing) + { + mFlashing = b; + mFlashingTimer.reset(); + } +} + + +BOOL LLButton::toggleState() +{ + setToggleState( !mToggleState ); + return mToggleState; +} + void LLButton::setValue(const LLSD& value ) { mToggleState = value.asBoolean(); @@ -770,7 +806,7 @@ void LLButton::setValue(const LLSD& value ) LLSD LLButton::getValue() const { - return mToggleState; + return mToggleState == TRUE; } void LLButton::setLabel( const LLStringExplicit& label ) @@ -807,10 +843,9 @@ void LLButton::setDisabledSelectedLabel( const LLStringExplicit& label ) mDisabledSelectedLabel = label; } -void LLButton::setImageUnselectedID( const LLUUID &image_id ) -{ - mImageUnselectedName = ""; - mImageUnselected = LLUI::sImageProvider->getUIImageByID(image_id); +void LLButton::setImageUnselected(LLPointer image) +{ + mImageUnselected = image; } void LLButton::setImages( const LLString &image_name, const LLString &selected_name ) @@ -820,10 +855,9 @@ void LLButton::setImages( const LLString &image_name, const LLString &selected_n } -void LLButton::setImageSelectedID( const LLUUID &image_id ) +void LLButton::setImageSelected(LLPointer image) { - mImageSelectedName = ""; - mImageSelected = LLUI::sImageProvider->getUIImageByID(image_id); + mImageSelected = image; } void LLButton::setImageColor(const LLColor4& c) @@ -831,19 +865,22 @@ void LLButton::setImageColor(const LLColor4& c) mImageColor = c; } +void LLButton::setColor(const LLColor4& color) +{ + setImageColor(color); +} + -void LLButton::setImageDisabledID( const LLUUID &image_id ) +void LLButton::setImageDisabled(LLPointer image) { - mImageDisabledName = ""; - mImageDisabled = LLUI::sImageProvider->getUIImageByID(image_id); + mImageDisabled = image; mDisabledImageColor = mImageColor; mDisabledImageColor.mV[VALPHA] *= 0.5f; } -void LLButton::setImageDisabledSelectedID( const LLUUID &image_id ) -{ - mImageDisabledSelectedName = ""; - mImageDisabledSelected = LLUI::sImageProvider->getUIImageByID(image_id); +void LLButton::setImageDisabledSelected(LLPointer image) +{ + mImageDisabledSelected = image; mDisabledImageColor = mImageColor; mDisabledImageColor.mV[VALPHA] *= 0.5f; } @@ -855,11 +892,9 @@ void LLButton::setDisabledImages( const LLString &image_name, const LLString &se mDisabledImageColor = c; } - -void LLButton::setImageHoverSelectedID( const LLUUID& image_id ) +void LLButton::setImageHoverSelected(LLPointer image) { - mImageHoverSelectedName = ""; - mImageHoverSelected = LLUI::sImageProvider->getUIImageByID(image_id); + mImageHoverSelected = image; } void LLButton::setDisabledImages( const LLString &image_name, const LLString &selected_name) @@ -869,10 +904,9 @@ void LLButton::setDisabledImages( const LLString &image_name, const LLString &se setDisabledImages( image_name, selected_name, clr ); } -void LLButton::setImageHoverUnselectedID( const LLUUID& image_id ) +void LLButton::setImageHoverUnselected(LLPointer image) { - mImageHoverUnselectedName = ""; - mImageHoverUnselected = LLUI::sImageProvider->getUIImageByID(image_id); + mImageHoverUnselected = image; } void LLButton::setHoverImages( const LLString& image_name, const LLString& selected_name ) @@ -889,8 +923,7 @@ void LLButton::setImageOverlay(const LLString &image_name, LLFontGL::HAlign alig } else { - LLUUID overlay_image_id = LLUI::findAssetUUIDByName(image_name); - mImageOverlay = LLUI::sImageProvider->getUIImageByID(overlay_image_id); + mImageOverlay = LLUI::getUIImageByName(image_name); mImageOverlayAlignment = alignment; mImageOverlayColor = color; } @@ -904,34 +937,6 @@ void LLButton::onMouseCaptureLost() } //------------------------------------------------------------------------- -// LLSquareButton -//------------------------------------------------------------------------- -LLSquareButton::LLSquareButton(const LLString& name, const LLRect& rect, - const LLString& label, - const LLFontGL *font, - const LLString& control_name, - void (*click_callback)(void*), - void *callback_data, - const LLString& selected_label ) -: LLButton(name, rect, "","", - control_name, - click_callback, callback_data, - font, - label, - (selected_label.empty() ? label : selected_label) ) -{ - setImageUnselected("square_btn_32x128.tga"); - // mImageUnselected = LLUI::sImageProvider->getUIImageByID(LLUUID(LLUI::sAssetsGroup->getString("square_btn_32x128.tga"))); - setImageSelected("square_btn_selected_32x128.tga"); - // mImageSelectedImage = LLUI::sImageProvider->getUIImageByID(LLUUID(LLUI::sAssetsGroup->getString("square_btn_selected_32x128.tga"))); - setImageDisabled("square_btn_32x128.tga"); - //mDisabledImage = LLUI::sImageProvider->getUIImageByID(LLUUID(LLUI::sAssetsGroup->getString("square_btn_32x128.tga"))); - setImageDisabledSelected("square_btn_selected_32x128.tga"); - //mDisabledSelectedImage = LLUI::sImageProvider->getUIImageByID(LLUUID(LLUI::sAssetsGroup->getString("square_btn_selected_32x128.tga"))); - mImageColor = LLUI::sColorsGroup->getColor("ButtonColor"); -} - -//------------------------------------------------------------------------- // Utilities //------------------------------------------------------------------------- S32 round_up(S32 grid, S32 value) @@ -951,37 +956,37 @@ S32 round_up(S32 grid, S32 value) void LLButton::setImageUnselected(const LLString &image_name) { - setImageUnselectedID(LLUI::findAssetUUIDByName(image_name)); + setImageUnselected(LLUI::getUIImageByName(image_name)); mImageUnselectedName = image_name; } void LLButton::setImageSelected(const LLString &image_name) { - setImageSelectedID(LLUI::findAssetUUIDByName(image_name)); + setImageSelected(LLUI::getUIImageByName(image_name)); mImageSelectedName = image_name; } void LLButton::setImageHoverSelected(const LLString &image_name) { - setImageHoverSelectedID(LLUI::findAssetUUIDByName(image_name)); + setImageHoverSelected(LLUI::getUIImageByName(image_name)); mImageHoverSelectedName = image_name; } void LLButton::setImageHoverUnselected(const LLString &image_name) { - setImageHoverUnselectedID(LLUI::findAssetUUIDByName(image_name)); + setImageHoverUnselected(LLUI::getUIImageByName(image_name)); mImageHoverUnselectedName = image_name; } void LLButton::setImageDisabled(const LLString &image_name) { - setImageDisabledID(LLUI::findAssetUUIDByName(image_name)); + setImageDisabled(LLUI::getUIImageByName(image_name)); mImageDisabledName = image_name; } void LLButton::setImageDisabledSelected(const LLString &image_name) { - setImageDisabledSelectedID(LLUI::findAssetUUIDByName(image_name)); + setImageDisabledSelected(LLUI::getUIImageByName(image_name)); mImageDisabledSelectedName = image_name; } @@ -1009,8 +1014,6 @@ LLXMLNodePtr LLButton::getXML(bool save_children) const node->createChild("label_selected", TRUE)->setStringValue(getLabelSelected()); node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont)); node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign)); - node->createChild("border_width", TRUE)->setIntValue(mFixedWidth); - node->createChild("border_height", TRUE)->setIntValue(mFixedHeight); addImageAttributeToXML(node,mImageUnselectedName,mImageUnselectedID,"image_unselected"); addImageAttributeToXML(node,mImageSelectedName,mImageSelectedID,"image_selected"); @@ -1092,8 +1095,12 @@ LLView* LLButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fa label, label_selected); - node->getAttributeS32("border_width", button->mFixedWidth); - node->getAttributeS32("border_height", button->mFixedHeight); + node->getAttributeS32("pad_right", button->mRightHPad); + node->getAttributeS32("pad_left", button->mLeftHPad); + + BOOL is_toggle = button->getIsToggle(); + node->getAttributeBOOL("toggle", is_toggle); + button->setIsToggle(is_toggle); if(image_hover_selected != LLString::null) button->setImageHoverSelected(image_hover_selected); diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h index 6a2b4a1..7d50f40 100644 --- a/linden/indra/llui/llbutton.h +++ b/linden/indra/llui/llbutton.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -114,11 +114,13 @@ public: F32 getHeldDownTime() const { return mMouseDownTimer.getElapsedTimeF32(); } - BOOL toggleState() { setToggleState( !mToggleState ); return mToggleState; } + BOOL getIsToggle() const { return mIsToggle; } + void setIsToggle(BOOL is_toggle) { mIsToggle = is_toggle; } + BOOL toggleState(); BOOL getToggleState() const { return mToggleState; } void setToggleState(BOOL b); - void setFlashing( BOOL b ) { mFlashing = b; } + void setFlashing( BOOL b ); BOOL getFlashing() const { return mFlashing; } void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; } @@ -128,14 +130,11 @@ public: const LLString getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); } const LLString getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); } - - // HACK to allow images to be freed when the caller knows he's done with it. - LLImageGL* getImageUnselected() const { return mImageUnselected; } - void setImageColor(const LLString& color_control); - void setImages(const LLString &image_name, const LLString &selected_name); void setImageColor(const LLColor4& c); - + virtual void setColor(const LLColor4& c); + + void setImages(const LLString &image_name, const LLString &selected_name); void setDisabledImages(const LLString &image_name, const LLString &selected_name); void setDisabledImages(const LLString &image_name, const LLString &selected_name, const LLColor4& c); @@ -146,7 +145,7 @@ public: void setDisabledSelectedLabelColor( const LLColor4& c ) { mDisabledSelectedLabelColor = c; } void setImageOverlay(const LLString &image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white); - LLPointer getImageOverlay() { return mImageOverlay; } + LLPointer getImageOverlay() { return mImageOverlay; } virtual void setValue(const LLSD& value ); @@ -170,16 +169,8 @@ public: static void onHeldDown(void *userdata); // to be called by gIdleCallbacks - void setFixedBorder(S32 width, S32 height) { mFixedWidth = width; mFixedHeight = height; } void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; } -private: - void setImageUnselectedID(const LLUUID &image_id); - void setImageSelectedID(const LLUUID &image_id); - void setImageHoverSelectedID(const LLUUID &image_id); - void setImageHoverUnselectedID(const LLUUID &image_id); - void setImageDisabledID(const LLUUID &image_id); - void setImageDisabledSelectedID(const LLUUID &image_id); public: void setImageUnselected(const LLString &image_name); void setImageSelected(const LLString &image_name); @@ -187,6 +178,14 @@ public: void setImageHoverUnselected(const LLString &image_name); void setImageDisabled(const LLString &image_name); void setImageDisabledSelected(const LLString &image_name); + + void setImageUnselected(LLPointer image); + void setImageSelected(LLPointer image); + void setImageHoverSelected(LLPointer image); + void setImageHoverUnselected(LLPointer image); + void setImageDisabled(LLPointer image); + void setImageDisabledSelected(LLPointer image); + void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } BOOL getCommitOnReturn() { return mCommitOnReturn; } @@ -209,27 +208,27 @@ protected: F32 mHeldDownDelay; // seconds, after which held-down callbacks get called S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called - LLPointer mImageOverlay; + LLPointer mImageOverlay; LLFontGL::HAlign mImageOverlayAlignment; LLColor4 mImageOverlayColor; - LLPointer mImageUnselected; + LLPointer mImageUnselected; LLUIString mUnselectedLabel; LLColor4 mUnselectedLabelColor; - LLPointer mImageSelected; + LLPointer mImageSelected; LLUIString mSelectedLabel; LLColor4 mSelectedLabelColor; - LLPointer mImageHoverSelected; + LLPointer mImageHoverSelected; - LLPointer mImageHoverUnselected; + LLPointer mImageHoverUnselected; - LLPointer mImageDisabled; + LLPointer mImageDisabled; LLUIString mDisabledLabel; LLColor4 mDisabledLabelColor; - LLPointer mImageDisabledSelected; + LLPointer mImageDisabledSelected; LLUIString mDisabledSelectedLabel; LLColor4 mDisabledSelectedLabelColor; @@ -254,6 +253,7 @@ protected: LLColor4 mImageColor; LLColor4 mDisabledImageColor; + BOOL mIsToggle; BOOL mToggleState; BOOL mScaleImage; @@ -267,9 +267,6 @@ protected: S32 mLeftHPad; S32 mRightHPad; - S32 mFixedWidth; - S32 mFixedHeight; - F32 mHoverGlowStrength; F32 mCurGlowStrength; @@ -278,22 +275,9 @@ protected: LLString mHelpURL; - LLPointer mImagep; - - static LLFrameTimer sFlashingTimer; -}; + LLPointer mImagep; -class LLSquareButton -: public LLButton -{ -public: - LLSquareButton(const LLString& name, const LLRect& rect, - const LLString& label, - const LLFontGL *font = NULL, - const LLString& control_name = LLString(), - void (*click_callback)(void*) = NULL, - void *callback_data = NULL, - const LLString& selected_label = LLString::null ); + LLFrameTimer mFlashingTimer; }; // Helpful functions diff --git a/linden/indra/llui/llcallbackmap.h b/linden/indra/llui/llcallbackmap.h index 6b40f09..9241751 100644 --- a/linden/indra/llui/llcallbackmap.h +++ b/linden/indra/llui/llcallbackmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llcheckboxctrl.cpp b/linden/indra/llui/llcheckboxctrl.cpp index b184eda..ff46a80 100644 --- a/linden/indra/llui/llcheckboxctrl.cpp +++ b/linden/indra/llui/llcheckboxctrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -75,7 +75,7 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect, } // must be big enough to hold all children - setSpanChildren(TRUE); + setUseBoundingRect(TRUE); mKeyboardFocusOnClick = TRUE; @@ -130,6 +130,7 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect, mButton->setDisabledImages( inactive_false_id, inactive_true_id ); mButton->setHoverGlowStrength(0.35f); } + mButton->setIsToggle(TRUE); mButton->setToggleState( initial_value ); mButton->setFollowsLeft(); mButton->setFollowsBottom(); @@ -150,16 +151,11 @@ void LLCheckBoxCtrl::onButtonPress( void *userdata ) if (self->mRadioStyle) { - if (!self->getValue()) - { - self->setValue(TRUE); - } - } - else - { - self->toggle(); + self->setValue(TRUE); } + self->setControlValue(self->getValue()); + // HACK: because buttons don't normally commit self->onCommit(); if (self->mKeyboardFocusOnClick) @@ -232,14 +228,13 @@ void LLCheckBoxCtrl::draw() //virtual void LLCheckBoxCtrl::setValue(const LLSD& value ) { - mSetValue = value.asBoolean(); - mButton->setToggleState( mSetValue ); + mButton->setValue( value ); } //virtual LLSD LLCheckBoxCtrl::getValue() const { - return mButton->getToggleState(); + return mButton->getValue(); } void LLCheckBoxCtrl::setLabel( const LLStringExplicit& label ) diff --git a/linden/indra/llui/llcheckboxctrl.h b/linden/indra/llui/llcheckboxctrl.h index 3fd0be7..1f92708 100644 --- a/linden/indra/llui/llcheckboxctrl.h +++ b/linden/indra/llui/llcheckboxctrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llclipboard.cpp b/linden/indra/llui/llclipboard.cpp index 774bad6..eaf7798 100644 --- a/linden/indra/llui/llclipboard.cpp +++ b/linden/indra/llui/llclipboard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llclipboard.h b/linden/indra/llui/llclipboard.h index d4efc3a..82ea334 100644 --- a/linden/indra/llui/llclipboard.h +++ b/linden/indra/llui/llclipboard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index cfdcf58..22b5033 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -55,17 +55,16 @@ // Globals S32 LLCOMBOBOX_HEIGHT = 0; S32 LLCOMBOBOX_WIDTH = 0; - +S32 MAX_COMBO_WIDTH = 500; + LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString& label, void (*commit_callback)(LLUICtrl*,void*), void *callback_userdata ) : LLUICtrl(name, rect, TRUE, commit_callback, callback_userdata, FOLLOWS_LEFT | FOLLOWS_TOP), - mDrawArrow(TRUE), mTextEntry(NULL), mArrowImage(NULL), - mArrowImageWidth(8), mAllowTextEntry(FALSE), mMaxChars(20), mTextEntryTentative(TRUE), @@ -73,55 +72,43 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString mPrearrangeCallback( NULL ), mTextEntryCallback( NULL ) { - // For now, all comboboxes don't take keyboard focus when clicked. - // This might change if it is part of a modal dialog. - // mKeyboardFocusOnClick = FALSE; - - // Revert to standard behavior. When this control's parent is hidden, it needs to - // hide this ctrl--which won't just happen automatically since when LLComboBox is - // showing its list, it's also set to TopCtrl. When keyboard focus is cleared all - // controls (including this one) know that they are no longer editing. - mKeyboardFocusOnClick = TRUE; - - LLRect r; - r.setOriginAndSize(0, 0, rect.getWidth(), rect.getHeight()); - // Always use text box // Text label button - mButton = new LLSquareButton("comboxbox button", - r, label, NULL, LLString::null, + mButton = new LLButton("comboxbox button", + LLRect(), label, NULL, LLString::null, NULL, this); + mButton->setImageUnselected("square_btn_32x128.tga"); + mButton->setImageSelected("square_btn_selected_32x128.tga"); + mButton->setImageDisabled("square_btn_32x128.tga"); + mButton->setImageDisabledSelected("square_btn_selected_32x128.tga"); + mButton->setScaleImage(TRUE); + mButton->setMouseDownCallback(onButtonDown); mButton->setFont(LLFontGL::sSansSerifSmall); mButton->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM | FOLLOWS_RIGHT); mButton->setHAlign( LLFontGL::LEFT ); - - const S32 ARROW_WIDTH = 16; - mButton->setRightHPad( ARROW_WIDTH ); + mButton->setRightHPad(2); addChild(mButton); - // Default size, will be set by arrange() call in button callback. - S32 list_width = mRect.getWidth() + SCROLLBAR_SIZE; - r.setOriginAndSize(0, 16, list_width, 220); - // disallow multiple selection mList = new LLScrollListCtrl( - "ComboBox", r, + "ComboBox", LLRect(), &LLComboBox::onItemSelected, this, FALSE); mList->setVisible(FALSE); mList->setBgWriteableColor( LLColor4(1,1,1,1) ); mList->setCommitOnKeyboardMovement(FALSE); - mList->setFocusChangedCallback(onListFocusChanged); addChild(mList); LLRect border_rect(0, mRect.getHeight(), mRect.getWidth(), 0); mBorder = new LLViewBorder( "combo border", border_rect ); addChild( mBorder ); - mBorder->setFollows(FOLLOWS_LEFT|FOLLOWS_RIGHT|FOLLOWS_TOP|FOLLOWS_BOTTOM); + mBorder->setFollowsAll(); LLUUID arrow_image_id( LLUI::sAssetsGroup->getString("combobox_arrow.tga") ); - mArrowImage = LLUI::sImageProvider->getUIImageByID(arrow_image_id); - mArrowImageWidth = llmax(8,mArrowImage->getWidth(0)); // In case image hasn't loaded yet + mArrowImage = LLUI::sImageProvider->getImageByID(arrow_image_id); + mButton->setImageOverlay("combobox_arrow.tga", LLFontGL::RIGHT); + + updateLayout(); } @@ -155,7 +142,7 @@ LLXMLNodePtr LLComboBox::getXML(bool save_children) const LLSD value = item->getValue(); item_node->createChild("value", TRUE)->setStringValue(value.asString()); item_node->createChild("enabled", TRUE)->setBoolValue(item->getEnabled()); - item_node->setStringValue(cell->getText()); + item_node->setStringValue(cell->getValue().asString()); } } @@ -272,34 +259,46 @@ void LLComboBox::resetDirty() // add item "name" to menu -void LLComboBox::add(const LLString& name, EAddPosition pos, BOOL enabled) +LLScrollListItem* LLComboBox::add(const LLString& name, EAddPosition pos, BOOL enabled) { - mList->addSimpleItem(name, pos, enabled); + LLScrollListItem* item = mList->addSimpleElement(name, pos); + item->setEnabled(enabled); mList->selectFirstItem(); + return item; } // add item "name" with a unique id to menu -void LLComboBox::add(const LLString& name, const LLUUID& id, EAddPosition pos, BOOL enabled ) +LLScrollListItem* LLComboBox::add(const LLString& name, const LLUUID& id, EAddPosition pos, BOOL enabled ) { - mList->addSimpleItem(name, LLSD(id), pos, enabled); + LLScrollListItem* item = mList->addSimpleElement(name, pos, id); + item->setEnabled(enabled); mList->selectFirstItem(); + return item; } // add item "name" with attached userdata -void LLComboBox::add(const LLString& name, void* userdata, EAddPosition pos, BOOL enabled ) +LLScrollListItem* LLComboBox::add(const LLString& name, void* userdata, EAddPosition pos, BOOL enabled ) { - LLScrollListItem* item = mList->addSimpleItem(name, pos, enabled); + LLScrollListItem* item = mList->addSimpleElement(name, pos); + item->setEnabled(enabled); item->setUserdata( userdata ); mList->selectFirstItem(); + return item; } // add item "name" with attached generic data -void LLComboBox::add(const LLString& name, LLSD value, EAddPosition pos, BOOL enabled ) +LLScrollListItem* LLComboBox::add(const LLString& name, LLSD value, EAddPosition pos, BOOL enabled ) { - mList->addSimpleItem(name, value, pos, enabled); + LLScrollListItem* item = mList->addSimpleElement(name, pos, value); + item->setEnabled(enabled); mList->selectFirstItem(); + return item; } +LLScrollListItem* LLComboBox::addSeparator(EAddPosition pos) +{ + return mList->addSeparator(pos); +} void LLComboBox::sortByName() { @@ -311,7 +310,7 @@ void LLComboBox::sortByName() // Returns TRUE if the item was found. BOOL LLComboBox::setSimple(const LLStringExplicit& name) { - BOOL found = mList->selectSimpleItem(name, FALSE); + BOOL found = mList->selectItemByLabel(name, FALSE); if (found) { @@ -330,14 +329,14 @@ void LLComboBox::setValue(const LLSD& value) LLScrollListItem* item = mList->getFirstSelected(); if (item) { - setLabel( mList->getSimpleSelectedItem() ); + setLabel( mList->getSelectedItemLabel() ); } } } -const LLString& LLComboBox::getSimple() const +const LLString LLComboBox::getSimple() const { - const LLString& res = mList->getSimpleSelectedItem(); + const LLString res = mList->getSelectedItemLabel(); if (res.empty() && mAllowTextEntry) { return mTextEntry->getText(); @@ -348,9 +347,9 @@ const LLString& LLComboBox::getSimple() const } } -const LLString& LLComboBox::getSimpleSelectedItem(S32 column) const +const LLString LLComboBox::getSelectedItemLabel(S32 column) const { - return mList->getSimpleSelectedItem(column); + return mList->getSelectedItemLabel(column); } // virtual @@ -373,10 +372,10 @@ LLSD LLComboBox::getValue() const void LLComboBox::setLabel(const LLStringExplicit& name) { - if ( mAllowTextEntry ) + if ( mTextEntry ) { mTextEntry->setText(name); - if (mList->selectSimpleItem(name, FALSE)) + if (mList->selectItemByLabel(name, FALSE)) { mTextEntry->setTentative(FALSE); } @@ -385,7 +384,8 @@ void LLComboBox::setLabel(const LLStringExplicit& name) mTextEntry->setTentative(mTextEntryTentative); } } - else + + if (!mAllowTextEntry) { mButton->setLabelUnselected(name); mButton->setLabelSelected(name); @@ -397,7 +397,7 @@ void LLComboBox::setLabel(const LLStringExplicit& name) BOOL LLComboBox::remove(const LLString& name) { - BOOL found = mList->selectSimpleItem(name); + BOOL found = mList->selectItemByLabel(name); if (found) { @@ -433,16 +433,21 @@ void LLComboBox::onFocusLost() LLUICtrl::onFocusLost(); } +void LLComboBox::onLostTop() +{ + hideList(); +} + + void LLComboBox::setButtonVisible(BOOL visible) { mButton->setVisible(visible); - mDrawArrow = visible; if (mTextEntry) { LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0); if (visible) { - text_entry_rect.mRight -= mArrowImageWidth + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); + text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth(0)) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); } //mTextEntry->setRect(text_entry_rect); mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE); @@ -457,22 +462,8 @@ void LLComboBox::draw() mButton->setEnabled(mEnabled /*&& !mList->isEmpty()*/); - // Draw children + // Draw children normally LLUICtrl::draw(); - - if (mDrawArrow) - { - // Paste the graphic on the right edge - if (!mArrowImage.isNull()) - { - S32 arrow_height = llmin(mRect.getHeight(), mArrowImage->getHeight()); - S32 arrow_width = llround((F32)mArrowImage->getWidth() * ((F32)arrow_height / (F32)mArrowImage->getHeight())); - - S32 left = mRect.getWidth() - mArrowImage->getWidth() - LLUI::sConfigGroup->getS32("DropShadowButton"); - - gl_draw_scaled_image( left, 0, arrow_width, arrow_height, mArrowImage, LLColor4::white); - } - } } } @@ -481,7 +472,7 @@ BOOL LLComboBox::setCurrentByIndex( S32 index ) BOOL found = mList->selectNthItem( index ); if (found) { - setLabel(mList->getSimpleSelectedItem()); + setLabel(mList->getSelectedItemLabel()); } return found; } @@ -497,6 +488,67 @@ S32 LLComboBox::getCurrentIndex() const } +void LLComboBox::updateLayout() +{ + LLRect rect = getLocalRect(); + if (mAllowTextEntry) + { + S32 shadow_size = LLUI::sConfigGroup->getS32("DropShadowButton"); + mButton->setRect(LLRect( mRect.getWidth() - llmax(8,mArrowImage->getWidth(0)) - 2 * shadow_size, + rect.mTop, rect.mRight, rect.mBottom)); + mButton->setTabStop(FALSE); + + if (!mTextEntry) + { + LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0); + text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth(0)) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); + // clear label on button + LLString cur_label = mButton->getLabelSelected(); + mTextEntry = new LLLineEditor("combo_text_entry", + text_entry_rect, + "", + LLFontGL::sSansSerifSmall, + mMaxChars, + onTextCommit, + onTextEntry, + NULL, + this, + NULL, // prevalidate func + LLViewBorder::BEVEL_NONE, + LLViewBorder::STYLE_LINE, + 0); // no border + mTextEntry->setSelectAllonFocusReceived(TRUE); + mTextEntry->setHandleEditKeysDirectly(TRUE); + mTextEntry->setCommitOnFocusLost(FALSE); + mTextEntry->setText(cur_label); + mTextEntry->setIgnoreTab(TRUE); + mTextEntry->setFollowsAll(); + addChild(mTextEntry); + } + else + { + mTextEntry->setVisible(TRUE); + mTextEntry->setMaxTextLength(mMaxChars); + } + + // clear label on button + setLabel(LLString::null); + + mButton->setFollows(FOLLOWS_BOTTOM | FOLLOWS_TOP | FOLLOWS_RIGHT); + } + else if (!mAllowTextEntry) + { + mButton->setRect(rect); + mButton->setTabStop(TRUE); + + if (mTextEntry) + { + mTextEntry->setVisible(FALSE); + } + mButton->setFollowsAll(); + } +} + void* LLComboBox::getCurrentUserdata() { LLScrollListItem* item = mList->getFirstSelected(); @@ -514,7 +566,7 @@ void LLComboBox::showList() LLCoordWindow window_size; getWindow()->getSize(&window_size); //HACK: shouldn't have to know about scale here - mList->arrange( 192, llfloor((F32)window_size.mY / LLUI::sGLScaleFactor.mV[VY]) - 50 ); + mList->fitContents( 192, llfloor((F32)window_size.mY / LLUI::sGLScaleFactor.mV[VY]) - 50 ); // Make sure that we can see the whole list LLRect root_view_local; @@ -523,7 +575,9 @@ void LLComboBox::showList() LLRect rect = mList->getRect(); - S32 list_width = mRect.getWidth() + SCROLLBAR_SIZE; + S32 min_width = mRect.getWidth(); + S32 max_width = llmax(min_width, MAX_COMBO_WIDTH); + S32 list_width = llclamp(mList->getMaxContentWidth(), min_width, max_width); if (mListPosition == BELOW) { @@ -583,12 +637,6 @@ void LLComboBox::showList() mList->translate(0, -y); } - // pass mouse capture on to list if button is depressed - if (mButton->hasMouseCapture()) - { - gFocusMgr.setMouseCapture(mList); - } - // NB: this call will trigger the focuslost callback which will hide the list, so do it first // before finally showing the list @@ -604,24 +652,29 @@ void LLComboBox::showList() mButton->setToggleState(TRUE); mList->setVisible(TRUE); - gFocusMgr.setTopCtrl(mList); + setUseBoundingRect(TRUE); + gFocusMgr.setTopCtrl(this); } void LLComboBox::hideList() { + //*HACK: store the original value explicitly somewhere, not just in label + LLString orig_selection = mAllowTextEntry ? mTextEntry->getText() : mButton->getLabelSelected(); + + // assert selection in list + mList->selectItemByLabel(orig_selection, FALSE); + mButton->setToggleState(FALSE); mList->setVisible(FALSE); mList->highlightNthItem(-1); - if( gFocusMgr.getTopCtrl() == mList ) + setUseBoundingRect(FALSE); + if( gFocusMgr.getTopCtrl() == this ) { gFocusMgr.setTopCtrl(NULL); } - - //mList->setFocus(FALSE); } - //------------------------------------------------------------------ // static functions //------------------------------------------------------------------ @@ -650,21 +703,20 @@ void LLComboBox::onButtonDown(void *userdata) self->showList(); } - if (self->mKeyboardFocusOnClick && !self->hasFocus()) + self->setFocus( TRUE ); + + // pass mouse capture on to list if button is depressed + if (self->mButton->hasMouseCapture()) { - self->setFocus( TRUE ); + gFocusMgr.setMouseCapture(self->mList); } } else { - // hide and release keyboard focus self->hideList(); - - self->onCommit(); } -} - +} // static void LLComboBox::onItemSelected(LLUICtrl* item, void *userdata) @@ -672,7 +724,7 @@ void LLComboBox::onItemSelected(LLUICtrl* item, void *userdata) // Note: item is the LLScrollListCtrl LLComboBox *self = (LLComboBox *) userdata; - const LLString& name = self->mList->getSimpleSelectedItem(); + const LLString name = self->mList->getSelectedItemLabel(); S32 cur_id = self->getCurrentIndex(); if (cur_id != -1) @@ -681,40 +733,24 @@ void LLComboBox::onItemSelected(LLUICtrl* item, void *userdata) if (self->mAllowTextEntry) { - gFocusMgr.setKeyboardFocus(self->mTextEntry, NULL); + gFocusMgr.setKeyboardFocus(self->mTextEntry); self->mTextEntry->selectAll(); } } else { // invalid selection, just restore existing value - self->mList->selectSimpleItem(self->mButton->getLabelSelected()); + LLString orig_selection = self->mAllowTextEntry ? self->mTextEntry->getText() : self->mButton->getLabelSelected(); + + self->mList->selectItemByLabel(orig_selection); } self->onCommit(); self->hideList(); } -// static -void LLComboBox::onListFocusChanged(LLUICtrl* list, void* user_data) -{ - LLComboBox *self = (LLComboBox *) list->getParent(); - // user not manipulating list or clicking on drop down button - if (!self->mList->hasFocus() && !self->mButton->hasMouseCapture()) - { - //*HACK: store the original value explicitly somewhere, not just in label - LLString orig_selection = self->mAllowTextEntry ? self->mTextEntry->getText() : self->mButton->getLabelSelected(); - - self->hideList(); - - // reassert original selection - self->mList->selectSimpleItem(orig_selection, FALSE); - } -} - BOOL LLComboBox::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen) { - LLString tool_tip; if (LLUI::sShowXUINames) @@ -726,23 +762,19 @@ BOOL LLComboBox::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_ tool_tip = mToolTipMsg; } - if( getVisible() && pointInView( x, y ) ) + if( !tool_tip.empty() ) { - if( !tool_tip.empty() ) - { - msg = tool_tip; - - // Convert rect local to screen coordinates - localPointToScreen( - 0, 0, - &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); - localPointToScreen( - mRect.getWidth(), mRect.getHeight(), - &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) ); - } - return TRUE; + msg = tool_tip; + + // Convert rect local to screen coordinates + localPointToScreen( + 0, 0, + &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); + localPointToScreen( + mRect.getWidth(), mRect.getHeight(), + &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) ); } - return FALSE; + return TRUE; } BOOL LLComboBox::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) @@ -793,63 +825,11 @@ BOOL LLComboBox::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative) { - LLRect rect( 0, mRect.getHeight(), mRect.getWidth(), 0); - if (allow && !mAllowTextEntry) - { - S32 shadow_size = LLUI::sConfigGroup->getS32("DropShadowButton"); - mButton->setRect(LLRect( mRect.getWidth() - mArrowImageWidth - 2 * shadow_size, - rect.mTop, rect.mRight, rect.mBottom)); - mButton->setTabStop(FALSE); - - // clear label on button - LLString cur_label = mButton->getLabelSelected(); - setLabel(LLString::null); - if (!mTextEntry) - { - LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0); - text_entry_rect.mRight -= mArrowImageWidth + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); - mTextEntry = new LLLineEditor("combo_text_entry", - text_entry_rect, - "", - LLFontGL::sSansSerifSmall, - max_chars, - onTextCommit, - onTextEntry, - NULL, - this, - NULL, // prevalidate func - LLViewBorder::BEVEL_NONE, - LLViewBorder::STYLE_LINE, - 0); // no border - mTextEntry->setSelectAllonFocusReceived(TRUE); - mTextEntry->setHandleEditKeysDirectly(TRUE); - mTextEntry->setCommitOnFocusLost(FALSE); - mTextEntry->setText(cur_label); - mTextEntry->setIgnoreTab(TRUE); - mTextEntry->setFollowsAll(); - addChild(mTextEntry); - mMaxChars = max_chars; - } - else - { - mTextEntry->setVisible(TRUE); - } - - mButton->setFollows(FOLLOWS_BOTTOM | FOLLOWS_TOP | FOLLOWS_RIGHT); - } - else if (!allow && mAllowTextEntry) - { - mButton->setRect(rect); - mButton->setTabStop(TRUE); - - if (mTextEntry) - { - mTextEntry->setVisible(FALSE); - } - mButton->setFollowsAll(); - } mAllowTextEntry = allow; - mTextEntryTentative = set_tentative; + mTextEntryTentative = set_tentative; + mMaxChars = max_chars; + + updateLayout(); } void LLComboBox::setTextEntry(const LLStringExplicit& text) @@ -875,7 +855,7 @@ void LLComboBox::onTextEntry(LLLineEditor* line_editor, void* user_data) if (key == KEY_BACKSPACE || key == KEY_DELETE) { - if (self->mList->selectSimpleItem(line_editor->getText(), FALSE)) + if (self->mList->selectItemByLabel(line_editor->getText(), FALSE)) { line_editor->setTentative(FALSE); } @@ -955,11 +935,11 @@ void LLComboBox::updateSelection() } } - if (mList->selectSimpleItem(full_string, FALSE)) + if (mList->selectItemByLabel(full_string, FALSE)) { mTextEntry->setTentative(FALSE); } - else if (!mList->selectSimpleItemByPrefix(left_wstring, FALSE)) + else if (!mList->selectItemByPrefix(left_wstring, FALSE)) { mList->deselectAllItems(); mTextEntry->setText(wstring_to_utf8str(user_wstring)); @@ -967,7 +947,7 @@ void LLComboBox::updateSelection() } else { - LLWString selected_item = utf8str_to_wstring(mList->getSimpleSelectedItem()); + LLWString selected_item = utf8str_to_wstring(mList->getSelectedItemLabel()); LLWString wtext = left_wstring + selected_item.substr(left_wstring.size(), selected_item.size()); mTextEntry->setText(wstring_to_utf8str(wtext)); mTextEntry->setSelection(left_wstring.size(), mTextEntry->getWText().size()); @@ -993,6 +973,10 @@ void LLComboBox::setFocus(BOOL b) if (b) { mList->clearSearchString(); + if (mList->getVisible()) + { + mList->setFocus(TRUE); + } } } @@ -1048,7 +1032,7 @@ BOOL LLComboBox::setCurrentByID(const LLUUID& id) if (found) { - setLabel(mList->getSimpleSelectedItem()); + setLabel(mList->getSelectedItemLabel()); } return found; @@ -1063,14 +1047,14 @@ BOOL LLComboBox::setSelectedByValue(LLSD value, BOOL selected) BOOL found = mList->setSelectedByValue(value, selected); if (found) { - setLabel(mList->getSimpleSelectedItem()); + setLabel(mList->getSelectedItemLabel()); } return found; } -LLSD LLComboBox::getSimpleSelectedValue() +LLSD LLComboBox::getSelectedValue() { - return mList->getSimpleSelectedValue(); + return mList->getSelectedValue(); } BOOL LLComboBox::isSelected(LLSD value) @@ -1097,3 +1081,155 @@ BOOL LLComboBox::operateOnAll(EOperation op) } return FALSE; } + + + +// +// LLFlyoutButton +// + +const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24; + +LLFlyoutButton::LLFlyoutButton( + const LLString& name, + const LLRect &rect, + const LLString& label, + void (*commit_callback)(LLUICtrl*, void*) , + void *callback_userdata) +: LLComboBox(name, rect, LLString::null, commit_callback, callback_userdata), + mToggleState(FALSE), + mActionButton(NULL) +{ + // Always use text box + // Text label button + mActionButton = new LLButton("flyout_button_main", + LLRect(), label, NULL, LLString::null, + NULL, this); + mActionButton->setScaleImage(TRUE); + + mActionButton->setClickedCallback(onActionButtonClick); + mActionButton->setFollowsAll(); + mActionButton->setHAlign( LLFontGL::HCENTER ); + mActionButton->setLabel(label); + addChild(mActionButton); + + mActionButtonImage = LLUI::getUIImageByName("flyout_btn_left.tga"); + mExpanderButtonImage = LLUI::getUIImageByName("flyout_btn_right.tga"); + mActionButtonImageSelected = LLUI::getUIImageByName("flyout_btn_left_selected.tga"); + mExpanderButtonImageSelected = LLUI::getUIImageByName("flyout_btn_right_selected.tga"); + + mActionButton->setImageSelected(mActionButtonImageSelected); + mActionButton->setImageUnselected(mActionButtonImage); + mActionButton->setImageDisabled(LLPointer(NULL)); + mActionButton->setImageDisabledSelected(LLPointer(NULL)); + + mButton->setImageSelected(mExpanderButtonImageSelected); + mButton->setImageUnselected(mExpanderButtonImage); + mButton->setImageDisabled(LLPointer(NULL)); + mButton->setImageDisabledSelected(LLPointer(NULL)); + mButton->setRightHPad(6); + + mBorder->setVisible(FALSE); + + updateLayout(); +} + +//static +LLView* LLFlyoutButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) +{ + LLString name = "flyout_button"; + node->getAttributeString("name", name); + + LLString label(""); + node->getAttributeString("label", label); + + LLRect rect; + createRect(node, rect, parent, LLRect()); + + LLUICtrlCallback callback = NULL; + + LLFlyoutButton* flyout_button = new LLFlyoutButton(name, + rect, + label, + callback, + NULL); + + LLString list_position; + node->getAttributeString("list_position", list_position); + if (list_position == "below") + { + flyout_button->mListPosition = BELOW; + } + else if (list_position == "above") + { + flyout_button->mListPosition = ABOVE; + } + + + flyout_button->initFromXML(node, parent); + + LLXMLNodePtr child; + for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) + { + if (child->hasName("flyout_button_item")) + { + LLString label = child->getTextContents(); + + LLString value = label; + child->getAttributeString("value", value); + + flyout_button->add(label, LLSD(value) ); + } + } + + flyout_button->updateLayout(); + + return flyout_button; +} + +void LLFlyoutButton::updateLayout() +{ + LLComboBox::updateLayout(); + + mButton->setOrigin(mRect.getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, 0); + mButton->reshape(FLYOUT_BUTTON_ARROW_WIDTH, mRect.getHeight()); + mButton->setFollows(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM); + mButton->setTabStop(FALSE); + mButton->setImageOverlay(mListPosition == BELOW ? "down_arrow.tga" : "up_arrow.tga", LLFontGL::RIGHT); + + mActionButton->setOrigin(0, 0); + mActionButton->reshape(mRect.getWidth() - FLYOUT_BUTTON_ARROW_WIDTH, mRect.getHeight()); +} + +//static +void LLFlyoutButton::onActionButtonClick(void *user_data) +{ + LLFlyoutButton* buttonp = (LLFlyoutButton*)user_data; + // remember last list selection? + buttonp->mList->deselect(); + buttonp->onCommit(); +} + +void LLFlyoutButton::draw() +{ + mActionButton->setToggleState(mToggleState); + mButton->setToggleState(mToggleState); + + //FIXME: this should be an attribute of comboboxes, whether they have a distinct label or + // the label reflects the last selected item, for now we have to manually remove the label + mButton->setLabel(LLString::null); + LLComboBox::draw(); +} + +void LLFlyoutButton::setEnabled(BOOL enabled) +{ + mActionButton->setEnabled(enabled); + LLComboBox::setEnabled(enabled); +} + + +void LLFlyoutButton::setToggleState(BOOL state) +{ + mToggleState = state; +} + diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h index 6e5e4ab..2a70db2 100644 --- a/linden/indra/llui/llcombobox.h +++ b/linden/indra/llui/llcombobox.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -80,6 +80,7 @@ public: virtual void draw(); virtual void onFocusLost(); + virtual void onLostTop(); virtual void setEnabled(BOOL enabled); @@ -107,21 +108,22 @@ public: void setAllowTextEntry(BOOL allow, S32 max_chars = 50, BOOL make_tentative = TRUE); void setTextEntry(const LLStringExplicit& text); - void add(const LLString& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); // add item "name" to menu - void add(const LLString& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); - void add(const LLString& name, void* userdata, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); - void add(const LLString& name, LLSD value, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); + LLScrollListItem* add(const LLString& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); // add item "name" to menu + LLScrollListItem* add(const LLString& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); + LLScrollListItem* add(const LLString& name, void* userdata, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); + LLScrollListItem* add(const LLString& name, LLSD value, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); + LLScrollListItem* addSeparator(EAddPosition pos = ADD_BOTTOM); BOOL remove( S32 index ); // remove item by index, return TRUE if found and removed void removeall() { clearRows(); } void sortByName(); // Sort the entries in the combobox by name - // Select current item by name using selectSimpleItem. Returns FALSE if not found. + // Select current item by name using selectItemByLabel. Returns FALSE if not found. BOOL setSimple(const LLStringExplicit& name); // Get name of current item. Returns an empty string if not found. - const LLString& getSimple() const; + const LLString getSimple() const; // Get contents of column x of selected row - const LLString& getSimpleSelectedItem(S32 column = 0) const; + const LLString getSelectedItemLabel(S32 column = 0) const; // Sets the label, which doesn't have to exist in the label. // This is probably a UI abuse. @@ -132,6 +134,8 @@ public: BOOL setCurrentByIndex( S32 index ); S32 getCurrentIndex() const; + virtual void updateLayout(); + //======================================================================== LLCtrlSelectionInterface* getSelectionInterface() { return (LLCtrlSelectionInterface*)this; }; LLCtrlListInterface* getListInterface() { return (LLCtrlListInterface*)this; }; @@ -156,7 +160,7 @@ public: virtual BOOL setCurrentByID( const LLUUID& id ); virtual LLUUID getCurrentID(); // LLUUID::null if no items in menu virtual BOOL setSelectedByValue(LLSD value, BOOL selected); - virtual LLSD getSimpleSelectedValue(); + virtual LLSD getSelectedValue(); virtual BOOL isSelected(LLSD value); virtual BOOL operateOnSelection(EOperation op); virtual BOOL operateOnAll(EOperation op); @@ -172,7 +176,6 @@ public: static void onButtonDown(void *userdata); static void onItemSelected(LLUICtrl* item, void *userdata); - static void onListFocusChanged(LLUICtrl* item, void *userdata); static void onTextEntry(LLLineEditor* line_editor, void* user_data); static void onTextCommit(LLUICtrl* caller, void* user_data); @@ -183,12 +186,10 @@ public: protected: LLButton* mButton; LLScrollListCtrl* mList; + S32 mButtonPadding; LLViewBorder* mBorder; - BOOL mKeyboardFocusOnClick; - BOOL mDrawArrow; LLLineEditor* mTextEntry; LLPointer mArrowImage; - S32 mArrowImageWidth; BOOL mAllowTextEntry; S32 mMaxChars; BOOL mTextEntryTentative; @@ -197,4 +198,36 @@ protected: void (*mTextEntryCallback)(LLLineEditor*, void*); }; +class LLFlyoutButton : public LLComboBox +{ +public: + LLFlyoutButton( + const LLString& name, + const LLRect &rect, + const LLString& label, + void (*commit_callback)(LLUICtrl*, void*) = NULL, + void *callback_userdata = NULL); + + virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLYOUT_BUTTON; } + virtual LLString getWidgetTag() const { return LL_FLYOUT_BUTTON_TAG; } + + virtual void updateLayout(); + virtual void draw(); + virtual void setEnabled(BOOL enabled); + + void setToggleState(BOOL state); + + static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); + static void onActionButtonClick(void *userdata); + static void onSelectAction(LLUICtrl* ctrl, void *userdata); + +protected: + LLButton* mActionButton; + LLPointer mActionButtonImage; + LLPointer mExpanderButtonImage; + LLPointer mActionButtonImageSelected; + LLPointer mExpanderButtonImageSelected; + BOOL mToggleState; +}; + #endif diff --git a/linden/indra/llui/llctrlselectioninterface.cpp b/linden/indra/llui/llctrlselectioninterface.cpp index 6fb5df3..996f5b3 100644 --- a/linden/indra/llui/llctrlselectioninterface.cpp +++ b/linden/indra/llui/llctrlselectioninterface.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llctrlselectioninterface.h b/linden/indra/llui/llctrlselectioninterface.h index 20caa1e..121d971 100644 --- a/linden/indra/llui/llctrlselectioninterface.h +++ b/linden/indra/llui/llctrlselectioninterface.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -68,7 +68,7 @@ public: BOOL selectByValue(LLSD value); BOOL deselectByValue(LLSD value); virtual BOOL setSelectedByValue(LLSD value, BOOL selected) = 0; - virtual LLSD getSimpleSelectedValue() = 0; + virtual LLSD getSelectedValue() = 0; virtual BOOL isSelected(LLSD value) = 0; diff --git a/linden/indra/llui/lldraghandle.cpp b/linden/indra/llui/lldraghandle.cpp index fb91201..032cb91 100644 --- a/linden/indra/llui/lldraghandle.cpp +++ b/linden/indra/llui/lldraghandle.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lldraghandle.h b/linden/indra/llui/lldraghandle.h index c085991..a48c0f7 100644 --- a/linden/indra/llui/lldraghandle.h +++ b/linden/indra/llui/lldraghandle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -54,7 +54,6 @@ public: virtual void setTitle( const LLString& title ) = 0; virtual const LLString& getTitle() const = 0; - virtual void draw() = 0; virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) = 0; virtual BOOL handleHover(S32 x, S32 y, MASK mask); diff --git a/linden/indra/llui/lleditmenuhandler.cpp b/linden/indra/llui/lleditmenuhandler.cpp index b359098..6291088 100644 --- a/linden/indra/llui/lleditmenuhandler.cpp +++ b/linden/indra/llui/lleditmenuhandler.cpp @@ -12,12 +12,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lleditmenuhandler.h b/linden/indra/llui/lleditmenuhandler.h index 394d27c..ef9b1dd 100644 --- a/linden/indra/llui/lleditmenuhandler.h +++ b/linden/indra/llui/lleditmenuhandler.h @@ -12,12 +12,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 8ff3c48..1500f9f 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -128,7 +128,11 @@ LLFloater::handle_map_t LLFloater::sFloaterMap; LLFloaterView* gFloaterView = NULL; -LLFloater::LLFloater() +LLFloater::LLFloater() : + //FIXME: we should initialize *all* member variables here + mResizable(FALSE), + mDragOnLeft(FALSE) + { // automatically take focus when opened mAutoFocus = TRUE; @@ -215,9 +219,14 @@ void LLFloater::init(const LLString& title, } mButtonScale = 1.f; - LLPanel::deleteAllChildren(); + BOOL need_border = mBorder != NULL; + + // this will delete mBorder too + deleteAllChildren(); + // make sure we don't have a pointer to an old, deleted border + mBorder = NULL; //sjb: HACK! we had a border which was just deleted, so re-create it - if (mBorder != NULL) + if (need_border) { addBorder(); } @@ -609,7 +618,7 @@ void LLFloater::releaseFocus() if( gFocusMgr.childHasKeyboardFocus( this ) ) { - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); } if( gFocusMgr.childHasMouseCapture( this ) ) @@ -1026,13 +1035,10 @@ void LLFloater::setHost(LLMultiFloater* host) { mButtonsEnabled[BUTTON_TEAR_OFF] = TRUE; } - - mIsFocusRoot = FALSE; } else if (!mHostHandle.isDead() && !host) { mButtonScale = 1.f; - mIsFocusRoot = TRUE; //mButtonsEnabled[BUTTON_TEAR_OFF] = FALSE; } updateButtons(); @@ -1260,6 +1266,7 @@ void LLFloater::show(LLFloater* floaterp) { if (floaterp) { + gFocusMgr.triggerFocusFlash(); floaterp->open(); if (floaterp->getHost()) { @@ -2245,7 +2252,8 @@ void LLFloaterView::refresh() LLFloater* floaterp = (LLFloater*)*child_it; if( floaterp->getVisible() ) { - adjustToFitScreen(floaterp, TRUE); + // minimized floaters are kept fully onscreen + adjustToFitScreen(floaterp, !floaterp->isMinimized()); } } } @@ -2605,9 +2613,9 @@ void LLMultiFloater::draw() for (S32 i = 0; i < mTabContainer->getTabCount(); i++) { LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(i); - if (floaterp->getTitle() != mTabContainer->getPanelTitle(i)) + if (floaterp->getShortTitle() != mTabContainer->getPanelTitle(i)) { - mTabContainer->setPanelTitle(i, floaterp->getTitle()); + mTabContainer->setPanelTitle(i, floaterp->getShortTitle()); } } LLFloater::draw(); @@ -2725,7 +2733,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, if ( select_added_floater ) { - mTabContainer->selectLastTab(); + mTabContainer->selectTabPanel(floaterp); } floaterp->setHost(this); @@ -2970,8 +2978,9 @@ void LLMultiFloater::updateResizeLimits() // make sure upper left corner doesn't move translate(0, cur_height - mRect.getHeight()); - // Try to keep whole view onscreen, don't allow partial offscreen. - gFloaterView->adjustToFitScreen(this, FALSE); + // make sure this window is visible on screen when it has been modified + // (tab added, etc) + gFloaterView->adjustToFitScreen(this, TRUE); } } diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h index 3a34057..56b0e6e 100644 --- a/linden/indra/llui/llfloater.h +++ b/linden/indra/llui/llfloater.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llfocusmgr.cpp b/linden/indra/llui/llfocusmgr.cpp index 065c206..efca3d8 100644 --- a/linden/indra/llui/llfocusmgr.cpp +++ b/linden/indra/llui/llfocusmgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -42,11 +42,10 @@ LLFocusMgr gFocusMgr; LLFocusMgr::LLFocusMgr() : mLockedView( NULL ), - mKeyboardLockedFocusLostCallback( NULL ), mMouseCaptor( NULL ), mKeyboardFocus( NULL ), + mLastKeyboardFocus( NULL ), mDefaultKeyboardFocus( NULL ), - mKeyboardFocusLostCallback( NULL ), mTopCtrl( NULL ), mFocusWeight(0.f), mAppHasFocus(TRUE) // Macs don't seem to notify us that we've gotten focus, so default to true @@ -75,12 +74,11 @@ void LLFocusMgr::releaseFocusIfNeeded( LLView* view ) if (view == mLockedView) { mLockedView = NULL; - mKeyboardLockedFocusLostCallback = NULL; - setKeyboardFocus( NULL, NULL ); + setKeyboardFocus( NULL ); } else { - setKeyboardFocus( mLockedView, mKeyboardLockedFocusLostCallback ); + setKeyboardFocus( mLockedView ); } } @@ -91,7 +89,7 @@ void LLFocusMgr::releaseFocusIfNeeded( LLView* view ) } -void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, FocusLostCallback on_focus_lost, BOOL lock) +void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock) { if (mLockedView && (new_focus == NULL || @@ -101,28 +99,27 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, FocusLostCallback on_focu // or one of its descendants return; } - FocusLostCallback old_callback = mKeyboardFocusLostCallback; - mKeyboardFocusLostCallback = on_focus_lost; //llinfos << "Keyboard focus handled by " << (new_focus ? new_focus->getName() : "nothing") << llendl; if( new_focus != mKeyboardFocus ) { - LLUICtrl* old_focus = mKeyboardFocus; + mLastKeyboardFocus = mKeyboardFocus; mKeyboardFocus = new_focus; + if( mLastKeyboardFocus ) + { + mLastKeyboardFocus->onFocusLost(); + } + // clear out any existing flash if (new_focus) { mFocusWeight = 0.f; + new_focus->onFocusReceived(); } mFocusTimer.reset(); - if( old_callback ) - { - old_callback( old_focus ); - } - #ifdef _DEBUG mKeyboardFocusName = new_focus ? new_focus->getName() : "none"; #endif @@ -204,13 +201,11 @@ void LLFocusMgr::removeKeyboardFocusWithoutCallback( LLView* focus ) if (focus == mLockedView) { mLockedView = NULL; - mKeyboardLockedFocusLostCallback = NULL; } if( mKeyboardFocus == focus ) { mKeyboardFocus = NULL; - mKeyboardFocusLostCallback = NULL; #ifdef _DEBUG mKeyboardFocusName = "none"; #endif @@ -293,13 +288,19 @@ BOOL LLFocusMgr::childIsTopCtrl( LLView* parent ) // set new_top = NULL to release top_view. void LLFocusMgr::setTopCtrl( LLUICtrl* new_top ) { - if( new_top != mTopCtrl ) + LLUICtrl* old_top = mTopCtrl; + if( new_top != old_top ) { mTopCtrl = new_top; #ifdef _DEBUG mTopCtrlName = new_top ? new_top->getName() : "none"; #endif + + if (old_top) + { + old_top->onLostTop(); + } } } @@ -317,13 +318,11 @@ void LLFocusMgr::removeTopCtrlWithoutCallback( LLUICtrl* top_view ) void LLFocusMgr::lockFocus() { mLockedView = mKeyboardFocus; - mKeyboardLockedFocusLostCallback = mKeyboardFocusLostCallback; } void LLFocusMgr::unlockFocus() { mLockedView = NULL; - mKeyboardLockedFocusLostCallback = NULL; } F32 LLFocusMgr::getFocusFlashAmt() @@ -356,9 +355,9 @@ void LLFocusMgr::setAppHasFocus(BOOL focus) } // release focus from "top ctrl"s, which generally hides them - if (!focus && mTopCtrl && mTopCtrl->hasFocus()) + if (!focus && mTopCtrl) { - mTopCtrl->setFocus(FALSE); + setTopCtrl(NULL); } mAppHasFocus = focus; } diff --git a/linden/indra/llui/llfocusmgr.h b/linden/indra/llui/llfocusmgr.h index 02f588e..3bd5b35 100644 --- a/linden/indra/llui/llfocusmgr.h +++ b/linden/indra/llui/llfocusmgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -44,8 +44,6 @@ class LLMouseHandler; class LLFocusMgr { public: - typedef void (*FocusLostCallback)(LLUICtrl*); - LLFocusMgr(); ~LLFocusMgr(); @@ -56,11 +54,11 @@ public: BOOL childHasMouseCapture( LLView* parent ); // Keyboard Focus - void setKeyboardFocus(LLUICtrl* new_focus, FocusLostCallback on_focus_lost, BOOL lock = FALSE); // new_focus = NULL to release the focus. + void setKeyboardFocus(LLUICtrl* new_focus, BOOL lock = FALSE); // new_focus = NULL to release the focus. LLUICtrl* getKeyboardFocus() const { return mKeyboardFocus; } + LLUICtrl* getLastKeyboardFocus() const { return mLastKeyboardFocus; } BOOL childHasKeyboardFocus( const LLView* parent ) const; void removeKeyboardFocusWithoutCallback( LLView* focus ); - FocusLostCallback getFocusCallback() { return mKeyboardFocusLostCallback; } F32 getFocusTime() const { return mFocusTimer.getElapsedTimeF32(); } F32 getFocusFlashAmt(); LLColor4 getFocusColor(); @@ -90,15 +88,14 @@ public: protected: LLUICtrl* mLockedView; - FocusLostCallback mKeyboardLockedFocusLostCallback; // Mouse Captor LLMouseHandler* mMouseCaptor; // Mouse events are premptively routed to this object // Keyboard Focus LLUICtrl* mKeyboardFocus; // Keyboard events are preemptively routed to this object + LLUICtrl* mLastKeyboardFocus; // who last had focus LLUICtrl* mDefaultKeyboardFocus; - FocusLostCallback mKeyboardFocusLostCallback; // The object to which keyboard events are routed is called before another object takes its place // Top View LLUICtrl* mTopCtrl; diff --git a/linden/indra/llui/llhtmlhelp.h b/linden/indra/llui/llhtmlhelp.h index 36324d0..d4ec9e3 100644 --- a/linden/indra/llui/llhtmlhelp.h +++ b/linden/indra/llui/llhtmlhelp.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,7 +37,6 @@ class LLHtmlHelp public: virtual ~LLHtmlHelp() {} virtual void show(std::string start_url, std::string title) = 0; - virtual BOOL getFloaterOpened()=0; }; #endif // LL_LLFLOATERHTMLHELP_H diff --git a/linden/indra/llui/lliconctrl.cpp b/linden/indra/llui/lliconctrl.cpp index 40272ee..79982c6 100644 --- a/linden/indra/llui/lliconctrl.cpp +++ b/linden/indra/llui/lliconctrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -88,18 +88,11 @@ void LLIconCtrl::draw() { if( getVisible() ) { - // Border - BOOL has_image = !mImageID.isNull(); - - if( has_image ) + if( mImagep.notNull() ) { - if( mImagep.notNull() ) - { - gl_draw_scaled_image(0, 0, - mRect.getWidth(), mRect.getHeight(), - mImagep, - mColor ); - } + mImagep->draw(0, 0, + mRect.getWidth(), mRect.getHeight(), + mColor ); } LLUICtrl::draw(); @@ -154,6 +147,7 @@ LLView* LLIconCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory * LLUICtrlFactory::getAttributeColor(node,"color", color); LLIconCtrl* icon = new LLIconCtrl(name, rect, image_id); + icon->setColor(color); icon->initFromXML(node, parent); diff --git a/linden/indra/llui/lliconctrl.h b/linden/indra/llui/lliconctrl.h index 0cd43bb..f767b3c 100644 --- a/linden/indra/llui/lliconctrl.h +++ b/linden/indra/llui/lliconctrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -73,7 +73,7 @@ protected: LLColor4 mColor; LLString mImageName; LLUUID mImageID; - LLPointer mImagep; + LLPointer mImagep; }; #endif diff --git a/linden/indra/llui/llkeywords.cpp b/linden/indra/llui/llkeywords.cpp index 3adde76..1d157d2 100644 --- a/linden/indra/llui/llkeywords.cpp +++ b/linden/indra/llui/llkeywords.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -233,7 +233,7 @@ LLColor3 LLKeywords::readColor( const LLString& s ) // Walk through a string, applying the rules specified by the keyword token list and // create a list of color segments. -void LLKeywords::findSegments(std::vector* seg_list, const LLWString& wtext) +void LLKeywords::findSegments(std::vector* seg_list, const LLWString& wtext, const LLColor4 &defaultColor) { std::for_each(seg_list->begin(), seg_list->end(), DeletePointer()); seg_list->clear(); @@ -245,7 +245,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLWS S32 text_len = wtext.size(); - seg_list->push_back( new LLTextSegment( LLColor3(0,0,0), 0, text_len ) ); + seg_list->push_back( new LLTextSegment( LLColor3(defaultColor), 0, text_len ) ); const llwchar* base = wtext.c_str(); const llwchar* cur = base; @@ -299,7 +299,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLWS //llinfos << "Seg: [" << (char*)LLString( base, seg_start, seg_end-seg_start) << "]" << llendl; LLTextSegment* text_segment = new LLTextSegment( cur_token->getColor(), seg_start, seg_end ); text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len); + insertSegment( seg_list, text_segment, text_len, defaultColor); line_done = TRUE; // to break out of second loop. break; } @@ -409,7 +409,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLWS //llinfos << "Seg: [" << (char*)LLString( base, seg_start, seg_end-seg_start ) << "]" << llendl; LLTextSegment* text_segment = new LLTextSegment( cur_delimiter->getColor(), seg_start, seg_end ); text_segment->setToken( cur_delimiter ); - insertSegment( seg_list, text_segment, text_len); + insertSegment( seg_list, text_segment, text_len, defaultColor); // Note: we don't increment cur, since the end of one delimited seg may be immediately // followed by the start of another one. @@ -442,7 +442,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLWS LLTextSegment* text_segment = new LLTextSegment( cur_token->getColor(), seg_start, seg_end ); text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len); + insertSegment( seg_list, text_segment, text_len, defaultColor); } cur += seg_len; continue; @@ -457,7 +457,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLWS } } -void LLKeywords::insertSegment(std::vector* seg_list, LLTextSegment* new_segment, S32 text_len ) +void LLKeywords::insertSegment(std::vector* seg_list, LLTextSegment* new_segment, S32 text_len, const LLColor4 &defaultColor ) { LLTextSegment* last = seg_list->back(); S32 new_seg_end = new_segment->getEnd(); @@ -475,7 +475,7 @@ void LLKeywords::insertSegment(std::vector* seg_list, LLTextSegm if( new_seg_end < text_len ) { - seg_list->push_back( new LLTextSegment( LLColor3(0,0,0), new_seg_end, text_len ) ); + seg_list->push_back( new LLTextSegment( defaultColor, new_seg_end, text_len ) ); } } diff --git a/linden/indra/llui/llkeywords.h b/linden/indra/llui/llkeywords.h index e6ff029..d5d7302 100644 --- a/linden/indra/llui/llkeywords.h +++ b/linden/indra/llui/llkeywords.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -84,7 +84,7 @@ public: BOOL loadFromFile(const LLString& filename); BOOL isLoaded() { return mLoaded; } - void findSegments(std::vector *seg_list, const LLWString& text ); + void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor ); #ifdef _DEBUG void dump(); @@ -98,7 +98,7 @@ public: private: LLColor3 readColor(const LLString& s); - void insertSegment(std::vector *seg_list, LLTextSegment* new_segment, S32 text_len); + void insertSegment(std::vector *seg_list, LLTextSegment* new_segment, S32 text_len, const LLColor4 &defaultColor); private: BOOL mLoaded; diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 2851beb..88c8d75 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -72,6 +72,15 @@ const S32 SCROLL_INCREMENT_DEL = 4; // make space for baskspacing const F32 AUTO_SCROLL_TIME = 0.05f; const F32 LABEL_HPAD = 5.f; +const F32 PREEDIT_MARKER_BRIGHTNESS = 0.4f; +const S32 PREEDIT_MARKER_GAP = 1; +const S32 PREEDIT_MARKER_POSITION = 2; +const S32 PREEDIT_MARKER_THICKNESS = 1; +const F32 PREEDIT_STANDOUT_BRIGHTNESS = 0.6f; +const S32 PREEDIT_STANDOUT_GAP = 1; +const S32 PREEDIT_STANDOUT_POSITION = 2; +const S32 PREEDIT_STANDOUT_THICKNESS = 2; + // This is a friend class of and is only used by LLLineEditor class LLLineEditorRollback { @@ -119,7 +128,7 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, S32 max_length_bytes, void (*commit_callback)(LLUICtrl* caller, void* user_data ), void (*keystroke_callback)(LLLineEditor* caller, void* user_data ), - void (*focus_lost_callback)(LLUICtrl* caller, void* user_data ), + void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data ), void* userdata, LLLinePrevalidateFunc prevalidate_func, LLViewBorder::EBevel border_bevel, @@ -127,7 +136,6 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, S32 border_thickness) : LLUICtrl( name, rect, TRUE, commit_callback, userdata, FOLLOWS_TOP | FOLLOWS_LEFT ), - mMaxLengthChars(max_length_bytes), mMaxLengthBytes(max_length_bytes), mCursorPos( 0 ), mScrollHPos( 0 ), @@ -223,12 +231,19 @@ LLString LLLineEditor::getWidgetTag() const return LL_LINE_EDITOR_TAG; } -void LLLineEditor::onFocusLost() +void LLLineEditor::onFocusReceived() { - // Need to notify early when loosing focus. - getWindow()->allowLanguageTextInput(FALSE); + LLUICtrl::onFocusReceived(); + updateAllowingLanguageInput(); +} - LLUICtrl::onFocusLost(); +void LLLineEditor::onFocusLost() +{ + // The call to updateAllowLanguageInput() + // when loosing the keyboard focus *may* + // indirectly invoke handleUnicodeCharHere(), + // so it must be called before onCommit. + updateAllowingLanguageInput(); if( mCommitOnFocusLost && mText.getString() != mPrevText) { @@ -241,6 +256,8 @@ void LLLineEditor::onFocusLost() } getWindow()->showCursorFromMouseMove(); + + LLUICtrl::onFocusLost(); } void LLLineEditor::onCommit() @@ -301,6 +318,7 @@ void LLLineEditor::setEnabled(BOOL enabled) { mReadOnly = !enabled; setTabStop(!mReadOnly); + updateAllowingLanguageInput(); } @@ -308,7 +326,6 @@ void LLLineEditor::setMaxTextLength(S32 max_text_length) { S32 max_len = llmax(0, max_text_length); mMaxLengthBytes = max_len; - mMaxLengthChars = max_len; } void LLLineEditor::setBorderWidth(S32 left, S32 right) @@ -334,18 +351,22 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) // Check to see if entire field is selected. S32 len = mText.length(); - BOOL allSelected = (len > 0) && (( mSelectionStart == 0 && mSelectionEnd == len ) - || ( mSelectionStart == len && mSelectionEnd == 0 )); + BOOL all_selected = (len > 0) + && (( mSelectionStart == 0 && mSelectionEnd == len ) + || ( mSelectionStart == len && mSelectionEnd == 0 )); + + // Do safe truncation so we don't split multi-byte characters + // also consider entire string selected when mSelectAllonFocusReceived is set on an empty, focused line editor + all_selected = all_selected || (len == 0 && hasFocus() && mSelectAllonFocusReceived); LLString truncated_utf8 = new_text; if (truncated_utf8.size() > (U32)mMaxLengthBytes) - { - utf8str_truncate(truncated_utf8, mMaxLengthBytes); + { + truncated_utf8 = utf8str_truncate(new_text, mMaxLengthBytes); } mText.assign(truncated_utf8); - mText.truncate(mMaxLengthChars); - if (allSelected) + if (all_selected) { // ...keep whole thing selected selectAll(); @@ -735,17 +756,12 @@ void LLLineEditor::addChar(const llwchar uni_char) mText.erase(getCursor(), 1); } - S32 length_chars = mText.length(); - S32 cur_bytes = mText.getString().size();; + S32 cur_bytes = mText.getString().size(); S32 new_bytes = wchar_utf8_length(new_c); BOOL allow_char = TRUE; - // Inserting character - if (length_chars == mMaxLengthChars) - { - allow_char = FALSE; - } + // Check byte length limit if ((new_bytes + cur_bytes) > mMaxLengthBytes) { allow_char = FALSE; @@ -794,6 +810,12 @@ void LLLineEditor::setSelection(S32 start, S32 end) setCursor(start); } +void LLLineEditor::setDrawAsterixes(BOOL b) +{ + mDrawAsterixes = b; + updateAllowingLanguageInput(); +} + S32 LLLineEditor::prevWordPos(S32 cursorPos) const { const LLWString& wtext = mText.getWString(); @@ -1022,13 +1044,11 @@ void LLLineEditor::paste() // Insert the string - //check to see that the size isn't going to be larger than the - //max number of characters or bytes + // Check to see that the size isn't going to be larger than the max number of bytes U32 available_bytes = mMaxLengthBytes - wstring_utf8_length(mText); - size_t available_chars = mMaxLengthChars - mText.length(); if ( available_bytes < (U32) wstring_utf8_length(clean_string) ) - { + { // Doesn't all fit llwchar current_symbol = clean_string[0]; U32 wchars_that_fit = 0; U32 total_bytes = wchar_utf8_length(current_symbol); @@ -1043,20 +1063,13 @@ void LLLineEditor::paste() current_symbol = clean_string[++wchars_that_fit]; total_bytes += wchar_utf8_length(current_symbol); } - + // Truncate the clean string at the limit of what will fit clean_string = clean_string.substr(0, wchars_that_fit); reportBadKeystroke(); } - else if (available_chars < clean_string.length()) - { - // We can't insert all the characters. Insert as many as possible - // but make a noise to alert the user. JC - clean_string = clean_string.substr(0, available_chars); - reportBadKeystroke(); - } mText.insert(getCursor(), clean_string); - setCursor(llmin(mMaxLengthChars, getCursor() + (S32)clean_string.length())); + setCursor( getCursor() + (S32)clean_string.length() ); deselect(); // Validate new string and rollback the if needed. @@ -1523,6 +1536,41 @@ void LLLineEditor::draw() } LLColor4 label_color = mTentativeFgColor; + if (hasPreeditString()) + { + // Draw preedit markers. This needs to be before drawing letters. + for (U32 i = 0; i < mPreeditStandouts.size(); i++) + { + const S32 preedit_left = mPreeditPositions[i]; + const S32 preedit_right = mPreeditPositions[i + 1]; + if (preedit_right > mScrollHPos) + { + S32 preedit_pixels_left = findPixelNearestPos(llmax(preedit_left, mScrollHPos) - getCursor()); + S32 preedit_pixels_right = llmin(findPixelNearestPos(preedit_right - getCursor()), background.mRight); + if (preedit_pixels_left >= background.mRight) + { + break; + } + if (mPreeditStandouts[i]) + { + gl_rect_2d(preedit_pixels_left + PREEDIT_STANDOUT_GAP, + background.mBottom + PREEDIT_STANDOUT_POSITION, + preedit_pixels_right - PREEDIT_STANDOUT_GAP - 1, + background.mBottom + PREEDIT_STANDOUT_POSITION - PREEDIT_STANDOUT_THICKNESS, + (text_color * PREEDIT_STANDOUT_BRIGHTNESS + bg_color * (1 - PREEDIT_STANDOUT_BRIGHTNESS)).setAlpha(1.0f)); + } + else + { + gl_rect_2d(preedit_pixels_left + PREEDIT_MARKER_GAP, + background.mBottom + PREEDIT_MARKER_POSITION, + preedit_pixels_right - PREEDIT_MARKER_GAP - 1, + background.mBottom + PREEDIT_MARKER_POSITION - PREEDIT_MARKER_THICKNESS, + (text_color * PREEDIT_MARKER_BRIGHTNESS + bg_color * (1 - PREEDIT_MARKER_BRIGHTNESS)).setAlpha(1.0f)); + } + } + } + } + S32 rendered_text = 0; F32 rendered_pixels_right = (F32)mMinHPixels; F32 text_bottom = (F32)background.mBottom + (F32)UI_LINEEDITOR_V_PAD; @@ -1677,7 +1725,7 @@ void LLLineEditor::draw() // Returns the local screen space X coordinate associated with the text cursor position. -S32 LLLineEditor::findPixelNearestPos(const S32 cursor_offset) +S32 LLLineEditor::findPixelNearestPos(const S32 cursor_offset) const { S32 dpos = getCursor() - mScrollHPos + cursor_offset; S32 result = mGLFont->getWidth(mText.getWString().c_str(), mScrollHPos, dpos) + mMinHPixels; @@ -1715,7 +1763,7 @@ void LLLineEditor::setFocus( BOOL new_state ) if (!new_state) { - getWindow()->allowLanguageTextInput(FALSE); + getWindow()->allowLanguageTextInput(this, FALSE); } @@ -1757,7 +1805,7 @@ void LLLineEditor::setFocus( BOOL new_state ) // 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); + getWindow()->allowLanguageTextInput(this, mPrevalidateFunc == NULL); } } @@ -1776,6 +1824,12 @@ void LLLineEditor::setRect(const LLRect& rect) } } +void LLLineEditor::setPrevalidate(BOOL (*func)(const LLWString &)) +{ + mPrevalidateFunc = func; + updateAllowingLanguageInput(); +} + // Limits what characters can be used to [1234567890.-] with [-] only valid in the first position. // Does NOT ensure that the string is a well-formed number--that's the job of post-validation--for // the simple reasons that intermediate states may be invalid even if the final result is valid. @@ -2336,6 +2390,239 @@ BOOL LLLineEditor::setLabelArg( const LLString& key, const LLStringExplicit& tex return TRUE; } + +void LLLineEditor::updateAllowingLanguageInput() +{ + // Allow Language Text Input only when this LineEditor has + // no prevalidate function attached (as long as other criteria + // common to LLTextEditor). 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... + if (hasFocus() && !mReadOnly && !mDrawAsterixes && mPrevalidateFunc == NULL) + { + getWindow()->allowLanguageTextInput(this, TRUE); + } + else + { + getWindow()->allowLanguageTextInput(this, FALSE); + } +} + +BOOL LLLineEditor::hasPreeditString() const +{ + return (mPreeditPositions.size() > 1); +} + +void LLLineEditor::resetPreedit() +{ + if (hasPreeditString()) + { + const S32 preedit_pos = mPreeditPositions.front(); + mText.erase(preedit_pos, mPreeditPositions.back() - preedit_pos); + mText.insert(preedit_pos, mPreeditOverwrittenWString); + setCursor(preedit_pos); + + mPreeditWString.clear(); + mPreeditOverwrittenWString.clear(); + mPreeditPositions.clear(); + + mKeystrokeTimer.reset(); + if (mKeystrokeCallback) + { + mKeystrokeCallback(this, mCallbackUserData); + } + } +} + +void LLLineEditor::updatePreedit(const LLWString &preedit_string, + const segment_lengths_t &preedit_segment_lengths, const standouts_t &preedit_standouts, S32 caret_position) +{ + // Just in case. + if (mReadOnly) + { + return; + } + + if (hasSelection()) + { + if (hasPreeditString()) + { + llwarns << "Preedit and selection!" << llendl; + deselect(); + } + else + { + deleteSelection(); + } + } + + S32 insert_preedit_at = getCursor(); + if (hasPreeditString()) + { + insert_preedit_at = mPreeditPositions.front(); + //mText.replace(insert_preedit_at, mPreeditPositions.back() - insert_preedit_at, mPreeditOverwrittenWString); + mText.erase(insert_preedit_at, mPreeditPositions.back() - insert_preedit_at); + mText.insert(insert_preedit_at, mPreeditOverwrittenWString); + } + + mPreeditWString = preedit_string; + mPreeditPositions.resize(preedit_segment_lengths.size() + 1); + S32 position = insert_preedit_at; + for (segment_lengths_t::size_type i = 0; i < preedit_segment_lengths.size(); i++) + { + mPreeditPositions[i] = position; + position += preedit_segment_lengths[i]; + } + mPreeditPositions.back() = position; + if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) + { + mPreeditOverwrittenWString.assign( LLWString( mText, insert_preedit_at, mPreeditWString.length() ) ); + mText.erase(insert_preedit_at, mPreeditWString.length()); + } + else + { + mPreeditOverwrittenWString.clear(); + } + mText.insert(insert_preedit_at, mPreeditWString); + + mPreeditStandouts = preedit_standouts; + + setCursor(position); + setCursor(mPreeditPositions.front() + caret_position); + + // Update of the preedit should be caused by some key strokes. + mKeystrokeTimer.reset(); + if( mKeystrokeCallback ) + { + mKeystrokeCallback( this, mCallbackUserData ); + } +} + +BOOL LLLineEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const +{ + if (control) + { + LLRect control_rect_screen; + localRectToScreen(mRect, &control_rect_screen); + LLUI::screenRectToGL(control_rect_screen, control); + } + + S32 preedit_left_column, preedit_right_column; + if (hasPreeditString()) + { + preedit_left_column = mPreeditPositions.front(); + preedit_right_column = mPreeditPositions.back(); + } + else + { + preedit_left_column = preedit_right_column = getCursor(); + } + if (preedit_right_column < mScrollHPos) + { + // This should not occure... + return FALSE; + } + + const S32 query = (query_offset >= 0 ? preedit_left_column + query_offset : getCursor()); + if (query < mScrollHPos || query < preedit_left_column || query > preedit_right_column) + { + return FALSE; + } + + if (coord) + { + S32 query_local = findPixelNearestPos(query - getCursor()); + S32 query_screen_x, query_screen_y; + localPointToScreen(query_local, mRect.getHeight() / 2, &query_screen_x, &query_screen_y); + LLUI::screenPointToGL(query_screen_x, query_screen_y, &coord->mX, &coord->mY); + } + + if (bounds) + { + S32 preedit_left_local = findPixelNearestPos(llmax(preedit_left_column, mScrollHPos) - getCursor()); + S32 preedit_right_local = llmin(findPixelNearestPos(preedit_right_column - getCursor()), mRect.getWidth() - mBorderThickness); + if (preedit_left_local > preedit_right_local) + { + // Is this condition possible? + preedit_right_local = preedit_left_local; + } + + LLRect preedit_rect_local(preedit_left_local, mRect.getHeight(), preedit_right_local, 0); + LLRect preedit_rect_screen; + localRectToScreen(preedit_rect_local, &preedit_rect_screen); + LLUI::screenRectToGL(preedit_rect_screen, bounds); + } + + return TRUE; +} + +void LLLineEditor::getPreeditRange(S32 *position, S32 *length) const +{ + if (hasPreeditString()) + { + *position = mPreeditPositions.front(); + *length = mPreeditPositions.back() - mPreeditPositions.front(); + } + else + { + *position = mCursorPos; + *length = 0; + } +} + +void LLLineEditor::getSelectionRange(S32 *position, S32 *length) const +{ + if (hasSelection()) + { + *position = llmin(mSelectionStart, mSelectionEnd); + *length = llabs(mSelectionStart - mSelectionEnd); + } + else + { + *position = mCursorPos; + *length = 0; + } +} + +void LLLineEditor::markAsPreedit(S32 position, S32 length) +{ + deselect(); + setCursor(position); + if (hasPreeditString()) + { + llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl; + } + mPreeditWString.assign( LLWString( mText.getWString(), position, length ) ); + if (length > 0) + { + mPreeditPositions.resize(2); + mPreeditPositions[0] = position; + mPreeditPositions[1] = position + length; + mPreeditStandouts.resize(1); + mPreeditStandouts[0] = FALSE; + } + else + { + mPreeditPositions.clear(); + mPreeditStandouts.clear(); + } + if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) + { + mPreeditOverwrittenWString = mPreeditWString; + } + else + { + mPreeditOverwrittenWString.clear(); + } +} + +S32 LLLineEditor::getPreeditFontSize() const +{ + return llround(mGLFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]); +} + + LLSearchEditor::LLSearchEditor(const LLString& name, const LLRect& rect, S32 max_length_bytes, diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h index d4ebe3c..6d328e5 100644 --- a/linden/indra/llui/lllineeditor.h +++ b/linden/indra/llui/lllineeditor.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -53,6 +53,8 @@ #include "lluistring.h" #include "llviewborder.h" +#include "llpreeditor.h" + class LLFontGL; class LLLineEditorRollback; class LLButton; @@ -63,7 +65,7 @@ typedef BOOL (*LLLinePrevalidateFunc)(const LLWString &wstr); // Classes // class LLLineEditor -: public LLUICtrl, public LLEditMenuHandler +: public LLUICtrl, public LLEditMenuHandler, protected LLPreeditor { friend class LLLineEditorRollback; @@ -75,7 +77,7 @@ public: S32 max_length_bytes = 254, void (*commit_callback)(LLUICtrl* caller, void* user_data) = NULL, void (*keystroke_callback)(LLLineEditor* caller, void* user_data) = NULL, - void (*focus_lost_callback)(LLUICtrl* caller, void* user_data) = NULL, + void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data) = NULL, void* userdata = NULL, LLLinePrevalidateFunc prevalidate_func = NULL, LLViewBorder::EBevel border_bevel = LLViewBorder::BEVEL_IN, @@ -120,6 +122,7 @@ public: // view overrides virtual void draw(); virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE); + virtual void onFocusReceived(); virtual void onFocusLost(); virtual void setEnabled(BOOL enabled); @@ -146,7 +149,7 @@ public: const LLWString& getWText() const { return mText.getWString(); } S32 getLength() const { return mText.length(); } - S32 getCursor() { return mCursorPos; } + S32 getCursor() const { return mCursorPos; } void setCursor( S32 pos ); void setCursorToEnd(); @@ -177,13 +180,13 @@ public: void setIgnoreTab(BOOL b) { mIgnoreTab = b; } void setPassDelete(BOOL b) { mPassDelete = b; } - void setDrawAsterixes(BOOL b) { mDrawAsterixes = b; } + void setDrawAsterixes(BOOL b); // get the cursor position of the beginning/end of the prev/next word in the text S32 prevWordPos(S32 cursorPos) const; S32 nextWordPos(S32 cursorPos) const; - BOOL hasSelection() { return (mSelectionStart != mSelectionEnd); } + BOOL hasSelection() const { return (mSelectionStart != mSelectionEnd); } void startSelection(); void endSelection(); void extendSelection(S32 new_cursor_pos); @@ -199,7 +202,7 @@ public: static BOOL isPartOfWord(llwchar c); // Prevalidation controls which keystrokes can affect the editor - void setPrevalidate( BOOL (*func)(const LLWString &) ) { mPrevalidateFunc = func; } + void setPrevalidate( BOOL (*func)(const LLWString &) ); static BOOL prevalidateFloat(const LLWString &str ); static BOOL prevalidateInt(const LLWString &str ); static BOOL prevalidatePositiveS32(const LLWString &str); @@ -221,7 +224,7 @@ protected: void addChar(const llwchar c); void setCursorAtLocalPos(S32 local_mouse_x); - S32 findPixelNearestPos(S32 cursor_offset = 0); + S32 findPixelNearestPos(S32 cursor_offset = 0) const; void reportBadKeystroke(); BOOL handleSpecialKey(KEY key, MASK mask); @@ -230,6 +233,19 @@ protected: S32 handleCommitKey(KEY key, MASK mask); protected: + void updateAllowingLanguageInput(); + BOOL hasPreeditString() const; + // Implementation (overrides) of LLPreeditor + virtual void resetPreedit(); + virtual void updatePreedit(const LLWString &preedit_string, + const segment_lengths_t &preedit_segment_lengths, const standouts_t &preedit_standouts, S32 caret_position); + virtual void markAsPreedit(S32 position, S32 length); + virtual void getPreeditRange(S32 *position, S32 *length) const; + virtual void getSelectionRange(S32 *position, S32 *length) const; + virtual BOOL getPreeditLocation(S32 query_position, LLCoordGL *coord, LLRect *bounds, LLRect *control) const; + virtual S32 getPreeditFontSize() const; + +protected: LLUIString mText; // The string being edited. LLString mPrevText; // Saved string for 'ESC' revert LLUIString mLabel; // text label that is visible when no user text provided @@ -241,8 +257,7 @@ protected: LLViewBorder* mBorder; const LLFontGL* mGLFont; - S32 mMaxLengthChars; // Max number of characters - S32 mMaxLengthBytes; // Max length of the UTF8 string. + S32 mMaxLengthBytes; // Max length of the UTF8 string in bytes S32 mCursorPos; // I-beam is just after the mCursorPos-th character. S32 mScrollHPos; // Horizontal offset from the start of mText. Used for scrolling. LLFrameTimer mScrollTimer; @@ -288,6 +303,11 @@ protected: BOOL mPassDelete; BOOL mReadOnly; + + LLWString mPreeditWString; + LLWString mPreeditOverwrittenWString; + std::vector mPreeditPositions; + LLPreeditor::standouts_t mPreeditStandouts; }; diff --git a/linden/indra/llui/llmemberlistener.h b/linden/indra/llui/llmemberlistener.h index b4ee2f1..02aff17 100644 --- a/linden/indra/llui/llmemberlistener.h +++ b/linden/indra/llui/llmemberlistener.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 4afa6b9..a56b090 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -632,7 +632,7 @@ public: }; LLMenuItemSeparatorGL::LLMenuItemSeparatorGL( const LLString &name ) : - LLMenuItemGL( SEPARATOR_NAME, SEPARATOR_LABEL ) + LLMenuItemGL( name, SEPARATOR_LABEL ) { } @@ -2832,7 +2832,7 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa while(1) { // skip separators and disabled items - if ((*next_item_iter)->getEnabled() && (*next_item_iter)->getName() != SEPARATOR_NAME) + if ((*next_item_iter)->getEnabled() && (*next_item_iter)->getType() != SEPARATOR_NAME) { if (cur_item) { @@ -4514,7 +4514,7 @@ BOOL LLMenuHolderGL::hideMenus() } //if (gFocusMgr.childHasKeyboardFocus(this)) //{ - // gFocusMgr.setKeyboardFocus(NULL, NULL); + // gFocusMgr.setKeyboardFocus(NULL); //} return menu_visible; @@ -4599,6 +4599,7 @@ void LLTearOffMenu::onFocusReceived() break; } } + LLFloater::onFocusReceived(); } void LLTearOffMenu::onFocusLost() diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h index 21594f6..9274101 100644 --- a/linden/indra/llui/llmenugl.h +++ b/linden/indra/llui/llmenugl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llmodaldialog.cpp b/linden/indra/llui/llmodaldialog.cpp index 72a7fcb..ff4858f 100644 --- a/linden/indra/llui/llmodaldialog.cpp +++ b/linden/indra/llui/llmodaldialog.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -70,6 +70,16 @@ LLModalDialog::~LLModalDialog() } } +// virtual +void LLModalDialog::open() /* Flawfinder: ignore */ +{ + // SJB: Hack! Make sure we don't ever host a modal dialog + LLMultiFloater* thost = LLFloater::sHostp; + LLFloater::sHostp = NULL; + LLFloater::open(); + LLFloater::sHostp = thost; +} + void LLModalDialog::reshape(S32 width, S32 height, BOOL called_from_parent) { LLFloater::reshape(width, height, called_from_parent); @@ -287,7 +297,7 @@ void LLModalDialog::onAppFocusLost() if( gFocusMgr.childHasKeyboardFocus( instance ) ) { - gFocusMgr.setKeyboardFocus( NULL, NULL ); + gFocusMgr.setKeyboardFocus( NULL ); } } } diff --git a/linden/indra/llui/llmodaldialog.h b/linden/indra/llui/llmodaldialog.h index 1529ac3..342a0f6 100644 --- a/linden/indra/llui/llmodaldialog.h +++ b/linden/indra/llui/llmodaldialog.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -47,6 +47,8 @@ public: LLModalDialog( const LLString& title, S32 width, S32 height, BOOL modal = true ); /*virtual*/ ~LLModalDialog(); + /*virtual*/ void open(); /* Flawfinder: ignore */ + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = 1); /*virtual*/ void startModal(); diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 2c37dfd..af8aa21 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -64,7 +64,6 @@ LLPanel::panel_map_t LLPanel::sPanelMap; LLPanel::alert_queue_t LLPanel::sAlertQueue; const S32 RESIZE_BAR_OVERLAP = 1; -const S32 PANEL_STACK_GAP = RESIZE_BAR_HEIGHT; void LLPanel::init() { @@ -88,6 +87,7 @@ LLPanel::LLPanel() : mRectControl() { init(); + setName("panel"); } LLPanel::LLPanel(const LLString& name) @@ -124,6 +124,7 @@ LLPanel::LLPanel(const LLString& name, const LLString& rect_control, BOOL border void LLPanel::addBorder(LLViewBorder::EBevel border_bevel, LLViewBorder::EStyle border_style, S32 border_thickness) { + removeBorder(); mBorder = new LLViewBorder( "panel border", LLRect(0, mRect.getHeight(), mRect.getWidth(), 0), border_bevel, border_style, border_thickness ); @@ -339,11 +340,6 @@ void LLPanel::addCtrl( LLUICtrl* ctrl, S32 tab_group) mLastTabGroup = tab_group; LLView::addCtrl(ctrl, tab_group); - // propagate chrome to children only if they have not been flagged as chrome - if (!ctrl->getIsChrome()) - { - ctrl->setIsChrome(getIsChrome()); - } } void LLPanel::addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group) @@ -351,22 +347,12 @@ void LLPanel::addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group) mLastTabGroup = tab_group; LLView::addCtrlAtEnd(ctrl, tab_group); - if (!ctrl->getIsChrome()) - { - ctrl->setIsChrome(getIsChrome()); - } } BOOL LLPanel::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) { BOOL handled = FALSE; - if( getVisible() && getEnabled() && gFocusMgr.childHasKeyboardFocus(this) && KEY_ESCAPE == key ) - { - gFocusMgr.setKeyboardFocus(NULL, NULL); - return TRUE; - } - if( getVisible() && getEnabled() && gFocusMgr.childHasKeyboardFocus(this) && !called_from_parent ) { @@ -472,7 +458,7 @@ void LLPanel::setFocus(BOOL b) { if( this == gFocusMgr.getKeyboardFocus() ) { - gFocusMgr.setKeyboardFocus( NULL, NULL ); + gFocusMgr.setKeyboardFocus( NULL ); } else { @@ -595,7 +581,8 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *fac { LLRect rect; createRect(node, rect, parent, LLRect()); - panelp = new LLPanel(name, rect); + // create a new panel without a border, by default + panelp = new LLPanel(name, rect, FALSE); panelp->initPanelXML(node, parent, factory); // preserve panel's width and height, but override the location const LLRect& panelrect = panelp->getRect(); @@ -608,12 +595,13 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *fac { panelp->initPanelXML(node, parent, factory); } + return panelp; } BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) { - LLString name("panel"); + LLString name = getName(); node->getAttributeString("name", name); setName(name); @@ -628,13 +616,15 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f if (!xml_filename.empty()) { - // Preserve postion of embedded panel but allow panel to dictate width/height - LLRect rect(getRect()); didPost = factory->buildPanel(this, xml_filename, NULL); - S32 w = getRect().getWidth(); - S32 h = getRect().getHeight(); - rect.setLeftTopAndSize(rect.mLeft, rect.mTop, w, h); - setRect(rect); + + LLRect new_rect = getRect(); + // override rectangle with embedding parameters as provided + createRect(node, new_rect, parent); + setOrigin(new_rect.mLeft, new_rect.mBottom); + reshape(new_rect.getWidth(), new_rect.getHeight()); + // optionally override follows flags from including nodes + parseFollowsFlags(node); } else { @@ -678,7 +668,7 @@ void LLPanel::setPanelParameters(LLXMLNodePtr node, LLView* parent) initFromXML(node, parent); /////// Border attributes /////// - BOOL border = FALSE; + BOOL border = mBorder != NULL; node->getAttributeBOOL("border", border); if (border) { @@ -706,24 +696,24 @@ void LLPanel::setPanelParameters(LLXMLNodePtr node, LLView* parent) } /////// Background attributes /////// - BOOL background_visible = FALSE; + BOOL background_visible = mBgVisible; node->getAttributeBOOL("background_visible", background_visible); setBackgroundVisible(background_visible); - BOOL background_opaque = FALSE; + BOOL background_opaque = mBgOpaque; node->getAttributeBOOL("background_opaque", background_opaque); setBackgroundOpaque(background_opaque); LLColor4 color; - color = LLUI::sColorsGroup->getColor( "FocusBackgroundColor" ); + color = mBgColorOpaque; LLUICtrlFactory::getAttributeColor(node,"bg_opaque_color", color); setBackgroundColor(color); - color = LLUI::sColorsGroup->getColor( "DefaultBackgroundColor" ); + color = mBgColorAlpha; LLUICtrlFactory::getAttributeColor(node,"bg_alpha_color", color); setTransparentColor(color); - LLString label; + LLString label = getLabel(); node->getAttributeString("label", label); setLabel(label); } @@ -853,12 +843,12 @@ BOOL LLPanel::childHasFocus(const LLString& id) } -void LLPanel::childSetFocusChangedCallback(const LLString& id, void (*cb)(LLUICtrl*, void*)) +void LLPanel::childSetFocusChangedCallback(const LLString& id, void (*cb)(LLFocusableElement*, void*), void* user_data) { LLUICtrl* child = (LLUICtrl*)getChildByName(id, true); if (child) { - child->setFocusChangedCallback(cb); + child->setFocusChangedCallback(cb, user_data); } } @@ -1165,11 +1155,12 @@ void LLPanel::storeRectControl() // struct LLLayoutStack::LLEmbeddedPanel { - LLEmbeddedPanel(LLPanel* panelp, eLayoutOrientation orientation, S32 min_width, S32 min_height, BOOL auto_resize) : + LLEmbeddedPanel(LLPanel* panelp, eLayoutOrientation orientation, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize) : mPanel(panelp), mMinWidth(min_width), mMinHeight(min_height), mAutoResize(auto_resize), + mUserResize(user_resize), mOrientation(orientation), mVisibleAmt(1.f) // default to fully visible { @@ -1194,10 +1185,18 @@ struct LLLayoutStack::LLEmbeddedPanel } } + ~LLEmbeddedPanel() + { + // probably not necessary, but... + delete mResizeBar; + mResizeBar = NULL; + } + LLPanel* mPanel; S32 mMinWidth; S32 mMinHeight; BOOL mAutoResize; + BOOL mUserResize; LLResizeBar* mResizeBar; eLayoutOrientation mOrientation; F32 mVisibleAmt; @@ -1206,36 +1205,40 @@ struct LLLayoutStack::LLEmbeddedPanel LLLayoutStack::LLLayoutStack(eLayoutOrientation orientation) : mOrientation(orientation), mMinWidth(0), - mMinHeight(0) + mMinHeight(0), + mPanelSpacing(RESIZE_BAR_HEIGHT) { } LLLayoutStack::~LLLayoutStack() { + std::for_each(mPanels.begin(), mPanels.end(), DeletePointer()); } void LLLayoutStack::draw() { updateLayout(); { - // clip if outside nominal bounds - LLLocalClipRect clip(getLocalRect(), mRect.getWidth() > mMinWidth || mRect.getHeight() > mMinHeight); e_panel_list_t::iterator panel_it; for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it) { + // clip to layout rectangle, not bounding rectangle LLRect clip_rect = (*panel_it)->mPanel->getRect(); // scale clipping rectangle by visible amount if (mOrientation == HORIZONTAL) { - clip_rect.mRight = clip_rect.mLeft + llround(clip_rect.getWidth() * (*panel_it)->mVisibleAmt); + clip_rect.mRight = clip_rect.mLeft + llround((F32)clip_rect.getWidth() * (*panel_it)->mVisibleAmt); } else { - clip_rect.mBottom = clip_rect.mTop - llround(clip_rect.getHeight() * (*panel_it)->mVisibleAmt); + clip_rect.mBottom = clip_rect.mTop - llround((F32)clip_rect.getHeight() * (*panel_it)->mVisibleAmt); } - LLLocalClipRect clip(clip_rect, (*panel_it)->mVisibleAmt < 1.f); + + LLPanel* panelp = (*panel_it)->mPanel; + + LLLocalClipRect clip(clip_rect); // only force drawing invisible children if visible amount is non-zero - drawChild((*panel_it)->mPanel, 0, 0, (*panel_it)->mVisibleAmt > 0.f); + drawChild(panelp, 0, 0, !clip_rect.isNull()); } } } @@ -1250,17 +1253,13 @@ void LLLayoutStack::removeCtrl(LLUICtrl* ctrl) delete embedded_panelp; } + // need to update resizebars + calcMinExtents(); LLView::removeCtrl(ctrl); } -void LLLayoutStack::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - LLView::reshape(width, height, called_from_parent); - //updateLayout(); -} - LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const { LLXMLNodePtr node = LLView::getXML(); @@ -1290,6 +1289,14 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor LLLayoutStack* layout_stackp = new LLLayoutStack(orientation); + node->getAttributeS32("border_size", layout_stackp->mPanelSpacing); + // don't allow negative spacing values + layout_stackp->mPanelSpacing = llmax(layout_stackp->mPanelSpacing, 0); + + LLString name("stack"); + node->getAttributeString("name", name); + + layout_stackp->setName(name); layout_stackp->initFromXML(node, parent); LLXMLNodePtr child; @@ -1300,16 +1307,18 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor S32 min_width = 0; S32 min_height = 0; BOOL auto_resize = TRUE; + BOOL user_resize = TRUE; child->getAttributeS32("min_width", min_width); child->getAttributeS32("min_height", min_height); child->getAttributeBOOL("auto_resize", auto_resize); + child->getAttributeBOOL("user_resize", user_resize); LLPanel* panelp = (LLPanel*)LLPanel::fromXML(child, layout_stackp, factory); if (panelp) { panelp->setFollowsNone(); - layout_stackp->addPanel(panelp, min_width, min_height, auto_resize); + layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize); } } } @@ -1327,11 +1336,36 @@ S32 LLLayoutStack::getMinHeight() return mMinHeight; } -void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, S32 index) +S32 LLLayoutStack::getDefaultHeight(S32 cur_height) +{ + // if we are spanning our children (crude upward propagation of size) + // then don't enforce our size on our children + if (mOrientation == HORIZONTAL) + { + cur_height = llmax(mMinHeight, mRect.getHeight()); + } + + return cur_height; +} + +S32 LLLayoutStack::getDefaultWidth(S32 cur_width) { - LLEmbeddedPanel* embedded_panel = new LLEmbeddedPanel(panel, mOrientation, min_width, min_height, auto_resize); + // if we are spanning our children (crude upward propagation of size) + // then don't enforce our size on our children + if (mOrientation == VERTICAL) + { + cur_width = llmax(mMinWidth, mRect.getWidth()); + } + + return cur_width; +} + +void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, S32 index) +{ + LLEmbeddedPanel* embedded_panel = new LLEmbeddedPanel(panel, mOrientation, min_width, min_height, auto_resize, user_resize); mPanels.insert(mPanels.begin() + llclamp(index, 0, (S32)mPanels.size()), embedded_panel); + addChild(panel); addChild(embedded_panel->mResizeBar); @@ -1339,29 +1373,15 @@ void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL // with a bit of overlap for (e_panel_list_t::iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it) { - e_panel_list_t::iterator next_it = panel_it; - ++next_it; - LLResizeBar* resize_barp = (*panel_it)->mResizeBar; sendChildToFront(resize_barp); - // last resize bar is disabled, since its not between any two panels - if ( next_it == mPanels.end() ) - { - resize_barp->setEnabled(FALSE); - } - else - { - resize_barp->setEnabled(TRUE); - } } - //updateLayout(); } void LLLayoutStack::removePanel(LLPanel* panel) { removeChild(panel); - //updateLayout(); } void LLLayoutStack::updateLayout(BOOL force_resize) @@ -1369,11 +1389,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize) calcMinExtents(); // calculate current extents - S32 cur_width = 0; - S32 cur_height = 0; + S32 total_width = 0; + S32 total_height = 0; const F32 ANIM_OPEN_TIME = 0.02f; - const F32 ANIM_CLOSE_TIME = 0.02f; + const F32 ANIM_CLOSE_TIME = 0.03f; e_panel_list_t::iterator panel_it; for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it) @@ -1395,23 +1415,22 @@ void LLLayoutStack::updateLayout(BOOL force_resize) (*panel_it)->mVisibleAmt = 0.f; } } + if (mOrientation == HORIZONTAL) { - // all panels get expanded to max of all the minimum dimensions - cur_height = llmax(mMinHeight, panelp->getRect().getHeight()); - cur_width += llround(panelp->getRect().getWidth() * (*panel_it)->mVisibleAmt); - if (panel_it != mPanels.end()) + total_width += llround(panelp->getRect().getWidth() * (*panel_it)->mVisibleAmt); + // want n-1 panel gaps for n panels + if (panel_it != mPanels.begin()) { - cur_width += PANEL_STACK_GAP; + total_width += mPanelSpacing; } } else //VERTICAL { - cur_width = llmax(mMinWidth, panelp->getRect().getWidth()); - cur_height += llround(panelp->getRect().getHeight() * (*panel_it)->mVisibleAmt); - if (panel_it != mPanels.end()) + total_height += llround(panelp->getRect().getHeight() * (*panel_it)->mVisibleAmt); + if (panel_it != mPanels.begin()) { - cur_height += PANEL_STACK_GAP; + total_height += mPanelSpacing; } } } @@ -1457,11 +1476,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize) S32 pixels_to_distribute; if (mOrientation == HORIZONTAL) { - pixels_to_distribute = mRect.getWidth() - cur_width; + pixels_to_distribute = mRect.getWidth() - total_width; } else //VERTICAL { - pixels_to_distribute = mRect.getHeight() - cur_height; + pixels_to_distribute = mRect.getHeight() - total_height; } S32 cur_x = 0; @@ -1474,7 +1493,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize) S32 cur_width = panelp->getRect().getWidth(); S32 cur_height = panelp->getRect().getHeight(); S32 new_width = llmax((*panel_it)->mMinWidth, cur_width); - S32 new_height = llmax((*panel_it)->mMinHeight, cur_height); + S32 new_height = llmax((*panel_it)->mMinHeight, cur_height); S32 delta_size = 0; @@ -1494,11 +1513,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize) // grow all elements equally delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels); } - new_width = llmax((*panel_it)->mMinWidth, panelp->getRect().getWidth() + delta_size); + new_width = llmax((*panel_it)->mMinWidth, cur_width + delta_size); } else { - new_width = llmax(mMinWidth, mRect.getWidth()); + new_width = getDefaultWidth(new_width); } if (mOrientation == VERTICAL) @@ -1512,22 +1531,22 @@ void LLLayoutStack::updateLayout(BOOL force_resize) { delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels); } - new_height = llmax((*panel_it)->mMinHeight, panelp->getRect().getHeight() + delta_size); + new_height = llmax((*panel_it)->mMinHeight, cur_height + delta_size); } else { - new_height = llmax(mMinHeight, mRect.getHeight()); + new_height = getDefaultHeight(new_height); } } - else // don't resize + else { if (mOrientation == HORIZONTAL) { - new_height = llmax(mMinHeight, mRect.getHeight()); + new_height = getDefaultHeight(new_height); } else // VERTICAL { - new_width = llmax(mMinWidth, mRect.getWidth()); + new_width = getDefaultWidth(new_width); } } @@ -1542,22 +1561,22 @@ void LLLayoutStack::updateLayout(BOOL force_resize) if (mOrientation == HORIZONTAL) { resize_bar_rect.mLeft = panel_rect.mRight - RESIZE_BAR_OVERLAP; - resize_bar_rect.mRight = panel_rect.mRight + PANEL_STACK_GAP + RESIZE_BAR_OVERLAP; + resize_bar_rect.mRight = panel_rect.mRight + mPanelSpacing + RESIZE_BAR_OVERLAP; } else { resize_bar_rect.mTop = panel_rect.mBottom + RESIZE_BAR_OVERLAP; - resize_bar_rect.mBottom = panel_rect.mBottom - PANEL_STACK_GAP - RESIZE_BAR_OVERLAP; + resize_bar_rect.mBottom = panel_rect.mBottom - mPanelSpacing - RESIZE_BAR_OVERLAP; } (*panel_it)->mResizeBar->setRect(resize_bar_rect); if (mOrientation == HORIZONTAL) { - cur_x += llround(new_width * (*panel_it)->mVisibleAmt) + PANEL_STACK_GAP; + cur_x += llround(new_width * (*panel_it)->mVisibleAmt) + mPanelSpacing; } else //VERTICAL { - cur_y -= llround(new_height * (*panel_it)->mVisibleAmt) + PANEL_STACK_GAP; + cur_y -= llround(new_height * (*panel_it)->mVisibleAmt) + mPanelSpacing; } } @@ -1569,29 +1588,38 @@ void LLLayoutStack::updateLayout(BOOL force_resize) if (mOrientation == HORIZONTAL) { - (*panel_it)->mResizeBar->setResizeLimits((*panel_it)->mMinWidth, (*panel_it)->mMinWidth + shrink_headroom_total); + (*panel_it)->mResizeBar->setResizeLimits( + (*panel_it)->mMinWidth, + (*panel_it)->mMinWidth + shrink_headroom_total); } else //VERTICAL { - (*panel_it)->mResizeBar->setResizeLimits((*panel_it)->mMinHeight, (*panel_it)->mMinHeight + shrink_headroom_total); + (*panel_it)->mResizeBar->setResizeLimits( + (*panel_it)->mMinHeight, + (*panel_it)->mMinHeight + shrink_headroom_total); } - // hide resize bars for invisible panels - (*panel_it)->mResizeBar->setVisible(panelp->getVisible()); - if (panelp->getVisible()) + + // toggle resize bars based on panel visibility, resizability, etc + BOOL resize_bar_enabled = panelp->getVisible() && (*panel_it)->mUserResize; + (*panel_it)->mResizeBar->setVisible(resize_bar_enabled); + + if (resize_bar_enabled) { last_resize_bar = (*panel_it)->mResizeBar; } } // hide last resize bar as there is nothing past it + // resize bars need to be in between two resizable panels if (last_resize_bar) { last_resize_bar->setVisible(FALSE); } // not enough room to fit existing contents - if (!force_resize && - ((cur_y != -PANEL_STACK_GAP) || (cur_x != mRect.getWidth() + PANEL_STACK_GAP))) + if (!force_resize + && ((cur_y != -mPanelSpacing) + || (cur_x != mRect.getWidth() + mPanelSpacing))) { // do another layout pass with all stacked elements contributing // even those that don't usually resize @@ -1623,20 +1651,22 @@ void LLLayoutStack::calcMinExtents() { if (mOrientation == HORIZONTAL) { - mMinHeight = llmax(mMinHeight, (*panel_it)->mMinHeight); + mMinHeight = llmax( mMinHeight, + (*panel_it)->mMinHeight); mMinWidth += (*panel_it)->mMinWidth; if (panel_it != mPanels.begin()) { - mMinWidth += PANEL_STACK_GAP; + mMinWidth += mPanelSpacing; } } else //VERTICAL { - mMinWidth = llmax(mMinWidth, (*panel_it)->mMinWidth); + mMinWidth = llmax( mMinWidth, + (*panel_it)->mMinWidth); mMinHeight += (*panel_it)->mMinHeight; if (panel_it != mPanels.begin()) { - mMinHeight += PANEL_STACK_GAP; + mMinHeight += mPanelSpacing; } } } diff --git a/linden/indra/llui/llpanel.h b/linden/indra/llui/llpanel.h index d706fc8..bcbda2c 100644 --- a/linden/indra/llui/llpanel.h +++ b/linden/indra/llui/llpanel.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -173,7 +173,7 @@ public: // LLUICtrl void childSetFocus(const LLString& id, BOOL focus = TRUE); BOOL childHasFocus(const LLString& id); - void childSetFocusChangedCallback(const LLString& id, void (*cb)(LLUICtrl*, void*)); + void childSetFocusChangedCallback(const LLString& id, void (*cb)(LLFocusableElement*, void*), void* user_data = NULL); void childSetCommitCallback(const LLString& id, void (*cb)(LLUICtrl*, void*), void* userdata = NULL ); void childSetDoubleClickCallback(const LLString& id, void (*cb)(void*), void* userdata = NULL ); @@ -277,9 +277,9 @@ public: virtual ~LLLayoutStack(); /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); /*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const; /*virtual*/ void removeCtrl(LLUICtrl* ctrl); + virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_LAYOUT_STACK; } virtual LLString getWidgetTag() const { return LL_LAYOUT_STACK_TAG; } @@ -288,7 +288,7 @@ public: S32 getMinWidth(); S32 getMinHeight(); - void addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, S32 index = S32_MAX); + void addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, S32 index = S32_MAX); void removePanel(LLPanel* panel); void updateLayout(BOOL force_resize = FALSE); @@ -299,6 +299,8 @@ protected: void calcMinExtents(); S32 getMinStackSize(); S32 getCurStackSize(); + S32 getDefaultHeight(S32 cur_height); + S32 getDefaultWidth(S32 cur_width); protected: eLayoutOrientation mOrientation; @@ -308,6 +310,7 @@ protected: S32 mMinWidth; S32 mMinHeight; + S32 mPanelSpacing; }; #endif diff --git a/linden/indra/llui/llradiogroup.cpp b/linden/indra/llui/llradiogroup.cpp index cfb11cd..dad1941 100644 --- a/linden/indra/llui/llradiogroup.cpp +++ b/linden/indra/llui/llradiogroup.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -473,7 +473,7 @@ BOOL LLRadioGroup::setSelectedByValue(LLSD value, BOOL selected) return FALSE; } -LLSD LLRadioGroup::getSimpleSelectedValue() +LLSD LLRadioGroup::getSelectedValue() { return getValue(); } diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h index 1eb6bb7..e0a4168 100644 --- a/linden/indra/llui/llradiogroup.h +++ b/linden/indra/llui/llradiogroup.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -122,7 +122,7 @@ public: /*virtual*/ BOOL setCurrentByID( const LLUUID& id ); /*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu /*virtual*/ BOOL setSelectedByValue(LLSD value, BOOL selected); - /*virtual*/ LLSD getSimpleSelectedValue(); + /*virtual*/ LLSD getSelectedValue(); /*virtual*/ BOOL isSelected(LLSD value); /*virtual*/ BOOL operateOnSelection(EOperation op); /*virtual*/ BOOL operateOnAll(EOperation op); diff --git a/linden/indra/llui/llresizebar.cpp b/linden/indra/llui/llresizebar.cpp index 8ac165c..e6ce03b 100644 --- a/linden/indra/llui/llresizebar.cpp +++ b/linden/indra/llui/llresizebar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llresizebar.h b/linden/indra/llui/llresizebar.h index b9ad124..11fca9d 100644 --- a/linden/indra/llui/llresizebar.h +++ b/linden/indra/llui/llresizebar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llresizehandle.cpp b/linden/indra/llui/llresizehandle.cpp index 36eb3b1..739d583 100644 --- a/linden/indra/llui/llresizehandle.cpp +++ b/linden/indra/llui/llresizehandle.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -60,7 +60,7 @@ LLResizeHandle::LLResizeHandle( const LLString& name, const LLRect& rect, S32 mi if( RIGHT_BOTTOM == mCorner) { LLUUID image_id(LLUI::sConfigGroup->getString("UIImgResizeBottomRightUUID")); - mImage = LLUI::sImageProvider->getUIImageByID(image_id); + mImage = LLUI::sImageProvider->getImageByID(image_id); } switch( mCorner ) diff --git a/linden/indra/llui/llresizehandle.h b/linden/indra/llui/llresizehandle.h index 90c96d7..863ce70 100644 --- a/linden/indra/llui/llresizehandle.h +++ b/linden/indra/llui/llresizehandle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llresmgr.cpp b/linden/indra/llui/llresmgr.cpp index 1922f3f..83ad440 100644 --- a/linden/indra/llui/llresmgr.cpp +++ b/linden/indra/llui/llresmgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llresmgr.h b/linden/indra/llui/llresmgr.h index 9f29282..b851795 100644 --- a/linden/indra/llui/llresmgr.h +++ b/linden/indra/llui/llresmgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llrootview.cpp b/linden/indra/llui/llrootview.cpp index 57fe3ee..1580f99 100644 --- a/linden/indra/llui/llrootview.cpp +++ b/linden/indra/llui/llrootview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llrootview.h b/linden/indra/llui/llrootview.h index 0b6fea3..13037f0 100644 --- a/linden/indra/llui/llrootview.h +++ b/linden/indra/llui/llrootview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llscrollbar.cpp b/linden/indra/llui/llscrollbar.cpp index 34acf03..ec46551 100644 --- a/linden/indra/llui/llscrollbar.cpp +++ b/linden/indra/llui/llscrollbar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -159,30 +159,50 @@ void LLScrollbar::setDocParams( S32 size, S32 pos ) void LLScrollbar::setDocPos(S32 pos) { - mDocPos = llclamp( pos, 0, getDocPosMax() ); - mDocChanged = TRUE; + if (pos != mDocPos) + { + mDocPos = llclamp( pos, 0, getDocPosMax() ); + mDocChanged = TRUE; - updateThumbRect(); + updateThumbRect(); + } } void LLScrollbar::setDocSize(S32 size) { - mDocSize = size; - mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); - mDocChanged = TRUE; + if (size != mDocSize) + { + mDocSize = size; + mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); + mDocChanged = TRUE; - updateThumbRect(); + updateThumbRect(); + } } void LLScrollbar::setPageSize( S32 page_size ) { - mPageSize = page_size; - mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); - mDocChanged = TRUE; + if (page_size != mPageSize) + { + mPageSize = page_size; + mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); + mDocChanged = TRUE; - updateThumbRect(); + updateThumbRect(); + } +} + +BOOL LLScrollbar::isAtBeginning() +{ + return mDocPos == 0; +} + +BOOL LLScrollbar::isAtEnd() +{ + return mDocPos == getDocPosMax(); } + void LLScrollbar::updateThumbRect() { // llassert( 0 <= mDocSize ); @@ -479,7 +499,7 @@ void LLScrollbar::draw() // Draw background and thumb. LLUUID rounded_rect_image_id; rounded_rect_image_id.set(LLUI::sAssetsGroup->getString("rounded_square.tga")); - LLImageGL* rounded_rect_imagep = LLUI::sImageProvider->getUIImageByID(rounded_rect_image_id); + LLImageGL* rounded_rect_imagep = LLUI::sImageProvider->getImageByID(rounded_rect_image_id); if (!rounded_rect_imagep) { diff --git a/linden/indra/llui/llscrollbar.h b/linden/indra/llui/llscrollbar.h index 1bfd0f6..464c9c1 100644 --- a/linden/indra/llui/llscrollbar.h +++ b/linden/indra/llui/llscrollbar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -88,6 +88,9 @@ public: void setDocPos( S32 pos ); S32 getDocPos() { return mDocPos; } + BOOL isAtBeginning(); + BOOL isAtEnd(); + // How many "lines" of the "document" is can appear on a page. void setPageSize( S32 page_size ); S32 getPageSize() { return mPageSize; } diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp index 414a2d7..8c8b40c 100644 --- a/linden/indra/llui/llscrollcontainer.cpp +++ b/linden/indra/llui/llscrollcontainer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -394,33 +394,29 @@ BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL LLScrollableContainerView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect) { - if( getVisible() && pointInView(x,y) ) + S32 local_x, local_y; + for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) { - S32 local_x, local_y; - for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) + local_x = x - mScrollbar[i]->getRect().mLeft; + local_y = y - mScrollbar[i]->getRect().mBottom; + if( mScrollbar[i]->handleToolTip(local_x, local_y, msg, sticky_rect) ) { - local_x = x - mScrollbar[i]->getRect().mLeft; - local_y = y - mScrollbar[i]->getRect().mBottom; - if( mScrollbar[i]->handleToolTip(local_x, local_y, msg, sticky_rect) ) - { - return TRUE; - } + return TRUE; } - // Handle 'child' view. - if( mScrolledView ) + } + // Handle 'child' view. + if( mScrolledView ) + { + local_x = x - mScrolledView->getRect().mLeft; + local_y = y - mScrolledView->getRect().mBottom; + if( mScrolledView->handleToolTip(local_x, local_y, msg, sticky_rect) ) { - local_x = x - mScrolledView->getRect().mLeft; - local_y = y - mScrolledView->getRect().mBottom; - if( mScrolledView->handleToolTip(local_x, local_y, msg, sticky_rect) ) - { - return TRUE; - } + return TRUE; } - - // Opaque - return TRUE; } - return FALSE; + + // Opaque + return TRUE; } void LLScrollableContainerView::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) diff --git a/linden/indra/llui/llscrollcontainer.h b/linden/indra/llui/llscrollcontainer.h index 682cade..fb7198c 100644 --- a/linden/indra/llui/llscrollcontainer.h +++ b/linden/indra/llui/llscrollcontainer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llscrollingpanellist.cpp b/linden/indra/llui/llscrollingpanellist.cpp index 5f91644..a9d538e 100644 --- a/linden/indra/llui/llscrollingpanellist.cpp +++ b/linden/indra/llui/llscrollingpanellist.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llscrollingpanellist.h b/linden/indra/llui/llscrollingpanellist.h index 77002d0..84dc7f9 100644 --- a/linden/indra/llui/llscrollingpanellist.h +++ b/linden/indra/llui/llscrollingpanellist.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index b80787f..d65ebd2 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -61,73 +61,101 @@ const S32 LIST_SNAP_PADDING = 5; // local structures & classes. struct SortScrollListItem { - SortScrollListItem(const S32 sort_col, BOOL sort_ascending) - { - mSortCol = sort_col; - mSortAscending = sort_ascending; - } + SortScrollListItem(const std::vector >& sort_orders) + : mSortOrders(sort_orders) + {} bool operator()(const LLScrollListItem* i1, const LLScrollListItem* i2) { - const LLScrollListCell *cell1; - const LLScrollListCell *cell2; - - cell1 = i1->getColumn(mSortCol); - cell2 = i2->getColumn(mSortCol); + if ( mSortOrders.empty() ) return true; + + const LLScrollListCell *cell1 = NULL; + const LLScrollListCell *cell2 = NULL; - S32 order = 1; - if (!mSortAscending) + sort_order_t::const_reverse_iterator end_it = mSortOrders.rend(); + sort_order_t::const_reverse_iterator it; + + // sort over all columns in order specified by mSortOrders + S32 sort_result = 0; + for (it = mSortOrders.rbegin(); it != end_it; ++it) { - order = -1; - } + S32 col_idx = it->first; + BOOL sort_ascending = it->second; - BOOL retval = FALSE; + cell1 = i1->getColumn(col_idx); + cell2 = i2->getColumn(col_idx); + // ascending or descending sort for this column? + S32 order = 1; + if (!sort_ascending) + { + order = -1; + } - if (cell1 && cell2) - { - retval = ((order * LLString::compareDict(cell1->getText(), cell2->getText())) < 0); + if (cell1 && cell2) + { + sort_result = (order * LLString::compareDict(cell1->getValue().asString(), cell2->getValue().asString())); + if (sort_result != 0) + { + // we have a sort order! + break; + } + } } - return (retval ? TRUE : FALSE); + return sort_result < 0; } -protected: - S32 mSortCol; - S32 mSortAscending; + typedef std::vector > sort_order_t; + const sort_order_t& mSortOrders; }; - // // LLScrollListIcon // -LLScrollListIcon::LLScrollListIcon(LLImageGL* icon, S32 width, LLUUID image_id) - : mIcon(icon), - mImageUUID(image_id.asString()), - mColor(LLColor4::white) +LLScrollListIcon::LLScrollListIcon(const LLUUID& icon_id, S32 width) + : LLScrollListCell(width), + mColor(LLColor4::white), + mImageUUID(icon_id) { - if (width) - { - mWidth = width; - } - else - { - mWidth = icon->getWidth(); - } + // don't use default image specified by LLUUID::null, use no image in that case + mIcon = icon_id.isNull() ? NULL : LLUI::sImageProvider->getImageByID(icon_id); } LLScrollListIcon::~LLScrollListIcon() { } +void LLScrollListIcon::setValue(LLSD value) +{ + mImageUUID = value.asUUID(); + // don't use default image specified by LLUUID::null, use no image in that case + mIcon = mImageUUID.isNull() ? NULL : LLUI::sImageProvider->getImageByID(mImageUUID); +} + + void LLScrollListIcon::setColor(const LLColor4& color) { mColor = color; } -void LLScrollListIcon::drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const +S32 LLScrollListIcon::getWidth() const +{ + // if no specified fix width, use width of icon + if (mWidth == 0) + { + return mIcon->getWidth(); + } + return mWidth; +} + + +void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color) const { - gl_draw_image(0, 0, mIcon, mColor); + if (mIcon) + { + gl_draw_image(0, 0, mIcon, mColor); + } } // @@ -155,32 +183,32 @@ LLScrollListCheck::~LLScrollListCheck() delete mCheckBox; } -void LLScrollListCheck::drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const +void LLScrollListCheck::draw(const LLColor4& color, const LLColor4& highlight_color) const { mCheckBox->draw(); - } BOOL LLScrollListCheck::handleClick() { - if ( mCheckBox->getEnabled() ) + if (mCheckBox->getEnabled()) { - LLCheckBoxCtrl::onButtonPress(mCheckBox); + mCheckBox->toggle(); } + // don't change selection when clicking on embedded checkbox return TRUE; } // // LLScrollListSeparator // -LLScrollListSeparator::LLScrollListSeparator(S32 width) : mWidth(width) +LLScrollListSeparator::LLScrollListSeparator(S32 width) : LLScrollListCell(width) { } -void LLScrollListSeparator::drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const +void LLScrollListSeparator::draw(const LLColor4& color, const LLColor4& highlight_color) const { //*FIXME: use dynamic item heights and make separators narrow, and inactive - gl_line_2d(5, 8, llmax(5, width - 5), 8, color); + gl_line_2d(5, 8, llmax(5, getWidth() - 5), 8, color); } // @@ -189,11 +217,11 @@ void LLScrollListSeparator::drawToWidth(S32 width, const LLColor4& color, const U32 LLScrollListText::sCount = 0; LLScrollListText::LLScrollListText( const LLString& text, const LLFontGL* font, S32 width, U8 font_style, LLFontGL::HAlign font_alignment, LLColor4& color, BOOL use_color, BOOL visible) -: mText( text ), +: LLScrollListCell(width), + mText( text ), mFont( font ), mFontStyle( font_style ), mFontAlignment( font_alignment ), - mWidth( width ), mVisible( visible ), mHighlightCount( 0 ), mHighlightOffset( 0 ) @@ -213,7 +241,7 @@ LLScrollListText::LLScrollListText( const LLString& text, const LLFontGL* font, // initialize rounded rect image if (!mRoundedRectImage) { - mRoundedRectImage = LLUI::sImageProvider->getUIImageByID(LLUUID(LLUI::sAssetsGroup->getString("rounded_square.tga"))); + mRoundedRectImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("rounded_square.tga"))); } } @@ -223,6 +251,12 @@ LLScrollListText::~LLScrollListText() delete mColor; } +S32 LLScrollListText::getContentWidth() const +{ + return mFont->getWidth(mText.getString()); +} + + void LLScrollListText::setColor(const LLColor4& color) { if (!mColor) @@ -237,14 +271,8 @@ void LLScrollListText::setText(const LLStringExplicit& text) mText = text; } -void LLScrollListText::drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const +void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const { - // If the user has specified a small minimum width, use that. - if (mWidth > 0 && mWidth < width) - { - width = mWidth; - } - const LLColor4* display_color; if (mColor) { @@ -266,10 +294,10 @@ void LLScrollListText::drawToWidth(S32 width, const LLColor4& color, const LLCol left = mFont->getWidth(mText.getString(), 0, mHighlightOffset); break; case LLFontGL::RIGHT: - left = width - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX); + left = getWidth() - mFont->getWidth(mText.getString(), mHighlightOffset, S32_MAX); break; case LLFontGL::HCENTER: - left = (width - mFont->getWidth(mText.getString())) / 2; + left = (getWidth() - mFont->getWidth(mText.getString())) / 2; break; } gl_segmented_rect_2d_tex(left - 2, @@ -291,10 +319,10 @@ void LLScrollListText::drawToWidth(S32 width, const LLColor4& color, const LLCol start_x = 0.f; break; case LLFontGL::RIGHT: - start_x = (F32)width; + start_x = (F32)getWidth(); break; case LLFontGL::HCENTER: - start_x = (F32)width * 0.5f; + start_x = (F32)getWidth() * 0.5f; break; } mFont->render(mText.getWString(), 0, @@ -304,8 +332,10 @@ void LLScrollListText::drawToWidth(S32 width, const LLColor4& color, const LLCol LLFontGL::BOTTOM, mFontStyle, string_chars, - width, - &right_x, FALSE, TRUE); + getWidth(), + &right_x, + FALSE, + TRUE); } @@ -314,31 +344,6 @@ LLScrollListItem::~LLScrollListItem() std::for_each(mColumns.begin(), mColumns.end(), DeletePointer()); } -BOOL LLScrollListItem::handleClick(S32 x, S32 y, MASK mask) -{ - BOOL handled = FALSE; - - S32 left = 0; - S32 right = 0; - S32 width = 0; - - std::vector::iterator iter = mColumns.begin(); - std::vector::iterator end = mColumns.end(); - for ( ; iter != end; ++iter) - { - width = (*iter)->getWidth(); - right += width; - if (left <= x && x < right ) - { - handled = (*iter)->handleClick(); - break; - } - - left += width; - } - return handled; -} - void LLScrollListItem::setNumColumns(S32 columns) { S32 prev_columns = mColumns.size(); @@ -375,7 +380,7 @@ LLString LLScrollListItem::getContentsCSV() S32 count = getNumColumns(); for (S32 i=0; igetText(); + ret += getColumn(i)->getValue().asString(); if (i < count-1) { ret += ", "; @@ -385,17 +390,107 @@ LLString LLScrollListItem::getContentsCSV() return ret; } +void LLScrollListItem::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding) +{ + // draw background rect + LLRect bg_rect = rect; + // pad background rectangle to separate it from contents + bg_rect.stretch(LIST_BORDER_PAD, 0); + { + LLGLSNoTexture no_texture; + glColor4fv(bg_color.mV); + gl_rect_2d( bg_rect ); + } + + S32 cur_x = rect.mLeft; + S32 num_cols = getNumColumns(); + S32 cur_col = 0; + + for (LLScrollListCell* cell = getColumn(0); cur_col < num_cols; cell = getColumn(++cur_col)) + { + // Two ways a cell could be hidden + if (cell->getWidth() < 0 + || !cell->getVisible()) continue; + + LLUI::pushMatrix(); + { + LLUI::translate((F32) cur_x, (F32) rect.mBottom, 0.0f); + + cell->draw( fg_color, highlight_color ); + } + LLUI::popMatrix(); + + cur_x += cell->getWidth() + column_padding; + } +} + + void LLScrollListItem::setEnabled(BOOL b) { - if (b != mEnabled) + mEnabled = b; +} + +//--------------------------------------------------------------------------- +// LLScrollListItemComment +//--------------------------------------------------------------------------- +LLScrollListItemComment::LLScrollListItemComment(const LLString& comment_string, const LLColor4& color) +: LLScrollListItem(FALSE), + mColor(color) +{ + addColumn( comment_string, gResMgr->getRes( LLFONT_SANSSERIF_SMALL ) ); +} + +void LLScrollListItemComment::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding) +{ + LLScrollListCell* cell = getColumn(0); + if (cell) + { + // Two ways a cell could be hidden + if (cell->getWidth() < 0 + || !cell->getVisible()) return; + + LLUI::pushMatrix(); + { + LLUI::translate((F32)rect.mLeft, (F32)rect.mBottom, 0.0f); + + // force first cell to be width of entire item + cell->setWidth(rect.getWidth()); + cell->draw( mColor, highlight_color ); + } + LLUI::popMatrix(); + } +} + +//--------------------------------------------------------------------------- +// LLScrollListItemSeparator +//--------------------------------------------------------------------------- +LLScrollListItemSeparator::LLScrollListItemSeparator() +: LLScrollListItem(FALSE) +{ + LLScrollListSeparator* cell = new LLScrollListSeparator(0); + setNumColumns(1); + setColumn(0, cell); +} + +void LLScrollListItemSeparator::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding) +{ + //TODO* move LLScrollListSeparator::draw into here and get rid of it + LLScrollListCell* cell = getColumn(0); + if (cell) { - std::vector::iterator iter = mColumns.begin(); - std::vector::iterator end = mColumns.end(); - for ( ; iter != end; ++iter) + // Two ways a cell could be hidden + if (cell->getWidth() < 0 + || !cell->getVisible()) return; + + LLUI::pushMatrix(); { - (*iter)->setEnabled(b); + LLUI::translate((F32)rect.mLeft, (F32)rect.mBottom, 0.0f); + + // force first cell to be width of entire item + cell->setWidth(rect.getWidth()); + cell->draw( fg_color, highlight_color ); } - mEnabled = b; + LLUI::popMatrix(); } } @@ -423,10 +518,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, mNeedsScroll(FALSE), mCanSelect(TRUE), mDisplayColumnHeaders(FALSE), - mCollapseEmptyColumns(FALSE), - mIsPopup(FALSE), mMaxItemCount(INT_MAX), - //mItemCount(0), + mMaxContentWidth(0), mBackgroundVisible( TRUE ), mDrawStripes(TRUE), mBgWriteableColor( LLUI::sColorsGroup->getColor( "ScrollBgWriteableColor" ) ), @@ -443,12 +536,9 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, mOnSortChangedCallback( NULL ), mHighlightedItem(-1), mBorder(NULL), - mDefaultColumn("SIMPLE"), mSearchColumn(0), mNumDynamicWidthColumns(0), mTotalStaticColumnWidth(0), - mSortColumn(-1), - mSortAscending(TRUE), mSorted(TRUE), mDirty(FALSE), mOriginalSelection(-1), @@ -457,7 +547,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, mItemListRect.setOriginAndSize( mBorderThickness + LIST_BORDER_PAD, mBorderThickness + LIST_BORDER_PAD, - mRect.getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ) - SCROLLBAR_SIZE, + mRect.getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ), mRect.getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) ); updateLineHeight(); @@ -481,7 +571,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, mScrollbar->setFollowsTop(); mScrollbar->setFollowsBottom(); mScrollbar->setEnabled( TRUE ); - mScrollbar->setVisible( TRUE ); + // scrollbar is visible only when needed + mScrollbar->setVisible(FALSE); addChild(mScrollbar); // Border @@ -539,7 +630,8 @@ void LLScrollListCtrl::clearRows() mScrollLines = 0; mLastSelected = NULL; - updateMaxContentWidth(NULL); + calcMaxContentWidth(NULL); + updateLayout(); mDirty = FALSE; } @@ -620,38 +712,64 @@ std::vector LLScrollListCtrl::getAllData() const return ret; } +// returns first matching item +LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const +{ + LLString string_val = sd.asString(); + + item_list::const_iterator iter; + for(iter = mItemList.begin(); iter != mItemList.end(); iter++) + { + LLScrollListItem* item = *iter; + // assumes string representation is good enough for comparison + if (item->getValue().asString() == string_val) + { + return item; + } + } + return NULL; +} + void LLScrollListCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) { - S32 old_height = mRect.getHeight(); LLUICtrl::reshape( width, height, called_from_parent ); - S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0); + updateLayout(); +} +void LLScrollListCtrl::updateLayout() +{ + // reserve room for column headers, if needed + S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0); mItemListRect.setOriginAndSize( mBorderThickness + LIST_BORDER_PAD, mBorderThickness + LIST_BORDER_PAD, - mRect.getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ) - SCROLLBAR_SIZE, + mRect.getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ), mRect.getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) - heading_size ); + // how many lines of content in a single "page" mPageLines = mLineHeight? mItemListRect.getHeight() / mLineHeight : 0; - if(old_height < height && getScrollPos() == mScrollbar->getDocPosMax()) + BOOL scrollbar_visible = getItemCount() > mPageLines; + if (scrollbar_visible) { - setScrollPos(mScrollbar->getDocPosMax()); + // provide space on the right for scrollbar + mItemListRect.mRight = mRect.getWidth() - ( mBorderThickness + LIST_BORDER_PAD ) - SCROLLBAR_SIZE; } - mScrollbar->setVisible(mPageLines < getItemCount()); + + mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0)); mScrollbar->setPageSize( mPageLines ); - + mScrollbar->setDocSize( getItemCount() ); + mScrollbar->setVisible(scrollbar_visible); + updateColumns(); } // Attempt to size the control to show all items. // Do not make larger than width or height. -void LLScrollListCtrl::arrange(S32 max_width, S32 max_height) +void LLScrollListCtrl::fitContents(S32 max_width, S32 max_height) { - S32 height = mLineHeight * (getItemCount() + 1); - height = llmin( height, max_height ); - + S32 height = llmin( getRequiredRect().getHeight(), max_height ); S32 width = mRect.getWidth(); reshape( width, height ); @@ -660,14 +778,17 @@ void LLScrollListCtrl::arrange(S32 max_width, S32 max_height) LLRect LLScrollListCtrl::getRequiredRect() { - S32 height = mLineHeight * (getItemCount() + 1); + S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0); + S32 height = (mLineHeight * getItemCount()) + + (2 * ( mBorderThickness + LIST_BORDER_PAD )) + + heading_size; S32 width = mRect.getWidth(); return LLRect(0, height, width, 0); } -BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos ) +BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL requires_column ) { BOOL not_too_big = getItemCount() < mMaxItemCount; if (not_too_big) @@ -680,15 +801,22 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos ) break; case ADD_SORTED: - if (mSortColumn == -1) { - mSortColumn = 0; - mSortAscending = TRUE; - } - mItemList.push_back(item); - std::sort(mItemList.begin(), mItemList.end(), SortScrollListItem(mSortColumn, mSortAscending)); - break; - + // sort by column 0, in ascending order + std::vector single_sort_column; + single_sort_column.push_back(std::make_pair(0, TRUE)); + + mItemList.push_back(item); + std::stable_sort( + mItemList.begin(), + mItemList.end(), + SortScrollListItem(single_sort_column)); + + // ADD_SORTED just sorts by first column... + // this might not match user sort criteria, so flag list as being in unsorted state + setSorted(FALSE); + break; + } case ADD_BOTTOM: mItemList.push_back(item); setSorted(FALSE); @@ -701,34 +829,42 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos ) break; } - updateLineHeightInsert(item); - mPageLines = mLineHeight ? mItemListRect.getHeight() / mLineHeight : 0; - BOOL scrollbar_visible = mPageLines < getItemCount(); - - if (scrollbar_visible != mScrollbar->getVisible()) + // create new column on demand + if (mColumns.empty() && requires_column) { - mScrollbar->setVisible(mPageLines < getItemCount()); - updateColumns(); + LLSD new_column; + new_column["name"] = "default_column"; + new_column["label"] = ""; + new_column["dynamicwidth"] = TRUE; + addColumn(new_column); } - mScrollbar->setPageSize( mPageLines ); - - mScrollbar->setDocSize( getItemCount() ); - updateMaxContentWidth(item); + updateLineHeightInsert(item); + calcMaxContentWidth(item); + + updateLayout(); } return not_too_big; } -void LLScrollListCtrl::updateMaxContentWidth(LLScrollListItem* added_item) +void LLScrollListCtrl::calcMaxContentWidth(LLScrollListItem* added_item) { const S32 HEADING_TEXT_PADDING = 30; const S32 COLUMN_TEXT_PADDING = 20; - std::map::iterator column_itor; - for (column_itor = mColumns.begin(); column_itor != mColumns.end(); ++column_itor) + if (added_item == NULL) { - LLScrollListColumn* column = &column_itor->second; + mMaxContentWidth = 0; + } + + S32 item_content_width = 0; + + ordered_columns_t::iterator column_itor; + for (column_itor = mColumnsIndexed.begin(); column_itor != mColumnsIndexed.end(); ++column_itor) + { + LLScrollListColumn* column = *column_itor; + if (!column) continue; if (!added_item) { @@ -740,7 +876,7 @@ void LLScrollListCtrl::updateMaxContentWidth(LLScrollListItem* added_item) LLScrollListCell* cellp = (*iter)->getColumn(column->mIndex); if (!cellp) continue; - column->mMaxContentWidth = llmax(LLFontGL::sSansSerifSmall->getWidth(cellp->getText()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); + column->mMaxContentWidth = llmax(LLFontGL::sSansSerifSmall->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); } } else @@ -748,9 +884,13 @@ void LLScrollListCtrl::updateMaxContentWidth(LLScrollListItem* added_item) LLScrollListCell* cellp = added_item->getColumn(column->mIndex); if (!cellp) continue; - column->mMaxContentWidth = llmax(LLFontGL::sSansSerifSmall->getWidth(cellp->getText()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); + column->mMaxContentWidth = llmax(LLFontGL::sSansSerifSmall->getWidth(cellp->getValue().asString()) + mColumnPadding + COLUMN_TEXT_PADDING, column->mMaxContentWidth); } + + item_content_width += column->mMaxContentWidth; } + + mMaxContentWidth = llmax(mMaxContentWidth, item_content_width); } const S32 SCROLL_LIST_ROW_PAD = 2; @@ -789,7 +929,6 @@ void LLScrollListCtrl::updateColumns() mColumnsIndexed.resize(mColumns.size()); std::map::iterator column_itor; - bool first_dynamic = true; for (column_itor = mColumns.begin(); column_itor != mColumns.end(); ++column_itor) { LLScrollListColumn *column = &column_itor->second; @@ -801,11 +940,6 @@ void LLScrollListCtrl::updateColumns() else if (column->mDynamicWidth) { new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth) / mNumDynamicWidthColumns; - if(first_dynamic) - { - first_dynamic = false; - new_width += (mScrollbar->getVisible() ? 0 : SCROLLBAR_SIZE); - } } if (new_width != column->mWidth) @@ -854,48 +988,38 @@ void LLScrollListCtrl::updateColumns() } right = llmax(left, llmin(mItemListRect.getWidth(), right)); S32 header_width = right - left; - + last_header->reshape(header_width, mHeadingHeight); - last_header->translate(left - last_header->getRect().mLeft, top - last_header->getRect().mBottom); + last_header->translate( + left - last_header->getRect().mLeft, + top - last_header->getRect().mBottom); last_header->setVisible(mDisplayColumnHeaders && header_width > 0); left = right; } } // expand last column header we encountered to full list width - if (last_header) { - S32 header_strip_width = mItemListRect.getWidth() + (mScrollbar->getVisible() ? 0 : SCROLLBAR_SIZE); - S32 new_width = llmax(0, mItemListRect.mLeft + header_strip_width - last_header->getRect().mLeft); + S32 new_width = llmax(0, mItemListRect.mRight - last_header->getRect().mLeft); last_header->reshape(new_width, last_header->getRect().getHeight()); last_header->setVisible(mDisplayColumnHeaders && new_width > 0); } - } void LLScrollListCtrl::setDisplayHeading(BOOL display) { mDisplayColumnHeaders = display; - updateColumns(); - - setHeadingHeight(mHeadingHeight); + updateLayout(); } void LLScrollListCtrl::setHeadingHeight(S32 heading_height) { mHeadingHeight = heading_height; - reshape(mRect.getWidth(), mRect.getHeight()); - - // Resize - mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0)); -} + updateLayout(); -void LLScrollListCtrl::setCollapseEmptyColumns(BOOL collapse) -{ - mCollapseEmptyColumns = collapse; } BOOL LLScrollListCtrl::selectFirstItem() @@ -934,6 +1058,8 @@ BOOL LLScrollListCtrl::selectFirstItem() BOOL LLScrollListCtrl::selectNthItem( S32 target_index ) { + if (mItemList.empty()) return FALSE; + // Deselects all other items BOOL success = FALSE; S32 index = 0; @@ -1012,7 +1138,32 @@ void LLScrollListCtrl::deleteSingleItem(S32 target_index) } delete itemp; mItemList.erase(mItemList.begin() + target_index); - updateMaxContentWidth(NULL); + calcMaxContentWidth(NULL); +} + +//FIXME: refactor item deletion +void LLScrollListCtrl::deleteItems(const LLSD& sd) +{ + item_list::iterator iter; + for (iter = mItemList.begin(); iter < mItemList.end(); ) + { + LLScrollListItem* itemp = *iter; + if (itemp->getValue().asString() == sd.asString()) + { + if (itemp == mLastSelected) + { + mLastSelected = NULL; + } + delete itemp; + mItemList.erase(iter++); + } + else + { + iter++; + } + } + + calcMaxContentWidth(NULL); } void LLScrollListCtrl::deleteSelectedItems() @@ -1032,7 +1183,7 @@ void LLScrollListCtrl::deleteSelectedItems() } } mLastSelected = NULL; - updateMaxContentWidth(NULL); + calcMaxContentWidth(NULL); } void LLScrollListCtrl::highlightNthItem(S32 target_index) @@ -1108,7 +1259,8 @@ void LLScrollListCtrl::selectPrevItem( BOOL extend_selection) if (!getFirstSelected()) { - selectFirstItem(); + // select last item + selectNthItem(getItemCount() - 1); } else { @@ -1130,7 +1282,8 @@ void LLScrollListCtrl::selectPrevItem( BOOL extend_selection) break; } - prev_item = cur_item; + // don't allow navigation to disabled elements + prev_item = cur_item->getEnabled() ? cur_item : prev_item; } } @@ -1145,32 +1298,34 @@ void LLScrollListCtrl::selectPrevItem( BOOL extend_selection) void LLScrollListCtrl::selectNextItem( BOOL extend_selection) { + LLScrollListItem* next_item = NULL; + if (!getFirstSelected()) { selectFirstItem(); } else { - item_list::iterator iter; - for (iter = mItemList.begin(); iter != mItemList.end(); iter++) + item_list::reverse_iterator iter; + for (iter = mItemList.rbegin(); iter != mItemList.rend(); iter++) { - LLScrollListItem* item = *iter; - if (item->getSelected()) + LLScrollListItem* cur_item = *iter; + + if (cur_item->getSelected()) { - if (++iter != mItemList.end()) + if (next_item) { - LLScrollListItem *next_item = *iter; - if (next_item) - { - selectItem(next_item, !extend_selection); - } - else - { - reportInvalidInput(); - } + selectItem(next_item, !extend_selection); + } + else + { + reportInvalidInput(); } break; } + + // don't allow navigation to disabled items + next_item = cur_item->getEnabled() ? cur_item : next_item; } } @@ -1200,27 +1355,31 @@ void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change) } /////////////////////////////////////////////////////////////////////////////////////////////////// -// "Simple" interface: use this when you're creating a list that contains only unique strings, only -// one of which can be selected at a time. +// Use this to add comment text such as "Searching", which ignores column settings of list -LLScrollListItem* LLScrollListCtrl::addSimpleItem(const LLString& item_text, EAddPosition pos, BOOL enabled) +LLScrollListItem* LLScrollListCtrl::addCommentText(const LLString& comment_text, EAddPosition pos) { LLScrollListItem* item = NULL; if (getItemCount() < mMaxItemCount) { // simple items have their LLSD data set to their label - item = new LLScrollListItem( LLSD(item_text) ); - item->setEnabled(enabled); - item->addColumn( item_text, gResMgr->getRes( LLFONT_SANSSERIF_SMALL ) ); - addItem( item, pos ); + // always draw comment text with "enabled" color + item = new LLScrollListItemComment( comment_text, mFgUnselectedColor ); + addItem( item, pos, FALSE ); } return item; } +LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos) +{ + LLScrollListItem* item = new LLScrollListItemSeparator(); + addItem(item, pos, FALSE); + return item; +} // Selects first enabled item of the given name. // Returns false if item not found. -BOOL LLScrollListCtrl::selectSimpleItem(const LLString& label, BOOL case_sensitive) +BOOL LLScrollListCtrl::selectItemByLabel(const LLString& label, BOOL case_sensitive) { //RN: assume no empty items if (label.empty()) @@ -1242,7 +1401,7 @@ BOOL LLScrollListCtrl::selectSimpleItem(const LLString& label, BOOL case_sensiti { LLScrollListItem* item = *iter; // Only select enabled items with matching names - LLString item_text = item->getColumn(0)->getText(); + LLString item_text = item->getColumn(0)->getValue().asString(); if (!case_sensitive) { LLString::toLower(item_text); @@ -1265,14 +1424,14 @@ BOOL LLScrollListCtrl::selectSimpleItem(const LLString& label, BOOL case_sensiti } -BOOL LLScrollListCtrl::selectSimpleItemByPrefix(const LLString& target, BOOL case_sensitive) +BOOL LLScrollListCtrl::selectItemByPrefix(const LLString& target, BOOL case_sensitive) { - return selectSimpleItemByPrefix(utf8str_to_wstring(target), case_sensitive); + return selectItemByPrefix(utf8str_to_wstring(target), case_sensitive); } // Selects first enabled item that has a name where the name's first part matched the target string. // Returns false if item not found. -BOOL LLScrollListCtrl::selectSimpleItemByPrefix(const LLWString& target, BOOL case_sensitive) +BOOL LLScrollListCtrl::selectItemByPrefix(const LLWString& target, BOOL case_sensitive) { BOOL found = FALSE; @@ -1288,7 +1447,7 @@ BOOL LLScrollListCtrl::selectSimpleItemByPrefix(const LLWString& target, BOOL ca LLScrollListItem* item = *iter; // Only select enabled items with matching names LLScrollListCell* cellp = item->getColumn(mSearchColumn); - BOOL select = cellp ? item->getEnabled() && ('\0' == cellp->getText()[0]) : FALSE; + BOOL select = cellp ? item->getEnabled() && ('\0' == cellp->getValue().asString()[0]) : FALSE; if (select) { selectItem(item); @@ -1315,7 +1474,7 @@ BOOL LLScrollListCtrl::selectSimpleItemByPrefix(const LLWString& target, BOOL ca { continue; } - LLWString item_label = utf8str_to_wstring(cellp->getText()); + LLWString item_label = utf8str_to_wstring(cellp->getValue().asString()); if (!case_sensitive) { LLWString::toLower(item_label); @@ -1346,14 +1505,14 @@ BOOL LLScrollListCtrl::selectSimpleItemByPrefix(const LLWString& target, BOOL ca return found; } -const LLString& LLScrollListCtrl::getSimpleSelectedItem(S32 column) const +const LLString LLScrollListCtrl::getSelectedItemLabel(S32 column) const { LLScrollListItem* item; item = getFirstSelected(); if (item) { - return item->getColumn(column)->getText(); + return item->getColumn(column)->getValue().asString(); } return LLString::null; @@ -1375,20 +1534,6 @@ LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const LLString& item_text, return item; } -LLScrollListItem* LLScrollListCtrl::addSimpleItem(const LLString& item_text, LLSD sd, EAddPosition pos, BOOL enabled, S32 column_width) -{ - LLScrollListItem* item = NULL; - if (getItemCount() < mMaxItemCount) - { - item = new LLScrollListItem( sd ); - item->setEnabled(enabled); - item->addColumn(item_text, gResMgr->getRes(LLFONT_SANSSERIF_SMALL), column_width); - addItem( item, pos ); - } - return item; -} - - // Select the line or lines that match this UUID BOOL LLScrollListCtrl::selectByID( const LLUUID& id ) { @@ -1454,7 +1599,7 @@ LLUUID LLScrollListCtrl::getStringUUIDSelectedItem() return LLUUID::null; } -LLSD LLScrollListCtrl::getSimpleSelectedValue() +LLSD LLScrollListCtrl::getSelectedValue() { LLScrollListItem* item = getFirstSelected(); @@ -1481,28 +1626,28 @@ void LLScrollListCtrl::drawItems() LLGLSUIDefault gls_ui; { - LLRect clip_rect = mItemListRect; - if(!mScrollbar->getVisible()) clip_rect.mRight += SCROLLBAR_SIZE; - LLLocalClipRect clip(clip_rect); + LLLocalClipRect clip(mItemListRect); - S32 cur_x = x; S32 cur_y = y; mDrewSelected = FALSE; S32 line = 0; - LLColor4 color; S32 max_columns = 0; + LLColor4 highlight_color = LLColor4::white; + F32 type_ahead_timeout = LLUI::sConfigGroup->getF32("TypeAheadTimeout"); + highlight_color.mV[VALPHA] = clamp_rescale(mSearchTimer.getElapsedTimeF32(), type_ahead_timeout * 0.7f, type_ahead_timeout, 0.4f, 0.f); + item_list::iterator iter; for (iter = mItemList.begin(); iter != mItemList.end(); iter++) { LLScrollListItem* item = *iter; item_rect.setOriginAndSize( - cur_x, + x, cur_y, - mScrollbar->getVisible() ? mItemListRect.getWidth() : mItemListRect.getWidth() + SCROLLBAR_SIZE, + mItemListRect.getWidth(), mLineHeight ); //llinfos << item_rect.getWidth() << llendl; @@ -1514,85 +1659,37 @@ void LLScrollListCtrl::drawItems() max_columns = llmax(max_columns, item->getNumColumns()); - LLRect bg_rect = item_rect; - // pad background rectangle to separate it from contents - bg_rect.stretch(LIST_BORDER_PAD, 0); + LLColor4 fg_color; + LLColor4 bg_color(LLColor4::transparent); if( mScrollLines <= line && line < mScrollLines + num_page_lines ) { + fg_color = (item->getEnabled() ? mFgUnselectedColor : mFgDisabledColor); if( item->getSelected() && mCanSelect) { // Draw background of selected item - LLGLSNoTexture no_texture; - glColor4fv(mBgSelectedColor.mV); - gl_rect_2d( bg_rect ); - - color = mFgSelectedColor; + bg_color = mBgSelectedColor; + fg_color = (item->getEnabled() ? mFgSelectedColor : mFgDisabledColor); } else if (mHighlightedItem == line && mCanSelect) { - LLGLSNoTexture no_texture; - glColor4fv(mHighlightedColor.mV); - gl_rect_2d( bg_rect ); - color = (item->getEnabled() ? mFgUnselectedColor : mFgDisabledColor); + bg_color = mHighlightedColor; } else { - color = (item->getEnabled() ? mFgUnselectedColor : mFgDisabledColor); - if (mDrawStripes && (line%2 == 0) && (max_columns > 1)) + if (mDrawStripes && (line % 2 == 0) && (max_columns > 1)) { - LLGLSNoTexture no_texture; - glColor4fv(mBgStripeColor.mV); - gl_rect_2d( bg_rect ); + bg_color = mBgStripeColor; } } - S32 line_x = cur_x; + if (!item->getEnabled()) { - S32 num_cols = item->getNumColumns(); - S32 cur_col = 0; - S32 dynamic_width = 0; - S32 dynamic_remainder = 0; - bool first_dynamic = true; - if(mNumDynamicWidthColumns > 0) - { - dynamic_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth) / mNumDynamicWidthColumns; - dynamic_remainder = (mItemListRect.getWidth() - mTotalStaticColumnWidth) % mNumDynamicWidthColumns; - } + bg_color = mBgReadOnlyColor; + } - for (LLScrollListCell* cell = item->getColumn(0); cur_col < num_cols; cell = item->getColumn(++cur_col)) - { - S32 cell_width = cell->getWidth(); - - if(mColumnsIndexed.size() > (U32)cur_col && mColumnsIndexed[cur_col] && mColumnsIndexed[cur_col]->mDynamicWidth) - { - cell_width = dynamic_width + (--dynamic_remainder ? 1 : 0); - if(first_dynamic) - { - cell_width += mScrollbar->getVisible() ? 0 : SCROLLBAR_SIZE; - first_dynamic = false; - } - cell->setWidth(cell_width); - } - // Two ways a cell could be hidden - if (cell_width < 0 - || !cell->getVisible()) continue; - - LLUI::pushMatrix(); - LLUI::translate((F32) cur_x, (F32) cur_y, 0.0f); - S32 space_left = mItemListRect.mRight - cur_x; - LLColor4 highlight_color = LLColor4::white; - F32 type_ahead_timeout = LLUI::sConfigGroup->getF32("TypeAheadTimeout"); - - highlight_color.mV[VALPHA] = clamp_rescale(mSearchTimer.getElapsedTimeF32(), type_ahead_timeout * 0.7f, type_ahead_timeout, 0.4f, 0.f); - cell->drawToWidth( space_left, color, highlight_color ); - LLUI::popMatrix(); - - cur_x += cell_width + mColumnPadding; + item->draw(item_rect, fg_color, bg_color, highlight_color, mColumnPadding); - } - } - cur_x = line_x; cur_y -= mLineHeight; } line++; @@ -1605,6 +1702,12 @@ void LLScrollListCtrl::draw() { if( getVisible() ) { + // if user specifies sort, make sure it is maintained + if (needsSorting() && !isSorted()) + { + sortItems(); + } + if (mNeedsScroll) { scrollToShowSelected(); @@ -1645,6 +1748,54 @@ BOOL LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) return handled; } +BOOL LLScrollListCtrl::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen) +{ + S32 column_index = getColumnIndexFromOffset(x); + LLScrollListColumn* columnp = getColumn(column_index); + + if (columnp == NULL) return FALSE; + + BOOL handled = FALSE; + // show tooltip for full name of hovered item if it has been truncated + LLScrollListItem* hit_item = hitItem(x, y); + if (hit_item) + { + LLScrollListCell* hit_cell = hit_item->getColumn(column_index); + if (!hit_cell) return FALSE; + S32 cell_required_width = hit_cell->getContentWidth(); + if (hit_cell + && hit_cell->isText() + && cell_required_width > columnp->mWidth) + { + + S32 rect_left = getColumnOffsetFromIndex(column_index) + mItemListRect.mLeft; + S32 rect_bottom = getRowOffsetFromIndex(getItemIndex(hit_item)); + LLRect cell_rect; + cell_rect.setOriginAndSize(rect_left, rect_bottom, rect_left + columnp->mWidth, mLineHeight); + // Convert rect local to screen coordinates + localPointToScreen( + cell_rect.mLeft, cell_rect.mBottom, + &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); + localPointToScreen( + cell_rect.mRight, cell_rect.mTop, + &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) ); + + msg = hit_cell->getValue().asString(); + handled = TRUE; + } + } + + // otherwise, look for a tooltip associated with this column + LLColumnHeader* headerp = columnp->mHeader; + if (headerp && !handled) + { + headerp->handleToolTip(x, y, msg, sticky_rect_screen); + handled = !msg.empty(); + } + + return handled; +} + BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) { if (!mCanSelect) return FALSE; @@ -1652,6 +1803,7 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) BOOL selection_changed = FALSE; LLScrollListItem* hit_item = hitItem(x, y); + if( hit_item ) { if( mAllowMultipleSelection ) @@ -1686,6 +1838,11 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) { selectItem(item, FALSE); selecting = !selecting; + if (hit_item == lastSelected) + { + // stop selecting now, since we just clicked on our last selected item + selecting = FALSE; + } } if (selecting) { @@ -1726,9 +1883,6 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) selectItem(hit_item); } - hit_item->handleClick(x - mBorderThickness - LIST_BORDER_PAD, - 1, mask); - selection_changed = mSelectionChanged; if (mCommitOnSelectionChange) { @@ -1750,19 +1904,17 @@ BOOL LLScrollListCtrl::selectItemAt(S32 x, S32 y, MASK mask) BOOL LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask) { - BOOL handled = LLView::childrenHandleMouseDown(x, y, mask) != NULL; + BOOL handled = childrenHandleMouseDown(x, y, mask) != NULL; if( !handled ) { // set keyboard focus first, in case click action wants to move focus elsewhere setFocus(TRUE); - // clear selection changed flag so because user is starting a selection operation + // clear selection changed flag because user is starting a selection operation mSelectionChanged = FALSE; - gFocusMgr.setMouseCapture(this); - selectItemAt(x, y, mask); - mNeedsScroll = TRUE; + handleClick(x, y, mask); } return TRUE; @@ -1798,19 +1950,79 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) //BOOL handled = FALSE; if(getVisible()) { - // Offer the click to the children, even if we aren't enabled - // so the scroll bars will work. - if (NULL == LLView::childrenHandleDoubleClick(x, y, mask)) + BOOL handled = handleClick(x, y, mask); + + if (!handled) { - if( mCanSelect && mOnDoubleClickCallback ) + // Offer the click to the children, even if we aren't enabled + // so the scroll bars will work. + if (NULL == LLView::childrenHandleDoubleClick(x, y, mask)) { - mOnDoubleClickCallback( mCallbackUserData ); + if( mCanSelect && mOnDoubleClickCallback ) + { + mOnDoubleClickCallback( mCallbackUserData ); + } } } } return TRUE; } +BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask) +{ + // which row was clicked on? + LLScrollListItem* hit_item = hitItem(x, y); + if (!hit_item) return FALSE; + + // get appropriate cell from that row + S32 column_index = getColumnIndexFromOffset(x); + LLScrollListCell* hit_cell = hit_item->getColumn(column_index); + if (!hit_cell) return FALSE; + + // if cell handled click directly (i.e. clicked on an embedded checkbox) + if (hit_cell->handleClick()) + { + // if item not currently selected, select it + if (!hit_item->getSelected()) + { + selectItemAt(x, y, mask); + gFocusMgr.setMouseCapture(this); + mNeedsScroll = TRUE; + } + // otherwise we already have this item selected + // so propagate state of cell to rest of selected column + else + { + // propagate value of this cell to other selected items + // and commit the respective widgets + LLSD item_value = hit_cell->getValue(); + for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++) + { + LLScrollListItem* item = *iter; + if (item->getSelected()) + { + LLScrollListCell* cellp = item->getColumn(column_index); + cellp->setValue(item_value); + cellp->onCommit(); + } + } + //FIXME: find a better way to signal cell changes + onCommit(); + } + // eat click (e.g. do not trigger double click callback) + return TRUE; + } + else + { + // treat this as a normal single item selection + selectItemAt(x, y, mask); + gFocusMgr.setMouseCapture(this); + mNeedsScroll = TRUE; + // do not eat click (allow double click callback) + return FALSE; + } +} + LLScrollListItem* LLScrollListCtrl::hitItem( S32 x, S32 y ) { // Excludes disabled items. @@ -1847,6 +2059,59 @@ LLScrollListItem* LLScrollListCtrl::hitItem( S32 x, S32 y ) return hit_item; } +S32 LLScrollListCtrl::getColumnIndexFromOffset(S32 x) +{ + // which column did we hit? + S32 left = 0; + S32 right = 0; + S32 width = 0; + S32 column_index = 0; + + ordered_columns_t::const_iterator iter = mColumnsIndexed.begin(); + ordered_columns_t::const_iterator end = mColumnsIndexed.end(); + for ( ; iter != end; ++iter) + { + width = (*iter)->mWidth + mColumnPadding; + right += width; + if (left <= x && x < right ) + { + break; + } + + // set left for next column as right of current column + left = right; + column_index++; + } + + return llclamp(column_index, 0, getNumColumns() - 1); +} + + +S32 LLScrollListCtrl::getColumnOffsetFromIndex(S32 index) +{ + S32 column_offset = 0; + ordered_columns_t::const_iterator iter = mColumnsIndexed.begin(); + ordered_columns_t::const_iterator end = mColumnsIndexed.end(); + for ( ; iter != end; ++iter) + { + if (index-- <= 0) + { + return column_offset; + } + column_offset += (*iter)->mWidth + mColumnPadding; + } + + // when running off the end, return the rightmost pixel + return mItemListRect.mRight; +} + +S32 LLScrollListCtrl::getRowOffsetFromIndex(S32 index) +{ + S32 row_bottom = ((mItemListRect.mTop - (index - mScrollLines)) * mLineHeight) + - mLineHeight; + return row_bottom; +} + BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) { @@ -1860,7 +2125,8 @@ BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) mNeedsScroll = TRUE; } } - else if (mCanSelect) + else + if (mCanSelect) { LLScrollListItem* item = hitItem(x, y); if (item) @@ -1875,13 +2141,6 @@ BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) handled = LLUICtrl::handleHover( x, y, mask ); - //if( !handled ) - //{ - // // Opaque - // getWindow()->setCursor(UI_CURSOR_ARROW); - // lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl; - // handled = TRUE; - //} return handled; } @@ -1998,7 +2257,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask, BOOL called_from_parent } } } - else if (selectSimpleItemByPrefix(wstring_to_utf8str(mSearchString), FALSE)) + else if (selectItemByPrefix(wstring_to_utf8str(mSearchString), FALSE)) { mNeedsScroll = TRUE; // update search string only on successful match @@ -2037,7 +2296,7 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_ // type ahead search is case insensitive uni_char = LLStringOps::toLower((llwchar)uni_char); - if (selectSimpleItemByPrefix(wstring_to_utf8str(mSearchString + (llwchar)uni_char), FALSE)) + if (selectItemByPrefix(wstring_to_utf8str(mSearchString + (llwchar)uni_char), FALSE)) { // update search string only on successful match mNeedsScroll = TRUE; @@ -2082,7 +2341,7 @@ BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_ if (cellp) { // Only select enabled items with matching first characters - LLWString item_label = utf8str_to_wstring(cellp->getText()); + LLWString item_label = utf8str_to_wstring(cellp->getValue().asString()); if (item->getEnabled() && LLStringOps::toLower(item_label[0]) == uni_char) { selectItem(item); @@ -2176,7 +2435,7 @@ void LLScrollListCtrl::deselectItem(LLScrollListItem* itemp) LLScrollListCell* cellp = itemp->getColumn(mSearchColumn); if (cellp) { - cellp->highlightText(0, 0); + cellp->highlightText(0, 0); } mSelectionChanged = TRUE; } @@ -2202,38 +2461,52 @@ BOOL LLScrollListCtrl::isSorted() return mSorted; } -// Called by scrollbar -//static -void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar, void* userdata ) +struct SameSortColumn { - LLScrollListCtrl* self = (LLScrollListCtrl*) userdata; - self->mScrollLines = new_pos; -} + SameSortColumn(S32 column) : mColumn(column) {} + S32 mColumn; + bool operator()(std::pair sort_column) { return sort_column.first == mColumn; } +}; -// First column is column 0 -void LLScrollListCtrl::sortByColumn(U32 column, BOOL ascending) +BOOL LLScrollListCtrl::setSort(S32 column, BOOL ascending) { - if (!mSorted || mSortColumn != column) + sort_column_t new_sort_column(column, ascending); + + if (mSortColumns.empty()) { - mSortColumn = column; - std::sort(mItemList.begin(), mItemList.end(), SortScrollListItem(mSortColumn, mSortAscending)); - setSorted(TRUE); + mSortColumns.push_back(new_sort_column); + return TRUE; } + else + { + // grab current sort column + sort_column_t cur_sort_column = mSortColumns.back(); + + // remove any existing sort criterion referencing this column + // and add the new one + mSortColumns.erase(remove_if(mSortColumns.begin(), mSortColumns.end(), SameSortColumn(column)), mSortColumns.end()); + mSortColumns.push_back(new_sort_column); - // just reverse the list if changing sort order - if(mSortAscending != ascending) - { - std::reverse(mItemList.begin(), mItemList.end()); - mSortAscending = ascending; + // did the sort criteria change? + return (cur_sort_column != new_sort_column); } } +// Called by scrollbar +//static +void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar, void* userdata ) +{ + LLScrollListCtrl* self = (LLScrollListCtrl*) userdata; + self->mScrollLines = new_pos; +} + + void LLScrollListCtrl::sortByColumn(LLString name, BOOL ascending) { if (name.empty()) { - sortByColumn(mSortColumn, mSortAscending); + sortItems(); return; } @@ -2244,6 +2517,26 @@ void LLScrollListCtrl::sortByColumn(LLString name, BOOL ascending) } } +// First column is column 0 +void LLScrollListCtrl::sortByColumn(U32 column, BOOL ascending) +{ + if (setSort(column, ascending)) + { + sortItems(); + } +} + +void LLScrollListCtrl::sortItems() +{ + // do stable sort to preserve any previous sorts + std::stable_sort( + mItemList.begin(), + mItemList.end(), + SortScrollListItem(mSortColumns)); + + setSorted(TRUE); +} + S32 LLScrollListCtrl::getScrollPos() { return mScrollbar->getDocPos(); @@ -2431,9 +2724,6 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac BOOL draw_heading = FALSE; node->getAttributeBOOL("draw_heading", draw_heading); - BOOL collapse_empty_columns = FALSE; - node->getAttributeBOOL("collapse_empty_columns", collapse_empty_columns); - S32 search_column = 0; node->getAttributeS32("search_column", search_column); @@ -2454,7 +2744,6 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac node->getAttributeS32("heading_height", heading_height); scroll_list->setHeadingHeight(heading_height); } - scroll_list->setCollapseEmptyColumns(collapse_empty_columns); scroll_list->setScrollListParameters(node); @@ -2465,7 +2754,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac LLSD columns; S32 index = 0; LLXMLNodePtr child; - S32 total_static = 0, num_dynamic = 0; + S32 total_static = 0; for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { if (child->hasName("column")) @@ -2491,8 +2780,10 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac S32 columnwidth = -1; child->getAttributeS32("width", columnwidth); - if(!columndynamicwidth) total_static += columnwidth; - else ++num_dynamic; + LLString tooltip; + child->getAttributeString("tool_tip", tooltip); + + if(!columndynamicwidth) total_static += llmax(0, columnwidth); F32 columnrelwidth = 0.f; child->getAttributeF32("relwidth", columnrelwidth); @@ -2509,10 +2800,11 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac columns[index]["relwidth"] = columnrelwidth; columns[index]["dynamicwidth"] = columndynamicwidth; columns[index]["halign"] = (S32)h_align; + columns[index]["tool_tip"] = tooltip; + index++; } } - scroll_list->setNumDynamicColumns(num_dynamic); scroll_list->setTotalStaticColumnWidth(total_static); scroll_list->setColumnHeadings(columns); @@ -2566,7 +2858,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac while(token_iter != tokens.end()) { const char* line = token_iter->c_str(); - scroll_list->addSimpleItem(line); + scroll_list->addSimpleElement(line); ++token_iter; } } @@ -2663,10 +2955,6 @@ BOOL LLScrollListCtrl::canDeselect() void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos) { LLString name = column["name"].asString(); - if (mColumns.empty()) - { - mDefaultColumn = 0; - } // if no column name provided, just use ordinal as name if (name.empty()) { @@ -2691,6 +2979,7 @@ void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos) } else if(new_column->mDynamicWidth) { + mNumDynamicWidthColumns++; new_column->mWidth = (mItemListRect.getWidth() - mTotalStaticColumnWidth) / mNumDynamicWidthColumns; } S32 top = mItemListRect.mTop; @@ -2724,19 +3013,19 @@ void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos) new_column->mHeader->setLabel(new_column->mLabel); //new_column->mHeader->setLabel(new_column->mLabel); } + + new_column->mHeader->setToolTip(column["tool_tip"].asString()); + //RN: although it might be useful to change sort order with the keyboard, // mixing tab stops on child items along with the parent item is not supported yet new_column->mHeader->setTabStop(FALSE); addChild(new_column->mHeader); new_column->mHeader->setVisible(mDisplayColumnHeaders); - - // Move scroll to front - removeChild(mScrollbar); - addChild(mScrollbar); - + sendChildToFront(mScrollbar); } } + updateColumns(); } @@ -2753,18 +3042,18 @@ void LLScrollListCtrl::onClickColumn(void *userdata) LLScrollListColumn* column = parent->mColumnsIndexed[info->mIndex]; bool ascending = column->mSortAscending; - if (column->mSortingColumn != column->mName) + if (column->mSortingColumn != column->mName + && parent->mColumns.find(column->mSortingColumn) != parent->mColumns.end()) { - if (parent->mColumns.find(column->mSortingColumn) != parent->mColumns.end()) - { - LLScrollListColumn& info_redir = parent->mColumns[column->mSortingColumn]; - column_index = info_redir.mIndex; - } + LLScrollListColumn& info_redir = parent->mColumns[column->mSortingColumn]; + column_index = info_redir.mIndex; } - if (column_index == parent->mSortColumn) + // if this column is the primary sort key, reverse the direction + sort_column_t cur_sort_column; + if (!parent->mSortColumns.empty() && parent->mSortColumns.back().first == column_index) { - ascending = !parent->mSortAscending; + ascending = !parent->mSortColumns.back().second; } parent->sortByColumn(column_index, ascending); @@ -2777,12 +3066,17 @@ void LLScrollListCtrl::onClickColumn(void *userdata) std::string LLScrollListCtrl::getSortColumnName() { - LLScrollListColumn* column = mSortColumn >= 0 ? mColumnsIndexed[mSortColumn] : NULL; + LLScrollListColumn* column = mSortColumns.empty() ? NULL : mColumnsIndexed[mSortColumns.back().first]; if (column) return column->mName; else return ""; } +BOOL LLScrollListCtrl::needsSorting() +{ + return !mSortColumns.empty(); +} + void LLScrollListCtrl::clearColumns() { std::map::iterator itor; @@ -2796,6 +3090,7 @@ void LLScrollListCtrl::clearColumns() } } mColumns.clear(); + mSortColumns.clear(); } void LLScrollListCtrl::setColumnLabel(const LLString& column, const LLString& label) @@ -2849,12 +3144,12 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p S32 col_index = 0 ; for (itor = columns.beginArray(); itor != columns.endArray(); ++itor) { - LLString column = (*itor)["column"].asString(); - - if (mColumns.size() == 0) + if (itor->isUndefined()) { - mDefaultColumn = 0; + // skip unused columns in item passed in + continue; } + LLString column = (*itor)["column"].asString(); LLScrollListColumn* columnp = NULL; @@ -2879,9 +3174,18 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p LLSD new_column; new_column["name"] = column; new_column["label"] = column; - new_column["width"] = (*itor)["width"]; + // if width supplied for column, use it, otherwise + // use adaptive width + if (itor->has("width")) + { + new_column["width"] = (*itor)["width"]; + } + else + { + new_column["dynamicwidth"] = true; + } addColumn(new_column); - columnp = &mColumns.find(column)->second; + columnp = &mColumns[column]; new_item->setNumColumns(mColumns.size()); } @@ -2895,6 +3199,7 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p LLString type = (*itor)["type"].asString(); BOOL has_color = (*itor).has("color"); LLColor4 color = ((*itor)["color"]); + BOOL enabled = !(*itor).has("enabled") || (*itor)["enabled"].asBoolean() == true; const LLFontGL *font = gResMgr->getRes(fontname); if (!font) @@ -2906,8 +3211,7 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p if (type == "icon") { LLUUID image_id = value.asUUID(); - LLImageGL* icon = LLUI::sImageProvider->getUIImageByID(image_id); - LLScrollListIcon* cell = new LLScrollListIcon(icon, width, image_id); + LLScrollListIcon* cell = new LLScrollListIcon(value.asUUID(), width); if (has_color) { cell->setColor(color); @@ -2916,8 +3220,10 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p } else if (type == "checkbox") { - LLCheckBoxCtrl* ctrl = new LLCheckBoxCtrl(value.asString(), - LLRect(0, 0, width, width), "label"); + LLCheckBoxCtrl* ctrl = new LLCheckBoxCtrl("check", + LLRect(0, width, width, 0), " "); + ctrl->setEnabled(enabled); + ctrl->setValue(value); LLScrollListCheck* cell = new LLScrollListCheck(ctrl,width); if (has_color) { @@ -3070,18 +3376,12 @@ void LLScrollListCtrl::onFocusReceived() { // forget latent selection changes when getting focus mSelectionChanged = FALSE; + LLUICtrl::onFocusReceived(); } //virtual void LLScrollListCtrl::onFocusLost() { - if (mIsPopup) - { - if (getParent()) - { - getParent()->onFocusLost(); - } - } if (hasMouseCapture()) { gFocusMgr.setMouseCapture(NULL); @@ -3133,11 +3433,11 @@ void LLColumnHeader::draw() { if( getVisible() ) { - mDrawArrow = !mColumn->mLabel.empty() && mColumn->mParentCtrl->isSorted() && mColumn->mParentCtrl->getSortColumnName() == mColumn->mSortingColumn; + BOOL draw_arrow = !mColumn->mLabel.empty() && mColumn->mParentCtrl->isSorted() && mColumn->mParentCtrl->getSortColumnName() == mColumn->mSortingColumn; BOOL is_ascending = mColumn->mParentCtrl->getSortAscending(); - mArrowImage = is_ascending ? LLUI::sImageProvider->getUIImageByID(LLUUID(LLUI::sAssetsGroup->getString("up_arrow.tga"))) - : LLUI::sImageProvider->getUIImageByID(LLUUID(LLUI::sAssetsGroup->getString("down_arrow.tga"))); + mButton->setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent); + mArrowImage = mButton->getImageOverlay()->getImage(); //BOOL clip = mRect.mRight > mColumn->mParentCtrl->getItemListRect().getWidth(); //LLGLEnable scissor_test(clip ? GL_SCISSOR_TEST : GL_FALSE); @@ -3237,11 +3537,11 @@ void LLColumnHeader::showList() { if (mColumn->mParentCtrl->getSortAscending()) { - low_item_text = cell->getText(); + low_item_text = cell->getValue().asString(); } else { - high_item_text = cell->getText(); + high_item_text = cell->getValue().asString(); } } } @@ -3254,11 +3554,11 @@ void LLColumnHeader::showList() { if (mColumn->mParentCtrl->getSortAscending()) { - high_item_text = cell->getText(); + high_item_text = cell->getValue().asString(); } else { - low_item_text = cell->getText(); + low_item_text = cell->getValue().asString(); } } } diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index c548727..ada4f9b 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -56,20 +56,26 @@ class LLResizeBar; class LLScrollListCell { public: + LLScrollListCell(S32 width = 0) : mWidth(width) {}; virtual ~LLScrollListCell() {}; - virtual void drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const = 0; // truncate to given width, if possible - virtual S32 getWidth() const = 0; + virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const = 0; // truncate to given width, if possible + virtual S32 getWidth() const {return mWidth;} + virtual S32 getContentWidth() const { return 0; } virtual S32 getHeight() const = 0; - virtual const LLString& getText() const { return LLString::null; } - virtual const LLString& getTextLower() const { return LLString::null; } + virtual const LLSD getValue() const { return LLString::null; } + virtual void setValue(LLSD value) { } virtual BOOL getVisible() const { return TRUE; } - virtual void setWidth(S32 width) = 0; + virtual void setWidth(S32 width) { mWidth = width; } virtual void highlightText(S32 offset, S32 num_chars) {} virtual BOOL isText() = 0; - virtual void setColor(const LLColor4&) = 0; + virtual void setColor(const LLColor4&) {} + virtual void onCommit() {}; virtual BOOL handleClick() { return FALSE; } virtual void setEnabled(BOOL enable) { } + +protected: + S32 mWidth; }; class LLScrollListSeparator : public LLScrollListCell @@ -77,15 +83,9 @@ class LLScrollListSeparator : public LLScrollListCell public: LLScrollListSeparator(S32 width); virtual ~LLScrollListSeparator() {}; - virtual void drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const; // truncate to given width, if possible - virtual S32 getWidth() const {return mWidth;} + virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; // truncate to given width, if possible virtual S32 getHeight() const { return 5; }; - virtual void setWidth(S32 width) {mWidth = width; } - virtual void setColor(const LLColor4&) {}; virtual BOOL isText() { return FALSE; } - -protected: - S32 mWidth; }; class LLScrollListText : public LLScrollListCell @@ -94,24 +94,25 @@ public: LLScrollListText( const LLString& text, const LLFontGL* font, S32 width = 0, U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, LLColor4& color = LLColor4::black, BOOL use_color = FALSE, BOOL visible = TRUE); /*virtual*/ ~LLScrollListText(); - virtual void drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const; - virtual S32 getWidth() const { return mWidth; } - virtual void setWidth(S32 width) { mWidth = width; } + virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; + virtual S32 getContentWidth() const; virtual S32 getHeight() const { return llround(mFont->getLineHeight()); } - virtual const LLString& getText() const { return mText.getString(); } + virtual const LLSD getValue() const { return LLSD(mText.getString()); } virtual BOOL getVisible() const { return mVisible; } virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;} - void setText(const LLStringExplicit& text); + virtual void setColor(const LLColor4&); virtual BOOL isText() { return TRUE; } + void setText(const LLStringExplicit& text); + void setFontStyle(const U8 font_style) { mFontStyle = font_style; } + private: LLUIString mText; const LLFontGL* mFont; LLColor4* mColor; - const U8 mFontStyle; + U8 mFontStyle; LLFontGL::HAlign mFontAlignment; - S32 mWidth; BOOL mVisible; S32 mHighlightCount; S32 mHighlightOffset; @@ -124,21 +125,20 @@ private: class LLScrollListIcon : public LLScrollListCell { public: - LLScrollListIcon( LLImageGL* icon, S32 width = 0, LLUUID image_id = LLUUID::null); + LLScrollListIcon( const LLUUID& icon_id, S32 width = 0); /*virtual*/ ~LLScrollListIcon(); - virtual void drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const; - virtual S32 getWidth() const { return mWidth; } - virtual S32 getHeight() const { return mIcon->getHeight(); } - virtual const LLString& getText() const { return mImageUUID; } - virtual const LLString& getTextLower() const { return mImageUUID; } - virtual void setWidth(S32 width) { mWidth = width; } + virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; + virtual S32 getWidth() const; + virtual S32 getHeight() const { return mIcon ? mIcon->getHeight() : 0; } + // used as sort criterion + virtual const LLSD getValue() const { return LLSD(mImageUUID); } virtual void setColor(const LLColor4&); virtual BOOL isText() { return FALSE; } + virtual void setValue(LLSD value); private: LLPointer mIcon; - LLString mImageUUID; - S32 mWidth; + LLUUID mImageUUID; LLColor4 mColor; }; @@ -147,21 +147,20 @@ class LLScrollListCheck : public LLScrollListCell public: LLScrollListCheck( LLCheckBoxCtrl* check_box, S32 width = 0); /*virtual*/ ~LLScrollListCheck(); - virtual void drawToWidth(S32 width, const LLColor4& color, const LLColor4& highlight_color) const; - virtual S32 getWidth() const { return mWidth; } + virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; virtual S32 getHeight() const { return 0; } - virtual void setWidth(S32 width) { mWidth = width; } + virtual const LLSD getValue() const { return mCheckBox->getValue(); } + virtual void setValue(LLSD value) { mCheckBox->setValue(value); } + virtual void onCommit() { mCheckBox->onCommit(); } virtual BOOL handleClick(); - virtual void setEnabled(BOOL enable) { if (mCheckBox) mCheckBox->setEnabled(enable); } - virtual void setColor(const LLColor4& color) {}; + virtual void setEnabled(BOOL enable) { mCheckBox->setEnabled(enable); } LLCheckBoxCtrl* getCheckBox() { return mCheckBox; } virtual BOOL isText() { return FALSE; } private: LLCheckBoxCtrl* mCheckBox; - S32 mWidth; }; class LLScrollListColumn @@ -266,6 +265,7 @@ public: /*virtual*/ void draw(); /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + /*virtual*/ void showList(); /*virtual*/ LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding); /*virtual*/ void userSetShape(const LLRect& new_rect); @@ -319,8 +319,8 @@ public: void addColumn( const LLString& text, const LLFontGL* font, S32 width = 0 , U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, BOOL visible = TRUE) { mColumns.push_back( new LLScrollListText(text, font, width, font_style, font_alignment, LLColor4::black, FALSE, visible) ); } - void addColumn( LLImageGL* icon, S32 width = 0 ) - { mColumns.push_back( new LLScrollListIcon(icon, width) ); } + void addColumn( const LLUUID& icon_id, S32 width = 0 ) + { mColumns.push_back( new LLScrollListIcon(icon_id, width) ); } void addColumn( LLCheckBoxCtrl* check, S32 width = 0 ) { mColumns.push_back( new LLScrollListCheck(check,width) ); } @@ -333,10 +333,10 @@ public: 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); - LLString getContentsCSV(); + virtual void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding); + private: BOOL mSelected; BOOL mEnabled; @@ -345,6 +345,23 @@ private: std::vector mColumns; }; +class LLScrollListItemComment : public LLScrollListItem +{ +public: + LLScrollListItemComment(const LLString& comment_string, const LLColor4& color); + + /*virtual*/ void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding); +private: + LLColor4 mColor; +}; + +class LLScrollListItemSeparator : public LLScrollListItem +{ +public: + LLScrollListItemSeparator(); + + /*virtual*/ void draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding); +}; class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler, public LLCtrlListInterface, public LLCtrlScrollInterface @@ -370,9 +387,8 @@ public: void deleteAllItems() { clearRows(); } // Sets an array of column descriptors - void setColumnHeadings(LLSD headings); - // Numerical based sort by column function (used by LLComboBox) - void sortByColumn(U32 column, BOOL ascending); + void setColumnHeadings(LLSD headings); + void sortByColumn(U32 column, BOOL ascending); // LLCtrlListInterface functions virtual S32 getItemCount() const; @@ -390,7 +406,6 @@ public: virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); // Simple add element. Takes a single array of: // [ "value" => value, "font" => font, "font-style" => style ] - virtual LLScrollListItem* addSimpleElement(const LLString& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD()); virtual void clearRows(); // clears all elements virtual void sortByColumn(LLString name, BOOL ascending); @@ -421,18 +436,20 @@ public: BOOL isSorted(); virtual BOOL isSelected(LLSD value); - + + BOOL handleClick(S32 x, S32 y, MASK mask); BOOL selectFirstItem(); BOOL selectNthItem( S32 index ); BOOL selectItemAt(S32 x, S32 y, MASK mask); - void deleteSingleItem( S32 index ) ; + void deleteSingleItem( S32 index ); + void deleteItems(const LLSD& sd); void deleteSelectedItems(); void deselectAllItems(BOOL no_commit_on_change = FALSE); // by default, go ahead and commit on selection change void highlightNthItem( S32 index ); void setDoubleClickCallback( void (*cb)(void*) ) { mOnDoubleClickCallback = cb; } - void setMaxiumumSelectCallback( void (*cb)(void*) ) { mOnMaximumSelectCallback = cb; } + void setMaximumSelectCallback( void (*cb)(void*) ) { mOnMaximumSelectCallback = cb; } void setSortChangedCallback( void (*cb)(void*) ) { mOnSortChangedCallback = cb; } void swapWithNext(S32 index); @@ -444,19 +461,21 @@ public: S32 getItemIndex( LLScrollListItem* item ); S32 getItemIndex( LLUUID& item_id ); + LLScrollListItem* addCommentText( const LLString& comment_text, EAddPosition pos = ADD_BOTTOM); + LLScrollListItem* addSeparator(EAddPosition pos); + // "Simple" interface: use this when you're creating a list that contains only unique strings, only // one of which can be selected at a time. - LLScrollListItem* addSimpleItem( const LLString& item_text, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE ); - // Add an item with an associated LLSD - LLScrollListItem* addSimpleItem(const LLString& item_text, LLSD sd, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, S32 column_width = 0 ); + virtual LLScrollListItem* addSimpleElement(const LLString& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD()); + - BOOL selectSimpleItem( const LLString& item, BOOL case_sensitive = TRUE ); // FALSE if item not found - BOOL selectSimpleItemByPrefix(const LLString& target, BOOL case_sensitive); - BOOL selectSimpleItemByPrefix(const LLWString& target, BOOL case_sensitive); - const LLString& getSimpleSelectedItem(S32 column = 0) const; - LLSD getSimpleSelectedValue(); + BOOL selectItemByLabel( const LLString& item, BOOL case_sensitive = TRUE ); // FALSE if item not found + BOOL selectItemByPrefix(const LLString& target, BOOL case_sensitive = TRUE); + BOOL selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE); + const LLString getSelectedItemLabel(S32 column = 0) const; + LLSD getSelectedValue(); - // DEPRECATED: Use LLSD versions of addSimpleItem() and getSimpleSelectedValue(). + // DEPRECATED: Use LLSD versions of addCommentText() and getSelectedValue(). // "StringUUID" interface: use this when you're creating a list that contains non-unique strings each of which // has an associated, unique UUID, and only one of which can be selected at a time. LLScrollListItem* addStringUUIDItem(const LLString& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, S32 column_width = 0); @@ -472,6 +491,8 @@ public: LLScrollListItem* getFirstData() const; LLScrollListItem* getLastData() const; std::vector getAllData() const; + + LLScrollListItem* getItem(const LLSD& sd) const; void setAllowMultipleSelection(BOOL mult ) { mAllowMultipleSelection = mult; } @@ -501,28 +522,34 @@ public: S32 getSearchColumn() { return mSearchColumn; } void setSearchColumn(S32 column) { mSearchColumn = column; } + S32 getColumnIndexFromOffset(S32 x); + S32 getColumnOffsetFromIndex(S32 index); + S32 getRowOffsetFromIndex(S32 index); void clearSearchString() { mSearchString.clear(); } // Overridden from LLView - virtual void draw(); - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); - virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); - virtual BOOL handleHover(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); - virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); - virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); - virtual void setEnabled(BOOL enabled); - virtual void setFocus( BOOL b ); - virtual void onFocusReceived(); - virtual void onFocusLost(); + /*virtual*/ void draw(); + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); + /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); + /*virtual*/ BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect); + /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void setFocus( BOOL b ); + /*virtual*/ void onFocusReceived(); + /*virtual*/ void onFocusLost(); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); virtual BOOL isDirty() const; virtual void resetDirty(); // Clear dirty state - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - virtual void arrange(S32 max_width, S32 max_height); + virtual void updateLayout(); + virtual void fitContents(S32 max_width, S32 max_height); + virtual LLRect getRequiredRect(); static BOOL rowPreceeds(LLScrollListItem *new_row, LLScrollListItem *test_row); @@ -534,12 +561,12 @@ public: static void onClickColumn(void *userdata); void updateColumns(); - void updateMaxContentWidth(LLScrollListItem* changed_item); + void calcMaxContentWidth(LLScrollListItem* changed_item); + S32 getMaxContentWidth() { return mMaxContentWidth; } void setDisplayHeading(BOOL display); void setHeadingHeight(S32 heading_height); void setCollapseEmptyColumns(BOOL collapse); - void setIsPopup(BOOL is_popup) { mIsPopup = is_popup; } LLScrollListItem* hitItem(S32 x,S32 y); virtual void scrollToShowSelected(); @@ -564,9 +591,11 @@ public: void setTotalStaticColumnWidth(int width) { mTotalStaticColumnWidth = width; } std::string getSortColumnName(); - BOOL getSortAscending() { return mSortAscending; } + BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; } + BOOL needsSorting(); S32 selectMultiple( LLDynamicArray ids ); + void sortItems(); protected: // "Full" interface: use this when you're creating a list that has one or more of the following: @@ -584,7 +613,7 @@ protected: // to the caller to delete the item) // returns FALSE if item faile to be added to list, does NOT delete 'item' - BOOL addItem( LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM ); + BOOL addItem( LLScrollListItem* item, EAddPosition pos = ADD_BOTTOM, BOOL requires_column = TRUE ); void selectPrevItem(BOOL extend_selection); void selectNextItem(BOOL extend_selection); void drawItems(); @@ -596,6 +625,7 @@ protected: void deselectItem(LLScrollListItem* itemp); void commitIfChanged(); void setSorted(BOOL sorted); + BOOL setSort(S32 column, BOOL ascending); protected: S32 mCurIndex; // For get[First/Next]Data @@ -615,8 +645,6 @@ protected: BOOL mNeedsScroll; BOOL mCanSelect; BOOL mDisplayColumnHeaders; - BOOL mCollapseEmptyColumns; - BOOL mIsPopup; typedef std::deque item_list; item_list mItemList; @@ -626,7 +654,7 @@ protected: S32 mMaxItemCount; LLRect mItemListRect; - + S32 mMaxContentWidth; S32 mColumnPadding; BOOL mBackgroundVisible; @@ -652,22 +680,23 @@ protected: LLWString mSearchString; LLFrameTimer mSearchTimer; - LLString mDefaultColumn; - S32 mSearchColumn; S32 mNumDynamicWidthColumns; S32 mTotalStaticColumnWidth; - S32 mSortColumn; - BOOL mSortAscending; BOOL mSorted; - + std::map mColumns; - std::vector mColumnsIndexed; BOOL mDirty; S32 mOriginalSelection; + typedef std::vector ordered_columns_t; + ordered_columns_t mColumnsIndexed; + + typedef std::pair sort_column_t; + std::vector mSortColumns; + public: // HACK: Did we draw one selected item this frame? BOOL mDrewSelected; diff --git a/linden/indra/llui/llslider.cpp b/linden/indra/llui/llslider.cpp index 606a8a1..e03603d 100644 --- a/linden/indra/llui/llslider.cpp +++ b/linden/indra/llui/llslider.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -41,9 +41,6 @@ #include "llcontrol.h" #include "llimagegl.h" -const S32 THUMB_WIDTH = 8; -const S32 TRACK_HEIGHT = 6; - LLSlider::LLSlider( const LLString& name, const LLRect& rect, @@ -65,20 +62,24 @@ LLSlider::LLSlider( mIncrement( increment ), mVolumeSlider( volume ), mMouseOffset( 0 ), - mDragStartThumbRect( 0, mRect.getHeight(), THUMB_WIDTH, 0 ), - mThumbRect( 0, mRect.getHeight(), THUMB_WIDTH, 0 ), mTrackColor( LLUI::sColorsGroup->getColor( "SliderTrackColor" ) ), mThumbOutlineColor( LLUI::sColorsGroup->getColor( "SliderThumbOutlineColor" ) ), mThumbCenterColor( LLUI::sColorsGroup->getColor( "SliderThumbCenterColor" ) ), - mDisabledThumbColor(LLUI::sColorsGroup->getColor( "SliderDisabledThumbColor" ) ), mMouseDownCallback( NULL ), mMouseUpCallback( NULL ) { + mThumbImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("icn_slide-thumb_dark.tga"))); + mTrackImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("icn_slide-groove_dark.tga"))); + mTrackHighlightImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("icn_slide-highlight.tga"))); + // properly handle setting the starting thumb rect // do it this way to handle both the operating-on-settings // and standalone ways of using this setControlName(control_name, NULL); setValue(getValueF32()); + + updateThumbRect(); + mDragStartThumbRect = mThumbRect; } EWidgetType LLSlider::getWidgetType() const @@ -107,17 +108,26 @@ void LLSlider::setValue(F32 value, BOOL from_event) } mValue = value; + updateThumbRect(); +} +void LLSlider::updateThumbRect() +{ F32 t = (mValue - mMinValue) / (mMaxValue - mMinValue); - S32 left_edge = THUMB_WIDTH/2; - S32 right_edge = mRect.getWidth() - (THUMB_WIDTH/2); + S32 thumb_width = mThumbImage->getWidth(); + S32 thumb_height = mThumbImage->getHeight(); + S32 left_edge = (thumb_width / 2); + S32 right_edge = mRect.getWidth() - (thumb_width / 2); S32 x = left_edge + S32( t * (right_edge - left_edge) ); - mThumbRect.mLeft = x - (THUMB_WIDTH/2); - mThumbRect.mRight = x + (THUMB_WIDTH/2); + mThumbRect.mLeft = x - (thumb_width / 2); + mThumbRect.mRight = mThumbRect.mLeft + thumb_width; + mThumbRect.mBottom = getLocalRect().getCenterY() - (thumb_height / 2); + mThumbRect.mTop = mThumbRect.mBottom + thumb_height; } + void LLSlider::setValueAndCommit(F32 value) { F32 old_value = mValue; @@ -139,8 +149,9 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask) { if( hasMouseCapture() ) { - S32 left_edge = THUMB_WIDTH/2; - S32 right_edge = mRect.getWidth() - (THUMB_WIDTH/2); + S32 thumb_half_width = mThumbImage->getWidth()/2; + S32 left_edge = thumb_half_width; + S32 right_edge = mRect.getWidth() - (thumb_half_width); x += mMouseOffset; x = llclamp( x, left_edge, right_edge ); @@ -203,7 +214,7 @@ BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask) // Find the offset of the actual mouse location from the center of the thumb. if (mThumbRect.pointInRect(x,y)) { - mMouseOffset = (mThumbRect.mLeft + THUMB_WIDTH/2) - x; + mMouseOffset = (mThumbRect.mLeft + mThumbImage->getWidth()/2) - x; } else { @@ -251,6 +262,9 @@ void LLSlider::draw() { if( getVisible() ) { + // since thumb image might still be decoding, need thumb to accomodate image size + updateThumbRect(); + // Draw background and thumb. // drawing solids requires texturing be disabled @@ -260,104 +274,37 @@ void LLSlider::draw() F32 opacity = mEnabled ? 1.f : 0.3f; LLColor4 center_color = (mThumbCenterColor % opacity); - LLColor4 outline_color = (mThumbOutlineColor % opacity); LLColor4 track_color = (mTrackColor % opacity); - LLImageGL* thumb_imagep = NULL; - // Track - if (mVolumeSlider) - { - LLRect track(0, mRect.getHeight(), mRect.getWidth(), 0); - - track.mBottom += 3; - track.mTop -= 1; - track.mRight -= 1; - - gl_triangle_2d(track.mLeft, track.mBottom, - track.mRight, track.mBottom, - track.mRight, track.mTop, - center_color, - TRUE); - gl_triangle_2d(track.mLeft, track.mBottom, - track.mRight, track.mBottom, - track.mRight, track.mTop, - outline_color, - FALSE); - } - else - { - LLUUID thumb_image_id; - thumb_image_id.set(LLUI::sAssetsGroup->getString("rounded_square.tga")); - thumb_imagep = LLUI::sImageProvider->getUIImageByID(thumb_image_id); + LLRect track_rect(mThumbImage->getWidth() / 2, + getLocalRect().getCenterY() + (mTrackImage->getHeight() / 2), + mRect.getWidth() - mThumbImage->getWidth() / 2, + getLocalRect().getCenterY() - (mTrackImage->getHeight() / 2) ); - S32 height_offset = (mRect.getHeight() - TRACK_HEIGHT) / 2; - LLRect track_rect(0, mRect.getHeight() - height_offset, mRect.getWidth(), height_offset ); + gl_draw_scaled_image_with_border(track_rect.mLeft, track_rect.mBottom, 3, 3, track_rect.getWidth(), track_rect.getHeight(), + mTrackImage, track_color); + gl_draw_scaled_image_with_border(track_rect.mLeft, track_rect.mBottom, 3, 3, mThumbRect.mLeft, track_rect.getHeight(), + mTrackHighlightImage, track_color); - track_rect.stretch(-1); - gl_draw_scaled_image_with_border(track_rect.mLeft, track_rect.mBottom, 16, 16, track_rect.getWidth(), track_rect.getHeight(), - thumb_imagep, track_color); - } // Thumb - if (!thumb_imagep) - { - if (mVolumeSlider) - { - if (hasMouseCapture()) - { - LLRect rect(mDragStartThumbRect); - gl_rect_2d( rect, outline_color ); - rect.stretch(-1); - gl_rect_2d( rect, mThumbCenterColor % 0.3f ); - - if (hasFocus()) - { - LLRect thumb_rect = mThumbRect; - thumb_rect.stretch(llround(lerp(1.f, 3.f, gFocusMgr.getFocusFlashAmt()))); - gl_rect_2d(thumb_rect, gFocusMgr.getFocusColor()); - } - gl_rect_2d( mThumbRect, mThumbOutlineColor ); - } - else - { - if (hasFocus()) - { - LLRect thumb_rect = mThumbRect; - thumb_rect.stretch(llround(lerp(1.f, 3.f, gFocusMgr.getFocusFlashAmt()))); - gl_rect_2d(thumb_rect, gFocusMgr.getFocusColor()); - } - LLRect rect(mThumbRect); - gl_rect_2d(rect, outline_color); - rect.stretch(-1); - gl_rect_2d( rect, center_color); - } - } - else - { - gl_rect_2d(mThumbRect, mThumbCenterColor, TRUE); - if (hasMouseCapture()) - { - gl_rect_2d(mDragStartThumbRect, center_color, FALSE); - } - } - } - else if( hasMouseCapture() ) + if( hasMouseCapture() ) { - gl_draw_scaled_image_with_border(mDragStartThumbRect.mLeft, mDragStartThumbRect.mBottom, 16, 16, mDragStartThumbRect.getWidth(), mDragStartThumbRect.getHeight(), - thumb_imagep, mThumbCenterColor % 0.3f, TRUE); + gl_draw_scaled_image(mDragStartThumbRect.mLeft, mDragStartThumbRect.mBottom, mDragStartThumbRect.getWidth(), mDragStartThumbRect.getHeight(), + mThumbImage, mThumbCenterColor % 0.3f); if (hasFocus()) { F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); LLRect highlight_rect = mThumbRect; highlight_rect.stretch(llround(lerp(1.f, 3.f, lerp_amt))); - gl_draw_scaled_image_with_border(highlight_rect.mLeft, highlight_rect.mBottom, 16, 16, highlight_rect.getWidth(), highlight_rect.getHeight(), - thumb_imagep, gFocusMgr.getFocusColor()); + gl_draw_scaled_image_with_border(highlight_rect.mLeft, highlight_rect.mBottom, 0, 0, highlight_rect.getWidth(), highlight_rect.getHeight(), + mThumbImage, gFocusMgr.getFocusColor(), TRUE); } - gl_draw_scaled_image_with_border(mThumbRect.mLeft, mThumbRect.mBottom, 16, 16, mThumbRect.getWidth(), mThumbRect.getHeight(), - thumb_imagep, mThumbOutlineColor, TRUE); + gl_draw_scaled_image(mThumbRect.mLeft, mThumbRect.mBottom, mThumbRect.getWidth(), mThumbRect.getHeight(), + mThumbImage, mThumbOutlineColor); } else @@ -367,12 +314,12 @@ void LLSlider::draw() F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); LLRect highlight_rect = mThumbRect; highlight_rect.stretch(llround(lerp(1.f, 3.f, lerp_amt))); - gl_draw_scaled_image_with_border(highlight_rect.mLeft, highlight_rect.mBottom, 16, 16, highlight_rect.getWidth(), highlight_rect.getHeight(), - thumb_imagep, gFocusMgr.getFocusColor()); + gl_draw_scaled_image_with_border(highlight_rect.mLeft, highlight_rect.mBottom, 0, 0, highlight_rect.getWidth(), highlight_rect.getHeight(), + mThumbImage, gFocusMgr.getFocusColor(), TRUE); } - gl_draw_scaled_image_with_border(mThumbRect.mLeft, mThumbRect.mBottom, 16, 16, mThumbRect.getWidth(), mThumbRect.getHeight(), - thumb_imagep, center_color, TRUE); + gl_draw_scaled_image(mThumbRect.mLeft, mThumbRect.mBottom, mThumbRect.getWidth(), mThumbRect.getHeight(), + mThumbImage, center_color); } LLUICtrl::draw(); } diff --git a/linden/indra/llui/llslider.h b/linden/indra/llui/llslider.h index 28a8d07..08ab600 100644 --- a/linden/indra/llui/llslider.h +++ b/linden/indra/llui/llslider.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -36,6 +36,7 @@ #include "v4color.h" class LLUICtrlFactory; +class LLImageGL; class LLSlider : public LLUICtrl { @@ -85,6 +86,7 @@ public: protected: void setValueAndCommit(F32 value); + void updateThumbRect(); protected: F32 mValue; @@ -97,11 +99,14 @@ protected: S32 mMouseOffset; LLRect mDragStartThumbRect; + LLImageGL* mThumbImage; + LLImageGL* mTrackImage; + LLImageGL* mTrackHighlightImage; + LLRect mThumbRect; LLColor4 mTrackColor; LLColor4 mThumbOutlineColor; LLColor4 mThumbCenterColor; - LLColor4 mDisabledThumbColor; void (*mMouseDownCallback)(LLUICtrl* ctrl, void* userdata); void (*mMouseUpCallback)(LLUICtrl* ctrl, void* userdata); diff --git a/linden/indra/llui/llsliderctrl.cpp b/linden/indra/llui/llsliderctrl.cpp index 8bb8e24..17854d0 100644 --- a/linden/indra/llui/llsliderctrl.cpp +++ b/linden/indra/llui/llsliderctrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -125,7 +125,7 @@ LLSliderCtrl::LLSliderCtrl(const LLString& name, const LLRect& rect, &LLLineEditor::prevalidateFloat ); mEditor->setFollowsLeft(); mEditor->setFollowsBottom(); - mEditor->setFocusReceivedCallback( &LLSliderCtrl::onEditorGainFocus ); + mEditor->setFocusReceivedCallback( &LLSliderCtrl::onEditorGainFocus, this ); mEditor->setIgnoreTab(TRUE); // don't do this, as selecting the entire text is single clicking in some cases // and double clicking in others @@ -150,7 +150,7 @@ LLSliderCtrl::~LLSliderCtrl() } // static -void LLSliderCtrl::onEditorGainFocus( LLUICtrl* caller, void *userdata ) +void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata ) { LLSliderCtrl* self = (LLSliderCtrl*) userdata; llassert( caller == self->mEditor ); diff --git a/linden/indra/llui/llsliderctrl.h b/linden/indra/llui/llsliderctrl.h index 87d2d89..7af0abf 100644 --- a/linden/indra/llui/llsliderctrl.h +++ b/linden/indra/llui/llsliderctrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -117,7 +117,7 @@ public: static void onSliderMouseUp(LLUICtrl* caller,void* userdata); static void onEditorCommit(LLUICtrl* caller, void* userdata); - static void onEditorGainFocus(LLUICtrl* caller, void *userdata); + static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata); private: diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp index 0cd9390..4bd79e6 100644 --- a/linden/indra/llui/llspinctrl.cpp +++ b/linden/indra/llui/llspinctrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -128,7 +128,7 @@ LLSpinCtrl::LLSpinCtrl( const LLString& name, const LLRect& rect, const LLString &LLLineEditor::prevalidateFloat ); mEditor->setFollowsLeft(); mEditor->setFollowsBottom(); - mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus ); + mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this ); //RN: this seems to be a BAD IDEA, as it makes the editor behavior different when it has focus // than when it doesn't. Instead, if you always have to double click to select all the text, // it's easier to understand @@ -137,7 +137,7 @@ LLSpinCtrl::LLSpinCtrl( const LLString& name, const LLRect& rect, const LLString addChild(mEditor); updateEditor(); - setSpanChildren( TRUE ); + setUseBoundingRect( TRUE ); } LLSpinCtrl::~LLSpinCtrl() @@ -230,7 +230,7 @@ void LLSpinCtrl::onDownBtn( void *userdata ) } // static -void LLSpinCtrl::onEditorGainFocus( LLUICtrl* caller, void *userdata ) +void LLSpinCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata ) { LLSpinCtrl* self = (LLSpinCtrl*) userdata; llassert( caller == self->mEditor ); diff --git a/linden/indra/llui/llspinctrl.h b/linden/indra/llui/llspinctrl.h index de8513e..c5a36f5 100644 --- a/linden/indra/llui/llspinctrl.h +++ b/linden/indra/llui/llspinctrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -113,7 +113,7 @@ public: virtual void draw(); static void onEditorCommit(LLUICtrl* caller, void* userdata); - static void onEditorGainFocus(LLUICtrl* caller, void *userdata); + static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata); static void onUpBtn(void *userdata); diff --git a/linden/indra/llui/llstyle.cpp b/linden/indra/llui/llstyle.cpp index 2281d44..693e0be 100644 --- a/linden/indra/llui/llstyle.cpp +++ b/linden/indra/llui/llstyle.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -230,7 +230,7 @@ void LLStyle::setImage(const LLString& src) } else { - mImagep = LLUI::sImageProvider->getUIImageByID(LLUUID(src)); + mImagep = LLUI::sImageProvider->getImageByID(LLUUID(src)); } } diff --git a/linden/indra/llui/llstyle.h b/linden/indra/llui/llstyle.h index fcff789..1712dc0 100644 --- a/linden/indra/llui/llstyle.h +++ b/linden/indra/llui/llstyle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp index 19dc6ec..0400b50 100644 --- a/linden/indra/llui/lltabcontainer.cpp +++ b/linden/indra/llui/lltabcontainer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -156,7 +156,12 @@ void LLTabContainerCommon::lockTabs(S32 num_tabs) { // count current tabs or use supplied value and ensure no new tabs get // inserted between them - mLockedTabCount = num_tabs > 0 ? num_tabs : getTabCount(); + mLockedTabCount = num_tabs > 0 ? llmin(getTabCount(), num_tabs) : getTabCount(); +} + +void LLTabContainerCommon::unlockTabs() +{ + mLockedTabCount = 0; } void LLTabContainerCommon::removeTabPanel(LLPanel* child) @@ -557,7 +562,7 @@ void LLTabContainerCommon::setTabImage(LLPanel* child, std::string img_name, con } void LLTabContainerCommon::setTitle(const LLString& title) -{ +{ if (mTitleBox) { mTitleBox->setText( title ); @@ -721,6 +726,14 @@ void LLTabContainerCommon::insertTuple(LLTabTuple * tuple, eInsertionPoint inser // insert the new tab in the front of the list mTabList.insert(mTabList.begin() + mLockedTabCount, tuple); break; + case LEFT_OF_CURRENT: + // insert the new tab before the current tab (but not before mLockedTabCount) + { + tuple_list_t::iterator current_iter = mTabList.begin() + llmax(mLockedTabCount, mCurrentTabIdx); + mTabList.insert(current_iter, tuple); + } + break; + case RIGHT_OF_CURRENT: // insert the new tab after the current tab (but not before mLockedTabCount) { @@ -946,14 +959,14 @@ void LLTabContainer::addTabPanel(LLPanel* child, if( LLTabContainer::TOP == mTabPosition ) { btn_rect.setLeftTopAndSize( 0, mRect.getHeight() - mTopBorderHeight + tab_fudge, button_width, TABCNTR_TAB_HEIGHT ); - tab_img = "UIImgBtnTabTopOutUUID"; - tab_selected_img = "UIImgBtnTabTopInUUID"; + tab_img = "tab_top_blue.tga"; + tab_selected_img = "tab_top_selected_blue.tga"; } else { btn_rect.setOriginAndSize( 0, 0 + tab_fudge, button_width, TABCNTR_TAB_HEIGHT ); - tab_img = "UIImgBtnTabBottomOutUUID"; - tab_selected_img = "UIImgBtnTabBottomInUUID"; + tab_img = "tab_bottom_blue.tga"; + tab_selected_img = "tab_bottom_selected_blue.tga"; } if (placeholder) @@ -979,7 +992,7 @@ void LLTabContainer::addTabPanel(LLPanel* child, LLButton* btn = new LLButton( LLString(child->getName()) + " tab", btn_rect, - tab_img, tab_selected_img, "", + "", "", "", &LLTabContainer::onTabBtn, NULL, // set userdata below font, trimmed_label, trimmed_label ); @@ -987,7 +1000,7 @@ void LLTabContainer::addTabPanel(LLPanel* child, btn->setVisible( FALSE ); btn->setToolTip( tooltip ); btn->setScaleImage(TRUE); - btn->setFixedBorder(14, 14); + btn->setImages(tab_img, tab_selected_img); // Try to squeeze in a bit more text btn->setLeftHPad( 4 ); @@ -1139,7 +1152,7 @@ BOOL LLTabContainer::selectTab(S32 which) //if( gFocusMgr.childHasKeyboardFocus( this ) ) //{ - // gFocusMgr.setKeyboardFocus( NULL, NULL ); + // gFocusMgr.setKeyboardFocus( NULL ); //} LLTabTuple* selected_tuple = mTabList[which]; @@ -1370,7 +1383,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) { LLButton* tab_button = mTabList[getCurrentPanelIndex()]->mButton; gFocusMgr.setMouseCapture(this); - gFocusMgr.setKeyboardFocus(tab_button, NULL); + gFocusMgr.setKeyboardFocus(tab_button); } } return handled; @@ -1475,7 +1488,7 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask ) BOOL LLTabContainer::handleToolTip( S32 x, S32 y, LLString& msg, LLRect* sticky_rect ) { BOOL handled = LLPanel::handleToolTip( x, y, msg, sticky_rect ); - if (!handled && mTabList.size() > 0 && getVisible() && pointInView( x, y ) ) + if (!handled && mTabList.size() > 0) { LLTabTuple* firsttuple = mTabList[0]; @@ -1645,12 +1658,12 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L mTotalTabWidth -= tuple->mButton->getRect().getWidth(); S32 image_overlay_width = tuple->mButton->getImageOverlay().notNull() ? - tuple->mButton->getImageOverlay()->getWidth(0) : + tuple->mButton->getImageOverlay()->getImage()->getWidth(0) : 0; tuple->mPadding = image_overlay_width; - tuple->mButton->setRightHPad(tuple->mPadding + LLBUTTON_H_PAD); + tuple->mButton->setRightHPad(6); tuple->mButton->reshape(llclamp(fontp->getWidth(tuple->mButton->getLabelSelected()) + TAB_PADDING + tuple->mPadding, mMinTabWidth, mMaxTabWidth), tuple->mButton->getRect().getHeight()); // add back in button width to total tab strip width diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h index 3f2b1b4..e2770ee 100644 --- a/linden/indra/llui/lltabcontainer.h +++ b/linden/indra/llui/lltabcontainer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -54,6 +54,7 @@ public: { START, END, + LEFT_OF_CURRENT, RIGHT_OF_CURRENT } eInsertionPoint; @@ -91,6 +92,8 @@ public: eInsertionPoint insertion_point = END) = 0; virtual void addPlaceholder(LLPanel* child, const LLString& label); virtual void lockTabs(S32 num_tabs = 0); + virtual void unlockTabs(); + S32 getNumLockedTabs() { return mLockedTabCount; } virtual void enableTabButton(S32 which, BOOL enable); diff --git a/linden/indra/llui/lltabcontainervertical.cpp b/linden/indra/llui/lltabcontainervertical.cpp index 5a04417..334cb43 100644 --- a/linden/indra/llui/lltabcontainervertical.cpp +++ b/linden/indra/llui/lltabcontainervertical.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -185,14 +185,14 @@ void LLTabContainerVertical::addTabPanel(LLPanel* child, const LLString& label, { LLButton *btn = new LLButton("vert tab button", btn_rect, - "tab_left.tga", - "tab_left_selected.tga", + "", + "", "", &LLTabContainerVertical::onTabBtn, NULL, font, trimmed_label, trimmed_label); btn->setSaveToXML(false); - btn->setFixedBorder(16, 16); + btn->setImages("tab_left.tga", "tab_left_selected.tga"); btn->setScaleImage(TRUE); btn->setHAlign(LLFontGL::LEFT); btn->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); @@ -306,7 +306,7 @@ BOOL LLTabContainerVertical::selectTab(S32 which) //if( gFocusMgr.childHasKeyboardFocus( this ) ) //{ - // gFocusMgr.setKeyboardFocus( NULL, NULL ); + // gFocusMgr.setKeyboardFocus( NULL ); //} LLTabTuple* selected_tuple = mTabList[which]; @@ -476,7 +476,7 @@ BOOL LLTabContainerVertical::handleMouseDown( S32 x, S32 y, MASK mask ) { LLButton* tab_button = mTabList[getCurrentPanelIndex()]->mButton; gFocusMgr.setMouseCapture(this); - gFocusMgr.setKeyboardFocus(tab_button, NULL); + gFocusMgr.setKeyboardFocus(tab_button); } } return handled; diff --git a/linden/indra/llui/lltabcontainervertical.h b/linden/indra/llui/lltabcontainervertical.h index bfaf461..e887e53 100644 --- a/linden/indra/llui/lltabcontainervertical.h +++ b/linden/indra/llui/lltabcontainervertical.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp index d2dae30..1422e0a 100644 --- a/linden/indra/llui/lltextbox.cpp +++ b/linden/indra/llui/lltextbox.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -56,6 +56,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& t mBorderVisible( FALSE ), mFontStyle(LLFontGL::DROP_SHADOW_SOFT), mBorderDropShadowVisible( FALSE ), + mUseEllipses( FALSE ), mHPad(0), mVPad(0), mHAlign( LLFontGL::LEFT ), @@ -84,6 +85,7 @@ LLTextBox::LLTextBox(const LLString& name, const LLString& text, F32 max_width, mBorderVisible(FALSE), mFontStyle(LLFontGL::DROP_SHADOW_SOFT), mBorderDropShadowVisible(FALSE), + mUseEllipses( FALSE ), mHPad(0), mVPad(0), mHAlign(LLFontGL::LEFT), @@ -174,7 +176,7 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask) mHasHover = TRUE; // This should be set every frame during a hover. return TRUE; } - return FALSE; + return LLView::handleHover(x,y,mask); } void LLTextBox::setText(const LLStringExplicit& text) @@ -393,7 +395,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) mFontGL->render(mText.getWString(), cur_pos, (F32)x, (F32)y, color, mHAlign, mVAlign, mFontStyle, - line_length, mRect.getWidth(), NULL, TRUE ); + line_length, mRect.getWidth(), NULL, TRUE, mUseEllipses ); cur_pos += line_length + 1; y -= llfloor(mFontGL->getLineHeight()); } @@ -403,7 +405,7 @@ void LLTextBox::drawText( S32 x, S32 y, const LLColor4& color ) mFontGL->render(mText.getWString(), 0, (F32)x, (F32)y, color, mHAlign, mVAlign, mFontStyle, - S32_MAX, mRect.getWidth(), NULL, TRUE); + S32_MAX, mRect.getWidth(), NULL, TRUE, mUseEllipses); } } @@ -481,7 +483,7 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f text_box->mFontStyle = LLFontGL::getStyleFromString(font_style); } - BOOL mouse_opaque; + BOOL mouse_opaque = text_box->getMouseOpaque(); if (node->getAttributeBOOL("mouse_opaque", mouse_opaque)) { text_box->setMouseOpaque(mouse_opaque); diff --git a/linden/indra/llui/lltextbox.h b/linden/indra/llui/lltextbox.h index bdcccf7..c8bdfc5 100644 --- a/linden/indra/llui/lltextbox.h +++ b/linden/indra/llui/lltextbox.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -79,6 +79,7 @@ public: void setText( const LLStringExplicit& text ); void setWrappedText(const LLStringExplicit& text, F32 max_width = -1.0); // default width means use existing control width + void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; } void setBackgroundVisible(BOOL visible) { mBackgroundVisible = visible; } void setBorderVisible(BOOL visible) { mBorderVisible = visible; } @@ -124,6 +125,7 @@ protected: U8 mFontStyle; // style bit flags for font BOOL mBorderDropShadowVisible; + BOOL mUseEllipses; S32 mHPad; S32 mVPad; diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index b4d693b..ca9ea0a 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -79,6 +79,15 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; const S32 SPACES_PER_TAB = 4; +const F32 PREEDIT_MARKER_BRIGHTNESS = 0.4f; +const S32 PREEDIT_MARKER_GAP = 1; +const S32 PREEDIT_MARKER_POSITION = 2; +const S32 PREEDIT_MARKER_THICKNESS = 1; +const F32 PREEDIT_STANDOUT_BRIGHTNESS = 0.6f; +const S32 PREEDIT_STANDOUT_GAP = 1; +const S32 PREEDIT_STANDOUT_POSITION = 2; +const S32 PREEDIT_STANDOUT_THICKNESS = 2; + LLColor4 LLTextEditor::mLinkColor = LLColor4::blue; void (* LLTextEditor::mURLcallback)(const char*) = NULL; bool (* LLTextEditor::mSecondlifeURLcallback)(const std::string&) = NULL; @@ -274,14 +283,14 @@ private: LLTextEditor::LLTextEditor( const LLString& name, const LLRect& rect, - S32 max_length, + S32 max_length, // In bytes const LLString &default_text, const LLFontGL* font, BOOL allow_embedded_items) : LLUICtrl( name, rect, TRUE, NULL, NULL, FOLLOWS_TOP | FOLLOWS_LEFT ), mTextIsUpToDate(TRUE), - mMaxTextLength( max_length ), + mMaxTextByteLength( max_length ), mBaseDocIsPristine(TRUE), mPristineCmd( NULL ), mLastCmd( NULL ), @@ -293,6 +302,7 @@ LLTextEditor::LLTextEditor( mOnScrollEndData( NULL ), mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ), mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ), + mDefaultColor( LLUI::sColorsGroup->getColor( "TextDefaultColor" ) ), mReadOnlyFgColor( LLUI::sColorsGroup->getColor( "TextFgReadOnlyColor" ) ), mWriteableBgColor( LLUI::sColorsGroup->getColor( "TextBgWriteableColor" ) ), mReadOnlyBgColor( LLUI::sColorsGroup->getColor( "TextBgReadOnlyColor" ) ), @@ -301,9 +311,9 @@ LLTextEditor::LLTextEditor( mWordWrap( FALSE ), mTabToNextField( TRUE ), mCommitOnFocusLost( FALSE ), - mTakesFocus( TRUE ), mHideScrollbarForShortDocs( FALSE ), mTakesNonScrollClicks( TRUE ), + mTrackBottom( TRUE ), mAllowEmbeddedItems( allow_embedded_items ), mAcceptCallingCardNames(FALSE), mHandleEditKeysDirectly( FALSE ), @@ -510,13 +520,27 @@ BOOL LLTextEditor::isPartOfWord(llwchar c) { return (c == '_') || isalnum(c); } -void LLTextEditor::truncate() +BOOL LLTextEditor::truncate() { - if (mWText.size() > (size_t)mMaxTextLength) - { - LLWString::truncate(mWText, mMaxTextLength); - mTextIsUpToDate = FALSE; + BOOL did_truncate = FALSE; + + // First rough check - if we're less than 1/4th the size, we're OK + if (mWText.size() >= (size_t) (mMaxTextByteLength / 4)) + { + // Have to check actual byte size + S32 utf8_byte_size = wstring_utf8_length( mWText ); + if ( utf8_byte_size > mMaxTextByteLength ) + { + // Truncate safely in UTF-8 + std::string temp_utf8_text = wstring_to_utf8str( mWText ); + temp_utf8_text = utf8str_truncate( temp_utf8_text, mMaxTextByteLength ); + mWText = utf8str_to_wstring( temp_utf8_text ); + mTextIsUpToDate = FALSE; + did_truncate = TRUE; + } } + + return did_truncate; } void LLTextEditor::setText(const LLStringExplicit &utf8str) @@ -750,12 +774,12 @@ S32 LLTextEditor::nextWordPos(S32 cursorPos) const return cursorPos; } -S32 LLTextEditor::getLineCount() +S32 LLTextEditor::getLineCount() const { return mLineStartList.size(); } -S32 LLTextEditor::getLineStart( S32 line ) +S32 LLTextEditor::getLineStart( S32 line ) const { S32 num_lines = getLineCount(); if (num_lines == 0) @@ -1118,46 +1142,42 @@ void LLTextEditor::selectAll() BOOL LLTextEditor::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen) { - if (pointInView(x, y) && getVisible()) + for ( child_list_const_iter_t child_it = getChildList()->begin(); + child_it != getChildList()->end(); ++child_it) { - for ( child_list_const_iter_t child_it = getChildList()->begin(); - child_it != getChildList()->end(); ++child_it) - { - LLView* viewp = *child_it; - S32 local_x = x - viewp->getRect().mLeft; - S32 local_y = y - viewp->getRect().mBottom; - if( viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen ) ) - { - return TRUE; - } - } - - if( mSegments.empty() ) + LLView* viewp = *child_it; + S32 local_x = x - viewp->getRect().mLeft; + S32 local_y = y - viewp->getRect().mBottom; + if( viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen ) ) { return TRUE; } + } - LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y ); - if( cur_segment ) - { - BOOL has_tool_tip = FALSE; - has_tool_tip = cur_segment->getToolTip( msg ); + if( mSegments.empty() ) + { + return TRUE; + } - if( has_tool_tip ) - { - // Just use a slop area around the cursor - // Convert rect local to screen coordinates - S32 SLOP = 8; - localPointToScreen( - x - SLOP, y - SLOP, - &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); - sticky_rect_screen->mRight = sticky_rect_screen->mLeft + 2 * SLOP; - sticky_rect_screen->mTop = sticky_rect_screen->mBottom + 2 * SLOP; - } + LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y ); + if( cur_segment ) + { + BOOL has_tool_tip = FALSE; + has_tool_tip = cur_segment->getToolTip( msg ); + + if( has_tool_tip ) + { + // Just use a slop area around the cursor + // Convert rect local to screen coordinates + S32 SLOP = 8; + localPointToScreen( + x - SLOP, y - SLOP, + &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); + sticky_rect_screen->mRight = sticky_rect_screen->mLeft + 2 * SLOP; + sticky_rect_screen->mTop = sticky_rect_screen->mBottom + 2 * SLOP; } - return TRUE; } - return FALSE; + return TRUE; } BOOL LLTextEditor::handleScrollWheel(S32 x, S32 y, S32 clicks) @@ -1240,7 +1260,7 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) handled = TRUE; } - if (mTakesFocus) + if (hasTabStop()) { setFocus( TRUE ); handled = TRUE; @@ -1413,11 +1433,6 @@ BOOL LLTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) if( !handled && mTakesNonScrollClicks) { - if (mTakesFocus) - { - setFocus( TRUE ); - } - setCursorAtLocalPos( x, y, FALSE ); deselect(); @@ -1604,7 +1619,7 @@ void LLTextEditor::removeChar() // Add a single character to the text S32 LLTextEditor::addChar(S32 pos, llwchar wc) { - if ((S32)mWText.length() == mMaxTextLength) + if ( (wstring_utf8_length( mWText ) + wchar_utf8_length( wc )) >= mMaxTextByteLength) { make_ui_sound("UISndBadKeystroke"); return 0; @@ -2490,11 +2505,16 @@ void LLTextEditor::redo() } } +void LLTextEditor::onFocusReceived() +{ + LLUICtrl::onFocusReceived(); + updateAllowingLanguageInput(); +} // virtual, from LLView void LLTextEditor::onFocusLost() { - getWindow()->allowLanguageTextInput(FALSE); + updateAllowingLanguageInput(); // Route menu back to the default if( gEditMenuHandler == this ) @@ -2521,6 +2541,7 @@ void LLTextEditor::setEnabled(BOOL enabled) { mReadOnly = read_only; updateSegments(); + updateAllowingLanguageInput(); } } @@ -2825,6 +2846,100 @@ void LLTextEditor::drawCursor() } } +void LLTextEditor::drawPreeditMarker() +{ + if (!hasPreeditString()) + { + return; + } + + const llwchar *text = mWText.c_str(); + const S32 text_len = getLength(); + const S32 num_lines = getLineCount(); + + S32 cur_line = mScrollbar->getDocPos(); + if (cur_line >= num_lines) + { + return; + } + + const S32 line_height = llround( mGLFont->getLineHeight() ); + + S32 line_start = getLineStart(cur_line); + S32 line_y = mTextRect.mTop - line_height; + while((mTextRect.mBottom <= line_y) && (num_lines > cur_line)) + { + S32 next_start = -1; + S32 line_end = text_len; + + if ((cur_line + 1) < num_lines) + { + next_start = getLineStart(cur_line + 1); + line_end = next_start; + } + if ( text[line_end-1] == '\n' ) + { + --line_end; + } + + // Does this line contain preedits? + if (line_start >= mPreeditPositions.back()) + { + // We have passed the preedits. + break; + } + if (line_end > mPreeditPositions.front()) + { + for (U32 i = 0; i < mPreeditStandouts.size(); i++) + { + S32 left = mPreeditPositions[i]; + S32 right = mPreeditPositions[i + 1]; + if (right <= line_start || left >= line_end) + { + continue; + } + + S32 preedit_left = mTextRect.mLeft; + if (left > line_start) + { + preedit_left += mGLFont->getWidth(text, line_start, left - line_start, mAllowEmbeddedItems); + } + S32 preedit_right = mTextRect.mLeft; + if (right < line_end) + { + preedit_right += mGLFont->getWidth(text, line_start, right - line_start, mAllowEmbeddedItems); + } + else + { + preedit_right += mGLFont->getWidth(text, line_start, line_end - line_start, mAllowEmbeddedItems); + } + + if (mPreeditStandouts[i]) + { + gl_rect_2d(preedit_left + PREEDIT_STANDOUT_GAP, + line_y + PREEDIT_STANDOUT_POSITION, + preedit_right - PREEDIT_STANDOUT_GAP - 1, + line_y + PREEDIT_STANDOUT_POSITION - PREEDIT_STANDOUT_THICKNESS, + (mCursorColor * PREEDIT_STANDOUT_BRIGHTNESS + mWriteableBgColor * (1 - PREEDIT_STANDOUT_BRIGHTNESS)).setAlpha(1.0f)); + } + else + { + gl_rect_2d(preedit_left + PREEDIT_MARKER_GAP, + line_y + PREEDIT_MARKER_POSITION, + preedit_right - PREEDIT_MARKER_GAP - 1, + line_y + PREEDIT_MARKER_POSITION - PREEDIT_MARKER_THICKNESS, + (mCursorColor * PREEDIT_MARKER_BRIGHTNESS + mWriteableBgColor * (1 - PREEDIT_MARKER_BRIGHTNESS)).setAlpha(1.0f)); + } + } + } + + // move down one line + line_y -= line_height; + line_start = next_start; + cur_line++; + } +} + void LLTextEditor::drawText() { @@ -3025,6 +3140,7 @@ void LLTextEditor::draw() drawBackground(); drawSelectionBackground(); + drawPreeditMarker(); drawText(); drawCursor(); @@ -3036,6 +3152,9 @@ void LLTextEditor::draw() } LLView::draw(); // Draw children (scrollbar and border) } + + // remember if we are supposed to be at the bottom of the buffer + mScrolledToBottom = isScrolledToBottom(); } void LLTextEditor::reportBadKeystroke() @@ -3067,10 +3186,10 @@ 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. + // Notify early if we are losing focus. if (!new_state) { - getWindow()->allowLanguageTextInput(FALSE); + getWindow()->allowLanguageTextInput(this, FALSE); } LLUICtrl::setFocus( new_state ); @@ -3093,12 +3212,6 @@ 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 @@ -3210,6 +3323,17 @@ void LLTextEditor::changeLine( S32 delta ) unbindEmbeddedChars( mGLFont ); } +BOOL LLTextEditor::isScrolledToTop() +{ + return mScrollbar->isAtBeginning(); +} + +BOOL LLTextEditor::isScrolledToBottom() +{ + return mScrollbar->isAtEnd(); +} + + void LLTextEditor::startOfLine() { S32 line, offset; @@ -3330,6 +3454,13 @@ void LLTextEditor::reshape(S32 width, S32 height, BOOL called_from_parent) { LLView::reshape( width, height, called_from_parent ); + // if scrolled to bottom, stay at bottom + // unless user is editing text + if (mScrolledToBottom && mTrackBottom && !hasFocus()) + { + endOfDoc(); + } + updateTextRect(); S32 line_height = llround( mGLFont->getLineHeight() ); @@ -3540,22 +3671,20 @@ void LLTextEditor::removeTextFromEnd(S32 num_chars) S32 LLTextEditor::insertStringNoUndo(const S32 pos, const LLWString &wstr) { - S32 len = mWText.length(); - S32 s_len = wstr.length(); - S32 new_len = len + s_len; - if( new_len > mMaxTextLength ) - { - new_len = mMaxTextLength; + S32 old_len = mWText.length(); // length() returns character length + S32 insert_len = wstr.length(); + + mWText.insert(pos, wstr); + mTextIsUpToDate = FALSE; + if ( truncate() ) + { // The user's not getting everything he's hoping for make_ui_sound("UISndBadKeystroke"); + insert_len = mWText.length() - old_len; } - mWText.insert(pos, wstr); - mTextIsUpToDate = FALSE; - truncate(); - - return new_len - len; + return insert_len; } S32 LLTextEditor::removeStringNoUndo(S32 pos, S32 length) @@ -3671,7 +3800,7 @@ void LLTextEditor::loadKeywords(const LLString& filename, mKeywords.addToken(LLKeywordToken::WORD, name.c_str(), color, tooltips.get(i) ); } - mKeywords.findSegments( &mSegments, mWText ); + mKeywords.findSegments( &mSegments, mWText, mDefaultColor ); llassert( mSegments.front()->getStart() == 0 ); llassert( mSegments.back()->getEnd() == getLength() ); @@ -3683,7 +3812,7 @@ void LLTextEditor::updateSegments() if (mKeywords.isLoaded()) { // HACK: No non-ascii keywords for now - mKeywords.findSegments(&mSegments, mWText); + mKeywords.findSegments(&mSegments, mWText, mDefaultColor); } else if (mAllowEmbeddedItems) { @@ -3920,7 +4049,7 @@ BOOL LLTextEditor::importBuffer(const LLString& buffer ) return FALSE; } - if( text_len > mMaxTextLength ) + if( text_len > mMaxTextByteLength ) { llwarns << "Invalid Linden text length: " << text_len << llendl; return FALSE; @@ -4064,6 +4193,7 @@ LLXMLNodePtr LLTextEditor::getXML(bool save_children) const addColorXML(node, mCursorColor, "cursor_color", "TextCursorColor"); addColorXML(node, mFgColor, "text_color", "TextFgColor"); + addColorXML(node, mDefaultColor, "text_default_color", "TextDefaultColor"); addColorXML(node, mReadOnlyFgColor, "text_readonly_color", "TextFgReadOnlyColor"); addColorXML(node, mReadOnlyBgColor, "bg_readonly_color", "TextBgReadOnlyColor"); addColorXML(node, mWriteableBgColor, "bg_writeable_color", "TextBgWriteableColor"); @@ -4118,6 +4248,8 @@ void LLTextEditor::setTextEditorParameters(LLXMLNodePtr node) node->getAttributeBOOL("word_wrap", word_wrap); setWordWrap(word_wrap); + node->getAttributeBOOL("track_bottom", mTrackBottom); + LLColor4 color; if (LLUICtrlFactory::getAttributeColor(node,"cursor_color", color)) { @@ -4281,3 +4413,262 @@ BOOL LLTextEditor::findHTML(const LLString &line, S32 *begin, S32 *end) } return matched; } + + + +void LLTextEditor::updateAllowingLanguageInput() +{ + if (hasFocus() && !mReadOnly) + { + getWindow()->allowLanguageTextInput(this, TRUE); + } + else + { + getWindow()->allowLanguageTextInput(this, FALSE); + } +} + +// Preedit is managed off the undo/redo command stack. + +BOOL LLTextEditor::hasPreeditString() const +{ + return (mPreeditPositions.size() > 1); +} + +void LLTextEditor::resetPreedit() +{ + if (hasPreeditString()) + { + mCursorPos = mPreeditPositions.front(); + removeStringNoUndo(mCursorPos, mPreeditPositions.back() - mCursorPos); + insertStringNoUndo(mCursorPos, mPreeditOverwrittenWString); + + mPreeditWString.clear(); + mPreeditOverwrittenWString.clear(); + mPreeditPositions.clear(); + + updateLineStartList(); + setCursorPos(mCursorPos); + // updateScrollFromCursor(); + } +} + +void LLTextEditor::updatePreedit(const LLWString &preedit_string, + const segment_lengths_t &preedit_segment_lengths, const standouts_t &preedit_standouts, S32 caret_position) +{ + // Just in case. + if (mReadOnly) + { + return; + } + + if (hasSelection()) + { + if (hasPreeditString()) + { + llwarns << "Preedit and selection!" << llendl; + deselect(); + } + else + { + deleteSelection(TRUE); + } + } + + getWindow()->hideCursorUntilMouseMove(); + + S32 insert_preedit_at = mCursorPos; + if (hasPreeditString()) + { + insert_preedit_at = mPreeditPositions.front(); + removeStringNoUndo(insert_preedit_at, mPreeditPositions.back() - insert_preedit_at); + insertStringNoUndo(insert_preedit_at, mPreeditOverwrittenWString); + } + + mPreeditWString = preedit_string; + mPreeditPositions.resize(preedit_segment_lengths.size() + 1); + S32 position = insert_preedit_at; + for (segment_lengths_t::size_type i = 0; i < preedit_segment_lengths.size(); i++) + { + mPreeditPositions[i] = position; + position += preedit_segment_lengths[i]; + } + mPreeditPositions.back() = position; + + if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) + { + mPreeditOverwrittenWString = getWSubString(insert_preedit_at, mPreeditWString.length()); + removeStringNoUndo(insert_preedit_at, mPreeditWString.length()); + } + else + { + mPreeditOverwrittenWString.clear(); + } + insertStringNoUndo(insert_preedit_at, mPreeditWString); + + mPreeditStandouts = preedit_standouts; + + updateLineStartList(); + setCursorPos(insert_preedit_at + caret_position); + // updateScrollFromCursor(); + + // Update of the preedit should be caused by some key strokes. + mKeystrokeTimer.reset(); +} + +BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const +{ + if (control) + { + LLRect control_rect_screen; + localRectToScreen(mTextRect, &control_rect_screen); + LLUI::screenRectToGL(control_rect_screen, control); + } + + S32 preedit_left_position, preedit_right_position; + if (hasPreeditString()) + { + preedit_left_position = mPreeditPositions.front(); + preedit_right_position = mPreeditPositions.back(); + } + else + { + preedit_left_position = preedit_right_position = mCursorPos; + } + + const S32 query = (query_offset >= 0 ? preedit_left_position + query_offset : mCursorPos); + if (query < preedit_left_position || query > preedit_right_position) + { + return FALSE; + } + + const S32 first_visible_line = mScrollbar->getDocPos(); + if (query < getLineStart(first_visible_line)) + { + return FALSE; + } + + S32 current_line = first_visible_line; + S32 current_line_start, current_line_end; + for (;;) + { + current_line_start = getLineStart(current_line); + current_line_end = getLineStart(current_line + 1); + if (query >= current_line_start && query < current_line_end) + { + break; + } + if (current_line_start == current_line_end) + { + // We have reached on the last line. The query position must be here. + break; + } + current_line++; + } + + const llwchar * const text = mWText.c_str(); + const S32 line_height = llround(mGLFont->getLineHeight()); + + if (coord) + { + const S32 query_x = mTextRect.mLeft + mGLFont->getWidth(text, current_line_start, query - current_line_start, mAllowEmbeddedItems); + const S32 query_y = mTextRect.mTop - (current_line - first_visible_line) * line_height - line_height / 2; + S32 query_screen_x, query_screen_y; + localPointToScreen(query_x, query_y, &query_screen_x, &query_screen_y); + LLUI::screenPointToGL(query_screen_x, query_screen_y, &coord->mX, &coord->mY); + } + + if (bounds) + { + S32 preedit_left = mTextRect.mLeft; + if (preedit_left_position > current_line_start) + { + preedit_left += mGLFont->getWidth(text, current_line_start, preedit_left_position - current_line_start, mAllowEmbeddedItems); + } + + S32 preedit_right = mTextRect.mLeft; + if (preedit_right_position < current_line_end) + { + preedit_right += mGLFont->getWidth(text, current_line_start, preedit_right_position - current_line_start, mAllowEmbeddedItems); + } + else + { + preedit_right += mGLFont->getWidth(text, current_line_start, current_line_end - current_line_start, mAllowEmbeddedItems); + } + + const S32 preedit_top = mTextRect.mTop - (current_line - first_visible_line) * line_height; + const S32 preedit_bottom = preedit_top - line_height; + + const LLRect preedit_rect_local(preedit_left, preedit_top, preedit_right, preedit_bottom); + LLRect preedit_rect_screen; + localRectToScreen(preedit_rect_local, &preedit_rect_screen); + LLUI::screenRectToGL(preedit_rect_screen, bounds); + } + + return TRUE; +} + +void LLTextEditor::getSelectionRange(S32 *position, S32 *length) const +{ + if (hasSelection()) + { + *position = llmin(mSelectionStart, mSelectionEnd); + *length = llabs(mSelectionStart - mSelectionEnd); + } + else + { + *position = mCursorPos; + *length = 0; + } +} + +void LLTextEditor::getPreeditRange(S32 *position, S32 *length) const +{ + if (hasPreeditString()) + { + *position = mPreeditPositions.front(); + *length = mPreeditPositions.back() - mPreeditPositions.front(); + } + else + { + *position = mCursorPos; + *length = 0; + } +} + +void LLTextEditor::markAsPreedit(S32 position, S32 length) +{ + deselect(); + setCursorPos(position); + if (hasPreeditString()) + { + llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl; + } + mPreeditWString = LLWString( mWText, position, length ); + if (length > 0) + { + mPreeditPositions.resize(2); + mPreeditPositions[0] = position; + mPreeditPositions[1] = position + length; + mPreeditStandouts.resize(1); + mPreeditStandouts[0] = FALSE; + } + else + { + mPreeditPositions.clear(); + mPreeditStandouts.clear(); + } + if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) + { + mPreeditOverwrittenWString = mPreeditWString; + } + else + { + mPreeditOverwrittenWString.clear(); + } +} + +S32 LLTextEditor::getPreeditFontSize() const +{ + return llround(mGLFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]); +} diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index 33ec1c6..4c92297 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -43,6 +43,8 @@ #include "lleditmenuhandler.h" #include "lldarray.h" +#include "llpreeditor.h" + class LLFontGL; class LLScrollbar; class LLViewBorder; @@ -64,7 +66,7 @@ const S32 MAX_EMBEDDED_ITEMS = LAST_EMBEDDED_CHAR - FIRST_EMBEDDED_CHAR + 1; class LLTextSegment; class LLTextCmd; -class LLTextEditor : public LLUICtrl, LLEditMenuHandler +class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor { friend class LLTextCmd; public: @@ -104,6 +106,7 @@ public: // view overrides virtual void reshape(S32 width, S32 height, BOOL called_from_parent); virtual void draw(); + virtual void onFocusReceived(); virtual void onFocusLost(); virtual void setEnabled(BOOL enabled); @@ -184,6 +187,7 @@ public: void setCursorColor(const LLColor4& c) { mCursorColor = c; } void setFgColor( const LLColor4& c ) { mFgColor = c; } + void setTextDefaultColor( const LLColor4& c ) { mDefaultColor = c; } void setReadOnlyFgColor( const LLColor4& c ) { mReadOnlyFgColor = c; } void setWriteableBgColor( const LLColor4& c ) { mWriteableBgColor = c; } void setReadOnlyBgColor( const LLColor4& c ) { mReadOnlyBgColor = c; } @@ -203,13 +207,13 @@ public: void setTabToNextField(BOOL b) { mTabToNextField = b; } void setCommitOnFocusLost(BOOL b) { mCommitOnFocusLost = b; } - // If takes focus, will take keyboard focus on click. - void setTakesFocus(BOOL b) { mTakesFocus = b; } - // Hack to handle Notecards virtual BOOL importBuffer(const LLString& buffer ); virtual BOOL exportBuffer(LLString& buffer ); + // If takes focus, will take keyboard focus on click. + void setTakesFocus(BOOL b) { mTakesFocus = b; } + void setSourceID(const LLUUID& id) { mSourceID = id; } void setAcceptCallingCardNames(BOOL enable) { mAcceptCallingCardNames = enable; } @@ -234,13 +238,17 @@ public: void setText(const LLStringExplicit &utf8str); void setWText(const LLWString &wtext); - S32 getMaxLength() const { return mMaxTextLength; } + // Returns byte length limit + S32 getMaxLength() const { return mMaxTextByteLength; } // Change cursor void startOfLine(); void endOfLine(); void endOfDoc(); - + + BOOL isScrolledToTop(); + BOOL isScrolledToBottom(); + // Getters const LLWString& getWText() const; llwchar getWChar(S32 pos); @@ -259,6 +267,7 @@ protected: void drawCursor(); void drawText(); void drawClippedSegment(const LLWString &wtext, S32 seg_start, S32 seg_end, F32 x, F32 y, S32 selection_left, S32 selection_right, const LLStyle& color, F32* right_x); + void drawPreeditMarker(); void updateLineStartList(S32 startpos = 0); void updateScrollFromCursor(); @@ -267,7 +276,7 @@ protected: void pruneSegments(); void assignEmbedded(const LLString &s); - void truncate(); + BOOL truncate(); // Returns true if truncation occurs static BOOL isPartOfWord(llwchar c); @@ -291,7 +300,7 @@ protected: BOOL handleControlKey(const KEY key, const MASK mask); BOOL handleEditKey(const KEY key, const MASK mask); - BOOL hasSelection() { return (mSelectionStart !=mSelectionEnd); } + BOOL hasSelection() const { return (mSelectionStart !=mSelectionEnd); } BOOL selectionContainsLineBreaks(); void startSelection(); void endSelection(); @@ -300,8 +309,8 @@ protected: S32 prevWordPos(S32 cursorPos) const; S32 nextWordPos(S32 cursorPos) const; - S32 getLineCount(); - S32 getLineStart( S32 line ); + S32 getLineCount() const; + S32 getLineStart( S32 line ) const; void getLineAndOffset(S32 pos, S32* linep, S32* offsetp); S32 getPos(S32 line, S32 offset); @@ -338,6 +347,20 @@ protected: S32 removeStringNoUndo(S32 pos, S32 length); S32 overwriteCharNoUndo(S32 pos, llwchar wc); +protected: + void updateAllowingLanguageInput(); + BOOL hasPreeditString() const; + + // Overrides LLPreeditor + virtual void resetPreedit(); + virtual void updatePreedit(const LLWString &preedit_string, + const segment_lengths_t &preedit_segment_lengths, const standouts_t &preedit_standouts, S32 caret_position); + virtual void markAsPreedit(S32 position, S32 length); + virtual void getPreeditRange(S32 *position, S32 *length) const; + virtual void getSelectionRange(S32 *position, S32 *length) const; + virtual BOOL getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const; + virtual S32 getPreeditFontSize() const; + public: LLKeywords mKeywords; static LLColor4 mLinkColor; @@ -349,7 +372,7 @@ protected: mutable LLString mUTF8Text; mutable BOOL mTextIsUpToDate; - S32 mMaxTextLength; // Maximum length mText is allowed to be + S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes const LLFontGL* mGLFont; @@ -407,6 +430,7 @@ protected: LLColor4 mCursorColor; LLColor4 mFgColor; + LLColor4 mDefaultColor; LLColor4 mReadOnlyFgColor; LLColor4 mWriteableBgColor; LLColor4 mReadOnlyBgColor; @@ -420,6 +444,8 @@ protected: BOOL mTakesFocus; BOOL mHideScrollbarForShortDocs; BOOL mTakesNonScrollClicks; + BOOL mTrackBottom; // if true, keeps scroll position at bottom during resize + BOOL mScrolledToBottom; BOOL mAllowEmbeddedItems; @@ -439,6 +465,11 @@ protected: BOOL mParseHTML; LLString mHTML; + + LLWString mPreeditWString; + LLWString mPreeditOverwrittenWString; + std::vector mPreeditPositions; + std::vector mPreeditStandouts; }; class LLTextSegment diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index 96f293e..f6ce985 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -79,7 +79,7 @@ LLVector2 LLUI::sGLScaleFactor(1.f, 1.f); LLWindow* LLUI::sWindow = NULL; LLHtmlHelp* LLUI::sHtmlHelp = NULL; BOOL LLUI::sShowXUINames = FALSE; -std::stack LLUI::sClipRectStack; +std::stack LLScreenClipRect::sClipRectStack; // // Functions @@ -410,39 +410,76 @@ void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max } -void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color ) +void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect ) { - gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), 0.f, image, color ); + if (NULL == image) + { + llwarns << "image == NULL; aborting function" << llendl; + return; + } + gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), 0.f, image, color, uv_rect ); } -void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color) +void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect) { - gl_draw_scaled_rotated_image( x, y, width, height, 0.f, image, color ); + if (NULL == image) + { + llwarns << "image == NULL; aborting function" << llendl; + return; + } + gl_draw_scaled_rotated_image( x, y, width, height, 0.f, image, color, uv_rect ); } -void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLImageGL* image, const LLColor4& color, BOOL solid_color) +void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLImageGL* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect) { - stop_glerror(); - F32 border_scale = 1.f; - if (NULL == image) { llwarns << "image == NULL; aborting function" << llendl; return; } - if (border_height * 2 > height) - { - border_scale = (F32)height / ((F32)border_height * 2.f); - } - if (border_width * 2 > width) + // scale screen size of borders down + F32 border_width_fraction = (F32)border_width / (F32)image->getWidth(0); + F32 border_height_fraction = (F32)border_height / (F32)image->getHeight(0); + + LLRectf scale_rect(border_width_fraction, 1.f - border_height_fraction, 1.f - border_width_fraction, border_height_fraction); + gl_draw_scaled_image_with_border(x, y, width, height, image, color, solid_color, uv_rect, scale_rect); +} + +void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect, const LLRectf& scale_rect) +{ + stop_glerror(); + + if (NULL == image) { - border_scale = llmin(border_scale, (F32)width / ((F32)border_width * 2.f)); + llwarns << "image == NULL; aborting function" << llendl; + return; } // scale screen size of borders down - S32 scaled_border_width = llfloor(border_scale * (F32)border_width); - S32 scaled_border_height = llfloor(border_scale * (F32)border_height); + LLRectf clipped_scale_rect = uv_rect; + clipped_scale_rect.intersectWith(scale_rect); + + LLRect draw_rect(0, height, width, 0); + LLRect draw_scale_rect(llround((F32)image->getWidth() * scale_rect.mLeft), + llround((F32)image->getHeight() * scale_rect.mTop), + llround((F32)image->getWidth() * scale_rect.mRight), + llround((F32)image->getHeight() * scale_rect.mBottom)); + // scale fixed region of image up with drawn region + draw_scale_rect.mRight += width - image->getWidth(); + draw_scale_rect.mTop += height - image->getHeight(); + + S32 border_shrink_width = llmax(0, draw_scale_rect.mLeft - draw_scale_rect.mRight); + S32 border_shrink_height = llmax(0, draw_scale_rect.mBottom - draw_scale_rect.mTop); + + F32 shrink_width_ratio = scale_rect.getWidth() == 1.f ? 0.f : border_shrink_width / ((F32)image->getWidth() * (1.f - scale_rect.getWidth())); + F32 shrink_height_ratio = scale_rect.getHeight() == 1.f ? 0.f : border_shrink_height / ((F32)image->getHeight() * (1.f - scale_rect.getHeight())); + + F32 shrink_scale = 1.f - llmax(shrink_width_ratio, shrink_height_ratio); + draw_scale_rect.mLeft = llround((F32)draw_scale_rect.mLeft * shrink_scale); + draw_scale_rect.mTop = llround(lerp((F32)height, (F32)draw_scale_rect.mTop, shrink_scale)); + draw_scale_rect.mRight = llround(lerp((F32)width, (F32)draw_scale_rect.mRight, shrink_scale)); + draw_scale_rect.mBottom = llround((F32)draw_scale_rect.mBottom * shrink_scale); LLGLSUIDefault gls_ui; @@ -470,127 +507,124 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border glColor4fv(color.mV); - F32 border_width_fraction = (F32)border_width / (F32)image->getWidth(0); - F32 border_height_fraction = (F32)border_height / (F32)image->getHeight(0); - glBegin(GL_QUADS); { // draw bottom left - glTexCoord2f(0.f, 0.f); + glTexCoord2d(uv_rect.mLeft, uv_rect.mBottom); glVertex2i(0, 0); - glTexCoord2f(border_width_fraction, 0.f); - glVertex2i(scaled_border_width, 0); + glTexCoord2f(clipped_scale_rect.mLeft, uv_rect.mBottom); + glVertex2i(draw_scale_rect.mLeft, 0); - glTexCoord2f(border_width_fraction, border_height_fraction); - glVertex2i(scaled_border_width, scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); - glTexCoord2f(0.f, border_height_fraction); - glVertex2i(0, scaled_border_height); + glTexCoord2d(uv_rect.mLeft, clipped_scale_rect.mBottom); + glVertex2i(0, draw_scale_rect.mBottom); // draw bottom middle - glTexCoord2f(border_width_fraction, 0.f); - glVertex2i(scaled_border_width, 0); + glTexCoord2f(clipped_scale_rect.mLeft, uv_rect.mBottom); + glVertex2i(draw_scale_rect.mLeft, 0); - glTexCoord2f(1.f - border_width_fraction, 0.f); - glVertex2i(width - scaled_border_width, 0); + glTexCoord2d(clipped_scale_rect.mRight, uv_rect.mBottom); + glVertex2i(draw_scale_rect.mRight, 0); - glTexCoord2f(1.f - border_width_fraction, border_height_fraction); - glVertex2i(width - scaled_border_width, scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); - glTexCoord2f(border_width_fraction, border_height_fraction); - glVertex2i(scaled_border_width, scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); // draw bottom right - glTexCoord2f(1.f - border_width_fraction, 0.f); - glVertex2i(width - scaled_border_width, 0); + glTexCoord2d(clipped_scale_rect.mRight, uv_rect.mBottom); + glVertex2i(draw_scale_rect.mRight, 0); - glTexCoord2f(1.f, 0.f); + glTexCoord2d(uv_rect.mRight, uv_rect.mBottom); glVertex2i(width, 0); - glTexCoord2f(1.f, border_height_fraction); - glVertex2i(width, scaled_border_height); + glTexCoord2d(uv_rect.mRight, clipped_scale_rect.mBottom); + glVertex2i(width, draw_scale_rect.mBottom); - glTexCoord2f(1.f - border_width_fraction, border_height_fraction); - glVertex2i(width - scaled_border_width, scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); // draw left - glTexCoord2f(0.f, border_height_fraction); - glVertex2i(0, scaled_border_height); + glTexCoord2d(uv_rect.mLeft, clipped_scale_rect.mBottom); + glVertex2i(0, draw_scale_rect.mBottom); - glTexCoord2f(border_width_fraction, border_height_fraction); - glVertex2i(scaled_border_width, scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); - glTexCoord2f(border_width_fraction, 1.f - border_height_fraction); - glVertex2i(scaled_border_width, height - scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); - glTexCoord2f(0.f, 1.f - border_height_fraction); - glVertex2i(0, height - scaled_border_height); + glTexCoord2d(uv_rect.mLeft, clipped_scale_rect.mTop); + glVertex2i(0, draw_scale_rect.mTop); // draw middle - glTexCoord2f(border_width_fraction, border_height_fraction); - glVertex2i(scaled_border_width, scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); - glTexCoord2f(1.f - border_width_fraction, border_height_fraction); - glVertex2i(width - scaled_border_width, scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); - glTexCoord2f(1.f - border_width_fraction, 1.f - border_height_fraction); - glVertex2i(width - scaled_border_width, height - scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); - glTexCoord2f(border_width_fraction, 1.f - border_height_fraction); - glVertex2i(scaled_border_width, height - scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); // draw right - glTexCoord2f(1.f - border_width_fraction, border_height_fraction); - glVertex2i(width - scaled_border_width, scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); - glTexCoord2f(1.f, border_height_fraction); - glVertex2i(width, scaled_border_height); + glTexCoord2d(uv_rect.mRight, clipped_scale_rect.mBottom); + glVertex2i(width, draw_scale_rect.mBottom); - glTexCoord2f(1.f, 1.f - border_height_fraction); - glVertex2i(width, height - scaled_border_height); + glTexCoord2d(uv_rect.mRight, clipped_scale_rect.mTop); + glVertex2i(width, draw_scale_rect.mTop); - glTexCoord2f(1.f - border_width_fraction, 1.f - border_height_fraction); - glVertex2i(width - scaled_border_width, height - scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); // draw top left - glTexCoord2f(0.f, 1.f - border_height_fraction); - glVertex2i(0, height - scaled_border_height); + glTexCoord2d(uv_rect.mLeft, clipped_scale_rect.mTop); + glVertex2i(0, draw_scale_rect.mTop); - glTexCoord2f(border_width_fraction, 1.f - border_height_fraction); - glVertex2i(scaled_border_width, height - scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); - glTexCoord2f(border_width_fraction, 1.f); - glVertex2i(scaled_border_width, height); + glTexCoord2f(clipped_scale_rect.mLeft, uv_rect.mTop); + glVertex2i(draw_scale_rect.mLeft, height); - glTexCoord2f(0.f, 1.f); + glTexCoord2d(uv_rect.mLeft, uv_rect.mTop); glVertex2i(0, height); // draw top middle - glTexCoord2f(border_width_fraction, 1.f - border_height_fraction); - glVertex2i(scaled_border_width, height - scaled_border_height); + glTexCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); - glTexCoord2f(1.f - border_width_fraction, 1.f - border_height_fraction); - glVertex2i(width - scaled_border_width, height - scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); - glTexCoord2f(1.f - border_width_fraction, 1.f); - glVertex2i(width - scaled_border_width, height); + glTexCoord2d(clipped_scale_rect.mRight, uv_rect.mTop); + glVertex2i(draw_scale_rect.mRight, height); - glTexCoord2f(border_width_fraction, 1.f); - glVertex2i(scaled_border_width, height); + glTexCoord2f(clipped_scale_rect.mLeft, uv_rect.mTop); + glVertex2i(draw_scale_rect.mLeft, height); // draw top right - glTexCoord2f(1.f - border_width_fraction, 1.f - border_height_fraction); - glVertex2i(width - scaled_border_width, height - scaled_border_height); + glTexCoord2d(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + glVertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); - glTexCoord2f(1.f, 1.f - border_height_fraction); - glVertex2i(width, height - scaled_border_height); + glTexCoord2d(uv_rect.mRight, clipped_scale_rect.mTop); + glVertex2i(width, draw_scale_rect.mTop); - glTexCoord2f(1.f, 1.f); + glTexCoord2d(uv_rect.mRight, uv_rect.mTop); glVertex2i(width, height); - glTexCoord2f(1.f - border_width_fraction, 1.f); - glVertex2i(width - scaled_border_width, height); + glTexCoord2d(clipped_scale_rect.mRight, uv_rect.mTop); + glVertex2i(draw_scale_rect.mRight, height); } glEnd(); } @@ -602,12 +636,12 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border } } -void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color) +void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect) { - gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), degrees, image, color ); + gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), degrees, image, color, uv_rect ); } -void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color) +void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect) { if (NULL == image) { @@ -635,16 +669,16 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre glBegin(GL_QUADS); { - glTexCoord2f(1.f, 1.f); + glTexCoord2f(uv_rect.mRight, uv_rect.mTop); glVertex2i(width, height ); - glTexCoord2f(0.f, 1.f); + glTexCoord2f(uv_rect.mLeft, uv_rect.mTop); glVertex2i(0, height ); - glTexCoord2f(0.f, 0.f); + glTexCoord2f(uv_rect.mLeft, uv_rect.mBottom); glVertex2i(0, 0); - glTexCoord2f(1.f, 0.f); + glTexCoord2f(uv_rect.mRight, uv_rect.mBottom); glVertex2i(width, 0); } glEnd(); @@ -653,7 +687,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre } -void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color) +void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect) { if (NULL == image) { @@ -673,16 +707,16 @@ void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageG glBegin(GL_QUADS); { - glTexCoord2f(1.f, 0.f); + glTexCoord2f(uv_rect.mRight, uv_rect.mBottom); glVertex2i(width, height ); - glTexCoord2f(0.f, 0.f); + glTexCoord2f(uv_rect.mLeft, uv_rect.mBottom); glVertex2i(0, height ); - glTexCoord2f(0.f, 1.f); + glTexCoord2f(uv_rect.mLeft, uv_rect.mTop); glVertex2i(0, 0); - glTexCoord2f(1.f, 1.f); + glTexCoord2f(uv_rect.mRight, uv_rect.mTop); glVertex2i(width, 0); } glEnd(); @@ -1584,40 +1618,6 @@ void LLUI::loadIdentity() LLFontGL::sCurOrigin.mZ = 0; } -//static -void LLUI::setScissorRegionScreen(const LLRect& rect) -{ - stop_glerror(); - S32 x,y,w,h; - x = llround(rect.mLeft * LLUI::sGLScaleFactor.mV[VX]); - y = llround(rect.mBottom * LLUI::sGLScaleFactor.mV[VY]); - w = llround(rect.getWidth() * LLUI::sGLScaleFactor.mV[VX]); - h = llround(rect.getHeight() * LLUI::sGLScaleFactor.mV[VY]); - glScissor( x,y,w,h ); - stop_glerror(); -} - -//static -void LLUI::setScissorRegionLocal(const LLRect& rect) -{ - stop_glerror(); - S32 screen_left = LLFontGL::sCurOrigin.mX + rect.mLeft; - S32 screen_bottom = LLFontGL::sCurOrigin.mY + rect.mBottom; - - S32 x,y,w,h; - - x = llround((F32)screen_left * LLUI::sGLScaleFactor.mV[VX]); - y = llround((F32)screen_bottom * LLUI::sGLScaleFactor.mV[VY]); - w = llround((F32)rect.getWidth() * LLUI::sGLScaleFactor.mV[VX]); - h = llround((F32)rect.getHeight() * LLUI::sGLScaleFactor.mV[VY]); - - w = llmax(0,w); - h = llmax(0,h); - - glScissor(x,y,w,h); - stop_glerror(); -} - //static void LLUI::setScaleFactor(const LLVector2 &scale_factor) { @@ -1696,6 +1696,34 @@ LLVector2 LLUI::getWindowSize() } //static +void LLUI::screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y) +{ + *gl_x = llround((F32)screen_x * sGLScaleFactor.mV[VX]); + *gl_y = llround((F32)screen_y * sGLScaleFactor.mV[VY]); +} + +//static +void LLUI::glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y) +{ + *screen_x = llround((F32)gl_x / sGLScaleFactor.mV[VX]); + *screen_y = llround((F32)gl_y / sGLScaleFactor.mV[VY]); +} + +//static +void LLUI::screenRectToGL(const LLRect& screen, LLRect *gl) +{ + screenPointToGL(screen.mLeft, screen.mTop, &gl->mLeft, &gl->mTop); + screenPointToGL(screen.mRight, screen.mBottom, &gl->mRight, &gl->mBottom); +} + +//static +void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen) +{ + glPointToScreen(gl.mLeft, gl.mTop, &screen->mLeft, &screen->mTop); + glPointToScreen(gl.mRight, gl.mBottom, &screen->mRight, &screen->mBottom); +} + +//static LLUUID LLUI::findAssetUUIDByName(const LLString &asset_name) { if(asset_name == LLString::null) return LLUUID::null; @@ -1710,64 +1738,169 @@ LLUUID LLUI::findAssetUUIDByName(const LLString &asset_name) return LLUUID( foundValue ); } +//static +LLUIImage* LLUI::getUIImageByName(const LLString& name) +{ + return sImageProvider->getUIImageByID(findAssetUUIDByName(name)); +} + + // static void LLUI::setHtmlHelp(LLHtmlHelp* html_help) { LLUI::sHtmlHelp = html_help; } +LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST), mEnabled(enabled) +{ + if (mEnabled) + { + pushClipRect(rect); + } + mScissorState.setEnabled(!sClipRectStack.empty()); + updateScissorRegion(); +} + +LLScreenClipRect::~LLScreenClipRect() +{ + if (mEnabled) + { + popClipRect(); + } + updateScissorRegion(); +} + //static -void LLUI::pushClipRect(const LLRect& rect) +void LLScreenClipRect::pushClipRect(const LLRect& rect) { LLRect combined_clip_rect = rect; if (!sClipRectStack.empty()) { - combined_clip_rect.intersectWith(sClipRectStack.top()); + LLRect top = sClipRectStack.top(); + combined_clip_rect.intersectWith(top); } sClipRectStack.push(combined_clip_rect); - setScissorRegionScreen(combined_clip_rect); } //static -void LLUI::popClipRect() +void LLScreenClipRect::popClipRect() { sClipRectStack.pop(); - if (!sClipRectStack.empty()) - { - setScissorRegionScreen(sClipRectStack.top()); - } } -LLClipRect::LLClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST, enabled), mEnabled(enabled) +//static +void LLScreenClipRect::updateScissorRegion() { - if (mEnabled) - { - LLUI::pushClipRect(rect); - } + if (sClipRectStack.empty()) return; + + LLRect rect = sClipRectStack.top(); + stop_glerror(); + S32 x,y,w,h; + x = llfloor(rect.mLeft * LLUI::sGLScaleFactor.mV[VX]); + y = llfloor(rect.mBottom * LLUI::sGLScaleFactor.mV[VY]); + w = llmax(0, llceil(rect.getWidth() * LLUI::sGLScaleFactor.mV[VX])) + 1; + h = llmax(0, llceil(rect.getHeight() * LLUI::sGLScaleFactor.mV[VY])) + 1; + glScissor( x,y,w,h ); + stop_glerror(); } -LLClipRect::~LLClipRect() + +LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled) +: LLScreenClipRect(LLRect(rect.mLeft + LLFontGL::sCurOrigin.mX, + rect.mTop + LLFontGL::sCurOrigin.mY, + rect.mRight + LLFontGL::sCurOrigin.mX, + rect.mBottom + LLFontGL::sCurOrigin.mY), + enabled) { - if (mEnabled) - { - LLUI::popClipRect(); - } } -LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST, enabled), mEnabled(enabled) + +// +// LLUIImage +// + +LLUIImage::LLUIImage(LLPointer image) : + mImage(image), + mScaleRegion(0.f, 1.f, 1.f, 0.f), + mClipRegion(0.f, 1.f, 1.f, 0.f), + mUniformScaling(TRUE), + mNoClip(TRUE) { - if (mEnabled) - { - LLRect scissor_rect = rect; - scissor_rect.translate(LLFontGL::sCurOrigin.mX, LLFontGL::sCurOrigin.mY); - LLUI::pushClipRect(scissor_rect); - } } -LLLocalClipRect::~LLLocalClipRect() +void LLUIImage::setClipRegion(const LLRectf& region) +{ + mClipRegion = region; + mNoClip = mClipRegion.mLeft == 0.f + && mClipRegion.mRight == 1.f + && mClipRegion.mBottom == 0.f + && mClipRegion.mTop == 1.f; +} + +void LLUIImage::setScaleRegion(const LLRectf& region) +{ + mScaleRegion = region; + mUniformScaling = mScaleRegion.mLeft == 0.f + && mScaleRegion.mRight == 1.f + && mScaleRegion.mBottom == 0.f + && mScaleRegion.mTop == 1.f; +} + +//TODO: move drawing implementation inside class +void LLUIImage::draw(S32 x, S32 y, const LLColor4& color) { - if (mEnabled) + gl_draw_image(x, y, mImage, color, mClipRegion); +} + +void LLUIImage::draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) +{ + if (mUniformScaling) + { + gl_draw_scaled_image(x, y, width, height, mImage, color, mClipRegion); + } + else { - LLUI::popClipRect(); + gl_draw_scaled_image_with_border( + x, y, + width, height, + mImage, + color, + FALSE, + mClipRegion, + mScaleRegion); } } + +void LLUIImage::drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) +{ + gl_draw_scaled_image_with_border( + x, y, + width, height, + mImage, + color, + TRUE, + mClipRegion, + mScaleRegion); +} + +void LLUIImage::drawSolid(S32 x, S32 y, const LLColor4& color) +{ + gl_draw_scaled_image_with_border( + x, y, + getWidth(), getHeight(), + mImage, + color, + TRUE, + mClipRegion, + mScaleRegion); +} + +S32 LLUIImage::getWidth() +{ + return mImage->getWidth(0); +} + +S32 LLUIImage::getHeight() +{ + return mImage->getHeight(0); +} diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h index 2832b39..9d98620 100644 --- a/linden/indra/llui/llui.h +++ b/linden/indra/llui/llui.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -41,14 +41,15 @@ #include "llhtmlhelp.h" #include "llgl.h" #include +#include "llimagegl.h" class LLColor4; class LLVector3; class LLVector2; -class LLImageGL; class LLUUID; class LLWindow; class LLView; +class LLUIImage; // UI colors extern const LLColor4 UI_VERTEX_COLOR; @@ -83,13 +84,14 @@ void gl_washer_2d(F32 outer_radius, F32 inner_radius, S32 steps, const LLColor4& void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians, F32 end_radians, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color); void gl_washer_spokes_2d(F32 outer_radius, F32 inner_radius, S32 count, const LLColor4& inner_color, const LLColor4& outer_color); -void gl_draw_image(S32 x, S32 y, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR); -void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR); -void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR); -void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees,LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR); -void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLImageGL* image, const LLColor4 &color, BOOL solid_color = FALSE); +void gl_draw_image(S32 x, S32 y, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); +void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); +void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); +void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees,LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); +void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLImageGL* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); +void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); // Flip vertical, used for LLFloaterHTML -void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR); +void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); void gl_rect_2d_xor(S32 left, S32 top, S32 right, S32 bottom); void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color, F32 phase = 0.f ); @@ -166,20 +168,19 @@ public: //helper functions (should probably move free standing rendering helper functions here) static LLString locateSkin(const LLString& filename); - static void pushClipRect(const LLRect& rect); - static void popClipRect(); static void setCursorPositionScreen(S32 x, S32 y); static void setCursorPositionLocal(LLView* viewp, S32 x, S32 y); static void setScaleFactor(const LLVector2& scale_factor); static void setLineWidth(F32 width); static LLUUID findAssetUUIDByName(const LLString& name); + static LLUIImage* getUIImageByName(const LLString& name); static LLVector2 getWindowSize(); + static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y); + static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y); + static void screenRectToGL(const LLRect& screen, LLRect *gl); + static void glRectToScreen(const LLRect& gl, LLRect *screen); static void setHtmlHelp(LLHtmlHelp* html_help); -private: - static void setScissorRegionScreen(const LLRect& rect); - static void setScissorRegionLocal(const LLRect& rect); // works assuming LLUI::translate has been called - public: static LLControlGroup* sConfigGroup; static LLControlGroup* sColorsGroup; @@ -190,7 +191,6 @@ public: static LLWindow* sWindow; static BOOL sShowXUINames; static LLHtmlHelp* sHtmlHelp; - static std::stack sClipRectStack; }; @@ -282,6 +282,7 @@ typedef enum e_widget_type WIDGET_TYPE_MEMORY_VIEW, WIDGET_TYPE_FRAME_STAT_VIEW, WIDGET_TYPE_LAYOUT_STACK, + WIDGET_TYPE_FLYOUT_BUTTON, WIDGET_TYPE_DONTCARE, WIDGET_TYPE_COUNT } EWidgetType; @@ -378,24 +379,65 @@ protected: template T* LLUISingleton::sInstance = NULL; -class LLClipRect +class LLScreenClipRect { public: - LLClipRect(const LLRect& rect, BOOL enabled = TRUE); - virtual ~LLClipRect(); -protected: + LLScreenClipRect(const LLRect& rect, BOOL enabled = TRUE); + virtual ~LLScreenClipRect(); + +private: + static void pushClipRect(const LLRect& rect); + static void popClipRect(); + static void updateScissorRegion(); + +private: LLGLState mScissorState; BOOL mEnabled; + + static std::stack sClipRectStack; }; -class LLLocalClipRect +class LLLocalClipRect : public LLScreenClipRect { public: LLLocalClipRect(const LLRect& rect, BOOL enabled = TRUE); - virtual ~LLLocalClipRect(); +}; + +class LLUIImage : public LLRefCount +{ +public: + LLUIImage(LLPointer image); + + void setClipRegion(const LLRectf& region); + void setScaleRegion(const LLRectf& region); + + LLPointer getImage() { return mImage; } + + void draw(S32 x, S32 y, const LLColor4& color = UI_VERTEX_COLOR); + void draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color = UI_VERTEX_COLOR); + void drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color); + void drawSolid(S32 x, S32 y, const LLColor4& color); + + S32 getWidth(); + S32 getHeight(); + protected: - LLGLState mScissorState; - BOOL mEnabled; + LLRectf mScaleRegion; + LLRectf mClipRegion; + LLPointer mImage; + BOOL mUniformScaling; + BOOL mNoClip; +}; + +//RN: maybe this needs to moved elsewhere? +class LLImageProviderInterface +{ +public: + LLImageProviderInterface() {}; + virtual ~LLImageProviderInterface() {}; + + virtual LLUIImage* getUIImageByID(const LLUUID& id, BOOL clamped = TRUE) = 0; + virtual LLImageGL* getImageByID(const LLUUID& id, BOOL clamped = TRUE) = 0; }; #endif diff --git a/linden/indra/llui/llui_vc9.vcproj b/linden/indra/llui/llui_vc9.vcproj new file mode 100644 index 0000000..cfaaf66 --- /dev/null +++ b/linden/indra/llui/llui_vc9.vcproj @@ -0,0 +1,596 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llui/lluiconstants.h b/linden/indra/llui/lluiconstants.h index bd75d27..b3b9297 100644 --- a/linden/indra/llui/lluiconstants.h +++ b/linden/indra/llui/lluiconstants.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lluictrl.cpp b/linden/indra/llui/lluictrl.cpp index 61d6c8c..63db1cc 100644 --- a/linden/indra/llui/lluictrl.cpp +++ b/linden/indra/llui/lluictrl.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -47,11 +47,53 @@ const U32 MAX_STRING_LENGTH = 10; -LLUICtrl::LLUICtrl() : - mCommitCallback(NULL), - mFocusLostCallback(NULL), +LLFocusableElement::LLFocusableElement() +: mFocusLostCallback(NULL), mFocusReceivedCallback(NULL), mFocusChangedCallback(NULL), + mFocusCallbackUserData(NULL) +{ +} + +void LLFocusableElement::onFocusReceived() +{ + if( mFocusReceivedCallback ) + { + mFocusReceivedCallback( this, mFocusCallbackUserData ); + } + if( mFocusChangedCallback ) + { + mFocusChangedCallback( this, mFocusCallbackUserData ); + } +} + +void LLFocusableElement::onFocusLost() +{ + if( mFocusLostCallback ) + { + mFocusLostCallback( this, mFocusCallbackUserData ); + } + + if( mFocusChangedCallback ) + { + mFocusChangedCallback( this, mFocusCallbackUserData ); + } +} + +BOOL LLFocusableElement::hasFocus() const +{ + return FALSE; +} + +void LLFocusableElement::setFocus(BOOL b) +{ +} + + + +LLUICtrl::LLUICtrl() : + mCommitCallback(NULL), + mLostTopCallback(NULL), mValidateCallback(NULL), mCallbackUserData(NULL), mTentative(FALSE), @@ -68,9 +110,7 @@ LLUICtrl::LLUICtrl(const LLString& name, const LLRect& rect, BOOL mouse_opaque, // of buttons in the UI. JC 7/20/2002 LLView( name, rect, mouse_opaque, reshape ), mCommitCallback( on_commit_callback) , - mFocusLostCallback( NULL ), - mFocusReceivedCallback( NULL ), - mFocusChangedCallback( NULL ), + mLostTopCallback( NULL ), mValidateCallback( NULL ), mCallbackUserData( callback_userdata ), mTentative( FALSE ), @@ -128,6 +168,86 @@ LLCtrlScrollInterface* LLUICtrl::getScrollInterface() return NULL; } +BOOL LLUICtrl::hasFocus() const +{ + return (gFocusMgr.childHasKeyboardFocus(this)); +} + +void LLUICtrl::setFocus(BOOL b) +{ + // focus NEVER goes to ui ctrls that are disabled! + if (!mEnabled) + { + return; + } + if( b ) + { + if (!hasFocus()) + { + gFocusMgr.setKeyboardFocus( this ); + } + } + else + { + if( gFocusMgr.childHasKeyboardFocus(this)) + { + gFocusMgr.setKeyboardFocus( NULL ); + } + } +} + +void LLUICtrl::onFocusReceived() +{ + // trigger callbacks + LLFocusableElement::onFocusReceived(); + + // find first view in hierarchy above new focus that is a LLUICtrl + LLView* viewp = getParent(); + LLUICtrl* last_focus = gFocusMgr.getLastKeyboardFocus(); + + while (viewp && !viewp->isCtrl()) + { + viewp = viewp->getParent(); + } + + // and if it has newly gained focus, call onFocusReceived() + LLUICtrl* ctrlp = static_cast(viewp); + if (ctrlp && (!last_focus || !last_focus->hasAncestor(ctrlp))) + { + ctrlp->onFocusReceived(); + } +} + +void LLUICtrl::onFocusLost() +{ + // trigger callbacks + LLFocusableElement::onFocusLost(); + + // find first view in hierarchy above old focus that is a LLUICtrl + LLView* viewp = getParent(); + while (viewp && !viewp->isCtrl()) + { + viewp = viewp->getParent(); + } + + // and if it has just lost focus, call onFocusReceived() + LLUICtrl* ctrlp = static_cast(viewp); + // hasFocus() includes any descendants + if (ctrlp && !ctrlp->hasFocus()) + { + ctrlp->onFocusLost(); + } +} + +void LLUICtrl::onLostTop() +{ + if (mLostTopCallback) + { + mLostTopCallback(this, mCallbackUserData); + } +} + + // virtual void LLUICtrl::setTabStop( BOOL b ) { @@ -165,68 +285,26 @@ void LLUICtrl::setIsChrome(BOOL is_chrome) // virtual BOOL LLUICtrl::getIsChrome() const { - return mIsChrome; -} + // am I or any of my ancestors flagged as "chrome"? + if (mIsChrome) return TRUE; -void LLUICtrl::onFocusReceived() -{ - if( mFocusReceivedCallback ) - { - mFocusReceivedCallback( this, mCallbackUserData ); - } - if( mFocusChangedCallback ) + LLView* parent_ctrl = getParent(); + while(parent_ctrl) { - mFocusChangedCallback( this, mCallbackUserData ); - } -} - -void LLUICtrl::onFocusLost() -{ - if( mFocusLostCallback ) - { - mFocusLostCallback( this, mCallbackUserData ); - } - - if( mFocusChangedCallback ) - { - mFocusChangedCallback( this, mCallbackUserData ); - } -} - -BOOL LLUICtrl::hasFocus() const -{ - return (gFocusMgr.childHasKeyboardFocus(this)); -} - -void LLUICtrl::setFocus(BOOL b) -{ - // focus NEVER goes to ui ctrls that are disabled! - if (!mEnabled) - { - return; - } - if( b ) - { - if (!hasFocus()) + if(parent_ctrl->isCtrl()) { - gFocusMgr.setKeyboardFocus( this, &LLUICtrl::onFocusLostCallback ); - onFocusReceived(); + break; } + parent_ctrl = parent_ctrl->getParent(); } - else + + if(parent_ctrl) { - if( gFocusMgr.childHasKeyboardFocus(this)) - { - gFocusMgr.setKeyboardFocus( NULL, NULL ); - onFocusLost(); - } + // recurse into parent_ctrl and ask if it is in a chrome subtree + return ((LLUICtrl*)parent_ctrl)->getIsChrome(); } -} -// static -void LLUICtrl::onFocusLostCallback( LLUICtrl* old_focus ) -{ - old_focus->onFocusLost(); + return FALSE; } // this comparator uses the crazy disambiguating logic of LLCompareByTabOrder, @@ -262,6 +340,7 @@ public: } }; + BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields) { // try to select default tab group child diff --git a/linden/indra/llui/lluictrl.h b/linden/indra/llui/lluictrl.h index bf61f8b..55e804c 100644 --- a/linden/indra/llui/lluictrl.h +++ b/linden/indra/llui/lluictrl.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -53,8 +53,31 @@ class LLCtrlScrollInterface; typedef void (*LLUICtrlCallback)(LLUICtrl* ctrl, void* userdata); typedef BOOL (*LLUICtrlValidate)(LLUICtrl* ctrl, void* userdata); +class LLFocusableElement +{ + friend class LLFocusMgr; // allow access to focus change handlers +public: + LLFocusableElement(); + virtual ~LLFocusableElement() {}; + + virtual void setFocus( BOOL b ); + virtual BOOL hasFocus() const; + + void setFocusLostCallback(void (*cb)(LLFocusableElement* caller, void*), void* user_data = NULL) { mFocusLostCallback = cb; mFocusCallbackUserData = user_data; } + void setFocusReceivedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL) { mFocusReceivedCallback = cb; mFocusCallbackUserData = user_data; } + void setFocusChangedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL ) { mFocusChangedCallback = cb; mFocusCallbackUserData = user_data; } + +protected: + virtual void onFocusReceived(); + virtual void onFocusLost(); + void (*mFocusLostCallback)( LLFocusableElement* caller, void* userdata ); + void (*mFocusReceivedCallback)( LLFocusableElement* ctrl, void* userdata ); + void (*mFocusChangedCallback)( LLFocusableElement* ctrl, void* userdata ); + void* mFocusCallbackUserData; +}; + class LLUICtrl -: public LLView +: public LLView, public LLFocusableElement { public: LLUICtrl(); @@ -85,6 +108,11 @@ public: virtual void setFocus( BOOL b ); virtual BOOL hasFocus() const; + virtual void onFocusReceived(); + virtual void onFocusLost(); + + virtual void onLostTop(); // called when registered as top ctrl and user clicks elsewhere + virtual void setTabStop( BOOL b ); virtual BOOL hasTabStop() const; @@ -115,6 +143,7 @@ public: void setCommitCallback( void (*cb)(LLUICtrl*, void*) ) { mCommitCallback = cb; } void setValidateBeforeCommit( BOOL(*cb)(LLUICtrl*, void*) ) { mValidateCallback = cb; } + void setLostTopCallback( void (*cb)(LLUICtrl*, void*) ) { mLostTopCallback = cb; } // Defaults to no-op! virtual void setDoubleClickCallback( void (*cb)(void*) ); @@ -126,23 +155,8 @@ public: virtual void setMinValue(LLSD min_value); virtual void setMaxValue(LLSD max_value); - // In general, only LLPanel uses these. - void setFocusLostCallback(void (*cb)(LLUICtrl* caller, void* user_data)) { mFocusLostCallback = cb; } - void setFocusReceivedCallback( void (*cb)(LLUICtrl*, void*) ) { mFocusReceivedCallback = cb; } - void setFocusChangedCallback( void (*cb)(LLUICtrl*, void*) ) { mFocusChangedCallback = cb; } - - static void onFocusLostCallback(LLUICtrl* old_focus); - /*virtual*/ BOOL focusFirstItem(BOOL prefer_text_fields = FALSE ); - class LLTabStopPostFilter : public LLQueryFilter, public LLSingleton - { - /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const - { - return filterResult_t(view->isCtrl() && static_cast(view)->hasTabStop() && children.size() == 0, TRUE); - } - }; - class LLTextInputFilter : public LLQueryFilter, public LLSingleton { /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const @@ -157,16 +171,9 @@ public: virtual void resetDirty() {}; protected: - virtual void onFocusReceived(); - virtual void onFocusLost(); - void onChangeFocus( S32 direction ); - -protected: void (*mCommitCallback)( LLUICtrl* ctrl, void* userdata ); - void (*mFocusLostCallback)( LLUICtrl* caller, void* userdata ); - void (*mFocusReceivedCallback)( LLUICtrl* ctrl, void* userdata ); - void (*mFocusChangedCallback)( LLUICtrl* ctrl, void* userdata ); + void (*mLostTopCallback)( LLUICtrl* ctrl, void* userdata ); BOOL (*mValidateCallback)( LLUICtrl* ctrl, void* userdata ); void* mCallbackUserData; diff --git a/linden/indra/llui/lluictrlfactory.cpp b/linden/indra/llui/lluictrlfactory.cpp index 98228d5..a51d8e4 100644 --- a/linden/indra/llui/lluictrlfactory.cpp +++ b/linden/indra/llui/lluictrlfactory.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -173,7 +173,7 @@ std::vector LLUICtrlFactory::mXUIPaths; class LLUICtrlLocate : public LLUICtrl { public: - LLUICtrlLocate() : LLUICtrl("locate", LLRect(0,0,0,0), FALSE, NULL, NULL) {} + LLUICtrlLocate() : LLUICtrl("locate", LLRect(0,0,0,0), FALSE, NULL, NULL) { setTabStop(FALSE); } virtual void draw() { } virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_LOCATE; } @@ -181,7 +181,11 @@ public: static LLView *fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) { + LLString name("pad"); + node->getAttributeString("name", name); + LLUICtrlLocate *new_ctrl = new LLUICtrlLocate(); + new_ctrl->setName(name); new_ctrl->initFromXML(node, parent); return new_ctrl; } @@ -196,6 +200,7 @@ LLUICtrlFactory::LLUICtrlFactory() LLUICtrlCreator::registerCreator(LL_BUTTON_TAG, this); LLUICtrlCreator::registerCreator(LL_CHECK_BOX_CTRL_TAG, this); LLUICtrlCreator::registerCreator(LL_COMBO_BOX_TAG, this); + LLUICtrlCreator::registerCreator(LL_FLYOUT_BUTTON_TAG, this); LLUICtrlCreator::registerCreator(LL_LINE_EDITOR_TAG, this); LLUICtrlCreator::registerCreator(LL_SEARCH_EDITOR_TAG, this); LLUICtrlCreator::registerCreator(LL_SCROLL_LIST_CTRL_TAG, this); @@ -282,8 +287,11 @@ bool LLUICtrlFactory::getLayeredXMLNode(const LLString &filename, LLXMLNodePtr& if (!LLXMLNode::parseFile(mXUIPaths.front() + filename, root, NULL)) { - llwarns << "Problem reading UI description file: " << mXUIPaths.front() + filename << llendl; - return FALSE; + if (!LLXMLNode::parseFile(filename, root, NULL)) + { + llwarns << "Problem reading UI description file: " << mXUIPaths.front() + filename << llendl; + return FALSE; + } } LLXMLNodePtr updateRoot; diff --git a/linden/indra/llui/lluictrlfactory.h b/linden/indra/llui/lluictrlfactory.h index 22fac59..fbb8d96 100644 --- a/linden/indra/llui/lluictrlfactory.h +++ b/linden/indra/llui/lluictrlfactory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lluistring.cpp b/linden/indra/llui/lluistring.cpp index 36fba17..d3b5a52 100644 --- a/linden/indra/llui/lluistring.cpp +++ b/linden/indra/llui/lluistring.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lluistring.h b/linden/indra/llui/lluistring.h index e52f718..4e9bb55 100644 --- a/linden/indra/llui/lluistring.h +++ b/linden/indra/llui/lluistring.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/lluixmltags.h b/linden/indra/llui/lluixmltags.h index 84e571f..1afcb00 100644 --- a/linden/indra/llui/lluixmltags.h +++ b/linden/indra/llui/lluixmltags.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -120,4 +120,5 @@ #define LL_JOYSTICK_TURN LLString("joystick_turn") #define LL_GROUP_DROP_TARGET_TAG LLString("group_drop_target") #define LL_LAYOUT_STACK_TAG LLString("layout_stack") +#define LL_FLYOUT_BUTTON_TAG "flyout_button" #endif diff --git a/linden/indra/llui/llundo.cpp b/linden/indra/llui/llundo.cpp index 3580d31..a267ae2 100644 --- a/linden/indra/llui/llundo.cpp +++ b/linden/indra/llui/llundo.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llundo.h b/linden/indra/llui/llundo.h index b3e2457..2bf04bc 100644 --- a/linden/indra/llui/llundo.h +++ b/linden/indra/llui/llundo.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index e18dbb0..04d33a6 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -113,7 +113,7 @@ LLView::LLView() : mSaveToXML(TRUE), mIsFocusRoot(FALSE), mLastVisible(TRUE), - mSpanChildren(FALSE), + mUseBoundingRect(FALSE), mVisible(TRUE), mHidden(FALSE), mNextInsertionOrdinal(0) @@ -133,7 +133,7 @@ LLView::LLView(const LLString& name, BOOL mouse_opaque) : mSaveToXML(TRUE), mIsFocusRoot(FALSE), mLastVisible(TRUE), - mSpanChildren(FALSE), + mUseBoundingRect(FALSE), mVisible(TRUE), mHidden(FALSE), mNextInsertionOrdinal(0) @@ -148,6 +148,7 @@ LLView::LLView( mParentView(NULL), mName(name), mRect(rect), + mBoundingRect(rect), mReshapeFlags(reshape), mDefaultTabGroup(0), mEnabled(TRUE), @@ -156,7 +157,7 @@ LLView::LLView( mSaveToXML(TRUE), mIsFocusRoot(FALSE), mLastVisible(TRUE), - mSpanChildren(FALSE), + mUseBoundingRect(FALSE), mVisible(TRUE), mHidden(FALSE), mNextInsertionOrdinal(0) @@ -235,10 +236,16 @@ BOOL LLView::setToolTipArg(const LLStringExplicit& key, const LLStringExplicit& return TRUE; } +void LLView::setToolTipArgs( const LLString::format_map_t& args ) +{ + mToolTipMsg.setArgList(args); +} + // virtual void LLView::setRect(const LLRect& rect) { mRect = rect; + updateBoundingRect(); } @@ -287,9 +294,18 @@ void LLView::setName(LLString name) mName = name; } -void LLView::setSpanChildren( BOOL span_children ) +void LLView::setUseBoundingRect( BOOL use_bounding_rect ) +{ + if (mUseBoundingRect != use_bounding_rect) + { + mUseBoundingRect = use_bounding_rect; + updateBoundingRect(); + } +} + +BOOL LLView::getUseBoundingRect() { - mSpanChildren = span_children; updateRect(); + return mUseBoundingRect; } const LLString& LLView::getToolTip() @@ -306,7 +322,7 @@ const LLString& LLView::getName() const void LLView::sendChildToFront(LLView* child) { - if (child->mParentView == this) + if (child && child->getParent() == this) { mChildList.remove( child ); mChildList.push_front(child); @@ -315,7 +331,7 @@ void LLView::sendChildToFront(LLView* child) void LLView::sendChildToBack(LLView* child) { - if (child->mParentView == this) + if (child && child->getParent() == this) { mChildList.remove( child ); mChildList.push_back(child); @@ -330,6 +346,14 @@ void LLView::moveChildToFrontOfTabGroup(LLUICtrl* child) } } +void LLView::moveChildToBackOfTabGroup(LLUICtrl* child) +{ + if(mCtrlOrder.find(child) != mCtrlOrder.end()) + { + mCtrlOrder[child].second = mNextInsertionOrdinal++; + } +} + void LLView::addChild(LLView* child, S32 tab_group) { if (mParentView == child) @@ -353,7 +377,7 @@ void LLView::addChild(LLView* child, S32 tab_group) } child->mParentView = this; - updateRect(); + updateBoundingRect(); } @@ -380,7 +404,7 @@ void LLView::addChildAtEnd(LLView* child, S32 tab_group) } child->mParentView = this; - updateRect(); + updateBoundingRect(); } // remove the specified child from the view, and set it's parent to NULL. @@ -403,6 +427,7 @@ void LLView::removeChild(LLView* child, BOOL deleteIt) { llerrs << "LLView::removeChild called with non-child" << llendl; } + updateBoundingRect(); } void LLView::addCtrlAtEnd(LLUICtrl* ctrl, S32 tab_group) @@ -782,6 +807,7 @@ void LLView::setVisible(BOOL visible) // tell all children of this view that the visibility may have changed onVisibilityChange( visible ); } + updateBoundingRect(); } } @@ -815,6 +841,7 @@ void LLView::onVisibilityChange ( BOOL new_visibility ) void LLView::translate(S32 x, S32 y) { mRect.translate(x, y); + updateBoundingRect(); } // virtual @@ -831,7 +858,8 @@ void LLView::snappedTo(LLView* snap_view) BOOL LLView::handleHover(S32 x, S32 y, MASK mask) { BOOL handled = childrenHandleHover( x, y, mask ) != NULL; - if( !handled && mMouseOpaque && pointInView( x, y ) ) + if( !handled + && blockMouseEvent(x, y) ) { LLUI::sWindow->setCursor(UI_CURSOR_ARROW); lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl; @@ -876,45 +904,46 @@ BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_scre LLString tool_tip; - if ( getVisible() && getEnabled()) + for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) { - for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) + LLView* viewp = *child_it; + S32 local_x = x - viewp->mRect.mLeft; + S32 local_y = y - viewp->mRect.mBottom; + if( viewp->pointInView(local_x, local_y) + && viewp->getVisible() + && viewp->getEnabled() + && viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen )) { - LLView* viewp = *child_it; - S32 local_x = x - viewp->mRect.mLeft; - S32 local_y = y - viewp->mRect.mBottom; - if( viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen ) ) - { - handled = TRUE; - break; - } + handled = TRUE; + break; } + } - tool_tip = mToolTipMsg.getString(); - if (LLUI::sShowXUINames && (tool_tip.find(".xml", 0) == LLString::npos) && - (mName.find("Drag", 0) == LLString::npos)) - { - tool_tip = getShowNamesToolTip(); - } - + tool_tip = mToolTipMsg.getString(); + if ( + LLUI::sShowXUINames && + (tool_tip.find(".xml", 0) == LLString::npos) && + (mName.find("Drag", 0) == LLString::npos)) + { + tool_tip = getShowNamesToolTip(); + } - BOOL showNamesTextBox = LLUI::sShowXUINames && (getWidgetType() == WIDGET_TYPE_TEXT_BOX); + BOOL showNamesTextBox = LLUI::sShowXUINames && (getWidgetType() == WIDGET_TYPE_TEXT_BOX); - if( !handled && (mMouseOpaque || showNamesTextBox) && pointInView( x, y ) && !tool_tip.empty()) - { + if( !handled && (blockMouseEvent(x, y) || showNamesTextBox) && !tool_tip.empty()) + { - msg = tool_tip; + msg = tool_tip; - // Convert rect local to screen coordinates - localPointToScreen( - 0, 0, - &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); - localPointToScreen( - mRect.getWidth(), mRect.getHeight(), - &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) ); - - handled = TRUE; - } + // Convert rect local to screen coordinates + localPointToScreen( + 0, 0, + &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); + localPointToScreen( + mRect.getWidth(), mRect.getHeight(), + &(sticky_rect_screen->mRight), &(sticky_rect_screen->mTop) ); + + handled = TRUE; } return handled; @@ -1025,7 +1054,7 @@ BOOL LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, cargo_data, accept, tooltip_msg) != NULL; - if( !handled && mMouseOpaque ) + if( !handled && blockMouseEvent(x, y) ) { *accept = ACCEPT_NO; handled = TRUE; @@ -1081,7 +1110,7 @@ BOOL LLView::hasMouseCapture() BOOL LLView::handleMouseUp(S32 x, S32 y, MASK mask) { BOOL handled = childrenHandleMouseUp( x, y, mask ) != NULL; - if( !handled && mMouseOpaque ) + if( !handled && blockMouseEvent(x, y) ) { handled = TRUE; } @@ -1092,7 +1121,7 @@ BOOL LLView::handleMouseDown(S32 x, S32 y, MASK mask) { LLView* handled_view = childrenHandleMouseDown( x, y, mask ); BOOL handled = (handled_view != NULL); - if( !handled && mMouseOpaque ) + if( !handled && blockMouseEvent(x, y) ) { handled = TRUE; handled_view = this; @@ -1118,7 +1147,7 @@ BOOL LLView::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLView::handleDoubleClick(S32 x, S32 y, MASK mask) { BOOL handled = childrenHandleDoubleClick( x, y, mask ) != NULL; - if( !handled && mMouseOpaque ) + if( !handled && blockMouseEvent(x, y) ) { handleMouseDown(x, y, mask); handled = TRUE; @@ -1132,7 +1161,7 @@ BOOL LLView::handleScrollWheel(S32 x, S32 y, S32 clicks) if( getVisible() && mEnabled ) { handled = childrenHandleScrollWheel( x, y, clicks ) != NULL; - if( !handled && mMouseOpaque ) + if( !handled && blockMouseEvent(x, y) ) { handled = TRUE; } @@ -1143,7 +1172,7 @@ BOOL LLView::handleScrollWheel(S32 x, S32 y, S32 clicks) BOOL LLView::handleRightMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = childrenHandleRightMouseDown( x, y, mask ) != NULL; - if( !handled && mMouseOpaque ) + if( !handled && blockMouseEvent(x, y) ) { handled = TRUE; } @@ -1153,7 +1182,7 @@ BOOL LLView::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL LLView::handleRightMouseUp(S32 x, S32 y, MASK mask) { BOOL handled = childrenHandleRightMouseUp( x, y, mask ) != NULL; - if( !handled && mMouseOpaque ) + if( !handled && blockMouseEvent(x, y) ) { handled = TRUE; } @@ -1428,10 +1457,10 @@ void LLView::draw() focus_view = NULL; } + ++sDepth; for (child_list_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend(); ++child_iter) { LLView *viewp = *child_iter; - ++sDepth; if (viewp->getVisible() && viewp != focus_view) { @@ -1449,8 +1478,8 @@ void LLView::draw() } } - --sDepth; } + --sDepth; if (focus_view && focus_view->getVisible()) { @@ -1467,50 +1496,61 @@ void LLView::draw() //Draw a box for debugging. void LLView::drawDebugRect() { - // drawing solids requires texturing be disabled - LLGLSNoTexture no_texture; - - // draw red rectangle for the border - LLColor4 border_color(0.f, 0.f, 0.f, 1.f); - if (sEditingUI) + LLUI::pushMatrix(); { - border_color.mV[0] = 1.f; - } - else - { - border_color.mV[sDepth%3] = 1.f; - } + // drawing solids requires texturing be disabled + LLGLSNoTexture no_texture; - glColor4fv( border_color.mV ); + if (mUseBoundingRect) + { + LLUI::translate((F32)mBoundingRect.mLeft - (F32)mRect.mLeft, (F32)mBoundingRect.mBottom - (F32)mRect.mBottom, 0.f); + } - glBegin(GL_LINES); - glVertex2i(0, mRect.getHeight() - 1); - glVertex2i(0, 0); + LLRect debug_rect = mUseBoundingRect ? mBoundingRect : mRect; - glVertex2i(0, 0); - glVertex2i(mRect.getWidth() - 1, 0); + // draw red rectangle for the border + LLColor4 border_color(0.f, 0.f, 0.f, 1.f); + if (sEditingUI) + { + border_color.mV[0] = 1.f; + } + else + { + border_color.mV[sDepth%3] = 1.f; + } - glVertex2i(mRect.getWidth() - 1, 0); - glVertex2i(mRect.getWidth() - 1, mRect.getHeight() - 1); + glColor4fv( border_color.mV ); - glVertex2i(mRect.getWidth() - 1, mRect.getHeight() - 1); - glVertex2i(0, mRect.getHeight() - 1); - glEnd(); + glBegin(GL_LINES); + glVertex2i(0, debug_rect.getHeight() - 1); + glVertex2i(0, 0); - // Draw the name if it's not a leaf node - if (mChildList.size() && !sEditingUI) - { - //char temp[256]; - S32 x, y; - glColor4fv( border_color.mV ); - x = mRect.getWidth()/2; - y = mRect.getHeight()/2; - LLString debug_text = llformat("%s (%d x %d)", getName().c_str(), - mRect.getWidth(), mRect.getHeight()); - LLFontGL::sSansSerifSmall->renderUTF8(debug_text, 0, (F32)x, (F32)y, border_color, - LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL, - S32_MAX, S32_MAX, NULL, FALSE); + glVertex2i(0, 0); + glVertex2i(debug_rect.getWidth() - 1, 0); + + glVertex2i(debug_rect.getWidth() - 1, 0); + glVertex2i(debug_rect.getWidth() - 1, debug_rect.getHeight() - 1); + + glVertex2i(debug_rect.getWidth() - 1, debug_rect.getHeight() - 1); + glVertex2i(0, debug_rect.getHeight() - 1); + glEnd(); + + // Draw the name if it's not a leaf node + if (mChildList.size() && !sEditingUI) + { + //char temp[256]; + S32 x, y; + glColor4fv( border_color.mV ); + x = debug_rect.getWidth()/2; + y = debug_rect.getHeight()/2; + LLString debug_text = llformat("%s (%d x %d)", getName().c_str(), + debug_rect.getWidth(), debug_rect.getHeight()); + LLFontGL::sSansSerifSmall->renderUTF8(debug_text, 0, (F32)x, (F32)y, border_color, + LLFontGL::HCENTER, LLFontGL::BASELINE, LLFontGL::NORMAL, + S32_MAX, S32_MAX, NULL, FALSE); + } } + LLUI::popMatrix(); } void LLView::drawChild(LLView* childp, S32 x_offset, S32 y_offset, BOOL force_draw) @@ -1537,9 +1577,6 @@ void LLView::drawChild(LLView* childp, S32 x_offset, S32 y_offset, BOOL force_dr void LLView::reshape(S32 width, S32 height, BOOL called_from_parent) { - // make sure this view contains all its children - updateRect(); - // compute how much things changed and apply reshape logic to children S32 delta_width = width - mRect.getWidth(); S32 delta_height = height - mRect.getHeight(); @@ -1608,6 +1645,8 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent) mParentView->reshape(mParentView->getRect().getWidth(), mParentView->getRect().getHeight(), FALSE); } } + + updateBoundingRect(); } LLRect LLView::getRequiredRect() @@ -1615,6 +1654,53 @@ LLRect LLView::getRequiredRect() return mRect; } +void LLView::updateBoundingRect() +{ + if (isDead()) return; + + if (mUseBoundingRect) + { + LLRect local_bounding_rect = LLRect::null; + + child_list_const_iter_t child_it; + for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) + { + LLView* childp = *child_it; + if (!childp->getVisible()) continue; + + LLRect child_bounding_rect = childp->getBoundingRect(); + + if (local_bounding_rect.isNull()) + { + // start out with bounding rect equal to first visible child's bounding rect + local_bounding_rect = child_bounding_rect; + } + else + { + // accumulate non-null children rectangles + if (!child_bounding_rect.isNull()) + { + local_bounding_rect.unionWith(child_bounding_rect); + } + } + } + + mBoundingRect = local_bounding_rect; + // translate into parent-relative coordinates + mBoundingRect.translate(mRect.mLeft, mRect.mBottom); + } + else + { + mBoundingRect = mRect; + } + + // give parent view a chance to resize, in case we just moved, for example + if (getParent() && getParent()->mUseBoundingRect) + { + getParent()->updateBoundingRect(); + } +} + const LLRect LLView::getScreenRect() const { // *FIX: check for one-off error @@ -1624,6 +1710,15 @@ const LLRect LLView::getScreenRect() const return screen_rect; } +const LLRect LLView::getLocalBoundingRect() const +{ + LLRect local_bounding_rect = getBoundingRect(); + local_bounding_rect.translate(-mRect.mLeft, -mRect.mBottom); + + return local_bounding_rect; +} + + const LLRect LLView::getLocalRect() const { LLRect local_rect(0, mRect.getHeight(), mRect.getWidth(), 0); @@ -1637,38 +1732,7 @@ const LLRect LLView::getLocalSnapRect() const return local_snap_rect; } -void LLView::updateRect() -{ - if (mSpanChildren && mChildList.size()) - { - LLView* first_child = (*mChildList.begin()); - LLRect child_spanning_rect = first_child->mRect; - - for ( child_list_iter_t child_it = ++mChildList.begin(); child_it != mChildList.end(); ++child_it) - { - LLView* viewp = *child_it; - if (viewp->getVisible()) - { - child_spanning_rect.unionWith(viewp->mRect); - } - } - - S32 translate_x = llmin(0, child_spanning_rect.mLeft); - S32 translate_y = llmin(0, child_spanning_rect.mBottom); - S32 new_width = llmax(mRect.getWidth() + translate_x, child_spanning_rect.getWidth()); - S32 new_height = llmax(mRect.getHeight() + translate_y, child_spanning_rect.getHeight()); - - mRect.setOriginAndSize(mRect.mLeft + translate_x, mRect.mBottom + translate_y, new_width, new_height); - - for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) - { - LLView* viewp = *child_it; - viewp->mRect.translate(-translate_x, -translate_y); - } - } -} - -BOOL LLView::hasAncestor(LLView* parentp) +BOOL LLView::hasAncestor(const LLView* parentp) { if (!parentp) { @@ -1743,14 +1807,23 @@ LLView* LLView::getChildByName(const LLString& name, BOOL recurse) const return NULL; } -// virtual -void LLView::onFocusLost() -{ +BOOL LLView::parentPointInView(S32 x, S32 y, EHitTestType type) const +{ + return (mUseBoundingRect && type == HIT_TEST_USE_BOUNDING_RECT) + ? mBoundingRect.pointInRect( x, y ) + : mRect.pointInRect( x, y ); } -// virtual -void LLView::onFocusReceived() +BOOL LLView::pointInView(S32 x, S32 y, EHitTestType type) const +{ + return (mUseBoundingRect && type == HIT_TEST_USE_BOUNDING_RECT) + ? mBoundingRect.pointInRect( x + mRect.mLeft, y + mRect.mBottom ) + : mRect.localPointInRect( x, y ); +} + +BOOL LLView::blockMouseEvent(S32 x, S32 y) const { + return mMouseOpaque && pointInView(x, y, HIT_TEST_IGNORE_BOUNDING_RECT); } // virtual @@ -2024,9 +2097,9 @@ LLXMLNodePtr LLView::getXML(bool save_children) const // Export all widgets as enabled and visible - code must disable. node->createChild("hidden", TRUE)->setBoolValue(mHidden); node->createChild("mouse_opaque", TRUE)->setBoolValue(mMouseOpaque ); - if (!mToolTipMsg.empty()) + if (!mToolTipMsg.getString().empty()) { - node->createChild("tool_tip", TRUE)->setStringValue(mToolTipMsg); + node->createChild("tool_tip", TRUE)->setStringValue(mToolTipMsg.getString()); } if (mSoundFlags != MOUSE_UP) { @@ -2116,7 +2189,7 @@ const LLCtrlQuery & LLView::getTabOrderQuery() query.addPreFilter(LLVisibleFilter::getInstance()); query.addPreFilter(LLEnabledFilter::getInstance()); query.addPreFilter(LLTabStopFilter::getInstance()); - query.addPostFilter(LLUICtrl::LLTabStopPostFilter::getInstance()); + query.addPostFilter(LLLeavesFilter::getInstance()); } return query; } @@ -2129,6 +2202,7 @@ const LLCtrlQuery & LLView::getFocusRootsQuery() query.addPreFilter(LLVisibleFilter::getInstance()); query.addPreFilter(LLEnabledFilter::getInstance()); query.addPreFilter(LLView::LLFocusRootsFilter::getInstance()); + query.addPostFilter(LLRootsFilter::getInstance()); } return query; } @@ -2593,10 +2667,10 @@ const S32 VPAD = 4; U32 LLView::createRect(LLXMLNodePtr node, LLRect &rect, LLView* parent_view, const LLRect &required_rect) { U32 follows = 0; - S32 x = FLOATER_H_MARGIN; - S32 y = 0; - S32 w = 0; - S32 h = 0; + S32 x = rect.mLeft; + S32 y = rect.mBottom; + S32 w = rect.getWidth(); + S32 h = rect.getHeight(); U32 last_x = 0; U32 last_y = 0; @@ -2639,8 +2713,15 @@ U32 LLView::createRect(LLXMLNodePtr node, LLRect &rect, LLView* parent_view, con // view if you don't specify a width. if (parent_view) { - w = llmax(required_rect.getWidth(), parent_view->getRect().getWidth() - (FLOATER_H_MARGIN) - x); - h = llmax(MIN_WIDGET_HEIGHT, required_rect.getHeight()); + if(w == 0) + { + w = llmax(required_rect.getWidth(), parent_view->getRect().getWidth() - (FLOATER_H_MARGIN) - x); + } + + if(h == 0) + { + h = llmax(MIN_WIDGET_HEIGHT, required_rect.getHeight()); + } } if (node->hasAttribute("width")) @@ -2765,44 +2846,7 @@ void LLView::initFromXML(LLXMLNodePtr node, LLView* parent) setRect(view_rect); setFollows(follows_flags); - if (node->hasAttribute("follows")) - { - setFollowsNone(); - - LLString follows; - node->getAttributeString("follows", follows); - - typedef boost::tokenizer > tokenizer; - boost::char_separator sep("|"); - tokenizer tokens(follows, sep); - tokenizer::iterator token_iter = tokens.begin(); - - while(token_iter != tokens.end()) - { - const std::string& token_str = *token_iter; - if (token_str == "left") - { - setFollowsLeft(); - } - else if (token_str == "right") - { - setFollowsRight(); - } - else if (token_str == "top") - { - setFollowsTop(); - } - else if (token_str == "bottom") - { - setFollowsBottom(); - } - else if (token_str == "all") - { - setFollowsAll(); - } - ++token_iter; - } - } + parseFollowsFlags(node); if (node->hasAttribute("control_name")) { @@ -2839,11 +2883,57 @@ void LLView::initFromXML(LLXMLNodePtr node, LLView* parent) setHidden(hidden); } + node->getAttributeBOOL("use_bounding_rect", mUseBoundingRect); + node->getAttributeBOOL("mouse_opaque", mMouseOpaque); + node->getAttributeS32("default_tab_group", mDefaultTabGroup); reshape(view_rect.getWidth(), view_rect.getHeight()); } +void LLView::parseFollowsFlags(LLXMLNodePtr node) +{ + if (node->hasAttribute("follows")) + { + setFollowsNone(); + + LLString follows; + node->getAttributeString("follows", follows); + + typedef boost::tokenizer > tokenizer; + boost::char_separator sep("|"); + tokenizer tokens(follows, sep); + tokenizer::iterator token_iter = tokens.begin(); + + while(token_iter != tokens.end()) + { + const std::string& token_str = *token_iter; + if (token_str == "left") + { + setFollowsLeft(); + } + else if (token_str == "right") + { + setFollowsRight(); + } + else if (token_str == "top") + { + setFollowsTop(); + } + else if (token_str == "bottom") + { + setFollowsBottom(); + } + else if (token_str == "all") + { + setFollowsAll(); + } + ++token_iter; + } + } +} + + // static LLFontGL* LLView::selectFont(LLXMLNodePtr node) { diff --git a/linden/indra/llui/llview.h b/linden/indra/llui/llview.h index bd99a13..67a4d56 100644 --- a/linden/indra/llui/llview.h +++ b/linden/indra/llui/llview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,6 +50,7 @@ #include "llviewquery.h" #include "llxmlnode.h" #include "stdenums.h" +#include "lluistring.h" class LLColor4; class LLWindow; @@ -146,6 +147,7 @@ protected: LLString mName; // location in pixels, relative to surrounding structure, bottom,left=0,0 LLRect mRect; + LLRect mBoundingRect; U32 mReshapeFlags; @@ -161,11 +163,11 @@ protected: BOOL mSaveToXML; BOOL mIsFocusRoot; + BOOL mUseBoundingRect; // hit test against bounding rectangle that includes all child elements public: LLViewHandle mViewHandle; BOOL mLastVisible; - BOOL mSpanChildren; private: BOOL mVisible; @@ -217,6 +219,7 @@ public: void setMouseOpaque( BOOL b ); void setToolTip( const LLStringExplicit& msg ); BOOL setToolTipArg( const LLStringExplicit& key, const LLStringExplicit& text ); + void setToolTipArgs( const LLString::format_map_t& args ); virtual void setRect(const LLRect &rect); void setFollows(U32 flags); @@ -231,13 +234,15 @@ public: void setSoundFlags(U8 flags); void setName(LLString name); - void setSpanChildren( BOOL span_children ); + void setUseBoundingRect( BOOL use_bounding_rect ); + BOOL getUseBoundingRect(); const LLString& getToolTip(); void sendChildToFront(LLView* child); void sendChildToBack(LLView* child); void moveChildToFrontOfTabGroup(LLUICtrl* child); + void moveChildToBackOfTabGroup(LLUICtrl* child); void addChild(LLView* view, S32 tab_group = 0); void addChildAtEnd(LLView* view, S32 tab_group = 0); @@ -264,7 +269,7 @@ public: { /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const { - return filterResult_t(view->isCtrl() && view->isFocusRoot(), !view->isFocusRoot()); + return filterResult_t(view->isCtrl() && view->isFocusRoot(), TRUE); } }; @@ -312,20 +317,22 @@ public: BOOL followsAll() const { return mReshapeFlags & FOLLOWS_ALL; } const LLRect& getRect() const { return mRect; } + const LLRect& getBoundingRect() const { return mBoundingRect; } + const LLRect getLocalBoundingRect() const; const LLRect getScreenRect() const; const LLRect getLocalRect() const; virtual const LLRect getSnapRect() const { return mRect; } virtual const LLRect getLocalSnapRect() const; virtual LLRect getRequiredRect(); // Get required size for this object. 0 for width/height means don't care. - virtual void updateRect(); // apply procedural updates to own rectangle + void updateBoundingRect(); LLView* getRootView(); LLView* getParent() const { return mParentView; } LLView* getFirstChild() { return (mChildList.empty()) ? NULL : *(mChildList.begin()); } S32 getChildCount() const { return (S32)mChildList.size(); } template void sortChildren(_Pr3 _Pred) { mChildList.sort(_Pred); } - BOOL hasAncestor(LLView* parentp); + BOOL hasAncestor(const LLView* parentp); BOOL hasChild(const LLString& childname, BOOL recurse = FALSE) const; @@ -390,6 +397,7 @@ public: static U32 createRect(LLXMLNodePtr node, LLRect &rect, LLView* parent_view, const LLRect &required_rect = LLRect()); virtual void initFromXML(LLXMLNodePtr node, LLView* parent); + void parseFollowsFlags(LLXMLNodePtr node); static LLFontGL* selectFont(LLXMLNodePtr node); static LLFontGL::HAlign selectFontHAlign(LLXMLNodePtr node); @@ -428,12 +436,16 @@ public: BOOL getVisible() const { return mVisible && !mHidden; } U8 getSoundFlags() const { return mSoundFlags; } - // Default to no action - virtual void onFocusLost(); - virtual void onFocusReceived(); + typedef enum e_hit_test_type + { + HIT_TEST_USE_BOUNDING_RECT, + HIT_TEST_IGNORE_BOUNDING_RECT + }EHitTestType; + + BOOL parentPointInView(S32 x, S32 y, EHitTestType type = HIT_TEST_USE_BOUNDING_RECT) const; + BOOL pointInView(S32 x, S32 y, EHitTestType type = HIT_TEST_USE_BOUNDING_RECT) const; + BOOL blockMouseEvent(S32 x, S32 y) const; - BOOL parentPointInView(S32 x, S32 y) const { return mRect.pointInRect( x, y ); } - BOOL pointInView(S32 x, S32 y) const { return mRect.localPointInRect( x, y ); } virtual void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const; virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const; virtual BOOL localPointToOtherView( S32 x, S32 y, S32 *other_x, S32 *other_y, LLView* other_view); diff --git a/linden/indra/llui/llviewborder.cpp b/linden/indra/llui/llviewborder.cpp index f2ff8a3..b70edec 100644 --- a/linden/indra/llui/llviewborder.cpp +++ b/linden/indra/llui/llviewborder.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -84,7 +84,7 @@ void LLViewBorder::setColorsExtended( const LLColor4& shadow_light, const LLColo void LLViewBorder::setTexture( const LLUUID &image_id ) { - mTexture = LLUI::sImageProvider->getUIImageByID(image_id); + mTexture = LLUI::sImageProvider->getImageByID(image_id); } diff --git a/linden/indra/llui/llviewborder.h b/linden/indra/llui/llviewborder.h index 935257c..d9c2916 100644 --- a/linden/indra/llui/llviewborder.h +++ b/linden/indra/llui/llviewborder.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llui/llviewquery.cpp b/linden/indra/llui/llviewquery.cpp index f86f855..40c2d61 100644 --- a/linden/indra/llui/llviewquery.cpp +++ b/linden/indra/llui/llviewquery.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,9 +37,14 @@ void LLQuerySorter::operator() (LLView * parent, viewList_t &children) const {} -filterResult_t LLNoLeavesFilter::operator() (const LLView* const view, const viewList_t & children) const +filterResult_t LLLeavesFilter::operator() (const LLView* const view, const viewList_t & children) const { - return filterResult_t(!(view->getChildList()->size() == 0), TRUE); + return filterResult_t(children.empty(), TRUE); +} + +filterResult_t LLRootsFilter::operator() (const LLView* const view, const viewList_t & children) const +{ + return filterResult_t(TRUE, FALSE); } filterResult_t LLVisibleFilter::operator() (const LLView* const view, const viewList_t & children) const @@ -56,6 +61,16 @@ filterResult_t LLTabStopFilter::operator() (const LLView* const view, const view view->canFocusChildren()); } +filterResult_t LLCtrlFilter::operator() (const LLView* const view, const viewList_t & children) const +{ + return filterResult_t(view->isCtrl(),TRUE); +} + +filterResult_t LLWidgetTypeFilter::operator() (const LLView* const view, const viewList_t & children) const +{ + return filterResult_t(view->getWidgetType() == mType, TRUE); +} + // LLViewQuery LLViewQuery::LLViewQuery(): mPreFilters(), mPostFilters(), mSorterp() @@ -73,45 +88,53 @@ const LLViewQuery::filterList_t & LLViewQuery::getPostFilters() const { return m void LLViewQuery::setSorter(const LLQuerySorter* sorterp) { mSorterp = sorterp; } const LLQuerySorter* LLViewQuery::getSorter() const { return mSorterp; } -viewList_t LLViewQuery::run(LLView * view) const +viewList_t LLViewQuery::run(LLView* view) const { viewList_t result; - filterResult_t pre = runFilters(view, viewList_t(), mPreFilters); + // prefilter gets immediate children of view + filterResult_t pre = runFilters(view, *view->getChildList(), mPreFilters); if(!pre.first && !pre.second) { - // skip post filters completely if we're not including ourselves or the children + // not including ourselves or the children + // nothing more to do return result; } + + viewList_t filtered_children; + filterResult_t post(TRUE, TRUE); if(pre.second) { // run filters on children - viewList_t filtered_children; filterChildren(view, filtered_children); - filterResult_t post = runFilters(view, filtered_children, mPostFilters); - if(pre.first && post.first) - { - result.push_back(view); - } - if(post.second) + // only run post filters if this element passed pre filters + // so if you failed to pass the pre filter, you can't filter out children in post + if (pre.first) { - result.insert(result.end(), filtered_children.begin(), filtered_children.end()); + post = runFilters(view, filtered_children, mPostFilters); } } - else + + if(pre.first && post.first) { - if(pre.first) - { - result.push_back(view); - } + result.push_back(view); + } + + if(pre.second && post.second) + { + result.insert(result.end(), filtered_children.begin(), filtered_children.end()); } + return result; } void LLViewQuery::filterChildren(LLView * view, viewList_t & filtered_children) const { LLView::child_list_t views(*(view->getChildList())); - (*mSorterp)(view, views); // sort the children per the sorter + if (mSorterp) + { + (*mSorterp)(view, views); // sort the children per the sorter + } for(LLView::child_list_iter_t iter = views.begin(); iter != views.end(); iter++) diff --git a/linden/indra/llui/llviewquery.h b/linden/indra/llui/llviewquery.h index 9fe51a4..2e2b50d 100644 --- a/linden/indra/llui/llviewquery.h +++ b/linden/indra/llui/llviewquery.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -35,6 +35,7 @@ #include #include "llmemory.h" +#include "llui.h" class LLView; @@ -42,35 +43,60 @@ typedef std::list viewList_t; typedef std::pair filterResult_t; // Abstract base class for all filters. -class LLQueryFilter : public LLRefCount +class LLQueryFilter { public: + virtual ~LLQueryFilter() {}; virtual filterResult_t operator() (const LLView* const view, const viewList_t & children) const =0; }; -class LLQuerySorter : public LLRefCount +class LLQuerySorter { public: + virtual ~LLQuerySorter() {}; virtual void operator() (LLView * parent, viewList_t &children) const; }; -class LLNoLeavesFilter : public LLQueryFilter, public LLSingleton +class LLLeavesFilter : public LLQueryFilter, public LLSingleton { /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const; }; + +class LLRootsFilter : public LLQueryFilter, public LLSingleton +{ + /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const; +}; + class LLVisibleFilter : public LLQueryFilter, public LLSingleton { /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const; }; + class LLEnabledFilter : public LLQueryFilter, public LLSingleton { /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const; }; + class LLTabStopFilter : public LLQueryFilter, public LLSingleton { /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const; }; +class LLCtrlFilter : public LLQueryFilter, public LLSingleton +{ + /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const; +}; + +class LLWidgetTypeFilter : public LLQueryFilter +{ +public: + LLWidgetTypeFilter(EWidgetType type) : mType(type) {}; +private: + /*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const; + + EWidgetType mType; +}; + // Algorithm for flattening class LLViewQuery { diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index 97a024d..dc0ffea 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir.h b/linden/indra/llvfs/lldir.h index 594ee99..c8eeaa2 100644 --- a/linden/indra/llvfs/lldir.h +++ b/linden/indra/llvfs/lldir.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_linux.cpp b/linden/indra/llvfs/lldir_linux.cpp index d45c91f..0e4e0a2 100644 --- a/linden/indra/llvfs/lldir_linux.cpp +++ b/linden/indra/llvfs/lldir_linux.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_linux.h b/linden/indra/llvfs/lldir_linux.h index 9bbad10..4815fe9 100644 --- a/linden/indra/llvfs/lldir_linux.h +++ b/linden/indra/llvfs/lldir_linux.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_mac.cpp b/linden/indra/llvfs/lldir_mac.cpp index f19607e..f67a487 100644 --- a/linden/indra/llvfs/lldir_mac.cpp +++ b/linden/indra/llvfs/lldir_mac.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_mac.h b/linden/indra/llvfs/lldir_mac.h index 62f675e..73c964d 100644 --- a/linden/indra/llvfs/lldir_mac.h +++ b/linden/indra/llvfs/lldir_mac.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_solaris.cpp b/linden/indra/llvfs/lldir_solaris.cpp index 0560b73..2143bb2 100644 --- a/linden/indra/llvfs/lldir_solaris.cpp +++ b/linden/indra/llvfs/lldir_solaris.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_solaris.h b/linden/indra/llvfs/lldir_solaris.h index 91fc544..a8ad4ca 100644 --- a/linden/indra/llvfs/lldir_solaris.h +++ b/linden/indra/llvfs/lldir_solaris.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_win32.cpp b/linden/indra/llvfs/lldir_win32.cpp index 5189344..ae87aa1 100644 --- a/linden/indra/llvfs/lldir_win32.cpp +++ b/linden/indra/llvfs/lldir_win32.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lldir_win32.h b/linden/indra/llvfs/lldir_win32.h index e90c0e4..2744ea2 100644 --- a/linden/indra/llvfs/lldir_win32.h +++ b/linden/indra/llvfs/lldir_win32.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lllfsthread.cpp b/linden/indra/llvfs/lllfsthread.cpp index c723266..4510392 100644 --- a/linden/indra/llvfs/lllfsthread.cpp +++ b/linden/indra/llvfs/lllfsthread.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/lllfsthread.h b/linden/indra/llvfs/lllfsthread.h index c9daaa2..b073422 100644 --- a/linden/indra/llvfs/lllfsthread.h +++ b/linden/indra/llvfs/lllfsthread.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/llvfile.cpp b/linden/indra/llvfs/llvfile.cpp index 32ae4e2..e8afbb0 100644 --- a/linden/indra/llvfs/llvfile.cpp +++ b/linden/indra/llvfs/llvfile.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/llvfile.h b/linden/indra/llvfs/llvfile.h index 42d62e9..b21c0e5 100644 --- a/linden/indra/llvfs/llvfile.h +++ b/linden/indra/llvfs/llvfile.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp index 9dc4acb..e0957db 100644 --- a/linden/indra/llvfs/llvfs.cpp +++ b/linden/indra/llvfs/llvfs.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/llvfs.h b/linden/indra/llvfs/llvfs.h index f8ab43f..e07e85a 100644 --- a/linden/indra/llvfs/llvfs.h +++ b/linden/indra/llvfs/llvfs.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/llvfs_vc9.vcproj b/linden/indra/llvfs/llvfs_vc9.vcproj new file mode 100644 index 0000000..1e87b99 --- /dev/null +++ b/linden/indra/llvfs/llvfs_vc9.vcproj @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llvfs/llvfsthread.cpp b/linden/indra/llvfs/llvfsthread.cpp index 0137d45..92bf3dd 100644 --- a/linden/indra/llvfs/llvfsthread.cpp +++ b/linden/indra/llvfs/llvfsthread.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llvfs/llvfsthread.h b/linden/indra/llvfs/llvfsthread.h index ff64a72..0dc818a 100644 --- a/linden/indra/llvfs/llvfsthread.h +++ b/linden/indra/llvfs/llvfsthread.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/lldxhardware.cpp b/linden/indra/llwindow/lldxhardware.cpp index 34e1db2..a401c63 100644 --- a/linden/indra/llwindow/lldxhardware.cpp +++ b/linden/indra/llwindow/lldxhardware.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/lldxhardware.h b/linden/indra/llwindow/lldxhardware.h index 4a89d5c..f4f364e 100644 --- a/linden/indra/llwindow/lldxhardware.h +++ b/linden/indra/llwindow/lldxhardware.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llgl.cpp b/linden/indra/llwindow/llgl.cpp index 14d4591..6978fb9 100644 --- a/linden/indra/llwindow/llgl.cpp +++ b/linden/indra/llwindow/llgl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llgl.h b/linden/indra/llwindow/llgl.h index 2192ac6..57bd616 100644 --- a/linden/indra/llwindow/llgl.h +++ b/linden/indra/llwindow/llgl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llglheaders.h b/linden/indra/llwindow/llglheaders.h index 2245dbd..45310ef 100644 --- a/linden/indra/llwindow/llglheaders.h +++ b/linden/indra/llwindow/llglheaders.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llglstates.h b/linden/indra/llwindow/llglstates.h index 859e089..5052c8d 100644 --- a/linden/indra/llwindow/llglstates.h +++ b/linden/indra/llwindow/llglstates.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llglstubs.h b/linden/indra/llwindow/llglstubs.h index 5669bca..9745caa 100644 --- a/linden/indra/llwindow/llglstubs.h +++ b/linden/indra/llwindow/llglstubs.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llgltypes.h b/linden/indra/llwindow/llgltypes.h index d6dcbe9..d22d5fa 100644 --- a/linden/indra/llwindow/llgltypes.h +++ b/linden/indra/llwindow/llgltypes.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboard.cpp b/linden/indra/llwindow/llkeyboard.cpp index 080eed0..9be23df 100644 --- a/linden/indra/llwindow/llkeyboard.cpp +++ b/linden/indra/llwindow/llkeyboard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboard.h b/linden/indra/llwindow/llkeyboard.h index 25fbb75..d9ce376 100644 --- a/linden/indra/llwindow/llkeyboard.h +++ b/linden/indra/llwindow/llkeyboard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboardmacosx.cpp b/linden/indra/llwindow/llkeyboardmacosx.cpp index cdbe9fa..4cb1029 100644 --- a/linden/indra/llwindow/llkeyboardmacosx.cpp +++ b/linden/indra/llwindow/llkeyboardmacosx.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboardmacosx.h b/linden/indra/llwindow/llkeyboardmacosx.h index fc3a39c..f0ea43d 100644 --- a/linden/indra/llwindow/llkeyboardmacosx.h +++ b/linden/indra/llwindow/llkeyboardmacosx.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboardsdl.cpp b/linden/indra/llwindow/llkeyboardsdl.cpp index 6f2119e..f9d59ac 100644 --- a/linden/indra/llwindow/llkeyboardsdl.cpp +++ b/linden/indra/llwindow/llkeyboardsdl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboardsdl.h b/linden/indra/llwindow/llkeyboardsdl.h index 4d45fed..4b38912 100644 --- a/linden/indra/llwindow/llkeyboardsdl.h +++ b/linden/indra/llwindow/llkeyboardsdl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboardwin32.cpp b/linden/indra/llwindow/llkeyboardwin32.cpp index 78ba598..1b68112 100644 --- a/linden/indra/llwindow/llkeyboardwin32.cpp +++ b/linden/indra/llwindow/llkeyboardwin32.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llkeyboardwin32.h b/linden/indra/llwindow/llkeyboardwin32.h index e60edb1..e8d6361 100644 --- a/linden/indra/llwindow/llkeyboardwin32.h +++ b/linden/indra/llwindow/llkeyboardwin32.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/lllogitechlcd.cpp b/linden/indra/llwindow/lllogitechlcd.cpp index c4efd47..8bd77cb 100644 --- a/linden/indra/llwindow/lllogitechlcd.cpp +++ b/linden/indra/llwindow/lllogitechlcd.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -29,13 +29,10 @@ * $/LicenseInfo$ */ -#include "llpreprocessor.h" +#include "linden_common.h" #if LL_LCD_COMPILE -#include "linden_common.h" -#include "../win_crash_logger/StdAfx.h" - #include "EZ_LCD.h" #include "../newview/res/resource.h" #include "llcontrol.h" diff --git a/linden/indra/llwindow/lllogitechlcd.h b/linden/indra/llwindow/lllogitechlcd.h index d538b95..47a6acd 100644 --- a/linden/indra/llwindow/lllogitechlcd.h +++ b/linden/indra/llwindow/lllogitechlcd.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -132,4 +132,4 @@ private: -#endif \ No newline at end of file +#endif diff --git a/linden/indra/llwindow/llmousehandler.h b/linden/indra/llwindow/llmousehandler.h index 1371405..8bc77bb 100644 --- a/linden/indra/llwindow/llmousehandler.h +++ b/linden/indra/llwindow/llmousehandler.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llpreeditor.h b/linden/indra/llwindow/llpreeditor.h new file mode 100644 index 0000000..f66a390 --- /dev/null +++ b/linden/indra/llwindow/llpreeditor.h @@ -0,0 +1,106 @@ +/** + * @file llpreeditor.h + * @brief I believe this is used for languages like Japanese that require + * an "input method editor" to type Kanji. + * @author Open source patch, incorporated by Dave Simmons + * + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007-2008, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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. + * $/LicenseInfo$ + */ + +#ifndef LL_PREEDITOR +#define LL_PREEDITOR + +class LLPreeditor +{ +public: + + typedef std::vector segment_lengths_t; + typedef std::vector standouts_t; + + // We don't delete against LLPreeditor, but compilers complain without this... + + virtual ~LLPreeditor() {}; + + // Discard any preedit info. on this preeditor. + + virtual void resetPreedit() = 0; + + // Update the preedit feedback using specified details. + // Existing preedit is discarded and replaced with the new one. (I.e., updatePreedit is not cumulative.) + // All arguments are IN. + // preedit_count is the number of elements in arrays preedit_list and preedit_standouts. + // preedit list is an array of preedit texts (clauses.) + // preedit_standouts indicates whether each preedit text should be shown as standout clause. + // caret_position is the preedit-local position of text editing caret, in # of llwchar. + + virtual void updatePreedit(const LLWString &preedit_string, + const segment_lengths_t &preedit_segment_lengths, const standouts_t &preedit_standouts, S32 caret_position) = 0; + + // Turn the specified sub-contents into an active preedit. + // Both position and length are IN and count with UTF-32 (llwchar) characters. + // This method primarily facilitates reconversion. + + virtual void markAsPreedit(S32 position, S32 length) = 0; + + // Get the position and the length of the active preedit in the contents. + // Both position and length are OUT and count with UTF-32 (llwchar) characters. + // When this preeditor has no active preedit, position receives + // the caret position, and length receives 0. + + virtual void getPreeditRange(S32 *position, S32 *length) const = 0; + + // Get the position and the length of the current selection in the contents. + // Both position and length are OUT and count with UTF-32 (llwchar) characters. + // When this preeditor has no selection, position receives + // the caret position, and length receives 0. + + virtual void getSelectionRange(S32 *position, S32 *length) const = 0; + + // Get the locations where the preedit and related UI elements are displayed. + // Locations are relative to the app window and measured in GL coordinate space (before scaling.) + // query_position is IN argument, and other three are OUT. + + virtual BOOL getPreeditLocation(S32 query_position, LLCoordGL *coord, LLRect *bounds, LLRect *control) const = 0; + + // Get the size (height) of the current font used in this preeditor. + + virtual S32 getPreeditFontSize() const = 0; + + // Get the contents of this preeditor as a LLWString. If there is an active preedit, + // the returned LLWString contains it. + + virtual const LLWString & getWText() const = 0; + + // Handle a UTF-32 char on this preeditor, i.e., add the character + // to the contents. + // This is a back door of the method of same name of LLWindowCallback. + // called_from_parent should be set to FALSE if calling through LLPreeditor. + + virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) = 0; +}; + +#endif diff --git a/linden/indra/llwindow/llwindow.cpp b/linden/indra/llwindow/llwindow.cpp index c10e97f..718ed55 100644 --- a/linden/indra/llwindow/llwindow.cpp +++ b/linden/indra/llwindow/llwindow.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h index 2a1babb..1d49572 100644 --- a/linden/indra/llwindow/llwindow.h +++ b/linden/indra/llwindow/llwindow.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -81,6 +81,8 @@ class LLSplashScreen; class LLWindow; +class LLPreeditor; + class LLWindowCallbacks { public: @@ -222,8 +224,10 @@ public: virtual void *getPlatformWindow() = 0; // control platform's Language Text Input mechanisms. - virtual void allowLanguageTextInput( BOOL b ) {}; + virtual void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) {} virtual void setLanguageTextInput( const LLCoordGL & pos ) {}; + virtual void updateLanguageTextInputArea() {} + virtual void interruptLanguageTextInput() {} protected: LLWindow(BOOL fullscreen, U32 flags); @@ -351,9 +355,6 @@ extern const char* gURLProtocolWhitelistHandler[]; // Loads a URL with the user's default browser void spawn_web_browser(const char* escaped_url); -// Opens a file with ShellExecute. Security risk! -void shell_open(const char* file_path); - void simpleEscapeString ( std::string& stringIn ); #endif // _LL_window_h_ diff --git a/linden/indra/llwindow/llwindow.vcproj b/linden/indra/llwindow/llwindow.vcproj index 7adecd6..1291d99 100644 --- a/linden/indra/llwindow/llwindow.vcproj +++ b/linden/indra/llwindow/llwindow.vcproj @@ -255,6 +255,9 @@ RelativePath=".\llmousehandler.h"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llwindow/llwindowheadless.cpp b/linden/indra/llwindow/llwindowheadless.cpp index ed65e3c..441b4e9 100644 --- a/linden/indra/llwindow/llwindowheadless.cpp +++ b/linden/indra/llwindow/llwindowheadless.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowheadless.h b/linden/indra/llwindow/llwindowheadless.h index 782186f..15e7196 100644 --- a/linden/indra/llwindow/llwindowheadless.h +++ b/linden/indra/llwindow/llwindowheadless.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowlinux.cpp b/linden/indra/llwindow/llwindowlinux.cpp index 6e83e4e..6c026e4 100644 --- a/linden/indra/llwindow/llwindowlinux.cpp +++ b/linden/indra/llwindow/llwindowlinux.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowlinux.h b/linden/indra/llwindow/llwindowlinux.h index fa3ad83..bebf25a 100644 --- a/linden/indra/llwindow/llwindowlinux.h +++ b/linden/indra/llwindow/llwindowlinux.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowmacosx-objc.h b/linden/indra/llwindow/llwindowmacosx-objc.h index bf933bc..095f9e0 100644 --- a/linden/indra/llwindow/llwindowmacosx-objc.h +++ b/linden/indra/llwindow/llwindowmacosx-objc.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowmacosx-objc.mm b/linden/indra/llwindow/llwindowmacosx-objc.mm index a9e3958..d2efd77 100644 --- a/linden/indra/llwindow/llwindowmacosx-objc.mm +++ b/linden/indra/llwindow/llwindowmacosx-objc.mm @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp index 93ef46b..f522abb 100644 --- a/linden/indra/llwindow/llwindowmacosx.cpp +++ b/linden/indra/llwindow/llwindowmacosx.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -48,6 +48,7 @@ #include "indra_constants.h" #include "llwindowmacosx-objc.h" +#include "llpreeditor.h" extern BOOL gDebugWindowProc; @@ -69,7 +70,6 @@ const S32 MAX_NUM_RESOLUTIONS = 32; void show_window_creation_error(const char* title) { llwarns << title << llendl; - shell_open( "help/window_creation_error.html"); /* OSMessageBox( "Second Life is unable to run because it can't set up your display.\n" @@ -172,8 +172,22 @@ static EventTypeSpec WindowHandlerEventList[] = { kEventClassKeyboard, kEventRawKeyModifiersChanged }, // Text input events - { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } - + { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }, + { kEventClassTextInput, kEventTextInputUpdateActiveInputArea }, + { kEventClassTextInput, kEventTextInputOffsetToPos }, + { kEventClassTextInput, kEventTextInputPosToOffset }, + { kEventClassTextInput, kEventTextInputShowHideBottomWindow }, + { kEventClassTextInput, kEventTextInputGetSelectedText }, + { kEventClassTextInput, kEventTextInputFilterText }, + + // TSM Document Access events (advanced input method support) + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetLength }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetSelectedRange }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetCharacters }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetFont }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetGlyphInfo }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessLockDocument }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessUnlockDocument } }; static EventTypeSpec GlobalHandlerEventList[] = @@ -195,7 +209,22 @@ static EventTypeSpec GlobalHandlerEventList[] = { kEventClassKeyboard, kEventRawKeyModifiersChanged }, // Text input events - { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } + { kEventClassTextInput, kEventTextInputUpdateActiveInputArea }, + { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }, + { kEventClassTextInput, kEventTextInputOffsetToPos }, + { kEventClassTextInput, kEventTextInputPosToOffset }, + { kEventClassTextInput, kEventTextInputShowHideBottomWindow }, + { kEventClassTextInput, kEventTextInputGetSelectedText }, + { kEventClassTextInput, kEventTextInputFilterText }, + + // TSM Document Access events (advanced input method support) + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetLength }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetSelectedRange }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetCharacters }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetFont }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetGlyphInfo }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessLockDocument }, + { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessUnlockDocument } }; static EventTypeSpec CommandHandlerEventList[] = @@ -246,6 +275,7 @@ LLWindowMacOSX::LLWindowMacOSX(char *title, char *name, S32 x, S32 y, S32 width, mLanguageTextInputAllowed = FALSE; mTSMScriptCode = 0; mTSMLangCode = 0; + mPreeditor = NULL; // 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. @@ -497,15 +527,16 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits mTSMDocument = NULL; } static InterfaceTypeList types = { kUnicodeDocument }; - OSErr err = NewTSMDocument(1, types, &mTSMDocument, 0); + 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); + UseInputWindow(mTSMDocument, FALSE); + allowLanguageTextInput(NULL, FALSE); } } @@ -703,7 +734,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits if (check_for_card(RENDERER, CARD_LIST[i])) { close(); - shell_open( "help/unsupported_card.html" ); return FALSE; } } @@ -1949,6 +1979,141 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e { switch (evtKind) { + case kEventTextInputUpdateActiveInputArea: + { + EventParamType param_type; + + long fix_len; + UInt32 text_len; + if (mPreeditor + && (result = GetEventParameter(event, kEventParamTextInputSendFixLen, + typeLongInteger, ¶m_type, sizeof(fix_len), NULL, &fix_len)) == noErr + && typeLongInteger == param_type + && (result = GetEventParameter(event, kEventParamTextInputSendText, + typeUnicodeText, ¶m_type, 0, &text_len, NULL)) == noErr + && typeUnicodeText == param_type) + { + // Handle an optional (but essential to facilitate TSMDA) ReplaceRange param. + CFRange range; + if (GetEventParameter(event, kEventParamTextInputSendReplaceRange, + typeCFRange, ¶m_type, sizeof(range), NULL, &range) == noErr + && typeCFRange == param_type) + { + // Although the spec. is unclear, replace range should + // not present when there is an active preedit. We just + // ignore the case. markAsPreedit will detect the case and warn it. + const LLWString & text = mPreeditor->getWText(); + const S32 location = wstring_wstring_length_from_utf16_length(text, 0, range.location); + const S32 length = wstring_wstring_length_from_utf16_length(text, location, range.length); + mPreeditor->markAsPreedit(location, length); + } + mPreeditor->resetPreedit(); + + // Receive the text from input method. + U16 *const text = new U16[text_len / sizeof(U16)]; + GetEventParameter(event, kEventParamTextInputSendText, typeUnicodeText, NULL, text_len, NULL, text); + if (fix_len < 0) + { + // Do we still need this? Seems obsolete... + fix_len = text_len; + } + const LLWString fix_string + = utf16str_to_wstring(llutf16string(text, fix_len / sizeof(U16))); + const LLWString preedit_string + = utf16str_to_wstring(llutf16string(text + fix_len / sizeof(U16), (text_len - fix_len) / sizeof(U16))); + delete[] text; + + // Handle fixed (comitted) string. + if (fix_string.length() > 0) + { + for (LLWString::const_iterator i = fix_string.begin(); i != fix_string.end(); i++) + { + mPreeditor->handleUnicodeCharHere(*i, FALSE); + } + } + + // Receive the segment info and caret position. + LLPreeditor::segment_lengths_t preedit_segment_lengths; + LLPreeditor::standouts_t preedit_standouts; + S32 caret_position = preedit_string.length(); + UInt32 text_range_array_size; + if (GetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray, + ¶m_type, 0, &text_range_array_size, NULL) == noErr + && typeTextRangeArray == param_type + && text_range_array_size > sizeof(TextRangeArray)) + { + // TextRangeArray is a variable-length struct. + TextRangeArray * const text_range_array = (TextRangeArray *) new char[text_range_array_size]; + GetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray, + NULL, text_range_array_size, NULL, text_range_array); + + // WARNING: We assume ranges are in ascending order, + // although the condition is undocumented. It seems + // OK to assume this. I also assumed + // the ranges are contiguous in previous versions, but I + // have heard a rumore that older versions os ATOK may + // return ranges with some _gap_. I don't know whether + // it is true, but I'm preparing my code for the case. + + const S32 ranges = text_range_array->fNumOfRanges; + preedit_segment_lengths.reserve(ranges); + preedit_standouts.reserve(ranges); + + S32 last_bytes = 0; + S32 last_utf32 = 0; + for (S32 i = 0; i < ranges; i++) + { + const TextRange &range = text_range_array->fRange[i]; + if (range.fStart > last_bytes) + { + const S32 length_utf16 = (range.fStart - last_bytes) / sizeof(U16); + const S32 length_utf32 = wstring_wstring_length_from_utf16_length(preedit_string, last_utf32, length_utf16); + preedit_segment_lengths.push_back(length_utf32); + preedit_standouts.push_back(FALSE); + last_utf32 += length_utf32; + } + if (range.fEnd > range.fStart) + { + const S32 length_utf16 = (range.fEnd - range.fStart) / sizeof(U16); + const S32 length_utf32 = wstring_wstring_length_from_utf16_length(preedit_string, last_utf32, length_utf16); + preedit_segment_lengths.push_back(length_utf32); + preedit_standouts.push_back( + kTSMHiliteSelectedRawText == range.fHiliteStyle + || kTSMHiliteSelectedConvertedText == range.fHiliteStyle + || kTSMHiliteSelectedText == range.fHiliteStyle); + last_utf32 += length_utf32; + } + if (kTSMHiliteCaretPosition == range.fHiliteStyle) + { + caret_position = last_utf32; + } + last_bytes = range.fEnd; + } + if (preedit_string.length() > last_utf32) + { + preedit_segment_lengths.push_back(preedit_string.length() - last_utf32); + preedit_standouts.push_back(FALSE); + } + + delete[] (char *) text_range_array; + } + + // Handle preedit string. + if (preedit_string.length() > 0) + { + if (preedit_segment_lengths.size() == 0) + { + preedit_segment_lengths.push_back(preedit_string.length()); + preedit_standouts.push_back(FALSE); + } + mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); + } + + result = noErr; + } + } + break; + case kEventTextInputUnicodeForKeyEvent: { UInt32 modifiers = 0; @@ -2021,6 +2186,63 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e result = err; } break; + + case kEventTextInputOffsetToPos: + { + EventParamType param_type; + long offset; + if (mPreeditor + && GetEventParameter(event, kEventParamTextInputSendTextOffset, typeLongInteger, + ¶m_type, sizeof(offset), NULL, &offset) == noErr + && typeLongInteger == param_type) + { + S32 preedit, preedit_length; + mPreeditor->getPreeditRange(&preedit, &preedit_length); + const LLWString & text = mPreeditor->getWText(); + + LLCoordGL caret_coord; + LLRect preedit_bounds; + if (0 <= offset + && mPreeditor->getPreeditLocation(wstring_wstring_length_from_utf16_length(text, preedit, offset / sizeof(U16)), + &caret_coord, &preedit_bounds, NULL)) + { + LLCoordGL caret_base_coord(caret_coord.mX, preedit_bounds.mBottom); + LLCoordScreen caret_base_coord_screen; + convertCoords(caret_base_coord, &caret_base_coord_screen); + Point qd_point; + qd_point.h = caret_base_coord_screen.mX; + qd_point.v = caret_base_coord_screen.mY; + SetEventParameter(event, kEventParamTextInputReplyPoint, typeQDPoint, sizeof(qd_point), &qd_point); + + short line_height = (short) preedit_bounds.getHeight(); + SetEventParameter(event, kEventParamTextInputReplyLineHeight, typeShortInteger, sizeof(line_height), &line_height); + + result = noErr; + } + else + { + result = errOffsetInvalid; + } + } + } + break; + + case kEventTextInputGetSelectedText: + { + if (mPreeditor) + { + S32 selection, selection_length; + mPreeditor->getSelectionRange(&selection, &selection_length); + if (selection_length) + { + const LLWString text = mPreeditor->getWText().substr(selection, selection_length); + const llutf16string text_utf16 = wstring_to_utf16str(text); + result = SetEventParameter(event, kEventParamTextInputReplyText, typeUnicodeText, + text_utf16.length() * sizeof(U16), text_utf16.c_str()); + } + } + } + break; } } break; @@ -2194,6 +2416,13 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e switch (evtKind) { case kEventMouseDown: + if (mLanguageTextInputAllowed) + { + // We need to interrupt before handling mouse events, + // so that the fixed string from IM are delivered to + // the currently focused UI component. + interruptLanguageTextInput(); + } switch(button) { case kEventMouseButtonPrimary: @@ -2287,6 +2516,10 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e mCallbacks->handleFocus(this); break; case kEventWindowDeactivated: + if (mTSMDocument) + { + DeactivateTSMDocument(mTSMDocument); + } mCallbacks->handleFocusLost(this); break; case kEventWindowBoundsChanging: @@ -2359,6 +2592,109 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e // BringToFront(mWindow); // result = noErr; break; + + } + break; + + case kEventClassTSMDocumentAccess: + if (mPreeditor) + { + switch(evtKind) + { + + case kEventTSMDocumentAccessGetLength: + { + // Return the number of UTF-16 units in the text, excluding those for preedit. + + S32 preedit, preedit_length; + mPreeditor->getPreeditRange(&preedit, &preedit_length); + const LLWString & text = mPreeditor->getWText(); + const CFIndex length = wstring_utf16_length(text, 0, preedit) + + wstring_utf16_length(text, preedit + preedit_length, text.length()); + result = SetEventParameter(event, kEventParamTSMDocAccessCharacterCount, typeCFIndex, sizeof(length), &length); + } + break; + + case kEventTSMDocumentAccessGetSelectedRange: + { + // Return the selected range, excluding preedit. + // In our preeditor, preedit and selection are exclusive, so, + // when it has a preedit, there is no selection and the + // insertion point is on the preedit that corrupses into the + // beginning of the preedit when the preedit was removed. + + S32 preedit, preedit_length; + mPreeditor->getPreeditRange(&preedit, &preedit_length); + const LLWString & text = mPreeditor->getWText(); + + CFRange range; + if (preedit_length) + { + range.location = wstring_utf16_length(text, 0, preedit); + range.length = 0; + } + else + { + S32 selection, selection_length; + mPreeditor->getSelectionRange(&selection, &selection_length); + range.location = wstring_utf16_length(text, 0, selection); + range.length = wstring_utf16_length(text, selection, selection_length); + } + + result = SetEventParameter(event, kEventParamTSMDocAccessReplyCharacterRange, typeCFRange, sizeof(range), &range); + } + break; + + case kEventTSMDocumentAccessGetCharacters: + { + UniChar *target_pointer; + CFRange range; + EventParamType param_type; + if ((result = GetEventParameter(event, kEventParamTSMDocAccessSendCharacterRange, + typeCFRange, ¶m_type, sizeof(range), NULL, &range)) == noErr + && typeCFRange == param_type + && (result = GetEventParameter(event, kEventParamTSMDocAccessSendCharactersPtr, + typePtr, ¶m_type, sizeof(target_pointer), NULL, &target_pointer)) == noErr + && typePtr == param_type) + { + S32 preedit, preedit_length; + mPreeditor->getPreeditRange(&preedit, &preedit_length); + const LLWString & text = mPreeditor->getWText(); + + // The GetCharacters event of TSMDA has a fundamental flaw; + // An input method need to decide the starting offset and length + // *before* it actually see the contents, so it is impossible + // to guarantee the character-aligned access. The event reply + // has no way to indicate a condition something like "Request + // was not fulfilled due to unaligned access. Please retry." + // Any error sent back to the input method stops use of TSMDA + // entirely during the session... + // We need to simulate very strictly the behaviour as if the + // underlying *text engine* holds the contents in UTF-16. + // I guess this is the reason why Apple repeats saying "all + // text handling application should use UTF-16." They are + // trying to _fix_ the flaw by changing the appliations... + // ... or, domination of UTF-16 in the industry may be a part + // of the company vision, and Apple is trying to force third + // party developers to obey their vision. Remember that use + // of 16 bits per _a_character_ was one of the very fundamental + // Unicode design policy on its early days (during late 80s) + // and the original Unicode design was by two Apple employees... + + const llutf16string text_utf16 + = wstring_to_utf16str(text, preedit) + + wstring_to_utf16str(text.substr(preedit + preedit_length)); + + llassert_always(sizeof(U16) == sizeof(UniChar)); + llassert(0 <= range.location && 0 <= range.length && range.location + range.length <= text_utf16.length()); + memcpy(target_pointer, text_utf16.c_str() + range.location, range.length * sizeof(UniChar)); + + // Note that result has already been set above. + } + } + break; + + } } break; } @@ -2862,46 +3198,6 @@ void spawn_web_browser(const char* escaped_url) } } -void shell_open( const char* file_path ) -{ - OSStatus result = noErr; - - llinfos << "Opening " << file_path << llendl; - CFURLRef urlRef = NULL; - - CFStringRef stringRef = CFStringCreateWithCString(NULL, file_path, kCFStringEncodingUTF8); - if (stringRef) - { - // This will succeed if the string is a full URL, including the http:// - // Note that URLs specified this way need to be properly percent-escaped. - urlRef = CFURLCreateWithString(NULL, stringRef, NULL); - - if(urlRef == NULL) - { - // This will succeed if the string is a full or partial posix path. - // This will work even if the path contains characters that would need to be percent-escaped - // in the URL (such as spaces). - urlRef = CFURLCreateWithFileSystemPath(NULL, stringRef, kCFURLPOSIXPathStyle, false); - } - - CFRelease(stringRef); - } - - if (urlRef) - { - result = LSOpenCFURLRef(urlRef, NULL); - - if (result != noErr) - { - llinfos << "Error " << result << " on open." << llendl; - } - CFRelease(urlRef); - } - else - { - llinfos << "Error: couldn't create URL." << llendl; - } -} BOOL LLWindowMacOSX::dialog_color_picker ( F32 *r, F32 *g, F32 *b) { @@ -2995,10 +3291,34 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key) return int_value; // otherwise return the long value } -void LLWindowMacOSX::allowLanguageTextInput(BOOL b) +void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) { ScriptLanguageRecord script_language; + if (preeditor != mPreeditor && !b) + { + // This condition may occur by a call to + // setEnabled(BOOL) against LLTextEditor or LLLineEditor + // when the control is not focused. + // We need to silently ignore the case so that + // the language input status of the focused control + // is not disturbed. + return; + } + + // Take care of old and new preeditors. + if (preeditor != mPreeditor || !b) + { + // We need to interrupt before updating mPreeditor, + // so that the fix string from input method goes to + // the old preeditor. + if (mLanguageTextInputAllowed) + { + interruptLanguageTextInput(); + } + mPreeditor = (b ? preeditor : NULL); + } + if (b == mLanguageTextInputAllowed) { return; @@ -3028,4 +3348,12 @@ void LLWindowMacOSX::allowLanguageTextInput(BOOL b) } } +void LLWindowMacOSX::interruptLanguageTextInput() +{ + if (mTSMDocument) + { + FixTSMDocument(mTSMDocument); + } +} + #endif // LL_DARWIN diff --git a/linden/indra/llwindow/llwindowmacosx.h b/linden/indra/llwindow/llwindowmacosx.h index b242433..80145b9 100644 --- a/linden/indra/llwindow/llwindowmacosx.h +++ b/linden/indra/llwindow/llwindowmacosx.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -111,8 +111,10 @@ public: /*virtual*/ void *getPlatformWindow(); /*virtual*/ void bringToFront() {}; - /*virtual*/ void allowLanguageTextInput(BOOL b); - + /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); + /*virtual*/ void updateLanguageTextInputArea(const LLCoordGL& caret, const LLRect& bounds); + /*virtual*/ void interruptLanguageTextInput(); + protected: LLWindowMacOSX( char *title, char *name, int x, int y, int width, int height, U32 flags, @@ -193,6 +195,7 @@ protected: BOOL mLanguageTextInputAllowed; ScriptCode mTSMScriptCode; LangCode mTSMLangCode; + LLPreeditor* mPreeditor; friend class LLWindowManager; }; @@ -215,6 +218,5 @@ private: S32 OSMessageBoxMacOSX(const char* text, const char* caption, U32 type); void load_url_external(const char* url); -void shell_open( const char* file_path ); #endif //LL_LLWINDOWMACOSX_H diff --git a/linden/indra/llwindow/llwindowmesaheadless.cpp b/linden/indra/llwindow/llwindowmesaheadless.cpp index a7896d3..01b00af 100644 --- a/linden/indra/llwindow/llwindowmesaheadless.cpp +++ b/linden/indra/llwindow/llwindowmesaheadless.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowmesaheadless.h b/linden/indra/llwindow/llwindowmesaheadless.h index 61107b4..29e5878 100644 --- a/linden/indra/llwindow/llwindowmesaheadless.h +++ b/linden/indra/llwindow/llwindowmesaheadless.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index 2fc1007..7d42bce 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -2230,11 +2230,11 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty bmpsurface->w, bmpsurface->h, 32, - 0xFFU, - 0xFF00U, - 0xFF0000U, - 0xFF000000U); - SDL_FillRect(cursurface, NULL, 0x00000000U); + SDL_SwapLE32(0xFFU), + SDL_SwapLE32(0xFF00U), + SDL_SwapLE32(0xFF0000U), + SDL_SwapLE32(0xFF000000U)); + SDL_FillRect(cursurface, NULL, SDL_SwapLE32(0x00000000U)); // Blit the cursor pixel data onto a 32-bit RGBA surface so we // only have to cope with processing one type of pixel format. @@ -2253,13 +2253,13 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty // is inferred by color-keying against 200,200,200 for (i=0; ih; ++i) { for (j=0; jw; ++j) { - unsigned char *pixelp = - ((unsigned char *)cursurface->pixels) + U8 *pixelp = + ((U8*)cursurface->pixels) + cursurface->pitch * i + j*cursurface->format->BytesPerPixel; - unsigned char srcred = pixelp[0]; - unsigned char srcgreen = pixelp[1]; - unsigned char srcblue = pixelp[2]; + U8 srcred = pixelp[0]; + U8 srcgreen = pixelp[1]; + U8 srcblue = pixelp[2]; BOOL mask_bit = (srcred != 200) || (srcgreen != 200) || (srcblue != 200); @@ -2741,11 +2741,6 @@ void spawn_web_browser(const char* escaped_url) llinfos << "spawn_web_browser returning." << llendl; } -void shell_open( const char* file_path ) -{ - // *TODO: This function is deprecated and should probably go away. - llwarns << "Deprecated shell_open(): " << file_path << llendl; -} void *LLWindowSDL::getPlatformWindow() { diff --git a/linden/indra/llwindow/llwindowsdl.h b/linden/indra/llwindow/llwindowsdl.h index 8c70ef3..3d102b9 100644 --- a/linden/indra/llwindow/llwindowsdl.h +++ b/linden/indra/llwindow/llwindowsdl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,6 +37,7 @@ #include "llwindow.h" #include "SDL/SDL.h" +#include "SDL/SDL_endian.h" #if LL_X11 // get X11-specific headers for use in low-level stuff like copy-and-paste support @@ -222,7 +223,6 @@ public: S32 OSMessageBoxSDL(const char* text, const char* caption, U32 type); void load_url_external(const char* url); -void shell_open( const char* file_path ); #if LL_GTK // Lazily initialize and check the runtime GTK version for goodness. diff --git a/linden/indra/llwindow/llwindowsolaris.cpp b/linden/indra/llwindow/llwindowsolaris.cpp index c670ecc..54a77ae 100644 --- a/linden/indra/llwindow/llwindowsolaris.cpp +++ b/linden/indra/llwindow/llwindowsolaris.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowsolaris.h b/linden/indra/llwindow/llwindowsolaris.h index 5b10560..7aeac58 100644 --- a/linden/indra/llwindow/llwindowsolaris.h +++ b/linden/indra/llwindow/llwindowsolaris.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp index 2fcb36c..171cc09 100644 --- a/linden/indra/llwindow/llwindowwin32.cpp +++ b/linden/indra/llwindow/llwindowwin32.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -57,6 +57,8 @@ #include "indra_constants.h" +#include "llpreeditor.h" + // culled from winuser.h #ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */ const S32 WM_MOUSEWHEEL = 0x020A; @@ -82,7 +84,6 @@ LLW32MsgCallback gAsyncMsgCallback = NULL; void show_window_creation_error(const char* title) { llwarns << title << llendl; - shell_open( "help/window_creation_error.html"); } //static @@ -112,6 +113,7 @@ public: public: // Wrappers for IMM API. static BOOL isIME(HKL hkl); + static HWND getDefaultIMEWnd(HWND hwnd); static HIMC getContext(HWND hwnd); static BOOL releaseContext(HWND hwnd, HIMC himc); static BOOL getOpenStatus(HIMC himc); @@ -120,6 +122,11 @@ public: static BOOL setConversionStatus(HIMC himc, DWORD conversion, DWORD sentence); static BOOL getCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form); static BOOL setCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form); + static LONG getCompositionString(HIMC himc, DWORD index, LPVOID data, DWORD length); + static BOOL setCompositionString(HIMC himc, DWORD index, LPVOID pComp, DWORD compLength, LPVOID pRead, DWORD readLength); + static BOOL setCompositionFont(HIMC himc, LPLOGFONTW logfont); + static BOOL setCandidateWindow(HIMC himc, LPCANDIDATEFORM candidate_form); + static BOOL notifyIME(HIMC himc, DWORD action, DWORD index, DWORD value); private: LLWinImm(); @@ -128,6 +135,7 @@ private: private: // Pointers to IMM API. BOOL (WINAPI *mImmIsIME)(HKL); + HWND (WINAPI *mImmGetDefaultIMEWnd)(HWND); HIMC (WINAPI *mImmGetContext)(HWND); BOOL (WINAPI *mImmReleaseContext)(HWND, HIMC); BOOL (WINAPI *mImmGetOpenStatus)(HIMC); @@ -136,6 +144,11 @@ private: BOOL (WINAPI *mImmSetConversionStatus)(HIMC, DWORD, DWORD); BOOL (WINAPI *mImmGetCompostitionWindow)(HIMC, LPCOMPOSITIONFORM); BOOL (WINAPI *mImmSetCompostitionWindow)(HIMC, LPCOMPOSITIONFORM); + LONG (WINAPI *mImmGetCompositionString)(HIMC, DWORD, LPVOID, DWORD); + BOOL (WINAPI *mImmSetCompositionString)(HIMC, DWORD, LPVOID, DWORD, LPVOID, DWORD); + BOOL (WINAPI *mImmSetCompositionFont)(HIMC, LPLOGFONTW); + BOOL (WINAPI *mImmSetCandidateWindow)(HIMC, LPCANDIDATEFORM); + BOOL (WINAPI *mImmNotifyIME)(HIMC, DWORD, DWORD, DWORD); private: HMODULE mHImmDll; @@ -155,6 +168,7 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) if (mHImmDll != NULL) { mImmIsIME = (BOOL (WINAPI *)(HKL)) GetProcAddress(mHImmDll, "ImmIsIME"); + mImmGetDefaultIMEWnd = (HWND (WINAPI *)(HWND)) GetProcAddress(mHImmDll, "ImmGetDefaultIMEWnd"); mImmGetContext = (HIMC (WINAPI *)(HWND)) GetProcAddress(mHImmDll, "ImmGetContext"); mImmReleaseContext = (BOOL (WINAPI *)(HWND, HIMC)) GetProcAddress(mHImmDll, "ImmReleaseContext"); mImmGetOpenStatus = (BOOL (WINAPI *)(HIMC)) GetProcAddress(mHImmDll, "ImmGetOpenStatus"); @@ -163,8 +177,14 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) mImmSetConversionStatus = (BOOL (WINAPI *)(HIMC, DWORD, DWORD)) GetProcAddress(mHImmDll, "ImmSetConversionStatus"); mImmGetCompostitionWindow = (BOOL (WINAPI *)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(mHImmDll, "ImmGetCompositionWindow"); mImmSetCompostitionWindow = (BOOL (WINAPI *)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(mHImmDll, "ImmSetCompositionWindow"); + mImmGetCompositionString= (LONG (WINAPI *)(HIMC, DWORD, LPVOID, DWORD)) GetProcAddress(mHImmDll, "ImmGetCompositionStringW"); + mImmSetCompositionString= (BOOL (WINAPI *)(HIMC, DWORD, LPVOID, DWORD, LPVOID, DWORD)) GetProcAddress(mHImmDll, "ImmSetCompositionStringW"); + mImmSetCompositionFont = (BOOL (WINAPI *)(HIMC, LPLOGFONTW)) GetProcAddress(mHImmDll, "ImmSetCompositionFontW"); + mImmSetCandidateWindow = (BOOL (WINAPI *)(HIMC, LPCANDIDATEFORM)) GetProcAddress(mHImmDll, "ImmSetCandidateWindow"); + mImmNotifyIME = (BOOL (WINAPI *)(HIMC, DWORD, DWORD, DWORD)) GetProcAddress(mHImmDll, "ImmNotifyIME"); if (mImmIsIME == NULL || + mImmGetDefaultIMEWnd == NULL || mImmGetContext == NULL || mImmReleaseContext == NULL || mImmGetOpenStatus == NULL || @@ -172,7 +192,12 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) mImmGetConversionStatus == NULL || mImmSetConversionStatus == NULL || mImmGetCompostitionWindow == NULL || - mImmSetCompostitionWindow == NULL) + mImmSetCompostitionWindow == NULL || + mImmGetCompositionString == NULL || + mImmSetCompositionString == NULL || + mImmSetCompositionFont == NULL || + mImmSetCandidateWindow == NULL || + mImmNotifyIME == 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 @@ -186,6 +211,7 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) // If we unload the library, make sure all the function pointers are cleared mImmIsIME = NULL; + mImmGetDefaultIMEWnd = NULL; mImmGetContext = NULL; mImmReleaseContext = NULL; mImmGetOpenStatus = NULL; @@ -194,6 +220,11 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) mImmSetConversionStatus = NULL; mImmGetCompostitionWindow = NULL; mImmSetCompostitionWindow = NULL; + mImmGetCompositionString = NULL; + mImmSetCompositionString = NULL; + mImmSetCompositionFont = NULL; + mImmSetCandidateWindow = NULL; + mImmNotifyIME = NULL; } } } @@ -272,6 +303,50 @@ BOOL LLWinImm::setCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form) } +// static +LONG LLWinImm::getCompositionString(HIMC himc, DWORD index, LPVOID data, DWORD length) +{ + if ( sTheInstance.mImmGetCompositionString ) + return sTheInstance.mImmGetCompositionString(himc, index, data, length); + return FALSE; +} + + +// static +BOOL LLWinImm::setCompositionString(HIMC himc, DWORD index, LPVOID pComp, DWORD compLength, LPVOID pRead, DWORD readLength) +{ + if ( sTheInstance.mImmSetCompositionString ) + return sTheInstance.mImmSetCompositionString(himc, index, pComp, compLength, pRead, readLength); + return FALSE; +} + +// static +BOOL LLWinImm::setCompositionFont(HIMC himc, LPLOGFONTW pFont) +{ + if ( sTheInstance.mImmSetCompositionFont ) + return sTheInstance.mImmSetCompositionFont(himc, pFont); + return FALSE; +} + +// static +BOOL LLWinImm::setCandidateWindow(HIMC himc, LPCANDIDATEFORM form) +{ + if ( sTheInstance.mImmSetCandidateWindow ) + return sTheInstance.mImmSetCandidateWindow(himc, form); + return FALSE; +} + +// static +BOOL LLWinImm::notifyIME(HIMC himc, DWORD action, DWORD index, DWORD value) +{ + if ( sTheInstance.mImmNotifyIME ) + return sTheInstance.mImmNotifyIME(himc, action, index, value); + return FALSE; +} + + + + // ---------------------------------------------------------------------------------------- LLWinImm::~LLWinImm() { @@ -304,13 +379,14 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width, mNativeAspectRatio = 0.f; mMousePositionModified = FALSE; mInputProcessingPaused = FALSE; + mPreeditor = NULL; // 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); + allowLanguageTextInput(mPreeditor, FALSE); GLuint pixel_format; WNDCLASS wc; @@ -938,6 +1014,10 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width, initCursors(); setCursor( UI_CURSOR_ARROW ); + // Initialize (boot strap) the Language text input management, + // based on the system's (or user's) default settings. + allowLanguageTextInput(NULL, FALSE); + // Direct Input HRESULT hr; @@ -2035,6 +2115,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ BOOL minimized = BOOL(HIWORD(w_param)); + if (!activating && LLWinImm::isAvailable() && window_imp->mPreeditor) + { + window_imp->interruptLanguageTextInput(); + } + // JC - I'm not sure why, but if we don't report that we handled the // WM_ACTIVATE message, the WM_ACTIVATEAPP messages don't work // properly when we run fullscreen. @@ -2127,6 +2212,47 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // pass on to windows break; + case WM_IME_SETCONTEXT: + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + l_param &= ~ISC_SHOWUICOMPOSITIONWINDOW; + // Invoke DefWinProc with the modified LPARAM. + } + break; + + case WM_IME_STARTCOMPOSITION: + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + window_imp->handleStartCompositionMessage(); + return 0; + } + break; + + case WM_IME_ENDCOMPOSITION: + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + return 0; + } + break; + + case WM_IME_COMPOSITION: + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + window_imp->handleCompositionMessage(l_param); + return 0; + } + break; + + case WM_IME_REQUEST: + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + LRESULT result = 0; + if (window_imp->handleImeRequests(w_param, l_param, &result)) + { + return result; + } + } + break; case WM_CHAR: // Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need @@ -2154,6 +2280,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_LBUTTONDOWN: { + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + window_imp->interruptLanguageTextInput(); + } + // Because we move the cursor position in the app, we need to query // to find out where the cursor at the time the event is handled. // If we don't do this, many clicks could get buffered up, and if the @@ -2236,6 +2367,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_RBUTTONDBLCLK: case WM_RBUTTONDOWN: { + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + window_imp->interruptLanguageTextInput(); + } + // Because we move the cursor position in tllviewerhe app, we need to query // to find out where the cursor at the time the event is handled. // If we don't do this, many clicks could get buffered up, and if the @@ -2287,6 +2423,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ case WM_MBUTTONDOWN: // case WM_MBUTTONDBLCLK: { + if (LLWinImm::isAvailable() && window_imp->mPreeditor) + { + window_imp->interruptLanguageTextInput(); + } + // Because we move the cursor position in tllviewerhe app, we need to query // to find out where the cursor at the time the event is handled. // If we don't do this, many clicks could get buffered up, and if the @@ -3256,24 +3397,6 @@ void spawn_web_browser(const char* escaped_url ) } } -void shell_open( const char* file_path ) -{ - llinfos << "Opening " << file_path << llendl; - - WCHAR wstr[1024]; - mbstowcs(wstr, file_path, 1024); - - HWND our_window = NULL; - int retval = (int) ShellExecute(our_window, L"open", wstr, NULL, NULL, SW_SHOWNORMAL); /* Flawfinder: ignore */ - if (retval > 32) - { - llinfos << "ShellExecute success with " << retval << llendl; - } - else - { - llinfos << "ShellExecute failure with " << retval << llendl; - } -} BOOL LLWindowWin32::dialog_color_picker ( F32 *r, F32 *g, F32 *b ) { @@ -3324,15 +3447,37 @@ void LLWindowWin32::focusClient() SetFocus ( mWindowHandle ); } -void LLWindowWin32::allowLanguageTextInput(BOOL b) +void LLWindowWin32::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) { if (b == sLanguageTextInputAllowed || !LLWinImm::isAvailable()) { return; } + + if (preeditor != mPreeditor && !b) + { + // This condition may occur with a call to + // setEnabled(BOOL) from LLTextEditor or LLLineEditor + // when the control is not focused. + // We need to silently ignore the case so that + // the language input status of the focused control + // is not disturbed. + return; + } + + // Take care of old and new preeditors. + if (preeditor != mPreeditor || !b) + { + if (sLanguageTextInputAllowed) + { + interruptLanguageTextInput(); + } + mPreeditor = (b ? preeditor : NULL); + } + sLanguageTextInputAllowed = b; - if (b) + if ( sLanguageTextInputAllowed ) { // 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 @@ -3368,7 +3513,24 @@ void LLWindowWin32::allowLanguageTextInput(BOOL b) LLWinImm::releaseContext(mWindowHandle, himc); } } +} + +void LLWindowWin32::fillCandidateForm(const LLCoordGL& caret, const LLRect& bounds, + CANDIDATEFORM *form) +{ + LLCoordWindow caret_coord, top_left, bottom_right; + convertCoords(caret, &caret_coord); + convertCoords(LLCoordGL(bounds.mLeft, bounds.mTop), &top_left); + convertCoords(LLCoordGL(bounds.mRight, bounds.mBottom), &bottom_right); + memset(form, 0, sizeof(CANDIDATEFORM)); + form->dwStyle = CFS_EXCLUDE; + form->ptCurrentPos.x = caret_coord.mX; + form->ptCurrentPos.y = caret_coord.mY; + form->rcArea.left = top_left.mX; + form->rcArea.top = top_left.mY; + form->rcArea.right = bottom_right.mX; + form->rcArea.bottom = bottom_right.mY; } @@ -3400,4 +3562,455 @@ void LLWindowWin32::setLanguageTextInput( const LLCoordGL & position ) } } + +void LLWindowWin32::fillCharPosition(const LLCoordGL& caret, const LLRect& bounds, const LLRect& control, + IMECHARPOSITION *char_position) +{ + LLCoordScreen caret_coord, top_left, bottom_right; + convertCoords(caret, &caret_coord); + convertCoords(LLCoordGL(bounds.mLeft, bounds.mTop), &top_left); + convertCoords(LLCoordGL(bounds.mRight, bounds.mBottom), &bottom_right); + + char_position->pt.x = caret_coord.mX; + char_position->pt.y = top_left.mY; // Windows wants the coordinate of upper left corner of a character... + char_position->cLineHeight = bottom_right.mY - top_left.mY; + char_position->rcDocument.left = top_left.mX; + char_position->rcDocument.top = top_left.mY; + char_position->rcDocument.right = bottom_right.mX; + char_position->rcDocument.bottom = bottom_right.mY; +} + +void LLWindowWin32::fillCompositionLogfont(LOGFONT *logfont) +{ + // Our font is a list of FreeType recognized font files that may + // not have a corresponding ones in Windows' fonts. Hence, we + // can't simply tell Windows which font we are using. We will + // notify a _standard_ font for a current input locale instead. + // We use a hard-coded knowledge about the Windows' standard + // configuration to do so... + + memset(logfont, 0, sizeof(LOGFONT)); + + const WORD lang_id = LOWORD(GetKeyboardLayout(0)); + switch (PRIMARYLANGID(lang_id)) + { + case LANG_CHINESE: + // We need to identify one of two Chinese fonts. + switch (SUBLANGID(lang_id)) + { + case SUBLANG_CHINESE_SIMPLIFIED: + case SUBLANG_CHINESE_SINGAPORE: + logfont->lfCharSet = GB2312_CHARSET; + lstrcpy(logfont->lfFaceName, TEXT("SimHei")); + break; + case SUBLANG_CHINESE_TRADITIONAL: + case SUBLANG_CHINESE_HONGKONG: + case SUBLANG_CHINESE_MACAU: + default: + logfont->lfCharSet = CHINESEBIG5_CHARSET; + lstrcpy(logfont->lfFaceName, TEXT("MingLiU")); + break; + } + break; + case LANG_JAPANESE: + logfont->lfCharSet = SHIFTJIS_CHARSET; + lstrcpy(logfont->lfFaceName, TEXT("MS Gothic")); + break; + case LANG_KOREAN: + logfont->lfCharSet = HANGUL_CHARSET; + lstrcpy(logfont->lfFaceName, TEXT("Gulim")); + break; + default: + logfont->lfCharSet = ANSI_CHARSET; + lstrcpy(logfont->lfFaceName, TEXT("Tahoma")); + break; + } + + logfont->lfHeight = mPreeditor->getPreeditFontSize(); + logfont->lfWeight = FW_NORMAL; +} + +U32 LLWindowWin32::fillReconvertString(const LLWString &text, + S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string) +{ + const llutf16string text_utf16 = wstring_to_utf16str(text); + const DWORD required_size = sizeof(RECONVERTSTRING) + (text_utf16.length() + 1) * sizeof(WCHAR); + if (reconvert_string && reconvert_string->dwSize >= required_size) + { + const DWORD focus_utf16_at = wstring_utf16_length(text, 0, focus); + const DWORD focus_utf16_length = wstring_utf16_length(text, focus, focus_length); + + reconvert_string->dwVersion = 0; + reconvert_string->dwStrLen = text_utf16.length(); + reconvert_string->dwStrOffset = sizeof(RECONVERTSTRING); + reconvert_string->dwCompStrLen = focus_utf16_length; + reconvert_string->dwCompStrOffset = focus_utf16_at * sizeof(WCHAR); + reconvert_string->dwTargetStrLen = 0; + reconvert_string->dwTargetStrOffset = focus_utf16_at * sizeof(WCHAR); + + const LPWSTR text = (LPWSTR)((BYTE *)reconvert_string + sizeof(RECONVERTSTRING)); + memcpy(text, text_utf16.c_str(), (text_utf16.length() + 1) * sizeof(WCHAR)); + } + return required_size; +} + +void LLWindowWin32::updateLanguageTextInputArea() +{ + if (!mPreeditor || !LLWinImm::isAvailable()) + { + return; + } + + LLCoordGL caret_coord; + LLRect preedit_bounds; + if (mPreeditor->getPreeditLocation(-1, &caret_coord, &preedit_bounds, NULL)) + { + mLanguageTextInputPointGL = caret_coord; + mLanguageTextInputAreaGL = preedit_bounds; + + CANDIDATEFORM candidate_form; + fillCandidateForm(caret_coord, preedit_bounds, &candidate_form); + + HIMC himc = LLWinImm::getContext(mWindowHandle); + // Win32 document says there may be up to 4 candidate windows. + // This magic number 4 appears only in the document, and + // there are no constant/macro for the value... + for (int i = 3; i >= 0; --i) + { + candidate_form.dwIndex = i; + LLWinImm::setCandidateWindow(himc, &candidate_form); + } + LLWinImm::releaseContext(mWindowHandle, himc); + } +} + +void LLWindowWin32::interruptLanguageTextInput() +{ + if (mPreeditor) + { + if (LLWinImm::isAvailable()) + { + HIMC himc = LLWinImm::getContext(mWindowHandle); + LLWinImm::notifyIME(himc, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); + LLWinImm::releaseContext(mWindowHandle, himc); + } + mPreeditor->resetPreedit(); + } +} + +void LLWindowWin32::handleStartCompositionMessage() +{ + // Let IME know the font to use in feedback UI. + LOGFONT logfont; + fillCompositionLogfont(&logfont); + HIMC himc = LLWinImm::getContext(mWindowHandle); + LLWinImm::setCompositionFont(himc, &logfont); + LLWinImm::releaseContext(mWindowHandle, himc); +} + +// Handle WM_IME_COMPOSITION message. + +void LLWindowWin32::handleCompositionMessage(const U32 indexes) +{ + BOOL needs_update = FALSE; + LLWString result_string; + LLWString preedit_string; + S32 preedit_string_utf16_length = 0; + LLPreeditor::segment_lengths_t preedit_segment_lengths; + LLPreeditor::standouts_t preedit_standouts; + + // Step I: Receive details of preedits from IME. + + HIMC himc = LLWinImm::getContext(mWindowHandle); + + if (indexes & GCS_RESULTSTR) + { + LONG size = LLWinImm::getCompositionString(himc, GCS_RESULTSTR, NULL, 0); + if (size >= 0) + { + const LPWSTR data = new WCHAR[size / sizeof(WCHAR) + 1]; + size = LLWinImm::getCompositionString(himc, GCS_RESULTSTR, data, size); + if (size > 0) + { + result_string = utf16str_to_wstring(llutf16string(data, size / sizeof(WCHAR))); + } + delete[] data; + needs_update = TRUE; + } + } + + if (indexes & GCS_COMPSTR) + { + LONG size = LLWinImm::getCompositionString(himc, GCS_COMPSTR, NULL, 0); + if (size >= 0) + { + const LPWSTR data = new WCHAR[size / sizeof(WCHAR) + 1]; + size = LLWinImm::getCompositionString(himc, GCS_COMPSTR, data, size); + if (size > 0) + { + preedit_string_utf16_length = size / sizeof(WCHAR); + preedit_string = utf16str_to_wstring(llutf16string(data, size / sizeof(WCHAR))); + } + delete[] data; + needs_update = TRUE; + } + } + + if ((indexes & GCS_COMPCLAUSE) && preedit_string.length() > 0) + { + LONG size = LLWinImm::getCompositionString(himc, GCS_COMPCLAUSE, NULL, 0); + if (size > 0) + { + const LPDWORD data = new DWORD[size / sizeof(DWORD)]; + size = LLWinImm::getCompositionString(himc, GCS_COMPCLAUSE, data, size); + if (size >= sizeof(DWORD) * 2 + && data[0] == 0 && data[size / sizeof(DWORD) - 1] == preedit_string_utf16_length) + { + preedit_segment_lengths.resize(size / sizeof(DWORD) - 1); + S32 offset = 0; + for (U32 i = 0; i < preedit_segment_lengths.size(); i++) + { + const S32 length = wstring_wstring_length_from_utf16_length(preedit_string, offset, data[i + 1] - data[i]); + preedit_segment_lengths[i] = length; + offset += length; + } + } + delete[] data; + } + } + + if ((indexes & GCS_COMPATTR) && preedit_segment_lengths.size() > 1) + { + LONG size = LLWinImm::getCompositionString(himc, GCS_COMPATTR, NULL, 0); + if (size > 0) + { + const LPBYTE data = new BYTE[size / sizeof(BYTE)]; + size = LLWinImm::getCompositionString(himc, GCS_COMPATTR, data, size); + if (size == preedit_string_utf16_length) + { + preedit_standouts.assign(preedit_segment_lengths.size(), FALSE); + S32 offset = 0; + for (U32 i = 0; i < preedit_segment_lengths.size(); i++) + { + if (ATTR_TARGET_CONVERTED == data[offset] || ATTR_TARGET_NOTCONVERTED == data[offset]) + { + preedit_standouts[i] = TRUE; + } + offset += wstring_utf16_length(preedit_string, offset, preedit_segment_lengths[i]); + } + } + delete[] data; + } + } + + S32 caret_position = preedit_string.length(); + if (indexes & GCS_CURSORPOS) + { + const S32 caret_position_utf16 = LLWinImm::getCompositionString(himc, GCS_CURSORPOS, NULL, 0); + if (caret_position_utf16 >= 0 && caret_position <= preedit_string_utf16_length) + { + caret_position = wstring_wstring_length_from_utf16_length(preedit_string, 0, caret_position_utf16); + } + } + + if (indexes == 0) + { + // I'm not sure this condition really happens, but + // Windows SDK document says it is an indication + // of "reset everything." + needs_update = TRUE; + } + + LLWinImm::releaseContext(mWindowHandle, himc); + + // Step II: Update the active preeditor. + + if (needs_update) + { + mPreeditor->resetPreedit(); + + if (result_string.length() > 0) + { + for (LLWString::const_iterator i = result_string.begin(); i != result_string.end(); i++) + { + mPreeditor->handleUnicodeCharHere(*i, FALSE); + } + } + + if (preedit_string.length() > 0) + { + if (preedit_segment_lengths.size() == 0) + { + preedit_segment_lengths.assign(1, preedit_string.length()); + } + if (preedit_standouts.size() == 0) + { + preedit_standouts.assign(preedit_segment_lengths.size(), FALSE); + } + mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); + } + + // Some IME doesn't query char position after WM_IME_COMPOSITION, + // so we need to update them actively. + updateLanguageTextInputArea(); + } +} + +// Given a text and a focus range, find_context finds and returns a +// surrounding context of the focused subtext. A variable pointed +// to by offset receives the offset in llwchars of the beginning of +// the returned context string in the given wtext. + +static LLWString find_context(const LLWString & wtext, S32 focus, S32 focus_length, S32 *offset) +{ + static const S32 CONTEXT_EXCESS = 30; // This value is by experiences. + + const S32 e = llmin((S32) wtext.length(), focus + focus_length + CONTEXT_EXCESS); + S32 end = focus + focus_length; + while (end < e && '\n' != wtext[end]) + { + end++; + } + + const S32 s = llmax(0, focus - CONTEXT_EXCESS); + S32 start = focus; + while (start > s && '\n' != wtext[start - 1]) + { + --start; + } + + *offset = start; + return wtext.substr(start, end - start); +} + +// Handle WM_IME_REQUEST message. +// If it handled the message, returns TRUE. Otherwise, FALSE. +// When it handled the message, the value to be returned from +// the Window Procedure is set to *result. + +BOOL LLWindowWin32::handleImeRequests(U32 request, U32 param, LRESULT *result) +{ + if ( mPreeditor ) + { + switch (request) + { + case IMR_CANDIDATEWINDOW: // http://msdn2.microsoft.com/en-us/library/ms776080.aspx + { + LLCoordGL caret_coord; + LLRect preedit_bounds; + mPreeditor->getPreeditLocation(-1, &caret_coord, &preedit_bounds, NULL); + + CANDIDATEFORM *const form = (CANDIDATEFORM *)param; + DWORD const dwIndex = form->dwIndex; + fillCandidateForm(caret_coord, preedit_bounds, form); + form->dwIndex = dwIndex; + + *result = 1; + return TRUE; + } + case IMR_QUERYCHARPOSITION: + { + IMECHARPOSITION *const char_position = (IMECHARPOSITION *)param; + + // char_position->dwCharPos counts in number of + // WCHARs, i.e., UTF-16 encoding units, so we can't simply pass the + // number to getPreeditLocation. + + const LLWString & wtext = mPreeditor->getWText(); + S32 preedit, preedit_length; + mPreeditor->getPreeditRange(&preedit, &preedit_length); + LLCoordGL caret_coord; + LLRect preedit_bounds, text_control; + const S32 position = wstring_wstring_length_from_utf16_length(wtext, preedit, char_position->dwCharPos); + + if (!mPreeditor->getPreeditLocation(position, &caret_coord, &preedit_bounds, &text_control)) + { + llwarns << "*** IMR_QUERYCHARPOSITON called but getPreeditLocation failed." << llendl; + return FALSE; + } + fillCharPosition(caret_coord, preedit_bounds, text_control, char_position); + + *result = 1; + return TRUE; + } + case IMR_COMPOSITIONFONT: + { + fillCompositionLogfont((LOGFONT *)param); + + *result = 1; + return TRUE; + } + case IMR_RECONVERTSTRING: + { + mPreeditor->resetPreedit(); + const LLWString & wtext = mPreeditor->getWText(); + S32 select, select_length; + mPreeditor->getSelectionRange(&select, &select_length); + + S32 context_offset; + const LLWString context = find_context(wtext, select, select_length, &context_offset); + + RECONVERTSTRING * const reconvert_string = (RECONVERTSTRING *)param; + const U32 size = fillReconvertString(context, select - context_offset, select_length, reconvert_string); + if (reconvert_string) + { + if (select_length == 0) + { + // Let the IME to decide the reconversion range, and + // adjust the reconvert_string structure accordingly. + HIMC himc = LLWinImm::getContext(mWindowHandle); + const BOOL adjusted = LLWinImm::setCompositionString(himc, + SCS_QUERYRECONVERTSTRING, reconvert_string, size, NULL, 0); + LLWinImm::releaseContext(mWindowHandle, himc); + if (adjusted) + { + const llutf16string & text_utf16 = wstring_to_utf16str(context); + const S32 new_preedit_start = reconvert_string->dwCompStrOffset / sizeof(WCHAR); + const S32 new_preedit_end = new_preedit_start + reconvert_string->dwCompStrLen; + select = utf16str_wstring_length(text_utf16, new_preedit_start); + select_length = utf16str_wstring_length(text_utf16, new_preedit_end) - select; + select += context_offset; + } + } + mPreeditor->markAsPreedit(select, select_length); + } + + *result = size; + return TRUE; + } + case IMR_CONFIRMRECONVERTSTRING: + { + *result = FALSE; + return TRUE; + } + case IMR_DOCUMENTFEED: + { + const LLWString & wtext = mPreeditor->getWText(); + S32 preedit, preedit_length; + mPreeditor->getPreeditRange(&preedit, &preedit_length); + + S32 context_offset; + LLWString context = find_context(wtext, preedit, preedit_length, &context_offset); + preedit -= context_offset; + if (preedit_length) + { + // IMR_DOCUMENTFEED may be called when we have an active preedit. + // We should pass the context string *excluding* the preedit string. + // Otherwise, some IME are confused. + context.erase(preedit, preedit_length); + } + + RECONVERTSTRING *reconvert_string = (RECONVERTSTRING *)param; + *result = fillReconvertString(context, preedit, 0, reconvert_string); + return TRUE; + } + default: + return FALSE; + } + } + + return FALSE; +} + + #endif // LL_WINDOWS diff --git a/linden/indra/llwindow/llwindowwin32.h b/linden/indra/llwindow/llwindowwin32.h index c93b880..3f78dca 100644 --- a/linden/indra/llwindow/llwindowwin32.h +++ b/linden/indra/llwindow/llwindowwin32.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -109,8 +109,10 @@ public: /*virtual*/ void bringToFront(); /*virtual*/ void focusClient(); - /*virtual*/ void allowLanguageTextInput(BOOL b); + /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); /*virtual*/ void setLanguageTextInput( const LLCoordGL & pos ); + /*virtual*/ void updateLanguageTextInputArea(); + /*virtual*/ void interruptLanguageTextInput(); protected: LLWindowWin32( @@ -139,6 +141,14 @@ protected: BOOL shouldPostQuit() { return mPostQuit; } + void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form); + void fillCandidateForm(const LLCoordGL& caret, const LLRect& bounds, CANDIDATEFORM *form); + void fillCharPosition(const LLCoordGL& caret, const LLRect& bounds, const LLRect& control, IMECHARPOSITION *char_position); + void fillCompositionLogfont(LOGFONT *logfont); + U32 fillReconvertString(const LLWString &text, S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string); + void handleStartCompositionMessage(); + void handleCompositionMessage(U32 indexes); + BOOL handleImeRequests(U32 request, U32 param, LRESULT *result); protected: // @@ -189,6 +199,10 @@ protected: static DWORD sWinIMEConversionMode; static DWORD sWinIMESentenceMode; static LLCoordWindow sWinIMEWindowPosition; + LLCoordGL mLanguageTextInputPointGL; + LLRect mLanguageTextInputAreaGL; + + LLPreeditor *mPreeditor; friend class LLWindowManager; }; diff --git a/linden/indra/llxml/llcontrol.cpp b/linden/indra/llxml/llcontrol.cpp index 7196f7b..b97498d 100644 --- a/linden/indra/llxml/llcontrol.cpp +++ b/linden/indra/llxml/llcontrol.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llxml/llcontrol.h b/linden/indra/llxml/llcontrol.h index 4687fb0..4a86adf 100644 --- a/linden/indra/llxml/llcontrol.h +++ b/linden/indra/llxml/llcontrol.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llxml/llxml_vc9.vcproj b/linden/indra/llxml/llxml_vc9.vcproj new file mode 100644 index 0000000..e4553e8 --- /dev/null +++ b/linden/indra/llxml/llxml_vc9.vcproj @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/llxml/llxmlnode.cpp b/linden/indra/llxml/llxmlnode.cpp index 46ffce9..275b6c2 100644 --- a/linden/indra/llxml/llxmlnode.cpp +++ b/linden/indra/llxml/llxmlnode.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llxml/llxmlnode.h b/linden/indra/llxml/llxmlnode.h index 3fbf868..6183ec1 100644 --- a/linden/indra/llxml/llxmlnode.h +++ b/linden/indra/llxml/llxmlnode.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llxml/llxmlparser.cpp b/linden/indra/llxml/llxmlparser.cpp index a1405a6..0cbb82b 100644 --- a/linden/indra/llxml/llxmlparser.cpp +++ b/linden/indra/llxml/llxmlparser.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llxml/llxmlparser.h b/linden/indra/llxml/llxmlparser.h index 352fe93..611605f 100644 --- a/linden/indra/llxml/llxmlparser.h +++ b/linden/indra/llxml/llxmlparser.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llxml/llxmltree.cpp b/linden/indra/llxml/llxmltree.cpp index 43c0da0..4ac05f9 100644 --- a/linden/indra/llxml/llxmltree.cpp +++ b/linden/indra/llxml/llxmltree.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/llxml/llxmltree.h b/linden/indra/llxml/llxmltree.h index 9648152..87fe4f5 100644 --- a/linden/indra/llxml/llxmltree.h +++ b/linden/indra/llxml/llxmltree.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_alloc.h b/linden/indra/lscript/lscript_alloc.h index 4092b43..948eb26 100644 --- a/linden/indra/lscript/lscript_alloc.h +++ b/linden/indra/lscript/lscript_alloc.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_byteconvert.h b/linden/indra/lscript/lscript_byteconvert.h index c61102e..42f71e8 100644 --- a/linden/indra/lscript/lscript_byteconvert.h +++ b/linden/indra/lscript/lscript_byteconvert.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_byteformat.h b/linden/indra/lscript/lscript_byteformat.h index 91f6d7c..1e54e9c 100644 --- a/linden/indra/lscript/lscript_byteformat.h +++ b/linden/indra/lscript/lscript_byteformat.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_alloc.cpp b/linden/indra/lscript/lscript_compile/lscript_alloc.cpp index da6d4ec..fd4532c 100644 --- a/linden/indra/lscript/lscript_compile/lscript_alloc.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_alloc.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp index 0008c13..5838bc3 100644 --- a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_bytecode.h b/linden/indra/lscript/lscript_compile/lscript_bytecode.h index f7794b9..6526e13 100644 --- a/linden/indra/lscript/lscript_compile/lscript_bytecode.h +++ b/linden/indra/lscript/lscript_compile/lscript_bytecode.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_fb.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_fb.vcproj index e65b8cd..af823d0 100755 --- a/linden/indra/lscript/lscript_compile/lscript_compile_fb.vcproj +++ b/linden/indra/lscript/lscript_compile/lscript_compile_fb.vcproj @@ -65,7 +65,7 @@ @@ -74,7 +74,7 @@ @@ -85,8 +85,8 @@ diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj index 1b2e3b7..901a191 100644 --- a/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj +++ b/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj @@ -86,7 +86,7 @@ @@ -96,7 +96,7 @@ @@ -110,7 +110,8 @@ @@ -120,7 +121,8 @@ diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc9.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc9.vcproj new file mode 100644 index 0000000..adfd694 --- /dev/null +++ b/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc9.vcproj @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj index e8a531a..919d290 100644 --- a/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj +++ b/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj @@ -46,7 +46,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - StructMemberAlignment="4" + StructMemberAlignment="0" TreatWChar_tAsBuiltInType="false" ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj new file mode 100644 index 0000000..4831422 --- /dev/null +++ b/linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/lscript/lscript_compile/lscript_error.cpp b/linden/indra/lscript/lscript_compile/lscript_error.cpp index f402ea9..6e03b01 100644 --- a/linden/indra/lscript/lscript_compile/lscript_error.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_error.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_error.h b/linden/indra/lscript/lscript_compile/lscript_error.h index 911f45f..d52bdf7 100644 --- a/linden/indra/lscript/lscript_compile/lscript_error.h +++ b/linden/indra/lscript/lscript_compile/lscript_error.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_heap.cpp b/linden/indra/lscript/lscript_compile/lscript_heap.cpp index fbb6f4d..6976575 100644 --- a/linden/indra/lscript/lscript_compile/lscript_heap.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_heap.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_heap.h b/linden/indra/lscript/lscript_compile/lscript_heap.h index 0caba60..b14f883 100644 --- a/linden/indra/lscript/lscript_compile/lscript_heap.h +++ b/linden/indra/lscript/lscript_compile/lscript_heap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_resource.cpp b/linden/indra/lscript/lscript_compile/lscript_resource.cpp index faf6366..8efd567 100644 --- a/linden/indra/lscript/lscript_compile/lscript_resource.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_resource.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_resource.h b/linden/indra/lscript/lscript_compile/lscript_resource.h index 7337e0e..e0ffed0 100644 --- a/linden/indra/lscript/lscript_compile/lscript_resource.h +++ b/linden/indra/lscript/lscript_compile/lscript_resource.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_scope.cpp b/linden/indra/lscript/lscript_compile/lscript_scope.cpp index 540648f..53a55e5 100644 --- a/linden/indra/lscript/lscript_compile/lscript_scope.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_scope.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_scope.h b/linden/indra/lscript/lscript_compile/lscript_scope.h index 03a9109..8174566 100644 --- a/linden/indra/lscript/lscript_compile/lscript_scope.h +++ b/linden/indra/lscript/lscript_compile/lscript_scope.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp index d17671a..519d726 100644 --- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.h b/linden/indra/lscript/lscript_compile/lscript_tree.h index c7f0aee..393b3e2 100644 --- a/linden/indra/lscript/lscript_compile/lscript_tree.h +++ b/linden/indra/lscript/lscript_compile/lscript_tree.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp b/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp index 8cf1f22..8cfa815 100644 --- a/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_typecheck.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_compile/lscript_typecheck.h b/linden/indra/lscript/lscript_compile/lscript_typecheck.h index dd8d924..141345a 100644 --- a/linden/indra/lscript/lscript_compile/lscript_typecheck.h +++ b/linden/indra/lscript/lscript_compile/lscript_typecheck.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_execute.h b/linden/indra/lscript/lscript_execute.h index 644191f..e9353e3 100644 --- a/linden/indra/lscript/lscript_execute.h +++ b/linden/indra/lscript/lscript_execute.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_execute/lscript_execute.cpp b/linden/indra/lscript/lscript_execute/lscript_execute.cpp index aaaf4e1..1d2438c 100644 --- a/linden/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_execute.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_execute/lscript_execute_vc9.vcproj b/linden/indra/lscript/lscript_execute/lscript_execute_vc9.vcproj new file mode 100644 index 0000000..9c6f7e3 --- /dev/null +++ b/linden/indra/lscript/lscript_execute/lscript_execute_vc9.vcproj @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp b/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp index ac2a3c4..42030fa 100644 --- a/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_heapruntime.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_execute/lscript_heapruntime.h b/linden/indra/lscript/lscript_execute/lscript_heapruntime.h index c481446..2490683 100644 --- a/linden/indra/lscript/lscript_execute/lscript_heapruntime.h +++ b/linden/indra/lscript/lscript_execute/lscript_heapruntime.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp index 288f7ea..b6d5092 100644 --- a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.h b/linden/indra/lscript/lscript_execute/lscript_readlso.h index d8711f9..17d9460 100644 --- a/linden/indra/lscript/lscript_execute/lscript_readlso.h +++ b/linden/indra/lscript/lscript_execute/lscript_readlso.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_export.h b/linden/indra/lscript/lscript_export.h index 22a5644..5eb3dc5 100644 --- a/linden/indra/lscript/lscript_export.h +++ b/linden/indra/lscript/lscript_export.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_http.h b/linden/indra/lscript/lscript_http.h index 880dde7..9665a8d 100644 --- a/linden/indra/lscript/lscript_http.h +++ b/linden/indra/lscript/lscript_http.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_library.h b/linden/indra/lscript/lscript_library.h index 23ac19b..10ba7fa 100644 --- a/linden/indra/lscript/lscript_library.h +++ b/linden/indra/lscript/lscript_library.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_library/lscript_alloc.cpp b/linden/indra/lscript/lscript_library/lscript_alloc.cpp index e3e5870..a39edda 100644 --- a/linden/indra/lscript/lscript_library/lscript_alloc.cpp +++ b/linden/indra/lscript/lscript_library/lscript_alloc.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_library/lscript_export.cpp b/linden/indra/lscript/lscript_library/lscript_export.cpp index cacdfa8..dbb9cc5 100644 --- a/linden/indra/lscript/lscript_library/lscript_export.cpp +++ b/linden/indra/lscript/lscript_library/lscript_export.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp index 127ab13..594a001 100644 --- a/linden/indra/lscript/lscript_library/lscript_library.cpp +++ b/linden/indra/lscript/lscript_library/lscript_library.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/lscript/lscript_library/lscript_library_vc9.vcproj b/linden/indra/lscript/lscript_library/lscript_library_vc9.vcproj new file mode 100644 index 0000000..031b67d --- /dev/null +++ b/linden/indra/lscript/lscript_library/lscript_library_vc9.vcproj @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/lscript/lscript_rt_interface.h b/linden/indra/lscript/lscript_rt_interface.h index b325dab..ec474a0 100644 --- a/linden/indra/lscript/lscript_rt_interface.h +++ b/linden/indra/lscript/lscript_rt_interface.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/mac_crash_logger/llcrashloggermac.cpp b/linden/indra/mac_crash_logger/llcrashloggermac.cpp index 197c083..3cbd6c2 100644 --- a/linden/indra/mac_crash_logger/llcrashloggermac.cpp +++ b/linden/indra/mac_crash_logger/llcrashloggermac.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/mac_crash_logger/llcrashloggermac.h b/linden/indra/mac_crash_logger/llcrashloggermac.h index 0fa0a40..5577b52 100644 --- a/linden/indra/mac_crash_logger/llcrashloggermac.h +++ b/linden/indra/mac_crash_logger/llcrashloggermac.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/mac_crash_logger/mac_crash_logger.cpp b/linden/indra/mac_crash_logger/mac_crash_logger.cpp index c9d630e..bf93e0b 100644 --- a/linden/indra/mac_crash_logger/mac_crash_logger.cpp +++ b/linden/indra/mac_crash_logger/mac_crash_logger.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/mac_updater/FSCopyObject.h b/linden/indra/mac_updater/FSCopyObject.h index 6808fd1..1781fc4 100644 --- a/linden/indra/mac_updater/FSCopyObject.h +++ b/linden/indra/mac_updater/FSCopyObject.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/mac_updater/GenLinkedList.h b/linden/indra/mac_updater/GenLinkedList.h index 44b8dac..b96cd23 100644 --- a/linden/indra/mac_updater/GenLinkedList.h +++ b/linden/indra/mac_updater/GenLinkedList.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/mac_updater/MoreFilesX.h b/linden/indra/mac_updater/MoreFilesX.h index 1b5cd66..2502905 100644 --- a/linden/indra/mac_updater/MoreFilesX.h +++ b/linden/indra/mac_updater/MoreFilesX.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/mac_updater/mac_updater.cpp b/linden/indra/mac_updater/mac_updater.cpp index 25399c5..72cd4c4 100644 --- a/linden/indra/mac_updater/mac_updater.cpp +++ b/linden/indra/mac_updater/mac_updater.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -496,14 +496,13 @@ bool isDirWritable(FSRef &dir) // This is kinda lame, but will pretty much always give the right answer. OSStatus err = noErr; - char temp[PATH_MAX]; /* Flawfinder: ignore */ + char temp[PATH_MAX] = ""; /* Flawfinder: ignore */ err = FSRefMakePath(&dir, (UInt8*)temp, sizeof(temp)); if(err == noErr) { - temp[0] = '\0'; - strncat(temp, "/.test_XXXXXX", sizeof(temp) - 1); + strncat(temp, "/.test_XXXXXX", (sizeof(temp) - strlen(temp)) - 1); if(mkdtemp(temp) != NULL) { @@ -557,8 +556,8 @@ static std::string HFSUniStr255_to_utf8str(const HFSUniStr255* src) int restoreObject(const char* aside, const char* target, const char* path, const char* object) { - char source[PATH_MAX]; /* Flawfinder: ignore */ - char dest[PATH_MAX]; /* Flawfinder: ignore */ + char source[PATH_MAX] = ""; /* Flawfinder: ignore */ + char dest[PATH_MAX] = ""; /* Flawfinder: ignore */ snprintf(source, sizeof(source), "%s/%s/%s", aside, path, object); snprintf(dest, sizeof(dest), "%s/%s", target, path); FSRef sourceRef; @@ -592,7 +591,7 @@ int restoreObject(const char* aside, const char* target, const char* path, const // Replace any mention of "Second Life" with the product name. void filterFile(const char* filename) { - char temp[PATH_MAX]; /* Flawfinder: ignore */ + char temp[PATH_MAX] = ""; /* Flawfinder: ignore */ // First copy the target's version, so we can run it through sed. snprintf(temp, sizeof(temp), "cp '%s' '%s.tmp'", filename, filename); system(temp); /* Flawfinder: ignore */ @@ -724,13 +723,13 @@ void *updatethreadproc(void*) { char tempDir[PATH_MAX] = ""; /* Flawfinder: ignore */ FSRef tempDirRef; - char temp[PATH_MAX]; /* Flawfinder: ignore */ + char temp[PATH_MAX] = ""; /* Flawfinder: ignore */ // *NOTE: This buffer length is used in a scanf() below. char deviceNode[1024] = ""; /* Flawfinder: ignore */ FILE *downloadFile = NULL; OSStatus err; ProcessSerialNumber psn; - char target[PATH_MAX]; /* Flawfinder: ignore */ + char target[PATH_MAX] = ""; /* Flawfinder: ignore */ FSRef targetRef; FSRef targetParentRef; FSVolumeRefNum targetVol; @@ -907,14 +906,14 @@ void *updatethreadproc(void*) if(err != noErr) throw 0; - temp[0] = '\0'; - strncat(temp, "/SecondLifeUpdate_XXXXXX", sizeof(temp) - 1); + strncat(temp, "/SecondLifeUpdate_XXXXXX", (sizeof(temp) - strlen(temp)) - 1); if(mkdtemp(temp) == NULL) { throw 0; } - strcpy(tempDir, temp); /* Flawfinder: ignore */ + strncpy(tempDir, temp, sizeof(tempDir)); + temp[sizeof(tempDir) - 1] = '\0'; llinfos << "tempDir is " << tempDir << llendl; diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index 81d40ac..8944cb8 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.18.6.4"; -CFBundleGetInfoString = "Second Life version 1.18.6.4, Copyright 2004-2007 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.19.0.0"; +CFBundleGetInfoString = "Second Life version 1.19.0.0, Copyright 2004-2007 Linden Research, Inc."; diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist index 44e9a47..5956f9b 100644 --- a/linden/indra/newview/Info-SecondLife.plist +++ b/linden/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.18.6.4 + 1.19.0.0 CSResourcesFileMapped diff --git a/linden/indra/newview/VertexCache.h b/linden/indra/newview/VertexCache.h index 2a00108..d402e28 100644 --- a/linden/indra/newview/VertexCache.h +++ b/linden/indra/newview/VertexCache.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/VorbisFramework.h b/linden/indra/newview/VorbisFramework.h index 6a7358a..146302c 100644 --- a/linden/indra/newview/VorbisFramework.h +++ b/linden/indra/newview/VorbisFramework.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/app_settings/colors_base.ini b/linden/indra/newview/app_settings/colors_base.ini deleted file mode 100644 index 3c928c1..0000000 --- a/linden/indra/newview/app_settings/colors_base.ini +++ /dev/null @@ -1,157 +0,0 @@ -version 101 -// colors_base.ini -// This file specifies colors that are used in the user interface. -// To provide your own custom colors, edit the colors.ini file. -// DO NOT EDIT THIS FILE or Second Life will crash. - -// Color of the names over avatar heads -AvatarNameColor 251 175 93 255 - -BalanceTextColor 0 255 0 255 - -// These are "blended" with the button graphics, and hence should -// usually be left as opaque white. -ButtonColor 255 255 255 255 -ButtonImageColor 255 255 255 255 - -// Text labels for buttons, like the "OK" text -ButtonLabelColor 220 220 220 255 -ButtonLabelSelectedColor 220 220 220 255 -ButtonLabelDisabledColor 147 169 213 200 -ButtonLabelSelectedDisabledColor 164 190 237 200 - -ButtonSelectedBgColor 62 62 62 255 -ButtonSelectedColor 255 255 255 255 -ButtonUnselectedBgColor 62 62 62 255 -ButtonUnselectedFgColor 255 255 255 255 -ButtonBorderColor 255 255 255 255 - -// Chat History dialog -ChatHistoryBgColor 0 0 0 0 -ChatHistoryTextColor 255 255 255 255 - -// The floater buttons (like the close box) are white images that receive this color. -FloaterButtonImageColor 239 156 0 255 - -// The drop shadow behind windows and menus. -// The button one is baked into the graphic. -ColorDropShadow 0 0 0 255 -DefaultBackgroundColor 62 62 62 100 -DefaultHighlightDark 26 26 26 255 -DefaultHighlightLight 115 132 155 255 -DefaultShadowDark 26 26 26 255 -DefaultShadowLight 0 0 0 255 - -// Color of the rectangle around entry fields with keyboard focus. -FocusColor 238 156 0 255 -FocusSecondaryColor 171 212 245 255 - -// Edit mode grid -GridFocusPointColor 255 255 255 128 -GridlineColor 255 255 255 255 -GridlineBGColor 235 235 255 200 -GridlineShadowColor 0 0 0 80 - -HealthTextColor 255 255 255 255 - -HelpBgColor 200 209 204 255 -HelpFgColor 0 0 0 255 - -HelpScrollTrackColor 183 184 188 255 -HelpScrollThumbColor 80 96 124 255 -HelpScrollHighlightColor 115 132 155 255 -HelpScrollShadowColor 0 0 0 255 - - -LabelDisabledColor 147 169 213 77 -LabelSelectedColor 255 255 255 255 -LabelSelectedDisabledColor 164 190 237 128 -LabelTextColor 147 169 213 255 - -MapAutopilotColor 255 128 0 255 - -// Menus on the top of the screen -MenuBarBgColor 62 62 62 255 -MenuBarGodBgColor 62 62 62 255 -MenuNonProductionBgColor 128 0 0 255 -MenuNonProductionGodBgColor 128 0 0 255 -MenuDefaultBgColor 0 0 0 255 -MenuItemDisabledColor 133 133 164 128 -MenuItemEnabledColor 255 255 255 255 -MenuItemHighlightBgColor 183 184 188 80 -MenuItemHighlightFgColor 255 255 255 255 -MenuPopupBgColor 0 0 0 255 - -// Colors for the Mini-Map -NetMapBackgroundColor 0 0 0 77 -NetMapYouOwnAboveWater 0 255 255 255 -NetMapYouOwnBelowWater 0 200 200 255 -NetMapGroupOwnAboveWater 255 0 255 255 -NetMapGroupOwnBelowWater 200 0 200 255 -NetMapOtherOwnAboveWater 60 60 60 255 -NetMapOtherOwnBelowWater 30 30 30 255 - -// Notify boxes are the slide-down notifications at the -// top-right of the screen. -NotifyBoxColor 58 147 242 255 -NotifyTipColor 58 147 242 255 -OpaqueBackgroundColor 62 62 62 255 -GroupNotifyBoxColor 70 170 255 255 - -// Menu that spawns on right-click -PieMenuBgColor 62 62 62 77 -PieMenuLineColor 0 0 0 128 -PieMenuSelectedColor 183 184 188 77 - -// Colors for property lines and land ownership overlay -PropertyColorAvail 0 0 0 0 -PropertyColorGroup 0 184 184 102 -PropertyColorOther 255 0 0 102 -PropertyColorSelf 0 255 0 102 -PropertyColorForSale 255 128 0 102 -// match the color on the world map -PropertyColorAuction 128 0 255 102 - -ScrollBgReadOnlyColor 200 209 204 255 -ScrollBgWriteableColor 200 209 204 255 -ScrollBGStripeColor 100 100 100 40 -ScrollDisabledColor 128 128 128 204 -ScrollSelectedBGColor 100 100 188 150 -ScrollSelectedFGColor 0 0 0 204 -ScrollUnselectedColor 0 0 0 204 -ScrollHighlightedColor 183 184 188 128 -ScrollbarThumbColor 60 76 124 255 -ScrollbarTrackColor 153 154 158 255 - -// Outline for selected objects in world -SilhouetteParentColor 255 255 0 255 -SilhouetteChildColor 32 106 196 255 -HighlightParentColor 255 255 0 255 -HighlightChildColor 171 212 245 255 -// For "context" highlighting, i.e. pie menu -ContextSilhouetteColor 239 156 0 255 - -// Horizontal sliders, as in the audio preferences -SliderDisabledThumbColor 0 0 0 255 -SliderThumbCenterColor 183 184 188 255 -SliderThumbOutlineColor 0 0 0 255 -SliderTrackColor 0 0 0 255 - -TextBgFocusColor 200 209 204 255 -TextBgReadOnlyColor 62 62 62 64 -TextBgWriteableColor 200 209 204 255 -TextCursorColor 0 0 0 255 -TextFgColor 0 0 0 255 -TextFgReadOnlyColor 0 0 0 192 -TextFgTentativeColor 0 0 0 128 - -ScriptBgReadOnlyColor 200 209 204 180 - -// Pop-up tips on UI elements and in-world objects -ToolTipBgColor 183 184 188 200 -ToolTipBorderColor 171 212 245 255 -ToolTipTextColor 0 0 0 255 - - -FilterBackgroundColor 0 0 20 255 -FilterTextColor 255 200 70 255 diff --git a/linden/indra/newview/app_settings/colors_base.xml b/linden/indra/newview/app_settings/colors_base.xml index 5902a7d..c68487b 100644 --- a/linden/indra/newview/app_settings/colors_base.xml +++ b/linden/indra/newview/app_settings/colors_base.xml @@ -105,6 +105,14 @@ + + + + + + + + @@ -141,10 +149,9 @@ - - - - + + + @@ -158,6 +165,7 @@ + diff --git a/linden/indra/newview/audiosettings.h b/linden/indra/newview/audiosettings.h index cd92dff..1d2ccc5 100644 --- a/linden/indra/newview/audiosettings.h +++ b/linden/indra/newview/audiosettings.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/fakevoicesoundsignal.cpp b/linden/indra/newview/fakevoicesoundsignal.cpp index 11818b1..25cb412 100644 --- a/linden/indra/newview/fakevoicesoundsignal.cpp +++ b/linden/indra/newview/fakevoicesoundsignal.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/fakevoicesoundsignal.h b/linden/indra/newview/fakevoicesoundsignal.h index 2955a30..bca6306 100644 --- a/linden/indra/newview/fakevoicesoundsignal.h +++ b/linden/indra/newview/fakevoicesoundsignal.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/files.lst b/linden/indra/newview/files.lst index a13abb7..50431fb 100644 --- a/linden/indra/newview/files.lst +++ b/linden/indra/newview/files.lst @@ -83,7 +83,6 @@ newview/llfloatergroupinfo.cpp newview/llfloatergroupinvite.cpp newview/llfloatergroups.cpp newview/llfloaterhtml.cpp -newview/llfloaterhtmlhelp.cpp newview/llfloaterimagepreview.cpp newview/llfloaterimport.cpp newview/llfloaterinspect.cpp diff --git a/linden/indra/newview/fmodwrapper.cpp b/linden/indra/newview/fmodwrapper.cpp index 0bd1cc4..4d8cf22 100644 --- a/linden/indra/newview/fmodwrapper.cpp +++ b/linden/indra/newview/fmodwrapper.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/gpu_table.txt b/linden/indra/newview/gpu_table.txt index 066990b..4b9bf65 100644 --- a/linden/indra/newview/gpu_table.txt +++ b/linden/indra/newview/gpu_table.txt @@ -49,6 +49,9 @@ ATI Radeon X1600 .*ATI.*Radeon X16.* 3 ATI Radeon X1700 .*ATI.*Radeon X17.* 3 ATI Radeon X1800 .*ATI.*Radeon X18.* 3 ATI Radeon X1900 .*ATI.*Radeon X19.* 3 +ATI Radeon X2400 .*ATI.*Radeon X24.* 3 +ATI Radeon X2600 .*ATI.*Radeon X26.* 3 +ATI Radeon X2900 .*ATI.*Radeon X29.* 3 ATI Radeon X300 .*ATI.*Radeon X3.* 2 ATI Radeon X400 .*ATI.*Radeon X4.* 2 ATI Radeon X500 .*ATI.*Radeon X5.* 2 @@ -116,6 +119,7 @@ NVIDIA GeForce Go 6800 .*NVIDIA.*GeForce Go 68.* 2 NVIDIA GeForce Go 7300 .*NVIDIA.*GeForce Go 73.* 3 NVIDIA GeForce Go 7400 .*NVIDIA.*GeForce Go 74.* 3 NVIDIA GeForce Go 7600 .*NVIDIA.*GeForce Go 76.* 3 +NVIDIA GeForce Go 7700 .*NVIDIA.*GeForce Go 77.* 3 NVIDIA GeForce Go 7800 .*NVIDIA.*GeForce Go 78.* 3 NVIDIA GeForce Go 7900 .*NVIDIA.*GeForce Go 79.* 3 NVIDIA GeForce Go 6 .*GeForce Go 6.* 2 diff --git a/linden/indra/newview/head.cpp b/linden/indra/newview/head.cpp index e51713f..54047cb 100644 --- a/linden/indra/newview/head.cpp +++ b/linden/indra/newview/head.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/head.h b/linden/indra/newview/head.h index 55a2345..7bb8fd1 100644 --- a/linden/indra/newview/head.h +++ b/linden/indra/newview/head.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/linux_tools/client-readme.txt b/linden/indra/newview/linux_tools/client-readme.txt index 641705d..89454e2 100644 --- a/linden/indra/newview/linux_tools/client-readme.txt +++ b/linden/indra/newview/linux_tools/client-readme.txt @@ -50,15 +50,18 @@ Please enjoy! Minimum requirements: * Internet Connection: Cable or DSL - * Computer Processor: 800MHz Pentium III or Athlon, or better - * Computer Memory: 256MB or better (strongly recommend more!) + * Computer Processor: 800MHz Pentium III or Athlon or better + (recommended: 1.5GHz or more) + * Computer Memory: 512MB (recommended: 768MB or more) * Linux Operating System: A reasonably modern 32-bit Linux environment is required. If you are running a 64-bit Linux distribution then you will need its 32-bit compatibility environment installed. * Video/Graphics Card: - o nVidia GeForce 2, GeForce 4mx, or better + o nVidia GeForce 2, GeForce 4mx, or better (recommend one of the + following: 6700, 6800, 7600, 7800, 7900, 8400, 8500, 8600, + 8800, Go 7400, Go 7600, Go 7800, Go 7900) o OR ATI Radeon 8500, 9250, or better - (nVidia cards are strongly recommended for the Linux client) + (nVidia cards are recommended for the Linux client) **NOTE**: Second Life absolutely requires you to have recent, correctly- configured OpenGL 3D drivers for your hardware - the graphics drivers @@ -97,8 +100,6 @@ you wish. These are the most commonly-encountered known issues which are specific to the Alpha release of the Linux client. -* VOICE COMMUNICATION - this is not yet available in the Linux client. - * VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as robust as their counterparts for other operating systems, so some advanced Second Life graphical features have been DISABLED by default to aid @@ -109,7 +110,6 @@ the Alpha release of the Linux client. Linux client and are therefore known not to work properly: * Movie recording * Full Unicode font rendering - * Auto-updater * UPLOAD / SAVE / COLOR-PICKER DIALOGS - These only appear when the client is in 'windowed' mode, not 'fullscreen' mode. @@ -127,6 +127,9 @@ The client prints a lot of diagnostic information to the console it was run from. Most of this is also replicated in ~/.secondlife/logs/SecondLife.log - this is helpful to read when troubleshooting, especially 'WARNING' lines. +VOICE PROBLEMS? See the separate README-linux-voice.txt file for Voice +troubleshooting information. + PROBLEM 1:- Second Life fails to start up, with a warning on the console like: 'Error creating window.' or 'Unable to create window, be sure screen is set at 32-bit color' or @@ -246,11 +249,14 @@ the 'Search' button at the bottom of the window and then selecting the 'Groups' tab and searching for 'Linux'. This group is useful for discussing Linux issues with fellow Linux client users who are online. +The Second Life Issue Tracker: + +This is the right place for finding known issues and reporting new +bugs in all Second Life releases if you find that the Troubleshooting +section in this file hasn't helped (please note, however, that this is +not a support forum). + Linux Client Alpha Testers forum: -This is a good place for discussing Linux-specific Second Life problems -if you find that the Troubleshooting section in this file hasn't helped. -When reporting problems here, please include information about the -Second Life version you are running, your graphics card, graphics driver, -and Linux distribution. - +This is a forum where Linux Client users can help each other out and +discuss the latest updates. diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh index 638a0f0..4ed0609 100755 --- a/linden/indra/newview/linux_tools/wrapper.sh +++ b/linden/indra/newview/linux_tools/wrapper.sh @@ -59,7 +59,8 @@ fi ## Nothing worth editing below this line. ##------------------------------------------------------------------- -RUN_PATH=`dirname "$0" || echo .` +SCRIPTSRC=`readlink -f "$0" || echo "$0"` +RUN_PATH=`dirname "${SCRIPTSRC}" || echo .` cd "${RUN_PATH}" # Re-register the secondlife:// protocol handler every launch, for now. @@ -116,7 +117,5 @@ echo echo '*********************************************************' echo 'This is an ALPHA release of the Second Life linux client.' echo 'Thank you for testing!' -echo 'You can visit the Linux Client Alpha Testers forum at:' -echo 'http://forums.secondlife.com/forumdisplay.php?forumid=263' echo 'Please see README-linux.txt before reporting problems.' echo diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 94cbddc..77e743d 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -102,6 +102,7 @@ #include "lltoolpie.h" #include "lltoolview.h" #include "llui.h" // for make_ui_sound +#include "llurldispatcher.h" #include "llviewercamera.h" #include "llviewerinventory.h" #include "llviewermenu.h" @@ -304,7 +305,7 @@ LLAgent::LLAgent() mbAlwaysRun(FALSE), mShowAvatar(TRUE), - + mCameraAnimating( FALSE ), mAnimationCameraStartGlobal(), mAnimationFocusStartGlobal(), @@ -409,6 +410,8 @@ LLAgent::LLAgent() mCameraUpVector = LLVector3::z_axis;// default is straight up mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT ); //end ventrella + + mCustomAnim = FALSE ; } // Requires gSavedSettings to be initialized. @@ -904,6 +907,24 @@ const LLHost& LLAgent::getRegionHost() const } } +//----------------------------------------------------------------------------- +// getSLURL() +// returns empty() if getRegion() == NULL +//----------------------------------------------------------------------------- +std::string LLAgent::getSLURL() const +{ + std::string slurl; + LLViewerRegion *regionp = getRegion(); + if (regionp) + { + LLVector3d agentPos = getPositionGlobal(); + S32 x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) ); + S32 y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) ); + S32 z = llround( (F32)agentPos.mdV[VZ] ); + slurl = LLURLDispatcher::buildSLURL(regionp->getName(), x, y, z); + } + return slurl; +} //----------------------------------------------------------------------------- // inPrelude() @@ -1021,7 +1042,7 @@ void LLAgent::slamLookAt(const LLVector3 &look_at) //----------------------------------------------------------------------------- // getPositionGlobal() //----------------------------------------------------------------------------- -const LLVector3d &LLAgent::getPositionGlobal() +const LLVector3d &LLAgent::getPositionGlobal() const { if (!mAvatarObject.isNull() && !mAvatarObject->mDrawable.isNull()) { @@ -2842,8 +2863,14 @@ void LLAgent::endAnimationUpdateUI() if (mAvatarObject) { - sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP); - sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START); + if(mCustomAnim) + { + sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP); + sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START); + + mCustomAnim = FALSE ; + } + } setLookAt(LOOKAT_TARGET_CLEAR); } @@ -2861,7 +2888,7 @@ void LLAgent::endAnimationUpdateUI() mCameraLag.clearVec(); // JC - Added for always chat in third person option - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); gToolMgr->setCurrentToolset(gMouselookToolset); @@ -3985,7 +4012,7 @@ void LLAgent::changeCameraToMouselook(BOOL animate) if( mCameraMode != CAMERA_MODE_MOUSELOOK ) { - gViewerWindow->setKeyboardFocus( NULL, NULL ); + gViewerWindow->setKeyboardFocus( NULL ); mLastCameraMode = mCameraMode; mCameraMode = CAMERA_MODE_MOUSELOOK; @@ -4169,7 +4196,7 @@ void LLAgent::changeCameraToThirdPerson(BOOL animate) //----------------------------------------------------------------------------- // changeCameraToCustomizeAvatar() //----------------------------------------------------------------------------- -void LLAgent::changeCameraToCustomizeAvatar(BOOL animate) +void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_animate) { setControlFlags(AGENT_CONTROL_STAND_UP); // force stand up gViewerWindow->getWindow()->resetBusyCount(); @@ -4184,16 +4211,16 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate) gSavedSettings.setBOOL("ThirdPersonBtnState", FALSE); gSavedSettings.setBOOL("BuildBtnState", FALSE); - if (animate) + if (camera_animate) { startCameraAnimation(); } // Remove any pitch from the avatar - LLVector3 at = mFrameAgent.getAtAxis(); - at.mV[VZ] = 0.f; - at.normVec(); - gAgent.resetAxes(at); + //LLVector3 at = mFrameAgent.getAtAxis(); + //at.mV[VZ] = 0.f; + //at.normVec(); + //gAgent.resetAxes(at); if( mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR ) { @@ -4206,28 +4233,37 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate) mbFlagsDirty = TRUE; } - gViewerWindow->setKeyboardFocus( NULL, NULL ); + gViewerWindow->setKeyboardFocus( NULL ); gViewerWindow->setMouseCapture( NULL ); LLVOAvatar::onCustomizeStart(); } - if (animate && !mAvatarObject.isNull()) + if (!mAvatarObject.isNull()) { - sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START); - mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE); - LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE); - - if (turn_motion) + if(avatar_animate) { - mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP; + // Remove any pitch from the avatar + LLVector3 at = mFrameAgent.getAtAxis(); + at.mV[VZ] = 0.f; + at.normVec(); + gAgent.resetAxes(at); - } - else - { - mAnimationDuration = gSavedSettings.getF32("ZoomTime"); - } + sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START); + mCustomAnim = TRUE ; + mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE); + LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE); + if (turn_motion) + { + mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP; + + } + else + { + mAnimationDuration = gSavedSettings.getF32("ZoomTime"); + } + } @@ -5206,6 +5242,102 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **) } } +class LLAgentDropGroupViewerNode : public LLHTTPNode +{ + virtual void post( + LLHTTPNode::ResponsePtr response, + const LLSD& context, + const LLSD& input) const + { + + if ( + !input.isMap() || + !input.has("body") ) + { + //what to do with badly formed message? + response->status(400); + response->result(LLSD("Invalid message parameters")); + } + + LLSD body = input["body"]; + if ( body.has("body") ) + { + //stupid message system doubles up the "body"s + body = body["body"]; + } + + if ( + body.has("AgentData") && + body["AgentData"].isArray() && + body["AgentData"][0].isMap() ) + { + llinfos << "VALID DROP GROUP" << llendl; + + //there is only one set of data in the AgentData block + LLSD agent_data = body["AgentData"][0]; + LLUUID agent_id; + LLUUID group_id; + + agent_id = agent_data["AgentID"].asUUID(); + group_id = agent_data["GroupID"].asUUID(); + + if (agent_id != gAgentID) + { + llwarns + << "AgentDropGroup for agent other than me" << llendl; + + response->notFound(); + return; + } + + // Remove the group if it already exists remove it + // and add the new data to pick up changes. + LLGroupData gd; + gd.mID = group_id; + S32 index = gAgent.mGroups.find(gd); + if (index != -1) + { + gAgent.mGroups.remove(index); + if (gAgent.getGroupID() == group_id) + { + gAgent.mGroupID.setNull(); + gAgent.mGroupPowers = 0; + gAgent.mGroupName[0] = '\0'; + gAgent.mGroupTitle[0] = '\0'; + } + + // refresh all group information + gAgent.sendAgentDataUpdateRequest(); + + gGroupMgr->clearGroupData(group_id); + // close the floater for this group, if any. + LLFloaterGroupInfo::closeGroup(group_id); + // refresh the group panel of the search window, + //if necessary. + LLFloaterDirectory::refreshGroup(group_id); + } + else + { + llwarns + << "AgentDropGroup, agent is not part of group " + << group_id << llendl; + } + + response->result(LLSD()); + } + else + { + //what to do with badly formed message? + response->status(400); + response->result(LLSD("Invalid message parameters")); + } + } +}; + +LLHTTPRegistration + gHTTPRegistrationAgentDropGroupViewerNode( + "/message/AgentDropGroup"); + // static void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **) { @@ -5783,6 +5915,11 @@ void LLAgent::setTeleportState(ETeleportState state) { LLFloaterSnapshot::hide(0); } + if (mTeleportState == TELEPORT_MOVING) + { + // We're outa here. Save "back" slurl. + mTeleportSourceSLURL = getSLURL(); + } } void LLAgent::fidget() diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index 1ea580e..f87bb02 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -169,7 +169,8 @@ public: void setRegion(LLViewerRegion *regionp); LLViewerRegion *getRegion() const; const LLHost& getRegionHost() const; - + std::string getSLURL() const; + void updateAgentPosition(const F32 dt, const F32 yaw, const S32 mouse_x, const S32 mouse_y); // call once per frame to update position, angles radians void updateLookAt(const S32 mouse_x, const S32 mouse_y); @@ -182,7 +183,7 @@ public: void changeCameraToDefault(); void changeCameraToMouselook(BOOL animate = TRUE); void changeCameraToThirdPerson(BOOL animate = TRUE); - void changeCameraToCustomizeAvatar(BOOL animate = TRUE); // trigger transition animation + void changeCameraToCustomizeAvatar(BOOL avatar_animate = TRUE, BOOL camera_animate = TRUE); // trigger transition animation // Ventrella void changeCameraToFollow(BOOL animate = TRUE); //end Ventrella @@ -306,7 +307,7 @@ public: LLVector3 getVelocity() const; F32 getVelocityZ() const { return getVelocity().mV[VZ]; } // a hack - const LLVector3d &getPositionGlobal(); + const LLVector3d &getPositionGlobal() const; const LLVector3 &getPositionAgent(); S32 getRegionsVisited() const; F64 getDistanceTraveled() const; @@ -463,6 +464,8 @@ public: void setTargetVelocity(const LLVector3 &vel); const LLVector3 &getTargetVelocity() const; + const std::string getTeleportSourceSLURL() const { return mTeleportSourceSLURL; } + // Setting the ability for this avatar to proxy for another avatar. //static void processAddModifyAbility(LLMessageSystem* msg, void**); @@ -717,6 +720,8 @@ private: LLVector3d mAgentOriginGlobal; // Origin of agent coords from global coords mutable LLVector3d mPositionGlobal; + std::string mTeleportSourceSLURL; // SLURL where last TP began. + std::set mRegionsVisited; // stat - what distinct regions has the avatar been to? F64 mDistanceTraveled; // stat - how far has the avatar moved? LLVector3d mLastPositionGlobal; // Used to calculate travel distance @@ -730,6 +735,7 @@ private: ECameraMode mLastCameraMode; BOOL mViewsPushed; // keep track of whether or not we have pushed views. + BOOL mCustomAnim ; //current animation is ANIM_AGENT_CUSTOMIZE ? BOOL mbAlwaysRun; // should the avatar run rather than walk BOOL mShowAvatar; // should we render the avatar? BOOL mCameraAnimating; // camera is transitioning from one mode to another diff --git a/linden/indra/newview/llagentdata.cpp b/linden/indra/newview/llagentdata.cpp index 2e76c07..031663a 100644 --- a/linden/indra/newview/llagentdata.cpp +++ b/linden/indra/newview/llagentdata.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llagentdata.h b/linden/indra/newview/llagentdata.h index 039eed8..3736bf1 100644 --- a/linden/indra/newview/llagentdata.h +++ b/linden/indra/newview/llagentdata.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llagentpilot.cpp b/linden/indra/newview/llagentpilot.cpp index 0459997..b4a1d86 100644 --- a/linden/indra/newview/llagentpilot.cpp +++ b/linden/indra/newview/llagentpilot.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llagentpilot.h b/linden/indra/newview/llagentpilot.h index 049dacf..97656b4 100644 --- a/linden/indra/newview/llagentpilot.h +++ b/linden/indra/newview/llagentpilot.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llanimalcontrols.cpp b/linden/indra/newview/llanimalcontrols.cpp index caba60d..f3ba729 100644 --- a/linden/indra/newview/llanimalcontrols.cpp +++ b/linden/indra/newview/llanimalcontrols.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llanimalcontrols.h b/linden/indra/newview/llanimalcontrols.h index 75508cf..4235d98 100644 --- a/linden/indra/newview/llanimalcontrols.h +++ b/linden/indra/newview/llanimalcontrols.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llappearance.h b/linden/indra/newview/llappearance.h index ee6feb5..582b559 100644 --- a/linden/indra/newview/llappearance.h +++ b/linden/indra/newview/llappearance.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index d9dbaaa..c357b8f 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -198,8 +198,8 @@ static EGridInfo GridDefaultChoice = GRID_INFO_AGNI; static EGridInfo GridDefaultChoice = GRID_INFO_ADITI; #endif #else -// Default userserver for development builds is dmz -static EGridInfo GridDefaultChoice = GRID_INFO_DMZ; +// Default userserver for development builds is none +static EGridInfo GridDefaultChoice = GRID_INFO_NONE; #endif #if LL_WINDOWS @@ -430,7 +430,7 @@ static void ui_audio_callback(const LLUUID& uuid) { if (gAudiop) { - F32 volume = gSavedSettings.getF32("AudioLevelUI"); + F32 volume = gSavedSettings.getBOOL("MuteUI") ? 0.f : gSavedSettings.getF32("AudioLevelUI"); gAudiop->triggerSound(uuid, gAgent.getID(), volume); } } @@ -588,44 +588,24 @@ int parse_args(int argc, char **argv) gGridChoice = GRID_INFO_AGNI; snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore } - else if (!strcmp(argv[j], "--dmz")) - { - gGridChoice = GRID_INFO_DMZ; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--siva")) - { - gGridChoice = GRID_INFO_SIVA; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--shakti")) + else if (!strcmp(argv[j], "--aruna")) { - gGridChoice = GRID_INFO_SHAKTI; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore + gGridChoice = GRID_INFO_ARUNA; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } else if (!strcmp(argv[j], "--durga")) { gGridChoice = GRID_INFO_DURGA; snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore } - else if (!strcmp(argv[j], "--soma")) - { - gGridChoice = GRID_INFO_SOMA; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } else if (!strcmp(argv[j], "--ganga")) { gGridChoice = GRID_INFO_GANGA; sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } - else if (!strcmp(argv[j], "--vaak")) - { - gGridChoice = GRID_INFO_VAAK; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--uma")) + else if (!strcmp(argv[j], "--mitra")) { - gGridChoice = GRID_INFO_UMA; + gGridChoice = GRID_INFO_MITRA; sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } else if (!strcmp(argv[j], "--mohini")) @@ -633,21 +613,11 @@ int parse_args(int argc, char **argv) gGridChoice = GRID_INFO_MOHINI; sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } - else if (!strcmp(argv[j], "--yami")) - { - gGridChoice = GRID_INFO_YAMI; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } else if (!strcmp(argv[j], "--nandi")) { gGridChoice = GRID_INFO_NANDI; sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } - else if (!strcmp(argv[j], "--mitra")) - { - gGridChoice = GRID_INFO_MITRA; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } else if (!strcmp(argv[j], "--radha")) { gGridChoice = GRID_INFO_RADHA; @@ -658,9 +628,34 @@ int parse_args(int argc, char **argv) gGridChoice = GRID_INFO_RAVI; sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } - else if (!strcmp(argv[j], "--aruna")) + else if (!strcmp(argv[j], "--siva")) { - gGridChoice = GRID_INFO_ARUNA; + gGridChoice = GRID_INFO_SIVA; + snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore + } + else if (!strcmp(argv[j], "--shakti")) + { + gGridChoice = GRID_INFO_SHAKTI; + snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore + } + else if (!strcmp(argv[j], "--soma")) + { + gGridChoice = GRID_INFO_SOMA; + snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore + } + else if (!strcmp(argv[j], "--uma")) + { + gGridChoice = GRID_INFO_UMA; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--vaak")) + { + gGridChoice = GRID_INFO_VAAK; + sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); + } + else if (!strcmp(argv[j], "--yami")) + { + gGridChoice = GRID_INFO_YAMI; sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); } else if (!strcmp(argv[j], "-user") && (++j < argc)) @@ -1574,6 +1569,9 @@ bool LLAppViewer::cleanup() delete gGlobalEconomy; gGlobalEconomy = NULL; + delete gActiveChannelSpeakerMgr; + gActiveChannelSpeakerMgr = NULL; + delete gLocalSpeakerMgr; gLocalSpeakerMgr = NULL; @@ -1873,10 +1871,6 @@ bool LLAppViewer::initEarlyConfiguration() { snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_AGNI].mName); // Flawfinder: ignore } - else if (!strcmp(argv[j], "--dmz")) - { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_DMZ].mName); // Flawfinder: ignore - } else if (!strcmp(argv[j], "--siva")) { snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_SIVA].mName); // Flawfinder: ignore @@ -3081,7 +3075,7 @@ const std::vector& LLAppViewer::getLoginURIs() const if (gLoginURIs.empty()) { // not specified on the command line, use value from table - gLoginURIs = LLSRV::rewriteURI(gGridInfo[gGridChoice].mLoginURI); + gLoginURIs.push_back(gGridInfo[gGridChoice].mLoginURI); } return gLoginURIs; } diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h index 555ceff..1078d71 100644 --- a/linden/indra/newview/llappviewer.h +++ b/linden/indra/newview/llappviewer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llappviewerlinux.cpp b/linden/indra/newview/llappviewerlinux.cpp index d847a7f..659fbf49 100644 --- a/linden/indra/newview/llappviewerlinux.cpp +++ b/linden/indra/newview/llappviewerlinux.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llappviewerlinux.h b/linden/indra/newview/llappviewerlinux.h index 26ed318..9347f20 100644 --- a/linden/indra/newview/llappviewerlinux.h +++ b/linden/indra/newview/llappviewerlinux.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llappviewermacosx.cpp b/linden/indra/newview/llappviewermacosx.cpp index 65cc658..3e31ad7 100644 --- a/linden/indra/newview/llappviewermacosx.cpp +++ b/linden/indra/newview/llappviewermacosx.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -172,7 +172,8 @@ OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) if(result == noErr) { std::string url = buffer; - LLURLDispatcher::dispatch(url); + const bool from_external_browser = true; + LLURLDispatcher::dispatch(url, from_external_browser); } return(result); diff --git a/linden/indra/newview/llappviewermacosx.h b/linden/indra/newview/llappviewermacosx.h index e638cf6..9f0b723 100644 --- a/linden/indra/newview/llappviewermacosx.h +++ b/linden/indra/newview/llappviewermacosx.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llappviewerwin32.cpp b/linden/indra/newview/llappviewerwin32.cpp index a25e502..9c416a1 100644 --- a/linden/indra/newview/llappviewerwin32.cpp +++ b/linden/indra/newview/llappviewerwin32.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llappviewerwin32.h b/linden/indra/newview/llappviewerwin32.h index fc42fe2..b015cc9 100644 --- a/linden/indra/newview/llappviewerwin32.h +++ b/linden/indra/newview/llappviewerwin32.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llassetuploadresponders.cpp b/linden/indra/newview/llassetuploadresponders.cpp index c8b469a..b024fc2 100644 --- a/linden/indra/newview/llassetuploadresponders.cpp +++ b/linden/indra/newview/llassetuploadresponders.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -252,7 +252,6 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) if(view) { LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); - LLFocusMgr::FocusLostCallback callback = gFocusMgr.getFocusCallback(); view->getPanel()->setSelection(content["new_inventory_item"].asUUID(), TAKE_FOCUS_NO); if((LLAssetType::AT_TEXTURE == asset_type) @@ -262,7 +261,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) } //LLInventoryView::dumpSelectionInformation((void*)view); // restore keyboard focus - gFocusMgr.setKeyboardFocus(focus_ctrl, callback); + gFocusMgr.setKeyboardFocus(focus_ctrl); } } else diff --git a/linden/indra/newview/llassetuploadresponders.h b/linden/indra/newview/llassetuploadresponders.h index c354d09..6f026a1 100644 --- a/linden/indra/newview/llassetuploadresponders.h +++ b/linden/indra/newview/llassetuploadresponders.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llaudiosourcevo.cpp b/linden/indra/newview/llaudiosourcevo.cpp index 7a7ab07..ae8ce5d 100644 --- a/linden/indra/newview/llaudiosourcevo.cpp +++ b/linden/indra/newview/llaudiosourcevo.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llaudiosourcevo.h b/linden/indra/newview/llaudiosourcevo.h index a164049..7e07491 100644 --- a/linden/indra/newview/llaudiosourcevo.h +++ b/linden/indra/newview/llaudiosourcevo.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llbbox.cpp b/linden/indra/newview/llbbox.cpp index cc8fa6e..98db7b7 100644 --- a/linden/indra/newview/llbbox.cpp +++ b/linden/indra/newview/llbbox.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llbbox.h b/linden/indra/newview/llbbox.h index 7159ac9..5242a9b 100644 --- a/linden/indra/newview/llbbox.h +++ b/linden/indra/newview/llbbox.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llbox.cpp b/linden/indra/newview/llbox.cpp index 65b9ba6..bbab7c4 100644 --- a/linden/indra/newview/llbox.cpp +++ b/linden/indra/newview/llbox.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llbox.h b/linden/indra/newview/llbox.h index 25ba5c4..b9fdc35 100644 --- a/linden/indra/newview/llbox.h +++ b/linden/indra/newview/llbox.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcallbacklist.cpp b/linden/indra/newview/llcallbacklist.cpp index 7f87c44..3f6fcce 100644 --- a/linden/indra/newview/llcallbacklist.cpp +++ b/linden/indra/newview/llcallbacklist.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcallbacklist.h b/linden/indra/newview/llcallbacklist.h index a14a2e4..5c03909 100644 --- a/linden/indra/newview/llcallbacklist.h +++ b/linden/indra/newview/llcallbacklist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcallingcard.cpp b/linden/indra/newview/llcallingcard.cpp index 6dccd88..38d9beb 100644 --- a/linden/indra/newview/llcallingcard.cpp +++ b/linden/indra/newview/llcallingcard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcallingcard.h b/linden/indra/newview/llcallingcard.h index 226c8c8..664c293 100644 --- a/linden/indra/newview/llcallingcard.h +++ b/linden/indra/newview/llcallingcard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcameraview.cpp b/linden/indra/newview/llcameraview.cpp index 0651fb9..0c82374 100644 --- a/linden/indra/newview/llcameraview.cpp +++ b/linden/indra/newview/llcameraview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcameraview.h b/linden/indra/newview/llcameraview.h index 228274e..e64ac56 100644 --- a/linden/indra/newview/llcameraview.h +++ b/linden/indra/newview/llcameraview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcape.cpp b/linden/indra/newview/llcape.cpp index e2cbb0d..c054ccb 100644 --- a/linden/indra/newview/llcape.cpp +++ b/linden/indra/newview/llcape.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcape.h b/linden/indra/newview/llcape.h index 5dbc0cd..52741f4 100644 --- a/linden/indra/newview/llcape.h +++ b/linden/indra/newview/llcape.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcaphttpsender.cpp b/linden/indra/newview/llcaphttpsender.cpp index dadb98b..c60a342 100644 --- a/linden/indra/newview/llcaphttpsender.cpp +++ b/linden/indra/newview/llcaphttpsender.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcaphttpsender.h b/linden/indra/newview/llcaphttpsender.h index ddc01fa..d396673 100644 --- a/linden/indra/newview/llcaphttpsender.h +++ b/linden/indra/newview/llcaphttpsender.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 5a2ae5f..292ff8f 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -93,51 +93,20 @@ private: // Functions // -//inline constructor -// for chat bars embedded in floaters, etc -LLChatBar::LLChatBar(const std::string& name) -: LLPanel(name, LLRect(), BORDER_NO), +LLChatBar::LLChatBar() +: LLPanel("", LLRect(), BORDER_NO), mInputEditor(NULL), mGestureLabelTimer(), mLastSpecialChatChannel(0), mIsBuilt(FALSE), - mDynamicLayout(FALSE), - mGestureCombo(NULL), - mObserver(NULL) -{ -} - -LLChatBar::LLChatBar(const std::string& name, const LLRect& rect) -: LLPanel(name, rect, BORDER_NO), - mInputEditor(NULL), - mGestureLabelTimer(), - mLastSpecialChatChannel(0), - mIsBuilt(FALSE), - mDynamicLayout(TRUE), mGestureCombo(NULL), mObserver(NULL) { setIsChrome(TRUE); - gUICtrlFactory->buildPanel(this,"panel_chat_bar.xml"); - - mIsFocusRoot = TRUE; - - setRect(rect); // override xml rect - - setBackgroundOpaque(TRUE); - setBackgroundVisible(TRUE); - - // Start visible if we left the app while chatting. - setVisible( gSavedSettings.getBOOL("ChatVisible") ); - - // Apply custom layout. - layout(); - -#if !LL_RELEASE_FOR_DOWNLOAD + #if !LL_RELEASE_FOR_DOWNLOAD childDisplayNotFound(); #endif - } @@ -151,25 +120,18 @@ LLChatBar::~LLChatBar() BOOL LLChatBar::postBuild() { childSetAction("History", toggleChatHistory, this); - childSetAction("Say", onClickSay, this); - childSetAction("Shout", onClickShout, this); + childSetCommitCallback("Say", onClickSay, this); // attempt to bind to an existing combo box named gesture setGestureCombo(LLUICtrlFactory::getComboBoxByName(this, "Gesture")); - LLButton * sayp = static_cast(getChildByName("Say", TRUE)); - if(sayp) - { - setDefaultBtn(sayp); - } - mInputEditor = LLUICtrlFactory::getLineEditorByName(this, "Chat Editor"); if (mInputEditor) { mInputEditor->setCallbackUserData(this); mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke); - mInputEditor->setFocusLostCallback(&onInputEditorFocusLost); - mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus ); + mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this); + mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this ); mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setIgnoreTab(TRUE); @@ -189,16 +151,6 @@ BOOL LLChatBar::postBuild() //----------------------------------------------------------------------- // virtual -void LLChatBar::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - LLPanel::reshape(width, height, called_from_parent); - if (mIsBuilt) - { - layout(); - } -} - -// virtual BOOL LLChatBar::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) { BOOL handled = FALSE; @@ -208,13 +160,6 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) // ALT-RETURN is reserved for windowed/fullscreen toggle if( KEY_RETURN == key ) { - //if (childGetValue("Chat Editor").asString().empty()) - //{ - // // no text, just close chat bar - // stopChat(); - // return TRUE; - //} - if (mask == MASK_CONTROL) { // shout @@ -239,78 +184,8 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) return handled; } - -void LLChatBar::layout() -{ - if (!mDynamicLayout) return; - - S32 rect_width = mRect.getWidth(); - S32 count = 9; // number of elements in LLToolBar - S32 pad = 4; - - LLRect gesture_rect; - S32 gesture_width = 0; - if (childGetRect("Gesture", gesture_rect)) - { - gesture_width = gesture_rect.getWidth(); - } - F32 segment_width = (F32)(rect_width - (pad + gesture_width)) / (F32)count; - - S32 btn_width = lltrunc(segment_width-pad); - - S32 x = 0; - S32 y = 1; - LLRect r; - - x = llround(0 * segment_width); - r.setOriginAndSize(x, y, btn_width, BTN_HEIGHT); - childSetRect("History", r); - - x = llround(1 * segment_width); - // Hack this one up so it looks nice. - if (mInputEditor) - { - r.setOriginAndSize(x, y+2, llfloor(6*segment_width-pad), 18); - mInputEditor->reshape(r.getWidth(), r.getHeight(), TRUE); - mInputEditor->setRect(r); - } - - x = llround(7 * segment_width); - r.setOriginAndSize(x, y, btn_width, BTN_HEIGHT); - childSetRect("Say", r); - - x = llround(8 * segment_width); - r.setOriginAndSize(x, y, btn_width, BTN_HEIGHT); - childSetRect("Shout", r); - - x = rect_width - (pad + gesture_width); - r.setOriginAndSize(x, y, gesture_width, BTN_HEIGHT); - childSetRect("Gesture", r); -} - - void LLChatBar::refresh() { - //BOOL chat_mode = gSavedSettings.getBOOL("ChatVisible"); - - //// Grab focus when no one else has it, and we're in chat mode. - //if (!gFocusMgr.getKeyboardFocus() - // && chat_mode) - //{ - // childSetFocus("Chat Editor", TRUE); - //} - - // Only show this view when user wants to be chatting - //setVisible(chat_mode); - - // hide in mouselook, but keep previous visibility state - //BOOL mouselook = gAgent.cameraMouselook(); - // call superclass setVisible so that we don't overwrite the saved setting - if (mDynamicLayout) - { - LLPanel::setVisible(gSavedSettings.getBOOL("ChatVisible")); - } - // HACK: Leave the name of the gesture in place for a few seconds. const F32 SHOW_GESTURE_NAME_TIME = 2.f; if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME) @@ -584,12 +459,7 @@ void LLChatBar::stopChat() // hide chat bar so it doesn't grab focus back gChatBar->setVisible(FALSE); -} - -void LLChatBar::setVisible(BOOL visible) -{ - gSavedSettings.setBOOL("ChatVisible", visible); - LLPanel::setVisible(visible); + gSavedSettings.setBOOL("ChatVisible", FALSE); } // static @@ -663,30 +533,30 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata ) } // static -void LLChatBar::onInputEditorFocusLost( LLUICtrl* caller, void* userdata) +void LLChatBar::onInputEditorFocusLost( LLFocusableElement* caller, void* userdata) { // stop typing animation gAgent.stopTyping(); } // static -void LLChatBar::onInputEditorGainFocus( LLUICtrl* caller, void* userdata ) +void LLChatBar::onInputEditorGainFocus( LLFocusableElement* caller, void* userdata ) { LLFloaterChat::setHistoryCursorAndScrollToEnd(); } // static -void LLChatBar::onClickSay( void* userdata ) +void LLChatBar::onClickSay( LLUICtrl* ctrl, void* userdata ) { LLChatBar* self = (LLChatBar*) userdata; - self->sendChat( CHAT_TYPE_NORMAL ); -} - -// static -void LLChatBar::onClickShout( void* userdata ) -{ - LLChatBar *self = (LLChatBar *)userdata; - self->sendChat( CHAT_TYPE_SHOUT ); + if (ctrl->getValue().asString() == "shout") + { + self->sendChat( CHAT_TYPE_SHOUT ); + } + else + { + self->sendChat( CHAT_TYPE_NORMAL ); + } } void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) @@ -769,7 +639,7 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl, void* data) { return; } - const std::string& trigger = gestures->getSimpleSelectedValue().asString(); + const std::string& trigger = gestures->getSelectedValue().asString(); // pretend the user chatted the trigger string, to invoke // substitution and logging. diff --git a/linden/indra/newview/llchatbar.h b/linden/indra/newview/llchatbar.h index 0f83d53..fd3b339 100644 --- a/linden/indra/newview/llchatbar.h +++ b/linden/indra/newview/llchatbar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -49,17 +49,12 @@ class LLChatBar { public: // constructor for inline chat-bars (e.g. hosted in chat history window) - LLChatBar(const std::string& name); - LLChatBar(const std::string& name, const LLRect& rect); + LLChatBar(); ~LLChatBar(); virtual BOOL postBuild(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent); virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); - // Adjust buttons and input field for width - void layout(); - void refresh(); void refreshGestures(); @@ -86,20 +81,18 @@ public: LLWString stripChannelNumber(const LLWString &mesg, S32* channel); // callbacks - static void onClickSay( void* userdata ); - static void onClickShout( void* userdata ); + static void onClickSay( LLUICtrl*, void* userdata ); static void onTabClick( void* userdata ); static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); - static void onInputEditorFocusLost(LLUICtrl* caller,void* userdata); - static void onInputEditorGainFocus(LLUICtrl* caller,void* userdata); + static void onInputEditorFocusLost(LLFocusableElement* caller,void* userdata); + static void onInputEditorGainFocus(LLFocusableElement* caller,void* userdata); static void onCommitGesture(LLUICtrl* ctrl, void* data); static void startChat(void*); static void stopChat(); - /*virtual*/ void setVisible(BOOL visible); protected: void sendChat(EChatType type); void updateChat(); @@ -113,7 +106,6 @@ protected: S32 mLastSpecialChatChannel; BOOL mIsBuilt; - BOOL mDynamicLayout; LLComboBox* mGestureCombo; LLChatBarGestureObserver* mObserver; diff --git a/linden/indra/newview/llclassifiedinfo.cpp b/linden/indra/newview/llclassifiedinfo.cpp index e920ea2..6a830cf 100644 --- a/linden/indra/newview/llclassifiedinfo.cpp +++ b/linden/indra/newview/llclassifiedinfo.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llclassifiedinfo.h b/linden/indra/newview/llclassifiedinfo.h index 2f4b6d0..ce648f7 100644 --- a/linden/indra/newview/llclassifiedinfo.h +++ b/linden/indra/newview/llclassifiedinfo.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llclassifiedstatsresponder.cpp b/linden/indra/newview/llclassifiedstatsresponder.cpp index 30a1808..37b0c91 100644 --- a/linden/indra/newview/llclassifiedstatsresponder.cpp +++ b/linden/indra/newview/llclassifiedstatsresponder.cpp @@ -1,17 +1,28 @@ -/** - * @file llparcelrequest.cpp - * @brief Implementation of the LLParcelRequest class. +/** + * @file llclassifiedstatsresponder.cpp + * @brief Receives information about classified ad click-through + * counts for display in the classified information UI. * - * $LicenseInfo:firstyear=2006&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2006-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, diff --git a/linden/indra/newview/llclassifiedstatsresponder.h b/linden/indra/newview/llclassifiedstatsresponder.h index 1ceb942..ab219b7 100644 --- a/linden/indra/newview/llclassifiedstatsresponder.h +++ b/linden/indra/newview/llclassifiedstatsresponder.h @@ -1,24 +1,34 @@ /** - * @file llclassifiedstatsrequest.h - * @brief Responder class for classified stats request. + * @file llclassifiedstatsresponder.h + * @brief Receives information about classified ad click-through + * counts for display in the classified information UI. * - * $LicenseInfo:firstyear=2006&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2006-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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. * $/LicenseInfo$ */ - #ifndef LL_LLCLASSIFIEDSTATSRESPONDER_H #define LL_LLCLASSIFIEDSTATSRESPONDER_H diff --git a/linden/indra/newview/llcloud.cpp b/linden/indra/newview/llcloud.cpp index 2cb0952..cf9574a 100644 --- a/linden/indra/newview/llcloud.cpp +++ b/linden/indra/newview/llcloud.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcloud.h b/linden/indra/newview/llcloud.h index f5055ca..89b9615 100644 --- a/linden/indra/newview/llcloud.h +++ b/linden/indra/newview/llcloud.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcolorscheme.cpp b/linden/indra/newview/llcolorscheme.cpp index 5f98fc1..ef8b4a8 100644 --- a/linden/indra/newview/llcolorscheme.cpp +++ b/linden/indra/newview/llcolorscheme.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcolorscheme.h b/linden/indra/newview/llcolorscheme.h index 2f08959..e772b11 100644 --- a/linden/indra/newview/llcolorscheme.h +++ b/linden/indra/newview/llcolorscheme.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcolorswatch.cpp b/linden/indra/newview/llcolorswatch.cpp index a58949f..a36f0fb 100644 --- a/linden/indra/newview/llcolorswatch.cpp +++ b/linden/indra/newview/llcolorswatch.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcolorswatch.h b/linden/indra/newview/llcolorswatch.h index 42d0005..e1bf275 100644 --- a/linden/indra/newview/llcolorswatch.h +++ b/linden/indra/newview/llcolorswatch.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcommandhandler.cpp b/linden/indra/newview/llcommandhandler.cpp index 5c44937..6e7014c 100644 --- a/linden/indra/newview/llcommandhandler.cpp +++ b/linden/indra/newview/llcommandhandler.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -40,16 +40,21 @@ //--------------------------------------------------------------------------- // Underlying registry for command handlers, not directly accessible. //--------------------------------------------------------------------------- +struct LLCommandHandlerInfo +{ + bool mAllowFromExternalBrowser; + LLCommandHandler* mHandler; // safe, all of these are static objects +}; class LLCommandHandlerRegistry { public: static LLCommandHandlerRegistry& instance(); - void add(const char* cmd, LLCommandHandler* handler); - bool dispatch(const std::string& cmd, const LLSD& params, const LLSD& queryMap); + void add(const char* cmd, bool allow_from_external_browser, LLCommandHandler* handler); + bool dispatch(const std::string& cmd, bool from_external_browser, const LLSD& params, const LLSD& queryMap); private: - std::map mMap; + std::map mMap; }; // static @@ -62,29 +67,40 @@ LLCommandHandlerRegistry& LLCommandHandlerRegistry::instance() return instance; } -void LLCommandHandlerRegistry::add(const char* cmd, LLCommandHandler* handler) +void LLCommandHandlerRegistry::add(const char* cmd, bool allow_from_external_browser, LLCommandHandler* handler) { - mMap[cmd] = handler; + LLCommandHandlerInfo info; + info.mAllowFromExternalBrowser = allow_from_external_browser; + info.mHandler = handler; + + mMap[cmd] = info; } bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, + bool from_external_browser, const LLSD& params, const LLSD& queryMap) { - std::map::iterator it = mMap.find(cmd); + std::map::iterator it = mMap.find(cmd); if (it == mMap.end()) return false; - LLCommandHandler* handler = it->second; - if (!handler) return false; - return handler->handle(params, queryMap); + const LLCommandHandlerInfo& info = it->second; + if (from_external_browser && !info.mAllowFromExternalBrowser) + { + // block request from external browser, but report as + // "handled" because it was well formatted. + return true; + } + if (!info.mHandler) return false; + return info.mHandler->handle(params, queryMap); } //--------------------------------------------------------------------------- // Automatic registration of commands, runs before main() //--------------------------------------------------------------------------- -LLCommandHandler::LLCommandHandler(const char* cmd) +LLCommandHandler::LLCommandHandler(const char* cmd, bool allow_from_external_browser) { - LLCommandHandlerRegistry::instance().add(cmd, this); + LLCommandHandlerRegistry::instance().add(cmd, allow_from_external_browser, this); } LLCommandHandler::~LLCommandHandler() @@ -98,7 +114,10 @@ LLCommandHandler::~LLCommandHandler() //--------------------------------------------------------------------------- // static -bool LLCommandDispatcher::dispatch(const std::string& cmd, const LLSD& params, const LLSD& queryMap) +bool LLCommandDispatcher::dispatch(const std::string& cmd, + bool from_external_browser, + const LLSD& params, const LLSD& queryMap) { - return LLCommandHandlerRegistry::instance().dispatch(cmd, params, queryMap); + return LLCommandHandlerRegistry::instance().dispatch( + cmd, from_external_browser, params, queryMap); } diff --git a/linden/indra/newview/llcommandhandler.h b/linden/indra/newview/llcommandhandler.h index 9fdee93..8bad6b4 100644 --- a/linden/indra/newview/llcommandhandler.h +++ b/linden/indra/newview/llcommandhandler.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -40,8 +40,9 @@ class LLFooHandler : public LLCommandHandler { public: // Inform the system you handle commands starting - // with "foo" - LLFooHandler() : LLCommandHandler("foo") { } + // with "foo" and they are not allowed from external web + // browser links. + LLFooHandler() : LLCommandHandler("foo", false) { } // Your code here bool handle(const LLSD& tokens, const LLSD& queryMap) @@ -59,9 +60,11 @@ LLFooHandler gFooHandler; class LLCommandHandler { public: - LLCommandHandler(const char* command); + LLCommandHandler(const char* command, bool allow_from_external_browser); // Automatically registers object to get called when - // command is executed. + // command is executed. All commands can be processed + // in links from LLWebBrowserCtrl, but some (like teleport) + // should not be allowed from outside the app. virtual ~LLCommandHandler(); @@ -78,6 +81,7 @@ class LLCommandDispatcher { public: static bool dispatch(const std::string& cmd, + bool from_external_browser, const LLSD& params, const LLSD& queryMap); // Execute a command registered via the above mechanism, diff --git a/linden/indra/newview/llcompass.cpp b/linden/indra/newview/llcompass.cpp index a464596..1f39705 100644 --- a/linden/indra/newview/llcompass.cpp +++ b/linden/indra/newview/llcompass.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcompass.h b/linden/indra/newview/llcompass.h index 4dbb38d..fa16095 100644 --- a/linden/indra/newview/llcompass.h +++ b/linden/indra/newview/llcompass.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcompilequeue.cpp b/linden/indra/newview/llcompilequeue.cpp index d566c20..93c2737 100644 --- a/linden/indra/newview/llcompilequeue.cpp +++ b/linden/indra/newview/llcompilequeue.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -203,7 +203,7 @@ BOOL LLFloaterScriptQueue::start() snprintf(buffer, sizeof(buffer), "Starting %s of %d items.", mStartString, mObjectIDs.count()); /* Flawfinder: ignore */ LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); - list->addSimpleItem(buffer); + list->addCommentText(buffer); return nextObject(); } @@ -241,7 +241,7 @@ BOOL LLFloaterScriptQueue::nextObject() mDone = TRUE; char buffer[MAX_STRING]; /*Flawfinder: ignore*/ snprintf(buffer, sizeof(buffer), "Done."); /* Flawfinder: ignore */ - list->addSimpleItem(buffer); + list->addCommentText(buffer); childSetEnabled("close",TRUE); } return successful_start; @@ -444,7 +444,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, if(queue) { LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(queue, "queue output"); - list->addSimpleItem(buffer); + list->addCommentText(buffer); } delete data; } @@ -625,7 +625,7 @@ void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj, LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); char buffer[MAX_STRING]; /*Flawfinder: ignore*/ snprintf(buffer, sizeof(buffer), "Resetting '%s'.", item->getName().c_str()); /* Flawfinder: ignore */ - list->addSimpleItem(buffer); + list->addCommentText(buffer); LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_ScriptReset); msg->nextBlockFast(_PREHASH_AgentData); @@ -688,7 +688,7 @@ void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj, LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); char buffer[MAX_STRING]; /*Flawfinder: ignore*/ snprintf(buffer, sizeof(buffer), "Running '%s'.", item->getName().c_str()); /* Flawfinder: ignore */ - list->addSimpleItem(buffer); + list->addCommentText(buffer); LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_SetScriptRunning); @@ -753,7 +753,7 @@ void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj, LLScrollListCtrl* list = LLUICtrlFactory::getScrollListByName(this, "queue output"); char buffer[MAX_STRING]; /*Flawfinder: ignore*/ snprintf(buffer, sizeof(buffer), "Not running '%s'.", item->getName().c_str()); /* Flawfinder: ignore */ - list->addSimpleItem(buffer); + list->addCommentText(buffer); LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_SetScriptRunning); diff --git a/linden/indra/newview/llcompilequeue.h b/linden/indra/newview/llcompilequeue.h index dec091f..9f83f27 100644 --- a/linden/indra/newview/llcompilequeue.h +++ b/linden/indra/newview/llcompilequeue.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llconfirmationmanager.cpp b/linden/indra/newview/llconfirmationmanager.cpp index aab9db0..01b0a23 100644 --- a/linden/indra/newview/llconfirmationmanager.cpp +++ b/linden/indra/newview/llconfirmationmanager.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llconfirmationmanager.h b/linden/indra/newview/llconfirmationmanager.h index 0dd290b..0b8dedb 100644 --- a/linden/indra/newview/llconfirmationmanager.h +++ b/linden/indra/newview/llconfirmationmanager.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llconsole.cpp b/linden/indra/newview/llconsole.cpp index e98ba57..3a8765c 100644 --- a/linden/indra/newview/llconsole.cpp +++ b/linden/indra/newview/llconsole.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llconsole.h b/linden/indra/newview/llconsole.h index e9e744f..9b50b83 100644 --- a/linden/indra/newview/llconsole.h +++ b/linden/indra/newview/llconsole.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcontainerview.cpp b/linden/indra/newview/llcontainerview.cpp index 9d3f2b9..497b794 100644 --- a/linden/indra/newview/llcontainerview.cpp +++ b/linden/indra/newview/llcontainerview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcontainerview.h b/linden/indra/newview/llcontainerview.h index 5099a98..f47d685 100644 --- a/linden/indra/newview/llcontainerview.h +++ b/linden/indra/newview/llcontainerview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp index f2c79b7..23a1753 100644 --- a/linden/indra/newview/llcontroldef.cpp +++ b/linden/indra/newview/llcontroldef.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -164,6 +164,8 @@ void declare_settings() gSavedSettings.declareS32("ButtonVPad", 1, "Default vertical spacing between buttons (pixels)"); // space from bottom of button to text gSavedSettings.declareS32("ButtonHeightSmall", 16, "Default height for small buttons (pixels)"); gSavedSettings.declareS32("ButtonHeight", 20, "Default height for normal buttons (pixels)"); + gSavedSettings.declareF32("ButtonFlashRate", 2.f, "Frequency at which buttons flash (hz)"); + gSavedSettings.declareS32("ButtonFlashCount", 3, "Number of flashes after which flashing buttons stay lit up"); //gSavedSettings.declareS32("ButtonHeightToolbar", 32, "[NOT USED]"); //gSavedSettings.declareS32("DefaultButtonWidth", DEFAULT_BUTTON_WIDTH, "[NOT USED]"); @@ -269,9 +271,10 @@ void declare_settings() gSavedSettings.declareBOOL("ChatShowTimestamps", TRUE, "Show timestamps in chat"); - gSavedSettings.declareBOOL("EnableVoiceChat", FALSE, "Enable talking to other residents with a microphone"); + gSavedSettings.declareBOOL("EnableVoiceChat", TRUE, "Enable talking to other residents with a microphone"); gSavedSettings.declareBOOL("VoiceCallsFriendsOnly", FALSE, "Only accept voice calls from residents on your friends list"); gSavedSettings.declareBOOL("PTTCurrentlyEnabled", TRUE, "", NO_PERSIST); + gSavedSettings.declareBOOL("ShowVoiceChannelPopup", FALSE, "Controls visibility of the current voice channel popup above the voice tab"); gSavedSettings.declareBOOL("EnablePushToTalk", TRUE, "Must hold down a key or moouse button when talking into your microphone"); gSavedSettings.declareString("PushToTalkButton", "MiddleMouse", "Which button or keyboard key is used for push-to-talk"); gSavedSettings.declareBOOL("PushToTalkToggle", FALSE, "Should the push-to-talk button behave as a toggle"); @@ -523,6 +526,7 @@ void declare_settings() gSavedSettings.declareBOOL("CloseChatOnReturn", FALSE, "Close chat after hitting return"); // Copy IM messages into chat history + gSavedSettings.declareBOOL("ContactsTornOff", FALSE, "Show contacts window separately from Communicate window."); gSavedSettings.declareBOOL("ChatHistoryTornOff", FALSE, "Show chat history window separately from Communicate window."); gSavedSettings.declareBOOL("IMInChatHistory", FALSE, "Copy IM into chat history"); gSavedSettings.declareBOOL("IMShowTimestamps", TRUE, "Show timestamps in IM"); @@ -950,6 +954,7 @@ void declare_settings() // Rectangle should almost fill the bottom of the screen on 800x600 // Note that the saved rect size is the size with history shown. gSavedSettings.declareRect("FloaterChatRect", LLRect( 0, 10*16 + 12, 500, 0 ), "Rectangle for chat history"); + gSavedSettings.declareRect("FloaterContactsRect", LLRect( 0, 390, 395, 0 ), "Rectangle for chat history"); gSavedSettings.declareRect("FloaterMuteRect3", LLRect( 0, 300, 300, 0), "Rectangle for mute window"); gSavedPerAccountSettings.declareString("BusyModeResponse", "The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.", "Auto response to instant messages while in busy mode."); gSavedPerAccountSettings.declareString("InstantMessageLogPath", "", "Path to your log files."); @@ -1146,6 +1151,7 @@ void declare_settings() gSavedSettings.declareRect("HtmlFindRect", LLRect(16,650,600,128), "Rectangle for HTML find window"); // Audio + gSavedSettings.declareBOOL("ShowVolumeSettingsPopup", FALSE, "Show individual volume slider for voice, sound effects, etc"); gSavedSettings.declareF32("AudioLevelMaster", 1.0f, "Master audio level, or overall volume"); gSavedSettings.declareF32("AudioLevelSFX", 1.0f, "Audio level of in-world sound effects"); gSavedSettings.declareF32("AudioLevelAmbient",0.5f, "Audio level of environment sounds"); @@ -1161,7 +1167,6 @@ void declare_settings() gSavedSettings.declareF32("AudioLevelDoppler", 1.0f, "Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect)"); gSavedSettings.declareF32("AudioLevelRolloff", 1.0f, "Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff)"); - gSavedSettings.declareS32("AudioDefaultBitrate", 64, "Data streaming rate of uploaded audio samples (thousands of bits per second)"); gSavedSettings.declareBOOL("AudioStreamingMusic", FALSE, "Enable streaming audio"); gSavedSettings.declareBOOL("AudioStreamingVideo", FALSE, "Enable streaming video"); @@ -1293,6 +1298,13 @@ void declare_settings() gSavedSettings.declareBOOL("MuteAudio", FALSE, "All audio plays at 0 volume (streaming audio still takes up bandwidth, for example)"); gSavedSettings.declareBOOL("MuteWhenMinimized", TRUE, "Mute audio when SL window is minimized"); + gSavedSettings.declareBOOL("MuteMusic", FALSE, "Music plays at 0 volume (streaming audio still takes up bandwidth)"); + gSavedSettings.declareBOOL("MuteMedia", FALSE, "Media plays at 0 volume (streaming audio still takes up bandwidth)"); + gSavedSettings.declareBOOL("MuteVoice", FALSE, "Voice plays at 0 volume (streaming audio still takes up bandwidth)"); + gSavedSettings.declareBOOL("MuteSounds", FALSE, "Sound effects play at 0 volume"); + gSavedSettings.declareBOOL("MuteAmbient", FALSE, "Ambient sound effects, such as wind noise, play at 0 volume"); + gSavedSettings.declareBOOL("MuteUI", FALSE, "UI sound effects play at 0 volume"); + gSavedSettings.declareS32("NotifyBoxWidth", 350, "Width of notification messages"); gSavedSettings.declareS32("NotifyBoxHeight", 200, "Height of notification messages"); @@ -1936,8 +1948,8 @@ void settings_setup_listeners() gSavedSettings.getControl("ConsoleMaxLines")->addListener(&console_max_lines_listener); gSavedSettings.getControl("UseOcclusion")->addListener(&use_occlusion_listener); gSavedSettings.getControl("AudioLevelMaster")->addListener(&audio_listener); -// gSavedSettings.getControl("AudioLevelSFX")->addListener(&audio_volume_listener); // no need for listener -// gSavedSettings.getControl("AudioLevelUI")->addListener(&audio_volume_listener); // no need for listener + gSavedSettings.getControl("AudioLevelSFX")->addListener(&audio_listener); + gSavedSettings.getControl("AudioLevelUI")->addListener(&audio_listener); gSavedSettings.getControl("AudioLevelAmbient")->addListener(&audio_listener); gSavedSettings.getControl("AudioLevelMusic")->addListener(&audio_listener); gSavedSettings.getControl("AudioLevelMedia")->addListener(&audio_listener); @@ -1948,6 +1960,11 @@ void settings_setup_listeners() gSavedSettings.getControl("AudioStreamingMusic")->addListener(&audio_stream_music_listener); gSavedSettings.getControl("AudioStreamingVideo")->addListener(&audio_stream_media_listener); gSavedSettings.getControl("MuteAudio")->addListener(&audio_listener); + gSavedSettings.getControl("MuteMusic")->addListener(&audio_listener); + gSavedSettings.getControl("MuteMedia")->addListener(&audio_listener); + gSavedSettings.getControl("MuteVoice")->addListener(&audio_listener); + gSavedSettings.getControl("MuteAmbient")->addListener(&audio_listener); + gSavedSettings.getControl("MuteUI")->addListener(&audio_listener); gSavedSettings.getControl("RenderVBOEnable")->addListener(&render_use_vbo_listener); gSavedSettings.getControl("RenderLightingDetail")->addListener(&render_lighting_detail_listener); gSavedSettings.getControl("NumpadControl")->addListener(&numpad_control_listener); diff --git a/linden/indra/newview/llcubemap.cpp b/linden/indra/newview/llcubemap.cpp index 89dc67e..c8e0d50 100644 --- a/linden/indra/newview/llcubemap.cpp +++ b/linden/indra/newview/llcubemap.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcubemap.h b/linden/indra/newview/llcubemap.h index 3d7ec65..7a59bb3 100644 --- a/linden/indra/newview/llcubemap.h +++ b/linden/indra/newview/llcubemap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcurrencyuimanager.cpp b/linden/indra/newview/llcurrencyuimanager.cpp index 671fcd8..413adf2 100644 --- a/linden/indra/newview/llcurrencyuimanager.cpp +++ b/linden/indra/newview/llcurrencyuimanager.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcurrencyuimanager.h b/linden/indra/newview/llcurrencyuimanager.h index 8a8dee7..a9fafe1 100644 --- a/linden/indra/newview/llcurrencyuimanager.h +++ b/linden/indra/newview/llcurrencyuimanager.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcylinder.cpp b/linden/indra/newview/llcylinder.cpp index ce95c91..9b146a3 100644 --- a/linden/indra/newview/llcylinder.cpp +++ b/linden/indra/newview/llcylinder.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llcylinder.h b/linden/indra/newview/llcylinder.h index 3a76595..b4ec9c6 100644 --- a/linden/indra/newview/llcylinder.h +++ b/linden/indra/newview/llcylinder.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldebugmessagebox.cpp b/linden/indra/newview/lldebugmessagebox.cpp index 82c98e2..4afbde3 100644 --- a/linden/indra/newview/lldebugmessagebox.cpp +++ b/linden/indra/newview/lldebugmessagebox.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldebugmessagebox.h b/linden/indra/newview/lldebugmessagebox.h index c8c0bd3..ae0b56e 100644 --- a/linden/indra/newview/lldebugmessagebox.h +++ b/linden/indra/newview/lldebugmessagebox.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldebugview.cpp b/linden/indra/newview/lldebugview.cpp index 717a72a..a512d62 100644 --- a/linden/indra/newview/lldebugview.cpp +++ b/linden/indra/newview/lldebugview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldebugview.h b/linden/indra/newview/lldebugview.h index b0f1e7f..edaf253 100644 --- a/linden/indra/newview/lldebugview.h +++ b/linden/indra/newview/lldebugview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldirpicker.cpp b/linden/indra/newview/lldirpicker.cpp index 8dd1ddf..532e375 100644 --- a/linden/indra/newview/lldirpicker.cpp +++ b/linden/indra/newview/lldirpicker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldirpicker.h b/linden/indra/newview/lldirpicker.h index 61ec609..ac03644 100644 --- a/linden/indra/newview/lldirpicker.h +++ b/linden/indra/newview/lldirpicker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawable.cpp b/linden/indra/newview/lldrawable.cpp index c253105..a86fc07 100644 --- a/linden/indra/newview/lldrawable.cpp +++ b/linden/indra/newview/lldrawable.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -1036,12 +1036,15 @@ F32 LLDrawable::getVisibilityRadius() const } else if (isLight()) { - return llmax(getRadius(), getVOVolume()->getLightRadius()); - } - else - { - return getRadius(); + const LLVOVolume *vov = getVOVolume(); + if (vov) + { + return llmax(getRadius(), vov->getLightRadius()); + } else { + // llwarns ? + } } + return getRadius(); } void LLDrawable::updateUVMinMax() diff --git a/linden/indra/newview/lldrawable.h b/linden/indra/newview/lldrawable.h index 49babad..1903587 100644 --- a/linden/indra/newview/lldrawable.h +++ b/linden/indra/newview/lldrawable.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpool.cpp b/linden/indra/newview/lldrawpool.cpp index c86b887..a3bdfdc 100644 --- a/linden/indra/newview/lldrawpool.cpp +++ b/linden/indra/newview/lldrawpool.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpool.h b/linden/indra/newview/lldrawpool.h index c2c8a16..f283abd 100644 --- a/linden/indra/newview/lldrawpool.h +++ b/linden/indra/newview/lldrawpool.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolalpha.cpp b/linden/indra/newview/lldrawpoolalpha.cpp index 4d2c82d..24cf8e7 100644 --- a/linden/indra/newview/lldrawpoolalpha.cpp +++ b/linden/indra/newview/lldrawpoolalpha.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolalpha.h b/linden/indra/newview/lldrawpoolalpha.h index 5dfd8a3..c7709f7 100644 --- a/linden/indra/newview/lldrawpoolalpha.h +++ b/linden/indra/newview/lldrawpoolalpha.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolavatar.cpp b/linden/indra/newview/lldrawpoolavatar.cpp index b2a7c87..6e22632 100644 --- a/linden/indra/newview/lldrawpoolavatar.cpp +++ b/linden/indra/newview/lldrawpoolavatar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolavatar.h b/linden/indra/newview/lldrawpoolavatar.h index ab0d40d..a521e57 100644 --- a/linden/indra/newview/lldrawpoolavatar.h +++ b/linden/indra/newview/lldrawpoolavatar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolbump.cpp b/linden/indra/newview/lldrawpoolbump.cpp index 967325c..51a7749 100644 --- a/linden/indra/newview/lldrawpoolbump.cpp +++ b/linden/indra/newview/lldrawpoolbump.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolbump.h b/linden/indra/newview/lldrawpoolbump.h index ceecaf8..665529e 100644 --- a/linden/indra/newview/lldrawpoolbump.h +++ b/linden/indra/newview/lldrawpoolbump.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolclouds.cpp b/linden/indra/newview/lldrawpoolclouds.cpp index 5cf96fa..a7d0b8e 100644 --- a/linden/indra/newview/lldrawpoolclouds.cpp +++ b/linden/indra/newview/lldrawpoolclouds.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolclouds.h b/linden/indra/newview/lldrawpoolclouds.h index e68bdb9..b350ad0 100644 --- a/linden/indra/newview/lldrawpoolclouds.h +++ b/linden/indra/newview/lldrawpoolclouds.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolground.cpp b/linden/indra/newview/lldrawpoolground.cpp index b3d3969..6ff7f06 100644 --- a/linden/indra/newview/lldrawpoolground.cpp +++ b/linden/indra/newview/lldrawpoolground.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolground.h b/linden/indra/newview/lldrawpoolground.h index c285103..5cdce7b 100644 --- a/linden/indra/newview/lldrawpoolground.h +++ b/linden/indra/newview/lldrawpoolground.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolsimple.cpp b/linden/indra/newview/lldrawpoolsimple.cpp index 8a7ef72..7e6c3dd 100644 --- a/linden/indra/newview/lldrawpoolsimple.cpp +++ b/linden/indra/newview/lldrawpoolsimple.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolsimple.h b/linden/indra/newview/lldrawpoolsimple.h index 60502e9..8eeb8ed 100644 --- a/linden/indra/newview/lldrawpoolsimple.h +++ b/linden/indra/newview/lldrawpoolsimple.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolsky.cpp b/linden/indra/newview/lldrawpoolsky.cpp index e4d937b..127c5c5 100644 --- a/linden/indra/newview/lldrawpoolsky.cpp +++ b/linden/indra/newview/lldrawpoolsky.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolsky.h b/linden/indra/newview/lldrawpoolsky.h index f529451..fe4cc36 100644 --- a/linden/indra/newview/lldrawpoolsky.h +++ b/linden/indra/newview/lldrawpoolsky.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolstars.cpp b/linden/indra/newview/lldrawpoolstars.cpp index f52e58a..3f9c8db 100644 --- a/linden/indra/newview/lldrawpoolstars.cpp +++ b/linden/indra/newview/lldrawpoolstars.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolstars.h b/linden/indra/newview/lldrawpoolstars.h index ad39d40..05b7f9e 100644 --- a/linden/indra/newview/lldrawpoolstars.h +++ b/linden/indra/newview/lldrawpoolstars.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolterrain.cpp b/linden/indra/newview/lldrawpoolterrain.cpp index 95d669b..e315259 100644 --- a/linden/indra/newview/lldrawpoolterrain.cpp +++ b/linden/indra/newview/lldrawpoolterrain.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolterrain.h b/linden/indra/newview/lldrawpoolterrain.h index 40ce508..80a1fcb 100644 --- a/linden/indra/newview/lldrawpoolterrain.h +++ b/linden/indra/newview/lldrawpoolterrain.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpooltree.cpp b/linden/indra/newview/lldrawpooltree.cpp index f4b48c2..f5971be 100644 --- a/linden/indra/newview/lldrawpooltree.cpp +++ b/linden/indra/newview/lldrawpooltree.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpooltree.h b/linden/indra/newview/lldrawpooltree.h index 5e196bc..bf18b65 100644 --- a/linden/indra/newview/lldrawpooltree.h +++ b/linden/indra/newview/lldrawpooltree.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldrawpoolwater.cpp b/linden/indra/newview/lldrawpoolwater.cpp index dde2193..e796d56 100644 --- a/linden/indra/newview/lldrawpoolwater.cpp +++ b/linden/indra/newview/lldrawpoolwater.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -567,7 +567,15 @@ void LLDrawPoolWater::shade() LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap(); gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB); - skyMap->bind(); + + if (skyMap) + { + skyMap->bind(); + } + else + { + llwarns << "NULL gSky.mVOSkyp->getCubeMap(), not binding." << llendl; + } //bind normal map S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP); diff --git a/linden/indra/newview/lldrawpoolwater.h b/linden/indra/newview/lldrawpoolwater.h index a23ff6b..b6569ee 100644 --- a/linden/indra/newview/lldrawpoolwater.h +++ b/linden/indra/newview/lldrawpoolwater.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldriverparam.cpp b/linden/indra/newview/lldriverparam.cpp index 8c3d7d8..dcae69d 100644 --- a/linden/indra/newview/lldriverparam.cpp +++ b/linden/indra/newview/lldriverparam.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldriverparam.h b/linden/indra/newview/lldriverparam.h index a0aa848..d767d6b 100644 --- a/linden/indra/newview/lldriverparam.h +++ b/linden/indra/newview/lldriverparam.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldynamictexture.cpp b/linden/indra/newview/lldynamictexture.cpp index 11111f4..aba87e2 100644 --- a/linden/indra/newview/lldynamictexture.cpp +++ b/linden/indra/newview/lldynamictexture.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lldynamictexture.h b/linden/indra/newview/lldynamictexture.h index c016ee5..23b3c64 100644 --- a/linden/indra/newview/lldynamictexture.h +++ b/linden/indra/newview/lldynamictexture.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llemote.cpp b/linden/indra/newview/llemote.cpp index 2cd5e4a..0a65e1e 100644 --- a/linden/indra/newview/llemote.cpp +++ b/linden/indra/newview/llemote.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llemote.h b/linden/indra/newview/llemote.h index 4862865..9bc5128 100644 --- a/linden/indra/newview/llemote.h +++ b/linden/indra/newview/llemote.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lleventinfo.cpp b/linden/indra/newview/lleventinfo.cpp index bd550c9..2a7dcde 100644 --- a/linden/indra/newview/lleventinfo.cpp +++ b/linden/indra/newview/lleventinfo.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lleventinfo.h b/linden/indra/newview/lleventinfo.h index 8d3479d..5741478 100644 --- a/linden/indra/newview/lleventinfo.h +++ b/linden/indra/newview/lleventinfo.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lleventnotifier.cpp b/linden/indra/newview/lleventnotifier.cpp index d807237..9451667 100644 --- a/linden/indra/newview/lleventnotifier.cpp +++ b/linden/indra/newview/lleventnotifier.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lleventnotifier.h b/linden/indra/newview/lleventnotifier.h index bbe3e79..773779c 100644 --- a/linden/indra/newview/lleventnotifier.h +++ b/linden/indra/newview/lleventnotifier.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lleventpoll.cpp b/linden/indra/newview/lleventpoll.cpp index b21ca1a..f00c05b 100644 --- a/linden/indra/newview/lleventpoll.cpp +++ b/linden/indra/newview/lleventpoll.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lleventpoll.h b/linden/indra/newview/lleventpoll.h index dbdb759..a726ede 100644 --- a/linden/indra/newview/lleventpoll.h +++ b/linden/indra/newview/lleventpoll.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llface.cpp b/linden/indra/newview/llface.cpp index 875059a..058c506 100644 --- a/linden/indra/newview/llface.cpp +++ b/linden/indra/newview/llface.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llface.h b/linden/indra/newview/llface.h index 3eb6d30..5336d1c 100644 --- a/linden/indra/newview/llface.h +++ b/linden/indra/newview/llface.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llface.inl b/linden/indra/newview/llface.inl index 896cc69..2cb1654 100644 --- a/linden/indra/newview/llface.inl +++ b/linden/indra/newview/llface.inl @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp index 4181aa1..14dc08c 100644 --- a/linden/indra/newview/llfasttimerview.cpp +++ b/linden/indra/newview/llfasttimerview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfasttimerview.h b/linden/indra/newview/llfasttimerview.h index 452133d..7c1acff 100644 --- a/linden/indra/newview/llfasttimerview.h +++ b/linden/indra/newview/llfasttimerview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index 947e6ad..56e0469 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -372,10 +372,14 @@ void LLFeatureManager::loadGPUClass() char* ex = strtok(expr, ".*"); char* rnd = (char*) renderer.c_str(); - + while (ex != NULL && rnd != NULL) { rnd = strstr(rnd, ex); + if (rnd != NULL) + { + rnd += strlen(ex); + } ex = strtok(NULL, ".*"); } diff --git a/linden/indra/newview/llfeaturemanager.h b/linden/indra/newview/llfeaturemanager.h index 964cce0..1ee62b4 100644 --- a/linden/indra/newview/llfeaturemanager.h +++ b/linden/indra/newview/llfeaturemanager.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfilepicker.cpp b/linden/indra/newview/llfilepicker.cpp index 5f786ef..107c271 100644 --- a/linden/indra/newview/llfilepicker.cpp +++ b/linden/indra/newview/llfilepicker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfilepicker.h b/linden/indra/newview/llfilepicker.h index f004646..c6a11a4 100644 --- a/linden/indra/newview/llfilepicker.h +++ b/linden/indra/newview/llfilepicker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index 8392552..b17bbc3 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h index 17757d4..748f4f5 100644 --- a/linden/indra/newview/llfirstuse.h +++ b/linden/indra/newview/llfirstuse.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llflexibleobject.cpp b/linden/indra/newview/llflexibleobject.cpp index 0bf6eba..eb9b927 100644 --- a/linden/indra/newview/llflexibleobject.cpp +++ b/linden/indra/newview/llflexibleobject.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llflexibleobject.h b/linden/indra/newview/llflexibleobject.h index 422f2fc..a14a143 100644 --- a/linden/indra/newview/llflexibleobject.h +++ b/linden/indra/newview/llflexibleobject.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index dc5b6f5..47ecdff 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterabout.h b/linden/indra/newview/llfloaterabout.h index a2d5cf0..b58f8cc 100644 --- a/linden/indra/newview/llfloaterabout.h +++ b/linden/indra/newview/llfloaterabout.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp index fb50717..877ebca 100644 --- a/linden/indra/newview/llfloateractivespeakers.cpp +++ b/linden/indra/newview/llfloateractivespeakers.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -45,6 +45,7 @@ #include "llviewerobjectlist.h" #include "llimpanel.h" // LLVoiceChannel #include "llsdutil.h" +#include "llimview.h" const F32 SPEAKER_TIMEOUT = 10.f; // seconds of not being on voice channel before removed from list of active speakers const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f); @@ -65,7 +66,10 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const LLString& name, const ESpeakerType mID(id), mTyping(FALSE), mSortIndex(0), - mType(type) + mType(type), + mIsModerator(FALSE), + mModeratorMutedVoice(FALSE), + mModeratorMutedText(FALSE) { mHandle.init(); sSpeakers.insert(std::make_pair(mHandle, this)); @@ -77,6 +81,9 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const LLString& name, const ESpeakerType { mDisplayName = name; } + + gVoiceClient->setUserVolume(id, gMuteListp->getSavedResidentVolume(id)); + mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); } @@ -107,6 +114,27 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const char* first, const ch } } +LLSpeakerTextModerationEvent::LLSpeakerTextModerationEvent(LLSpeaker* source) +: LLEvent(source, "Speaker text moderation event") +{ +} + +LLSD LLSpeakerTextModerationEvent::getValue() +{ + return LLString("text"); +} + + +LLSpeakerVoiceModerationEvent::LLSpeakerVoiceModerationEvent(LLSpeaker* source) +: LLEvent(source, "Speaker voice moderation event") +{ +} + +LLSD LLSpeakerVoiceModerationEvent::getValue() +{ + return LLString("voice"); +} + // helper sort class struct LLSortRecentSpeakers @@ -132,6 +160,10 @@ bool LLSortRecentSpeakers::operator()(const LLPointer lhs, const LLPo return( lhs->mDisplayName.compare(rhs->mDisplayName) < 0 ); } +// +// LLFloaterActiveSpeakers +// + LLFloaterActiveSpeakers::LLFloaterActiveSpeakers(const LLSD& seed) : mPanel(NULL) { mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL); @@ -177,6 +209,26 @@ void* LLFloaterActiveSpeakers::createSpeakersPanel(void* data) return new LLPanelActiveSpeakers(gActiveChannelSpeakerMgr, FALSE); } +// +// LLPanelActiveSpeakers::LLSpeakerListener +// +bool LLPanelActiveSpeakers::LLSpeakerListener::handleEvent(LLPointer event, const LLSD& userdata) +{ + LLPointer speakerp = (LLSpeaker*)event->getSource(); + if (speakerp.isNull()) return false; + + // update UI on confirmation of moderator mutes + if (event->getValue().asString() == "voice") + { + mPanel->childSetValue("moderator_allow_voice", !speakerp->mModeratorMutedVoice); + } + if (event->getValue().asString() == "text") + { + mPanel->childSetValue("moderator_allow_text", !speakerp->mModeratorMutedText); + } + return true; +} + // // LLPanelActiveSpeakers @@ -191,6 +243,7 @@ LLPanelActiveSpeakers::LLPanelActiveSpeakers(LLSpeakerMgr* data_source, BOOL sho mSpeakerMgr(data_source) { setMouseOpaque(FALSE); + mSpeakerListener = new LLSpeakerListener(this); } LLPanelActiveSpeakers::~LLPanelActiveSpeakers() @@ -201,6 +254,10 @@ LLPanelActiveSpeakers::~LLPanelActiveSpeakers() BOOL LLPanelActiveSpeakers::postBuild() { mSpeakerList = LLUICtrlFactory::getScrollListByName(this, "speakers_list"); + mSpeakerList->setDoubleClickCallback(onDoubleClickSpeaker); + mSpeakerList->setCommitOnSelectionChange(TRUE); + mSpeakerList->setCommitCallback(onSelectSpeaker); + mSpeakerList->setCallbackUserData(this); mMuteTextCtrl = (LLUICtrl*)getCtrlByNameAndType("mute_text_btn", WIDGET_TYPE_DONTCARE); childSetCommitCallback("mute_text_btn", onClickMuteTextCommit, this); @@ -215,13 +272,39 @@ BOOL LLPanelActiveSpeakers::postBuild() mProfileBtn = LLUICtrlFactory::getButtonByName(this, "profile_btn"); childSetAction("profile_btn", onClickProfile, this); + + childSetCommitCallback("moderator_allow_voice", onModeratorMuteVoice, this); + childSetCommitCallback("moderator_allow_text", onModeratorMuteText, this); + childSetCommitCallback("moderation_mode", onChangeModerationMode, this); + + // update speaker UI + handleSpeakerSelect(); + return TRUE; } +void LLPanelActiveSpeakers::handleSpeakerSelect() +{ + LLUUID speaker_id = mSpeakerList->getValue().asUUID(); + LLPointer selected_speakerp = mSpeakerMgr->findSpeaker(speaker_id); + + if (selected_speakerp.notNull()) + { + // since setting these values is delayed by a round trip to the Vivox servers + // update them only when selecting a new speaker or + // asynchronously when an update arrives + childSetValue("moderator_allow_voice", selected_speakerp ? !selected_speakerp->mModeratorMutedVoice : TRUE); + childSetValue("moderator_allow_text", selected_speakerp ? !selected_speakerp->mModeratorMutedText : TRUE); + + mSpeakerListener->clearDispatchers(); + selected_speakerp->addListener(mSpeakerListener); + } +} + void LLPanelActiveSpeakers::refreshSpeakers() { // store off current selection and scroll state to preserve across list rebuilds - LLUUID selected_id = mSpeakerList->getSimpleSelectedValue().asUUID(); + LLUUID selected_id = mSpeakerList->getSelectedValue().asUUID(); S32 scroll_pos = mSpeakerList->getScrollInterface()->getScrollPos(); BOOL sort_ascending = mSpeakerList->getSortAscending(); @@ -253,7 +336,6 @@ void LLPanelActiveSpeakers::refreshSpeakers() row["columns"][0]["column"] = "icon_speaking_status"; row["columns"][0]["type"] = "icon"; - row["columns"][0]["color"] = speakerp->mDotColor.getValue(); LLString icon_image_id; S32 icon_image_idx = llmin(2, llfloor((speakerp->mSpeechVolume / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 3.f)); @@ -288,8 +370,33 @@ void LLPanelActiveSpeakers::refreshSpeakers() // } //} - row["columns"][0]["value"] = (speakerp->mStatus == LLSpeaker::STATUS_MUTED) ? - gViewerArt.getString("mute_icon.tga") : icon_image_id; + LLColor4 icon_color; + if (speakerp->mStatus == LLSpeaker::STATUS_MUTED) + { + row["columns"][0]["value"] = gViewerArt.getString("mute_icon.tga"); + if(speakerp->mModeratorMutedVoice) + { + icon_color.setVec(0.5f, 0.5f, 0.5f, 1.f); + } + else + { + icon_color.setVec(1.f, 71.f / 255.f, 71.f / 255.f, 1.f); + } + } + else + { + row["columns"][0]["value"] = icon_image_id; + icon_color = speakerp->mDotColor; + + if (speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE) // if voice is disabled for this speaker + { + // non voice speakers have hidden icons, render as transparent + icon_color.setVec(0.f, 0.f, 0.f, 0.f); + } + } + + row["columns"][0]["color"] = icon_color.getValue(); + if (speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE && speakerp->mStatus != LLSpeaker::STATUS_MUTED) // if voice is disabled for this speaker { // non voice speakers have hidden icons, render as transparent @@ -303,15 +410,23 @@ void LLPanelActiveSpeakers::refreshSpeakers() row["columns"][1]["color"] = LLColor4::grey4.getValue(); } + LLString speaker_name; if (speakerp->mDisplayName.empty()) { - row["columns"][1]["value"] = LLCacheName::getDefaultName(); + speaker_name = LLCacheName::getDefaultName(); } else { - row["columns"][1]["value"] = speakerp->mDisplayName; + speaker_name = speakerp->mDisplayName; } + if (speakerp->mIsModerator) + { + speaker_name += LLString(" ") + getFormattedUIString("moderator_label"); + } + row["columns"][1]["value"] = speaker_name; + row["columns"][1]["font-style"] = speakerp->mIsModerator ? "BOLD" : "NORMAL"; + row["columns"][2]["column"] = "speaking_status"; row["columns"][2]["type"] = "text"; @@ -323,17 +438,28 @@ void LLPanelActiveSpeakers::refreshSpeakers() //restore sort order, selection, etc mSpeakerList->sortByColumn(sort_column, sort_ascending); + + // temporarily disable commit callback while restoring original selection + mSpeakerList->setCommitCallback(NULL); + // make sure something is selected if (selected_id.isNull()) { mSpeakerList->selectFirstItem(); + handleSpeakerSelect(); } else { + // reselect original speaker but don't call handleSpeakerSelect() + // as that would change the moderation mute checkboxes before they + // have had time to get confirmation from the server mSpeakerList->selectByValue(selected_id); } - LLPointer speakerp = mSpeakerMgr->findSpeaker(selected_id); + mSpeakerList->setCommitCallback(onSelectSpeaker); + + LLPointer selected_speakerp = mSpeakerMgr->findSpeaker(selected_id); + if (gMuteListp) { @@ -341,31 +467,53 @@ void LLPanelActiveSpeakers::refreshSpeakers() if (mMuteVoiceCtrl) { mMuteVoiceCtrl->setValue(gMuteListp->isMuted(selected_id, LLMute::flagVoiceChat)); - mMuteVoiceCtrl->setEnabled(selected_id.notNull() + mMuteVoiceCtrl->setEnabled(LLVoiceClient::voiceEnabled() + && gVoiceClient->getVoiceEnabled(selected_id) + && selected_id.notNull() && selected_id != gAgent.getID() - && (speakerp.notNull() && speakerp->mType == LLSpeaker::SPEAKER_AGENT)); + && (selected_speakerp.notNull() && selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT)); } if (mMuteTextCtrl) { mMuteTextCtrl->setValue(gMuteListp->isMuted(selected_id, LLMute::flagTextChat)); - mMuteTextCtrl->setEnabled(selected_id.notNull() && selected_id != gAgent.getID() && speakerp.notNull() && !gMuteListp->isLinden(speakerp->mDisplayName)); - } - childSetValue("speaker_volume", gVoiceClient->getUserVolume(selected_id)); - childSetEnabled("speaker_volume", selected_id.notNull() - && selected_id != gAgent.getID() - && (speakerp.notNull() && speakerp->mType == LLSpeaker::SPEAKER_AGENT)); - if (mProfileBtn) - { - mProfileBtn->setEnabled(selected_id.notNull()); + mMuteTextCtrl->setEnabled(selected_id.notNull() + && selected_id != gAgent.getID() + && selected_speakerp.notNull() + && !gMuteListp->isLinden(selected_speakerp->mDisplayName)); } } + childSetValue("speaker_volume", gVoiceClient->getUserVolume(selected_id)); + childSetEnabled("speaker_volume", LLVoiceClient::voiceEnabled() + && gVoiceClient->getVoiceEnabled(selected_id) + && selected_id.notNull() + && selected_id != gAgent.getID() + && (selected_speakerp.notNull() && selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT)); + + childSetEnabled( + "moderator_controls_label", + selected_id.notNull()); + + childSetEnabled( + "moderator_allow_voice", + selected_id.notNull() + && mSpeakerMgr->isVoiceActive() + && gVoiceClient->getVoiceEnabled(selected_id)); + + childSetEnabled( + "moderator_allow_text", + selected_id.notNull()); + + if (mProfileBtn) + { + mProfileBtn->setEnabled(selected_id.notNull()); + } // show selected user name in large font if (mNameText) { - if (speakerp) + if (selected_speakerp) { - mNameText->setValue(speakerp->mDisplayName); + mNameText->setValue(selected_speakerp->mDisplayName); } else { @@ -373,6 +521,14 @@ void LLPanelActiveSpeakers::refreshSpeakers() } } + //update moderator capabilities + LLPointer self_speakerp = mSpeakerMgr->findSpeaker(gAgent.getID()); + if(self_speakerp) + { + childSetVisible("moderation_mode_panel", self_speakerp->mIsModerator && mSpeakerMgr->isVoiceActive()); + childSetVisible("moderator_controls", self_speakerp->mIsModerator); + } + // keep scroll value stable mSpeakerList->getScrollInterface()->setScrollPos(scroll_pos); } @@ -382,6 +538,20 @@ void LLPanelActiveSpeakers::setSpeaker(const LLUUID& id, const LLString& name, L mSpeakerMgr->setSpeaker(id, name, status, type); } +void LLPanelActiveSpeakers::setVoiceModerationCtrlMode( + const BOOL& moderated_voice) +{ + LLUICtrl* voice_moderation_ctrl = (LLUICtrl*) getChildByName( + "moderation_mode", TRUE); //recursive lookup + + if ( voice_moderation_ctrl ) + { + std::string value; + + value = moderated_voice ? "moderated" : "unmoderated"; + voice_moderation_ctrl->setValue(value); + } +} //static void LLPanelActiveSpeakers::onClickMuteTextCommit(LLUICtrl* ctrl, void* user_data) @@ -454,7 +624,11 @@ void LLPanelActiveSpeakers::onVolumeChange(LLUICtrl* source, void* user_data) LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data; LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID(); - gVoiceClient->setUserVolume(speaker_id, (F32)panelp->childGetValue("speaker_volume").asReal()); + F32 new_volume = (F32)panelp->childGetValue("speaker_volume").asReal(); + gVoiceClient->setUserVolume(speaker_id, new_volume); + + // store this volume setting for future sessions + gMuteListp->setSavedResidentVolume(speaker_id, new_volume); } //static @@ -465,7 +639,190 @@ void LLPanelActiveSpeakers::onClickProfile(void* user_data) LLFloaterAvatarInfo::showFromDirectory(speaker_id); } - + +//static +void LLPanelActiveSpeakers::onDoubleClickSpeaker(void* user_data) +{ + LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data; + LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID(); + + LLPointer speakerp = panelp->mSpeakerMgr->findSpeaker(speaker_id); + + if (speaker_id != gAgent.getID() && speakerp.notNull()) + { + gIMMgr->addSession(speakerp->mDisplayName, IM_NOTHING_SPECIAL, speaker_id); + } +} + +//static +void LLPanelActiveSpeakers::onSelectSpeaker(LLUICtrl* source, void* user_data) +{ + LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data; + panelp->handleSpeakerSelect(); +} + +//static +void LLPanelActiveSpeakers::onModeratorMuteVoice(LLUICtrl* ctrl, void* user_data) +{ + LLPanelActiveSpeakers* self = (LLPanelActiveSpeakers*)user_data; + LLUICtrl* speakers_list = (LLUICtrl*)self->getChildByName("speakers_list", TRUE); + if (!speakers_list || !gAgent.getRegion()) return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = self->mSpeakerMgr->getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = speakers_list->getValue(); + data["params"]["mutes"] = LLSD::emptyMap(); + // ctrl value represents ability to type, so invert + data["params"]["mutes"]["voice"] = !ctrl->getValue(); + + class MuteVoiceResponder : public LLHTTPClient::Responder + { + public: + MuteVoiceResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + LLFloaterIMPanel* floaterp; + + floaterp = gIMMgr->findFloaterBySession(mSessionID); + + if ( floaterp ) + { + if ( 403 == status ) + { + floaterp->showSessionEventError( + "mute", + "not_a_moderator"); + } + else + { + floaterp->showSessionEventError( + "mute", + "generic"); + } + } + } + } + + private: + LLUUID mSessionID; + }; + + LLHTTPClient::post( + url, + data, + new MuteVoiceResponder(self->mSpeakerMgr->getSessionID())); +} + +//static +void LLPanelActiveSpeakers::onModeratorMuteText(LLUICtrl* ctrl, void* user_data) +{ + LLPanelActiveSpeakers* self = (LLPanelActiveSpeakers*)user_data; + LLUICtrl* speakers_list = (LLUICtrl*)self->getChildByName("speakers_list", TRUE); + if (!speakers_list || !gAgent.getRegion()) return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = self->mSpeakerMgr->getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = speakers_list->getValue(); + data["params"]["mutes"] = LLSD::emptyMap(); + // ctrl value represents ability to type, so invert + data["params"]["mutes"]["text"] = !ctrl->getValue(); + + class MuteTextResponder : public LLHTTPClient::Responder + { + public: + MuteTextResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + LLFloaterIMPanel* floaterp; + + floaterp = gIMMgr->findFloaterBySession(mSessionID); + + if ( floaterp ) + { + if ( 403 == status ) + { + floaterp->showSessionEventError( + "mute", + "not_a_moderator"); + } + else + { + floaterp->showSessionEventError( + "mute", + "generic"); + } + } + } + } + + private: + LLUUID mSessionID; + }; + + LLHTTPClient::post( + url, + data, + new MuteTextResponder(self->mSpeakerMgr->getSessionID())); +} + +//static +void LLPanelActiveSpeakers::onChangeModerationMode(LLUICtrl* ctrl, void* user_data) +{ + LLPanelActiveSpeakers* self = (LLPanelActiveSpeakers*)user_data; + if (!gAgent.getRegion()) return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "session update"; + data["session-id"] = self->mSpeakerMgr->getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["moderated_mode"] = LLSD::emptyMap(); + if (ctrl->getValue().asString() == "unmoderated") + { + data["params"]["moderated_mode"]["voice"] = false; + } + else if (ctrl->getValue().asString() == "moderated") + { + data["params"]["moderated_mode"]["voice"] = true; + } + + struct ModerationModeResponder : public LLHTTPClient::Responder + { + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + } + }; + + LLHTTPClient::post(url, data, new ModerationModeResponder()); +} + // // LLSpeakerMgr // @@ -537,11 +894,16 @@ void LLSpeakerMgr::update() if (voice_channel_active && gVoiceClient->getVoiceEnabled(speaker_id)) { speakerp->mSpeechVolume = gVoiceClient->getCurrentPower(speaker_id); + BOOL moderator_muted_voice = gVoiceClient->getIsModeratorMuted(speaker_id); + if (moderator_muted_voice != speakerp->mModeratorMutedVoice) + { + speakerp->mModeratorMutedVoice = moderator_muted_voice; + speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp)); + } - if (gVoiceClient->getOnMuteList(speaker_id)) + if (gVoiceClient->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice) { speakerp->mStatus = LLSpeaker::STATUS_MUTED; - speakerp->mDotColor = LLColor4::white; } else if (gVoiceClient->getIsSpeaking(speaker_id)) { @@ -663,6 +1025,12 @@ void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, BOOL include_tex } } +const LLUUID LLSpeakerMgr::getSessionID() +{ + return mVoiceChannel->getSessionID(); +} + + void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, BOOL typing) { LLPointer speakerp = findSpeaker(speaker_id); @@ -704,57 +1072,134 @@ void LLIMSpeakerMgr::updateSpeakerList() return; } -void LLIMSpeakerMgr::processSpeakerList(LLSD list) +void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers) { - for(LLSD::array_iterator list_it = list.beginArray(); - list_it != list.endArray(); - ++list_it) + if ( !speakers.isMap() ) return; + + if ( speakers.has("agent_info") && speakers["agent_info"].isMap() ) { - LLUUID agent_id(list_it->asUUID()); + LLSD::map_const_iterator speaker_it; + for(speaker_it = speakers["agent_info"].beginMap(); + speaker_it != speakers["agent_info"].endMap(); + ++speaker_it) + { + LLUUID agent_id(speaker_it->first); - setSpeaker(agent_id, "", LLSpeaker::STATUS_TEXT_ONLY); + LLPointer speakerp = setSpeaker( + agent_id, + "", + LLSpeaker::STATUS_TEXT_ONLY); + + if ( speaker_it->second.isMap() ) + { + speakerp->mIsModerator = speaker_it->second["is_moderator"]; + speakerp->mModeratorMutedText = + speaker_it->second["mutes"]["text"]; + } + } + } + else if ( speakers.has("agents" ) && speakers["agents"].isArray() ) + { + //older, more decprecated way. Need here for + //using older version of servers + LLSD::array_const_iterator speaker_it; + for(speaker_it = speakers["agents"].beginArray(); + speaker_it != speakers["agents"].endArray(); + ++speaker_it) + { + const LLUUID agent_id = (*speaker_it).asUUID(); + + LLPointer speakerp = setSpeaker( + agent_id, + "", + LLSpeaker::STATUS_TEXT_ONLY); + } } } -void LLIMSpeakerMgr::processSpeakerMap(LLSD map) +void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) { - for(LLSD::map_iterator map_it = map.beginMap(); - map_it != map.endMap(); - ++map_it) + if ( !update.isMap() ) return; + + if ( update.has("agent_updates") && update["agent_updates"].isMap() ) { - // add as new speaker - setSpeaker(LLUUID(map_it->first)); - } -} + LLSD::map_const_iterator update_it; + for( + update_it = update["agent_updates"].beginMap(); + update_it != update["agent_updates"].endMap(); + ++update_it) + { + LLUUID agent_id(update_it->first); + LLPointer speakerp = findSpeaker(agent_id); + LLSD agent_data = update_it->second; + if (agent_data.isMap() && agent_data.has("transition")) + { + if (agent_data["transition"].asString() == "LEAVE" && speakerp.notNull()) + { + speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; + speakerp->mDotColor = INACTIVE_COLOR; + speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); + } + else if (agent_data["transition"].asString() == "ENTER") + { + // add or update speaker + speakerp = setSpeaker(agent_id); + } + else + { + llwarns << "bad membership list update " << ll_print_sd(agent_data["transition"]) << llendl; + } + } -void LLIMSpeakerMgr::processSpeakerListUpdate(LLSD update) -{ - for(LLSD::map_iterator update_it = update.beginMap(); - update_it != update.endMap(); - ++update_it) + if (speakerp.isNull()) continue; + + // should have a valid speaker from this point on + if (agent_data.isMap() && agent_data.has("info")) + { + LLSD agent_info = agent_data["info"]; + + if (agent_info.has("is_moderator")) + { + speakerp->mIsModerator = agent_info["is_moderator"]; + } + + if (agent_info.has("mutes")) + { + speakerp->mModeratorMutedText = agent_info["mutes"]["text"]; + } + } + } + } + else if ( update.has("updates") && update["updates"].isMap() ) { - LLUUID agent_id(update_it->first); - - if (update_it->second.asString() == "LEAVE") + LLSD::map_const_iterator update_it; + for ( + update_it = update["updates"].beginMap(); + update_it != update["updates"].endMap(); + ++update_it) { + LLUUID agent_id(update_it->first); LLPointer speakerp = findSpeaker(agent_id); - if (speakerp) + + std::string agent_transition = update_it->second.asString(); + if (agent_transition == "LEAVE" && speakerp.notNull()) { speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; speakerp->mDotColor = INACTIVE_COLOR; speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT); } - } - else if (update_it->second.asString() == "ENTER") - { - // add or update speaker - setSpeaker(agent_id); - } - else - { - llwarns << "LLIMSpeakerMgr::processSpeakerListUpdate() : bad membership list update " << ll_print_sd(update_it->second) << llendl; + else if ( agent_transition == "ENTER") + { + // add or update speaker + speakerp = setSpeaker(agent_id); + } + else + { + llwarns << "bad membership list update " + << agent_transition << llendl; + } } } } diff --git a/linden/indra/newview/llfloateractivespeakers.h b/linden/indra/newview/llfloateractivespeakers.h index b8d39ca..cded35d 100644 --- a/linden/indra/newview/llfloateractivespeakers.h +++ b/linden/indra/newview/llfloateractivespeakers.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -36,6 +36,7 @@ #include "llmemory.h" #include "llvoiceclient.h" #include "llframetimer.h" +#include "llevent.h" class LLScrollListCtrl; class LLButton; @@ -45,9 +46,8 @@ class LLVoiceChannel; // data for a given participant in a voice channel -class LLSpeaker : public LLRefCount +struct LLSpeaker : public LLRefCount, public LLObservable { -public: typedef enum e_speaker_type { SPEAKER_AGENT, @@ -72,8 +72,6 @@ public: static void onAvatarNameLookup(const LLUUID& id, const char* first, const char* last, BOOL is_group, void* user_data); -public: - ESpeakerStatus mStatus; // current activity status in speech group F32 mLastSpokeTime; // timestamp when this speaker last spoke F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) @@ -86,11 +84,28 @@ public: S32 mSortIndex; LLViewHandle mHandle; ESpeakerType mType; + BOOL mIsModerator; + BOOL mModeratorMutedVoice; + BOOL mModeratorMutedText; typedef std::map speaker_map_t; static speaker_map_t sSpeakers; }; +class LLSpeakerTextModerationEvent : public LLEvent +{ +public: + LLSpeakerTextModerationEvent(LLSpeaker* source); + /*virtual*/ LLSD getValue(); +}; + +class LLSpeakerVoiceModerationEvent : public LLEvent +{ +public: + LLSpeakerVoiceModerationEvent(LLSpeaker* source); + /*virtual*/ LLSD getValue(); +}; + class LLSpeakerMgr { public: @@ -110,6 +125,7 @@ public: typedef std::vector > speaker_list_t; void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text); + const LLUUID getSessionID(); protected: virtual void updateSpeakerList(); @@ -127,9 +143,8 @@ class LLIMSpeakerMgr : public LLSpeakerMgr public: LLIMSpeakerMgr(LLVoiceChannel* channel); - void processSpeakerListUpdate(LLSD update); - void processSpeakerList(LLSD list); - void processSpeakerMap(LLSD list); + void updateSpeakers(const LLSD& update); + void setSpeakers(const LLSD& speakers); protected: virtual void updateSpeakerList(); }; @@ -185,19 +200,38 @@ public: /*virtual*/ BOOL postBuild(); + void handleSpeakerSelect(); void refreshSpeakers(); void setSpeaker(const LLUUID& id, const LLString& name = LLString::null, LLSpeaker::ESpeakerStatus status = LLSpeaker::STATUS_TEXT_ONLY, LLSpeaker::ESpeakerType = LLSpeaker::SPEAKER_AGENT); + + void setVoiceModerationCtrlMode(const BOOL& moderated_voice); static void onClickMuteVoice(void* user_data); static void onClickMuteVoiceCommit(LLUICtrl* ctrl, void* user_data); static void onClickMuteTextCommit(LLUICtrl* ctrl, void* user_data); static void onVolumeChange(LLUICtrl* source, void* user_data); static void onClickProfile(void* user_data); + static void onDoubleClickSpeaker(void* user_data); + static void onSelectSpeaker(LLUICtrl* source, void* user_data); + static void onModeratorMuteVoice(LLUICtrl* ctrl, void* user_data); + static void onModeratorMuteText(LLUICtrl* ctrl, void* user_data); + static void onChangeModerationMode(LLUICtrl* ctrl, void* user_data); + protected: + class LLSpeakerListener : public LLSimpleListener + { + public: + LLSpeakerListener(LLPanelActiveSpeakers* panel) : mPanel(panel) {} + + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + + LLPanelActiveSpeakers* mPanel; + }; + LLScrollListCtrl* mSpeakerList; LLUICtrl* mMuteVoiceCtrl; LLUICtrl* mMuteTextCtrl; @@ -206,6 +240,7 @@ protected: BOOL mShowTextChatters; LLSpeakerMgr* mSpeakerMgr; LLFrameTimer mIconAnimationTimer; + LLPointer mSpeakerListener; }; extern LLLocalSpeakerMgr* gLocalSpeakerMgr; diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index 0f46de1..0fed525 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -155,7 +155,6 @@ BOOL LLFloaterAnimPreview::postBuild() mPlayButton->setDisabledImages("",""); mPlayButton->setScaleImage(TRUE); - mPlayButton->setFixedBorder(0, 0); mStopButton = LLViewerUICtrlFactory::getButtonByName(this, "stop_btn"); if (!mStopButton) @@ -170,7 +169,6 @@ BOOL LLFloaterAnimPreview::postBuild() mStopButton->setDisabledImages("",""); mStopButton->setScaleImage(TRUE); - mStopButton->setFixedBorder(0, 0); r.set(r.mRight + PREVIEW_HPAD, y, getRect().getWidth() - PREVIEW_HPAD, y - BTN_HEIGHT); childSetCommitCallback("playback_slider", onSliderMove, this); diff --git a/linden/indra/newview/llfloateranimpreview.h b/linden/indra/newview/llfloateranimpreview.h index 8f0cee6..b1e1da7 100644 --- a/linden/indra/newview/llfloateranimpreview.h +++ b/linden/indra/newview/llfloateranimpreview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterauction.cpp b/linden/indra/newview/llfloaterauction.cpp index 345eb09..b2eae43 100644 --- a/linden/indra/newview/llfloaterauction.cpp +++ b/linden/indra/newview/llfloaterauction.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterauction.h b/linden/indra/newview/llfloaterauction.h index fbc103c..50c5aa0 100644 --- a/linden/indra/newview/llfloaterauction.h +++ b/linden/indra/newview/llfloaterauction.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloateravatarinfo.cpp b/linden/indra/newview/llfloateravatarinfo.cpp index b4c23c2..2cd6ee2 100644 --- a/linden/indra/newview/llfloateravatarinfo.cpp +++ b/linden/indra/newview/llfloateravatarinfo.cpp @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -79,7 +79,9 @@ LLMap< const LLUUID, LLFloaterAvatarInfo* > gAvatarInfoInstances; class LLAgentHandler : public LLCommandHandler { public: - LLAgentHandler() : LLCommandHandler("agent") { } + // don't allow from external browsers + LLAgentHandler() : LLCommandHandler("agent", false) { } + bool handle(const LLSD& params, const LLSD& queryMap) { if (params.size() < 2) return false; @@ -224,6 +226,34 @@ void LLFloaterAvatarInfo::showFromFriend(const LLUUID& agent_id, BOOL online) } +// static +void LLFloaterAvatarInfo::showFromProfile(const LLUUID &avatar_id, LLRect rect) +{ + if (avatar_id.isNull()) + { + return; + } + + LLFloaterAvatarInfo *floater; + if (gAvatarInfoInstances.checkData(avatar_id)) + { + // ...bring that window to front + floater = gAvatarInfoInstances.getData(avatar_id); + } + else + { + floater = new LLFloaterAvatarInfo("avatarinfo", FAI_RECT, + avatar_id); + floater->translate(rect.mLeft - floater->mRect.mLeft + 16, + rect.mTop - floater->mRect.mTop - 16); + floater->mPanelAvatarp->setAvatarID(avatar_id, "", ONLINE_STATUS_NO); + } + if (floater) + { + floater->open(); + } +} + void LLFloaterAvatarInfo::showProfileCallback(S32 option, void *userdata) { if (option == 0) diff --git a/linden/indra/newview/llfloateravatarinfo.h b/linden/indra/newview/llfloateravatarinfo.h index c8c5fe9..67cdb7a 100644 --- a/linden/indra/newview/llfloateravatarinfo.h +++ b/linden/indra/newview/llfloateravatarinfo.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -84,7 +84,9 @@ public: static void showFromDirectory(const LLUUID &avatar_id); - static void showFromFriend(const LLUUID& agent_id, BOOL online); + static void showFromFriend(const LLUUID &agent_id, BOOL online); + + static void showFromProfile(const LLUUID &avatar_id, LLRect rect); static LLFloaterAvatarInfo* getInstance(const LLUUID &id); static void showProfileCallback(S32 option, void *userdata); diff --git a/linden/indra/newview/llfloateravatarpicker.cpp b/linden/indra/newview/llfloateravatarpicker.cpp index efcbb70..e7e8626 100644 --- a/linden/indra/newview/llfloateravatarpicker.cpp +++ b/linden/indra/newview/llfloateravatarpicker.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -112,7 +112,7 @@ BOOL LLFloaterAvatarPicker::postBuild() if (mListNames) { - mListNames->addSimpleElement("No results"); + mListNames->addCommentText("No results"); } mInventoryPanel = (LLInventoryPanel*)this->getCtrlByNameAndType("Inventory Panel", WIDGET_TYPE_INVENTORY_PANEL); @@ -189,12 +189,15 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata) return; } - std::vector items = self->mListNames->getAllSelected(); - for (std::vector::iterator iter = items.begin(); - iter != items.end(); ++iter) + std::vector items = + self->mListNames->getAllSelected(); + for ( + std::vector::iterator iter = items.begin(); + iter != items.end(); + ++iter) { LLScrollListItem* item = *iter; - self->mAvatarNames.push_back(item->getColumn(0)->getText()); + self->mAvatarNames.push_back(item->getColumn(0)->getValue().asString()); self->mAvatarIDs.push_back(item->getUUID()); self->childSetEnabled("Select", TRUE); } @@ -225,8 +228,8 @@ void LLFloaterAvatarPicker::doSelectionChange(const std::deque::const_iterator item_it; for (item_it = items.begin(); item_it != items.end(); ++item_it) { @@ -276,7 +279,7 @@ void LLFloaterAvatarPicker::find() if (mListNames) { mListNames->deleteAllItems(); - mListNames->addSimpleElement("Searching..."); + mListNames->addCommentText("Searching..."); } childSetEnabled("Select", FALSE); diff --git a/linden/indra/newview/llfloateravatarpicker.h b/linden/indra/newview/llfloateravatarpicker.h index 74de116..6b8498c 100644 --- a/linden/indra/newview/llfloateravatarpicker.h +++ b/linden/indra/newview/llfloateravatarpicker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloateravatartextures.cpp b/linden/indra/newview/llfloateravatartextures.cpp index a9477cc..31e2f11 100644 --- a/linden/indra/newview/llfloateravatartextures.cpp +++ b/linden/indra/newview/llfloateravatartextures.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloateravatartextures.h b/linden/indra/newview/llfloateravatartextures.h index 2c208c1..a4c67c3 100644 --- a/linden/indra/newview/llfloateravatartextures.h +++ b/linden/indra/newview/llfloateravatartextures.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuildoptions.cpp b/linden/indra/newview/llfloaterbuildoptions.cpp index 19c486f..fac5ea3 100644 --- a/linden/indra/newview/llfloaterbuildoptions.cpp +++ b/linden/indra/newview/llfloaterbuildoptions.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuildoptions.h b/linden/indra/newview/llfloaterbuildoptions.h index 4796157..82386ee 100644 --- a/linden/indra/newview/llfloaterbuildoptions.h +++ b/linden/indra/newview/llfloaterbuildoptions.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbump.cpp b/linden/indra/newview/llfloaterbump.cpp index 298d514..4508702 100644 --- a/linden/indra/newview/llfloaterbump.cpp +++ b/linden/indra/newview/llfloaterbump.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbump.h b/linden/indra/newview/llfloaterbump.h index 3c2ed15..ac63bdf 100644 --- a/linden/indra/newview/llfloaterbump.h +++ b/linden/indra/newview/llfloaterbump.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuy.cpp b/linden/indra/newview/llfloaterbuy.cpp index 0f06c0c..47d7ab5 100644 --- a/linden/indra/newview/llfloaterbuy.cpp +++ b/linden/indra/newview/llfloaterbuy.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuy.h b/linden/indra/newview/llfloaterbuy.h index 2794942..6c5dc79 100644 --- a/linden/indra/newview/llfloaterbuy.h +++ b/linden/indra/newview/llfloaterbuy.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuycontents.cpp b/linden/indra/newview/llfloaterbuycontents.cpp index 382c4a4..1afc38f 100644 --- a/linden/indra/newview/llfloaterbuycontents.cpp +++ b/linden/indra/newview/llfloaterbuycontents.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuycontents.h b/linden/indra/newview/llfloaterbuycontents.h index db84d1e..3fecc43 100644 --- a/linden/indra/newview/llfloaterbuycontents.h +++ b/linden/indra/newview/llfloaterbuycontents.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuycurrency.cpp b/linden/indra/newview/llfloaterbuycurrency.cpp index 93f91cf..c3c7ffa 100644 --- a/linden/indra/newview/llfloaterbuycurrency.cpp +++ b/linden/indra/newview/llfloaterbuycurrency.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuycurrency.h b/linden/indra/newview/llfloaterbuycurrency.h index e544b8e..883e67f 100644 --- a/linden/indra/newview/llfloaterbuycurrency.h +++ b/linden/indra/newview/llfloaterbuycurrency.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuyland.cpp b/linden/indra/newview/llfloaterbuyland.cpp index e462c4b..7681da5 100644 --- a/linden/indra/newview/llfloaterbuyland.cpp +++ b/linden/indra/newview/llfloaterbuyland.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterbuyland.h b/linden/indra/newview/llfloaterbuyland.h index 26258be..3b4d6fe 100644 --- a/linden/indra/newview/llfloaterbuyland.h +++ b/linden/indra/newview/llfloaterbuyland.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index cb74dda..89d60ad 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -164,10 +164,16 @@ void LLFloaterChat::onVisibilityChange(BOOL new_visibility) { // Hide the chat overlay when our history is visible. gConsole->setVisible( !new_visibility ); + + // stop chat history tab from flashing when it appears + if (new_visibility) + { + LLFloaterChatterBox::getInstance()->setFloaterFlashing(this, FALSE); + } + LLFloater::onVisibilityChange(new_visibility); } - void add_timestamped_line(LLViewerTextEditor* edit, const LLString& line, const LLColor4& color) { bool prepend_newline = true; @@ -238,6 +244,12 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) { chat_floater->mPanel->setSpeaker(chat.mFromID, chat.mFromName, LLSpeaker::STATUS_NOT_IN_CHANNEL, LLSpeaker::SPEAKER_OBJECT); } + + // start tab flashing on incoming text from other users (ignoring system text, etc) + if (!chat_floater->isInVisibleChain() && chat.mSourceType == CHAT_SOURCE_AGENT) + { + LLFloaterChatterBox::getInstance()->setFloaterFlashing(chat_floater, TRUE); + } } // static @@ -246,8 +258,14 @@ void LLFloaterChat::setHistoryCursorAndScrollToEnd() LLViewerTextEditor* history_editor = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor", TRUE); LLViewerTextEditor* history_editor_with_mute = (LLViewerTextEditor*)LLFloaterChat::getInstance(LLSD())->getChildByName("Chat History Editor with mute", TRUE); - history_editor->setCursorAndScrollToEnd(); - history_editor_with_mute->setCursorAndScrollToEnd(); + if (history_editor) + { + history_editor->setCursorAndScrollToEnd(); + } + if (history_editor_with_mute) + { + history_editor_with_mute->setCursorAndScrollToEnd(); + } } @@ -269,7 +287,7 @@ void LLFloaterChat::onClickMute(void *data) if (gFloaterMute) { - gFloaterMute->show(); + LLFloaterMute::showInstance(); } } @@ -433,7 +451,7 @@ void* LLFloaterChat::createSpeakersPanel(void* data) //static void* LLFloaterChat::createChatPanel(void* data) { - LLChatBar* chatp = new LLChatBar("floating_chat_bar"); + LLChatBar* chatp = new LLChatBar(); return chatp; } @@ -441,7 +459,7 @@ void* LLFloaterChat::createChatPanel(void* data) void LLFloaterChat::hideInstance(const LLSD& id) { LLFloaterChat* floaterp = LLFloaterChat::getInstance(LLSD()); - // don't do anything when hosted in the chatterbox + if(floaterp->getHost()) { LLFloaterChatterBox::hideInstance(LLSD()); diff --git a/linden/indra/newview/llfloaterchat.h b/linden/indra/newview/llfloaterchat.h index b9d7cf6..341e925 100644 --- a/linden/indra/newview/llfloaterchat.h +++ b/linden/indra/newview/llfloaterchat.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -82,6 +82,7 @@ public: protected: LLPanelActiveSpeakers* mPanel; + BOOL mScrolledToEnd; }; #endif diff --git a/linden/indra/newview/llfloaterchatterbox.cpp b/linden/indra/newview/llfloaterchatterbox.cpp index 41acc02..2d6eeb3 100644 --- a/linden/indra/newview/llfloaterchatterbox.cpp +++ b/linden/indra/newview/llfloaterchatterbox.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -86,9 +86,15 @@ LLFloaterMyFriends* LLFloaterMyFriends::showInstance(const LLSD& id) //static void LLFloaterMyFriends::hideInstance(const LLSD& id) { - if(instanceVisible(id)) + LLFloaterMyFriends* floaterp = LLFloaterMyFriends::getInstance(); + + if(floaterp->getHost()) { - LLFloaterChatterBox::hideInstance(LLSD()); + LLFloaterChatterBox::hideInstance(); + } + else + { + LLUISingleton::hideInstance(id); } } @@ -124,10 +130,23 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) : mAutoResize = FALSE; gUICtrlFactory->buildFloater(this, "floater_chatterbox.xml", NULL, FALSE); - addFloater(LLFloaterMyFriends::getInstance(0), TRUE); + if (gSavedSettings.getBOOL("ContactsTornOff")) + { + LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance(0); + // add then remove to set up relationship for re-attach + addFloater(floater_contacts, FALSE); + removeFloater(floater_contacts); + // reparent to floater view + gFloaterView->addChild(floater_contacts); + } + else + { + addFloater(LLFloaterMyFriends::getInstance(0), TRUE); + } + if (gSavedSettings.getBOOL("ChatHistoryTornOff")) { - LLFloaterChat* floater_chat = LLFloaterChat::getInstance(LLSD()); + LLFloaterChat* floater_chat = LLFloaterChat::getInstance(); // add then remove to set up relationship for re-attach addFloater(floater_chat, FALSE); removeFloater(floater_chat); @@ -217,7 +236,7 @@ void LLFloaterChatterBox::draw() mActiveVoiceFloater = current_active_floater; - LLFloater::draw(); + LLMultiFloater::draw(); } void LLFloaterChatterBox::onOpen() @@ -236,10 +255,17 @@ void LLFloaterChatterBox::removeFloater(LLFloater* floaterp) if (floaterp->getName() == "chat floater") { // only my friends floater now locked - mTabContainer->lockTabs(1); + mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1); gSavedSettings.setBOOL("ChatHistoryTornOff", TRUE); floaterp->setCanClose(TRUE); } + else if (floaterp->getName() == "floater_my_friends") + { + // only chat floater now locked + mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1); + gSavedSettings.setBOOL("ContactsTornOff", TRUE); + floaterp->setCanClose(TRUE); + } LLMultiFloater::removeFloater(floaterp); } @@ -247,19 +273,43 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainerCommon::eInsertionPoint insertion_point) { + S32 num_locked_tabs = mTabContainer->getNumLockedTabs(); + + // already here + if (floaterp->getHost() == this) return; + // make sure my friends and chat history both locked when re-attaching chat history if (floaterp->getName() == "chat floater") { - // select my friends tab - mTabContainer->selectFirstTab(); - // add chat history to the right of the my friends tab - //*TODO: respect select_added_floater so that we don't leave first tab selected - LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT); + mTabContainer->unlockTabs(); + // add chat history as second tab if contact window is present, first tab otherwise + if (getChildByName("floater_my_friends", TRUE)) + { + // assuming contacts window is first tab, select it + mTabContainer->selectFirstTab(); + // and add ourselves after + LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT); + } + else + { + LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START); + } + // make sure first two tabs are now locked - mTabContainer->lockTabs(2); + mTabContainer->lockTabs(num_locked_tabs + 1); gSavedSettings.setBOOL("ChatHistoryTornOff", FALSE); floaterp->setCanClose(FALSE); } + else if (floaterp->getName() == "floater_my_friends") + { + mTabContainer->unlockTabs(); + // add contacts window as first tab + LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START); + // make sure first two tabs are now locked + mTabContainer->lockTabs(num_locked_tabs + 1); + gSavedSettings.setBOOL("ContactsTornOff", FALSE); + floaterp->setCanClose(FALSE); + } else { LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); @@ -276,24 +326,27 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp, //static LLFloaterChatterBox* LLFloaterChatterBox::showInstance(const LLSD& seed) { - LLFloaterChatterBox* floater = LLUISingleton::showInstance(seed); + LLFloaterChatterBox* chatterbox_floater = LLUISingleton::showInstance(seed); // if TRUE, show tab for active voice channel, otherwise, just show last tab - if (seed.asBoolean()) + LLFloater* floater_to_show = NULL; + LLUUID session_id = seed.asUUID(); + if (session_id.notNull()) { - LLFloater* floater_to_show = getCurrentVoiceFloater(); - if (floater_to_show) - { - floater_to_show->open(); - } - else - { - // just open chatterbox if there is no active voice window - LLUISingleton::getInstance(seed)->open(); - } + floater_to_show = gIMMgr->findFloaterBySession(session_id); + } + + if (floater_to_show) + { + floater_to_show->open(); + } + else + { + // just open chatterbox to the last selected tab + chatterbox_floater->open(); } - return floater; + return chatterbox_floater; } //static diff --git a/linden/indra/newview/llfloaterchatterbox.h b/linden/indra/newview/llfloaterchatterbox.h index 1d17113..185cea3 100644 --- a/linden/indra/newview/llfloaterchatterbox.h +++ b/linden/indra/newview/llfloaterchatterbox.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,7 +50,7 @@ public: void onClose(bool app_quitting); // override LLUISingleton behavior - static LLFloaterMyFriends* showInstance(const LLSD& id); + static LLFloaterMyFriends* showInstance(const LLSD& id = LLSD()); static void hideInstance(const LLSD& id); static BOOL instanceVisible(const LLSD& id); @@ -77,7 +77,7 @@ public: BOOL select_added_floater, LLTabContainerCommon::eInsertionPoint insertion_point = LLTabContainerCommon::END); - static LLFloaterChatterBox* showInstance(const LLSD& seed); + static LLFloaterChatterBox* showInstance(const LLSD& seed = LLSD()); static BOOL instanceVisible(const LLSD& seed); static LLFloater* getCurrentVoiceFloater(); diff --git a/linden/indra/newview/llfloaterclassified.cpp b/linden/indra/newview/llfloaterclassified.cpp index 8a71b6c..811cd3a 100644 --- a/linden/indra/newview/llfloaterclassified.cpp +++ b/linden/indra/newview/llfloaterclassified.cpp @@ -1,26 +1,34 @@ /** -* @file llfloaterclassified.cpp -* @brief LLFloaterClassifiedInfo class implementation -* -* Classified information as shown in a floating window from secondlife:// command -* handler. -* -* $LicenseInfo:firstyear=2002&license=internal$ -* -* Copyright (c) 2002-2008, Linden Research, Inc. -* -* The following source code is PROPRIETARY AND CONFIDENTIAL. Use of -* this source code is governed by the Linden Lab Source Code Disclosure -* Agreement ("Agreement") previously entered between you and Linden -* Lab. By accessing, using, copying, modifying or distributing this -* software, you acknowledge that you have been informed of your -* obligations under the Agreement 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. -* $/LicenseInfo$ -*/ + * @file llfloaterclassified.cpp + * @brief Classified information as shown in a floating window from + * secondlife:// command handler. + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2008, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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. + * $/LicenseInfo$ + */ #include "llviewerprecompiledheaders.h" @@ -45,7 +53,8 @@ LLMap< const LLUUID, LLFloaterClassifiedInfo* > gClassifiedInfoInstances; class LLClassifiedHandler : public LLCommandHandler { public: - LLClassifiedHandler() : LLCommandHandler("classified") { } + // don't allow from external browsers + LLClassifiedHandler() : LLCommandHandler("classified", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { if (tokens.size() < 2) diff --git a/linden/indra/newview/llfloaterclassified.h b/linden/indra/newview/llfloaterclassified.h index 79852a4..ccd29ac 100644 --- a/linden/indra/newview/llfloaterclassified.h +++ b/linden/indra/newview/llfloaterclassified.h @@ -1,17 +1,29 @@ /** * @file llfloaterclassified.h - * @brief LLFloaterClassifiedInfo class declaration + * @brief Classified information as shown in a floating window from + * secondlife:// command handler. + * Just a wrapper for LLPanelClassified. * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2002&license=viewergpl$ * * Copyright (c) 2002-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, @@ -19,12 +31,6 @@ * $/LicenseInfo$ */ -/** -* Classified information as shown in a floating window from a secondlife:// url. -* Just a wrapper for LLPanelClassified. -*/ - - #ifndef LL_FLOATERCLASSIFIED_H #define LL_FLOATERCLASSIFIED_H diff --git a/linden/indra/newview/llfloaterclothing.cpp b/linden/indra/newview/llfloaterclothing.cpp index b450605..30b5b34 100644 --- a/linden/indra/newview/llfloaterclothing.cpp +++ b/linden/indra/newview/llfloaterclothing.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -87,10 +87,10 @@ LLFloaterClothing::LLFloaterClothing() childSetDoubleClickCallback("clothing_list", onClickWear); childSetCommitCallback("clothing_list", onCommitList, this); - LLCtrlListInterface* list = childGetListInterface("clothing_list"); + LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "clothing_list"); if (list) { - list->addSimpleElement(LOADING_STRING); + list->addCommentText(LOADING_STRING); } setDefaultBtn("wear_btn"); @@ -244,7 +244,7 @@ void LLFloaterClothing::buildClothingList() { //llinfos << "buildClothingList" << llendl; - LLCtrlListInterface *list = childGetListInterface("clothing_list"); + LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "clothing_list"); if (!list) return; list->operateOnAll(LLCtrlListInterface::OP_DELETE); @@ -310,13 +310,13 @@ void LLFloaterClothing::buildClothingList() else if (LLInventoryModel::backgroundFetchActive()) { // We're loading - list->addSimpleElement(LOADING_STRING); + list->addCommentText(LOADING_STRING); mAllowSelection = FALSE; } else { // Weird case, we're done loading but have no clothing - list->addSimpleElement("No clothing found."); + list->addCommentText("No clothing found."); mAllowSelection = FALSE; } } diff --git a/linden/indra/newview/llfloaterclothing.h b/linden/indra/newview/llfloaterclothing.h index 4ba310b..b4b8abe 100644 --- a/linden/indra/newview/llfloaterclothing.h +++ b/linden/indra/newview/llfloaterclothing.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatercolorpicker.cpp b/linden/indra/newview/llfloatercolorpicker.cpp index 2be04d0..3787590 100644 --- a/linden/indra/newview/llfloatercolorpicker.cpp +++ b/linden/indra/newview/llfloatercolorpicker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatercolorpicker.h b/linden/indra/newview/llfloatercolorpicker.h index 4736d31..415f749 100644 --- a/linden/indra/newview/llfloatercolorpicker.h +++ b/linden/indra/newview/llfloatercolorpicker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp index 93f3e3a..8da5417 100644 --- a/linden/indra/newview/llfloatercustomize.cpp +++ b/linden/indra/newview/llfloatercustomize.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatercustomize.h b/linden/indra/newview/llfloatercustomize.h index 4b2d07e..bfb4556 100644 --- a/linden/indra/newview/llfloatercustomize.h +++ b/linden/indra/newview/llfloatercustomize.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterdirectory.cpp b/linden/indra/newview/llfloaterdirectory.cpp index 931b4cd..ce5a7e6 100644 --- a/linden/indra/newview/llfloaterdirectory.cpp +++ b/linden/indra/newview/llfloaterdirectory.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -134,6 +134,12 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name) LLFloaterDirectory::~LLFloaterDirectory() { sInstance = NULL; + + //Note: this function is defined in the class LLFloater. + //however, it causes crash if this line is postponed to ~LLFloater(). + //because it uses some pointers deleted below. That is, those pointers are used again after deleting. + setMinimized( FALSE ); + delete mPanelAvatarp; mPanelAvatarp = NULL; delete mPanelEventp; mPanelEventp = NULL; delete mPanelGroupp; mPanelGroupp = NULL; diff --git a/linden/indra/newview/llfloaterdirectory.h b/linden/indra/newview/llfloaterdirectory.h index b5acd0c..7aa956a 100644 --- a/linden/indra/newview/llfloaterdirectory.h +++ b/linden/indra/newview/llfloaterdirectory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatereditui.cpp b/linden/indra/newview/llfloatereditui.cpp index 2751986..8daaf6a 100644 --- a/linden/indra/newview/llfloatereditui.cpp +++ b/linden/indra/newview/llfloatereditui.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatereditui.h b/linden/indra/newview/llfloatereditui.h index 8751753..2795e54 100644 --- a/linden/indra/newview/llfloatereditui.h +++ b/linden/indra/newview/llfloatereditui.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterevent.cpp b/linden/indra/newview/llfloaterevent.cpp index a79df33..71767c6 100644 --- a/linden/indra/newview/llfloaterevent.cpp +++ b/linden/indra/newview/llfloaterevent.cpp @@ -1,20 +1,28 @@ /** * @file llfloaterevent.cpp - * @brief LLFloaterEventInfo class implementation + * @brief Event information as shown in a floating window from + * secondlife:// command handler. * - * Event information as shown in a floating window from secondlife:// command - * handler. - * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007-2008, 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://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * Copyright (c) 2002-2008, Linden Research, Inc. + * 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://secondlifegrid.net/programs/open_source/licensing/flossexception * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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, @@ -46,7 +54,8 @@ LLMap< U32, LLFloaterEventInfo* > gEventInfoInstances; class LLEventHandler : public LLCommandHandler { public: - LLEventHandler() : LLCommandHandler("event") { } + // don't allow from external browsers + LLEventHandler() : LLCommandHandler("event", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { if (tokens.size() < 2) diff --git a/linden/indra/newview/llfloaterevent.h b/linden/indra/newview/llfloaterevent.h index ee249a8..1fc2fc6 100644 --- a/linden/indra/newview/llfloaterevent.h +++ b/linden/indra/newview/llfloaterevent.h @@ -1,17 +1,29 @@ /** * @file llfloaterevent.h - * @brief LLFloaterEvent class implementation + * @brief Event information as shown in a floating window from + * secondlife:// command handler. + * Just a wrapper for LLPanelEvent. * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2002-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, @@ -19,11 +31,6 @@ * $/LicenseInfo$ */ -/** -* Event information as shown in a floating window from a secondlife:// url. -* Just a wrapper for LLPanelEvent. -*/ - #ifndef LL_LLFLOATEREVENT_H #define LL_LLFLOATEREVENT_H diff --git a/linden/indra/newview/llfloaterfriends.cpp b/linden/indra/newview/llfloaterfriends.cpp index 99a33d6..e6ff76b 100644 --- a/linden/indra/newview/llfloaterfriends.cpp +++ b/linden/indra/newview/llfloaterfriends.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -104,7 +104,6 @@ LLPanelFriends::LLPanelFriends() : LLPanel(), LLEventTimer(1000000), mObserver(NULL), - mMenuState(0), mShowMaxSelectWarning(TRUE), mAllowRightsChange(TRUE), mNumRightsChanged(0) @@ -182,16 +181,13 @@ BOOL LLPanelFriends::postBuild() { mFriendsList = LLUICtrlFactory::getScrollListByName(this, "friend_list"); mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT); - mFriendsList->setMaxiumumSelectCallback(onMaximumSelect); + mFriendsList->setMaximumSelectCallback(onMaximumSelect); mFriendsList->setCommitOnSelectionChange(TRUE); childSetCommitCallback("friend_list", onSelectName, this); childSetDoubleClickCallback("friend_list", onClickIM); refreshNames(); - childSetCommitCallback("online_status_cb", onClickOnlineStatus, this); - childSetCommitCallback("map_status_cb", onClickMapStatus, this); - childSetCommitCallback("modify_status_cb", onClickModifyStatus, this); childSetAction("im_btn", onClickIM, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); @@ -204,6 +200,10 @@ BOOL LLPanelFriends::postBuild() updateFriends(LLFriendObserver::ADD); refreshUI(); + // primary sort = online status, secondary sort = name + mFriendsList->sortByColumn("friend_name", TRUE); + mFriendsList->sortByColumn("icon_online_status", TRUE); + return TRUE; } @@ -222,64 +222,63 @@ void LLPanelFriends::addFriend(const std::string& name, const LLUUID& agent_id) element["columns"][LIST_FRIEND_NAME]["font"] = "SANSSERIF"; element["columns"][LIST_FRIEND_NAME]["font-style"] = "NORMAL"; element["columns"][LIST_ONLINE_STATUS]["column"] = "icon_online_status"; - element["columns"][LIST_ONLINE_STATUS]["type"] = "text"; + element["columns"][LIST_ONLINE_STATUS]["type"] = "icon"; if (online) { element["columns"][LIST_FRIEND_NAME]["font-style"] = "BOLD"; - element["columns"][LIST_ONLINE_STATUS]["type"] = "icon"; element["columns"][LIST_ONLINE_STATUS]["value"] = gViewerArt.getString("icon_avatar_online.tga"); } - element["columns"][LIST_VISIBLE_ONLINE]["column"] = "icon_visible_online"; - element["columns"][LIST_VISIBLE_ONLINE]["type"] = "text"; - if(relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)) - { - element["columns"][LIST_VISIBLE_ONLINE]["type"] = "icon"; - element["columns"][LIST_VISIBLE_ONLINE]["value"] = gViewerArt.getString("ff_visible_online.tga"); - } + element["columns"][LIST_VISIBLE_ONLINE]["type"] = "checkbox"; + element["columns"][LIST_VISIBLE_ONLINE]["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS); + element["columns"][LIST_VISIBLE_MAP]["column"] = "icon_visible_map"; - element["columns"][LIST_VISIBLE_MAP]["type"] = "text"; - if(relationInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION)) - { - element["columns"][LIST_VISIBLE_MAP]["type"] = "icon"; - element["columns"][LIST_VISIBLE_MAP]["value"] = gViewerArt.getString("ff_visible_map.tga"); - } + element["columns"][LIST_VISIBLE_MAP]["type"] = "checkbox"; + element["columns"][LIST_VISIBLE_MAP]["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION); + element["columns"][LIST_EDIT_MINE]["column"] = "icon_edit_mine"; - element["columns"][LIST_EDIT_MINE]["type"] = "text"; - if(relationInfo->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS)) - { - element["columns"][LIST_EDIT_MINE]["type"] = "icon"; - element["columns"][LIST_EDIT_MINE]["value"] = gViewerArt.getString("ff_edit_mine.tga"); - } + element["columns"][LIST_EDIT_MINE]["type"] = "checkbox"; + element["columns"][LIST_EDIT_MINE]["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS); + element["columns"][LIST_EDIT_THEIRS]["column"] = "icon_edit_theirs"; - element["columns"][LIST_EDIT_THEIRS]["type"] = "text"; - if(relationInfo->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS)) - { - element["columns"][LIST_EDIT_THEIRS]["type"] = "icon"; - element["columns"][LIST_EDIT_THEIRS]["value"] = gViewerArt.getString("ff_edit_theirs.tga"); - } + element["columns"][LIST_EDIT_THEIRS]["type"] = "checkbox"; + element["columns"][LIST_EDIT_THEIRS]["enabled"] = ""; + element["columns"][LIST_EDIT_THEIRS]["value"] = relationInfo->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS); + + element["columns"][LIST_FRIEND_UPDATE_GEN]["column"] = "friend_last_update_generation"; + element["columns"][LIST_FRIEND_UPDATE_GEN]["value"] = relationInfo->getChangeSerialNum(); + mFriendsList->addElement(element, ADD_BOTTOM); } +// propagate actual relationship to UI +void LLPanelFriends::updateFriendItem(LLScrollListItem* itemp, const LLRelationship* info) +{ + if (!itemp) return; + if (!info) return; + + itemp->getColumn(LIST_ONLINE_STATUS)->setValue(info->isOnline() ? gViewerArt.getString("icon_avatar_online.tga") : LLString()); + // render name of online friends in bold text + ((LLScrollListText*)itemp->getColumn(LIST_FRIEND_NAME))->setFontStyle(info->isOnline() ? LLFontGL::BOLD : LLFontGL::NORMAL); + itemp->getColumn(LIST_VISIBLE_ONLINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS)); + itemp->getColumn(LIST_VISIBLE_MAP)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION)); + itemp->getColumn(LIST_EDIT_MINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS)); + itemp->getColumn(LIST_FRIEND_UPDATE_GEN)->setValue(info->getChangeSerialNum()); + + // enable this item, in case it was disabled after user input + itemp->setEnabled(TRUE); + + // changed item in place, need to request sort + mFriendsList->sortItems(); +} + void LLPanelFriends::refreshRightsChangeList() { LLDynamicArray friends = getSelectedIDs(); S32 num_selected = friends.size(); - LLSD row; bool can_offer_teleport = num_selected >= 1; - - // aggregate permissions over all selected friends - bool friends_see_online = true; - bool friends_see_on_map = true; - bool friends_modify_objects = true; - - // do at least some of the friends selected have these rights? - bool some_friends_see_online = false; - bool some_friends_see_on_map = false; - bool some_friends_modify_objects = false; - bool selected_friends_online = true; LLTextBox* processing_label = LLUICtrlFactory::getTextBoxByName(this, "process_rights_label"); @@ -294,12 +293,9 @@ void LLPanelFriends::refreshRightsChangeList() num_selected = 0; } } - else + else if(processing_label) { - if(processing_label) - { - processing_label->setVisible(false); - } + processing_label->setVisible(false); } const LLRelationship* friend_status = NULL; @@ -308,20 +304,6 @@ void LLPanelFriends::refreshRightsChangeList() friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr); if (friend_status) { - bool can_see_online = friend_status->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS); - bool can_see_on_map = friend_status->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION); - bool can_modify_objects = friend_status->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS); - - // aggregate rights of this friend into total selection - friends_see_online &= can_see_online; - friends_see_on_map &= can_see_on_map; - friends_modify_objects &= can_modify_objects; - - // can at least one of your selected friends do any of these? - some_friends_see_online |= can_see_online; - some_friends_see_on_map |= can_see_on_map; - some_friends_modify_objects |= can_modify_objects; - if(!friend_status->isOnline()) { can_offer_teleport = false; @@ -331,44 +313,13 @@ void LLPanelFriends::refreshRightsChangeList() else // missing buddy info, don't allow any operations { can_offer_teleport = false; - - friends_see_online = false; - friends_see_on_map = false; - friends_modify_objects = false; - - some_friends_see_online = false; - some_friends_see_on_map = false; - some_friends_modify_objects = false; } } - - // seeing a friend on the map requires seeing online status as a prerequisite - friends_see_on_map &= friends_see_online; - - mMenuState = 0; - - // make checkboxes visible after we have finished processing rights - childSetVisible("online_status_cb", mAllowRightsChange); - childSetVisible("map_status_cb", mAllowRightsChange); - childSetVisible("modify_status_cb", mAllowRightsChange); - if (num_selected == 0) // nothing selected { childSetEnabled("im_btn", FALSE); childSetEnabled("offer_teleport_btn", FALSE); - - childSetEnabled("online_status_cb", FALSE); - childSetValue("online_status_cb", FALSE); - childSetTentative("online_status_cb", FALSE); - - childSetEnabled("map_status_cb", FALSE); - childSetValue("map_status_cb", FALSE); - childSetTentative("map_status_cb", FALSE); - - childSetEnabled("modify_status_cb", FALSE); - childSetValue("modify_status_cb", FALSE); - childSetTentative("modify_status_cb", FALSE); } else // we have at least one friend selected... { @@ -376,61 +327,76 @@ void LLPanelFriends::refreshRightsChangeList() // to be consistent with context menus in inventory and because otherwise // offline friends would be silently dropped from the session childSetEnabled("im_btn", selected_friends_online || num_selected == 1); - childSetEnabled("offer_teleport_btn", can_offer_teleport); - - childSetEnabled("online_status_cb", TRUE); - childSetValue("online_status_cb", some_friends_see_online); - childSetTentative("online_status_cb", some_friends_see_online != friends_see_online); - if (friends_see_online) - { - mMenuState |= LLRelationship::GRANT_ONLINE_STATUS; - } - - childSetEnabled("map_status_cb", TRUE); - childSetValue("map_status_cb", some_friends_see_on_map); - childSetTentative("map_status_cb", some_friends_see_on_map != friends_see_on_map); - if(friends_see_on_map) - { - mMenuState |= LLRelationship::GRANT_MAP_LOCATION; - } - - // for now, don't allow modify rights change for multiple select - childSetEnabled("modify_status_cb", num_selected == 1); - childSetValue("modify_status_cb", some_friends_modify_objects); - childSetTentative("modify_status_cb", some_friends_modify_objects != friends_modify_objects); - if(friends_modify_objects) - { - mMenuState |= LLRelationship::GRANT_MODIFY_OBJECTS; - } } } +struct SortFriendsByID +{ + bool SortFriendsByID::operator() (const LLScrollListItem* const a, const LLScrollListItem* const b) const + { + return a->getValue().asUUID() < b->getValue().asUUID(); + } +}; + void LLPanelFriends::refreshNames() { LLDynamicArray selected_ids = getSelectedIDs(); S32 pos = mFriendsList->getScrollPos(); - mFriendsList->operateOnAll(LLCtrlListInterface::OP_DELETE); - LLCollectAllBuddies collect; - LLAvatarTracker::instance().applyFunctor(collect); - LLCollectAllBuddies::buddy_map_t::const_iterator it = collect.mOnline.begin(); - LLCollectAllBuddies::buddy_map_t::const_iterator end = collect.mOnline.end(); + // get all buddies we know about + LLAvatarTracker::buddy_map_t all_buddies; + LLAvatarTracker::instance().copyBuddyList(all_buddies); - for ( ; it != end; ++it) - { - const std::string& name = it->first; - const LLUUID& agent_id = it->second; - addFriend(name, agent_id); - } - it = collect.mOffline.begin(); - end = collect.mOffline.end(); - for ( ; it != end; ++it) + // get all friends in list and sort by UUID + std::vector items = mFriendsList->getAllData(); + std::sort(items.begin(), items.end(), SortFriendsByID()); + + std::vector::iterator item_it = items.begin(); + std::vector::iterator item_end = items.end(); + + LLAvatarTracker::buddy_map_t::iterator buddy_it; + for (buddy_it = all_buddies.begin() ; buddy_it != all_buddies.end(); ++buddy_it) { - const std::string& name = it->first; - const LLUUID& agent_id = it->second; - addFriend(name, agent_id); + // erase any items that reflect residents who are no longer buddies + while(item_it != item_end && buddy_it->first > (*item_it)->getValue().asUUID()) + { + mFriendsList->deleteItems((*item_it)->getValue()); + ++item_it; + } + + // update existing friends with new info + if (item_it != item_end && buddy_it->first == (*item_it)->getValue().asUUID()) + { + const LLRelationship* info = buddy_it->second; + if (!info) + { + ++item_it; + continue; + } + + S32 last_change_generation = (*item_it)->getColumn(LIST_FRIEND_UPDATE_GEN)->getValue().asInteger(); + if (last_change_generation < info->getChangeSerialNum()) + { + // update existing item in UI + updateFriendItem(mFriendsList->getItem(buddy_it->first), info); + } + ++item_it; + } + // add new friend to list + else + { + const LLUUID& buddy_id = buddy_it->first; + char first_name[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ + char last_name[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ + + gCacheName->getName(buddy_id, first_name, last_name); + std::ostringstream fullname; + fullname << first_name << " " << last_name; + addFriend(fullname.str(), buddy_id); + } } + mFriendsList->selectMultiple(selected_ids); mFriendsList->setScrollPos(pos); } @@ -451,7 +417,7 @@ void LLPanelFriends::refreshUI() } else { - childSetText("friend_name_label", mFriendsList->getFirstSelected()->getColumn(LIST_FRIEND_NAME)->getText() + "..."); + childSetText("friend_name_label", mFriendsList->getFirstSelected()->getColumn(LIST_FRIEND_NAME)->getValue().asString() + "..."); } } else @@ -493,6 +459,8 @@ void LLPanelFriends::onSelectName(LLUICtrl* ctrl, void* user_data) if(panelp) { panelp->refreshUI(); + // check to see if rights have changed + panelp->applyRightsToFriends(); } } @@ -687,35 +655,22 @@ void LLPanelFriends::onClickPay(void* user_data) } } -void LLPanelFriends::onClickOnlineStatus(LLUICtrl* ctrl, void* user_data) -{ - LLPanelFriends* panelp = (LLPanelFriends*)user_data; - - bool checked = ctrl->getValue(); - panelp->updateMenuState(LLRelationship::GRANT_ONLINE_STATUS, checked); - panelp->applyRightsToFriends(LLRelationship::GRANT_ONLINE_STATUS, checked); -} - -void LLPanelFriends::onClickMapStatus(LLUICtrl* ctrl, void* user_data) -{ - LLPanelFriends* panelp = (LLPanelFriends*)user_data; - bool checked = ctrl->getValue(); - panelp->updateMenuState(LLRelationship::GRANT_MAP_LOCATION, checked); - panelp->applyRightsToFriends(LLRelationship::GRANT_MAP_LOCATION, checked); -} - -void LLPanelFriends::onClickModifyStatus(LLUICtrl* ctrl, void* user_data) +void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command) { - LLPanelFriends* panelp = (LLPanelFriends*)user_data; - - bool checked = ctrl->getValue(); - LLDynamicArray ids = panelp->getSelectedIDs(); + if (ids.empty()) return; + LLStringBase::format_map_t args; if(ids.size() > 0) { + // copy map of ids onto heap + rights_map_t* rights = new rights_map_t(ids); + // package with panel pointer + std::pair* user_data = new std::pair(this, rights); + + // for single friend, show their name if(ids.size() == 1) { - LLUUID agent_id = ids[0]; + LLUUID agent_id = ids.begin()->first; char first[DB_FIRST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ char last[DB_LAST_NAME_BUF_SIZE]; /*Flawfinder: ignore*/ if(gCacheName->getName(agent_id, first, last)) @@ -723,56 +678,174 @@ void LLPanelFriends::onClickModifyStatus(LLUICtrl* ctrl, void* user_data) args["[FIRST_NAME]"] = first; args["[LAST_NAME]"] = last; } - if(checked) gViewerWindow->alertXml("GrantModifyRights", args, handleModifyRights, user_data); - else gViewerWindow->alertXml("RevokeModifyRights", args, handleModifyRights, user_data); + if (command == GRANT) + { + gViewerWindow->alertXml("GrantModifyRights", args, modifyRightsConfirmation, user_data); + } + else + { + gViewerWindow->alertXml("RevokeModifyRights", args, modifyRightsConfirmation, user_data); + } + } + else + { + if (command == GRANT) + { + gViewerWindow->alertXml("GrantModifyRightsMultiple", args, modifyRightsConfirmation, user_data); + } + else + { + gViewerWindow->alertXml("RevokeModifyRightsMultiple", args, modifyRightsConfirmation, user_data); + } } - else return; } } -void LLPanelFriends::handleModifyRights(S32 option, void* user_data) +// static +void LLPanelFriends::modifyRightsConfirmation(S32 option, void* user_data) { - LLPanelFriends* panelp = (LLPanelFriends*)user_data; + std::pair* data = (std::pair*)user_data; + LLPanelFriends* panelp = data->first; if(panelp) { - if(!option) + if(0 == option) { - panelp->updateMenuState(LLRelationship::GRANT_MODIFY_OBJECTS, !((panelp->getMenuState() & LLRelationship::GRANT_MODIFY_OBJECTS) != 0)); - panelp->applyRightsToFriends(LLRelationship::GRANT_MODIFY_OBJECTS, ((panelp->getMenuState() & LLRelationship::GRANT_MODIFY_OBJECTS) != 0)); + panelp->sendRightsGrant(*(data->second)); + } + else + { + // need to resync view with model, since user cancelled operation + rights_map_t* rights = data->second; + rights_map_t::iterator rights_it; + for (rights_it = rights->begin(); rights_it != rights->end(); ++rights_it) + { + LLScrollListItem* itemp = panelp->mFriendsList->getItem(rights_it->first); + const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(rights_it->first); + panelp->updateFriendItem(itemp, info); + } } panelp->refreshUI(); } + + delete data->second; + delete data; } -void LLPanelFriends::updateMenuState(S32 flag, BOOL value) +void LLPanelFriends::applyRightsToFriends() { - if(value) mMenuState |= flag; - else mMenuState &= ~flag; + BOOL rights_changed = FALSE; + + // store modify rights separately for confirmation + rights_map_t rights_updates; + + BOOL need_confirmation = FALSE; + EGrantRevoke confirmation_type = GRANT; + + // this assumes that changes only happened to selected items + std::vector selected = mFriendsList->getAllSelected(); + for(std::vector::iterator itr = selected.begin(); itr != selected.end(); ++itr) + { + LLUUID id = (*itr)->getValue(); + const LLRelationship* buddy_relationship = LLAvatarTracker::instance().getBuddyInfo(id); + if (buddy_relationship == NULL) continue; + + bool show_online_staus = (*itr)->getColumn(LIST_VISIBLE_ONLINE)->getValue().asBoolean(); + bool show_map_location = (*itr)->getColumn(LIST_VISIBLE_MAP)->getValue().asBoolean(); + bool allow_modify_objects = (*itr)->getColumn(LIST_EDIT_MINE)->getValue().asBoolean(); + + S32 rights = buddy_relationship->getRightsGrantedTo(); + if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS) != show_online_staus) + { + rights_changed = TRUE; + if(show_online_staus) + { + rights |= LLRelationship::GRANT_ONLINE_STATUS; + } + else + { + // ONLINE_STATUS necessary for MAP_LOCATION + rights &= ~LLRelationship::GRANT_ONLINE_STATUS; + rights &= ~LLRelationship::GRANT_MAP_LOCATION; + // propagate rights constraint to UI + (*itr)->getColumn(LIST_VISIBLE_MAP)->setValue(FALSE); + } + } + if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION) != show_map_location) + { + rights_changed = TRUE; + if(show_map_location) + { + // ONLINE_STATUS necessary for MAP_LOCATION + rights |= LLRelationship::GRANT_MAP_LOCATION; + rights |= LLRelationship::GRANT_ONLINE_STATUS; + (*itr)->getColumn(LIST_VISIBLE_ONLINE)->setValue(TRUE); + } + else + { + rights &= ~LLRelationship::GRANT_MAP_LOCATION; + } + } + + // now check for change in modify object rights, which requires confirmation + if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects) + { + rights_changed = TRUE; + need_confirmation = TRUE; + + if(allow_modify_objects) + { + rights |= LLRelationship::GRANT_MODIFY_OBJECTS; + confirmation_type = GRANT; + } + else + { + rights &= ~LLRelationship::GRANT_MODIFY_OBJECTS; + confirmation_type = REVOKE; + } + } + + if (rights_changed) + { + rights_updates.insert(std::make_pair(id, rights)); + // disable these ui elements until response from server + // to avoid race conditions + (*itr)->setEnabled(FALSE); + } + } + + // separately confirm grant and revoke of modify rights + if (need_confirmation) + { + confirmModifyRights(rights_updates, confirmation_type); + } + else + { + sendRightsGrant(rights_updates); + } } -void LLPanelFriends::applyRightsToFriends(S32 flag, BOOL value) +void LLPanelFriends::sendRightsGrant(rights_map_t& ids) { + if (ids.empty()) return; + LLMessageSystem* msg = gMessageSystem; + + // setup message header msg->newMessageFast(_PREHASH_GrantUserRights); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUID(_PREHASH_AgentID, gAgent.getID()); msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID()); - LLDynamicArray ids = getSelectedIDs(); - S32 rights; - for(LLDynamicArray::iterator itr = ids.begin(); itr != ids.end(); ++itr) + rights_map_t::iterator id_it; + rights_map_t::iterator end_it = ids.end(); + for(id_it = ids.begin(); id_it != end_it; ++id_it) { - rights = LLAvatarTracker::instance().getBuddyInfo(*itr)->getRightsGrantedTo(); - if(LLAvatarTracker::instance().getBuddyInfo(*itr)->isRightGrantedTo(flag) != (bool)value) - { - if(value) rights |= flag; - else rights &= ~flag; - msg->nextBlockFast(_PREHASH_Rights); - msg->addUUID(_PREHASH_AgentRelated, *itr); - msg->addS32(_PREHASH_RelatedRights, rights); - } + msg->nextBlockFast(_PREHASH_Rights); + msg->addUUID(_PREHASH_AgentRelated, id_it->first); + msg->addS32(_PREHASH_RelatedRights, id_it->second); } + mNumRightsChanged = ids.size(); gAgent.sendReliableMessage(); } diff --git a/linden/indra/newview/llfloaterfriends.h b/linden/indra/newview/llfloaterfriends.h index b26e6e7..6e0ce78 100644 --- a/linden/indra/newview/llfloaterfriends.h +++ b/linden/indra/newview/llfloaterfriends.h @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -40,6 +40,7 @@ #include "lltimer.h" class LLFriendObserver; +class LLRelationship; /** @@ -88,19 +89,27 @@ private: LIST_VISIBLE_ONLINE, LIST_VISIBLE_MAP, LIST_EDIT_MINE, - LIST_EDIT_THEIRS + LIST_EDIT_THEIRS, + LIST_FRIEND_UPDATE_GEN }; // protected members - + typedef std::map rights_map_t; void reloadNames(); void refreshNames(); void refreshUI(); void refreshRightsChangeList(); - void applyRightsToFriends(S32 flag, BOOL value); - void updateMenuState(S32 flag, BOOL value); - S32 getMenuState() { return mMenuState; } + void applyRightsToFriends(); void addFriend(const std::string& name, const LLUUID& agent_id); + void updateFriendItem(LLScrollListItem* itemp, const LLRelationship* relationship); + + typedef enum + { + GRANT, + REVOKE + } EGrantRevoke; + void confirmModifyRights(rights_map_t& ids, EGrantRevoke command); + void sendRightsGrant(rights_map_t& ids); // return LLUUID::null if nothing is selected LLDynamicArray getSelectedIDs(); @@ -119,12 +128,10 @@ private: static void onClickOfferTeleport(void* user_data); static void onClickPay(void* user_data); - static void onClickOnlineStatus(LLUICtrl* ctrl, void* user_data); - static void onClickMapStatus(LLUICtrl* ctrl, void* user_data); static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data); static void handleRemove(S32 option, void* user_data); - static void handleModifyRights(S32 option, void* user_data); + static void modifyRightsConfirmation(S32 option, void* user_data); private: // member data @@ -132,7 +139,6 @@ private: LLUUID mAddFriendID; LLString mAddFriendName; LLScrollListCtrl* mFriendsList; - S32 mMenuState; BOOL mShowMaxSelectWarning; BOOL mAllowRightsChange; S32 mNumRightsChanged; diff --git a/linden/indra/newview/llfloatergesture.cpp b/linden/indra/newview/llfloatergesture.cpp index b91ddb4..3ac1e8f 100644 --- a/linden/indra/newview/llfloatergesture.cpp +++ b/linden/indra/newview/llfloatergesture.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergesture.h b/linden/indra/newview/llfloatergesture.h index ab7288f..82c8c27 100644 --- a/linden/indra/newview/llfloatergesture.h +++ b/linden/indra/newview/llfloatergesture.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergodtools.cpp b/linden/indra/newview/llfloatergodtools.cpp index 219bd09..bdfa09c 100644 --- a/linden/indra/newview/llfloatergodtools.cpp +++ b/linden/indra/newview/llfloatergodtools.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergodtools.h b/linden/indra/newview/llfloatergodtools.h index c145619..301c8ec 100644 --- a/linden/indra/newview/llfloatergodtools.h +++ b/linden/indra/newview/llfloatergodtools.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergroupinfo.cpp b/linden/indra/newview/llfloatergroupinfo.cpp index 7d9c00b..1c303b9 100644 --- a/linden/indra/newview/llfloatergroupinfo.cpp +++ b/linden/indra/newview/llfloatergroupinfo.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -55,7 +55,8 @@ std::map LLFloaterGroupInfo::sInstances; class LLGroupHandler : public LLCommandHandler { public: - LLGroupHandler() : LLCommandHandler("group") { } + // don't allow from external browsers + LLGroupHandler() : LLCommandHandler("group", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { if (tokens.size() < 2) diff --git a/linden/indra/newview/llfloatergroupinfo.h b/linden/indra/newview/llfloatergroupinfo.h index 648999c..28ff628 100644 --- a/linden/indra/newview/llfloatergroupinfo.h +++ b/linden/indra/newview/llfloatergroupinfo.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergroupinvite.cpp b/linden/indra/newview/llfloatergroupinvite.cpp index ea3027f..8dd4e24 100644 --- a/linden/indra/newview/llfloatergroupinvite.cpp +++ b/linden/indra/newview/llfloatergroupinvite.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergroupinvite.h b/linden/indra/newview/llfloatergroupinvite.h index ceb1e2b..621b5dd 100644 --- a/linden/indra/newview/llfloatergroupinvite.h +++ b/linden/indra/newview/llfloatergroupinvite.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp index c68442c..4a89fae 100644 --- a/linden/indra/newview/llfloatergroups.cpp +++ b/linden/indra/newview/llfloatergroups.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h index d4c1f54..8d118e4 100644 --- a/linden/indra/newview/llfloatergroups.h +++ b/linden/indra/newview/llfloatergroups.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterhtml.cpp b/linden/indra/newview/llfloaterhtml.cpp index 0853514..2f7bc14 100644 --- a/linden/indra/newview/llfloaterhtml.cpp +++ b/linden/indra/newview/llfloaterhtml.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,10 +37,13 @@ #include "llvieweruictrlfactory.h" #include "llviewercontrol.h" #include "lllineeditor.h" +#include "llviewerwindow.h" +#include "llweb.h" #include "llwebbrowserctrl.h" LLFloaterHtml* LLFloaterHtml::sInstance = 0; +LLViewerHtmlHelp gViewerHtmlHelp; //////////////////////////////////////////////////////////////////////////////// // @@ -83,10 +86,6 @@ LLFloaterHtml::LLFloaterHtml() { // open links in internal browser mWebBrowser->setOpenInExternalBrowser( false ); - - // don't automatically open secondlife links since we want to catch - // special ones that do other stuff (like open F1 Help) - mWebBrowser->setOpenSLURLsInMap( false ); } #endif // LL_LIBXUL_ENABLED } @@ -122,7 +121,7 @@ void LLFloaterHtml::draw() //////////////////////////////////////////////////////////////////////////////// // -void LLFloaterHtml::show( LLString content_id ) +void LLFloaterHtml::show( LLString content_id, bool open_app_slurls ) { // calculate the XML labels we'll need (if only XML folders worked) LLString title_str = content_id + "_title"; @@ -130,12 +129,12 @@ void LLFloaterHtml::show( LLString content_id ) std::string title = childGetValue( title_str ).asString(); std::string url = childGetValue( url_str ).asString(); - show( url, title ); + show( url, title, open_app_slurls ); } //////////////////////////////////////////////////////////////////////////////// // -void LLFloaterHtml::show( std::string start_url, std::string title ) +void LLFloaterHtml::show( std::string start_url, std::string title, bool open_app_slurls ) { // set the title setTitle( title ); @@ -143,7 +142,10 @@ void LLFloaterHtml::show( std::string start_url, std::string title ) #if LL_LIBXUL_ENABLED // navigate to the URL if ( mWebBrowser ) + { + mWebBrowser->setOpenAppSLURLs( open_app_slurls ); mWebBrowser->navigateTo( start_url ); + } #endif // LL_LIBXUL_ENABLED // make floater appear @@ -200,7 +202,7 @@ void LLFloaterHtml::onClickHome( void* data ) else { llwarns << "Invalid home page specified for HTML floater - navigating to default" << llendl; - self->mWebBrowser->navigateTo( "http://google.com" ); + self->mWebBrowser->navigateTo( "http://secondlife.com" ); } }; #endif // LL_LIBXUL_ENABLED @@ -259,3 +261,47 @@ void LLFloaterHtml::onClickGo( void* data ) }; }; } + +//////////////////////////////////////////////////////////////////////////////// +// +static void 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"); + + // *TODO:Translate + // 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( "http://secondlife.com/support" ); + 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"; + else + if ( lang == "de" ) + help_url = "http://de.secondlife.com/support"; + + LLWeb::loadURL( help_url ); + } +} + +LLViewerHtmlHelp::LLViewerHtmlHelp() +{ + LLUI::setHtmlHelp(this); +} + +LLViewerHtmlHelp::~LLViewerHtmlHelp() +{ + LLUI::setHtmlHelp(NULL); +} + +void LLViewerHtmlHelp::show(std::string url, std::string title) +{ + gViewerWindow->alertXml("ClickOpenF1Help", onClickF1HelpLoadURL, (void*) NULL); +} diff --git a/linden/indra/newview/llfloaterhtml.h b/linden/indra/newview/llfloaterhtml.h index d254f68..2f6164c 100644 --- a/linden/indra/newview/llfloaterhtml.h +++ b/linden/indra/newview/llfloaterhtml.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -34,6 +34,7 @@ #define LL_LLFLOATERHTML_H #include "llfloater.h" +#include "llhtmlhelp.h" class LLWebBrowserCtrl; @@ -48,10 +49,12 @@ class LLFloaterHtml : virtual void onClose( bool app_quitting ); // Pass string like "in-world_help" or "additional help" - void show( LLString content_id ); + void show( LLString content_id, bool open_app_slurls ); // Pass raw URL and window title - void show( std::string start_url, std::string title ); + // Can be set to handle secondlife:///app/ URLs, but this should + // usually be false. + void show( std::string start_url, std::string title, bool open_app_slurls ); static void onClickClose( void* data ); static void onClickBack( void* data ); @@ -69,4 +72,15 @@ class LLFloaterHtml : LLButton* mCloseButton; }; +class LLViewerHtmlHelp : public LLHtmlHelp +{ +public: + LLViewerHtmlHelp(); + virtual ~LLViewerHtmlHelp(); + + /*virtual*/ void show(std::string start_url = "", std::string title = ""); +}; + +extern LLViewerHtmlHelp gViewerHtmlHelp; + #endif diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp deleted file mode 100644 index 6cb6c0f..0000000 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ /dev/null @@ -1,328 +0,0 @@ -/** - * @file llfloaterhtmlhelp.cpp - * @brief HTML Help floater - uses embedded web browser control - * - * $LicenseInfo:firstyear=2006&license=viewergpl$ - * - * Copyright (c) 2006-2008, 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. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloaterhtmlhelp.h" - -#include "llvieweruictrlfactory.h" -#include "llwebbrowserctrl.h" -#include "llviewerwindow.h" -#include "llviewercontrol.h" -#include "llweb.h" -#include "llui.h" - -#if LL_LIBXUL_ENABLED - -LLViewerHtmlHelp gViewerHtmlHelp; - -class LLFloaterHtmlHelp : - public LLFloater, - public LLWebBrowserCtrlObserver -{ -public: - LLFloaterHtmlHelp(std::string start_url, std::string title); - virtual ~LLFloaterHtmlHelp(); - - virtual void onClose( bool app_quitting ); - virtual void draw(); - - static void show(std::string url, std::string title); - static void onClickBack( void* data ); - static void onClickHome( void* data ); - static void onClickForward( void* data ); - static void onClickClose( void* data ); - - // browser observer impls - virtual void onStatusTextChange( const EventType& eventIn ); - virtual void onLocationChange( const EventType& eventIn ); - - // 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; - LLButton* mBackButton; - LLButton* mForwardButton; - LLButton* mCloseButton; - LLTextBox* mStatusText; - LLString mStatusTextContents; - LLString mCurrentUrl; -}; - -LLFloaterHtmlHelp* LLFloaterHtmlHelp::sInstance = 0; - -BOOL LLFloaterHtmlHelp::sFloaterOpened = FALSE; - -//////////////////////////////////////////////////////////////////////////////// -// -LLFloaterHtmlHelp::LLFloaterHtmlHelp(std::string start_url, std::string title) -: LLFloater( "HTML Help" ), - mWebBrowser( 0 ), - mStatusTextContents( "" ), - mCurrentUrl( "" ) -{ - sInstance = this; - - // create floater from its XML definition - gUICtrlFactory->buildFloater( this, "floater_html_help.xml" ); - - childSetAction("back_btn", onClickBack, this); - childSetAction("home_btn", onClickHome, this); - childSetAction("forward_btn", onClickForward, this); - - if (!title.empty()) - { - setTitle(title); - } - - mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "html_help_browser" ); - if ( mWebBrowser ) - { - // observe browser control events - mWebBrowser->addObserver( this ); - - if (start_url != "") - { - mWebBrowser->navigateTo( start_url ); - } - else - { - // if the last page we were at before the client was closed is valid, go there and - // override what is in the XML file - // (not when the window was closed - it's only ever hidden - not closed) - LLString lastPageUrl = gSavedSettings.getString( "HtmlHelpLastPage" ); - if ( lastPageUrl != "" ) - { - mWebBrowser->navigateTo( lastPageUrl ); - }; - } - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// -LLFloaterHtmlHelp::~LLFloaterHtmlHelp() -{ - // stop observing browser events - if ( mWebBrowser ) - { - mWebBrowser->remObserver( this ); - }; - - // save position of floater - gSavedSettings.setRect( "HtmlHelpRect", mRect ); - - // save the location we were at when SL closed - gSavedSettings.setString( "HtmlHelpLastPage", mCurrentUrl ); - - sInstance = 0; -} - -//////////////////////////////////////////////////////////////////////////////// -// virtual -void LLFloaterHtmlHelp::draw() -{ - // enable/disable buttons depending on state - if ( mWebBrowser ) - { - bool enable_back = mWebBrowser->canNavigateBack(); - childSetEnabled( "back_btn", enable_back ); - - bool enable_forward = mWebBrowser->canNavigateForward(); - childSetEnabled( "forward_btn", enable_forward ); - }; - - LLFloater::draw(); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::show(std::string url, std::string title) -{ - gViewerWindow->alertXml("ClickOpenF1Help", onClickF1HelpLoadURL, (void*) NULL); - - // 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 ) - { - sFloaterOpened = true; - - if ( sInstance ) - { - if (sInstance->mWebBrowser) - { - sInstance->mWebBrowser->navigateTo(url); - } - sInstance->setVisibleAndFrontmost(); - return; - } - - LLFloaterHtmlHelp* self = new LLFloaterHtmlHelp(url, title); - - // 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( "http://secondlife.com/support" ); - 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"; - else - if ( lang == "de" ) - help_url = "http://de.secondlife.com/support"; - - LLWeb::loadURL( help_url ); - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::onClose( bool app_quitting ) -{ - setVisible( false ); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::onClickClose( void* data ) -{ - LLFloaterHtmlHelp* self = ( LLFloaterHtmlHelp* )data; - - self->setVisible( false ); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::onClickBack( void* data ) -{ - LLFloaterHtmlHelp* self = ( LLFloaterHtmlHelp* )data; - if ( self ) - { - if ( self->mWebBrowser ) - { - self->mWebBrowser->navigateBack(); - }; - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::onClickHome( void* data ) -{ - LLFloaterHtmlHelp* self = ( LLFloaterHtmlHelp* )data; - if ( self ) - { - // get the home page URL (which can differ from the start URL) from XML and go there - LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName( self, "html_help_browser" ); - if ( web_browser ) - { - web_browser->navigateHome(); - }; - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::onClickForward( void* data ) -{ - LLFloaterHtmlHelp* self = ( LLFloaterHtmlHelp* )data; - if ( self ) - { - if ( self->mWebBrowser ) - { - self->mWebBrowser->navigateForward(); - }; - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::onStatusTextChange( const EventType& eventIn ) -{ - mStatusTextContents = LLString( eventIn.getStringValue() ); - - childSetText("status_text", mStatusTextContents); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtmlHelp::onLocationChange( const EventType& eventIn ) -{ - llinfos << "MOZ> Location changed to " << eventIn.getStringValue() << llendl; - mCurrentUrl = LLString( eventIn.getStringValue() ); -} - -//////////////////////////////////////////////////////////////////////////////// -// -LLViewerHtmlHelp::LLViewerHtmlHelp() -{ - LLUI::setHtmlHelp(this); -} - -LLViewerHtmlHelp::~LLViewerHtmlHelp() -{ - LLUI::setHtmlHelp(NULL); -} - -void LLViewerHtmlHelp::show(std::string url, std::string title) -{ - LLFloaterHtmlHelp::show(url, title); -} - -BOOL LLViewerHtmlHelp::getFloaterOpened() -{ - return LLFloaterHtmlHelp::sFloaterOpened; -} - -#endif // LL_LIBXUL_ENABLED - diff --git a/linden/indra/newview/llfloaterhtmlhelp.h b/linden/indra/newview/llfloaterhtmlhelp.h deleted file mode 100644 index 06167c2..0000000 --- a/linden/indra/newview/llfloaterhtmlhelp.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file llfloaterhtmlhelp.h - * @brief HTML Help floater - uses embedded web browser control - * - * $LicenseInfo:firstyear=2006&license=viewergpl$ - * - * Copyright (c) 2006-2008, 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. - * $/LicenseInfo$ - */ - -#if LL_LIBXUL_ENABLED - -#ifndef LL_LLFLOATERHTMLHELP_H -#define LL_LLFLOATERHTMLHELP_H - -#include "llhtmlhelp.h" - -class LLViewerHtmlHelp : public LLHtmlHelp -{ -public: - LLViewerHtmlHelp(); - virtual ~LLViewerHtmlHelp(); - - /*virtual*/ void show(std::string start_url = "", std::string title = ""); - /*virtual*/ BOOL getFloaterOpened(); -}; - -extern LLViewerHtmlHelp gViewerHtmlHelp; - -#endif // LL_LLFLOATERHTMLHELP_H - -#endif // LL_LIBXUL_ENABLED diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 1d15016..4c0b096 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterimagepreview.h b/linden/indra/newview/llfloaterimagepreview.h index 5f8c279..cd5d80b 100644 --- a/linden/indra/newview/llfloaterimagepreview.h +++ b/linden/indra/newview/llfloaterimagepreview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterimport.cpp b/linden/indra/newview/llfloaterimport.cpp index 325e29a..77f1206 100644 --- a/linden/indra/newview/llfloaterimport.cpp +++ b/linden/indra/newview/llfloaterimport.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -305,7 +305,7 @@ BOOL LLFloaterImport::postBuild() if (!object_file_read) { - mImportList->addSimpleItem("Error: Invalid object file.", ADD_BOTTOM, FALSE); + mImportList->addCommentText("Error: Invalid object file."); mImportList->setCanSelect(FALSE); mOKBtn->setEnabled(FALSE); } @@ -622,7 +622,7 @@ BOOL LLFloaterImport::handleMouseDown(S32 x, S32 y, MASK mask) if (item) { current_preview_uuid = item->getUUID(); - current_preview_name = item->getColumn(2)->getText(); + current_preview_name = item->getColumn(2)->getValue().asString(); } else { @@ -634,7 +634,7 @@ BOOL LLFloaterImport::handleMouseDown(S32 x, S32 y, MASK mask) if (current_preview_uuid.isNull()) { current_preview_uuid = (*itor)->getUUID(); - current_preview_name = (*itor)->getColumn(2)->getText(); + current_preview_name = (*itor)->getColumn(2)->getValue().asString(); } else { diff --git a/linden/indra/newview/llfloaterimport.h b/linden/indra/newview/llfloaterimport.h index 93f938a..f633196 100644 --- a/linden/indra/newview/llfloaterimport.h +++ b/linden/indra/newview/llfloaterimport.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp index 1434ccc..70b7a29 100644 --- a/linden/indra/newview/llfloaterinspect.cpp +++ b/linden/indra/newview/llfloaterinspect.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -262,6 +262,7 @@ void LLFloaterInspect::refresh() void LLFloaterInspect::onFocusReceived() { gToolMgr->setTransientTool(gToolInspect); + LLFloater::onFocusReceived(); } void LLFloaterInspect::dirty() diff --git a/linden/indra/newview/llfloaterinspect.h b/linden/indra/newview/llfloaterinspect.h index 376ceac..31ca2fc 100644 --- a/linden/indra/newview/llfloaterinspect.h +++ b/linden/indra/newview/llfloaterinspect.h @@ -14,12 +14,12 @@ * ("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 +* online at http://secondlifegrid.net/programs/open_source/licensing/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 +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterlagmeter.cpp b/linden/indra/newview/llfloaterlagmeter.cpp index 6d09f64..2d4f65d 100644 --- a/linden/indra/newview/llfloaterlagmeter.cpp +++ b/linden/indra/newview/llfloaterlagmeter.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterlagmeter.h b/linden/indra/newview/llfloaterlagmeter.h index 933bd5c..dc6d92b 100644 --- a/linden/indra/newview/llfloaterlagmeter.h +++ b/linden/indra/newview/llfloaterlagmeter.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp index 5af46f3..447571d 100644 --- a/linden/indra/newview/llfloaterland.cpp +++ b/linden/indra/newview/llfloaterland.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -1045,7 +1045,10 @@ BOOL LLPanelLandObjects::postBuild() mSelectedObjects = LLUICtrlFactory::getTextBoxByName(this, "selected_objects_text"); mCleanOtherObjectsTime = LLUICtrlFactory::getLineEditorByName(this, "clean other time"); - mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus); + + mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus, this); + mCleanOtherObjectsTime->setCommitCallback(onCommitClean); + childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32); childSetUserData("clean other time", this); @@ -1066,44 +1069,8 @@ BOOL LLPanelLandObjects::postBuild() image_id.set( gViewerArt.getString("icon_group.tga") ); mIconGroup = gImageList.getImage(image_id, MIPMAP_FALSE, TRUE); - mCurrentSortColumn = 3; // sort by number of objects by default. - mCurrentSortAscending = FALSE; - - // Column widths for various columns - const S32 SORTER_WIDTH = 308; - const S32 DESC_BTN_WIDTH = 64; - const S32 ICON_WIDTH = 24; - mColWidth[0] = ICON_WIDTH; // type icon - mColWidth[1] = -1; // hidden type code - mColWidth[2] = SORTER_WIDTH - mColWidth[0] - DESC_BTN_WIDTH; - mColWidth[3] = DESC_BTN_WIDTH; // info - mColWidth[4] = -1; // type data 1 - mColWidth[5] = -1; - mColWidth[6] = -1; // type data 3 - mColWidth[7] = -1; // type data 4 - mColWidth[8] = -1; // type data 5 - - // Adjust description for other widths - S32 sum = 0; - for (S32 i = 0; i < 8; i++) - { - if (mColWidth[i] > 0) - { - sum += mColWidth[i]; - } - } - mColWidth[8] = mRect.getWidth() - HPAD - sum - HPAD - HPAD; - - mBtnType = LLUICtrlFactory::getButtonByName(this, "Type"); - mBtnType->setClickedCallback(onClickType, this); - - mBtnName = LLUICtrlFactory::getButtonByName(this, "Name"); - mBtnName->setClickedCallback(onClickName, this); - - mBtnDescription = LLUICtrlFactory::getButtonByName(this, "Count"); - mBtnDescription->setClickedCallback(onClickDesc, this); - mOwnerList = LLUICtrlFactory::getNameListByName(this, "owner list"); + mOwnerList->sortByColumn(3, FALSE); childSetCommitCallback("owner list", onCommitList, this); mOwnerList->setDoubleClickCallback(onDoubleClickOwner); @@ -1134,7 +1101,7 @@ void LLPanelLandObjects::onDoubleClickOwner(void *userdata) return; } // Is this a group? - BOOL is_group = cell->getText() == OWNER_GROUP; + BOOL is_group = cell->getValue().asString() == OWNER_GROUP; if (is_group) { LLFloaterGroupInfo::showFromUUID(owner_id); @@ -1179,19 +1146,16 @@ void LLPanelLandObjects::refresh() } else { - S32 sw_max = 0; - S32 sw_total = 0; - S32 max = 0; - S32 total = 0; - S32 owned = 0; - S32 group = 0; - S32 other = 0; - S32 selected = 0; - F32 parcel_object_bonus = 0.f; - - gParcelMgr->getPrimInfo(sw_max, sw_total, - max, total, owned, group, other, selected, - parcel_object_bonus, mOtherTime); + S32 sw_max = parcel->getSimWideMaxPrimCapacity(); + S32 sw_total = parcel->getSimWidePrimCount(); + S32 max = llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()); + S32 total = parcel->getPrimCount(); + S32 owned = parcel->getOwnerPrimCount(); + S32 group = parcel->getGroupPrimCount(); + S32 other = parcel->getOtherPrimCount(); + S32 selected = parcel->getSelectedPrimCount(); + F32 parcel_object_bonus = parcel->getParcelPrimBonus(); + mOtherTime = parcel->getCleanOtherTime(); // Can't have more than region max tasks, regardless of parcel // object bonus factor. @@ -1441,14 +1405,6 @@ void LLPanelLandObjects::onClickReturnOwnerList(void* userdata) { LLPanelLandObjects *self = (LLPanelLandObjects *)userdata; - S32 sw_max, sw_total; - S32 max, total; - S32 owned, group, other, selected; - F32 parcel_object_bonus; - S32 other_time; - - gParcelMgr->getPrimInfo(sw_max, sw_total, max, total, owned, group, other, selected, parcel_object_bonus, other_time); - LLParcel* parcelp = self->mParcel->getParcel(); if (!parcelp) return; @@ -1491,7 +1447,7 @@ void LLPanelLandObjects::onClickRefresh(void* userdata) // ready the list for results self->mOwnerList->deleteAllItems(); - self->mOwnerList->addSimpleItem("Searching..."); + self->mOwnerList->addCommentText("Searching..."); self->mOwnerList->setEnabled(FALSE); self->mFirstReply = TRUE; @@ -1552,24 +1508,24 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, owner_id); if (is_group_owned) { - row->addColumn(self->mIconGroup, self->mColWidth[0]); - row->addColumn(OWNER_GROUP, FONT, self->mColWidth[1]); + row->addColumn(self->mIconGroup.notNull() ? self->mIconGroup->getID() : LLUUID::null); + row->addColumn(OWNER_GROUP, FONT); } else if (is_online) { - row->addColumn(self->mIconAvatarOnline, self->mColWidth[0]); - row->addColumn(OWNER_ONLINE, FONT, self->mColWidth[1]); + row->addColumn(self->mIconAvatarOnline.notNull() ? self->mIconAvatarOnline->getID() : LLUUID::null); + row->addColumn(OWNER_ONLINE, FONT); } else // offline { - row->addColumn(self->mIconAvatarOffline, self->mColWidth[0]); - row->addColumn(OWNER_OFFLINE, FONT, self->mColWidth[1]); + row->addColumn(self->mIconAvatarOffline.notNull() ? self->mIconAvatarOffline->getID() : LLUUID::null); + row->addColumn(OWNER_OFFLINE, FONT); } // Placeholder for name. - row->addColumn(LLString::null, FONT, self->mColWidth[2]); + row->addColumn(LLString::null, FONT); snprintf(object_count_str, sizeof(object_count_str), "%d", object_count); /* Flawfinder: ignore */ - row->addColumn(object_count_str, FONT, self->mColWidth[3]); + row->addColumn(object_count_str, FONT); if (is_group_owned) { @@ -1583,12 +1539,10 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo lldebugs << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent") << ") owns " << object_count << " objects." << llendl; } - self->mOwnerList->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending); - // check for no results if (0 == self->mOwnerList->getItemCount()) { - self->mOwnerList->addSimpleItem("None found."); + self->mOwnerList->addCommentText("None found."); } else { @@ -1596,21 +1550,6 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo } } -void LLPanelLandObjects::sortBtnCore(S32 column) -{ - if (column == (S32)mCurrentSortColumn) // is this already our sorted column? - { - mCurrentSortAscending = !mCurrentSortAscending; - } - else // default to ascending first time a column is clicked - { - mCurrentSortColumn = column; - mCurrentSortAscending = TRUE; - } - - mOwnerList->sortByColumn(column, mCurrentSortAscending); -} - // static void LLPanelLandObjects::onCommitList(LLUICtrl* ctrl, void* data) { @@ -1631,11 +1570,11 @@ void LLPanelLandObjects::onCommitList(LLUICtrl* ctrl, void* data) return; } // Is this a group? - self->mSelectedIsGroup = cell->getText() == OWNER_GROUP; + self->mSelectedIsGroup = cell->getValue().asString() == OWNER_GROUP; cell = item->getColumn(2); - self->mSelectedName = cell->getText(); + self->mSelectedName = cell->getValue().asString(); cell = item->getColumn(3); - self->mSelectedCount = atoi(cell->getText().c_str()); + self->mSelectedCount = atoi(cell->getValue().asString().c_str()); // Set the selection, and enable the return button. self->mSelectedOwners.clear(); @@ -1648,28 +1587,6 @@ void LLPanelLandObjects::onCommitList(LLUICtrl* ctrl, void* data) } // static -void LLPanelLandObjects::onClickType(void* userdata) -{ - // Sort on hidden type column - LLPanelLandObjects* self = (LLPanelLandObjects*)userdata; - self->sortBtnCore(1); -} - -// static -void LLPanelLandObjects::onClickDesc(void* userdata) -{ - LLPanelLandObjects* self = (LLPanelLandObjects*)userdata; - self->sortBtnCore(3); -} - -// static -void LLPanelLandObjects::onClickName(void* userdata) -{ - LLPanelLandObjects* self = (LLPanelLandObjects*)userdata; - self->sortBtnCore(2); -} - -// static void LLPanelLandObjects::clickShowCore(LLPanelLandObjects* self, S32 return_type, uuid_list_t* list) { LLParcel* parcel = self->mParcel->getParcel(); @@ -1699,18 +1616,14 @@ void LLPanelLandObjects::onClickShowOtherObjects(void* userdata) // static void LLPanelLandObjects::onClickReturnOwnerObjects(void* userdata) { - S32 sw_max=0, sw_total=0; - S32 max=0, total=0; - S32 owned=0, group=0, other=0, selected=0; - F32 parcel_object_bonus=0; - S32 other_time=0; - - gParcelMgr->getPrimInfo(sw_max, sw_total, max, total, owned, group, other, selected, parcel_object_bonus, other_time); + S32 owned = 0; LLPanelLandObjects* panelp = (LLPanelLandObjects*)userdata; LLParcel* parcel = panelp->mParcel->getParcel(); if (!parcel) return; + owned = parcel->getOwnerPrimCount(); + send_parcel_select_objects(parcel->getLocalID(), RT_OWNER); LLUUID owner_id = parcel->getOwnerID(); @@ -1738,14 +1651,6 @@ void LLPanelLandObjects::onClickReturnOwnerObjects(void* userdata) // static void LLPanelLandObjects::onClickReturnGroupObjects(void* userdata) { - S32 sw_max=0, sw_total=0; - S32 max=0, total=0; - S32 owned=0, group=0, other=0, selected=0; - F32 parcel_object_bonus=0; - S32 other_time=0; - - gParcelMgr->getPrimInfo(sw_max, sw_total, max, total, owned, group, other, selected, parcel_object_bonus, other_time); - LLPanelLandObjects* panelp = (LLPanelLandObjects*)userdata; LLParcel* parcel = panelp->mParcel->getParcel(); if (!parcel) return; @@ -1757,7 +1662,7 @@ void LLPanelLandObjects::onClickReturnGroupObjects(void* userdata) LLStringBase::format_map_t args; args["[NAME]"] = group_name; - args["[N]"] = llformat("%d",group); + args["[N]"] = llformat("%d", parcel->getGroupPrimCount()); // create and show confirmation textbox gViewerWindow->alertXml("ReturnObjectsDeededToGroup", args, callbackReturnGroupObjects, userdata); @@ -1766,17 +1671,13 @@ void LLPanelLandObjects::onClickReturnGroupObjects(void* userdata) // static void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata) { - S32 sw_max=0, sw_total=0; - S32 max=0, total=0; - S32 owned=0, group=0, other=0, selected=0; - F32 parcel_object_bonus=0; - S32 other_time=0; - - gParcelMgr->getPrimInfo(sw_max, sw_total, max, total, owned, group, other, selected, parcel_object_bonus, other_time); + S32 other = 0; LLPanelLandObjects* panelp = (LLPanelLandObjects*)userdata; LLParcel* parcel = panelp->mParcel->getParcel(); if (!parcel) return; + + other = parcel->getOtherPrimCount(); send_parcel_select_objects(parcel->getLocalID(), RT_OTHER); @@ -1816,7 +1717,13 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata) } // static -void LLPanelLandObjects::onLostFocus(LLUICtrl *caller, void* user_data) +void LLPanelLandObjects::onLostFocus(LLFocusableElement* caller, void* user_data) +{ + onCommitClean((LLUICtrl*)caller, user_data); +} + +// static +void LLPanelLandObjects::onCommitClean(LLUICtrl *caller, void* user_data) { LLPanelLandObjects *lop = (LLPanelLandObjects *)user_data; LLParcel* parcel = lop->mParcel->getParcel(); @@ -2401,6 +2308,13 @@ void LLPanelLandMedia::refresh() mCheckSoundLocal->set( parcel->getSoundLocal() ); mCheckSoundLocal->setEnabled( can_change_media ); + LLViewerRegion* selection_region = gParcelMgr->getSelectionRegion(); + BOOL region_allows_voice = FALSE; + if (selection_region) + { + region_allows_voice = selection_region->isVoiceEnabled(); + } + if(parcel->getVoiceEnabled()) { if(parcel->getVoiceUseEstateChannel()) @@ -2413,7 +2327,7 @@ void LLPanelLandMedia::refresh() mRadioVoiceChat->setSelectedIndex(kRadioVoiceChatDisable); } - mRadioVoiceChat->setEnabled( can_change_media ); + mRadioVoiceChat->setEnabled( can_change_media && region_allows_voice ); // don't display urls if you're not able to change it // much requested change in forums so people can't 'steal' urls @@ -2528,7 +2442,7 @@ void LLPanelLandMedia::onClickStopMedia ( void* data ) void LLPanelLandMedia::onClickStartMedia ( void* data ) { // force a commit - gFocusMgr.setKeyboardFocus ( NULL, NULL ); + gFocusMgr.setKeyboardFocus ( NULL ); // force a reload LLMediaEngine::getInstance ()->convertImageAndLoadUrl ( true, false, std::string()); @@ -2904,7 +2818,7 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata) LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo"); if (passcombo) { - if (passcombo->getSimpleSelectedValue().asString() == "group") + if (passcombo->getSelectedValue().asString() == "group") { use_access_list = FALSE; } diff --git a/linden/indra/newview/llfloaterland.h b/linden/indra/newview/llfloaterland.h index 7bb3ae8..551c7e3 100644 --- a/linden/indra/newview/llfloaterland.h +++ b/linden/indra/newview/llfloaterland.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -250,21 +250,17 @@ public: static void onClickReturnOtherObjects(void*); static void onClickReturnOwnerList(void*); static void onClickRefresh(void*); - static void onClickType(void*); - static void onClickName(void*); - static void onClickDesc(void*); static void onDoubleClickOwner(void*); static void onCommitList(LLUICtrl* ctrl, void* data); - static void onLostFocus(LLUICtrl* caller, void* user_data); - + static void onLostFocus(LLFocusableElement* caller, void* user_data); + static void onCommitClean(LLUICtrl* caller, void* user_data); static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **); virtual BOOL postBuild(); protected: - void sortBtnCore(S32 column); LLTextBox *mParcelObjectBonus; LLTextBox *mSWTotalObjects; @@ -284,19 +280,12 @@ protected: S32 mOtherTime; LLButton *mBtnRefresh; LLButton *mBtnReturnOwnerList; - LLButton *mBtnType; // column 0 - LLButton *mBtnName; // column 2 - LLButton *mBtnDescription; // column 3 LLNameListCtrl *mOwnerList; LLPointer mIconAvatarOnline; LLPointer mIconAvatarOffline; LLPointer mIconGroup; - U32 mCurrentSortColumn; - BOOL mCurrentSortAscending; - S32 mColWidth[12]; - BOOL mFirstReply; uuid_list_t mSelectedOwners; diff --git a/linden/indra/newview/llfloaterlandholdings.cpp b/linden/indra/newview/llfloaterlandholdings.cpp index 75200aa..32d077c 100644 --- a/linden/indra/newview/llfloaterlandholdings.cpp +++ b/linden/indra/newview/llfloaterlandholdings.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -256,7 +256,7 @@ void LLFloaterLandHoldings::buttonCore(S32 which) S32 index = list->getFirstSelectedIndex(); if (index < 0) return; - LLString location = list->getSimpleSelectedItem(3); + LLString location = list->getSelectedItemLabel(3); F32 global_x = 0.f; F32 global_y = 0.f; diff --git a/linden/indra/newview/llfloaterlandholdings.h b/linden/indra/newview/llfloaterlandholdings.h index 8cc5c6f..eb0b2ca 100644 --- a/linden/indra/newview/llfloaterlandholdings.h +++ b/linden/indra/newview/llfloaterlandholdings.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterlandmark.cpp b/linden/indra/newview/llfloaterlandmark.cpp index ecb2277..0011daf 100644 --- a/linden/indra/newview/llfloaterlandmark.cpp +++ b/linden/indra/newview/llfloaterlandmark.cpp @@ -1,18 +1,27 @@ /** - * @file lllandmark.cpp + * @file llfloaterlandmark.cpp * @author Richard Nelson, James Cook, Sam Kolb - * @brief LLLandmarkCtrl class implementation including related functions * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2002-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, diff --git a/linden/indra/newview/llfloaterlandmark.h b/linden/indra/newview/llfloaterlandmark.h index 61a9027..7d710de 100644 --- a/linden/indra/newview/llfloaterlandmark.h +++ b/linden/indra/newview/llfloaterlandmark.h @@ -1,18 +1,27 @@ /** - * @file lltexturectrl.h - * @author Richard Nelson, James Cook - * @brief LLTextureCtrl class header file including related functions + * @file llfloaterlandmark.h + * @author Richard Nelson, James Cook, Sam Kolb * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2002-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, @@ -66,7 +75,7 @@ public: const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only); void setDirty( BOOL b ) { mIsDirty = b; } - BOOL isDirty() { return mIsDirty; } + BOOL isDirty() const { return mIsDirty; } void setActive( BOOL active ); static void onBtnClose( void* userdata ); diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 7c68291..b60515d 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h index 18684ca..525ce0e 100644 --- a/linden/indra/newview/llfloatermap.h +++ b/linden/indra/newview/llfloatermap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatermute.cpp b/linden/indra/newview/llfloatermute.cpp index 26e2be3..db88d46 100644 --- a/linden/indra/newview/llfloatermute.cpp +++ b/linden/indra/newview/llfloatermute.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -51,6 +51,7 @@ #include "llviewertexteditor.h" #include "llviewerwindow.h" #include "llvieweruictrlfactory.h" +#include "llfocusmgr.h" // // Constants @@ -69,6 +70,117 @@ const S32 HPAD = 4; // LLFloaterMute* gFloaterMute = NULL; +//----------------------------------------------------------------------------- +// LLFloaterMuteObjectUI() +//----------------------------------------------------------------------------- +// Class for handling mute object by name floater. +class LLFloaterMuteObjectUI : public LLFloater +{ +public: + typedef void(*callback_t)(const LLString&, void*); + + static LLFloaterMuteObjectUI* show(callback_t callback, + void* userdata); + virtual BOOL postBuild(); + +protected: + LLFloaterMuteObjectUI(); + virtual ~LLFloaterMuteObjectUI(); + virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + +private: + // UI Callbacks + static void onBtnOk(void *data); + static void onBtnCancel(void *data); + + void (*mCallback)(const LLString& objectName, + void* userdata); + void* mCallbackUserData; + + static LLFloaterMuteObjectUI* sInstance; +}; + +LLFloaterMuteObjectUI* LLFloaterMuteObjectUI::sInstance = NULL; + +LLFloaterMuteObjectUI::LLFloaterMuteObjectUI() + : LLFloater("Mute object by name"), + mCallback(NULL), + mCallbackUserData(NULL) +{ + gUICtrlFactory->buildFloater(this, "floater_mute_object.xml", NULL); +} + +// Destroys the object +LLFloaterMuteObjectUI::~LLFloaterMuteObjectUI() +{ + gFocusMgr.releaseFocusIfNeeded( this ); + sInstance = NULL; +} + +LLFloaterMuteObjectUI* LLFloaterMuteObjectUI::show(callback_t callback, + void* userdata) +{ + const bool firstInstantiation = (sInstance == NULL); + if (firstInstantiation) + { + sInstance = new LLFloaterMuteObjectUI; + } + sInstance->mCallback = callback; + sInstance->mCallbackUserData = userdata; + + sInstance->open(); + if (firstInstantiation) + { + sInstance->center(); + } + + return sInstance; +} + + +BOOL LLFloaterMuteObjectUI::postBuild() +{ + childSetAction("OK", onBtnOk, this); + childSetAction("Cancel", onBtnCancel, this); + return TRUE; +} + +void LLFloaterMuteObjectUI::onBtnOk(void* userdata) +{ + LLFloaterMuteObjectUI* self = (LLFloaterMuteObjectUI*)userdata; + if (!self) return; + + if (self->mCallback) + { + const LLString& text = self->childGetValue("object_name").asString(); + self->mCallback(text,self->mCallbackUserData); + } + self->close(); +} + +void LLFloaterMuteObjectUI::onBtnCancel(void* userdata) +{ + LLFloaterMuteObjectUI* self = (LLFloaterMuteObjectUI*)userdata; + if (!self) return; + + self->close(); +} + +BOOL LLFloaterMuteObjectUI::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +{ + if (key == KEY_RETURN && mask == MASK_NONE) + { + onBtnOk(this); + return TRUE; + } + else if (key == KEY_ESCAPE && mask == MASK_NONE) + { + onBtnCancel(this); + return TRUE; + } + + return LLFloater::handleKeyHere(key, mask, called_from_parent); +} // // Member Functions @@ -77,15 +189,16 @@ LLFloaterMute* gFloaterMute = NULL; //----------------------------------------------------------------------------- // LLFloaterMute() //----------------------------------------------------------------------------- -LLFloaterMute::LLFloaterMute() +LLFloaterMute::LLFloaterMute(const LLSD& seed) : LLFloater("mute floater", "FloaterMuteRect3", FLOATER_TITLE, RESIZE_YES, 220, 140, DRAG_ON_TOP, MINIMIZE_YES, CLOSE_YES) { - gUICtrlFactory->buildFloater(this, "floater_mute.xml"); - - setVisible(FALSE); + gUICtrlFactory->buildFloater(this, "floater_mute.xml", NULL, FALSE); +} +BOOL LLFloaterMute::postBuild() +{ childSetCommitCallback("mutes", onSelectName, this); childSetAction("Mute resident...", onClickPick, this); childSetAction("Mute object by name...", onClickMuteByName, this); @@ -95,6 +208,8 @@ LLFloaterMute::LLFloaterMute() mMuteList->setCommitOnSelectionChange(TRUE); refreshMuteList(); + + return TRUE; } //----------------------------------------------------------------------------- @@ -104,39 +219,6 @@ LLFloaterMute::~LLFloaterMute() { } - -//----------------------------------------------------------------------------- -// show() -//----------------------------------------------------------------------------- -void LLFloaterMute::show() -{ - // Make sure we make a noise. - open(); /* Flawfinder: ignore */ -} - -//----------------------------------------------------------------------------- -// toggle() -//----------------------------------------------------------------------------- -void LLFloaterMute::toggle(void*) -{ - if (gFloaterMute->getVisible()) - { - gFloaterMute->close(); - } - else - { - gFloaterMute->show(); - } -} - -//----------------------------------------------------------------------------- -// visible() -//----------------------------------------------------------------------------- -BOOL LLFloaterMute::visible(void*) -{ - return (gFloaterMute && gFloaterMute->getVisible()); -} - //----------------------------------------------------------------------------- // refreshMuteList() //----------------------------------------------------------------------------- @@ -196,7 +278,7 @@ void LLFloaterMute::onClickRemove(void *data) { LLFloaterMute* floater = (LLFloaterMute *)data; - LLString name = floater->mMuteList->getSimpleSelectedItem(); + LLString name = floater->mMuteList->getSelectedItemLabel(); LLUUID id = floater->mMuteList->getStringUUIDSelectedItem(); LLMute mute(id); mute.setFromDisplayName(name); @@ -250,20 +332,15 @@ void LLFloaterMute::onPickUser(const std::vector& names, const std: void LLFloaterMute::onClickMuteByName(void* data) { + LLFloaterMuteObjectUI* picker = LLFloaterMuteObjectUI::show(callbackMuteByName,data); + assert(picker); - - LLString::format_map_t args; - gViewerWindow->alertXmlEditText("MuteByName", args, - NULL, NULL, - callbackMuteByName, data); - - + LLFloaterMute* floaterp = (LLFloaterMute*)data; + floaterp->addDependentFloater(picker); } - -void LLFloaterMute::callbackMuteByName(S32 option, const LLString& text, void* data) +void LLFloaterMute::callbackMuteByName(const LLString& text, void* data) { - if (option != 0) return; if (text.empty()) return; LLMute mute(LLUUID::null, text, LLMute::BY_NAME); diff --git a/linden/indra/newview/llfloatermute.h b/linden/indra/newview/llfloatermute.h index 8a02adc..4d2608a 100644 --- a/linden/indra/newview/llfloatermute.h +++ b/linden/indra/newview/llfloatermute.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -42,21 +42,17 @@ class LLUUID; class LLScrollListCtrl; class LLFloaterMute -: public LLFloater +: public LLFloater, public LLUISingleton { public: - LLFloaterMute(); + LLFloaterMute(const LLSD& seed); ~LLFloaterMute(); - void show(); - // Must have one global floater so chat history can // be kept in the text editor. virtual void onClose(bool app_quitting) { setVisible(FALSE); } + virtual BOOL postBuild(); - static void toggle(void*); - static BOOL visible(void*); - void refreshMuteList(); void selectMute(const LLUUID& id); @@ -69,7 +65,7 @@ private: static void onSelectName(LLUICtrl* caller, void *data); static void onPickUser(const std::vector& names, const std::vector& ids, void* user_data); static void onClickMuteByName(void*); - static void callbackMuteByName(S32 option, const LLString& text, void*); + static void callbackMuteByName(const LLString& text, void*); private: LLScrollListCtrl* mMuteList; diff --git a/linden/indra/newview/llfloaternamedesc.cpp b/linden/indra/newview/llfloaternamedesc.cpp index 54a7261..4c0cefa 100644 --- a/linden/indra/newview/llfloaternamedesc.cpp +++ b/linden/indra/newview/llfloaternamedesc.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -140,13 +140,6 @@ BOOL LLFloaterNameDesc::postBuild() y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f); - if (mIsAudio) - { - LLSD bitrate = gSavedSettings.getS32("AudioDefaultBitrate"); - - childSetValue("bitrate", bitrate); - } - // Cancel button childSetAction("cancel_btn", onBtnCancel, this); @@ -206,16 +199,10 @@ void LLFloaterNameDesc::onBtnOK( void* userdata ) fp->childDisable("ok_btn"); // don't allow inadvertent extra uploads - S32 bitrate = 0; - - if (fp->mIsAudio) - { - bitrate = fp->childGetValue("bitrate").asInteger(); - } upload_new_resource(fp->mFilenameAndPath, // file fp->childGetValue("name_form").asString(), fp->childGetValue("description_form").asString(), - bitrate, LLAssetType::AT_NONE, LLInventoryType::IT_NONE); + 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE); fp->close(false); } diff --git a/linden/indra/newview/llfloaternamedesc.h b/linden/indra/newview/llfloaternamedesc.h index a206111..9fee4bf 100644 --- a/linden/indra/newview/llfloaternamedesc.h +++ b/linden/indra/newview/llfloaternamedesc.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaternewim.cpp b/linden/indra/newview/llfloaternewim.cpp index 6685c3e..c4af6a7 100644 --- a/linden/indra/newview/llfloaternewim.cpp +++ b/linden/indra/newview/llfloaternewim.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -202,7 +202,7 @@ void LLFloaterNewIM::onStart(void* userdata) if(item) { const LLScrollListCell* cell = item->getColumn(0); - LLString name(cell->getText()); + LLString name(cell->getValue()); // *NOTE: Do a live detrmination of what type of session it // should be. If we restrict the new im panel to online users, diff --git a/linden/indra/newview/llfloaternewim.h b/linden/indra/newview/llfloaternewim.h index ec6fecd..8636e90 100644 --- a/linden/indra/newview/llfloaternewim.h +++ b/linden/indra/newview/llfloaternewim.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloateropenobject.cpp b/linden/indra/newview/llfloateropenobject.cpp index 377760a..bd7bca8 100644 --- a/linden/indra/newview/llfloateropenobject.cpp +++ b/linden/indra/newview/llfloateropenobject.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloateropenobject.h b/linden/indra/newview/llfloateropenobject.h index 1977729..e32f2f4 100644 --- a/linden/indra/newview/llfloateropenobject.h +++ b/linden/indra/newview/llfloateropenobject.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterparcel.cpp b/linden/indra/newview/llfloaterparcel.cpp index 7123caf..e3189a9 100644 --- a/linden/indra/newview/llfloaterparcel.cpp +++ b/linden/indra/newview/llfloaterparcel.cpp @@ -4,16 +4,26 @@ * Parcel information as shown in a floating window from secondlife:// command * handler. * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2002-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, @@ -41,7 +51,8 @@ LLMap< const LLUUID, LLFloaterParcelInfo* > gPlaceInfoInstances; class LLParcelHandler : public LLCommandHandler { public: - LLParcelHandler() : LLCommandHandler("parcel") { } + // don't allow from external browsers + LLParcelHandler() : LLCommandHandler("parcel", false) { } bool handle(const LLSD& params, const LLSD& queryMap) { if (params.size() < 2) diff --git a/linden/indra/newview/llfloaterparcel.h b/linden/indra/newview/llfloaterparcel.h index 158a556..24a7ee8 100644 --- a/linden/indra/newview/llfloaterparcel.h +++ b/linden/indra/newview/llfloaterparcel.h @@ -1,29 +1,34 @@ /** - * @file llfloaterparcelinfo.h - * @brief LLFloaterParcelInfo class definition + * @file llfloaterparcel.h + * @brief Parcel information as shown in a floating window from a sl-url. + * Just a wrapper for LLPanelPlace, shared with the Find directory. * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007-2008, Linden Research, Inc. * - * Copyright (c) 2002-2008, 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://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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. * $/LicenseInfo$ */ - -/** - * Parcel information as shown in a floating window from a sl-url. - * Just a wrapper for LLPanelPlace, shared with the Find directory. - */ - #ifndef LL_FLOATERPARCELINFO_H #define LL_FLOATERPARCELINFO_H diff --git a/linden/indra/newview/llfloaterpermissionsmgr.cpp b/linden/indra/newview/llfloaterpermissionsmgr.cpp index a1f79c4..6447d72 100644 --- a/linden/indra/newview/llfloaterpermissionsmgr.cpp +++ b/linden/indra/newview/llfloaterpermissionsmgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterpermissionsmgr.h b/linden/indra/newview/llfloaterpermissionsmgr.h index 8090baf..acd4b5e 100644 --- a/linden/indra/newview/llfloaterpermissionsmgr.h +++ b/linden/indra/newview/llfloaterpermissionsmgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp index 7e21306..f866e49 100644 --- a/linden/indra/newview/llfloaterpostcard.cpp +++ b/linden/indra/newview/llfloaterpostcard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -137,8 +137,7 @@ BOOL LLFloaterPostcard::postBuild() MsgField->setWordWrap(TRUE); // For the first time a user focusess to .the msg box, all text will be selected. - MsgField->setFocusChangedCallback(onMsgFormFocusRecieved); - MsgField->setCallbackUserData(this); + MsgField->setFocusChangedCallback(onMsgFormFocusRecieved, this); } childSetFocus("to_form", TRUE); @@ -347,7 +346,7 @@ void LLFloaterPostcard::updateUserInfo(const char *email) } } -void LLFloaterPostcard::onMsgFormFocusRecieved(LLUICtrl* receiver, void* data) +void LLFloaterPostcard::onMsgFormFocusRecieved(LLFocusableElement* receiver, void* data) { LLFloaterPostcard* self = (LLFloaterPostcard *)data; if(self) diff --git a/linden/indra/newview/llfloaterpostcard.h b/linden/indra/newview/llfloaterpostcard.h index effc4ad..e04d45f 100644 --- a/linden/indra/newview/llfloaterpostcard.h +++ b/linden/indra/newview/llfloaterpostcard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -65,7 +65,7 @@ public: static void updateUserInfo(const char *email); - static void onMsgFormFocusRecieved(LLUICtrl* receiver, void* data); + static void onMsgFormFocusRecieved(LLFocusableElement* receiver, void* data); static void missingSubjMsgAlertCallback(S32 option, void* data); void sendPostcard(); diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp index 69937a0..09398fd 100644 --- a/linden/indra/newview/llfloaterpreference.cpp +++ b/linden/indra/newview/llfloaterpreference.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -95,7 +95,8 @@ LLFloaterPreference* LLFloaterPreference::sInstance = NULL; class LLPreferencesHandler : public LLCommandHandler { public: - LLPreferencesHandler() : LLCommandHandler("preferences") { } + // don't allow from external browsers + LLPreferencesHandler() : LLCommandHandler("preferences", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { LLFloaterPreference::show(NULL); @@ -442,8 +443,7 @@ void LLFloaterPreference::onClickAbout(void*) // static void LLFloaterPreference::onBtnOK( void* userdata ) { - //refresh splash page if we're displaying it - LLPanelLogin::loadLoginPage(); + LLPanelLogin::refreshLocation( false ); LLFloaterPreference *fp =(LLFloaterPreference *)userdata; // commit any outstanding text entry @@ -489,8 +489,7 @@ void LLFloaterPreference::onBtnApply( void* userdata ) } fp->apply(); - //refresh splash page if we're displaying it - LLPanelLogin::loadLoginPage(); + LLPanelLogin::refreshLocation( false ); } diff --git a/linden/indra/newview/llfloaterpreference.h b/linden/indra/newview/llfloaterpreference.h index 299ae8b..bf16d0d 100644 --- a/linden/indra/newview/llfloaterpreference.h +++ b/linden/indra/newview/llfloaterpreference.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterproperties.cpp b/linden/indra/newview/llfloaterproperties.cpp index a1e6565..36f6051 100644 --- a/linden/indra/newview/llfloaterproperties.cpp +++ b/linden/indra/newview/llfloaterproperties.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterproperties.h b/linden/indra/newview/llfloaterproperties.h index 314471b..d4461fd 100644 --- a/linden/indra/newview/llfloaterproperties.h +++ b/linden/indra/newview/llfloaterproperties.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 671e03e..2f01844 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -161,50 +161,55 @@ bool estate_dispatch_initialized = false; /// LLFloaterRegionInfo ///---------------------------------------------------------------------------- -LLFloaterRegionInfo* LLFloaterRegionInfo::sInstance = NULL; //S32 LLFloaterRegionInfo::sRequestSerial = 0; LLUUID LLFloaterRegionInfo::sRequestInvoice; -LLFloaterRegionInfo::LLFloaterRegionInfo(const LLRect& rect) : - LLFloater("regioninfo", rect, "Region/Estate") +LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) { - LLRect tr(0, rect.getHeight() - LLFLOATER_HEADER_SIZE, rect.getWidth(), 0); - mTab = new LLTabContainer("tab", tr, LLTabContainer::TOP, NULL,NULL,""); - mTab->setBorderVisible(FALSE); - addChild(mTab); + gUICtrlFactory->buildFloater(this, "floater_region_info.xml", NULL, FALSE); +} + +BOOL LLFloaterRegionInfo::postBuild() +{ + mTab = gUICtrlFactory->getTabContainerByName(this, "region_panels"); // contruct the panels - LLPanel* panel; + LLPanelRegionInfo* panel; panel = new LLPanelRegionGeneralInfo; - mInfoPanels.push_back((LLPanelRegionInfo*)panel); + mInfoPanels.push_back(panel); gUICtrlFactory->buildPanel(panel, "panel_region_general.xml"); mTab->addTabPanel(panel, panel->getLabel(), TRUE); panel = new LLPanelRegionDebugInfo; - mInfoPanels.push_back((LLPanelRegionInfo*)panel); + mInfoPanels.push_back(panel); gUICtrlFactory->buildPanel(panel, "panel_region_debug.xml"); mTab->addTabPanel(panel, panel->getLabel(), FALSE); panel = new LLPanelRegionTextureInfo; - mInfoPanels.push_back((LLPanelRegionInfo*)panel); + mInfoPanels.push_back(panel); gUICtrlFactory->buildPanel(panel, "panel_region_texture.xml"); mTab->addTabPanel(panel, panel->getLabel(), FALSE); panel = new LLPanelRegionTerrainInfo; - mInfoPanels.push_back((LLPanelRegionInfo*)panel); + mInfoPanels.push_back(panel); gUICtrlFactory->buildPanel(panel, "panel_region_terrain.xml"); mTab->addTabPanel(panel, panel->getLabel(), FALSE); panel = new LLPanelEstateInfo; - mInfoPanels.push_back((LLPanelRegionInfo*)panel); + mInfoPanels.push_back(panel); gUICtrlFactory->buildPanel(panel, "panel_region_estate.xml"); mTab->addTabPanel(panel, panel->getLabel(), FALSE); panel = new LLPanelEstateCovenant; - mInfoPanels.push_back((LLPanelRegionInfo*)panel); + mInfoPanels.push_back(panel); gUICtrlFactory->buildPanel(panel, "panel_region_covenant.xml"); mTab->addTabPanel(panel, panel->getLabel(), FALSE); + gMessageSystem->setHandlerFunc( + "EstateOwnerMessage", + &processEstateOwnerRequest); + + return TRUE; } LLFloaterRegionInfo::~LLFloaterRegionInfo() @@ -212,23 +217,20 @@ LLFloaterRegionInfo::~LLFloaterRegionInfo() sInstance = NULL; } -// static -void LLFloaterRegionInfo::show(LLViewerRegion* region) +void LLFloaterRegionInfo::onOpen() { - if (!sInstance) - { - LLRect rect = gSavedSettings.getRect("FloaterRegionInfo"); - S32 left, top; - gFloaterView->getNewFloaterPosition(&left, &top); - rect.translate(left,top); - sInstance = new LLFloaterRegionInfo(rect); - gMessageSystem->setHandlerFunc( - "EstateOwnerMessage", - &processEstateOwnerRequest); - } - sInstance->open(); /* Flawfinder: ignore*/ - sInstance->refreshFromRegion(region); + LLRect rect = gSavedSettings.getRect("FloaterRegionInfo"); + S32 left, top; + gFloaterView->getNewFloaterPosition(&left, &top); + rect.translate(left,top); + requestRegionInfo(); + refreshFromRegion(gAgent.getRegion()); + LLFloater::onOpen(); +} + +void LLFloaterRegionInfo::requestRegionInfo() +{ // Must allow anyone to request the RegionInfo data // so non-owners/non-gods can see the values. // Therefore can't use an EstateOwnerMessage JC @@ -242,18 +244,6 @@ void LLFloaterRegionInfo::show(LLViewerRegion* region) } // static -void LLFloaterRegionInfo::show(void*) -{ - show(gAgent.getRegion()); -} - -// static -LLFloaterRegionInfo* LLFloaterRegionInfo::getInstance() -{ - return sInstance; -} - -// static void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) { static LLDispatcher dispatch; @@ -264,7 +254,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) LLPanelEstateInfo::initDispatch(dispatch); } - LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(sInstance, "tab"); + LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(sInstance, "region_panels"); if (!tab) return; LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab, "Estate"); @@ -293,7 +283,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl; if(!sInstance) return; - LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(sInstance, "tab"); + LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(sInstance, "region_panels"); if(!tab) return; // extract message @@ -376,7 +366,7 @@ LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate() { LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); if (!floater) return NULL; - LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "tab"); + LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); if (!tab) return NULL; LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab,"Estate"); return panel; @@ -387,7 +377,7 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() { LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); if (!floater) return NULL; - LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "tab"); + LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); if (!tab) return NULL; LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)LLUICtrlFactory::getPanelByName(tab, "Covenant"); return panel; @@ -1241,7 +1231,7 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); if (!floater) return true; - LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "tab"); + LLTabContainerCommon* tab = LLUICtrlFactory::getTabContainerByName(floater, "region_panels"); if (!tab) return true; LLPanelEstateInfo* panel = (LLPanelEstateInfo*)LLUICtrlFactory::getPanelByName(tab, "Estate"); @@ -2388,7 +2378,12 @@ BOOL LLPanelEstateInfo::checkRemovalButton(std::string name) } else if (name == "estate_manager_name_list") { - btn_name = "remove_estate_manager_btn"; + //ONLY OWNER CAN ADD /DELET ESTATE MANAGER + LLViewerRegion* region = gAgent.getRegion(); + if (region && (region->getOwner() == gAgent.getID())) + { + btn_name = "remove_estate_manager_btn"; + } } // enable the remove button if something is selected @@ -2803,7 +2798,7 @@ bool LLDispatchSetEstateOwner::operator()( LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); if (!floater) return true; - LLTabContainer* tab = (LLTabContainer*)(floater->getChildByName("tab")); + LLTabContainer* tab = (LLTabContainer*)(floater->getChildByName("region_panels")); if (!tab) return true; LLPanelEstateInfo* panel = (LLPanelEstateInfo*)(tab->getChildByName("Estate")); diff --git a/linden/indra/newview/llfloaterregioninfo.h b/linden/indra/newview/llfloaterregioninfo.h index 22e4853..8918430 100644 --- a/linden/indra/newview/llfloaterregioninfo.h +++ b/linden/indra/newview/llfloaterregioninfo.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -58,14 +58,15 @@ class LLPanelRegionTerrainInfo; class LLPanelEstateInfo; class LLPanelEstateCovenant; -class LLFloaterRegionInfo : public LLFloater +class LLFloaterRegionInfo : public LLFloater, public LLUISingleton { + friend class LLUISingleton; public: ~LLFloaterRegionInfo(); - static void show(LLViewerRegion* region); - static void show(void*); - static LLFloaterRegionInfo* getInstance(); + /*virtual*/ void onOpen(); + /*virtual*/ BOOL postBuild(); + static void processEstateOwnerRequest(LLMessageSystem* msg, void**); // get and process region info if necessary. @@ -82,15 +83,14 @@ public: // from LLPanel virtual void refresh(); + void requestRegionInfo(); + protected: - LLFloaterRegionInfo(const LLRect& rect); + LLFloaterRegionInfo(const LLSD& seed); void refreshFromRegion(LLViewerRegion* region); - // static data - static LLFloaterRegionInfo* sInstance; - // member data - LLTabContainer* mTab; + LLTabContainerCommon* mTab; typedef std::vector info_panels_t; info_panels_t mInfoPanels; //static S32 sRequestSerial; // serial # of last EstateOwnerRequest diff --git a/linden/indra/newview/llfloaterreleasemsg.cpp b/linden/indra/newview/llfloaterreleasemsg.cpp index ff34724..b3fb965 100644 --- a/linden/indra/newview/llfloaterreleasemsg.cpp +++ b/linden/indra/newview/llfloaterreleasemsg.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -43,7 +43,7 @@ extern LLAgent gAgent; LLFloaterReleaseMsg* LLFloaterReleaseMsg::sInstance = 0; - +bool LLFloaterReleaseMsg::sDisplayMessage = false; //////////////////////////////////////////////////////////////////////////////// // @@ -154,3 +154,31 @@ void LLFloaterReleaseMsg::onClickClose( void* data ) } +//////////////////////////////////////////////////////////////////////////////// +// + +// return true if it's a new version and we should display a notification +bool LLFloaterReleaseMsg::checkVersion(const LLString& version_channel) +{ + bool res = false; + if (gLastVersionChannel != version_channel) + { + res = !gLastVersionChannel.empty(); // don't show message on initial login + gLastVersionChannel = version_channel; + } + return res; +} + +void LLFloaterReleaseMsg::displayMessage(const LLString& version_channel) +{ + //if we have the capability already, display the url, otherwise wait on it + if (gAgent.getRegion()->getCapability("ServerReleaseNotes").empty()) + { + sDisplayMessage = true; + } + else + { + sDisplayMessage = false; + show(); + } +} diff --git a/linden/indra/newview/llfloaterreleasemsg.h b/linden/indra/newview/llfloaterreleasemsg.h index 6e211b8..e97d803 100644 --- a/linden/indra/newview/llfloaterreleasemsg.h +++ b/linden/indra/newview/llfloaterreleasemsg.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -44,7 +44,10 @@ class LLFloaterReleaseMsg : static void show(); static void onClickClose( void* data ); + static bool checkVersion(const LLString& version_channel); + static void displayMessage(const LLString& version_channel); + static bool sDisplayMessage; static LLFloaterReleaseMsg* sInstance; LLString mTitleBase; private: diff --git a/linden/indra/newview/llfloaterreporter.cpp b/linden/indra/newview/llfloaterreporter.cpp index 7ab0aca..f0af5d0 100644 --- a/linden/indra/newview/llfloaterreporter.cpp +++ b/linden/indra/newview/llfloaterreporter.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -131,12 +131,7 @@ LLFloaterReporter::LLFloaterReporter( gUICtrlFactory->buildFloater(this, "floater_report_abuse.xml"); } - LLViewerRegion *regionp = gAgent.getRegion(); - if (regionp) - { - childSetText("sim_field", regionp->getName() ); - childSetText("abuse_location_edit", regionp->getName() ); - } + childSetText("abuse_location_edit", gAgent.getSLURL() ); LLButton* pick_btn = LLUICtrlFactory::getButtonByName(this, "pick_btn"); if (pick_btn) @@ -163,6 +158,7 @@ LLFloaterReporter::LLFloaterReporter( // convert the position to a string LLVector3d pos = gAgent.getPositionGlobal(); + LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { pos -= regionp->getOriginGlobal(); @@ -669,7 +665,7 @@ LLSD LLFloaterReporter::gatherReport() LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(this, "category_combo"); if (combo) { - category_name = combo->getSimpleSelectedItem(); // want label, not value + category_name = combo->getSelectedItemLabel(); // want label, not value } #if LL_WINDOWS diff --git a/linden/indra/newview/llfloaterreporter.h b/linden/indra/newview/llfloaterreporter.h index 800ccf3..9696b34 100644 --- a/linden/indra/newview/llfloaterreporter.h +++ b/linden/indra/newview/llfloaterreporter.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatersaveavatar.cpp b/linden/indra/newview/llfloatersaveavatar.cpp index 236ed90..2675212 100644 --- a/linden/indra/newview/llfloatersaveavatar.cpp +++ b/linden/indra/newview/llfloatersaveavatar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatersaveavatar.h b/linden/indra/newview/llfloatersaveavatar.h index 08c7bb3..5a02fe4 100644 --- a/linden/indra/newview/llfloatersaveavatar.h +++ b/linden/indra/newview/llfloatersaveavatar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterscriptdebug.cpp b/linden/indra/newview/llfloaterscriptdebug.cpp index b01fb0e..005bc53 100644 --- a/linden/indra/newview/llfloaterscriptdebug.cpp +++ b/linden/indra/newview/llfloaterscriptdebug.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -177,7 +177,7 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLUUID& object_id) mHistoryEditor->setWordWrap( TRUE ); mHistoryEditor->setFollowsAll(); mHistoryEditor->setEnabled( FALSE ); - mHistoryEditor->setTakesFocus( TRUE ); // We want to be able to cut or copy from the history. + mHistoryEditor->setTabStop( TRUE ); // We want to be able to cut or copy from the history. addChild(mHistoryEditor); } @@ -200,7 +200,7 @@ void LLFloaterScriptDebugOutput::init(const LLString& title, BOOL resizable, mHistoryEditor->setWordWrap( TRUE ); mHistoryEditor->setFollowsAll(); mHistoryEditor->setEnabled( FALSE ); - mHistoryEditor->setTakesFocus( TRUE ); // We want to be able to cut or copy from the history. + mHistoryEditor->setTabStop( TRUE ); // We want to be able to cut or copy from the history. addChild(mHistoryEditor); } diff --git a/linden/indra/newview/llfloaterscriptdebug.h b/linden/indra/newview/llfloaterscriptdebug.h index 901ad31..b20a460 100644 --- a/linden/indra/newview/llfloaterscriptdebug.h +++ b/linden/indra/newview/llfloaterscriptdebug.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatersellland.cpp b/linden/indra/newview/llfloatersellland.cpp index 79c024f..f3ae4ec 100644 --- a/linden/indra/newview/llfloatersellland.cpp +++ b/linden/indra/newview/llfloatersellland.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -492,7 +492,14 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) args["[SALE_PRICE]"] = llformat("%d",sale_price); args["[NAME]"] = authorizedBuyerName; - gViewerWindow->alertXml("ConfirmLandSaleChange", args, onConfirmSale, self); + if (sell_to_anyone) + { + gViewerWindow->alertXml("ConfirmLandSaleToAnyoneChange", args, onConfirmSale, self); + } + else + { + gViewerWindow->alertXml("ConfirmLandSaleChange", args, onConfirmSale, self); + } } else { diff --git a/linden/indra/newview/llfloatersellland.h b/linden/indra/newview/llfloatersellland.h index d0ef6f1..5109f34 100644 --- a/linden/indra/newview/llfloatersellland.h +++ b/linden/indra/newview/llfloatersellland.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 9ef5130..54895d5 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -1123,7 +1123,7 @@ void LLFloaterSnapshot::Impl::onCommitResolution(LLUICtrl* ctrl, void* data) combo = LLUICtrlFactory::getComboBoxByName(view, "local_size_combo"); gSavedSettings.setS32("SnapshotLocalLastResolution", combo->getCurrentIndex()); - std::string sdstring = combobox->getSimpleSelectedValue(); + std::string sdstring = combobox->getSelectedValue(); LLSD sdres; std::stringstream sstream(sdstring); LLSDSerialize::fromNotation(sdres, sstream); diff --git a/linden/indra/newview/llfloatersnapshot.h b/linden/indra/newview/llfloatersnapshot.h index 3b3fbff..973cebf 100644 --- a/linden/indra/newview/llfloatersnapshot.h +++ b/linden/indra/newview/llfloatersnapshot.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatertelehub.cpp b/linden/indra/newview/llfloatertelehub.cpp index 885eb99..f36fd0f 100644 --- a/linden/indra/newview/llfloatertelehub.cpp +++ b/linden/indra/newview/llfloatertelehub.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -305,7 +305,7 @@ void LLFloaterTelehub::unpackTelehubInfo(LLMessageSystem* msg) mSpawnPointPos[i].mV[VX], mSpawnPointPos[i].mV[VY], mSpawnPointPos[i].mV[VZ]); - list->addSimpleItem(pos); + list->addSimpleElement(pos); } list->selectNthItem(mNumSpawn - 1); } diff --git a/linden/indra/newview/llfloatertelehub.h b/linden/indra/newview/llfloatertelehub.h index dea6db1..302868b 100644 --- a/linden/indra/newview/llfloatertelehub.h +++ b/linden/indra/newview/llfloatertelehub.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatertest.cpp b/linden/indra/newview/llfloatertest.cpp index 0c71fb2..584622b 100644 --- a/linden/indra/newview/llfloatertest.cpp +++ b/linden/indra/newview/llfloatertest.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -69,7 +69,7 @@ private: static void onCommitCombo(LLUICtrl*, void*); static void onCommitLine(LLUICtrl*, void*); static void onKeyLine(LLLineEditor*, void*); - static void onFocusLostLine(LLUICtrl*, void*); + static void onFocusLostLine(LLFocusableElement*, void*); static void onChangeRadioGroup(LLUICtrl*, void*); LLButton* mBtnSimple; @@ -361,7 +361,7 @@ void LLFloaterTestImpl::onKeyLine(LLLineEditor*, void*) } // static -void LLFloaterTestImpl::onFocusLostLine(LLUICtrl*, void*) +void LLFloaterTestImpl::onFocusLostLine(LLFocusableElement*, void*) { llinfos << "focus lost line editor" << llendl; } diff --git a/linden/indra/newview/llfloatertest.h b/linden/indra/newview/llfloatertest.h index ec6ae28..96af960 100644 --- a/linden/indra/newview/llfloatertest.h +++ b/linden/indra/newview/llfloatertest.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 6dc2599..6764ffe 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -942,7 +942,7 @@ void commit_select_component(LLUICtrl *ctrl, void *data) //forfeit focus if (gFocusMgr.childHasKeyboardFocus(floaterp)) { - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); } BOOL select_individuals = floaterp->mCheckSelectIndividual->get(); @@ -992,4 +992,5 @@ void LLFloaterTools::setEditTool(void* tool_pointer) void LLFloaterTools::onFocusReceived() { gToolMgr->setCurrentToolset(gBasicToolset); + LLFloater::onFocusReceived(); } diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h index 1ae7a6b..38151f4 100644 --- a/linden/indra/newview/llfloatertools.h +++ b/linden/indra/newview/llfloatertools.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatertopobjects.cpp b/linden/indra/newview/llfloatertopobjects.cpp index 7ab17e0..631c92d 100644 --- a/linden/indra/newview/llfloatertopobjects.cpp +++ b/linden/indra/newview/llfloatertopobjects.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -257,8 +257,8 @@ void LLFloaterTopObjects::updateSelectionInfo() std::string object_id_string = object_id.asString(); childSetValue("id_editor", LLSD(object_id_string)); - childSetValue("object_name_editor", list->getFirstSelected()->getColumn(1)->getText()); - childSetValue("owner_name_editor", list->getFirstSelected()->getColumn(2)->getText()); + childSetValue("object_name_editor", list->getFirstSelected()->getColumn(1)->getValue().asString()); + childSetValue("owner_name_editor", list->getFirstSelected()->getColumn(2)->getValue().asString()); } // static @@ -451,8 +451,8 @@ void LLFloaterTopObjects::showBeacon() LLScrollListItem* first_selected = list->getFirstSelected(); if (!first_selected) return; - LLString name = first_selected->getColumn(1)->getText(); - LLString pos_string = first_selected->getColumn(3)->getText(); + LLString name = first_selected->getColumn(1)->getValue().asString(); + LLString pos_string = first_selected->getColumn(3)->getValue().asString(); F32 x, y, z; S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z); diff --git a/linden/indra/newview/llfloatertopobjects.h b/linden/indra/newview/llfloatertopobjects.h index cd737b7..18d68cd 100644 --- a/linden/indra/newview/llfloatertopobjects.h +++ b/linden/indra/newview/llfloatertopobjects.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp index 7826dac..fd069c9 100644 --- a/linden/indra/newview/llfloatertos.cpp +++ b/linden/indra/newview/llfloatertos.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatertos.h b/linden/indra/newview/llfloatertos.h index f2441ee..b923406 100644 --- a/linden/indra/newview/llfloatertos.h +++ b/linden/indra/newview/llfloatertos.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloaterurldisplay.cpp b/linden/indra/newview/llfloaterurldisplay.cpp index e5f4d81..8d12729 100644 --- a/linden/indra/newview/llfloaterurldisplay.cpp +++ b/linden/indra/newview/llfloaterurldisplay.cpp @@ -1,17 +1,28 @@ /** - * @file llpreviewlandmark.cpp - * @brief LLFloaterURLDisplayList class implementation + * @file llfloaterurldisplay.h + * @brief Probably should be called LLFloaterTeleport, or LLFloaterLandmark + * as it gives you a preview of a potential teleport location. * - * $LicenseInfo:firstyear=2002&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2002-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, @@ -37,6 +48,18 @@ LLFloaterURLDisplay::LLFloaterURLDisplay(const LLSD& sd) mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterURLDisplay::createPlaceDetail, this); gUICtrlFactory->buildFloater(this, "floater_preview_url.xml", &getFactoryMap()); this->setVisible(false); + + // If positioned at 0,0 the teleport button is behind the toolbar. + LLRect r = getRect(); + if (r.mBottom == 0 && r.mLeft == 0) + { + // first use, center it + center(); + } + else + { + gFloaterView->adjustToFitScreen(this, FALSE); + } } LLFloaterURLDisplay::~LLFloaterURLDisplay() diff --git a/linden/indra/newview/llfloaterurldisplay.h b/linden/indra/newview/llfloaterurldisplay.h index 115781e..e603c17 100644 --- a/linden/indra/newview/llfloaterurldisplay.h +++ b/linden/indra/newview/llfloaterurldisplay.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfloatervoicewizard.cpp b/linden/indra/newview/llfloatervoicewizard.cpp index 28c8280..65601ff 100644 --- a/linden/indra/newview/llfloatervoicewizard.cpp +++ b/linden/indra/newview/llfloatervoicewizard.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -132,6 +132,8 @@ void LLFloaterVoiceWizard::draw() void LLFloaterVoiceWizard::onOpen() { + LLFloaterDeviceSettings::hideInstance(); + if(mDevicePanel) { mDevicePanel->onOpen(); @@ -246,6 +248,9 @@ BOOL LLPanelDeviceSettings::postBuild() volume_slider->setValue(mMicVolume); } + childSetCommitCallback("voice_input_device", onCommitInputDevice, this); + childSetCommitCallback("voice_output_device", onCommitOutputDevice, this); + return TRUE; } @@ -270,19 +275,19 @@ void LLPanelDeviceSettings::draw() if (gVoiceClient->inTuningMode()) { - const S32 GAP = 5; - S32 cur_x = 100; - S32 cur_y = 15; - for(S32 power_bar_idx = 0; power_bar_idx < 5; power_bar_idx++) { - if (power_bar_idx < discrete_power) + LLString view_name = llformat("%s%d", "bar", power_bar_idx); + LLView* bar_view = getChildByName(view_name, TRUE); + if (bar_view) { - LLColor4 color = (power_bar_idx >= 3) ? gSavedSettings.getColor4("OverdrivenColor") : gSavedSettings.getColor4("SpeakingColor"); - gl_rect_2d(cur_x, cur_y + 20, cur_x + 20, cur_y, color, TRUE); + if (power_bar_idx < discrete_power) + { + LLColor4 color = (power_bar_idx >= 3) ? gSavedSettings.getColor4("OverdrivenColor") : gSavedSettings.getColor4("SpeakingColor"); + gl_rect_2d(bar_view->getRect(), color, TRUE); + } + gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE); } - gl_rect_2d(cur_x, cur_y + 20, cur_x + 20, cur_y, LLColor4::grey, FALSE); - cur_x += 20 + GAP; } } } @@ -395,6 +400,9 @@ void LLPanelDeviceSettings::refresh() void LLPanelDeviceSettings::onOpen() { + mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); + mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + mMicVolume = gSavedSettings.getF32("AudioLevelMic"); mDevicesUpdated = FALSE; // ask for new device enumeration @@ -402,11 +410,25 @@ void LLPanelDeviceSettings::onOpen() // put voice client in "tuning" mode gVoiceClient->tuningStart(); + LLVoiceChannel::suspend(); } void LLPanelDeviceSettings::onClose(bool app_quitting) { gVoiceClient->tuningStop(); + LLVoiceChannel::resume(); +} + +// static +void LLPanelDeviceSettings::onCommitInputDevice(LLUICtrl* ctrl, void* user_data) +{ + gSavedSettings.setString("VoiceInputAudioDevice", ctrl->getValue().asString()); +} + +// static +void LLPanelDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user_data) +{ + gSavedSettings.setString("VoiceOutputAudioDevice", ctrl->getValue().asString()); } // @@ -424,6 +446,7 @@ LLFloaterDeviceSettings::LLFloaterDeviceSettings(const LLSD& seed) : LLFloater(" void LLFloaterDeviceSettings::onOpen() { + LLFloaterVoiceWizard::hideInstance(); if(mDevicePanel) { mDevicePanel->onOpen(); diff --git a/linden/indra/newview/llfloatervoicewizard.h b/linden/indra/newview/llfloatervoicewizard.h index 9540fa7..9b1a1a0 100644 --- a/linden/indra/newview/llfloatervoicewizard.h +++ b/linden/indra/newview/llfloatervoicewizard.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -78,6 +78,9 @@ public: void onClose(bool app_quitting); protected: + static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data); + static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data); + F32 mMicVolume; std::string mInputDevice; std::string mOutputDevice; diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index 9da9a5b..ee84537 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -76,6 +76,7 @@ #include "lltracker.h" #include "llui.h" #include "lluiconstants.h" +#include "llurldispatcher.h" #include "llviewercamera.h" #include "llviewermenu.h" #include "llviewerregion.h" @@ -125,18 +126,18 @@ class LLMapInventoryObserver : public LLInventoryObserver { public: LLMapInventoryObserver() {} - virtual ~LLMapInventoryObserver() {} - virtual void changed(U32 mask); + virtual ~LLMapInventoryObserver() {} + virtual void changed(U32 mask); }; void LLMapInventoryObserver::changed(U32 mask) { - // if there's a change we're interested in. - if((mask & (LLInventoryObserver::CALLING_CARD | LLInventoryObserver::ADD | - LLInventoryObserver::REMOVE)) != 0) - { - gFloaterWorldMap->inventoryChanged(); - } + // if there's a change we're interested in. + if((mask & (LLInventoryObserver::CALLING_CARD | LLInventoryObserver::ADD | + LLInventoryObserver::REMOVE)) != 0) + { + gFloaterWorldMap->inventoryChanged(); + } } class LLMapFriendObserver : public LLFriendObserver @@ -176,8 +177,8 @@ LLFloaterWorldMap::LLFloaterWorldMap() FALSE, // drag on left TRUE, // minimize TRUE), // close - mInventory(NULL), - mInventoryObserver(NULL), + mInventory(NULL), + mInventoryObserver(NULL), mFriendObserver(NULL), mCompletingRegionName(""), mWaitingForTracker(FALSE), @@ -228,12 +229,18 @@ BOOL LLFloaterWorldMap::postBuild() { avatar_combo->selectFirstItem(); avatar_combo->setPrearrangeCallback( onAvatarComboPrearrange ); + avatar_combo->setTextEntryCallback( onComboTextEntry ); } childSetAction("DoSearch", onLocationCommit, this); - childSetFocusChangedCallback("location", updateSearchEnabled); - childSetKeystrokeCallback("location", (void (*)(LLLineEditor*,void*))updateSearchEnabled, NULL); + childSetFocusChangedCallback("location", onLocationFocusChanged, this); + + LLLineEditor *location_editor = LLUICtrlFactory::getLineEditorByName(this, "location"); + if (location_editor) + { + location_editor->setKeystrokeCallback( onSearchTextEntry ); + } childSetCommitCallback("search_results", onCommitSearchResult, this); childSetDoubleClickCallback("search_results", onClickTeleportBtn); @@ -248,6 +255,7 @@ BOOL LLFloaterWorldMap::postBuild() { landmark_combo->selectFirstItem(); landmark_combo->setPrearrangeCallback( onLandmarkComboPrearrange ); + landmark_combo->setTextEntryCallback( onComboTextEntry ); } childSetAction("Go Home", onGoHome, this); @@ -264,14 +272,6 @@ BOOL LLFloaterWorldMap::postBuild() setDefaultBtn(NULL); - if ( gAgent.isTeen() ) - { - // Hide Mature Events controls - childHide("events_mature_icon"); - childHide("events_mature_label"); - childHide("event_mature_chk"); - } - mZoomTimer.stop(); return TRUE; @@ -283,9 +283,9 @@ LLFloaterWorldMap::~LLFloaterWorldMap() // All cleaned up by LLView destructor mTabs = NULL; - // Inventory deletes all observers on shutdown - mInventory = NULL; - mInventoryObserver = NULL; + // Inventory deletes all observers on shutdown + mInventory = NULL; + mInventoryObserver = NULL; // avatar tracker will delete this for us. mFriendObserver = NULL; @@ -452,6 +452,11 @@ void LLFloaterWorldMap::draw() return; } + // Hide/Show Mature Events controls + childSetVisible("events_mature_icon", !gAgent.isTeen()); + childSetVisible("events_mature_label", !gAgent.isTeen()); + childSetVisible("event_mature_chk", !gAgent.isTeen()); + // On orientation island, users don't have a home location yet, so don't // let them teleport "home". It dumps them in an often-crowed welcome // area (infohub) and they get confused. JC @@ -508,7 +513,7 @@ void LLFloaterWorldMap::draw() } childSetEnabled("Teleport", (BOOL)tracking_status); -// childSetEnabled("Clear", (BOOL)tracking_status); +// childSetEnabled("Clear", (BOOL)tracking_status); childSetEnabled("Show Destination", (BOOL)tracking_status || gWorldMap->mIsTrackingUnknownLocation); childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); @@ -594,7 +599,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) if (combo) name = combo->getSimple(); mTrackedStatus = LLTracker::TRACKING_LANDMARK; LLTracker::trackLandmark(mLandmarkAssetIDList.get( idx ), // assetID - mLandmarkItemIDList.get( idx ), // itemID + mLandmarkItemIDList.get( idx ), // itemID name); // name if( asset_id != sHomeID ) @@ -604,7 +609,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) } // We have to download both region info and landmark data, so set busy. JC -// getWindow()->incBusyCount(); +// getWindow()->incBusyCount(); } else { @@ -712,8 +717,7 @@ void LLFloaterWorldMap::updateLocation() childSetValue("spin z", LLSD(agent_z) ); // Set the current SLURL - mSLURL = LLWeb::escapeURL( llformat("http://slurl.com/secondlife/%s/%d/%d/%d", - agent_sim_name.c_str(), agent_x, agent_y, agent_z) ); + mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z); } } @@ -750,8 +754,7 @@ void LLFloaterWorldMap::updateLocation() // simNameFromPosGlobal can fail, so don't give the user an invalid SLURL if ( gotSimName ) { - mSLURL = LLWeb::escapeURL(llformat("http://slurl.com/secondlife/%s/%d/%d/%d", - sim_name.c_str(), llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]))); + mSLURL = LLURLDispatcher::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ])); } else { // Empty SLURL will disable the "Copy SLURL to clipboard" button @@ -1001,7 +1004,7 @@ void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui) void LLFloaterWorldMap::adjustZoomSliderBounds() { // World size in regions - S32 world_width_regions = gWorldMap->getWorldWidth() / REGION_WIDTH_UNITS; + S32 world_width_regions = gWorldMap->getWorldWidth() / REGION_WIDTH_UNITS; S32 world_height_regions = gWorldMap->getWorldHeight() / REGION_WIDTH_UNITS; // Pad the world size a little bit, so we have a nice border on @@ -1045,7 +1048,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds() // static void LLFloaterWorldMap::onPanBtn( void* userdata ) { - if( !gFloaterWorldMap ) return; + if( !gFloaterWorldMap ) return; EPanDirection direction = (EPanDirection)(intptr_t)userdata; @@ -1056,7 +1059,7 @@ void LLFloaterWorldMap::onPanBtn( void* userdata ) case PAN_UP: pan_y = -1; break; case PAN_DOWN: pan_y = 1; break; case PAN_LEFT: pan_x = 1; break; - case PAN_RIGHT: pan_x = -1; break; + case PAN_RIGHT: pan_x = -1; break; default: llassert(0); return; } @@ -1096,6 +1099,21 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( LLUICtrl* ctrl, void* userdat } +void LLFloaterWorldMap::onComboTextEntry( LLLineEditor* ctrl, void* userdata ) +{ + // Reset the tracking whenever we start typing into any of the search fields, + // so that hitting does an auto-complete versus teleporting us to the + // previously selected landmark/friend. + LLTracker::clearFocus(); +} + +// static +void LLFloaterWorldMap::onSearchTextEntry( LLLineEditor* ctrl, void* userdata ) +{ + onComboTextEntry(ctrl, userdata); + updateSearchEnabled(ctrl, userdata); +} + // static void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata ) { @@ -1200,6 +1218,12 @@ void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata ) } } +//static +void LLFloaterWorldMap::onLocationFocusChanged( LLFocusableElement* focus, void* userdata ) +{ + updateSearchEnabled((LLUICtrl*)focus, userdata); +} + // static void LLFloaterWorldMap::updateSearchEnabled( LLUICtrl* ctrl, void* userdata ) { @@ -1261,7 +1285,7 @@ void LLFloaterWorldMap::onClearBtn(void* data) self->mTrackedStatus = LLTracker::TRACKING_NOTHING; LLTracker::stopTracking((void *)(intptr_t)TRUE); gWorldMap->mIsTrackingUnknownLocation = FALSE; - self->mSLURL = ""; // Clear the SLURL since it's invalid + self->mSLURL = ""; // Clear the SLURL since it's invalid self->mSetToUserPosition = TRUE; // Revert back to the current user position } @@ -1330,7 +1354,7 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate) else { // We've got the position finally, so we're no longer busy. JC -// getWindow()->decBusyCount(); +// getWindow()->decBusyCount(); pos_global = LLTracker::getTrackedPositionGlobal() - gAgent.getCameraPositionGlobal(); } } @@ -1542,11 +1566,11 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) return; } - LLCtrlListInterface *list = childGetListInterface("search_results"); + LLScrollListCtrl *list = gUICtrlFactory->getScrollListByName(this, "search_results"); if (!list) return; list->operateOnAll(LLCtrlListInterface::OP_DELETE); - LLSD selected_value = list->getSimpleSelectedValue(); + LLSD selected_value = list->getSelectedValue(); S32 name_length = mCompletingRegionName.length(); @@ -1601,7 +1625,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) } else { - list->addSimpleElement("None found."); + list->addCommentText("None found."); list->operateOnAll(LLCtrlListInterface::OP_DESELECT); } } @@ -1632,7 +1656,7 @@ void LLFloaterWorldMap::onCommitSearchResult(LLUICtrl*, void* userdata) LLCtrlListInterface *list = self->childGetListInterface("search_results"); if (!list) return; - LLSD selected_value = list->getSimpleSelectedValue(); + LLSD selected_value = list->getSelectedValue(); LLString sim_name = selected_value.asString(); if (sim_name.empty()) { diff --git a/linden/indra/newview/llfloaterworldmap.h b/linden/indra/newview/llfloaterworldmap.h index 1d3dcd3..7addaa7 100644 --- a/linden/indra/newview/llfloaterworldmap.h +++ b/linden/indra/newview/llfloaterworldmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -90,16 +90,16 @@ public: void trackLocation(const LLVector3d& pos); void trackEvent(const LLItemInfo &event_info); void trackGenericItem(const LLItemInfo &item); - void trackURL(const LLString& region_name, S32 x_coord, S32 y_coord, S32 z_coord); + void trackURL(const LLString& region_name, S32 x_coord, S32 y_coord, S32 z_coord); static const LLUUID& getHomeID() { return sHomeID; } // A z_attenuation of 0.0f collapses the distance into the X-Y plane - F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; + F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; - void clearLocationSelection(BOOL clear_ui = FALSE); - void clearAvatarSelection(BOOL clear_ui = FALSE); - void clearLandmarkSelection(BOOL clear_ui = FALSE); + void clearLocationSelection(BOOL clear_ui = FALSE); + void clearAvatarSelection(BOOL clear_ui = FALSE); + void clearLandmarkSelection(BOOL clear_ui = FALSE); // Adjust the maximally zoomed out limit of the zoom slider so you can // see the whole world, plus a little. @@ -118,12 +118,15 @@ protected: static void onLandmarkComboPrearrange( LLUICtrl* ctrl, void* data ); static void onLandmarkComboCommit( LLUICtrl* ctrl, void* data ); - + static void onAvatarComboPrearrange( LLUICtrl* ctrl, void* data ); static void onAvatarComboCommit( LLUICtrl* ctrl, void* data ); static void onCommitBackground(void* data, bool from_click); + static void onComboTextEntry( LLLineEditor* ctrl, void* data ); + static void onSearchTextEntry( LLLineEditor* ctrl, void* data ); + static void onClearBtn(void*); static void onFlyBtn(void*); static void onClickTeleportBtn(void*); @@ -143,18 +146,19 @@ protected: static void onGoToLandmarkDialog(S32 option,void* userdata); void flyToLandmark(); void teleportToLandmark(); - void setLandmarkVisited(); + void setLandmarkVisited(); void buildAvatarIDList(); void flyToAvatar(); void teleportToAvatar(); static void updateSearchEnabled( LLUICtrl* ctrl, void* userdata ); + static void onLocationFocusChanged( LLFocusableElement* ctrl, void* userdata ); static void onLocationCommit( void* userdata ); static void onCommitLocation( LLUICtrl* ctrl, void* userdata ); static void onCommitSearchResult( LLUICtrl* ctrl, void* userdata ); - void cacheLandmarkPosition(); + void cacheLandmarkPosition(); protected: LLTabContainerCommon* mTabs; @@ -165,7 +169,7 @@ protected: LLDynamicArray mLandmarkAssetIDList; LLDynamicArray mLandmarkItemIDList; - BOOL mHasLandmarkPosition; + BOOL mHasLandmarkPosition; static const LLUUID sHomeID; diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index 7768105..ca3c9c1 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -94,7 +94,7 @@ void copy_selected_item(void* user_data); void open_selected_items(void* user_data); void properties_selected_items(void* user_data); void paste_items(void* user_data); -void renamer_focus_lost( LLUICtrl* handler, void* user_data ); +void renamer_focus_lost( LLFocusableElement* handler, void* user_data ); ///---------------------------------------------------------------------------- /// Class LLFolderViewItem @@ -696,7 +696,7 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) // Release keyboard focus, so that if stuff is dropped into the // world, pressing the delete key won't blow away the inventory // item. - gViewerWindow->setKeyboardFocus(NULL, NULL); + gViewerWindow->setKeyboardFocus(NULL); return gToolDragAndDrop->handleHover( x, y, mask ); } @@ -3193,7 +3193,7 @@ void LLFolderView::draw() } if(gViewerWindow->hasKeyboardFocus(this) && !getVisible()) { - gViewerWindow->setKeyboardFocus( NULL, NULL ); + gViewerWindow->setKeyboardFocus( NULL ); } // while dragging, update selection rendering to reflect single/multi drag status @@ -3685,7 +3685,7 @@ void LLFolderView::startRenamingSelectedItem( void ) mRenamer->setVisible( TRUE ); // set focus will fail unless item is visible mRenamer->setFocus( TRUE ); - mRenamer->setFocusLostCallback(renamer_focus_lost); + mRenamer->setLostTopCallback(onRenamerLost); gViewerWindow->setTopCtrl( mRenamer ); } } @@ -3710,7 +3710,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) // SL-51858: Key presses are not being passed to the Popup menu. // A proper fix is non-trivial so instead just close the menu. LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle); - if (menu->isOpen()) + if (menu && menu->isOpen()) { LLMenuGL::sMenuContainer->hideMenus(); } @@ -3759,7 +3759,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) { if( gViewerWindow->childHasKeyboardFocus( this ) ) { - gViewerWindow->setKeyboardFocus( NULL, NULL ); + gViewerWindow->setKeyboardFocus( NULL ); } } mSearchString.clear(); @@ -3950,6 +3950,14 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_pare BOOL handled = FALSE; if (gFocusMgr.childHasKeyboardFocus(getRoot())) { + // SL-51858: Key presses are not being passed to the Popup menu. + // A proper fix is non-trivial so instead just close the menu. + LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle); + if (menu && menu->isOpen()) + { + LLMenuGL::sMenuContainer->hideMenus(); + } + //do text search if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout")) { @@ -4459,12 +4467,10 @@ bool LLInventorySort::operator()(LLFolderViewItem* a, LLFolderViewItem* b) } } -void renamer_focus_lost( LLUICtrl* ctrl, void* userdata) +//static +void LLFolderView::onRenamerLost( LLUICtrl* renamer, void* user_data) { - if( ctrl ) - { - ctrl->setVisible( FALSE ); - } + renamer->setVisible(FALSE); } void delete_selected_item(void* user_data) diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h index 6308eca..062f710 100644 --- a/linden/indra/newview/llfolderview.h +++ b/linden/indra/newview/llfolderview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -879,6 +879,8 @@ protected: LLScrollableContainerView* mScrollContainer; // NULL if this is not a child of a scroll container. static void commitRename( LLUICtrl* renamer, void* user_data ); + static void onRenamerLost( LLUICtrl* renamer, void* user_data); + void finishRenamingItem( void ); void revertRenamingItem( void ); diff --git a/linden/indra/newview/llfollowcam.cpp b/linden/indra/newview/llfollowcam.cpp index 58bdd95..0fc0661 100644 --- a/linden/indra/newview/llfollowcam.cpp +++ b/linden/indra/newview/llfollowcam.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llfollowcam.h b/linden/indra/newview/llfollowcam.h index 3748efc..390dbb6 100644 --- a/linden/indra/newview/llfollowcam.h +++ b/linden/indra/newview/llfollowcam.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llframestats.cpp b/linden/indra/newview/llframestats.cpp index 728c150..26a1960 100644 --- a/linden/indra/newview/llframestats.cpp +++ b/linden/indra/newview/llframestats.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llframestats.h b/linden/indra/newview/llframestats.h index 10d2323..d54d409 100644 --- a/linden/indra/newview/llframestats.h +++ b/linden/indra/newview/llframestats.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llframestatview.cpp b/linden/indra/newview/llframestatview.cpp index 390c6f6..416bf26 100644 --- a/linden/indra/newview/llframestatview.cpp +++ b/linden/indra/newview/llframestatview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llframestatview.h b/linden/indra/newview/llframestatview.h index 8e278ee..e72cdc4 100644 --- a/linden/indra/newview/llframestatview.h +++ b/linden/indra/newview/llframestatview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llgenepool.cpp b/linden/indra/newview/llgenepool.cpp index 2370d1d..9974aa8 100644 --- a/linden/indra/newview/llgenepool.cpp +++ b/linden/indra/newview/llgenepool.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llgenepool.h b/linden/indra/newview/llgenepool.h index 920d395..53d969e 100644 --- a/linden/indra/newview/llgenepool.h +++ b/linden/indra/newview/llgenepool.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llgesturemgr.cpp b/linden/indra/newview/llgesturemgr.cpp index dd79397..3be5d4e 100644 --- a/linden/indra/newview/llgesturemgr.cpp +++ b/linden/indra/newview/llgesturemgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -1006,14 +1006,20 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); } + // Get missing gesture's name. Use UUID if name can't be found. + LLStringBase::format_map_t args; + LLInventoryItem *item = gInventory.getItem( item_id ); + args["[NAME]"] = item ? item->getName() : LLString( item_id.asString() ); + + if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifyBox::showXml("GestureMissing"); + LLNotifyBox::showXml("GestureMissing", args); } else { - LLNotifyBox::showXml("UnableToLoadGesture"); + LLNotifyBox::showXml("UnableToLoadGesture", args); } llwarns << "Problem loading gesture: " << status << llendl; diff --git a/linden/indra/newview/llgesturemgr.h b/linden/indra/newview/llgesturemgr.h index 804b98c..b1e6555 100644 --- a/linden/indra/newview/llgesturemgr.h +++ b/linden/indra/newview/llgesturemgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llgivemoney.cpp b/linden/indra/newview/llgivemoney.cpp index 0f96549..6b2b5bd 100644 --- a/linden/indra/newview/llgivemoney.cpp +++ b/linden/indra/newview/llgivemoney.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llgivemoney.h b/linden/indra/newview/llgivemoney.h index 8304959..ab4da19 100644 --- a/linden/indra/newview/llgivemoney.h +++ b/linden/indra/newview/llgivemoney.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp index 8c3bde9..6c2d34a 100644 --- a/linden/indra/newview/llglsandbox.cpp +++ b/linden/indra/newview/llglsandbox.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llglslshader.cpp b/linden/indra/newview/llglslshader.cpp index cbc1799..98f33e6 100644 --- a/linden/indra/newview/llglslshader.cpp +++ b/linden/indra/newview/llglslshader.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llglslshader.h b/linden/indra/newview/llglslshader.h index 0a0dece..0bd90c3 100644 --- a/linden/indra/newview/llglslshader.h +++ b/linden/indra/newview/llglslshader.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llgroupmgr.cpp b/linden/indra/newview/llgroupmgr.cpp index 8d2b507..0dd8c6d 100644 --- a/linden/indra/newview/llgroupmgr.cpp +++ b/linden/indra/newview/llgroupmgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -867,6 +867,12 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) llinfos << "Received null group member data." << llendl; } } + + //if group members are loaded while titles are missing, load the titles. + if(group_datap->mTitles.size() < 1) + { + gGroupMgr->sendGroupTitlesRequest(group_id); + } } if (group_datap->mMembers.size() == (U32)group_datap->mMemberCount) diff --git a/linden/indra/newview/llgroupmgr.h b/linden/indra/newview/llgroupmgr.h index 332b619..7cef5ec 100644 --- a/linden/indra/newview/llgroupmgr.h +++ b/linden/indra/newview/llgroupmgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llgroupnotify.cpp b/linden/indra/newview/llgroupnotify.cpp index eb45d7b..e6f535f 100644 --- a/linden/indra/newview/llgroupnotify.cpp +++ b/linden/indra/newview/llgroupnotify.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -229,7 +229,7 @@ LLGroupNotifyBox::LLGroupNotifyBox(const char* subject, text->setCursor(0,0); text->setEnabled(FALSE); text->setWordWrap(TRUE); - text->setTakesFocus(TRUE); // Allow focus so text can be copied. Since it's not enabled, it will be read-only + text->setTabStop(FALSE); text->setTabToNextField(TRUE); text->setMouseOpaque(TRUE); text->setBorderVisible(TRUE); diff --git a/linden/indra/newview/llgroupnotify.h b/linden/indra/newview/llgroupnotify.h index 3aadf1a..9bc58f9 100644 --- a/linden/indra/newview/llgroupnotify.h +++ b/linden/indra/newview/llgroupnotify.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhippo.cpp b/linden/indra/newview/llhippo.cpp index 0622b3c..27c27e8 100644 --- a/linden/indra/newview/llhippo.cpp +++ b/linden/indra/newview/llhippo.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhippo.h b/linden/indra/newview/llhippo.h index 4aa57eb..ba39595 100644 --- a/linden/indra/newview/llhippo.h +++ b/linden/indra/newview/llhippo.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp index d1648d1..cadd11a 100644 --- a/linden/indra/newview/llhoverview.cpp +++ b/linden/indra/newview/llhoverview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhoverview.h b/linden/indra/newview/llhoverview.h index ad6a25e..ee41f88 100644 --- a/linden/indra/newview/llhoverview.h +++ b/linden/indra/newview/llhoverview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudconnector.cpp b/linden/indra/newview/llhudconnector.cpp index d97c870..2dce48c 100644 --- a/linden/indra/newview/llhudconnector.cpp +++ b/linden/indra/newview/llhudconnector.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudconnector.h b/linden/indra/newview/llhudconnector.h index 1a92d66..3ca4725 100644 --- a/linden/indra/newview/llhudconnector.h +++ b/linden/indra/newview/llhudconnector.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffect.cpp b/linden/indra/newview/llhudeffect.cpp index b326422..0a3e6c7 100644 --- a/linden/indra/newview/llhudeffect.cpp +++ b/linden/indra/newview/llhudeffect.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffect.h b/linden/indra/newview/llhudeffect.h index 882fcd6..ff857cc 100644 --- a/linden/indra/newview/llhudeffect.h +++ b/linden/indra/newview/llhudeffect.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffectbeam.cpp b/linden/indra/newview/llhudeffectbeam.cpp index 0f8a004..4918946 100644 --- a/linden/indra/newview/llhudeffectbeam.cpp +++ b/linden/indra/newview/llhudeffectbeam.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffectbeam.h b/linden/indra/newview/llhudeffectbeam.h index 0b8070a..8595439 100644 --- a/linden/indra/newview/llhudeffectbeam.h +++ b/linden/indra/newview/llhudeffectbeam.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index a24e333..207946d 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffectlookat.h b/linden/indra/newview/llhudeffectlookat.h index 263ba6b..4e5e77f 100644 --- a/linden/indra/newview/llhudeffectlookat.h +++ b/linden/indra/newview/llhudeffectlookat.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffectpointat.cpp b/linden/indra/newview/llhudeffectpointat.cpp index 6a41fd0..cd3077a 100644 --- a/linden/indra/newview/llhudeffectpointat.cpp +++ b/linden/indra/newview/llhudeffectpointat.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffectpointat.h b/linden/indra/newview/llhudeffectpointat.h index 2001ee7..f9d864e 100644 --- a/linden/indra/newview/llhudeffectpointat.h +++ b/linden/indra/newview/llhudeffectpointat.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffecttrail.cpp b/linden/indra/newview/llhudeffecttrail.cpp index 04ac130..85b103f 100644 --- a/linden/indra/newview/llhudeffecttrail.cpp +++ b/linden/indra/newview/llhudeffecttrail.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudeffecttrail.h b/linden/indra/newview/llhudeffecttrail.h index 3f48ecd..3bb0f92 100644 --- a/linden/indra/newview/llhudeffecttrail.h +++ b/linden/indra/newview/llhudeffecttrail.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudicon.cpp b/linden/indra/newview/llhudicon.cpp index 078c6ed..2124827 100644 --- a/linden/indra/newview/llhudicon.cpp +++ b/linden/indra/newview/llhudicon.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudicon.h b/linden/indra/newview/llhudicon.h index 2f99367..b879776 100644 --- a/linden/indra/newview/llhudicon.h +++ b/linden/indra/newview/llhudicon.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudmanager.cpp b/linden/indra/newview/llhudmanager.cpp index ddd0e16..5810cd2 100644 --- a/linden/indra/newview/llhudmanager.cpp +++ b/linden/indra/newview/llhudmanager.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudmanager.h b/linden/indra/newview/llhudmanager.h index 18a6375..881e744 100644 --- a/linden/indra/newview/llhudmanager.h +++ b/linden/indra/newview/llhudmanager.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudobject.cpp b/linden/indra/newview/llhudobject.cpp index 7611cc4..4c27211 100644 --- a/linden/indra/newview/llhudobject.cpp +++ b/linden/indra/newview/llhudobject.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudobject.h b/linden/indra/newview/llhudobject.h index 06c8739..277b59a 100644 --- a/linden/indra/newview/llhudobject.h +++ b/linden/indra/newview/llhudobject.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudrender.cpp b/linden/indra/newview/llhudrender.cpp index c5c2f22..a803b0e 100644 --- a/linden/indra/newview/llhudrender.cpp +++ b/linden/indra/newview/llhudrender.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudrender.h b/linden/indra/newview/llhudrender.h index 09eed5f..6e6fae2 100644 --- a/linden/indra/newview/llhudrender.h +++ b/linden/indra/newview/llhudrender.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp index fb786d1..7515a1b 100644 --- a/linden/indra/newview/llhudtext.cpp +++ b/linden/indra/newview/llhudtext.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudtext.h b/linden/indra/newview/llhudtext.h index e57f2b5..47dc5a7 100644 --- a/linden/indra/newview/llhudtext.h +++ b/linden/indra/newview/llhudtext.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llhudview.cpp b/linden/indra/newview/llhudview.cpp index 94e46e5..7a54623 100644 --- a/linden/indra/newview/llhudview.cpp +++ b/linden/indra/newview/llhudview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -52,8 +52,8 @@ LLHUDView *gHUDView = NULL; const S32 HUD_ARROW_SIZE = 32; -LLHUDView::LLHUDView(const std::string& name, const LLRect& rect) -: LLView(name, rect, FALSE) +LLHUDView::LLHUDView() +: LLPanel() { } LLHUDView::~LLHUDView() diff --git a/linden/indra/newview/llhudview.h b/linden/indra/newview/llhudview.h index 2233fb9..cfe8899 100644 --- a/linden/indra/newview/llhudview.h +++ b/linden/indra/newview/llhudview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -32,16 +32,16 @@ #ifndef LL_LLHUDVIEW_H #define LL_LLHUDVIEW_H -#include "llview.h" +#include "llpanel.h" #include "v4color.h" class LLVector3d; class LLHUDView -: public LLView +: public LLPanel { public: - LLHUDView(const std::string& name, const LLRect& rect); + LLHUDView(); virtual ~LLHUDView(); virtual EWidgetType getWidgetType() const; diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index 2307912..b80b80b 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -63,6 +63,7 @@ #include "llviewerstats.h" #include "llviewercontrol.h" #include "llvieweruictrlfactory.h" +#include "llviewerwindow.h" #include "lllogchat.h" #include "llfloaterhtml.h" #include "llweb.h" @@ -92,10 +93,14 @@ static LLString sSessionStartString = "Starting session with [NAME] please wait. LLVoiceChannel::voice_channel_map_t LLVoiceChannel::sVoiceChannelMap; LLVoiceChannel::voice_channel_map_uri_t LLVoiceChannel::sVoiceChannelURIMap; LLVoiceChannel* LLVoiceChannel::sCurrentVoiceChannel = NULL; +LLVoiceChannel* LLVoiceChannel::sSuspendedVoiceChannel = NULL; -void session_starter_helper(const LLUUID& temp_session_id, - const LLUUID& other_participant_id, - EInstantMessage im_type) +BOOL LLVoiceChannel::sSuspended = FALSE; + +void session_starter_helper( + const LLUUID& temp_session_id, + const LLUUID& other_participant_id, + EInstantMessage im_type) { LLMessageSystem *msg = gMessageSystem; @@ -122,47 +127,111 @@ void session_starter_helper(const LLUUID& temp_session_id, msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); } +void start_deprecated_conference_chat( + const LLUUID& temp_session_id, + const LLUUID& creator_id, + const LLUUID& other_participant_id, + const LLSD& agents_to_invite) +{ + U8* bucket; + U8* pos; + S32 count; + S32 bucket_size; + + // *FIX: this could suffer from endian issues + count = agents_to_invite.size(); + bucket_size = UUID_BYTES * count; + bucket = new U8[bucket_size]; + pos = bucket; + + for(S32 i = 0; i < count; ++i) + { + LLUUID agent_id = agents_to_invite[i].asUUID(); + + memcpy(pos, &agent_id, UUID_BYTES); + pos += UUID_BYTES; + } + + session_starter_helper( + temp_session_id, + other_participant_id, + IM_SESSION_CONFERENCE_START); + + gMessageSystem->addBinaryDataFast( + _PREHASH_BinaryBucket, + bucket, + bucket_size); + + gAgent.sendReliableMessage(); + + delete[] bucket; +} + +class LLStartConferenceChatResponder : public LLHTTPClient::Responder +{ +public: + LLStartConferenceChatResponder( + const LLUUID& temp_session_id, + const LLUUID& creator_id, + const LLUUID& other_participant_id, + const LLSD& agents_to_invite) + { + mTempSessionID = temp_session_id; + mCreatorID = creator_id; + mOtherParticipantID = other_participant_id; + mAgents = agents_to_invite; + } + + virtual void error(U32 statusNum, const std::string& reason) + { + //try an "old school" way. + if ( statusNum == 400 ) + { + start_deprecated_conference_chat( + mTempSessionID, + mCreatorID, + mOtherParticipantID, + mAgents); + } + + //else throw an error back to the client? + //in theory we should have just have these error strings + //etc. set up in this file as opposed to the IMMgr, + //but the error string were unneeded here previously + //and it is not worth the effort switching over all + //the possible different language translations + } + +private: + LLUUID mTempSessionID; + LLUUID mCreatorID; + LLUUID mOtherParticipantID; + + LLSD mAgents; +}; + // Returns true if any messages were sent, false otherwise. // Is sort of equivalent to "does the server need to do anything?" -bool send_start_session_messages(const LLUUID& temp_session_id, - const LLUUID& other_participant_id, - const LLDynamicArray& ids, - EInstantMessage dialog) +bool send_start_session_messages( + const LLUUID& temp_session_id, + const LLUUID& other_participant_id, + const LLDynamicArray& ids, + EInstantMessage dialog) { - if ( (dialog == IM_SESSION_GROUP_START) || - (dialog == IM_SESSION_CONFERENCE_START) ) + if ( dialog == IM_SESSION_GROUP_START ) { - S32 count = ids.size(); - S32 bucket_size = UUID_BYTES * count; - U8* bucket; - U8* pos; - - session_starter_helper(temp_session_id, - other_participant_id, - dialog); + session_starter_helper( + temp_session_id, + other_participant_id, + dialog); switch(dialog) { case IM_SESSION_GROUP_START: - gMessageSystem->addBinaryDataFast(_PREHASH_BinaryBucket, - EMPTY_BINARY_BUCKET, - EMPTY_BINARY_BUCKET_SIZE); - break; - case IM_SESSION_CONFERENCE_START: - bucket = new U8[bucket_size]; - pos = bucket; - - // *FIX: this could suffer from endian issues - for(S32 i = 0; i < count; ++i) - { - memcpy(pos, &(ids.get(i)), UUID_BYTES); - pos += UUID_BYTES; - } - gMessageSystem->addBinaryDataFast(_PREHASH_BinaryBucket, - bucket, - bucket_size); - delete[] bucket; - + gMessageSystem->addBinaryDataFast( + _PREHASH_BinaryBucket, + EMPTY_BINARY_BUCKET, + EMPTY_BINARY_BUCKET_SIZE); break; default: break; @@ -171,6 +240,44 @@ bool send_start_session_messages(const LLUUID& temp_session_id, return true; } + else if ( dialog == IM_SESSION_CONFERENCE_START ) + { + LLSD agents; + for (int i = 0; i < (S32) ids.size(); i++) + { + agents.append(ids.get(i)); + } + + //we have a new way of starting conference calls now + LLViewerRegion* region = gAgent.getRegion(); + if (region) + { + std::string url = region->getCapability( + "ChatSessionRequest"); + LLSD data; + data["method"] = "start conference"; + data["session-id"] = temp_session_id; + + data["params"] = agents; + + LLHTTPClient::post( + url, + data, + new LLStartConferenceChatResponder( + temp_session_id, + gAgent.getID(), + other_participant_id, + data["params"])); + } + else + { + start_deprecated_conference_chat( + temp_session_id, + gAgent.getID(), + other_participant_id, + agents); + } + } return false; } @@ -194,8 +301,21 @@ void LLVoiceCallCapResponder::error(U32 status, const std::string& reason) << status << ": " << reason << ")" << llendl; LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID); - if (channelp) + if ( channelp ) { + if ( 403 == status ) + { + //403 == no ability + LLNotifyBox::showXml( + "VoiceNotAllowed", + channelp->getNotifyArgs()); + } + else + { + LLNotifyBox::showXml( + "VoiceCallGenericError", + channelp->getNotifyArgs()); + } channelp->deactivate(); } } @@ -242,10 +362,6 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const LLString& session LLVoiceChannel::~LLVoiceChannel() { - // CANNOT do this here, since it will crash on quit in the LLVoiceChannelProximal singleton destructor. - // Do it in all other subclass destructors instead. - // deactivate(); - // Don't use LLVoiceClient::getInstance() here -- this can get called during atexit() time and that singleton MAY have already been destroyed. if(gVoiceClient) { @@ -266,7 +382,19 @@ void LLVoiceChannel::setChannelInfo( if (mState == STATE_NO_CHANNEL_INFO) { - if(!mURI.empty() && !mCredentials.empty()) + if (mURI.empty()) + { + LLNotifyBox::showXml("VoiceChannelJoinFailed", mNotifyArgs); + llwarns << "Received empty URI for channel " << mSessionName << llendl; + deactivate(); + } + else if (mCredentials.empty()) + { + LLNotifyBox::showXml("VoiceChannelJoinFailed", mNotifyArgs); + llwarns << "Received empty credentials for channel " << mSessionName << llendl; + deactivate(); + } + else { setState(STATE_READY); @@ -279,12 +407,6 @@ void LLVoiceChannel::setChannelInfo( activate(); } } - else - { - //*TODO: notify user - llwarns << "Received invalid credentials for channel " << mSessionName << llendl; - deactivate(); - } } } @@ -325,7 +447,7 @@ void LLVoiceChannel::handleStatusChange(EStatusType type) } break; case STATUS_LEFT_CHANNEL: - if (callStarted() && !mIgnoreNextSessionLeave) + if (callStarted() && !mIgnoreNextSessionLeave && !sSuspended) { // if forceably removed from channel // update the UI and revert to default channel @@ -496,6 +618,38 @@ void LLVoiceChannel::initClass() sCurrentVoiceChannel = LLVoiceChannelProximal::getInstance(); } + +//static +void LLVoiceChannel::suspend() +{ + if (!sSuspended) + { + sSuspendedVoiceChannel = sCurrentVoiceChannel; + sSuspended = TRUE; + } +} + +//static +void LLVoiceChannel::resume() +{ + if (sSuspended) + { + if (gVoiceClient->voiceEnabled()) + { + if (sSuspendedVoiceChannel) + { + sSuspendedVoiceChannel->activate(); + } + else + { + LLVoiceChannelProximal::getInstance()->activate(); + } + } + sSuspended = FALSE; + } +} + + // // LLVoiceChannelGroup // @@ -507,11 +661,6 @@ LLVoiceChannelGroup::LLVoiceChannelGroup(const LLUUID& session_id, const LLStrin mIsRetrying = FALSE; } -LLVoiceChannelGroup::~LLVoiceChannelGroup() -{ - deactivate(); -} - void LLVoiceChannelGroup::deactivate() { if (callStarted()) @@ -635,6 +784,7 @@ void LLVoiceChannelGroup::handleError(EStatusType status) } break; + case ERROR_UNKNOWN: default: break; @@ -677,11 +827,6 @@ LLVoiceChannelProximal::LLVoiceChannelProximal() : activate(); } -LLVoiceChannelProximal::~LLVoiceChannelProximal() -{ - // DO NOT call deactivate() here, since this will only happen at atexit() time. -} - BOOL LLVoiceChannelProximal::isActive() { return callStarted() && LLVoiceClient::getInstance()->inProximalChannel(); @@ -725,6 +870,9 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status) case STATUS_LEFT_CHANNEL: // do not notify user when leaving proximal channel return; + case STATUS_VOICE_DISABLED: + gIMMgr->addSystemMessage(LLUUID::null, "unavailable", mNotifyArgs); + return; default: break; } @@ -762,29 +910,26 @@ void LLVoiceChannelProximal::deactivate() } } + // // LLVoiceChannelP2P // LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const LLString& session_name, const LLUUID& other_user_id) : LLVoiceChannelGroup(session_id, session_name), - mOtherUserID(other_user_id) + mOtherUserID(other_user_id), + mReceivedCall(FALSE) { // make sure URI reflects encoded version of other user's agent id setURI(LLVoiceClient::getInstance()->sipURIFromID(other_user_id)); } -LLVoiceChannelP2P::~LLVoiceChannelP2P() -{ - deactivate(); -} - void LLVoiceChannelP2P::handleStatusChange(EStatusType type) { // status updates switch(type) { case STATUS_LEFT_CHANNEL: - if (callStarted() && !mIgnoreNextSessionLeave) + if (callStarted() && !mIgnoreNextSessionLeave && !sSuspended) { if (mState == STATE_RINGING) { @@ -832,6 +977,7 @@ void LLVoiceChannelP2P::activate() // no session handle yet, we're starting the call if (mSessionHandle.empty()) { + mReceivedCall = FALSE; LLVoiceClient::getInstance()->callUser(mOtherUserID); } // otherwise answering the call @@ -879,24 +1025,37 @@ void LLVoiceChannelP2P::setSessionHandle(const LLString& handle) mSessionHandle = handle; // The URI of a p2p session should always be the other end's SIP URI. setURI(LLVoiceClient::getInstance()->sipURIFromID(mOtherUserID)); - + mReceivedCall = TRUE; + if (needs_activate) { activate(); } } +void LLVoiceChannelP2P::setState(EState state) +{ + // you only "answer" voice invites in p2p mode + // so provide a special purpose message here + if (mReceivedCall && state == STATE_RINGING) + { + gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); + mState = state; + return; + } + LLVoiceChannel::setState(state); +} + + // // LLFloaterIMPanel // LLFloaterIMPanel::LLFloaterIMPanel( - const std::string& name, - const LLRect& rect, const std::string& session_label, const LLUUID& session_id, const LLUUID& other_participant_id, EInstantMessage dialog) : - LLFloater(name, rect, session_label), + LLFloater(session_label, LLRect(), session_label), mInputEditor(NULL), mHistoryEditor(NULL), mSessionUUID(session_id), @@ -909,6 +1068,7 @@ LLFloaterIMPanel::LLFloaterIMPanel( mOtherTyping(FALSE), mTypingLineStartIndex(0), mSentTypingState(TRUE), + mNumUnreadMessages(0), mShowSpeakersOnConnect(TRUE), mAutoConnect(FALSE), mSpeakerPanel(NULL), @@ -919,14 +1079,12 @@ LLFloaterIMPanel::LLFloaterIMPanel( } LLFloaterIMPanel::LLFloaterIMPanel( - const std::string& name, - const LLRect& rect, const std::string& session_label, const LLUUID& session_id, const LLUUID& other_participant_id, const LLDynamicArray& ids, EInstantMessage dialog) : - LLFloater(name, rect, session_label), + LLFloater(session_label, LLRect(), session_label), mInputEditor(NULL), mHistoryEditor(NULL), mSessionUUID(session_id), @@ -952,13 +1110,15 @@ LLFloaterIMPanel::LLFloaterIMPanel( void LLFloaterIMPanel::init(const LLString& session_label) { + mSessionLabel = session_label; + LLString xml_filename; switch(mDialog) { case IM_SESSION_GROUP_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); xml_filename = "floater_instant_message_group.xml"; - mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, session_label); + mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_INVITE: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); @@ -970,21 +1130,21 @@ void LLFloaterIMPanel::init(const LLString& session_label) { xml_filename = "floater_instant_message_ad_hoc.xml"; } - mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, session_label); + mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_P2P_INVITE: xml_filename = "floater_instant_message.xml"; - mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, session_label, mOtherParticipantUUID); + mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, mSessionLabel, mOtherParticipantUUID); break; case IM_SESSION_CONFERENCE_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); xml_filename = "floater_instant_message_ad_hoc.xml"; - mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, session_label); + mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; // just received text from another user case IM_NOTHING_SPECIAL: xml_filename = "floater_instant_message.xml"; - mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, session_label, mOtherParticipantUUID); + mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, mSessionLabel, mOtherParticipantUUID); break; default: llwarns << "Unknown session type" << llendl; @@ -999,15 +1159,14 @@ void LLFloaterIMPanel::init(const LLString& session_label) &getFactoryMap(), FALSE); - setLabel(session_label); - setTitle(session_label); + setTitle(mSessionLabel); mInputEditor->setMaxTextLength(1023); // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) { - LLLogChat::loadHistory(session_label, + LLLogChat::loadHistory(mSessionLabel, &chatFromLogFile, (void *)this); } @@ -1060,16 +1219,12 @@ BOOL LLFloaterIMPanel::postBuild() { requires("chat_editor", WIDGET_TYPE_LINE_EDITOR); requires("im_history", WIDGET_TYPE_TEXT_EDITOR); - requires("live_help_dialog", WIDGET_TYPE_TEXT_BOX); - requires("title_string", WIDGET_TYPE_TEXT_BOX); - requires("typing_start_string", WIDGET_TYPE_TEXT_BOX); - requires("session_start_string", WIDGET_TYPE_TEXT_BOX); if (checkRequirements()) { mInputEditor = LLUICtrlFactory::getLineEditorByName(this, "chat_editor"); - mInputEditor->setFocusReceivedCallback( onInputEditorFocusReceived ); - mInputEditor->setFocusLostCallback( onInputEditorFocusLost ); + mInputEditor->setFocusReceivedCallback( onInputEditorFocusReceived, this ); + mInputEditor->setFocusLostCallback( onInputEditorFocusLost, this ); mInputEditor->setKeystrokeCallback( onInputEditorKeystroke ); mInputEditor->setCommitCallback( onCommitChat ); mInputEditor->setCallbackUserData(this); @@ -1084,6 +1239,7 @@ BOOL LLFloaterIMPanel::postBuild() childSetAction("send_btn", onClickSend, this); childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); + childSetAction("moderator_kick_speaker", onKickSpeaker, this); //LLButton* close_btn = LLUICtrlFactory::getButtonByName(this, "close_btn"); //close_btn->setClickedCallback(&LLFloaterIMPanel::onClickClose, this); @@ -1094,17 +1250,11 @@ BOOL LLFloaterIMPanel::postBuild() { childSetEnabled("profile_btn", FALSE); } - LLTextBox* title = LLUICtrlFactory::getTextBoxByName(this, "title_string"); - sTitleString = title->getText(); - - LLTextBox* typing_start = LLUICtrlFactory::getTextBoxByName(this, "typing_start_string"); - - sTypingStartString = typing_start->getText(); - - LLTextBox* session_start = LLUICtrlFactory::getTextBoxByName( - this, - "session_start_string"); - sSessionStartString = session_start->getText(); + + sTitleString = getFormattedUIString("title_string"); + sTypingStartString = getFormattedUIString("typing_start_string"); + sSessionStartString = getFormattedUIString("session_start_string"); + if (mSpeakerPanel) { mSpeakerPanel->refreshSpeakers(); @@ -1112,7 +1262,7 @@ BOOL LLFloaterIMPanel::postBuild() if (mDialog == IM_NOTHING_SPECIAL) { - childSetCommitCallback("mute_btn", onClickMuteVoice, this); + childSetAction("mute_btn", onClickMuteVoice, this); childSetCommitCallback("speaker_volume", onVolumeChange, this); } @@ -1131,7 +1281,7 @@ void* LLFloaterIMPanel::createSpeakersPanel(void* data) } //static -void LLFloaterIMPanel::onClickMuteVoice(LLUICtrl* source, void* user_data) +void LLFloaterIMPanel::onClickMuteVoice(void* user_data) { LLFloaterIMPanel* floaterp = (LLFloaterIMPanel*)user_data; if (floaterp) @@ -1171,10 +1321,22 @@ void LLFloaterIMPanel::draw() && LLVoiceClient::voiceEnabled(); // hide/show start call and end call buttons - childSetVisible("end_call_btn", mVoiceChannel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); - childSetVisible("start_call_btn", mVoiceChannel->getState() < LLVoiceChannel::STATE_CALL_STARTED); + childSetVisible("end_call_btn", LLVoiceClient::voiceEnabled() && mVoiceChannel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); + childSetVisible("start_call_btn", LLVoiceClient::voiceEnabled() && mVoiceChannel->getState() < LLVoiceChannel::STATE_CALL_STARTED); childSetEnabled("start_call_btn", enable_connect); childSetEnabled("send_btn", !childGetValue("chat_editor").asString().empty()); + + LLPointer self_speaker = mSpeakers->findSpeaker(gAgent.getID()); + if (self_speaker.notNull() && self_speaker->mModeratorMutedText) + { + mInputEditor->setEnabled(FALSE); + mInputEditor->setLabel(getFormattedUIString("muted_text_label")); + } + else + { + mInputEditor->setEnabled(TRUE); + mInputEditor->setLabel(getFormattedUIString("default_text_label")); + } if (mAutoConnect && enable_connect) { @@ -1215,11 +1377,11 @@ void LLFloaterIMPanel::draw() else { // refresh volume and mute checkbox - childSetEnabled("speaker_volume", mVoiceChannel->isActive()); + childSetVisible("speaker_volume", LLVoiceClient::voiceEnabled() && mVoiceChannel->isActive()); childSetValue("speaker_volume", gVoiceClient->getUserVolume(mOtherParticipantUUID)); childSetValue("mute_btn", gMuteListp->isMuted(mOtherParticipantUUID, LLMute::flagVoiceChat)); - childSetEnabled("mute_btn", mVoiceChannel->isActive()); + childSetVisible("mute_btn", LLVoiceClient::voiceEnabled() && mVoiceChannel->isActive()); } LLFloater::draw(); } @@ -1235,7 +1397,6 @@ public: void error(U32 statusNum, const std::string& reason) { llinfos << "Error inviting all agents to session" << llendl; - //throw something back to the viewer here? } @@ -1272,8 +1433,8 @@ BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray& ids) LLHTTPClient::post( url, data, - new LLSessionInviteResponder(mSessionUUID)); - + new LLSessionInviteResponder( + mSessionUUID)); } else { @@ -1289,6 +1450,15 @@ BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray& ids) void LLFloaterIMPanel::addHistoryLine(const LLUUID& source, const std::string &utf8msg, const LLColor4& color, bool log_to_file) { + // start tab flashing when receiving im for background session from user + LLMultiFloater* hostp = getHost(); + if( !isInVisibleChain() + && hostp + && source != gAgent.getID()) + { + hostp->setFloaterFlashing(this, TRUE); + } + addHistoryLine(utf8msg, color, log_to_file); mSpeakers->speakerChatted(source); mSpeakers->setSpeakerTyping(source, FALSE); @@ -1296,14 +1466,6 @@ void LLFloaterIMPanel::addHistoryLine(const LLUUID& source, const std::string &u void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4& color, bool log_to_file) { - LLMultiFloater* hostp = getHost(); - if( !getVisible() && hostp && log_to_file) - { - // Only flash for logged ("real") messages - LLTabContainer* parent = (LLTabContainer*) getParent(); - parent->setTabPanelFlashing( this, TRUE ); - } - // Now we're adding the actual line of text, so erase the // "Foo is typing..." text segment, and the optional timestamp // if it was present. JC @@ -1330,6 +1492,11 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 LLLogChat::saveHistory(getTitle(),histstr); } + + if (!isInVisibleChain()) + { + mNumUnreadMessages++; + } } @@ -1340,10 +1507,7 @@ void LLFloaterIMPanel::setVisible(BOOL b) LLMultiFloater* hostp = getHost(); if( b && hostp ) { - LLTabContainer* parent = (LLTabContainer*) getParent(); - - // When this tab is displayed, you can stop flashing. - parent->setTabPanelFlashing( this, FALSE ); + hostp->setFloaterFlashing(this, FALSE); /* Don't change containing floater title - leave it "Instant Message" JC LLUIString title = sTitleString; @@ -1392,7 +1556,7 @@ BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask, BOOL called_from_paren else if ( KEY_ESCAPE == key ) { handled = TRUE; - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); // Close talk panel with escape if( !gSavedSettings.getBOOL("PinTalkViewOpen") ) @@ -1573,14 +1737,14 @@ void LLFloaterIMPanel::onCommitChat(LLUICtrl* caller, void* userdata) } // static -void LLFloaterIMPanel::onInputEditorFocusReceived( LLUICtrl* caller, void* userdata ) +void LLFloaterIMPanel::onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ) { LLFloaterIMPanel* self= (LLFloaterIMPanel*) userdata; self->mHistoryEditor->setCursorAndScrollToEnd(); } // static -void LLFloaterIMPanel::onInputEditorFocusLost(LLUICtrl* caller, void* userdata) +void LLFloaterIMPanel::onInputEditorFocusLost(LLFocusableElement* caller, void* userdata) { LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; self->setTyping(FALSE); @@ -1628,6 +1792,14 @@ void LLFloaterIMPanel::onClose(bool app_quitting) destroy(); } +void LLFloaterIMPanel::onVisibilityChange(BOOL new_visibility) +{ + if (new_visibility) + { + mNumUnreadMessages = 0; + } +} + void deliver_message(const std::string& utf8_text, const LLUUID& im_session_id, const LLUUID& other_participant_id, @@ -1739,19 +1911,37 @@ void LLFloaterIMPanel::sendMsg() mSentTypingState = TRUE; } -void LLFloaterIMPanel::updateSpeakersList(LLSD speaker_updates) -{ - mSpeakers->processSpeakerListUpdate(speaker_updates); +void LLFloaterIMPanel::updateSpeakersList(const LLSD& speaker_updates) +{ + mSpeakers->updateSpeakers(speaker_updates); } -void LLFloaterIMPanel::setSpeakersListFromMap(LLSD speaker_map) +void LLFloaterIMPanel::processSessionUpdate(const LLSD& session_update) { - mSpeakers->processSpeakerMap(speaker_map); + if ( + session_update.has("moderated_mode") && + session_update["moderated_mode"].has("voice") ) + { + BOOL voice_moderated = session_update["moderated_mode"]["voice"]; + + if (voice_moderated) + { + setTitle(mSessionLabel + LLString(" ") + getFormattedUIString("moderated_chat_label")); + } + else + { + setTitle(mSessionLabel); + } + + + //update the speakers dropdown too + mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated); + } } -void LLFloaterIMPanel::setSpeakersList(LLSD speaker_list) +void LLFloaterIMPanel::setSpeakers(const LLSD& speaker_list) { - mSpeakers->processSpeakerList(speaker_list); + mSpeakers->setSpeakers(speaker_list); } void LLFloaterIMPanel::sessionInitReplyReceived(const LLUUID& session_id) @@ -1897,5 +2087,83 @@ void LLFloaterIMPanel::chatFromLogFile(LLString line, void* userdata) //self->addHistoryLine(line, LLColor4::grey, FALSE); self->mHistoryEditor->appendColoredText(line, false, true, LLColor4::grey); +} + +void LLFloaterIMPanel::showSessionStartError( + const std::string& error_string) +{ + //the error strings etc. should be really be static and local + //to this file instead of in the LLFloaterIM + //but they were in llimview.cpp first and unfortunately + //some translations into non English languages already occurred + //thus making it a tad harder to change over to a + //"correct" solution. The best solution + //would be to store all of the misc. strings into + //their own XML file which would be read in by any LLIMPanel + //post build function instead of repeating the same info + //in the group, adhoc and normal IM xml files. + LLString::format_map_t args; + args["[REASON]"] = + LLFloaterIM::sErrorStringsMap[error_string]; + args["[RECIPIENT]"] = getTitle(); + + gViewerWindow->alertXml( + "ChatterBoxSessionStartError", + args, + onConfirmForceCloseError, + new LLUUID(mSessionUUID)); +} + +void LLFloaterIMPanel::showSessionEventError( + const std::string& event_string, + const std::string& error_string) +{ + LLString::format_map_t args; + args["[REASON]"] = + LLFloaterIM::sErrorStringsMap[error_string]; + args["[EVENT]"] = + LLFloaterIM::sEventStringsMap[event_string]; + args["[RECIPIENT]"] = getTitle(); + + gViewerWindow->alertXml( + "ChatterBoxSessionEventError", + args); +} + +void LLFloaterIMPanel::showSessionForceClose( + const std::string& reason_string) +{ + LLString::format_map_t args; + + args["[NAME]"] = getTitle(); + args["[REASON]"] = LLFloaterIM::sForceCloseSessionMap[reason_string]; + + gViewerWindow->alertXml( + "ForceCloseChatterBoxSession", + args, + LLFloaterIMPanel::onConfirmForceCloseError, + this); } + +//static +void LLFloaterIMPanel::onKickSpeaker(void* user_data) +{ + +} + +void LLFloaterIMPanel::onConfirmForceCloseError(S32 option, void* data) +{ + //only 1 option really + LLUUID session_id = *((LLUUID*) data); + + if ( gIMMgr ) + { + LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession( + session_id); + + if ( floaterp ) floaterp->close(FALSE); + } +} + + diff --git a/linden/indra/newview/llimpanel.h b/linden/indra/newview/llimpanel.h index 7779344..daa6820 100644 --- a/linden/indra/newview/llimpanel.h +++ b/linden/indra/newview/llimpanel.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -74,14 +74,20 @@ public: virtual void getChannelInfo(); virtual BOOL isActive(); virtual BOOL callStarted(); + + const LLUUID getSessionID() { return mSessionID; } EState getState() { return mState; } void updateSessionID(const LLUUID& new_session_id); + const LLString::format_map_t& getNotifyArgs() { return mNotifyArgs; } static LLVoiceChannel* getChannelByID(const LLUUID& session_id); static LLVoiceChannel* getChannelByURI(LLString uri); static LLVoiceChannel* getCurrentVoiceChannel() { return sCurrentVoiceChannel; } static void initClass(); + + static void suspend(); + static void resume(); protected: virtual void setState(EState state); @@ -103,13 +109,14 @@ protected: static voice_channel_map_uri_t sVoiceChannelURIMap; static LLVoiceChannel* sCurrentVoiceChannel; + static LLVoiceChannel* sSuspendedVoiceChannel; + static BOOL sSuspended; }; class LLVoiceChannelGroup : public LLVoiceChannel { public: LLVoiceChannelGroup(const LLUUID& session_id, const LLString& session_name); - virtual ~LLVoiceChannelGroup(); /*virtual*/ void handleStatusChange(EStatusType status); /*virtual*/ void handleError(EStatusType status); @@ -132,8 +139,7 @@ class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton& ids, @@ -189,8 +194,8 @@ public: // Check typing timeout timer. /*virtual*/ void draw(); - /*virtual*/ void onClose(bool app_quitting = FALSE); + /*virtual*/ void onVisibilityChange(BOOL new_visibility); // add target ids to the session. // Return TRUE if successful, otherwise FALSE. @@ -209,14 +214,16 @@ public: void selectNone(); void setVisible(BOOL b); + S32 getNumUnreadMessages() { return mNumUnreadMessages; } + 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); - static void onInputEditorFocusReceived( LLUICtrl* caller, void* userdata ); - static void onInputEditorFocusLost(LLUICtrl* caller, void* userdata); + static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ); + static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); static void onCommitChat(LLUICtrl* caller, void* userdata); static void onTabClick( void* userdata ); @@ -229,16 +236,17 @@ public: static void onClickSend( void* userdata ); static void onClickToggleActiveSpeakers( void* userdata ); static void* createSpeakersPanel(void* data); + static void onKickSpeaker(void* user_data); //callbacks for P2P muting and volume control - static void onClickMuteVoice(LLUICtrl* source, void* user_data); + static void onClickMuteVoice(void* user_data); static void onVolumeChange(LLUICtrl* source, void* user_data); const LLUUID& getSessionID() const { return mSessionUUID; } const LLUUID& getOtherParticipantID() const { return mOtherParticipantUUID; } - void updateSpeakersList(LLSD speaker_updates); - void setSpeakersListFromMap(LLSD speaker_list); - void setSpeakersList(LLSD speaker_list); + void updateSpeakersList(const LLSD& speaker_updates); + void processSessionUpdate(const LLSD& update); + void setSpeakers(const LLSD& speaker_list); LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; } EInstantMessage getDialogType() const { return mDialog; } @@ -250,6 +258,15 @@ public: void processIMTyping(const LLIMInfo* im_info, BOOL typing); static void chatFromLogFile(LLString line, void* userdata); + //show error statuses to the user + void showSessionStartError(const std::string& error_string); + void showSessionEventError( + const std::string& event_string, + const std::string& error_string); + void showSessionForceClose(const std::string& reason); + + static void onConfirmForceCloseError(S32 option, void* data); + private: // called by constructors void init(const LLString& session_label); @@ -289,6 +306,7 @@ private: // 911 ==> Gaurdian_Angel_Group_ID ^ gAgent.getID() LLUUID mSessionUUID; + LLString mSessionLabel; LLVoiceChannel* mVoiceChannel; BOOL mSessionInitialized; @@ -318,6 +336,8 @@ private: // Where does the "Starting session..." line start? S32 mSessionStartMsgPos; + S32 mNumUnreadMessages; + BOOL mSentTypingState; BOOL mShowSpeakersOnConnect; diff --git a/linden/indra/newview/llimview.cpp b/linden/indra/newview/llimview.cpp index 468c75e..2f9c1eb 100644 --- a/linden/indra/newview/llimview.cpp +++ b/linden/indra/newview/llimview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -46,7 +46,6 @@ #include "llagent.h" #include "llcallingcard.h" #include "llchat.h" -#include "llviewerwindow.h" #include "llresmgr.h" #include "llfloaterchat.h" #include "llfloaterchatterbox.h" @@ -65,6 +64,7 @@ #include "llcallingcard.h" #include "lltoolbar.h" #include "llviewermessage.h" +#include "llviewerwindow.h" #include "llnotify.h" #include "llviewerregion.h" @@ -84,11 +84,12 @@ LLIMMgr* gIMMgr = NULL; //*FIXME: make these all either UIStrings or Strings static LLString sOnlyUserMessage; static LLUIString sOfflineMessage; - -static std::map sEventStringsMap; -static std::map sErrorStringsMap; -static std::map sForceCloseSessionMap; static LLUIString sInviteMessage; + +std::map LLFloaterIM::sEventStringsMap; +std::map LLFloaterIM::sErrorStringsMap; +std::map LLFloaterIM::sForceCloseSessionMap; + // // Helper Functions // @@ -160,22 +161,82 @@ BOOL LLFloaterIM::postBuild() sOnlyUserMessage = getFormattedUIString("only_user_message"); sOfflineMessage = getUIString("offline_message"); - sErrorStringsMap["generic"] = - getFormattedUIString("generic_request_error"); - sErrorStringsMap["unverified"] = - getFormattedUIString("insufficient_perms_error"); - sErrorStringsMap["no_user_911"] = - getFormattedUIString("user_no_help"); + sInviteMessage = getUIString("invite_message"); + + if ( sErrorStringsMap.find("generic") == sErrorStringsMap.end() ) + { + sErrorStringsMap["generic"] = + getFormattedUIString("generic_request_error"); + } + + if ( sErrorStringsMap.find("unverified") == + sErrorStringsMap.end() ) + { + sErrorStringsMap["unverified"] = + getFormattedUIString("insufficient_perms_error"); + } + + if ( sErrorStringsMap.end() == + sErrorStringsMap.find("no_ability") ) + { + sErrorStringsMap["no_ability"] = + getFormattedUIString("no_ability_error"); + } - sEventStringsMap["add"] = - getFormattedUIString("add_session_event"); - sEventStringsMap["message"] = - getFormattedUIString("message_session_event"); + if ( sErrorStringsMap.end() == + sErrorStringsMap.find("muted") ) + { + sErrorStringsMap["muted"] = + getFormattedUIString("muted_error"); + } - sForceCloseSessionMap["removed"] = - getFormattedUIString("removed_from_group"); + if ( sErrorStringsMap.end() == + sErrorStringsMap.find("not_a_moderator") ) + { + sErrorStringsMap["not_a_moderator"] = + getFormattedUIString("not_a_mod_error"); + } + + if ( sErrorStringsMap.end() == + sErrorStringsMap.find("does not exist") ) + { + sErrorStringsMap["does not exist"] = + getFormattedUIString("session_does_not_exist_error"); + } + + if ( sEventStringsMap.end() == sEventStringsMap.find("add") ) + { + sEventStringsMap["add"] = + getFormattedUIString("add_session_event"); + } + + if ( sEventStringsMap.end() == sEventStringsMap.find("message") ) + { + sEventStringsMap["message"] = + getFormattedUIString("message_session_event"); + } + + + if ( sEventStringsMap.end() == sEventStringsMap.find("mute") ) + { + sEventStringsMap["mute"] = getFormattedUIString( + "mute_agent_event"); + } + + if ( sForceCloseSessionMap.end() == + sForceCloseSessionMap.find("removed") ) + { + sForceCloseSessionMap["removed"] = + getFormattedUIString("removed_from_group"); + } + + if ( sForceCloseSessionMap.end() == + sForceCloseSessionMap.find("no ability") ) + { + sForceCloseSessionMap["no ability"] = + getFormattedUIString("close_on_no_ability"); + } - sInviteMessage = getUIString("invite_message"); return TRUE; } @@ -205,21 +266,31 @@ protected: class LLIMMgr::LLIMSessionInvite { public: - LLIMSessionInvite(const LLUUID& session_id, const LLString& session_name, const LLUUID& caller_id,const LLString& caller_name, EInstantMessage type, const LLString& session_handle, const LLString& notify_box) : - mSessionID(session_id), - mSessionName(session_name), - mCallerID(caller_id), - mCallerName(caller_name), - mType(type), - mSessionHandle(session_handle), - mNotifyBox(notify_box) - {}; + LLIMSessionInvite( + const LLUUID& session_id, + const LLString& session_name, + const LLUUID& caller_id, + const LLString& caller_name, + EInstantMessage type, + EInvitationType inv_type, + const LLString& session_handle, + const LLString& notify_box) : + mSessionID(session_id), + mSessionName(session_name), + mCallerID(caller_id), + mCallerName(caller_name), + mType(type), + mInvType(inv_type), + mSessionHandle(session_handle), + mNotifyBox(notify_box) + {}; LLUUID mSessionID; LLString mSessionName; LLUUID mCallerID; LLString mCallerName; EInstantMessage mType; + EInvitationType mInvType; LLString mSessionHandle; LLString mNotifyBox; }; @@ -309,7 +380,7 @@ LLIMMgr::LLIMMgr() : LLFloaterIM* dummy_floater = new LLFloaterIM(); delete dummy_floater; - mPendingVoiceInvitations = LLSD::emptyMap(); + mPendingInvitations = LLSD::emptyMap(); mPendingAgentListUpdates = LLSD::emptyMap(); } @@ -413,7 +484,6 @@ void LLIMMgr::addMessage( if ( is_from_system ) // chat came from system { floater->addHistoryLine( - other_participant_id, msg, gSavedSettings.getColor4("SystemChatColor")); } @@ -521,9 +591,10 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name, // the session, dialog specifies the type of session. If the session // exists, it is brought forward. Specifying id = NULL results in an // im session to everyone. Returns the uuid of the session. -LLUUID LLIMMgr::addSession(const std::string& name, - EInstantMessage dialog, - const LLUUID& other_participant_id) +LLUUID LLIMMgr::addSession( + const std::string& name, + EInstantMessage dialog, + const LLUUID& other_participant_id) { LLUUID session_id = computeSessionID(dialog, other_participant_id); @@ -533,15 +604,16 @@ LLUUID LLIMMgr::addSession(const std::string& name, LLDynamicArray ids; ids.put(other_participant_id); - floater = createFloater(session_id, - other_participant_id, - name, - ids, - dialog, - TRUE); + floater = createFloater( + session_id, + other_participant_id, + name, + ids, + dialog, + TRUE); noteOfflineUsers(floater, ids); - LLFloaterChatterBox::getInstance(LLSD())->showFloater(floater); + LLFloaterChatterBox::showInstance(session_id); } else { @@ -554,36 +626,43 @@ LLUUID LLIMMgr::addSession(const std::string& name, // Adds a session using the given session_id. If the session already exists // the dialog type is assumed correct. Returns the uuid of the session. -LLUUID LLIMMgr::addSession(const std::string& name, - EInstantMessage dialog, - const LLUUID& other_participant_id, - const LLDynamicArray& ids) +LLUUID LLIMMgr::addSession( + const std::string& name, + EInstantMessage dialog, + const LLUUID& other_participant_id, + const LLDynamicArray& ids) { if (0 == ids.getLength()) { return LLUUID::null; } - LLUUID session_id = computeSessionID(dialog, - other_participant_id); + LLUUID session_id = computeSessionID( + dialog, + other_participant_id); LLFloaterIMPanel* floater = findFloaterBySession(session_id); if(!floater) { // On creation, use the first element of ids as the // "other_participant_id" - floater = createFloater(session_id, - other_participant_id, - name, - ids, - dialog, - TRUE); + floater = createFloater( + session_id, + other_participant_id, + name, + ids, + dialog, + TRUE); if ( !floater ) return LLUUID::null; noteOfflineUsers(floater, ids); + LLFloaterChatterBox::showInstance(session_id); + } + else + { + floater->open(); } - LLFloaterChatterBox::getInstance(LLSD())->showFloater(floater); //mTabContainer->selectTabPanel(panel); floater->setInputFocus(TRUE); return floater->getSessionID(); @@ -599,6 +678,9 @@ void LLIMMgr::removeSession(const LLUUID& session_id) mFloaters.erase(floater->getHandle()); LLFloaterChatterBox::getInstance(LLSD())->removeFloater(floater); //mTabContainer->removeTabPanel(floater); + + clearPendingInviation(session_id); + clearPendingAgentListUpdates(session_id); } } @@ -608,9 +690,10 @@ void LLIMMgr::inviteToSession( const LLUUID& caller_id, const LLString& caller_name, EInstantMessage type, + EInvitationType inv_type, const LLString& session_handle) { - //ignore voice invites from voice-muted residents + //ignore invites from muted residents if (gMuteListp->isMuted(caller_id)) { return; @@ -621,17 +704,26 @@ void LLIMMgr::inviteToSession( BOOL ad_hoc_invite = FALSE; if(type == IM_SESSION_P2P_INVITE) { + //P2P is different...they only have voice invitations notify_box_type = "VoiceInviteP2P"; } - else if (gAgent.isInGroup(session_id)) + else if ( gAgent.isInGroup(session_id) ) { + //only really old school groups have voice invitations notify_box_type = "VoiceInviteGroup"; } - else + else if ( inv_type == INVITATION_TYPE_VOICE ) { + //else it's an ad-hoc + //and a voice ad-hoc notify_box_type = "VoiceInviteAdHoc"; ad_hoc_invite = TRUE; } + else if ( inv_type == INVITATION_TYPE_IMMEDIATE ) + { + notify_box_type = "InviteAdHoc"; + ad_hoc_invite = TRUE; + } LLIMSessionInvite* invite = new LLIMSessionInvite( session_id, @@ -639,6 +731,7 @@ void LLIMMgr::inviteToSession( caller_id, caller_name, type, + inv_type, session_handle, notify_box_type); @@ -666,7 +759,7 @@ void LLIMMgr::inviteToSession( } } - if ( !mPendingVoiceInvitations.has(session_id.asString()) ) + if ( !mPendingInvitations.has(session_id.asString()) ) { if (caller_name.empty()) { @@ -684,7 +777,7 @@ void LLIMMgr::inviteToSession( (void*)invite); } - mPendingVoiceInvitations[session_id.asString()] = LLSD(); + mPendingInvitations[session_id.asString()] = LLSD(); } } @@ -699,10 +792,11 @@ void LLIMMgr::onInviteNameLookup(const LLUUID& id, const char* first, const char LLString::format_map_t args; args["[NAME]"] = invite->mCallerName; - LLNotifyBox::showXml(invite->mNotifyBox, - args, - inviteUserResponse, - (void*)invite); + LLNotifyBox::showXml( + invite->mNotifyBox, + args, + inviteUserResponse, + (void*)invite); } class LLViewerChatterBoxInvitationAcceptResponder : @@ -711,10 +805,10 @@ class LLViewerChatterBoxInvitationAcceptResponder : public: LLViewerChatterBoxInvitationAcceptResponder( const LLUUID& session_id, - bool is_voice_invitation) + LLIMMgr::EInvitationType invitation_type) { mSessionID = session_id; - mIsVoiceInvitiation = is_voice_invitation; + mInvitiationType = invitation_type; } void result(const LLSD& content) @@ -738,48 +832,66 @@ public: //but unfortunately, our base that we are receiving here //may not be the most up to date. It was accurate at //some point in time though. - floaterp->setSpeakersList(content["agents"]); + floaterp->setSpeakers(content); //we now have our base of users in the session //that was accurate at some point, but maybe not now //so now we apply all of the udpates we've received //in case of race conditions - - //reapplying a user entrance will do nothing - //reapplying a user leaving will not have the user - //in our base. So it's all good floaterp->updateSpeakersList( gIMMgr->getPendingAgentListUpdates(mSessionID)); - if ( mIsVoiceInvitiation ) + if ( mInvitiationType == LLIMMgr::INVITATION_TYPE_VOICE ) { floaterp->requestAutoConnect(); LLFloaterIMPanel::onClickStartCall(floaterp); // always open IM window when connecting to voice LLFloaterChatterBox::showInstance(TRUE); } + else if ( mInvitiationType == LLIMMgr::INVITATION_TYPE_IMMEDIATE ) + { + LLFloaterChatterBox::showInstance(TRUE); + } } gIMMgr->clearPendingAgentListUpdates(mSessionID); - if ( mIsVoiceInvitiation ) - { - gIMMgr->clearPendingVoiceInviation(mSessionID); - } + gIMMgr->clearPendingInviation(mSessionID); } } void error(U32 statusNum, const std::string& reason) - { + { //throw something back to the viewer here? - if ( gIMMgr && mIsVoiceInvitiation ) + if ( gIMMgr ) { - gIMMgr->clearPendingVoiceInviation(mSessionID); + gIMMgr->clearPendingAgentListUpdates(mSessionID); + gIMMgr->clearPendingInviation(mSessionID); + + LLFloaterIMPanel* floaterp = + gIMMgr->findFloaterBySession(mSessionID); + + if ( floaterp ) + { + std::string error_string; + + if ( 404 == statusNum ) + { + error_string = "does not exist"; + } + else + { + error_string = "generic"; + } + + floaterp->showSessionStartError( + error_string); + } } } private: LLUUID mSessionID; - bool mIsVoiceInvitiation; + LLIMMgr::EInvitationType mInvitiationType; }; //static @@ -807,10 +919,11 @@ void LLIMMgr::inviteUserResponse(S32 option, void* user_data) im_floater->requestAutoConnect(); LLFloaterIMPanel::onClickStartCall(im_floater); // always open IM window when connecting to voice - LLFloaterChatterBox::showInstance(TRUE); + LLFloaterChatterBox::showInstance(invitep->mSessionID); } - - gIMMgr->clearPendingVoiceInviation(invitep->mSessionID); + + gIMMgr->clearPendingAgentListUpdates(invitep->mSessionID); + gIMMgr->clearPendingInviation(invitep->mSessionID); } else { @@ -830,34 +943,50 @@ void LLIMMgr::inviteUserResponse(S32 option, void* user_data) data, new LLViewerChatterBoxInvitationAcceptResponder( invitep->mSessionID, - true)); + invitep->mInvType)); } } break; case 2: // mute (also implies ignore, so this falls through to the "ignore" case below) + { + // mute the sender of this invite + if (!gMuteListp->isMuted(invitep->mCallerID)) { - // mute the sender of this invite - if (!gMuteListp->isMuted(invitep->mCallerID)) - { - LLMute mute(invitep->mCallerID, invitep->mCallerName, LLMute::AGENT); - gMuteListp->add(mute); - } + LLMute mute(invitep->mCallerID, invitep->mCallerName, LLMute::AGENT); + gMuteListp->add(mute); } + } /* FALLTHROUGH */ - case 1: // ignore + case 1: // decline + { + if (invitep->mType == IM_SESSION_P2P_INVITE) { - if (invitep->mType == IM_SESSION_P2P_INVITE) + if(gVoiceClient) { - if(gVoiceClient) - { - gVoiceClient->declineInvite(invitep->mSessionHandle); - } + gVoiceClient->declineInvite(invitep->mSessionHandle); } } - break; + else + { + std::string url = gAgent.getRegion()->getCapability( + "ChatSessionRequest"); + + LLSD data; + data["method"] = "decline invitation"; + data["session-id"] = invitep->mSessionID; + LLHTTPClient::post( + url, + data, + NULL); + } } + gIMMgr->clearPendingAgentListUpdates(invitep->mSessionID); + gIMMgr->clearPendingInviation(invitep->mSessionID); + break; + } + delete invitep; } @@ -869,11 +998,11 @@ void LLIMMgr::setFloaterOpen(BOOL set_open) { if (set_open) { - LLFloaterChatterBox::showInstance(LLSD()); + LLFloaterChatterBox::showInstance(); } else { - LLFloaterChatterBox::hideInstance(LLSD()); + LLFloaterChatterBox::hideInstance(); } } @@ -932,11 +1061,11 @@ BOOL LLIMMgr::hasSession(const LLUUID& session_id) return (findFloaterBySession(session_id) != NULL); } -void LLIMMgr::clearPendingVoiceInviation(const LLUUID& session_id) +void LLIMMgr::clearPendingInviation(const LLUUID& session_id) { - if ( mPendingVoiceInvitations.has(session_id.asString()) ) + if ( mPendingInvitations.has(session_id.asString()) ) { - mPendingVoiceInvitations.erase(session_id.asString()); + mPendingInvitations.erase(session_id.asString()); } } @@ -958,13 +1087,57 @@ void LLIMMgr::addPendingAgentListUpdates( { LLSD::map_const_iterator iter; - for ( iter = updates.beginMap(); - iter != updates.endMap(); - iter++) + if ( !mPendingAgentListUpdates.has(session_id.asString()) ) + { + //this is a new agent list update for this session + mPendingAgentListUpdates[session_id.asString()] = LLSD::emptyMap(); + } + + if ( + updates.has("agent_updates") && + updates["agent_updates"].isMap() && + updates.has("updates") && + updates["updates"].isMap() ) + { + //new school update + LLSD update_types = LLSD::emptyArray(); + LLSD::array_iterator array_iter; + + update_types.append("agent_updates"); + update_types.append("updates"); + + for ( + array_iter = update_types.beginArray(); + array_iter != update_types.endArray(); + ++array_iter) + { + //we only want to include the last update for a given agent + for ( + iter = updates[array_iter->asString()].beginMap(); + iter != updates[array_iter->asString()].endMap(); + ++iter) + { + mPendingAgentListUpdates[session_id.asString()][array_iter->asString()][iter->first] = + iter->second; + } + } + } + else if ( + updates.has("updates") && + updates["updates"].isMap() ) { - //we only want to include the last update for a given agent - mPendingAgentListUpdates[session_id.asString()][iter->first] = - iter->second; + //old school update where the SD contained just mappings + //of agent_id -> "LEAVE"/"ENTER" + + //only want to keep last update for each agent + for ( + iter = updates["updates"].beginMap(); + iter != updates["updates"].endMap(); + ++iter) + { + mPendingAgentListUpdates[session_id.asString()]["updates"][iter->first] = + iter->second; + } } } @@ -995,8 +1168,6 @@ LLFloaterIMPanel* LLIMMgr::createFloater( llinfos << "LLIMMgr::createFloater: from " << other_participant_id << " in session " << session_id << llendl; LLFloaterIMPanel* floater = new LLFloaterIMPanel(session_label, - LLRect(), - session_label, session_id, other_participant_id, dialog); @@ -1022,8 +1193,6 @@ LLFloaterIMPanel* LLIMMgr::createFloater( llinfos << "LLIMMgr::createFloater: from " << other_participant_id << " in session " << session_id << llendl; LLFloaterIMPanel* floater = new LLFloaterIMPanel(session_label, - LLRect(), - session_label, session_id, other_participant_id, ids, @@ -1034,8 +1203,9 @@ LLFloaterIMPanel* LLIMMgr::createFloater( return floater; } -void LLIMMgr::noteOfflineUsers(LLFloaterIMPanel* floater, - const LLDynamicArray& ids) +void LLIMMgr::noteOfflineUsers( + LLFloaterIMPanel* floater, + const LLDynamicArray& ids) { S32 count = ids.count(); if(count == 0) @@ -1099,14 +1269,6 @@ LLFloaterChatterBox* LLIMMgr::getFloater() return LLFloaterChatterBox::getInstance(LLSD()); } -void onConfirmForceCloseError(S32 option, void* data) -{ - //only 1 option really - LLFloaterIMPanel* floater = ((LLFloaterIMPanel*) data); - - if ( floater ) floater->close(FALSE); -} - class LLViewerChatterBoxSessionStartReply : public LLHTTPNode { public: @@ -1141,7 +1303,16 @@ public: LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(session_id); if (floaterp) { - floaterp->setSpeakersList(body["agents"]); + floaterp->setSpeakers(body); + + //apply updates we've possibly received previously + floaterp->updateSpeakersList( + gIMMgr->getPendingAgentListUpdates(session_id)); + + if ( body.has("session_info") ) + { + floaterp->processSessionUpdate(body["session_info"]); + } //aply updates we've possibly received previously floaterp->updateSpeakersList( @@ -1155,20 +1326,14 @@ public: //floater LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(temp_session_id); - if (floater) - { - LLString::format_map_t args; - args["[REASON]"] = - sErrorStringsMap[body["error"].asString()]; - args["[RECIPIENT]"] = floater->getTitle(); - - gViewerWindow->alertXml("ChatterBoxSessionStartError", - args, - onConfirmForceCloseError, - floater); + if ( floater ) + { + floater->showSessionStartError(body["error"].asString()); } } + + gIMMgr->clearPendingAgentListUpdates(session_id); } }; @@ -1200,17 +1365,12 @@ public: //throw an error dialog LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(session_id); + if (floater) { - LLString::format_map_t args; - args["[REASON]"] = - sErrorStringsMap[body["error"].asString()]; - args["[EVENT]"] = - sEventStringsMap[body["event"].asString()]; - args["[RECIPIENT]"] = floater->getTitle(); - - gViewerWindow->alertXml("ChatterBoxSessionEventError", - args); + floater->showSessionEventError( + body["event"].asString(), + body["error"].asString()); } } } @@ -1234,15 +1394,7 @@ public: if ( floater ) { - LLString::format_map_t args; - - args["[NAME]"] = floater->getTitle(); - args["[REASON]"] = sForceCloseSessionMap[reason]; - - gViewerWindow->alertXml("ForceCloseChatterBoxSession", - args, - onConfirmForceCloseError, - floater); + floater->showSessionForceClose(reason); } } }; @@ -1258,7 +1410,8 @@ public: LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(input["body"]["session_id"].asUUID()); if (floaterp) { - floaterp->updateSpeakersList(input["body"]["updates"]); + floaterp->updateSpeakersList( + input["body"]); } else { @@ -1267,11 +1420,28 @@ public: //a start or an acceptance of an invitation. Race condition. gIMMgr->addPendingAgentListUpdates( input["body"]["session_id"].asUUID(), - input["body"]["updates"]); + input["body"]); } } }; +class LLViewerChatterBoxSessionUpdate : public LLHTTPNode +{ +public: + virtual void post( + ResponsePtr responder, + const LLSD& context, + const LLSD& input) const + { + LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(input["body"]["session_id"].asUUID()); + if (floaterp) + { + floaterp->processSessionUpdate(input["body"]["info"]); + } + } +}; + + class LLViewerChatterBoxInvitation : public LLHTTPNode { public: @@ -1281,10 +1451,10 @@ public: const LLSD& context, const LLSD& input) const { + //for backwards compatiblity reasons...we need to still + //check for 'text' or 'voice' invitations...bleh if ( input["body"].has("instantmessage") ) { - LLString capability = input["body"]["capabilities"]["call"].asString(); - LLSD message_params = input["body"]["instantmessage"]["message_params"]; @@ -1392,13 +1562,13 @@ public: { LLSD data; data["method"] = "accept invitation"; - data["session-id"] = input["body"]["session_id"]; + data["session-id"] = session_id; LLHTTPClient::post( url, data, new LLViewerChatterBoxInvitationAcceptResponder( - input["body"]["session_id"], - false)); + session_id, + LLIMMgr::INVITATION_TYPE_INSTANT_MESSAGE)); } } //end if invitation has instant message else if ( input["body"].has("voice") ) @@ -1419,7 +1589,18 @@ public: input["body"]["session_name"].asString(), input["body"]["from_id"].asUUID(), input["body"]["from_name"].asString(), - IM_SESSION_INVITE); + IM_SESSION_INVITE, + LLIMMgr::INVITATION_TYPE_VOICE); + } + else if ( input["body"].has("immediate") ) + { + gIMMgr->inviteToSession( + input["body"]["session_id"].asUUID(), + input["body"]["session_name"].asString(), + input["body"]["from_id"].asUUID(), + input["body"]["from_name"].asString(), + IM_SESSION_INVITE, + LLIMMgr::INVITATION_TYPE_IMMEDIATE); } } }; @@ -1440,6 +1621,10 @@ LLHTTPRegistration gHTTPRegistrationMessageChatterboxsessionagentlistupdates( "/message/ChatterBoxSessionAgentListUpdates"); +LLHTTPRegistration + gHTTPRegistrationMessageChatterBoxSessionUpdate( + "/message/ChatterBoxSessionUpdate"); + LLHTTPRegistration gHTTPRegistrationMessageChatterBoxInvitation( "/message/ChatterBoxInvitation"); diff --git a/linden/indra/newview/llimview.h b/linden/indra/newview/llimview.h index 80aba24..0774698 100644 --- a/linden/indra/newview/llimview.h +++ b/linden/indra/newview/llimview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -45,6 +45,13 @@ class LLFloaterIM; class LLIMMgr : public LLSingleton { public: + enum EInvitationType + { + INVITATION_TYPE_INSTANT_MESSAGE = 0, + INVITATION_TYPE_VOICE = 1, + INVITATION_TYPE_IMMEDIATE = 2 + }; + LLIMMgr(); virtual ~LLIMMgr(); @@ -96,12 +103,14 @@ public: // deleted. void removeSession(const LLUUID& session_id); - void inviteToSession(const LLUUID& session_id, - const LLString& session_name, - const LLUUID& caller, - const LLString& caller_name, - EInstantMessage type, - const LLString& session_handle = LLString::null); + void inviteToSession( + const LLUUID& session_id, + const LLString& session_name, + const LLUUID& caller, + const LLString& caller_name, + EInstantMessage type, + EInvitationType inv_type, + const LLString& session_handle = LLString::null); //Updates a given session's session IDs. Does not open, //create or do anything new. If the old session doesn't @@ -147,7 +156,7 @@ public: static LLUUID computeSessionID(EInstantMessage dialog, const LLUUID& other_participant_id); - void clearPendingVoiceInviation(const LLUUID& session_id); + void clearPendingInviation(const LLUUID& session_id); LLSD getPendingAgentListUpdates(const LLUUID& session_id); void addPendingAgentListUpdates( @@ -155,6 +164,9 @@ public: const LLSD& updates); void clearPendingAgentListUpdates(const LLUUID& session_id); + //HACK: need a better way of enumerating existing session, or listening to session create/destroy events + const std::set& getIMFloaterHandles() { return mFloaters; } + private: class LLIMSessionInvite; @@ -193,7 +205,7 @@ private: // An IM has been received that you haven't seen yet. BOOL mIMReceived; - LLSD mPendingVoiceInvitations; + LLSD mPendingInvitations; LLSD mPendingAgentListUpdates; }; @@ -203,6 +215,10 @@ class LLFloaterIM : public LLMultiFloater public: LLFloaterIM(); /*virtual*/ BOOL postBuild(); + + static std::map sEventStringsMap; + static std::map sErrorStringsMap; + static std::map sForceCloseSessionMap; }; // Globals diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp index 4535825..69202cb 100644 --- a/linden/indra/newview/llinventoryactions.cpp +++ b/linden/indra/newview/llinventoryactions.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -620,10 +620,11 @@ class LLBeginIMSession : public inventory_panel_listener_t } - gIMMgr->addSession(name, - type, - members[0], - members); + gIMMgr->addSession( + name, + type, + members[0], + members); return true; } @@ -678,7 +679,7 @@ class LLAttachObject : public inventory_panel_listener_t std::string(), cb); } - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); return true; } diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index b017d57..58b8af2 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -211,6 +211,45 @@ void LLInvFVBridge::showProperties() void LLInvFVBridge::removeBatch(LLDynamicArray& batch) { + // Deactivate gestures when moving them into Trash + LLInvFVBridge* bridge; + LLInventoryModel* model = mInventoryPanel->getModel(); + LLViewerInventoryItem* item = NULL; + LLViewerInventoryCategory* cat = NULL; + LLInventoryModel::cat_array_t descendent_categories; + LLInventoryModel::item_array_t descendent_items; + S32 count = batch.count(); + S32 i,j; + for(i = 0; i < count; ++i) + { + bridge = (LLInvFVBridge*)(batch.get(i)); + if(!bridge || !bridge->isItemRemovable()) continue; + item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID()); + if (item) + { + if(LLAssetType::AT_GESTURE == item->getType()) + { + gGestureManager.deactivateGesture(item->getUUID()); + } + } + } + for(i = 0; i < count; ++i) + { + bridge = (LLInvFVBridge*)(batch.get(i)); + if(!bridge || !bridge->isItemRemovable()) continue; + cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID()); + if (cat) + { + gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE ); + for (j=0; jgetType()) + { + gGestureManager.deactivateGesture(descendent_items[j]->getUUID()); + } + } + } + } removeBatchNoCheck(batch); } @@ -2719,6 +2758,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) && (LLUUID::null != item->getCreatorUUID()) && (item->getCreatorUUID() != gAgent.getID())); BOOL user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); + items.push_back("Send Instant Message Separator"); items.push_back("Send Instant Message"); items.push_back("Offer Teleport..."); items.push_back("Conference Chat"); @@ -3164,7 +3204,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model std::string(), cb); } - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); } else if ("detach" == action) { @@ -4294,21 +4334,24 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); items.push_back("Wearable Separator"); + items.push_back("Wearable Wear"); items.push_back("Wearable Edit"); + + if ((flags & FIRST_SELECTED_ITEM) == 0) { disabled_items.push_back("Wearable Edit"); } - /*menu.appendSeparator(); - menu.append(new LLMenuItemCallGL("Wear", - LLWearableBridge::onWearOnAvatar, - LLWearableBridge::canWearOnAvatar, - (void*)this)); - menu.append(new LLMenuItemCallGL("Edit", - LLWearableBridge::onEditOnAvatar, - LLWearableBridge::canEditOnAvatar, - (void*)this));*/ + //menu.appendSeparator(); + //menu.append(new LLMenuItemCallGL("Wear", + // LLWearableBridge::onWearOnAvatar, + // LLWearableBridge::canWearOnAvatar, + // (void*)this)); + //menu.append(new LLMenuItemCallGL("Edit", + // LLWearableBridge::onEditOnAvatar, + // LLWearableBridge::canEditOnAvatar, + // (void*)this)); if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) { diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h index 3d1db5a..a008779 100644 --- a/linden/indra/newview/llinventorybridge.h +++ b/linden/indra/newview/llinventorybridge.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llinventoryclipboard.cpp b/linden/indra/newview/llinventoryclipboard.cpp index 9ef4400..ea84fa5 100644 --- a/linden/indra/newview/llinventoryclipboard.cpp +++ b/linden/indra/newview/llinventoryclipboard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llinventoryclipboard.h b/linden/indra/newview/llinventoryclipboard.h index bd19303..233c84e 100644 --- a/linden/indra/newview/llinventoryclipboard.h +++ b/linden/indra/newview/llinventoryclipboard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index b4d20a4..9fb5ae9 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -2606,7 +2606,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) // } // // // restore keyboard focus - // gFocusMgr.setKeyboardFocus(focus_view, callback); + // gFocusMgr.setKeyboardFocus(focus_view); //} } diff --git a/linden/indra/newview/llinventorymodel.h b/linden/indra/newview/llinventorymodel.h index 8745c6f..7b57787 100644 --- a/linden/indra/newview/llinventorymodel.h +++ b/linden/indra/newview/llinventorymodel.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 2f61bc1..c6c8548 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -1720,10 +1720,21 @@ void LLInventoryPanel::createNewItem(const char* name, LLAssetType::generateDescriptionFor(asset_type, desc); next_owner_perm = (next_owner_perm) ? next_owner_perm : PERM_MOVE | PERM_TRANSFER; - LLPointer cb = NULL; - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), + + if (inv_type == LLInventoryType::IT_GESTURE) + { + LLPointer cb = new CreateGestureCallback(); + create_inventory_item(gAgent.getID(), gAgent.getSessionID(), + parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, + NOT_WEARABLE, next_owner_perm, cb); + } + else + { + LLPointer cb = NULL; + create_inventory_item(gAgent.getID(), gAgent.getSessionID(), parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, NOT_WEARABLE, next_owner_perm, cb); + } } diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index b3cd6fd..e8f3076 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lljoystickbutton.cpp b/linden/indra/newview/lljoystickbutton.cpp index a9f7a9e..dddbea8 100644 --- a/linden/indra/newview/lljoystickbutton.cpp +++ b/linden/indra/newview/lljoystickbutton.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -607,26 +607,26 @@ void LLJoystickCameraRotate::draw() { LLGLSUIDefault gls_ui; - gl_draw_image( 0, 0, mImageUnselected ); + mImageUnselected->draw( 0, 0 ); if( mInTop ) { - drawRotatedImage( mImageSelected, 0 ); + drawRotatedImage( mImageSelected->getImage(), 0 ); } if( mInRight ) { - drawRotatedImage( mImageSelected, 1 ); + drawRotatedImage( mImageSelected->getImage(), 1 ); } if( mInBottom ) { - drawRotatedImage( mImageSelected, 2 ); + drawRotatedImage( mImageSelected->getImage(), 2 ); } if( mInLeft ) { - drawRotatedImage( mImageSelected, 3 ); + drawRotatedImage( mImageSelected->getImage(), 3 ); } if (sDebugRects) @@ -801,7 +801,7 @@ void LLJoystickCameraZoom::draw() } else { - gl_draw_image( 0, 0, mImageUnselected ); + mImageUnselected->draw( 0, 0 ); } if (sDebugRects) diff --git a/linden/indra/newview/lljoystickbutton.h b/linden/indra/newview/lljoystickbutton.h index 27a812a..adba271 100644 --- a/linden/indra/newview/lljoystickbutton.h +++ b/linden/indra/newview/lljoystickbutton.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllandmarklist.cpp b/linden/indra/newview/lllandmarklist.cpp index 42e05e4..1c0b874 100644 --- a/linden/indra/newview/lllandmarklist.cpp +++ b/linden/indra/newview/lllandmarklist.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllandmarklist.h b/linden/indra/newview/lllandmarklist.h index 8b8738b..879ffec 100644 --- a/linden/indra/newview/lllandmarklist.h +++ b/linden/indra/newview/lllandmarklist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllcd.cpp b/linden/indra/newview/lllcd.cpp index 3563027..3d26824 100644 --- a/linden/indra/newview/lllcd.cpp +++ b/linden/indra/newview/lllcd.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllcd.h b/linden/indra/newview/lllcd.h index 157ea8d..2e5f7d5 100644 --- a/linden/indra/newview/lllcd.h +++ b/linden/indra/newview/lllcd.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllightconstants.h b/linden/indra/newview/lllightconstants.h index 44878e6..cce014a 100644 --- a/linden/indra/newview/lllightconstants.h +++ b/linden/indra/newview/lllightconstants.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllocalanimationobject.cpp b/linden/indra/newview/lllocalanimationobject.cpp index 6b07714..117736b 100644 --- a/linden/indra/newview/lllocalanimationobject.cpp +++ b/linden/indra/newview/lllocalanimationobject.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllocalanimationobject.h b/linden/indra/newview/lllocalanimationobject.h index ebb6418..6bea2bb 100644 --- a/linden/indra/newview/lllocalanimationobject.h +++ b/linden/indra/newview/lllocalanimationobject.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllogchat.cpp b/linden/indra/newview/lllogchat.cpp index d690199..b0f3f42 100644 --- a/linden/indra/newview/lllogchat.cpp +++ b/linden/indra/newview/lllogchat.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lllogchat.h b/linden/indra/newview/lllogchat.h index 004b7c6..c2d16dc 100644 --- a/linden/indra/newview/lllogchat.h +++ b/linden/indra/newview/lllogchat.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmanip.cpp b/linden/indra/newview/llmanip.cpp index 3691e9b..2cf450d 100644 --- a/linden/indra/newview/llmanip.cpp +++ b/linden/indra/newview/llmanip.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmanip.h b/linden/indra/newview/llmanip.h index e2142f5..2053bc7 100644 --- a/linden/indra/newview/llmanip.h +++ b/linden/indra/newview/llmanip.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmaniprotate.cpp b/linden/indra/newview/llmaniprotate.cpp index 8892630..66f21d7 100644 --- a/linden/indra/newview/llmaniprotate.cpp +++ b/linden/indra/newview/llmaniprotate.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmaniprotate.h b/linden/indra/newview/llmaniprotate.h index 7ca1167..5e7aa6d 100644 --- a/linden/indra/newview/llmaniprotate.h +++ b/linden/indra/newview/llmaniprotate.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp index cf0acb7..74137f8 100644 --- a/linden/indra/newview/llmanipscale.cpp +++ b/linden/indra/newview/llmanipscale.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmanipscale.h b/linden/indra/newview/llmanipscale.h index b916245..ebc8eda 100644 --- a/linden/indra/newview/llmanipscale.h +++ b/linden/indra/newview/llmanipscale.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index 8313894..2642f95 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -2132,15 +2132,12 @@ void LLManipTranslate::renderTranslationHandles() LLVector3 arrow_axis; getManipAxis(first_object, which_arrow[face], arrow_axis); - if (fabs(angle_between(camera_axis, arrow_axis) - F_PI_BY_TWO) < F_PI_BY_TWO - HANDLE_HIDE_ANGLE) - { - renderArrow(which_arrow[face], - mManipPart, - (face >= 3) ? -mConeSize : mConeSize, - (face >= 3) ? -mArrowLengthMeters : mArrowLengthMeters, - mConeSize, - FALSE); - } + renderArrow(which_arrow[face], + mManipPart, + (face >= 3) ? -mConeSize : mConeSize, + (face >= 3) ? -mArrowLengthMeters : mArrowLengthMeters, + mConeSize, + FALSE); } } } diff --git a/linden/indra/newview/llmaniptranslate.h b/linden/indra/newview/llmaniptranslate.h index 47a1b01..7f206eb 100644 --- a/linden/indra/newview/llmaniptranslate.h +++ b/linden/indra/newview/llmaniptranslate.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmapresponders.cpp b/linden/indra/newview/llmapresponders.cpp index 387c4fc..eba890b 100644 --- a/linden/indra/newview/llmapresponders.cpp +++ b/linden/indra/newview/llmapresponders.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmapresponders.h b/linden/indra/newview/llmapresponders.h index 265d2ff..a9d8dcd 100644 --- a/linden/indra/newview/llmapresponders.h +++ b/linden/indra/newview/llmapresponders.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp index b37e5e8..777cbc4 100644 --- a/linden/indra/newview/llmediaremotectrl.cpp +++ b/linden/indra/newview/llmediaremotectrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -36,63 +36,109 @@ #include "lloverlaybar.h" #include "llvieweruictrlfactory.h" #include "llpanelaudiovolume.h" +#include "llviewercontrol.h" +#include "llbutton.h" //////////////////////////////////////////////////////////////////////////////// // // -LLMediaRemoteCtrl::LLMediaRemoteCtrl ( const LLString& name, - const LLString& label, - const LLRect& rect, - const LLString& xml_file ) : - LLPanel ( name, rect, FALSE ) +LLMediaRemoteCtrl::LLMediaRemoteCtrl() { setIsChrome(TRUE); + mIsFocusRoot = TRUE; - gUICtrlFactory->buildPanel(this, xml_file); + mFactoryMap["Volume Panel"] = LLCallbackMap(createVolumePanel, NULL); + build(); +} - mIsFocusRoot = TRUE; +void LLMediaRemoteCtrl::build() +{ + //HACK: only works because we don't have any implicit children (i.e. titlebars, close button, etc) + deleteAllChildren(); + if (gSavedSettings.getBOOL("ShowVolumeSettingsPopup")) + { + gUICtrlFactory->buildPanel(this, "panel_media_remote_expanded.xml", &getFactoryMap()); + } + else + { + gUICtrlFactory->buildPanel(this, "panel_media_remote.xml", &getFactoryMap()); + } } BOOL LLMediaRemoteCtrl::postBuild() { childSetAction("media_play",LLOverlayBar::mediaPlay,this); - childSetAction("media_stop",LLOverlayBar::mediaStop,this); - childSetAction("media_pause",LLOverlayBar::mediaPause,this); - childSetAction("music_play",LLOverlayBar::musicPlay,this); - childSetAction("music_stop",LLOverlayBar::musicStop,this); - childSetAction("music_pause",LLOverlayBar::musicPause,this); - childSetAction("volume",LLOverlayBar::toggleAudioVolumeFloater,this); - + childSetAction("expand", onClickExpandBtn, this); return TRUE; } -LLMediaRemoteCtrl::~LLMediaRemoteCtrl () +void LLMediaRemoteCtrl::draw() { + LLButton* music_play_btn = LLUICtrlFactory::getButtonByName(this, "music_play"); + if (music_play_btn) + { + if (gOverlayBar->musicPlaying()) + { + music_play_btn->setValue(TRUE); + music_play_btn->setImageOverlay("icn_music-pause.tga"); + } + else + { + music_play_btn->setValue(FALSE); + music_play_btn->setImageOverlay("icn_music-play.tga"); + } + } + + LLButton* media_play_btn = LLUICtrlFactory::getButtonByName(this, "media_play"); + if (media_play_btn) + { + if (gOverlayBar->mediaPlaying()) + { + media_play_btn->setValue(TRUE); + media_play_btn->setImageOverlay("icn_media-pause.tga"); + } + else + { + media_play_btn->setValue(FALSE); + media_play_btn->setImageOverlay("icn_media-play.tga"); + } + } + + LLButton* expand_button = LLUICtrlFactory::getButtonByName(this, "expand"); + if (expand_button) + { + if (expand_button->getToggleState()) + { + expand_button->setImageOverlay("arrow_down.tga"); + } + else + { + expand_button->setImageOverlay("arrow_up.tga"); + } + } + + LLPanel::draw(); } -//////////////////////////////////////////////////////////////////////////////// -// -// -EWidgetType LLMediaRemoteCtrl::getWidgetType() const +LLMediaRemoteCtrl::~LLMediaRemoteCtrl () { - return WIDGET_TYPE_MEDIA_REMOTE; } -LLString LLMediaRemoteCtrl::getWidgetTag() const +//static +void LLMediaRemoteCtrl::onClickExpandBtn(void* user_data) { - return LL_MEDIA_REMOTE_CTRL_TAG; + LLMediaRemoteCtrl* remotep = (LLMediaRemoteCtrl*)user_data; + + remotep->build(); + gOverlayBar->layoutButtons(); + } -//////////////////////////////////////////////////////////////////////////////// -// -// -void LLMediaRemoteCtrl::draw() +//static +void* LLMediaRemoteCtrl::createVolumePanel(void* data) { - LLOverlayBar::enableMusicButtons(this); - LLOverlayBar::enableMediaButtons(this); - LLPanel::draw(); - // make volume button reflect of volume floater - childSetValue("volume", LLFloaterAudioVolume::instanceVisible(LLSD())); + LLPanelAudioVolume* panel = new LLPanelAudioVolume(); + return panel; } diff --git a/linden/indra/newview/llmediaremotectrl.h b/linden/indra/newview/llmediaremotectrl.h index f110365..2681681 100644 --- a/linden/indra/newview/llmediaremotectrl.h +++ b/linden/indra/newview/llmediaremotectrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -39,18 +39,17 @@ class LLMediaRemoteCtrl : public LLPanel { public: - LLMediaRemoteCtrl ( const LLString& name, - const LLString& label, - const LLRect& rect, - const LLString& xml_file ); + LLMediaRemoteCtrl (); - virtual ~LLMediaRemoteCtrl (); - virtual BOOL postBuild(); + /*virtual*/ ~LLMediaRemoteCtrl (); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void draw(); - virtual void draw(); - - virtual EWidgetType getWidgetType() const; - virtual LLString getWidgetTag() const; + static void onClickExpandBtn(void* user_data); + static void* createVolumePanel(void* data); + +protected: + void build(); }; #endif diff --git a/linden/indra/newview/llmemoryview.cpp b/linden/indra/newview/llmemoryview.cpp index ac0331a..40b5387 100644 --- a/linden/indra/newview/llmemoryview.cpp +++ b/linden/indra/newview/llmemoryview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmemoryview.h b/linden/indra/newview/llmemoryview.h index 0fe9c2f..64652ef 100644 --- a/linden/indra/newview/llmemoryview.h +++ b/linden/indra/newview/llmemoryview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmenucommands.cpp b/linden/indra/newview/llmenucommands.cpp index c79f22f..b42db0a 100644 --- a/linden/indra/newview/llmenucommands.cpp +++ b/linden/indra/newview/llmenucommands.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmenucommands.h b/linden/indra/newview/llmenucommands.h index 201f885..c08167d 100644 --- a/linden/indra/newview/llmenucommands.h +++ b/linden/indra/newview/llmenucommands.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmorphview.cpp b/linden/indra/newview/llmorphview.cpp index 8a203ec..404534b 100644 --- a/linden/indra/newview/llmorphview.cpp +++ b/linden/indra/newview/llmorphview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmorphview.h b/linden/indra/newview/llmorphview.h index fb577d8..14645f4 100644 --- a/linden/indra/newview/llmorphview.h +++ b/linden/indra/newview/llmorphview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmoveview.cpp b/linden/indra/newview/llmoveview.cpp index f60a38d..422ac0c 100644 --- a/linden/indra/newview/llmoveview.cpp +++ b/linden/indra/newview/llmoveview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmoveview.h b/linden/indra/newview/llmoveview.h index 005264e..2683e62 100644 --- a/linden/indra/newview/llmoveview.h +++ b/linden/indra/newview/llmoveview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp index 84c3c75..9b645a6 100644 --- a/linden/indra/newview/llmutelist.cpp +++ b/linden/indra/newview/llmutelist.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -52,19 +52,25 @@ #include #include "llcrc.h" +#include "lldir.h" #include "lldispatcher.h" +#include "llsdserialize.h" #include "llxfermanager.h" #include "message.h" -#include "lldir.h" #include "llagent.h" #include "llfloatermute.h" #include "llviewergenericmessage.h" // for gGenericDispatcher #include "llviewerwindow.h" #include "llworld.h" //for particle system banning +#include "llviewerobject.h" +#include "llviewerobjectlist.h" LLMuteList* gMuteListp = NULL; +std::map LLMuteList::sUserVolumeSettings; + + // "emptymutelist" class LLDispatchEmptyMuteList : public LLDispatchHandler { @@ -166,6 +172,24 @@ LLMuteList::LLMuteList() : msg->setHandlerFuncFast(_PREHASH_UseCachedMuteList, processUseCachedMuteList); gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList); + + // load per-resident voice volume information + // conceptually, this is part of the mute list information, although it is only stored locally + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); + + LLSD settings_llsd; + llifstream file; + file.open(filename.c_str()); + if (file.is_open()) + { + LLSDSerialize::fromXML(settings_llsd, file); + } + + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); + iter != settings_llsd.endMap(); ++iter) + { + sUserVolumeSettings.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal())); + } } //----------------------------------------------------------------------------- @@ -173,6 +197,17 @@ LLMuteList::LLMuteList() : //----------------------------------------------------------------------------- LLMuteList::~LLMuteList() { + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "volume_settings.xml"); + LLSD settings_llsd; + + for(user_volume_map_t::iterator iter = sUserVolumeSettings.begin(); iter != sUserVolumeSettings.end(); ++iter) + { + settings_llsd[iter->first.asString()] = iter->second; + } + + llofstream file; + file.open(filename.c_str()); + LLSDSerialize::toPrettyXML(settings_llsd, file); } BOOL LLMuteList::isLinden(const LLString& name) const @@ -513,8 +548,21 @@ BOOL LLMuteList::saveToFile(const LLString& filename) BOOL LLMuteList::isMuted(const LLUUID& id, const LLString& name, U32 flags) const { + LLUUID id_to_check = id; + + // for objects, check for muting on their parent prim + LLViewerObject *objectp = gObjectList.findObject(id); + if ((objectp) && (!objectp->isAvatar())) + { + LLViewerObject *parentp = (LLViewerObject *)objectp->getParent(); + if (parentp) + { + id_to_check = parentp->getID(); + } + } + // don't need name or type for lookup - LLMute mute(id); + LLMute mute(id_to_check); mute_set_t::const_iterator mute_it = mMutes.find(mute); if (mute_it != mMutes.end()) { @@ -573,6 +621,25 @@ void LLMuteList::cache(const LLUUID& agent_id) } } +void LLMuteList::setSavedResidentVolume(const LLUUID& id, F32 volume) +{ + // store new value in volume settings file + sUserVolumeSettings[id] = volume; +} + +F32 LLMuteList::getSavedResidentVolume(const LLUUID& id) +{ + const F32 DEFAULT_VOLUME = 0.5f; + + user_volume_map_t::iterator found_it = sUserVolumeSettings.find(id); + if (found_it != sUserVolumeSettings.end()) + { + return found_it->second; + } + //FIXME: assumes default, should get this from somewhere + return DEFAULT_VOLUME; +} + //----------------------------------------------------------------------------- // Static message handlers diff --git a/linden/indra/newview/llmutelist.h b/linden/indra/newview/llmutelist.h index aa3afad..fa85924 100644 --- a/linden/indra/newview/llmutelist.h +++ b/linden/indra/newview/llmutelist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -112,6 +112,9 @@ public: // call this method on logout to save everything. void cache(const LLUUID& agent_id); + void setSavedResidentVolume(const LLUUID& id, F32 volume); + F32 getSavedResidentVolume(const LLUUID& id); + private: BOOL loadFromFile(const LLString& filename); BOOL saveToFile(const LLString& filename); @@ -155,6 +158,9 @@ private: BOOL mIsLoaded; friend class LLDispatchEmptyMuteList; + + typedef std::map user_volume_map_t; + static user_volume_map_t sUserVolumeSettings; }; class LLMuteListObserver diff --git a/linden/indra/newview/llnamebox.cpp b/linden/indra/newview/llnamebox.cpp index b9af3b9..9f141b8 100644 --- a/linden/indra/newview/llnamebox.cpp +++ b/linden/indra/newview/llnamebox.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llnamebox.h b/linden/indra/newview/llnamebox.h index b1efd84..f0926fe 100644 --- a/linden/indra/newview/llnamebox.h +++ b/linden/indra/newview/llnamebox.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llnameeditor.cpp b/linden/indra/newview/llnameeditor.cpp index 7959867..aeb4a36 100644 --- a/linden/indra/newview/llnameeditor.cpp +++ b/linden/indra/newview/llnameeditor.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -53,7 +53,7 @@ LLNameEditor::LLNameEditor(const std::string& name, const LLRect& rect, S32 max_text_length, void (*commit_callback)(LLUICtrl* caller, void* user_data), void (*keystroke_callback)(LLLineEditor* caller, void* user_data), - void (*focus_lost_callback)(LLUICtrl* caller, void* user_data), + void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data), void* userdata, LLLinePrevalidateFunc prevalidate_func, LLViewBorder::EBevel border_bevel, diff --git a/linden/indra/newview/llnameeditor.h b/linden/indra/newview/llnameeditor.h index 856c175..1b02aa4 100644 --- a/linden/indra/newview/llnameeditor.h +++ b/linden/indra/newview/llnameeditor.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -53,7 +53,7 @@ public: S32 max_text_length = 254, void (*commit_callback)(LLUICtrl* caller, void* user_data) = NULL, void (*keystroke_callback)(LLLineEditor* caller, void* user_data) = NULL, - void (*focus_lost_callback)(LLUICtrl* caller, void* user_data) = NULL, + void (*focus_lost_callback)(LLFocusableElement* caller, void* user_data) = NULL, void* userdata = NULL, LLLinePrevalidateFunc prevalidate_func = NULL, LLViewBorder::EBevel border_bevel = LLViewBorder::BEVEL_IN, diff --git a/linden/indra/newview/llnamelistctrl.cpp b/linden/indra/newview/llnamelistctrl.cpp index 57a9f93..e645cc6 100644 --- a/linden/indra/newview/llnamelistctrl.cpp +++ b/linden/indra/newview/llnamelistctrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -224,7 +224,7 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& value, EAddPosition pos LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex); ((LLScrollListText*)cell)->setText( fullname ); - updateMaxContentWidth(item); + calcMaxContentWidth(item); // this column is resizable LLScrollListColumn* columnp = getColumn(mNameColumnIndex); @@ -277,7 +277,7 @@ void LLNameListCtrl::refresh(const LLUUID& id, const char* first, cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex); ((LLScrollListText*)cell)->setText( fullname ); - updateMaxContentWidth(item); + calcMaxContentWidth(item); } } } @@ -332,9 +332,6 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto BOOL draw_heading = FALSE; node->getAttributeBOOL("draw_heading", draw_heading); - BOOL collapse_empty_columns = FALSE; - node->getAttributeBOOL("collapse_empty_columns", collapse_empty_columns); - S32 name_column_index = 0; node->getAttributeS32("name_column_index", name_column_index); @@ -355,7 +352,6 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto node->getAttributeS32("heading_height", heading_height); name_list->setHeadingHeight(heading_height); } - name_list->setCollapseEmptyColumns(collapse_empty_columns); BOOL allow_calling_card_drop = FALSE; if (node->getAttributeBOOL("allow_calling_card_drop", allow_calling_card_drop)) @@ -369,6 +365,7 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto LLSD columns; S32 index = 0; + S32 total_static = 0; LLXMLNodePtr child; for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { @@ -380,6 +377,13 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto LLString columnname(labelname); child->getAttributeString("name", columnname); + BOOL columndynamicwidth = FALSE; + child->getAttributeBOOL("dynamicwidth", columndynamicwidth); + + LLString sortname(columnname); + child->getAttributeString("sort", sortname); + + S32 columnwidth = -1; if (child->hasAttribute("relwidth")) { F32 columnrelwidth = 0.f; @@ -388,7 +392,6 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto } else { - S32 columnwidth = -1; child->getAttributeS32("width", columnwidth); columns[index]["width"] = columnwidth; } @@ -396,14 +399,21 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto LLFontGL::HAlign h_align = LLFontGL::LEFT; h_align = LLView::selectFontHAlign(child); + if(!columndynamicwidth) total_static += llmax(0, columnwidth); + columns[index]["name"] = columnname; columns[index]["label"] = labelname; columns[index]["halign"] = (S32)h_align; + columns[index]["dynamicwidth"] = columndynamicwidth; + columns[index]["sort"] = sortname; + index++; } } + name_list->setTotalStaticColumnWidth(total_static); name_list->setColumnHeadings(columns); + for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { if (child->hasName("row")) @@ -453,7 +463,7 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto while(token_iter != tokens.end()) { const char* line = token_iter->c_str(); - name_list->addSimpleItem(line); + name_list->addCommentText(line); ++token_iter; } diff --git a/linden/indra/newview/llnamelistctrl.h b/linden/indra/newview/llnamelistctrl.h index 0eeefde..71e336d 100644 --- a/linden/indra/newview/llnamelistctrl.h +++ b/linden/indra/newview/llnamelistctrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index e8c24d7..ca6161b 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llnetmap.h b/linden/indra/newview/llnetmap.h index e509548..17963a0 100644 --- a/linden/indra/newview/llnetmap.h +++ b/linden/indra/newview/llnetmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index be1b378..f486ca5 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -47,6 +47,7 @@ #include "llxmlnode.h" #include "llalertdialog.h" #include "llviewercontrol.h" +#include "llviewerdisplay.h" #include "llviewerimagelist.h" #include "llfloaterchat.h" // for add_chat_history() #include "lloverlaybar.h" // for gOverlayBar @@ -217,10 +218,9 @@ LLNotifyBox::LLNotifyBox(LLPointer xml_template, const LLSt // 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)); + // tip-style notification handle 'caution' differently - + // they display the tip in a different color + mIsCaution = (xml_template->mIsCaution || is_caution); // Don't animate if behind other windows if( gNotifyBoxView->getChildCount() > 0 ) @@ -269,7 +269,7 @@ LLNotifyBox::LLNotifyBox(LLPointer xml_template, const LLSt // add a caution textbox at the top of a caution notification LLTextBox* caution_box = NULL; - if (mIsCaution) + if (mIsCaution && !mIsTip) { S32 caution_height = ((S32)sFont->getLineHeight() * 2) + VPAD; caution_box = new LLTextBox( @@ -309,7 +309,7 @@ LLNotifyBox::LLNotifyBox(LLPointer xml_template, const LLSt sFont, FALSE); text->setWordWrap(TRUE); - text->setTakesFocus(FALSE); + text->setTabStop(FALSE); text->setMouseOpaque(FALSE); text->setBorderVisible(FALSE); text->setTakesNonScrollClicks(FALSE); @@ -427,6 +427,11 @@ BOOL LLNotifyBox::handleMouseUp(S32 x, S32 y, MASK mask) { if (mIsTip) { + if (mBehavior->mCallback) + { + mBehavior->mCallback(0, mBehavior->mData); + mBehavior->mCallback = NULL; // Notification callbacks only expect to be called once ever + } close(); return TRUE; } @@ -452,6 +457,16 @@ BOOL LLNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) // virtual void LLNotifyBox::draw() { + // If we are teleporting, stop the timer and restart it when the teleporting completes + if (gTeleportDisplay) + { + mEventTimer.stop(); + } + else if (!mEventTimer.getStarted()) + { + mEventTimer.start(); + } + F32 display_time = mAnimateTimer.getElapsedTimeF32(); if (mAnimating && display_time < ANIMATION_TIME) @@ -717,7 +732,7 @@ LLRect LLNotifyBox::getNotifyTipRect(const LLString &utf8message) S32 notify_height = llceil((F32) (line_count+1) * sFont->getLineHeight()); if(gOverlayBar) { - notify_height += gOverlayBar->getRect().getHeight(); + notify_height += gOverlayBar->getBoundingRect().mTop; } else { diff --git a/linden/indra/newview/llnotify.h b/linden/indra/newview/llnotify.h index bba07e2..3084143 100644 --- a/linden/indra/newview/llnotify.h +++ b/linden/indra/newview/llnotify.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index 544fbf5..9ef2eba 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -39,6 +39,7 @@ #include "audioengine.h" #include "llagent.h" #include "llbutton.h" +#include "llchatbar.h" #include "llfocusmgr.h" #include "llimview.h" #include "llmediaengine.h" @@ -71,37 +72,14 @@ extern S32 MENU_BAR_HEIGHT; // -//static -void* LLOverlayBar::createMasterRemote(void* userdata) -{ - LLOverlayBar *self = (LLOverlayBar*)userdata; - self->mMasterRemote = new LLMediaRemoteCtrl ( "master_volume", - "volume", - LLRect(), - "panel_master_volume.xml"); - return self->mMasterRemote; -} void* LLOverlayBar::createMediaRemote(void* userdata) { LLOverlayBar *self = (LLOverlayBar*)userdata; - self->mMediaRemote = new LLMediaRemoteCtrl ( "media_remote", - "media", - LLRect(), - "panel_media_remote.xml"); + self->mMediaRemote = new LLMediaRemoteCtrl (); return self->mMediaRemote; } -void* LLOverlayBar::createMusicRemote(void* userdata) -{ - LLOverlayBar *self = (LLOverlayBar*)userdata; - self->mMusicRemote = new LLMediaRemoteCtrl ( "music_remote", - "music", - LLRect(), - "panel_music_remote.xml" ); - return self->mMusicRemote; -} - void* LLOverlayBar::createVoiceRemote(void* userdata) { LLOverlayBar *self = (LLOverlayBar*)userdata; @@ -109,13 +87,14 @@ void* LLOverlayBar::createVoiceRemote(void* userdata) return self->mVoiceRemote; } +void* LLOverlayBar::createChatBar(void* userdata) +{ + gChatBar = new LLChatBar(); + return gChatBar; +} - - -LLOverlayBar::LLOverlayBar(const std::string& name, const LLRect& rect) - : LLPanel(name, rect, FALSE), // not bordered - mMasterRemote(NULL), - mMusicRemote(NULL), +LLOverlayBar::LLOverlayBar() + : LLPanel(), mMediaRemote(NULL), mVoiceRemote(NULL), mMediaState(STOPPED), @@ -127,25 +106,27 @@ LLOverlayBar::LLOverlayBar(const std::string& name, const LLRect& rect) mBuilt = false; LLCallbackMap::map_t factory_map; - factory_map["master_volume"] = LLCallbackMap(LLOverlayBar::createMasterRemote, this); factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); - factory_map["music_remote"] = LLCallbackMap(LLOverlayBar::createMusicRemote, this); factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); + factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); gUICtrlFactory->buildPanel(this, "panel_overlaybar.xml", &factory_map); - +} + +BOOL LLOverlayBar::postBuild() +{ childSetAction("IM Received",onClickIMReceived,this); childSetAction("Set Not Busy",onClickSetNotBusy,this); childSetAction("Release Keys",onClickReleaseKeys,this); childSetAction("Mouselook",onClickMouselook,this); childSetAction("Stand Up",onClickStandUp,this); + childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); mIsFocusRoot = TRUE; mBuilt = true; - // make overlay bar conform to window size - setRect(rect); layoutButtons(); + return TRUE; } LLOverlayBar::~LLOverlayBar() @@ -176,236 +157,132 @@ void LLOverlayBar::reshape(S32 width, S32 height, BOOL called_from_parent) void LLOverlayBar::layoutButtons() { - S32 width = mRect.getWidth(); - if (width > 1024) width = 1024; - - S32 count = getChildCount(); - const S32 PAD = gSavedSettings.getS32("StatusBarPad"); - - const S32 num_media_controls = 3; - S32 media_remote_width = mMediaRemote ? mMediaRemote->getRect().getWidth() : 0; - S32 music_remote_width = mMusicRemote ? mMusicRemote->getRect().getWidth() : 0; - S32 voice_remote_width = mVoiceRemote ? mVoiceRemote->getRect().getWidth() : 0; - S32 master_remote_width = mMasterRemote ? mMasterRemote->getRect().getWidth() : 0; - - // total reserved width for all media remotes - const S32 ENDPAD = 20; - S32 remote_total_width = media_remote_width + PAD + music_remote_width + PAD + voice_remote_width + PAD + master_remote_width + ENDPAD; + LLView* state_buttons_panel = getChildByName("state_buttons", TRUE); - // calculate button widths - F32 segment_width = (F32)(width - remote_total_width) / (F32)(count - num_media_controls); - - S32 btn_width = lltrunc(segment_width - PAD); - - // Evenly space all views - LLRect r; - S32 i = 0; - for (child_list_const_iter_t child_iter = getChildList()->begin(); - child_iter != getChildList()->end(); ++child_iter) + if (state_buttons_panel && state_buttons_panel->getVisible()) { - LLView *view = *child_iter; - r = view->getRect(); - r.mLeft = (width) - llround(remote_total_width + (i-num_media_controls+1)*segment_width); - r.mRight = r.mLeft + btn_width; - view->setRect(r); - i++; - } + LLViewQuery query; + LLWidgetTypeFilter widget_filter(WIDGET_TYPE_BUTTON); + query.addPreFilter(LLVisibleFilter::getInstance()); + query.addPreFilter(LLEnabledFilter::getInstance()); + query.addPreFilter(&widget_filter); - // Fix up remotes to have constant width because they can't shrink - S32 right = mRect.getWidth() - remote_total_width - PAD; - if (mMediaRemote) - { - r = mMediaRemote->getRect(); - r.mLeft = right + PAD; - right = r.mLeft + media_remote_width; - r.mRight = right; - mMediaRemote->setRect(r); - } - if (mMusicRemote) - { - r = mMusicRemote->getRect(); - r.mLeft = right + PAD; - right = r.mLeft + music_remote_width; - r.mRight = right; - mMusicRemote->setRect(r); - } - if (mVoiceRemote) - { - r = mVoiceRemote->getRect(); - r.mLeft = right + PAD; - right = r.mLeft + voice_remote_width; - r.mRight = right; - mVoiceRemote->setRect(r); - } - if (mMasterRemote) - { - r = mMasterRemote->getRect(); - r.mLeft = right + PAD; - right = r.mLeft + master_remote_width; - r.mRight = right; - mMasterRemote->setRect(r); - } - - updateRect(); -} - -void LLOverlayBar::draw() -{ - // retrieve rounded rect image - LLUUID image_id; - image_id.set(gViewerArt.getString("rounded_square.tga")); - LLViewerImage* imagep = gImageList.getImage(image_id, MIPMAP_FALSE, TRUE); + child_list_t button_list = query(state_buttons_panel); - if (imagep) - { - LLGLSTexture texture_enabled; - LLViewerImage::bindTexture(imagep); + const S32 MAX_BAR_WIDTH = 600; + S32 bar_width = llclamp(state_buttons_panel->getRect().getWidth(), 0, MAX_BAR_WIDTH); - const S32 PAD = gSavedSettings.getS32("StatusBarPad"); + // calculate button widths + const S32 MAX_BUTTON_WIDTH = 150; + S32 segment_width = llclamp(lltrunc((F32)(bar_width) / (F32)button_list.size()), 0, MAX_BUTTON_WIDTH); + S32 btn_width = segment_width - gSavedSettings.getS32("StatusBarPad"); - // draw rounded rect tabs behind all children - LLRect r; - // focus highlights - LLColor4 color = gColors.getColor("FloaterFocusBorderColor"); - glColor4fv(color.mV); - if(gFocusMgr.childHasKeyboardFocus(gBottomPanel)) - { - for (child_list_const_iter_t child_iter = getChildList()->begin(); - child_iter != getChildList()->end(); ++child_iter) - { - LLView *view = *child_iter; - if(view->getEnabled() && view->getVisible()) - { - r = view->getRect(); - gl_segmented_rect_2d_tex(r.mLeft - PAD/3 - 1, - r.mTop + 3, - r.mRight + PAD/3 + 1, - r.mBottom, - imagep->getWidth(), - imagep->getHeight(), - 16, - ROUNDED_RECT_TOP); - } - } - } + // Evenly space all buttons, starting from left + S32 left = 0; + S32 bottom = 1; - // main tabs - for (child_list_const_iter_t child_iter = getChildList()->begin(); - child_iter != getChildList()->end(); ++child_iter) + for (child_list_reverse_iter_t child_iter = button_list.rbegin(); + child_iter != button_list.rend(); ++child_iter) { LLView *view = *child_iter; - if(view->getEnabled() && view->getVisible()) - { - r = view->getRect(); - // draw a nice little pseudo-3D outline - color = gColors.getColor("DefaultShadowDark"); - glColor4fv(color.mV); - gl_segmented_rect_2d_tex(r.mLeft - PAD/3 + 1, r.mTop + 2, r.mRight + PAD/3, r.mBottom, - imagep->getWidth(), imagep->getHeight(), 16, ROUNDED_RECT_TOP); - color = gColors.getColor("DefaultHighlightLight"); - glColor4fv(color.mV); - gl_segmented_rect_2d_tex(r.mLeft - PAD/3, r.mTop + 2, r.mRight + PAD/3 - 3, r.mBottom, - imagep->getWidth(), imagep->getHeight(), 16, ROUNDED_RECT_TOP); - // here's the main background. Note that it overhangs on the bottom so as to hide the - // focus highlight on the bottom panel, thus producing the illusion that the focus highlight - // continues around the tabs - color = gColors.getColor("FocusBackgroundColor"); - glColor4fv(color.mV); - gl_segmented_rect_2d_tex(r.mLeft - PAD/3 + 1, r.mTop + 1, r.mRight + PAD/3 - 1, r.mBottom - 1, - imagep->getWidth(), imagep->getHeight(), 16, ROUNDED_RECT_TOP); - } + LLRect r = view->getRect(); + r.setOriginAndSize(left, bottom, btn_width, r.getHeight()); + view->setRect(r); + left += segment_width; } } - - // draw children on top - LLPanel::draw(); } - // Per-frame updates of visibility void LLOverlayBar::refresh() { + BOOL buttons_changed = FALSE; + BOOL im_received = gIMMgr->getIMReceived(); - childSetVisible("IM Received", im_received); - childSetEnabled("IM Received", im_received); + LLButton* button = LLUICtrlFactory::getButtonByName(this, "IM Received"); + if (button && button->getVisible() != im_received) + { + button->setVisible(im_received); + sendChildToFront(button); + moveChildToBackOfTabGroup(button); + buttons_changed = TRUE; + } BOOL busy = gAgent.getBusy(); - childSetVisible("Set Not Busy", busy); - childSetEnabled("Set Not Busy", busy); + button = LLUICtrlFactory::getButtonByName(this, "Set Not Busy"); + if (button && button->getVisible() != busy) + { + button->setVisible(busy); + sendChildToFront(button); + moveChildToBackOfTabGroup(button); + buttons_changed = TRUE; + } BOOL controls_grabbed = gAgent.anyControlGrabbed(); + button = LLUICtrlFactory::getButtonByName(this, "Release Keys"); - childSetVisible("Release Keys", controls_grabbed); - childSetEnabled("Release Keys", controls_grabbed); - + if (button && button->getVisible() != controls_grabbed) + { + button->setVisible(controls_grabbed); + sendChildToFront(button); + moveChildToBackOfTabGroup(button); + buttons_changed = TRUE; + } BOOL mouselook_grabbed; mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX) || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX); + button = LLUICtrlFactory::getButtonByName(this, "Mouselook"); - - childSetVisible("Mouselook", mouselook_grabbed); - childSetEnabled("Mouselook", mouselook_grabbed); + if (button && button->getVisible() != mouselook_grabbed) + { + button->setVisible(mouselook_grabbed); + sendChildToFront(button); + moveChildToBackOfTabGroup(button); + buttons_changed = TRUE; + } BOOL sitting = FALSE; if (gAgent.getAvatarObject()) { sitting = gAgent.getAvatarObject()->mIsSitting; - childSetVisible("Stand Up", sitting); - childSetEnabled("Stand Up", sitting); - } + button = LLUICtrlFactory::getButtonByName(this, "Stand Up"); - if ( mMusicRemote && gAudiop ) + if (button && button->getVisible() != sitting) { - LLParcel* parcel = gParcelMgr->getAgentParcel(); - if (!parcel - || parcel->getMusicURL().empty() - || !gSavedSettings.getBOOL("AudioStreamingMusic")) - { - mMusicRemote->setVisible(FALSE); - mMusicRemote->setEnabled(FALSE); - } - else - { - mMusicRemote->setVisible(TRUE); - mMusicRemote->setEnabled(TRUE); - } + button->setVisible(sitting); + sendChildToFront(button); + moveChildToBackOfTabGroup(button); + buttons_changed = TRUE; } - // if there is a url and a texture and media is enabled and available and media streaming is on... (phew!) - if ( mMediaRemote ) - { - if (LLMediaEngine::getInstance () && - LLMediaEngine::getInstance ()->getUrl ().length () && - LLMediaEngine::getInstance ()->getImageUUID ().notNull () && - LLMediaEngine::getInstance ()->isEnabled () && - LLMediaEngine::getInstance ()->isAvailable () && - gSavedSettings.getBOOL ( "AudioStreamingVideo" ) ) - { - // display remote control - mMediaRemote->setVisible ( TRUE ); - mMediaRemote->setEnabled ( TRUE ); - } - else - { - mMediaRemote->setVisible ( FALSE ); - mMediaRemote->setEnabled ( FALSE ); - } - } - if (mVoiceRemote) - { - mVoiceRemote->setVisible(LLVoiceClient::voiceEnabled()); - } - + enableMediaButtons(); + + moveChildToBackOfTabGroup(mMediaRemote); + moveChildToBackOfTabGroup(mVoiceRemote); + // turn off the whole bar in mouselook if (gAgent.cameraMouselook()) { - setVisible(FALSE); + childSetVisible("media_remote_container", FALSE); + childSetVisible("voice_remote_container", FALSE); + childSetVisible("state_buttons", FALSE); } else { - setVisible(TRUE); + // update "remotes" + childSetVisible("media_remote_container", TRUE); + childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); + childSetVisible("state_buttons", TRUE); + } + + // always let user toggle into and out of chatbar + childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); + + if (buttons_changed) + { + layoutButtons(); } } @@ -462,33 +339,25 @@ void LLOverlayBar::mediaPlay(void*) { return; } - gOverlayBar->mMediaState = PLAYING; // desired state - LLParcel* parcel = gParcelMgr->getAgentParcel(); - if (parcel) - { - LLString path(""); - LLMediaEngine::getInstance()->convertImageAndLoadUrl( true, false, path ); - } -} -//static -void LLOverlayBar::mediaPause(void*) -{ - if (!gOverlayBar) + + if (gOverlayBar->mMediaState != PLAYING) { - return; + gOverlayBar->mMediaState = PLAYING; // desired state + LLParcel* parcel = gParcelMgr->getAgentParcel(); + if (parcel) + { + LLString path(""); + LLMediaEngine::getInstance()->convertImageAndLoadUrl( true, false, path ); + } } - gOverlayBar->mMediaState = PAUSED; // desired state - LLMediaEngine::getInstance()->pause(); -} -//static -void LLOverlayBar::mediaStop(void*) -{ - if (!gOverlayBar) + else { - return; + gOverlayBar->mMediaState = PAUSED; // desired state + LLMediaEngine::getInstance()->pause(); } - gOverlayBar->mMediaState = STOPPED; // desired state - LLMediaEngine::getInstance()->stop(); + + //gOverlayBar->mMediaState = STOPPED; // desired state + //LLMediaEngine::getInstance()->stop(); } //static @@ -498,116 +367,75 @@ void LLOverlayBar::musicPlay(void*) { return; } - gOverlayBar->mMusicState = PLAYING; // desired state - if (gAudiop) + + if (gOverlayBar->mMusicState != PLAYING) { - LLParcel* parcel = gParcelMgr->getAgentParcel(); - if ( parcel ) + gOverlayBar->mMusicState = PLAYING; // desired state + if (gAudiop) { - // this doesn't work properly when crossing parcel boundaries - even when the - // stream is stopped, it doesn't return the right thing - commenting out for now. -// if ( gAudiop->isInternetStreamPlaying() == 0 ) + LLParcel* parcel = gParcelMgr->getAgentParcel(); + if ( parcel ) { - gAudiop->startInternetStream(parcel->getMusicURL().c_str()); + // this doesn't work properly when crossing parcel boundaries - even when the + // stream is stopped, it doesn't return the right thing - commenting out for now. + // if ( gAudiop->isInternetStreamPlaying() == 0 ) + { + gAudiop->startInternetStream(parcel->getMusicURL().c_str()); + } } } } -} -//static -void LLOverlayBar::musicPause(void*) -{ - if (!gOverlayBar) - { - return; - } - gOverlayBar->mMusicState = PAUSED; // desired state - if (gAudiop) - { - gAudiop->pauseInternetStream(1); - } -} -//static -void LLOverlayBar::musicStop(void*) -{ - if (!gOverlayBar) - { - return; - } - gOverlayBar->mMusicState = STOPPED; // desired state - if (gAudiop) + //else + //{ + // gOverlayBar->mMusicState = PAUSED; // desired state + // if (gAudiop) + // { + // gAudiop->pauseInternetStream(1); + // } + //} + else { - gAudiop->stopInternetStream(); + gOverlayBar->mMusicState = STOPPED; // desired state + if (gAudiop) + { + gAudiop->stopInternetStream(); + } } } -//static -void LLOverlayBar::enableMusicButtons(LLPanel* panel) -{ - BOOL play_enabled = FALSE; - BOOL play_visible = TRUE; - BOOL pause_visible = FALSE; - BOOL stop_enabled = FALSE; - if ( gAudiop && gOverlayBar && gSavedSettings.getBOOL("AudioStreamingMusic")) +void LLOverlayBar::enableMediaButtons() +{ + if (mMediaRemote) { - play_enabled = TRUE; - S32 is_playing = gAudiop->isInternetStreamPlaying(); - if (is_playing == 1) + // Music + LLParcel* parcel = gParcelMgr->getAgentParcel(); + if (parcel + && gAudiop + && !parcel->getMusicURL().empty() + && gSavedSettings.getBOOL("AudioStreamingMusic")) { - play_visible = FALSE; - pause_visible = TRUE; - stop_enabled = TRUE; + mMediaRemote->childSetEnabled("music_play", TRUE); } - else if (is_playing == 2) + else { - play_visible = TRUE; - pause_visible = FALSE; - stop_enabled = TRUE; + mMediaRemote->childSetEnabled("music_play", FALSE); } - } - panel->childSetEnabled("music_play", play_enabled); - panel->childSetEnabled("music_pause", play_enabled); - panel->childSetVisible("music_play", play_visible); - panel->childSetVisible("music_pause", pause_visible); - panel->childSetEnabled("music_stop", stop_enabled); -} -//static -void LLOverlayBar::enableMediaButtons(LLPanel* panel) -{ - // Media - BOOL play_enabled = FALSE; - BOOL play_visible = TRUE; - BOOL pause_visible = FALSE; - BOOL stop_enabled = FALSE; - - if ( LLMediaEngine::getInstance() && gOverlayBar && gSavedSettings.getBOOL("AudioStreamingVideo") ) - { - play_enabled = TRUE; - if (LLMediaEngine::getInstance()->getMediaRenderer()) + // Media + // if there is a url and a texture and media is enabled and available and media streaming is on... (phew!) + if (LLMediaEngine::getInstance() + && LLMediaEngine::getInstance()->getUrl ().length () + && LLMediaEngine::getInstance()->getImageUUID ().notNull () + && LLMediaEngine::getInstance()->isEnabled () + && LLMediaEngine::getInstance()->isAvailable () + && gSavedSettings.getBOOL ( "AudioStreamingVideo" ) ) { - if ( LLMediaEngine::getInstance()->getMediaRenderer()->isPlaying() || - LLMediaEngine::getInstance()->getMediaRenderer()->isLooping() ) - { - play_visible = FALSE; - pause_visible = TRUE; - stop_enabled = TRUE; - } - else if ( LLMediaEngine::getInstance()->getMediaRenderer()->isPaused() ) - { - play_visible = TRUE; - pause_visible = FALSE; - stop_enabled = TRUE; - } + mMediaRemote->childSetEnabled("media_play", TRUE); + } + else + { + mMediaRemote->childSetEnabled("media_play", FALSE); } } - panel->childSetEnabled("media_play", play_enabled); - panel->childSetEnabled("media_pause", play_enabled); - panel->childSetVisible("media_play", play_visible); - panel->childSetVisible("media_pause", pause_visible); - panel->childSetEnabled("media_stop", stop_enabled); } -void LLOverlayBar::toggleAudioVolumeFloater(void* user_data) -{ - LLFloaterAudioVolume::toggleInstance(LLSD()); -} diff --git a/linden/indra/newview/lloverlaybar.h b/linden/indra/newview/lloverlaybar.h index 9475bbb..46dbfef 100644 --- a/linden/indra/newview/lloverlaybar.h +++ b/linden/indra/newview/lloverlaybar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -54,15 +54,15 @@ class LLOverlayBar : public LLPanel { public: - LLOverlayBar(const std::string& name, const LLRect& rect ); + LLOverlayBar(); ~LLOverlayBar(); virtual EWidgetType getWidgetType() const; virtual LLString getWidgetTag() const; /*virtual*/ void refresh(); - /*virtual*/ void draw(); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); + /*virtual*/ BOOL postBuild(); void layoutButtons(); @@ -79,27 +79,16 @@ public: //static media helper functions static void mediaPlay(void*); - static void mediaPause(void*); - static void mediaStop(void*); - static void musicPlay(void*); - static void musicPause(void*); - static void musicStop(void*); - static void toggleAudioVolumeFloater(void*); - - static void enableMediaButtons(LLPanel* panel); - static void enableMusicButtons(LLPanel* panel); - protected: - static void* createMasterRemote(void* userdata); - static void* createMusicRemote(void* userdata); static void* createMediaRemote(void* userdata); static void* createVoiceRemote(void* userdata); + static void* createChatBar(void* userdata); + + void enableMediaButtons(); protected: - LLMediaRemoteCtrl* mMasterRemote; - LLMediaRemoteCtrl* mMusicRemote; LLMediaRemoteCtrl* mMediaRemote; LLVoiceRemoteCtrl* mVoiceRemote; bool mBuilt; // dialog constructed yet? diff --git a/linden/indra/newview/llpanelLCD.cpp b/linden/indra/newview/llpanelLCD.cpp index f460e2c..b58b21c 100644 --- a/linden/indra/newview/llpanelLCD.cpp +++ b/linden/indra/newview/llpanelLCD.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelLCD.h b/linden/indra/newview/llpanelLCD.h index ff846ed..ede1b38 100644 --- a/linden/indra/newview/llpanelLCD.h +++ b/linden/indra/newview/llpanelLCD.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelaudioprefs.cpp b/linden/indra/newview/llpanelaudioprefs.cpp index 016ab9e..cf1c749 100644 --- a/linden/indra/newview/llpanelaudioprefs.cpp +++ b/linden/indra/newview/llpanelaudioprefs.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -97,8 +97,6 @@ BOOL LLPanelAudioPrefs::postBuild() mPreviousDistance = gSavedSettings.getF32("AudioLevelDistance"); mPreviousRolloff = gSavedSettings.getF32("AudioLevelRolloff"); - mPreviousBitrate = gSavedSettings.getS32("AudioDefaultBitrate"); - mPreviousMoneyThreshold = gSavedSettings.getF32("UISndMoneyChangeThreshold"); mPreviousHealthThreshold = gSavedSettings.getF32("UISndHealthReductionThreshold"); @@ -114,8 +112,6 @@ BOOL LLPanelAudioPrefs::postBuild() void LLPanelAudioPrefs::cancel() { - - gSavedSettings.setS32("AudioDefaultBitrate", mPreviousBitrate); gSavedSettings.setF32("AudioLevelMaster", mPreviousVolume ); gSavedSettings.setF32("AudioLevelUI", mPreviousUI ); gSavedSettings.setF32("AudioLevelSFX", mPreviousSFX ); diff --git a/linden/indra/newview/llpanelaudioprefs.h b/linden/indra/newview/llpanelaudioprefs.h index 60edec7..01483ca 100644 --- a/linden/indra/newview/llpanelaudioprefs.h +++ b/linden/indra/newview/llpanelaudioprefs.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelaudiovolume.cpp b/linden/indra/newview/llpanelaudiovolume.cpp index 6900bad..522f73f 100644 --- a/linden/indra/newview/llpanelaudiovolume.cpp +++ b/linden/indra/newview/llpanelaudiovolume.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -38,35 +38,6 @@ #include "llvieweruictrlfactory.h" //////////////////////////////////////////////////////////////////////////////// -// Floater version of audio panel -// - -//static -void* LLFloaterAudioVolume::createVolumePanel(void* data) -{ - LLPanelAudioVolume* panel = new LLPanelAudioVolume(); - return panel; -} - -LLFloaterAudioVolume::LLFloaterAudioVolume(const LLSD& seed) -{ - mFactoryMap["Volume Panel"] = LLCallbackMap(createVolumePanel, NULL); - gUICtrlFactory->buildFloater(this, "floater_audio_volume.xml", &getFactoryMap()); - - S32 pos_x = mRect.mLeft; - S32 pos_y = mRect.mBottom; - LLView* volume_panel_view = gOverlayBar->getChildByName("master_volume"); - if (volume_panel_view) - { - pos_x = volume_panel_view->getRect().mLeft; - pos_y = volume_panel_view->getRect().mTop; - } - - setOrigin(pos_x, pos_y); - gFloaterView->adjustToFitScreen(this, FALSE); -} - -//////////////////////////////////////////////////////////////////////////////// // // LLPanelAudioVolume::LLPanelAudioVolume() @@ -75,6 +46,13 @@ LLPanelAudioVolume::LLPanelAudioVolume() BOOL LLPanelAudioVolume::postBuild() { + childSetCommitCallback("System Volume", onCommitVolumeChange); + childSetCommitCallback("Music Volume", onCommitVolumeChange); + childSetCommitCallback("Media Volume", onCommitVolumeChange); + childSetCommitCallback("Voice Volume", onCommitVolumeChange); + childSetCommitCallback("SFX Volume", onCommitVolumeChange); + childSetCommitCallback("UI Volume", onCommitVolumeChange); + childSetCommitCallback("Wind Volume", onCommitVolumeChange); return TRUE; } @@ -87,18 +65,57 @@ LLPanelAudioVolume::~LLPanelAudioVolume () // void LLPanelAudioVolume::draw() { -// LLOverlayBar::enableMusicButtons(this); -// LLOverlayBar::enableMediaButtons(this); BOOL mute = gSavedSettings.getBOOL("MuteAudio"); bool enable = mute ? false : true; - childSetEnabled("System Volume", enable); childSetEnabled("Music Volume", enable); childSetEnabled("Media Volume", enable); childSetEnabled("Voice Volume", enable); childSetEnabled("SFX Volume", enable); childSetEnabled("UI Volume", enable); childSetEnabled("Wind Volume", enable); + + childSetEnabled("mute_music", enable); + childSetEnabled("mute_media", enable); + childSetEnabled("mute_voice", enable); + childSetEnabled("mute_sfx", enable); + childSetEnabled("mute_wind", enable); + childSetEnabled("mute_ui", enable); + LLPanel::draw(); } +//static +void LLPanelAudioVolume::onCommitVolumeChange(LLUICtrl* ctrl, void* user_data) +{ + // unmute various audio sources when user changes volume + LLString control_name = ctrl->getControlName(); + if (control_name == "AudioLevelMaster") + { + gSavedSettings.setBOOL("MuteAudio", FALSE); + } + else if (control_name == "AudioLevelSFX") + { + gSavedSettings.setBOOL("MuteSounds", FALSE); + } + else if (control_name == "AudioLevelUI") + { + gSavedSettings.setBOOL("MuteUI", FALSE); + } + else if (control_name == "AudioLevelAmbient") + { + gSavedSettings.setBOOL("MuteAmbient", FALSE); + } + else if (control_name == "AudioLevelMusic") + { + gSavedSettings.setBOOL("MuteMusic", FALSE); + } + else if (control_name == "AudioLevelMedia") + { + gSavedSettings.setBOOL("MuteMedia", FALSE); + } + else if (control_name == "AudioLevelVoice") + { + gSavedSettings.setBOOL("MuteVoice", FALSE); + } +} diff --git a/linden/indra/newview/llpanelaudiovolume.h b/linden/indra/newview/llpanelaudiovolume.h index 48c859f..d7ddb1f 100644 --- a/linden/indra/newview/llpanelaudiovolume.h +++ b/linden/indra/newview/llpanelaudiovolume.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -35,24 +35,18 @@ #include "llpanel.h" #include "llfloater.h" -class LLFloaterAudioVolume : - public LLUISingleton, - public LLFloater -{ - friend class LLUISingleton; -public: - LLFloaterAudioVolume(const LLSD& seed); - static void* createVolumePanel(void* data); -}; class LLPanelAudioVolume : public LLPanel { public: - LLPanelAudioVolume(); + LLPanelAudioVolume(); virtual ~LLPanelAudioVolume(); virtual BOOL postBuild(); virtual void draw(); + +private: + static void onCommitVolumeChange(LLUICtrl* ctrl, void* user_data); }; #endif diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index cc44455..dd4d6cf 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -290,6 +290,7 @@ void LLPanelAvatarSecondLife::updatePartnerName() childSetTextArg("partner_edit", "[FIRST]", LLString(first)); childSetTextArg("partner_edit", "[LAST]", LLString(last)); } + childSetEnabled("partner_info", TRUE); } } @@ -365,6 +366,7 @@ void LLPanelAvatarSecondLife::onDoubleClickGroup(void* data) if(group_list) { LLScrollListItem* item = group_list->getFirstSelected(); + if(item && item->getUUID().notNull()) { llinfos << "Show group info " << item->getUUID() << llendl; @@ -393,6 +395,16 @@ void LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL(S32 option, void* userda LLWeb::loadURL("http://secondlife.com/partner"); } +// static +void LLPanelAvatarSecondLife::onClickPartnerInfo(void *data) +{ + LLPanelAvatarSecondLife* self = (LLPanelAvatarSecondLife*) data; + if (self->mPartnerID.notNull()) + { + LLFloaterAvatarInfo::showFromProfile(self->mPartnerID, + self->getScreenRect()); + } +} //----------------------------------------------------------------------------- // LLPanelAvatarFirstLife() @@ -420,6 +432,8 @@ BOOL LLPanelAvatarSecondLife::postBuild(void) childSetEnabled("born", FALSE); childSetEnabled("partner_edit", FALSE); childSetAction("partner_help",onClickPartnerHelp,this); + childSetAction("partner_info", onClickPartnerInfo, this); + childSetEnabled("partner_info", mPartnerID.notNull()); childSetAction("?",onClickPublishHelp,this); BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() ); @@ -1565,6 +1579,8 @@ void LLPanelAvatar::resetGroupList() group_string += group_data.mName; LLSD row; + + row["id"] = id ; row["columns"][0]["value"] = group_string; row["columns"][0]["font"] = "SANSSERIF_SMALL"; row["columns"][0]["width"] = 0; @@ -1635,7 +1651,7 @@ void LLPanelAvatar::onClickMute(void *userdata) if (name_edit) { std::string agent_name = name_edit->getText(); - gFloaterMute->show(); + LLFloaterMute::showInstance(); if (gMuteListp->isMuted(agent_id)) { @@ -1994,7 +2010,7 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) S32 group_count = msg->getNumberOfBlocksFast(_PREHASH_GroupData); if (0 == group_count) { - if(group_list) group_list->addSimpleItem("None"); + if(group_list) group_list->addCommentText("None"); } else { @@ -2009,8 +2025,7 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) LLString group_string; if (group_id.notNull()) { - group_string.assign("Member of "); - group_string.append(group_name); + group_string.assign(group_name); } else { diff --git a/linden/indra/newview/llpanelavatar.h b/linden/indra/newview/llpanelavatar.h index 17cf652..318b4cf 100644 --- a/linden/indra/newview/llpanelavatar.h +++ b/linden/indra/newview/llpanelavatar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -119,6 +119,7 @@ public: static void onClickPublishHelp(void *userdata); static void onClickPartnerHelp(void *userdata); static void onClickPartnerHelpLoadURL(S32 option, void* userdata); + static void onClickPartnerInfo(void *userdata); // Clear out the controls anticipating new network data. void clearControls(); diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index aafe05d..811527e 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -109,9 +109,8 @@ static LLDispatchClassifiedClickThrough sClassifiedClickThrough; class LLClassifiedTeleportHandler : public LLCommandHandler { public: - // Inform the system you handle commands starting - // with "foo" - LLClassifiedTeleportHandler() : LLCommandHandler("classifiedteleport") { } + // don't allow from external browsers because it moves you immediately + LLClassifiedTeleportHandler() : LLCommandHandler("classifiedteleport", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { @@ -134,7 +133,8 @@ public: const bool from_search = true; LLPanelClassified::sendClassifiedClickMessage(classified_id, "teleport", from_search); // Invoke teleport - return LLURLDispatcher::dispatch(url); + const bool from_external_browser = false; + return LLURLDispatcher::dispatch(url, from_external_browser); } }; // Creating the object registers with the dispatcher. @@ -228,14 +228,14 @@ BOOL LLPanelClassified::postBuild() mNameEditor = LLViewerUICtrlFactory::getLineEditorByName(this, "given_name_editor"); mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN); mNameEditor->setCommitOnFocusLost(TRUE); - mNameEditor->setFocusReceivedCallback(onFocusReceived); + mNameEditor->setFocusReceivedCallback(onFocusReceived, this); mNameEditor->setCommitCallback(onCommitAny); mNameEditor->setCallbackUserData(this); mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII ); mDescEditor = LLUICtrlFactory::getTextEditorByName(this, "desc_editor"); mDescEditor->setCommitOnFocusLost(TRUE); - mDescEditor->setFocusReceivedCallback(onFocusReceived); + mDescEditor->setFocusReceivedCallback(onFocusReceived, this); mDescEditor->setCommitCallback(onCommitAny); mDescEditor->setCallbackUserData(this); mDescEditor->setTabToNextField(TRUE); @@ -847,17 +847,21 @@ void LLPanelClassified::confirmPublish(S32 option) } // Tell all the widgets to reset their dirty state since the ad was just saved - mSnapshotCtrl->resetDirty(); - mNameEditor->resetDirty(); - mDescEditor->resetDirty(); - mLocationEditor->resetDirty(); + if (mSnapshotCtrl) + mSnapshotCtrl->resetDirty(); + if (mNameEditor) + mNameEditor->resetDirty(); + if (mDescEditor) + mDescEditor->resetDirty(); + if (mLocationEditor) + mLocationEditor->resetDirty(); mLocationChanged = false; - mCategoryCombo->resetDirty(); - mMatureCheck->resetDirty(); + if (mCategoryCombo) + mCategoryCombo->resetDirty(); + if (mMatureCheck) + mMatureCheck->resetDirty(); if (mAutoRenewCheck) - { mAutoRenewCheck->resetDirty(); - } } // static @@ -964,10 +968,10 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data) } // static -void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data) +void LLPanelClassified::onFocusReceived(LLFocusableElement* ctrl, void* data) { // allow the data to be saved - onCommitAny(ctrl, data); + onCommitAny((LLUICtrl*)ctrl, data); } diff --git a/linden/indra/newview/llpanelclassified.h b/linden/indra/newview/llpanelclassified.h index 88f6b52..9c39d1b 100644 --- a/linden/indra/newview/llpanelclassified.h +++ b/linden/indra/newview/llpanelclassified.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -112,7 +112,7 @@ protected: static void onClickProfile(void* data); static void onClickSet(void* data); - static void onFocusReceived(LLUICtrl* ctrl, void* data); + static void onFocusReceived(LLFocusableElement* ctrl, void* data); static void onCommitAny(LLUICtrl* ctrl, void* data); BOOL checkDirty(); // Update and return mDirty diff --git a/linden/indra/newview/llpanelcontents.cpp b/linden/indra/newview/llpanelcontents.cpp index 672cbb5..631f1a7 100644 --- a/linden/indra/newview/llpanelcontents.cpp +++ b/linden/indra/newview/llpanelcontents.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelcontents.h b/linden/indra/newview/llpanelcontents.h index 6484be3..c53db90 100644 --- a/linden/indra/newview/llpanelcontents.h +++ b/linden/indra/newview/llpanelcontents.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldebug.cpp b/linden/indra/newview/llpaneldebug.cpp index 7e5f458..288302b 100644 --- a/linden/indra/newview/llpaneldebug.cpp +++ b/linden/indra/newview/llpaneldebug.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldebug.h b/linden/indra/newview/llpaneldebug.h index ee8f137..c849027 100644 --- a/linden/indra/newview/llpaneldebug.h +++ b/linden/indra/newview/llpaneldebug.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirbrowser.cpp b/linden/indra/newview/llpaneldirbrowser.cpp index 5b37335..5d3236d 100644 --- a/linden/indra/newview/llpaneldirbrowser.cpp +++ b/linden/indra/newview/llpaneldirbrowser.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -177,7 +177,7 @@ void LLPanelDirBrowser::resetSearchStart() // protected void LLPanelDirBrowser::updateResultCount() { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "results"); if (!list) return; S32 result_count = list->getItemCount(); @@ -203,7 +203,7 @@ void LLPanelDirBrowser::updateResultCount() // add none found response if (list->getItemCount() == 0) { - list->addSimpleElement("None found."); + list->addCommentText(getFormattedUIString("not_found_text")); list->operateOnAll(LLCtrlListInterface::OP_DESELECT); } } @@ -1159,7 +1159,7 @@ void LLPanelDirBrowser::renameClassified(const LLUUID& classified_id, const char void LLPanelDirBrowser::setupNewSearch() { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "results"); if (!list) return; gDirBrowserInstances.removeData(mSearchID); @@ -1170,7 +1170,7 @@ void LLPanelDirBrowser::setupNewSearch() // ready the list for results list->operateOnAll(LLCtrlListInterface::OP_DELETE); - list->addSimpleElement("Searching..."); + list->addCommentText(getFormattedUIString("searching_text")); childDisable("results"); mResultsReceived = 0; @@ -1220,10 +1220,10 @@ void LLPanelDirBrowser::sendDirFindQuery( void LLPanelDirBrowser::addHelpText(const char* text) { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "results"); if (!list) return; - list->addSimpleElement(text); + list->addCommentText(text); childDisable("results"); } diff --git a/linden/indra/newview/llpaneldirbrowser.h b/linden/indra/newview/llpaneldirbrowser.h index fae9dc2..6b8578f 100644 --- a/linden/indra/newview/llpaneldirbrowser.h +++ b/linden/indra/newview/llpaneldirbrowser.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirclassified.cpp b/linden/indra/newview/llpaneldirclassified.cpp index 9877a71..52b10b2 100644 --- a/linden/indra/newview/llpaneldirclassified.cpp +++ b/linden/indra/newview/llpaneldirclassified.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirclassified.h b/linden/indra/newview/llpaneldirclassified.h index b5e3fd2..c809dbc 100644 --- a/linden/indra/newview/llpaneldirclassified.h +++ b/linden/indra/newview/llpaneldirclassified.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirevents.cpp b/linden/indra/newview/llpaneldirevents.cpp index 9ae5f73..0d1e0e3 100644 --- a/linden/indra/newview/llpaneldirevents.cpp +++ b/linden/indra/newview/llpaneldirevents.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirevents.h b/linden/indra/newview/llpaneldirevents.h index d303f75..ac981d3 100644 --- a/linden/indra/newview/llpaneldirevents.h +++ b/linden/indra/newview/llpaneldirevents.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index 2e887f9..b3d1580 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -137,6 +137,9 @@ BOOL LLPanelDirFindAll::postBuild() mWebBrowser->setOpenInInternalBrowser( false ); mWebBrowser->setOpenInExternalBrowser( false ); + // need to handle secondlife:///app/ URLs for direct teleports + mWebBrowser->setOpenAppSLURLs( true ); + // redirect 404 pages from S3 somewhere else mWebBrowser->set404RedirectUrl( childGetText("redirect_404_url") ); diff --git a/linden/indra/newview/llpaneldirfind.h b/linden/indra/newview/llpaneldirfind.h index 9ac6b91..fdf95d7 100644 --- a/linden/indra/newview/llpaneldirfind.h +++ b/linden/indra/newview/llpaneldirfind.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirgroups.cpp b/linden/indra/newview/llpaneldirgroups.cpp index 0818598..777908d 100644 --- a/linden/indra/newview/llpaneldirgroups.cpp +++ b/linden/indra/newview/llpaneldirgroups.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirgroups.h b/linden/indra/newview/llpaneldirgroups.h index 1e1083a..4d44143 100644 --- a/linden/indra/newview/llpaneldirgroups.h +++ b/linden/indra/newview/llpaneldirgroups.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirland.cpp b/linden/indra/newview/llpaneldirland.cpp index 715b9ca..d376ccf 100644 --- a/linden/indra/newview/llpaneldirland.cpp +++ b/linden/indra/newview/llpaneldirland.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirland.h b/linden/indra/newview/llpaneldirland.h index 9e86904..0ccfa51 100644 --- a/linden/indra/newview/llpaneldirland.h +++ b/linden/indra/newview/llpaneldirland.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirpeople.cpp b/linden/indra/newview/llpaneldirpeople.cpp index 68b5b3c..bca502a 100644 --- a/linden/indra/newview/llpaneldirpeople.cpp +++ b/linden/indra/newview/llpaneldirpeople.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirpeople.h b/linden/indra/newview/llpaneldirpeople.h index 8bc4320..14c4639 100644 --- a/linden/indra/newview/llpaneldirpeople.h +++ b/linden/indra/newview/llpaneldirpeople.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirplaces.cpp b/linden/indra/newview/llpaneldirplaces.cpp index 2adb50d..ebeca07 100644 --- a/linden/indra/newview/llpaneldirplaces.cpp +++ b/linden/indra/newview/llpaneldirplaces.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirplaces.h b/linden/indra/newview/llpaneldirplaces.h index 14cf3b0..7bc2b08 100644 --- a/linden/indra/newview/llpaneldirplaces.h +++ b/linden/indra/newview/llpaneldirplaces.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirpopular.cpp b/linden/indra/newview/llpaneldirpopular.cpp index 470d4a8..5a94275 100644 --- a/linden/indra/newview/llpaneldirpopular.cpp +++ b/linden/indra/newview/llpaneldirpopular.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldirpopular.h b/linden/indra/newview/llpaneldirpopular.h index b98c79a..c3f5de3 100644 --- a/linden/indra/newview/llpaneldirpopular.h +++ b/linden/indra/newview/llpaneldirpopular.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp index 1647583..81b173a 100644 --- a/linden/indra/newview/llpaneldisplay.cpp +++ b/linden/indra/newview/llpaneldisplay.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpaneldisplay.h b/linden/indra/newview/llpaneldisplay.h index b523c4a..7251ac3 100644 --- a/linden/indra/newview/llpaneldisplay.h +++ b/linden/indra/newview/llpaneldisplay.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelevent.cpp b/linden/indra/newview/llpanelevent.cpp index 4007a2c..403684c 100644 --- a/linden/indra/newview/llpanelevent.cpp +++ b/linden/indra/newview/llpanelevent.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelevent.h b/linden/indra/newview/llpanelevent.h index df8f372..a3d474f 100644 --- a/linden/indra/newview/llpanelevent.h +++ b/linden/indra/newview/llpanelevent.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelface.cpp b/linden/indra/newview/llpanelface.cpp index 70cb7a0..5ae7b55 100644 --- a/linden/indra/newview/llpanelface.cpp +++ b/linden/indra/newview/llpanelface.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -870,7 +870,7 @@ void LLPanelFace::onClickApply(void* userdata) { LLPanelFace* self = (LLPanelFace*) userdata; - gFocusMgr.setKeyboardFocus( NULL, NULL ); + gFocusMgr.setKeyboardFocus( NULL ); //F32 repeats_per_meter = self->mCtrlRepeatsPerMeter->get(); F32 repeats_per_meter = (F32)self->childGetValue( "rptctrl" ).asReal();//self->mCtrlRepeatsPerMeter->get(); diff --git a/linden/indra/newview/llpanelface.h b/linden/indra/newview/llpanelface.h index 4b536d9..9e35003 100644 --- a/linden/indra/newview/llpanelface.h +++ b/linden/indra/newview/llpanelface.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 9da5ffc..5831ed1 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -238,5 +238,5 @@ void LLPanelGeneral::cancel() void LLPanelGeneral::clickShowStartLocation(LLUICtrl*, void* user_data) { - LLPanelLogin::loadLoginPage(); + LLPanelLogin::refreshLocation( false ); // in case LLPanelLogin is visible } diff --git a/linden/indra/newview/llpanelgeneral.h b/linden/indra/newview/llpanelgeneral.h index c51b16f..cd818b9 100644 --- a/linden/indra/newview/llpanelgeneral.h +++ b/linden/indra/newview/llpanelgeneral.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgroup.cpp b/linden/indra/newview/llpanelgroup.cpp index 2a04db4..e26d1d2 100644 --- a/linden/indra/newview/llpanelgroup.cpp +++ b/linden/indra/newview/llpanelgroup.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgroup.h b/linden/indra/newview/llpanelgroup.h index 3dfcdc2..6e22ebc 100644 --- a/linden/indra/newview/llpanelgroup.h +++ b/linden/indra/newview/llpanelgroup.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index e6449fa..16e2ab7 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -114,8 +114,8 @@ BOOL LLPanelGroupGeneral::postBuild() if(mEditCharter) { mEditCharter->setCommitCallback(onCommitAny); - mEditCharter->setFocusReceivedCallback(onCommitAny); - mEditCharter->setFocusChangedCallback(onCommitAny); + mEditCharter->setFocusReceivedCallback(onFocusEdit, this); + mEditCharter->setFocusChangedCallback(onFocusEdit, this); mEditCharter->setCallbackUserData(this); } @@ -259,6 +259,14 @@ BOOL LLPanelGroupGeneral::postBuild() } // static +void LLPanelGroupGeneral::onFocusEdit(LLFocusableElement* ctrl, void* data) +{ + LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; + self->mChanged = TRUE; + self->notifyObservers(); +} + +// static void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data) { LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; diff --git a/linden/indra/newview/llpanelgroupgeneral.h b/linden/indra/newview/llpanelgroupgeneral.h index aa9a823..5c8b791 100644 --- a/linden/indra/newview/llpanelgroupgeneral.h +++ b/linden/indra/newview/llpanelgroupgeneral.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -66,6 +66,7 @@ public: virtual void draw(); private: + static void onFocusEdit(LLFocusableElement* ctrl, void* data); static void onCommitAny(LLUICtrl* ctrl, void* data); static void onCommitUserOnly(LLUICtrl* ctrl, void* data); static void onCommitTitle(LLUICtrl* ctrl, void* data); diff --git a/linden/indra/newview/llpanelgroupinvite.cpp b/linden/indra/newview/llpanelgroupinvite.cpp index 5276088..0879ae5 100644 --- a/linden/indra/newview/llpanelgroupinvite.cpp +++ b/linden/indra/newview/llpanelgroupinvite.cpp @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgroupinvite.h b/linden/indra/newview/llpanelgroupinvite.h index 81576e0..497f97a 100644 --- a/linden/indra/newview/llpanelgroupinvite.h +++ b/linden/indra/newview/llpanelgroupinvite.h @@ -11,12 +11,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgrouplandmoney.cpp b/linden/indra/newview/llpanelgrouplandmoney.cpp index 85fd6f6..483aff1 100644 --- a/linden/indra/newview/llpanelgrouplandmoney.cpp +++ b/linden/indra/newview/llpanelgrouplandmoney.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -238,7 +238,7 @@ void LLPanelGroupLandMoney::impl::onMapButton() F32 global_x = 0.f; F32 global_y = 0.f; - sscanf(cellp->getText().c_str(), "%f %f", &global_x, &global_y); + sscanf(cellp->getValue().asString().c_str(), "%f %f", &global_x, &global_y); // Hack: Use the agent's z-height F64 global_z = gAgent.getPositionGlobal().mdV[VZ]; @@ -665,7 +665,7 @@ BOOL LLPanelGroupLandMoney::postBuild() { if ( mImplementationp->mGroupParcelsp ) { - mImplementationp->mGroupParcelsp->addSimpleItem( + mImplementationp->mGroupParcelsp->addCommentText( mImplementationp->mCantViewParcelsText); mImplementationp->mGroupParcelsp->setEnabled(FALSE); } diff --git a/linden/indra/newview/llpanelgrouplandmoney.h b/linden/indra/newview/llpanelgrouplandmoney.h index 9b63fb8..1ee9861 100644 --- a/linden/indra/newview/llpanelgrouplandmoney.h +++ b/linden/indra/newview/llpanelgrouplandmoney.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgroupnotices.cpp b/linden/indra/newview/llpanelgroupnotices.cpp index 448b4b8..5fdfdba 100644 --- a/linden/indra/newview/llpanelgroupnotices.cpp +++ b/linden/indra/newview/llpanelgroupnotices.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -473,7 +473,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) if (1 == count && id.isNull()) { // Only one entry, the dummy entry. - mNoticesList->addSimpleItem(mNoNoticesStr,ADD_BOTTOM,FALSE); + mNoticesList->addCommentText(mNoNoticesStr); mNoticesList->setEnabled(FALSE); return; } diff --git a/linden/indra/newview/llpanelgroupnotices.h b/linden/indra/newview/llpanelgroupnotices.h index 193828e..b09a201 100644 --- a/linden/indra/newview/llpanelgroupnotices.h +++ b/linden/indra/newview/llpanelgroupnotices.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelgrouproles.cpp b/linden/indra/newview/llpanelgrouproles.cpp index 7ac59a3..3401bee 100644 --- a/linden/indra/newview/llpanelgrouproles.cpp +++ b/linden/indra/newview/llpanelgrouproles.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -790,7 +790,6 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, { row["columns"][column_index]["column"] = "checkbox"; row["columns"][column_index]["type"] = "checkbox"; - row["columns"][column_index]["value"] = (*ra_it)->mName; check_box_index = column_index; ++column_index; } @@ -1058,7 +1057,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if (mi == gdatap->mMembers.end()) continue; LLGroupMemberData* member_data = (*mi).second; // Is the member an owner? - if ( member_data->isInRole(gdatap->mOwnerRole) ) + if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) { // Can't remove other owners. cb_enable = FALSE; @@ -1682,7 +1681,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) retrieved << "Retrieving role member mappings..."; } mMembersList->setEnabled(FALSE); - mMembersList->addSimpleItem(retrieved.str()); + mMembersList->addCommentText(retrieved.str()); } } @@ -1762,7 +1761,7 @@ void LLPanelGroupMembersSubTab::updateMembers() else { mMembersList->setEnabled(FALSE); - mMembersList->addSimpleItem("No match."); + mMembersList->addCommentText("No match."); } } else @@ -1870,7 +1869,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mRoleDescription->setCommitOnFocusLost(TRUE); mRoleDescription->setCallbackUserData(this); mRoleDescription->setCommitCallback(onDescriptionCommit); - mRoleDescription->setFocusReceivedCallback(onDescriptionCommit); + mRoleDescription->setFocusReceivedCallback(onDescriptionFocus, this); setFooterEnabled(FALSE); @@ -2329,6 +2328,16 @@ void LLPanelGroupRolesSubTab::onPropertiesKey(LLLineEditor* ctrl, void* user_dat } // static +void LLPanelGroupRolesSubTab::onDescriptionFocus(LLFocusableElement* ctrl, void* user_data) +{ + LLPanelGroupRolesSubTab* self = static_cast(user_data); + if (!self) return; + + self->mHasRoleChange = TRUE; + self->notifyObservers(); +} + +// static void LLPanelGroupRolesSubTab::onDescriptionCommit(LLUICtrl* ctrl, void* user_data) { LLPanelGroupRolesSubTab* self = static_cast(user_data); @@ -2665,7 +2674,7 @@ void LLPanelGroupActionsSubTab::handleActionSelect() if (!rmd) continue; if ((rmd->getRoleData().mRolePowers & power_mask) == power_mask) { - mActionRoles->addSimpleItem(rmd->getRoleData().mRoleName); + mActionRoles->addSimpleElement(rmd->getRoleData().mRoleName); } } } diff --git a/linden/indra/newview/llpanelgrouproles.h b/linden/indra/newview/llpanelgrouproles.h index 40c2508..a44f1a3 100644 --- a/linden/indra/newview/llpanelgrouproles.h +++ b/linden/indra/newview/llpanelgrouproles.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -256,6 +256,7 @@ public: static void onPropertiesKey(LLLineEditor*, void*); static void onDescriptionCommit(LLUICtrl*, void*); + static void onDescriptionFocus(LLFocusableElement*, void*); static void onMemberVisibilityChange(LLUICtrl*, void*); void handleMemberVisibilityChange(bool value); diff --git a/linden/indra/newview/llpanelgroupvoting.cpp b/linden/indra/newview/llpanelgroupvoting.cpp index 09fa254..b78d5c2 100644 --- a/linden/indra/newview/llpanelgroupvoting.cpp +++ b/linden/indra/newview/llpanelgroupvoting.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -42,11 +42,13 @@ #include "llpanelgroupvoting.h" #include "llnamelistctrl.h" #include "llbutton.h" +#include "llnotify.h" #include "llagent.h" #include "llfocusmgr.h" #include "llviewercontrol.h" #include "llviewerwindow.h" +#include "llviewerregion.h" class LLPanelGroupVoting::impl { @@ -299,7 +301,8 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal() LLScrollListCell * proposal_cell = item->getColumn(1); if ( proposal_cell ) { - mProposalText->setText(proposal_cell->getText()); //proposal text + //proposal text + mProposalText->setText(proposal_cell->getValue().asString()); } else { // Something's wrong... should have some text @@ -309,7 +312,8 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal() proposal_cell = item->getColumn(2); if (proposal_cell) { - mEndDate->setText(proposal_cell->getText()); //end date + //end date + mEndDate->setText(proposal_cell->getValue().asString()); } else { // Something's wrong... should have some text @@ -320,7 +324,8 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal() proposal_cell = item->getColumn(3); if (proposal_cell) { - already_voted = proposal_cell->getText(); //already voted + //already voted + already_voted = proposal_cell->getValue().asString(); } else { // Something's wrong... should have some text @@ -330,7 +335,8 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal() proposal_cell = item->getColumn(5); if (proposal_cell) { - mStartDate->setText(proposal_cell->getText()); //start date + //start date + mStartDate->setText(proposal_cell->getValue().asString()); } else { // Something's wrong... should have some text @@ -340,14 +346,17 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal() proposal_cell = item->getColumn(6); if (proposal_cell) { - vote_cast = proposal_cell->getText(); // Vote Cast + // Vote Cast + vote_cast = proposal_cell->getValue().asString(); } // col 8: Vote Initiator proposal_cell = item->getColumn(8); if (proposal_cell) { - mQuorum->set((F32)atoi(proposal_cell->getText().c_str())); //quorum + //quorum + mQuorum->set( + (F32)atoi(proposal_cell->getValue().asString().c_str())); } else { @@ -358,7 +367,9 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal() proposal_cell = item->getColumn(9); if (proposal_cell) { - majority = (F32)atof(proposal_cell->getText().c_str()); //majority + //majority + majority = + (F32)atof(proposal_cell->getValue().asString().c_str()); } if(majority == 0.0f) @@ -540,7 +551,7 @@ void LLPanelGroupVoting::impl::setEnableHistoryItem() const LLScrollListCell *cell = item->getColumn(5); if (cell) { - mVoteHistoryText->setText(cell->getText()); + mVoteHistoryText->setText(cell->getValue().asString()); } else { // Something's wrong... @@ -593,6 +604,78 @@ void LLPanelGroupVoting::impl::sendGroupProposalsRequest(const LLUUID& group_id) gAgent.sendReliableMessage(); } +void LLPanelGroupVoting::handleResponse(void *userdata, ResponseType response, bool success) +{ + impl* self = (impl*)userdata; + if ( self ) + { + //refresh the proposals now that we've hit no + self->sendGroupProposalsRequest(self->mGroupID); + + if (response == BALLOT) + { + LLString::format_map_t args; + + if (success) + { + args["[MESSAGE]"] = self->mPanel.childGetText("vote_recorded"); + } + else + { + args["[MESSAGE]"] = self->mPanel.childGetText("vote_previously_recorded"); + } + + LLNotifyBox::showXml("SystemMessage", args); + + self->sendGroupVoteHistoryRequest(self->mGroupID); + } + self->setEnableListProposals(); + } +} + +class LLStartGroupVoteResponder : public LLHTTPClient::Responder +{ +public: + LLStartGroupVoteResponder(void *userdata) : mUserData(userdata) {}; + //If we get back a normal response, handle it here + virtual void result(const LLSD& content) + { + //Ack'd the proposal initialization, now let's finish up. + LLPanelGroupVoting::handleResponse(mUserData,LLPanelGroupVoting::START_VOTE); + } + + //If we get back an error (not found, etc...), handle it here + virtual void error(U32 status, const std::string& reason) + { + llinfos << "LLPanelGroupVotingResponder::error " + << status << ": " << reason << llendl; + } +private: + void *mUserData; +}; + +class LLGroupProposalBallotResponder : public LLHTTPClient::Responder +{ +public: + LLGroupProposalBallotResponder(void *userdata) : mUserData(userdata) {}; + //If we get back a normal response, handle it here + virtual void result(const LLSD& content) + { + //Ack'd the proposal initialization, now let's finish up. + + LLPanelGroupVoting::handleResponse(mUserData,LLPanelGroupVoting::BALLOT,content["voted"].asBoolean()); + } + + //If we get back an error (not found, etc...), handle it here + virtual void error(U32 status, const std::string& reason) + { + llinfos << "LLPanelGroupVotingResponder::error " + << status << ": " << reason << llendl; + } +private: + void *mUserData; +}; + void LLPanelGroupVoting::impl::sendStartGroupProposal() { if ( !gAgent.hasPowerInGroup(mGroupID, GP_PROPOSAL_START) ) @@ -616,41 +699,88 @@ void LLPanelGroupVoting::impl::sendStartGroupProposal() S32 quorum = llfloor(mQuorum->get()); - LLMessageSystem *msg = gMessageSystem; + //*************************************Conversion to capability + LLSD body; - msg->newMessageFast(_PREHASH_StartGroupProposal); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); + std::string url = gAgent.getRegion()->getCapability("StartGroupProposal"); - msg->nextBlockFast(_PREHASH_ProposalData); - msg->addUUIDFast(_PREHASH_GroupID, mGroupID); - msg->addF32Fast(_PREHASH_Majority, majority ); - msg->addS32Fast(_PREHASH_Quorum, quorum ); - msg->addS32Fast(_PREHASH_Duration, duration_seconds ); - msg->addStringFast(_PREHASH_ProposalText, mProposalText->getText().c_str()); + if (!url.empty()) + { + body["agent-id"] = gAgent.getID(); + body["session-id"] = gAgent.getSessionID(); - gAgent.sendReliableMessage(); + body["group-id"] = mGroupID; + body["majority"] = majority; + body["quorum"] = quorum; + body["duration"] = duration_seconds; + body["proposal-text"] = mProposalText->getText(); + + LLHTTPClient::post(url, body, new LLStartGroupVoteResponder((void*)this)); + } + else + { //DEPRECATED!!!!!!! This is a fallback just in case our backend cap is not there. Delete this block ASAP! + LLMessageSystem *msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_StartGroupProposal); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); + + msg->nextBlockFast(_PREHASH_ProposalData); + msg->addUUIDFast(_PREHASH_GroupID, mGroupID); + msg->addF32Fast(_PREHASH_Majority, majority ); + msg->addS32Fast(_PREHASH_Quorum, quorum ); + msg->addS32Fast(_PREHASH_Duration, duration_seconds ); + msg->addStringFast(_PREHASH_ProposalText, mProposalText->getText().c_str()); + + gAgent.sendReliableMessage(); + + //This code was moved from the callers to here as part of deprecation. + sendGroupProposalsRequest(mGroupID); + setEnableListProposals(); + } } void LLPanelGroupVoting::impl::sendGroupProposalBallot(const char* vote) { if ( !gAgent.hasPowerInGroup(mGroupID, GP_PROPOSAL_VOTE) ) return; + + LLSD body; - LLMessageSystem *msg = gMessageSystem; + std::string url = gAgent.getRegion()->getCapability("GroupProposalBallot"); - msg->newMessageFast(_PREHASH_GroupProposalBallot); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); + if (!url.empty()) + { + body["agent-id"] = gAgent.getID(); + body["session-id"] = gAgent.getSessionID(); + body["proposal-id"] = mProposalID; + body["group-id"] = mGroupID; + body["vote"] = vote; + + LLHTTPClient::post(url, body, new LLGroupProposalBallotResponder((void*)this)); + } + else + { //DEPRECATED!!!!!!! This is a fallback just in case our backend cap is not there. Delete this block ASAP! + LLMessageSystem *msg = gMessageSystem; - msg->nextBlockFast(_PREHASH_ProposalData); - msg->addUUIDFast(_PREHASH_ProposalID, mProposalID); - msg->addUUIDFast(_PREHASH_GroupID, mGroupID); - msg->addStringFast(_PREHASH_VoteCast, vote); + msg->newMessageFast(_PREHASH_GroupProposalBallot); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); - gAgent.sendReliableMessage(); + msg->nextBlockFast(_PREHASH_ProposalData); + msg->addUUIDFast(_PREHASH_ProposalID, mProposalID); + msg->addUUIDFast(_PREHASH_GroupID, mGroupID); + msg->addStringFast(_PREHASH_VoteCast, vote); + + gAgent.sendReliableMessage(); + + //This code was moved from the callers to here as part of deprecation. + sendGroupProposalsRequest(mGroupID); + sendGroupVoteHistoryRequest(mGroupID); + setEnableListProposals(); + } } void LLPanelGroupVoting::impl::sendGroupVoteHistoryRequest(const LLUUID& group_id) @@ -711,18 +841,12 @@ void LLPanelGroupVoting::impl::addPendingActiveScrollListItem(unsigned int curre void LLPanelGroupVoting::impl::addNoActiveScrollListItem(EAddPosition pos) { - LLSD row; - row["columns"][0]["value"] = "There are currently no active proposals"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mProposals->addElement(row, pos); + mProposals->addCommentText("There are currently no active proposals", pos); } void LLPanelGroupVoting::impl::addNoHistoryScrollListItem(EAddPosition pos) { - LLSD row; - row["columns"][0]["value"] = "There are currently no archived proposals"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mVotesHistory->addElement(row, pos); + mVotesHistory->addCommentText("There are currently no archived proposals", pos); } void LLPanelGroupVoting::impl::addPendingHistoryScrollListItem(unsigned int current, @@ -1102,11 +1226,6 @@ void LLPanelGroupVoting::impl::onClickYes(void *userdata) { self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_yes_txt")); self->sendGroupProposalBallot("Yes"); - - //refresh the proposals now that we've hit yes - self->sendGroupProposalsRequest(self->mGroupID); - self->sendGroupVoteHistoryRequest(self->mGroupID); - self->setEnableListProposals(); } } @@ -1119,11 +1238,6 @@ void LLPanelGroupVoting::impl::onClickNo(void *userdata) { self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_no_txt")); self->sendGroupProposalBallot("No"); - - //refresh the proposals now that we've hit no - self->sendGroupProposalsRequest(self->mGroupID); - self->sendGroupVoteHistoryRequest(self->mGroupID); - self->setEnableListProposals(); } } @@ -1136,18 +1250,14 @@ void LLPanelGroupVoting::impl::onClickAbstain(void *userdata) { self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_abstain_txt")); self->sendGroupProposalBallot("Abstain"); - - //refresh the proposals now that we've hit abstain - self->sendGroupProposalsRequest(self->mGroupID); - self->sendGroupVoteHistoryRequest(self->mGroupID); - self->setEnableListProposals(); } } + //static void LLPanelGroupVoting::impl::onClickSubmitProposal(void *userdata) { - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); impl* self = (impl*)userdata; if ( self && self->mProposalText ) @@ -1165,10 +1275,6 @@ void LLPanelGroupVoting::impl::onClickSubmitProposal(void *userdata) self->mPanel.childSetText("proposal_instructions", self->mPanel.childGetText("proposals_submit_new_txt")); self->sendStartGroupProposal(); - - //refresh the proposals now that we've submitted a new one - self->sendGroupProposalsRequest(self->mGroupID); - self->setEnableListProposals(); } } diff --git a/linden/indra/newview/llpanelgroupvoting.h b/linden/indra/newview/llpanelgroupvoting.h index bc9735a..3d56f69 100644 --- a/linden/indra/newview/llpanelgroupvoting.h +++ b/linden/indra/newview/llpanelgroupvoting.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,6 +37,12 @@ class LLPanelGroupVoting : public LLPanelGroupTab { public: + enum ResponseType + { + START_VOTE, + BALLOT + }; + LLPanelGroupVoting(const std::string& name, const LLUUID& group_id); virtual ~LLPanelGroupVoting(); @@ -49,7 +55,7 @@ public: virtual bool needsApply(LLString& mesg); virtual bool apply(LLString& mesg); virtual void update(LLGroupChange gc); - + static void handleResponse(void *userdata, ResponseType response, bool succes=true); protected: class impl; impl* mImpl; diff --git a/linden/indra/newview/llpanelinput.cpp b/linden/indra/newview/llpanelinput.cpp index 39d73d1..77ebec9 100644 --- a/linden/indra/newview/llpanelinput.cpp +++ b/linden/indra/newview/llpanelinput.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelinput.h b/linden/indra/newview/llpanelinput.h index 04a375c..0a50462 100644 --- a/linden/indra/newview/llpanelinput.h +++ b/linden/indra/newview/llpanelinput.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 2162ce9..e39f45f 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelinventory.h b/linden/indra/newview/llpanelinventory.h index e936679..ddd9c5d 100644 --- a/linden/indra/newview/llpanelinventory.h +++ b/linden/indra/newview/llpanelinventory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelland.cpp b/linden/indra/newview/llpanelland.cpp index 5b94e34..2dfc911 100644 --- a/linden/indra/newview/llpanelland.cpp +++ b/linden/indra/newview/llpanelland.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelland.h b/linden/indra/newview/llpanelland.h index 7e34ed0..c83bf2c 100644 --- a/linden/indra/newview/llpanelland.h +++ b/linden/indra/newview/llpanelland.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanellandobjects.cpp b/linden/indra/newview/llpanellandobjects.cpp index ebc6419..db7273b 100644 --- a/linden/indra/newview/llpanellandobjects.cpp +++ b/linden/indra/newview/llpanellandobjects.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanellandobjects.h b/linden/indra/newview/llpanellandobjects.h index af4aed0..68f5c17 100644 --- a/linden/indra/newview/llpanellandobjects.h +++ b/linden/indra/newview/llpanellandobjects.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanellandoptions.cpp b/linden/indra/newview/llpanellandoptions.cpp index 5403dd6..bd88a21 100644 --- a/linden/indra/newview/llpanellandoptions.cpp +++ b/linden/indra/newview/llpanellandoptions.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanellandoptions.h b/linden/indra/newview/llpanellandoptions.h index 0762958..1c0d058 100644 --- a/linden/indra/newview/llpanellandoptions.h +++ b/linden/indra/newview/llpanellandoptions.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index d0f2041..6029c2f 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -38,7 +38,6 @@ #include "llfontgl.h" #include "llmd5.h" #include "llsecondlifeurls.h" -#include "llwindow.h" // shell_open() #include "llversionviewer.h" #include "v4color.h" @@ -71,11 +70,13 @@ #include "llweb.h" #include "llwebbrowserctrl.h" -#include "llfloaterhtmlhelp.h" +#include "llfloaterhtml.h" +//#include "llfloaterhtmlhelp.h" #include "llfloatertos.h" #include "llglheaders.h" +#define USE_VIEWER_AUTH 0 LLString load_password_from_disk(void); void save_password_to_disk(const char* hashed_password); @@ -84,12 +85,14 @@ const S32 BLACK_BORDER_HEIGHT = 160; const S32 MAX_PASSWORD = 16; LLPanelLogin *LLPanelLogin::sInstance = NULL; +BOOL LLPanelLogin::sCapslockDidNotification = FALSE; class LLLoginRefreshHandler : public LLCommandHandler { public: - LLLoginRefreshHandler() : LLCommandHandler("login_refresh") { } + // don't allow from external browsers + LLLoginRefreshHandler() : LLCommandHandler("login_refresh", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { #if LL_LIBXUL_ENABLED @@ -351,15 +354,97 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, gUICtrlFactory->buildPanel(this, "panel_login.xml"); +#if USE_VIEWER_AUTH //leave room for the login menu bar setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0)); +#endif reshape(rect.getWidth(), rect.getHeight()); + +#if !USE_VIEWER_AUTH + childSetPrevalidate("first_name_edit", LLLineEditor::prevalidatePrintableNoSpace); + childSetPrevalidate("last_name_edit", LLLineEditor::prevalidatePrintableNoSpace); + + childSetCommitCallback("password_edit", mungePassword); + childSetKeystrokeCallback("password_edit", onPassKey, this); + childSetUserData("password_edit", this); + + LLLineEditor* edit = LLUICtrlFactory::getLineEditorByName(this, "password_edit"); + if (edit) edit->setDrawAsterixes(TRUE); + + LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(this, "start_location_combo"); + if (combo) + { + combo->setAllowTextEntry(TRUE, 128, FALSE); + + // The XML file loads the combo with the following labels: + // 0 - "My Home" + // 1 - "My Last Location" + // 2 - "" + + BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation"); + LLString sim_string = LLURLSimString::sInstance.mSimString; + if (!sim_string.empty()) + { + // Replace "" with this region name + combo->remove(2); + combo->add( sim_string ); + combo->setTextEntry(sim_string); + combo->setCurrentByIndex( 2 ); + } + else if (login_last) + { + combo->setCurrentByIndex( 1 ); + } + else + { + combo->setCurrentByIndex( 0 ); + } + + combo->setCommitCallback( &LLPanelGeneral::set_start_location ); + } + + childSetAction("connect_btn", onClickConnect, this); + + setDefaultBtn("connect_btn"); + + childSetAction("quit_btn", onClickQuit, this); + + LLTextBox* version_text = LLUICtrlFactory::getTextBoxByName(this, "version_text"); + if (version_text) + { + LLString version = llformat("%d.%d.%d (%d)", + LL_VERSION_MAJOR, + LL_VERSION_MINOR, + LL_VERSION_PATCH, + LL_VIEWER_BUILD ); + version_text->setText(version); + version_text->setClickedCallback(onClickVersion); + version_text->setCallbackUserData(this); + } + + LLTextBox* channel_text = LLUICtrlFactory::getTextBoxByName(this, "channel_text"); + if (channel_text) + { + channel_text->setText(gChannelName); + channel_text->setClickedCallback(onClickVersion); + channel_text->setCallbackUserData(this); + } + + LLTextBox* forgot_password_text = LLUICtrlFactory::getTextBoxByName(this, "forgot_password_text"); + if (forgot_password_text) + { + forgot_password_text->setClickedCallback(onClickForgotPassword); + } +#endif // get the web browser control #if LL_LIBXUL_ENABLED LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "login_html"); if ( web_browser ) { + // Need to handle login secondlife:///app/ URLs + web_browser->setOpenAppSLURLs( true ); + // observe browser events web_browser->addObserver( this ); @@ -372,11 +457,15 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // force the size to be correct (XML doesn't seem to be sufficient to do this) (with some padding so the other login screen doesn't show through) LLRect htmlRect = mRect; +#if USE_VIEWER_AUTH htmlRect.setCenterAndSize( mRect.getCenterX() - 2, mRect.getCenterY(), mRect.getWidth() + 6, mRect.getHeight()); +#else + htmlRect.setCenterAndSize( mRect.getCenterX() - 2, mRect.getCenterY() + 40, mRect.getWidth() + 6, mRect.getHeight() - 78 ); +#endif web_browser->setRect( htmlRect ); web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE ); - reshape( mRect.getWidth(), mRect.getHeight(), 1 ); - + reshape( mRect.getWidth(), mRect.getHeight(), 1 ); + // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); std::string login_page = LLAppViewer::instance()->getLoginPage(); @@ -390,7 +479,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mHtmlAvailable = FALSE; #endif +#if !USE_VIEWER_AUTH // Initialize visibility (and don't force visibility - use prefs) + refreshLocation( false ); +#endif } void LLPanelLogin::setSiteIsAlive( bool alive ) @@ -411,6 +503,17 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) else // the site is not available (missing page, server down, other badness) { +#if !USE_VIEWER_AUTH + if ( web_browser ) + { + // hide browser control (revealing default one) + web_browser->setVisible( FALSE ); + + // mark as unavailable + mHtmlAvailable = FALSE; + } +#else + if ( web_browser ) { web_browser->navigateToLocalPage( "loading-error" , "index.html" ); @@ -418,12 +521,29 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) // mark as available mHtmlAvailable = TRUE; } +#endif } + #else mHtmlAvailable = FALSE; #endif } +void LLPanelLogin::mungePassword(LLUICtrl* caller, void* user_data) +{ + LLPanelLogin* self = (LLPanelLogin*)user_data; + LLLineEditor* editor = (LLLineEditor*)caller; + std::string password = editor->getText(); + + // Re-md5 if we've changed at all + if (password != self->mIncomingPassword) + { + LLMD5 pass((unsigned char *)password.c_str()); + char munged_password[MD5HEX_STR_SIZE]; + pass.hex_digest(munged_password); + self->mMungedPassword = munged_password; + } +} LLPanelLogin::~LLPanelLogin() { @@ -458,8 +578,12 @@ void LLPanelLogin::draw() if ( mHtmlAvailable ) { +#if !USE_VIEWER_AUTH // draw a background box in black gl_rect_2d( 0, height - 264, width, 264, LLColor4( 0.0f, 0.0f, 0.0f, 1.f ) ); + // draw the bottom part of the background image - just the blue background to the native client UI + gl_draw_scaled_image(0, -264, width + 8, mLogoImage->getHeight(), mLogoImage); +#endif } else { @@ -527,14 +651,61 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) return LLPanel::handleKeyHere(key, mask, called_from_parent); } - + +// virtual +void LLPanelLogin::setFocus(BOOL b) +{ + if(b != hasFocus()) + { + if(b) + { + LLPanelLogin::giveFocus(); + } + else + { + LLPanel::setFocus(b); + } + } +} // static void LLPanelLogin::giveFocus() { - +#if USE_VIEWER_AUTH if (sInstance) + { sInstance->setFocus(TRUE); + } +#else + if( sInstance ) + { + // Grab focus and move cursor to first blank input field + std::string first = sInstance->childGetText("first_name_edit"); + std::string pass = sInstance->childGetText("password_edit"); + + BOOL have_first = !first.empty(); + BOOL have_pass = !pass.empty(); + + LLLineEditor* edit = NULL; + if (have_first && !have_pass) + { + // User saved his name but not his password. Move + // focus to password field. + edit = LLUICtrlFactory::getLineEditorByName(sInstance, "password_edit"); + } + else + { + // User doesn't have a name, so start there. + edit = LLUICtrlFactory::getLineEditorByName(sInstance, "first_name_edit"); + } + + if (edit) + { + edit->setFocus(TRUE); + edit->selectAll(); + } + } +#endif } @@ -546,24 +717,188 @@ void LLPanelLogin::show(const LLRect &rect, { new LLPanelLogin(rect, show_server, callback, callback_data); -#if LL_LIBXUL_ENABLED - LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); - - if (!web_browser) return; - if( !gFocusMgr.getKeyboardFocus() ) { // Grab focus and move cursor to first enabled control - web_browser->setFocus(TRUE); + sInstance->setFocus(TRUE); } // Make sure that focus always goes here (and use the latest sInstance that was just created) - gFocusMgr.setDefaultKeyboardFocus(web_browser); -#endif + gFocusMgr.setDefaultKeyboardFocus(sInstance); +} + +// static +void LLPanelLogin::setFields(const std::string& firstname, const std::string& lastname, const std::string& password, + BOOL remember) +{ + if (!sInstance) + { + llwarns << "Attempted fillFields with no login view shown" << llendl; + return; + } + + sInstance->childSetText("first_name_edit", firstname); + sInstance->childSetText("last_name_edit", lastname); + + // Max "actual" password length is 16 characters. + // Hex digests are always 32 characters. + if (password.length() == 32) + { + // This is a MD5 hex digest of a password. + // We don't actually use the password input field, + // fill it with MAX_PASSWORD characters so we get a + // nice row of asterixes. + const std::string filler("123456789!123456"); + sInstance->childSetText("password_edit", filler); + sInstance->mIncomingPassword = filler; + sInstance->mMungedPassword = password; + } + else + { + // this is a normal text password + sInstance->childSetText("password_edit", password); + sInstance->mIncomingPassword = password; + LLMD5 pass((unsigned char *)password.c_str()); + char munged_password[MD5HEX_STR_SIZE]; + pass.hex_digest(munged_password); + sInstance->mMungedPassword = munged_password; + } + + sInstance->childSetValue("remember_check", remember); } // static +void LLPanelLogin::addServer(const char *server, S32 domain_name) +{ + if (!sInstance) + { + llwarns << "Attempted addServer with no login view shown" << llendl; + return; + } + + LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo"); + if (combo) + { + combo->add(server, LLSD(domain_name) ); + combo->setCurrentByIndex(0); + } +} + +// static +void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString &password, + BOOL &remember) +{ + if (!sInstance) + { + llwarns << "Attempted getFields with no login view shown" << llendl; + return; + } + + firstname = sInstance->childGetText("first_name_edit"); + LLString::trim(firstname); + + lastname = sInstance->childGetText("last_name_edit"); + LLString::trim(lastname); + + password = sInstance->mMungedPassword; + remember = sInstance->childGetValue("remember_check"); +} + + +// static. Return TRUE if user made a choice from the popup +BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name) +{ + BOOL user_picked = FALSE; + if (!sInstance) + { + llwarns << "Attempted getServer with no login view shown" << llendl; + } + else + { + LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo"); + if (combo) + { + LLSD combo_val = combo->getValue(); + if (LLSD::TypeInteger == combo_val.type()) + { + domain_name = combo->getValue().asInteger(); + + if ((S32)GRID_INFO_OTHER == domain_name) + { + server = gGridName; + } + } + else + { + // no valid selection, return other + domain_name = (S32)GRID_INFO_OTHER; + server = combo_val.asString(); + } + user_picked = combo->isDirty(); + } + } + + return user_picked; +} + +// static +void LLPanelLogin::getLocation(LLString &location) +{ + if (!sInstance) + { + llwarns << "Attempted getLocation with no login view shown" << llendl; + return; + } + + LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "start_location_combo"); + if (combo) + { + location = combo->getValue().asString(); + } +} + +// static +void LLPanelLogin::refreshLocation( bool force_visible ) +{ + if (!sInstance) return; + +#if USE_VIEWER_AUTH + loadLoginPage(); +#else + LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "start_location_combo"); + if (!combo) return; + + if (LLURLSimString::parse()) + { + combo->setCurrentByIndex( 3 ); // BUG? Maybe 2? + combo->setTextEntry(LLURLSimString::sInstance.mSimString); + } + else + { + BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation"); + combo->setCurrentByIndex( login_last ? 1 : 0 ); + } + + BOOL show_start = TRUE; + + if ( ! force_visible ) + show_start = gSavedSettings.getBOOL("ShowStartLocation"); + + sInstance->childSetVisible("start_location_combo", show_start); + sInstance->childSetVisible("start_location_text", show_start); + +#if LL_RELEASE_FOR_DOWNLOAD + BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); + sInstance->childSetVisible("server_combo", show_server); +#else + sInstance->childSetVisible("server_combo", TRUE); +#endif + +#endif +} + +// static void LLPanelLogin::close() { if (sInstance) @@ -597,11 +932,19 @@ void LLPanelLogin::setAlwaysRefresh(bool refresh) void LLPanelLogin::loadLoginPage() { if (!sInstance) return; + + std::ostringstream oStr; + std::string login_page = LLAppViewer::instance()->getLoginPage(); + if (login_page.empty()) + { + login_page = sInstance->childGetValue( "real_url" ).asString(); + } + oStr << login_page; + +#if USE_VIEWER_AUTH LLURLSimString::sInstance.parse(); - std::ostringstream oStr; - LLString location; LLString region; LLString password; @@ -654,11 +997,6 @@ void LLPanelLogin::loadLoginPage() char* curl_channel = curl_escape(gChannelName.c_str(), 0); char* curl_version = curl_escape(version.c_str(), 0); - std::string login_page = LLAppViewer::instance()->getLoginPage(); - if (login_page.empty()) - { - login_page = sInstance->childGetValue( "real_url" ).asString(); - } // Use the right delimeter depending on how LLURI parses the URL LLURI login_page_uri = LLURI(login_page); @@ -667,7 +1005,7 @@ void LLPanelLogin::loadLoginPage() { first_query_delimiter = "?"; } - oStr << login_page << first_query_delimiter << "firstname=" << firstname << + oStr << first_query_delimiter << "firstname=" << firstname << "&lastname=" << lastname << "&location=" << location << "®ion=" << curl_region << "&grid=" << gGridInfo[gGridChoice].mLabel << "&channel=" << curl_channel << "&version=" << curl_version; @@ -676,7 +1014,7 @@ void LLPanelLogin::loadLoginPage() curl_free(curl_channel); curl_free(curl_version); - LLString language(gSavedSettings.getString("Language")); + LLString language(gSavedSettings.getString("Language")); if(language == "default") { language = gSavedSettings.getString("SystemLanguage"); @@ -710,6 +1048,7 @@ void LLPanelLogin::loadLoginPage() if (gSavedSettings.getBOOL("ForceShowGrid")) oStr << "&show_grid=TRUE"; #endif +#endif #if LL_LIBXUL_ENABLED LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(sInstance, "login_html"); @@ -742,6 +1081,77 @@ void LLPanelLogin::onNavigateComplete( const EventType& eventIn ) //--------------------------------------------------------------------------- // static +void LLPanelLogin::onClickConnect(void *) +{ + if (sInstance && sInstance->mCallback) + { + // tell the responder we're not here anymore + if ( gResponsePtr ) + gResponsePtr->setParent( 0 ); + + // JC - Make sure the fields all get committed. + sInstance->setFocus(FALSE); + + LLString first = sInstance->childGetText("first_name_edit"); + LLString last = sInstance->childGetText("last_name_edit"); + if (!first.empty() && !last.empty()) + { + // has both first and last name typed + + // store off custom server entry, if currently selected + LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo"); + if (combo) + { + S32 selected_server = combo->getValue(); + if (selected_server == GRID_INFO_NONE) + { + LLString custom_server = combo->getValue().asString(); + gSavedSettings.setString("CustomServer", custom_server); + } + } + sInstance->mCallback(0, sInstance->mCallbackData); + } + else + { + // empty first or last name + // same as clicking new account + onClickNewAccount(NULL); + } + } +} + + +// static +void LLPanelLogin::newAccountAlertCallback(S32 option, void*) +{ + if (0 == option) + { + llinfos << "Going to account creation URL" << llendl; + LLWeb::loadURL( CREATE_ACCOUNT_URL ); + } + else + { + sInstance->setFocus(TRUE); + } +} + + +// static +void LLPanelLogin::onClickNewAccount(void*) +{ + if (gHideLinks) + { + gViewerWindow->alertXml("MustHaveAccountToLogInNoLinks"); + } + else + { + gViewerWindow->alertXml("MustHaveAccountToLogIn", + LLPanelLogin::newAccountAlertCallback); + } +} + + +// static void LLPanelLogin::onClickQuit(void*) { if (sInstance && sInstance->mCallback) @@ -760,3 +1170,22 @@ void LLPanelLogin::onClickVersion(void*) { LLFloaterAbout::show(NULL); } + +void LLPanelLogin::onClickForgotPassword(void*) +{ + if (sInstance ) + { + LLWeb::loadURL(sInstance->childGetValue( "forgot_password_url" ).asString()); + } +} + + +// static +void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) +{ + if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) + { + LLNotifyBox::showXml("CapsKeyOn"); + sCapslockDidNotification = TRUE; + } +} diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h index 66215c1..206e700 100644 --- a/linden/indra/newview/llpanellogin.h +++ b/linden/indra/newview/llpanellogin.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -51,7 +51,8 @@ class LLComboBox; class LLLoginHandler : public LLCommandHandler { public: - LLLoginHandler() : LLCommandHandler("login") { } + // allow from external browsers + LLLoginHandler() : LLCommandHandler("login", true) { } bool handle(const LLSD& tokens, const LLSD& queryMap); bool parseDirectLogin(std::string url); void parse(const LLSD& queryMap); @@ -77,11 +78,24 @@ public: virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); virtual void draw(); + virtual void setFocus( BOOL b ); static void show(const LLRect &rect, BOOL show_server, void (*callback)(S32 option, void* user_data), void* callback_data); + static void setFields(const std::string& firstname, const std::string& lastname, + const std::string& password, BOOL remember); + + static void addServer(const char *server, S32 domain_name); + static void refreshLocation( bool force_visible ); + + static void getFields(LLString &firstname, LLString &lastname, + LLString &password, BOOL &remember); + + static BOOL getServer(LLString &server, S32& domain_name); + static void getLocation(LLString &location); + static void close(); void setSiteIsAlive( bool alive ); @@ -89,8 +103,12 @@ public: static void loadLoginPage(); static void giveFocus(); static void setAlwaysRefresh(bool refresh); - + static void mungePassword(LLUICtrl* caller, void* user_data); + private: + static void onClickConnect(void*); + static void onClickNewAccount(void*); + static void newAccountAlertCallback(S32 option, void*); static void onClickQuit(void*); static void onClickVersion(void*); @@ -98,6 +116,8 @@ private: // browser observer impls virtual void onNavigateComplete( const EventType& eventIn ); #endif + static void onClickForgotPassword(void*); + static void onPassKey(LLLineEditor* caller, void* user_data); private: LLPointer mLogoImage; @@ -105,7 +125,11 @@ private: void (*mCallback)(S32 option, void *userdata); void* mCallbackData; + std::string mIncomingPassword; + std::string mMungedPassword; + static LLPanelLogin* sInstance; + static BOOL sCapslockDidNotification; BOOL mHtmlAvailable; }; diff --git a/linden/indra/newview/llpanelmorph.cpp b/linden/indra/newview/llpanelmorph.cpp index ba0ecdc..817b214 100644 --- a/linden/indra/newview/llpanelmorph.cpp +++ b/linden/indra/newview/llpanelmorph.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelmorph.h b/linden/indra/newview/llpanelmorph.h index a5c050c..d868181 100644 --- a/linden/indra/newview/llpanelmorph.h +++ b/linden/indra/newview/llpanelmorph.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp index f35e69f..fc21ecb 100644 --- a/linden/indra/newview/llpanelmsgs.cpp +++ b/linden/indra/newview/llpanelmsgs.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelmsgs.h b/linden/indra/newview/llpanelmsgs.h index cee8e91..c9f9ce1 100644 --- a/linden/indra/newview/llpanelmsgs.h +++ b/linden/indra/newview/llpanelmsgs.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp index 2e24ae1..be797cc 100644 --- a/linden/indra/newview/llpanelnetwork.cpp +++ b/linden/indra/newview/llpanelnetwork.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelnetwork.h b/linden/indra/newview/llpanelnetwork.h index 4b23841..9848461 100644 --- a/linden/indra/newview/llpanelnetwork.h +++ b/linden/indra/newview/llpanelnetwork.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index bd7f700..e4e28b8 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -350,7 +350,7 @@ void LLPanelObject::getState( ) //forfeit focus if (gFocusMgr.childHasKeyboardFocus(this)) { - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); } // Disable all text input fields @@ -1095,10 +1095,12 @@ void LLPanelObject::getState( ) { mLabelSculptType->setEnabled(TRUE); } - - } } + else + { + mSculptTextureRevert = LLUUID::null; + } //---------------------------------------------------------------------------- diff --git a/linden/indra/newview/llpanelobject.h b/linden/indra/newview/llpanelobject.h index 1711848..3e7f0bc 100644 --- a/linden/indra/newview/llpanelobject.h +++ b/linden/indra/newview/llpanelobject.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index 3c43542..c1899ee 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp @@ -14,12 +14,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelpermissions.h b/linden/indra/newview/llpanelpermissions.h index 3e06420..283cbc1 100644 --- a/linden/indra/newview/llpanelpermissions.h +++ b/linden/indra/newview/llpanelpermissions.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelpick.cpp b/linden/indra/newview/llpanelpick.cpp index 01e1564..533702a 100644 --- a/linden/indra/newview/llpanelpick.cpp +++ b/linden/indra/newview/llpanelpick.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelpick.h b/linden/indra/newview/llpanelpick.h index 7abf51f..e2aaa6f 100644 --- a/linden/indra/newview/llpanelpick.h +++ b/linden/indra/newview/llpanelpick.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelplace.cpp b/linden/indra/newview/llpanelplace.cpp index 597a311..54f011f 100644 --- a/linden/indra/newview/llpanelplace.cpp +++ b/linden/indra/newview/llpanelplace.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelplace.h b/linden/indra/newview/llpanelplace.h index ee60ece..9ca008a 100644 --- a/linden/indra/newview/llpanelplace.h +++ b/linden/indra/newview/llpanelplace.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelvolume.cpp b/linden/indra/newview/llpanelvolume.cpp index 0ce973a..cad038c 100644 --- a/linden/indra/newview/llpanelvolume.cpp +++ b/linden/indra/newview/llpanelvolume.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -171,7 +171,7 @@ void LLPanelVolume::getState( ) //forfeit focus if (gFocusMgr.childHasKeyboardFocus(this)) { - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); } // Disable all text input fields diff --git a/linden/indra/newview/llpanelvolume.h b/linden/indra/newview/llpanelvolume.h index d64a20e..637894c 100644 --- a/linden/indra/newview/llpanelvolume.h +++ b/linden/indra/newview/llpanelvolume.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp index 03e0469..9083e3d 100644 --- a/linden/indra/newview/llpanelweb.cpp +++ b/linden/indra/newview/llpanelweb.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpanelweb.h b/linden/indra/newview/llpanelweb.h index 9241f95..37cc1f3 100644 --- a/linden/indra/newview/llpanelweb.h +++ b/linden/indra/newview/llpanelweb.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpatchvertexarray.cpp b/linden/indra/newview/llpatchvertexarray.cpp index 635ebf9..60e6391 100644 --- a/linden/indra/newview/llpatchvertexarray.cpp +++ b/linden/indra/newview/llpatchvertexarray.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpatchvertexarray.h b/linden/indra/newview/llpatchvertexarray.h index 472f372..2f2057f 100644 --- a/linden/indra/newview/llpatchvertexarray.h +++ b/linden/indra/newview/llpatchvertexarray.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpolymesh.cpp b/linden/indra/newview/llpolymesh.cpp index bbbe3e1..d703129 100644 --- a/linden/indra/newview/llpolymesh.cpp +++ b/linden/indra/newview/llpolymesh.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -862,14 +862,6 @@ void LLPolyMesh::dumpDiagInfo() llinfos << buf << llendl; llinfos << "-----------------------------------------------------" << llendl; } - -//----------------------------------------------------------------------------- -// getCoords() -//----------------------------------------------------------------------------- -const LLVector3 *LLPolyMesh::getCoords() const -{ - return mCoords; -} //----------------------------------------------------------------------------- // getWritableCoords() @@ -985,14 +977,6 @@ void LLPolyMesh::deleteAllMorphData() } //----------------------------------------------------------------------------- -// getWeights() -//----------------------------------------------------------------------------- -const F32* LLPolyMesh::getWeights() const -{ - return mSharedData->mWeights; -} - -//----------------------------------------------------------------------------- // getWritableWeights() //----------------------------------------------------------------------------- F32* LLPolyMesh::getWritableWeights() const diff --git a/linden/indra/newview/llpolymesh.h b/linden/indra/newview/llpolymesh.h index d68fcc8..c7c8054 100644 --- a/linden/indra/newview/llpolymesh.h +++ b/linden/indra/newview/llpolymesh.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -224,7 +224,9 @@ public: } // Get coords - const LLVector3 *getCoords() const; + const LLVector3 *getCoords() const{ + return mCoords; + } // non const version LLVector3 *getWritableCoords(); @@ -273,7 +275,10 @@ public: } // Get weights - const F32 *getWeights() const; + const F32 *getWeights() const { + llassert (mSharedData); + return mSharedData->mWeights; + } F32 *getWritableWeights() const; diff --git a/linden/indra/newview/llpolymorph.cpp b/linden/indra/newview/llpolymorph.cpp index 4e12f52..0a9479f 100644 --- a/linden/indra/newview/llpolymorph.cpp +++ b/linden/indra/newview/llpolymorph.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpolymorph.h b/linden/indra/newview/llpolymorph.h index 1f62757..8dd3bd4 100644 --- a/linden/indra/newview/llpolymorph.h +++ b/linden/indra/newview/llpolymorph.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index a475c6d..9d8e910 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llprefschat.h b/linden/indra/newview/llprefschat.h index 2cbf20c..016c433 100644 --- a/linden/indra/newview/llprefschat.h +++ b/linden/indra/newview/llprefschat.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 44db896..40263fc 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llprefsim.h b/linden/indra/newview/llprefsim.h index 9b6f25c..11851f7 100644 --- a/linden/indra/newview/llprefsim.h +++ b/linden/indra/newview/llprefsim.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llprefsvoice.cpp b/linden/indra/newview/llprefsvoice.cpp index a0d5ed3..33a3cec 100644 --- a/linden/indra/newview/llprefsvoice.cpp +++ b/linden/indra/newview/llprefsvoice.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -102,7 +102,7 @@ void LLPrefsVoiceLogic::init() mCtrlEarLocation->selectByValue(LLSD(gSavedSettings.getS32("VoiceEarLocation"))); mPanel->childSetCommitCallback("ear_location", onEarLocationCommit, this ); - mPanel->childSetAction("launch_voice_wizard_button", onClickLaunchWizard, this); + mPanel->childSetAction("launch_voice_wizard_button", onClickLaunchWizard, mPanel); mPanel->childSetAction("set_voice_hotkey_button", onClickSetKey, this); mPanel->childSetAction("set_voice_middlemouse_button", onClickSetMiddleMouse, this); @@ -147,14 +147,20 @@ void LLPrefsVoiceLogic::onEarLocationCommit(LLUICtrl* ctrl, void* user_data) LLCtrlSelectionInterface* interfacep = ctrl->getSelectionInterface(); if (interfacep) { - gSavedSettings.setS32("VoiceEarLocation", interfacep->getSimpleSelectedValue().asInteger()); + gSavedSettings.setS32("VoiceEarLocation", interfacep->getSelectedValue().asInteger()); } } //static void LLPrefsVoiceLogic::onClickLaunchWizard(void* user_data) { - LLFloaterVoiceWizard::showInstance(); + LLPrefsVoice* prefs = (LLPrefsVoice*)user_data; + LLFloaterVoiceWizard* floaterp = LLFloaterVoiceWizard::showInstance(); + LLFloater* parent_floater = gFloaterView->getParentFloater(prefs); + if (parent_floater) + { + parent_floater->addDependentFloater(floaterp, FALSE); + } } // static diff --git a/linden/indra/newview/llprefsvoice.h b/linden/indra/newview/llprefsvoice.h index db5d862..bb47b85 100644 --- a/linden/indra/newview/llprefsvoice.h +++ b/linden/indra/newview/llprefsvoice.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpreview.cpp b/linden/indra/newview/llpreview.cpp index 0dea2ca..0549b16 100644 --- a/linden/indra/newview/llpreview.cpp +++ b/linden/indra/newview/llpreview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -66,12 +66,14 @@ LLPreview::LLPreview(const std::string& name) : mUserResized(FALSE), mCloseAfterSave(FALSE), mAssetStatus(PREVIEW_ASSET_UNLOADED), - mItem(NULL) + mItem(NULL), + mDirty(TRUE) { // don't add to instance list, since ItemID is null mAuxItem = new LLInventoryItem; // (LLPointer is auto-deleted) // don't necessarily steal focus on creation -- sometimes these guys pop up without user action mAutoFocus = FALSE; + gInventory.addObserver(this); } LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize, S32 min_width, S32 min_height, LLPointer inv_item ) @@ -84,7 +86,8 @@ LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::str mUserResized(FALSE), mCloseAfterSave(FALSE), mAssetStatus(PREVIEW_ASSET_UNLOADED), - mItem(inv_item) + mItem(inv_item), + mDirty(TRUE) { mAuxItem = new LLInventoryItem; // don't necessarily steal focus on creation -- sometimes these guys pop up without user action @@ -94,7 +97,7 @@ LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::str { sInstances[mItemUUID] = this; } - + gInventory.addObserver(this); } LLPreview::~LLPreview() @@ -118,6 +121,7 @@ LLPreview::~LLPreview() } } } + gInventory.removeObserver(this); } void LLPreview::setItemID(const LLUUID& item_id) @@ -215,6 +219,7 @@ void LLPreview::onCommit() { new_item->updateServer(FALSE); gInventory.updateItem(new_item); + gInventory.notifyObservers(); // If the item is an attachment that is currently being worn, // update the object itself. @@ -238,6 +243,34 @@ void LLPreview::onCommit() } } +void LLPreview::changed(U32 mask) +{ + mDirty = TRUE; +} + +void LLPreview::draw() +{ + LLFloater::draw(); + if (mDirty) + { + mDirty = FALSE; + const LLViewerInventoryItem *item = getItem(); + if (item) + { + refreshFromItem(item); + } + } +} + +void LLPreview::refreshFromItem(const LLInventoryItem* item) +{ + setTitle(llformat("%s: %s",getTitleName(),item->getName().c_str())); + childSetText("desc",item->getDescription()); + + BOOL can_agent_manipulate = item->getPermissions().allowModifyBy(gAgent.getID()); + childSetEnabled("desc",can_agent_manipulate); +} + // static void LLPreview::onText(LLUICtrl*, void* userdata) { diff --git a/linden/indra/newview/llpreview.h b/linden/indra/newview/llpreview.h index d32a1b8..8a4a434 100644 --- a/linden/indra/newview/llpreview.h +++ b/linden/indra/newview/llpreview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -38,6 +38,7 @@ #include "lluuid.h" #include "llviewerinventory.h" #include "lltabcontainer.h" +#include "llinventorymodel.h" #include class LLLineEditor; @@ -61,7 +62,7 @@ protected: static std::map sAutoOpenPreviewHandles; }; -class LLPreview : public LLFloater +class LLPreview : public LLFloater, LLInventoryObserver { public: typedef enum e_asset_status @@ -116,6 +117,10 @@ public: void setNotecardInfo(const LLUUID& notecard_inv_id, const LLUUID& object_id) { mNotecardInventoryID = notecard_inv_id; mObjectID = object_id; } + // llview + virtual void draw(); + void refreshFromItem(const LLInventoryItem* item); + protected: virtual void onCommit(); @@ -124,7 +129,11 @@ protected: static void onText(LLUICtrl*, void* userdata); static void onRadio(LLUICtrl*, void* userdata); - + // for LLInventoryObserver + virtual void changed(U32 mask); + BOOL mDirty; + virtual const char *getTitleName() const { return "Preview"; } + protected: LLUUID mItemUUID; LLUUID mSourceID; diff --git a/linden/indra/newview/llpreviewanim.cpp b/linden/indra/newview/llpreviewanim.cpp index 572d6b4..58478c8 100644 --- a/linden/indra/newview/llpreviewanim.cpp +++ b/linden/indra/newview/llpreviewanim.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llpreviewanim.h b/linden/indra/newview/llpreviewanim.h index 5e2145d..430bc62 100644 --- a/linden/indra/newview/llpreviewanim.h +++ b/linden/indra/newview/llpreviewanim.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,7 +50,8 @@ public: protected: virtual void onClose(bool app_quitting); - + virtual const char *getTitleName() const { return "Animation"; } + LLAnimPauseRequest mPauseRequest; LLUUID mItemID; LLString mTitle; diff --git a/linden/indra/newview/llpreviewgesture.cpp b/linden/indra/newview/llpreviewgesture.cpp index 0d2c97a..1bd86fc 100644 --- a/linden/indra/newview/llpreviewgesture.cpp +++ b/linden/indra/newview/llpreviewgesture.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -955,6 +955,11 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs, } else { + // Get missing gesture's name. Use UUID if name can't be found. + LLStringBase::format_map_t args; + LLInventoryItem *item = gInventory.getItem( *item_idp ); + args["[NAME]"] = item ? item->getName() : LLString( item_idp->asString() ); + if( gViewerStats ) { gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); @@ -963,11 +968,11 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs, if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifyBox::showXml("GestureMissing"); + LLNotifyBox::showXml("GestureMissing", args); } else { - LLNotifyBox::showXml("UnableToLoadGesture"); + LLNotifyBox::showXml("UnableToLoadGesture", args); } llwarns << "Problem loading gesture: " << status << llendl; @@ -1602,7 +1607,7 @@ void LLPreviewGesture::onClickAdd(void* data) if (!library_item) return; const LLScrollListCell* library_cell = library_item->getColumn(0); - const std::string& library_text = library_cell->getText(); + const std::string& library_text = library_cell->getValue().asString(); self->addStep(library_text); diff --git a/linden/indra/newview/llpreviewgesture.h b/linden/indra/newview/llpreviewgesture.h index b607899..ea26769 100644 --- a/linden/indra/newview/llpreviewgesture.h +++ b/linden/indra/newview/llpreviewgesture.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -137,6 +137,8 @@ protected: static void onDonePreview(LLMultiGesture* gesture, void* data); + virtual const char *getTitleName() const { return "Gesture"; } + protected: // LLPreview contains mDescEditor LLLineEditor* mTriggerEditor; diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp index 6f47137..0d9a298 100644 --- a/linden/indra/newview/llpreviewlandmark.cpp +++ b/linden/indra/newview/llpreviewlandmark.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -109,7 +109,6 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name, LLPreviewLandmark::sOrderedInstances.push_back( this ); } - LLPreviewLandmark::~LLPreviewLandmark() { LLPreviewLandmarkList::iterator this_itr; @@ -186,7 +185,7 @@ void LLPreviewLandmark::draw() } } - LLFloater::draw(); + LLPreview::draw(); } } diff --git a/linden/indra/newview/llpreviewlandmark.h b/linden/indra/newview/llpreviewlandmark.h index ee21d5e..5ec2b5a 100644 --- a/linden/indra/newview/llpreviewlandmark.h +++ b/linden/indra/newview/llpreviewlandmark.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -86,6 +86,8 @@ public: protected: void getDegreesAndDist(F32* degrees, F64* horiz_dist, F64* vert_dist) const; + virtual const char *getTitleName() const { return "Landmark"; } + private: // void renderBeacon(); // LLPointer mBeaconText; diff --git a/linden/indra/newview/llpreviewnotecard.cpp b/linden/indra/newview/llpreviewnotecard.cpp index cc5af06..1f0c9dc 100644 --- a/linden/indra/newview/llpreviewnotecard.cpp +++ b/linden/indra/newview/llpreviewnotecard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -148,6 +148,10 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name, gAgent.changeCameraToDefault(); } +LLPreviewNotecard::~LLPreviewNotecard() +{ +} + BOOL LLPreviewNotecard::postBuild() { LLViewerTextEditor *ed = (LLViewerTextEditor *)gUICtrlFactory->getTextEditorByName(this, "Notecard Editor"); @@ -213,7 +217,7 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask, return TRUE; } } - return FALSE; + return LLPreview::handleKeyHere(key, mask, called_from_parent); } // virtual diff --git a/linden/indra/newview/llpreviewnotecard.h b/linden/indra/newview/llpreviewnotecard.h index 5d4648a..6977da4 100644 --- a/linden/indra/newview/llpreviewnotecard.h +++ b/linden/indra/newview/llpreviewnotecard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -54,7 +54,8 @@ public: const LLUUID& asset_id = LLUUID::null, BOOL show_keep_discard = FALSE, LLPointer inv_item = NULL); - + virtual ~LLPreviewNotecard(); + // llpreview virtual bool saveItem(LLPointer* itemptr); @@ -102,6 +103,8 @@ protected: static void handleSaveChangesDialog(S32 option, void* userdata); + virtual const char *getTitleName() const { return "Note"; } + protected: LLViewerTextEditor* mEditor; LLButton* mSaveBtn; diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp index 68af0ce..3e2a476 100644 --- a/linden/indra/newview/llpreviewscript.cpp +++ b/linden/indra/newview/llpreviewscript.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -960,7 +960,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data) S32 row = 0; S32 column = 0; const LLScrollListCell* cell = item->getColumn(0); - LLString line(cell->getText()); + LLString line(cell->getValue().asString()); line.erase(0, 1); LLString::replaceChar(line, ',',' '); LLString::replaceChar(line, ')',' '); @@ -1134,8 +1134,8 @@ LLPreviewLSL::LLPreviewLSL(const std::string& name, const LLRect& rect, void LLPreviewLSL::callbackLSLCompileSucceeded() { llinfos << "LSL Bytecode saved" << llendl; - mScriptEd->mErrorList->addSimpleItem("Compile successful!"); - mScriptEd->mErrorList->addSimpleItem("Save complete."); + mScriptEd->mErrorList->addCommentText("Compile successful!"); + mScriptEd->mErrorList->addCommentText("Save complete."); closeIfNeeded(); } @@ -1681,8 +1681,8 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, bool is_script_running) { lldebugs << "LSL Bytecode saved" << llendl; - mScriptEd->mErrorList->addSimpleItem("Compile successful!"); - mScriptEd->mErrorList->addSimpleItem("Save complete."); + mScriptEd->mErrorList->addCommentText("Compile successful!"); + mScriptEd->mErrorList->addCommentText("Save complete."); closeIfNeeded(); } @@ -2207,7 +2207,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, else { llinfos << "Compile worked!" << llendl; - mScriptEd->mErrorList->addSimpleItem("Compile successful, saving..."); + mScriptEd->mErrorList->addCommentText("Compile successful, saving..."); if(gAssetStorage) { llinfos << "LLLiveLSLEditor::saveAsset " @@ -2281,7 +2281,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use if(self) { // Tell the user that the compile worked. - self->mScriptEd->mErrorList->addSimpleItem("Save complete."); + self->mScriptEd->mErrorList->addCommentText("Save complete."); // close the window if this completes both uploads self->getWindow()->decBusyCount(); self->mPendingUploads--; diff --git a/linden/indra/newview/llpreviewscript.h b/linden/indra/newview/llpreviewscript.h index ac7b5f8..92d56f8 100644 --- a/linden/indra/newview/llpreviewscript.h +++ b/linden/indra/newview/llpreviewscript.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -128,6 +128,8 @@ protected: static void onErrorList(LLUICtrl*, void* user_data); + virtual const char *getTitleName() const { return "Script"; } + private: LLString mSampleText; std::string mHelpFile; @@ -189,6 +191,8 @@ protected: protected: + + virtual const char *getTitleName() const { return "Script"; } LLScriptEdCore* mScriptEd; // Can safely close only after both text and bytecode are uploaded S32 mPendingUploads; diff --git a/linden/indra/newview/llpreviewsound.cpp b/linden/indra/newview/llpreviewsound.cpp index 766cfb7..212ceb9 100644 --- a/linden/indra/newview/llpreviewsound.cpp +++ b/linden/indra/newview/llpreviewsound.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -106,7 +106,7 @@ void LLPreviewSound::auditionSound( void *userdata ) if(item && gAudiop) { LLVector3d lpos_global = gAgent.getPositionGlobal(); - F32 volume = SOUND_GAIN * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : SOUND_GAIN * gSavedSettings.getF32("AudioLevelSFX"); gAudiop->triggerSound(item->getAssetUUID(), gAgent.getID(), volume, lpos_global); } } diff --git a/linden/indra/newview/llpreviewsound.h b/linden/indra/newview/llpreviewsound.h index 9c75ddb..8557b5e 100644 --- a/linden/indra/newview/llpreviewsound.h +++ b/linden/indra/newview/llpreviewsound.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -44,6 +44,9 @@ public: static void playSound( void* userdata ); static void auditionSound( void* userdata ); +protected: + virtual const char *getTitleName() const { return "Sound"; } + }; #endif // LL_LLPREVIEWSOUND_H diff --git a/linden/indra/newview/llpreviewtexture.cpp b/linden/indra/newview/llpreviewtexture.cpp index 245085e..d309d4a 100644 --- a/linden/indra/newview/llpreviewtexture.cpp +++ b/linden/indra/newview/llpreviewtexture.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -286,7 +286,7 @@ void LLPreviewTexture::draw() LLFontGL::DROP_SHADOW); } } - } + } } } diff --git a/linden/indra/newview/llpreviewtexture.h b/linden/indra/newview/llpreviewtexture.h index 20f56b1..4930368 100644 --- a/linden/indra/newview/llpreviewtexture.h +++ b/linden/indra/newview/llpreviewtexture.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -80,6 +80,8 @@ protected: void init(); void updateAspectRatio(); + virtual const char *getTitleName() const { return "Texture"; } + protected: LLUUID mImageID; LLPointer mImage; diff --git a/linden/indra/newview/llprogressview.cpp b/linden/indra/newview/llprogressview.cpp index 142740d..c319e59 100644 --- a/linden/indra/newview/llprogressview.cpp +++ b/linden/indra/newview/llprogressview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llprogressview.h b/linden/indra/newview/llprogressview.h index 39b4328..2573bd1 100644 --- a/linden/indra/newview/llprogressview.h +++ b/linden/indra/newview/llprogressview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llregionposition.cpp b/linden/indra/newview/llregionposition.cpp index 155b899..49a747e 100644 --- a/linden/indra/newview/llregionposition.cpp +++ b/linden/indra/newview/llregionposition.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llregionposition.h b/linden/indra/newview/llregionposition.h index f9a3743..bccf1a8 100644 --- a/linden/indra/newview/llregionposition.h +++ b/linden/indra/newview/llregionposition.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llremoteparcelrequest.cpp b/linden/indra/newview/llremoteparcelrequest.cpp index 658fa11..abc6569 100644 --- a/linden/indra/newview/llremoteparcelrequest.cpp +++ b/linden/indra/newview/llremoteparcelrequest.cpp @@ -1,17 +1,29 @@ -/** - * @file llparcelrequest.cpp - * @brief Implementation of the LLParcelRequest class. +/** + * @file llremoteparcelrequest.cpp + * @author Sam Kolb + * @brief Get information about a parcel you aren't standing in to display + * landmark/teleport information. * - * $LicenseInfo:firstyear=2006&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2006-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, diff --git a/linden/indra/newview/llremoteparcelrequest.h b/linden/indra/newview/llremoteparcelrequest.h index 1fc3781..fe48021 100644 --- a/linden/indra/newview/llremoteparcelrequest.h +++ b/linden/indra/newview/llremoteparcelrequest.h @@ -1,17 +1,29 @@ /** - * @file lleventpoll.h - * @brief LLEvDescription of the LLEventPoll class. + * @file llremoteparcelrequest.h + * @author Sam Kolb + * @brief Get information about a parcel you aren't standing in to display + * landmark/teleport information. * - * $LicenseInfo:firstyear=2006&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2006-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, diff --git a/linden/indra/newview/llresourcedata.h b/linden/indra/newview/llresourcedata.h index adc5a37..d6c6ee1 100644 --- a/linden/indra/newview/llresourcedata.h +++ b/linden/indra/newview/llresourcedata.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llroam.cpp b/linden/indra/newview/llroam.cpp index 3ee1f5e..90c92d0 100644 --- a/linden/indra/newview/llroam.cpp +++ b/linden/indra/newview/llroam.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llroam.h b/linden/indra/newview/llroam.h index 4e71585..32eedb8 100644 --- a/linden/indra/newview/llroam.h +++ b/linden/indra/newview/llroam.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsavedsettingsglue.cpp b/linden/indra/newview/llsavedsettingsglue.cpp index 3f22911..e6f3044 100644 --- a/linden/indra/newview/llsavedsettingsglue.cpp +++ b/linden/indra/newview/llsavedsettingsglue.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsavedsettingsglue.h b/linden/indra/newview/llsavedsettingsglue.h index f628b8f..e3a53dc 100644 --- a/linden/indra/newview/llsavedsettingsglue.h +++ b/linden/indra/newview/llsavedsettingsglue.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 7d7ae79..6ddae78 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -3994,7 +3994,11 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name, switch(send_type) { case SEND_ONLY_ROOTS: - getSelection()->applyToRootNodes(&pusheditable); + if(message_name == "ObjectBuy") + getSelection()->applyToRootNodes(&pushroots); + else + getSelection()->applyToRootNodes(&pusheditable); + break; case SEND_INDIVIDUALS: getSelection()->applyToNodes(&pushall); @@ -6063,23 +6067,19 @@ LLViewerObject* LLObjectSelection::getFirstDeleteableObject() bool apply(LLSelectNode* node) { LLViewerObject* obj = node->getObject(); - // you can delete an object if permissions allow it, you are - // the owner, you are an officer in the group that owns the - // object, or you are not the owner but it is on land you own - // or land owned by your group. (whew!) + // you can delete an object if you are the owner + // or you have permission to modify it. if( (obj->permModify()) || (obj->permYouOwner()) || (!obj->permAnyOwner()) // public - || (obj->isOverAgentOwnedLand()) - || (obj->isOverGroupOwnedLand()) ) { if( !obj->isAttachment() ) { - return TRUE; + return true; } } - return true; + return false; } } func; LLSelectNode* node = getFirstNode(&func); diff --git a/linden/indra/newview/llselectmgr.h b/linden/indra/newview/llselectmgr.h index 98e1009..9cb107c 100644 --- a/linden/indra/newview/llselectmgr.h +++ b/linden/indra/newview/llselectmgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsky.cpp b/linden/indra/newview/llsky.cpp index fcb8d39..3f4189f 100644 --- a/linden/indra/newview/llsky.cpp +++ b/linden/indra/newview/llsky.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsky.h b/linden/indra/newview/llsky.h index 472dcbb..dab9c09 100644 --- a/linden/indra/newview/llsky.h +++ b/linden/indra/newview/llsky.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index d326f79..656b236 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llspatialpartition.h b/linden/indra/newview/llspatialpartition.h index 5f31ec3..1936423 100644 --- a/linden/indra/newview/llspatialpartition.h +++ b/linden/indra/newview/llspatialpartition.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsphere.cpp b/linden/indra/newview/llsphere.cpp index 71c21f2..663537c 100644 --- a/linden/indra/newview/llsphere.cpp +++ b/linden/indra/newview/llsphere.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsphere.h b/linden/indra/newview/llsphere.h index 1db95c2..3a827c9 100644 --- a/linden/indra/newview/llsphere.h +++ b/linden/indra/newview/llsphere.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsprite.cpp b/linden/indra/newview/llsprite.cpp index 370f5fb..bb78f1a 100644 --- a/linden/indra/newview/llsprite.cpp +++ b/linden/indra/newview/llsprite.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsprite.h b/linden/indra/newview/llsprite.h index dce69ee..f6e392a 100644 --- a/linden/indra/newview/llsprite.h +++ b/linden/indra/newview/llsprite.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsrv.cpp b/linden/indra/newview/llsrv.cpp index 125c090..275bb9f 100644 --- a/linden/indra/newview/llsrv.cpp +++ b/linden/indra/newview/llsrv.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsrv.h b/linden/indra/newview/llsrv.h index 8f450d3..980aef7 100644 --- a/linden/indra/newview/llsrv.h +++ b/linden/indra/newview/llsrv.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 98f1658..07aefad 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -72,7 +72,6 @@ #include "lluserrelations.h" #include "llversionviewer.h" #include "llvfs.h" -#include "llwindow.h" // for shell_open #include "llxorcipher.h" // saved password, MAC address #include "message.h" #include "v3math.h" @@ -123,6 +122,7 @@ #include "llpanelgroupnotices.h" #include "llpreview.h" #include "llpreviewscript.h" +#include "llsecondlifeurls.h" #include "llselectmgr.h" #include "llsky.h" #include "llsrv.h" @@ -154,6 +154,7 @@ #include "llviewerwindow.h" #include "llvoavatar.h" #include "llvoclouds.h" +#include "llweb.h" #include "llworld.h" #include "llworldmap.h" #include "llxfermanager.h" @@ -167,7 +168,6 @@ #include "llnamelistctrl.h" #include "llnamebox.h" #include "llnameeditor.h" -#include "llurlsimstring.h" #if LL_LIBXUL_ENABLED #include "llmozlib.h" @@ -351,6 +351,7 @@ BOOL idle_startup() static S32 location_which = START_LOCATION_ID_LAST; static BOOL show_connect_box = TRUE; + static BOOL remember_password = TRUE; static BOOL stipend_since_login = FALSE; @@ -583,7 +584,28 @@ BOOL idle_startup() #endif // LL_LINUX // initialize Mozilla - pass in executable dir, location of extra dirs (chrome/, greprefs/, plugins/ etc.) and path to profile dir) - LLMozLib::getInstance()->init( gDirUtilp->getExecutableDir(), componentDir, gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ) ); + + std::string application_dir; + std::string component_dir; + std::string profile_dir; + +#if LL_WINDOWS + // Fix strings passed into Mozilla; it expects local-codepage mbcs paths rather than UTF8 + llutf16string temp_16str = utf8str_to_utf16str( gDirUtilp->getExecutableDir() ); + application_dir = ll_convert_wide_to_string( (const wchar_t*) temp_16str.c_str() ); + + temp_16str = utf8str_to_utf16str( componentDir ); + component_dir = ll_convert_wide_to_string( (const wchar_t*) temp_16str.c_str() ); + + temp_16str = utf8str_to_utf16str( gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ).c_str() ); + profile_dir = ll_convert_wide_to_string( (const wchar_t*) temp_16str.c_str() ); +#else + application_dir = gDirUtilp->getExecutableDir().c_str(); + component_dir = componentDir.c_str(); + profile_dir = gDirUtilp->getExpandedFilename( LL_PATH_MOZILLA_PROFILE, "" ).c_str(); +#endif + + LLMozLib::getInstance()->init( application_dir, componentDir, profile_dir ); #if LL_LINUX setlocale(LC_ALL, saved_locale.c_str() ); @@ -655,7 +677,17 @@ BOOL idle_startup() firstname = gCmdLineFirstName; lastname = gCmdLineLastName; + LLMD5 pass((unsigned char*)gCmdLinePassword.c_str()); + char md5pass[33]; /* Flawfinder: ignore */ + pass.hex_digest(md5pass); + password = md5pass; + remember_password = gSavedSettings.getBOOL("RememberPassword"); + +#ifdef USE_VIEWER_AUTH show_connect_box = TRUE; +#else + show_connect_box = FALSE; +#endif gAutoLogin = TRUE; } else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin")) @@ -664,7 +696,13 @@ BOOL idle_startup() lastname = gSavedSettings.getString("LastName"); password = load_password_from_disk(); gSavedSettings.setBOOL("RememberPassword", TRUE); + remember_password = TRUE; + +#ifdef USE_VIEWER_AUTH show_connect_box = TRUE; +#else + show_connect_box = FALSE; +#endif } else { @@ -673,6 +711,7 @@ BOOL idle_startup() firstname = gSavedSettings.getString("FirstName"); lastname = gSavedSettings.getString("LastName"); password = load_password_from_disk(); + remember_password = gSavedSettings.getBOOL("RememberPassword"); show_connect_box = TRUE; } @@ -694,6 +733,9 @@ BOOL idle_startup() if (show_connect_box) { + // Load all the name information out of the login view + LLPanelLogin::getFields(firstname, lastname, password, remember_password); + if (gNoRender) { llerrs << "Need to autologin or use command line with norender!" << llendl; @@ -703,6 +745,8 @@ BOOL idle_startup() // Show the login dialog login_show(); + // connect dialog is already shown, so fill in the names + LLPanelLogin::setFields( firstname, lastname, password, remember_password ); LLPanelLogin::giveFocus(); @@ -768,6 +812,11 @@ BOOL idle_startup() if (show_connect_box) { + // TODO if not use viewer auth + // Load all the name information out of the login view + LLPanelLogin::getFields(firstname, lastname, password, remember_password); + // end TODO + // HACK: Try to make not jump on login gKeyboard->resetKeys(); } @@ -777,6 +826,16 @@ BOOL idle_startup() gSavedSettings.setString("FirstName", firstname); gSavedSettings.setString("LastName", lastname); + if (remember_password) + { + save_password_to_disk(password.c_str()); + } + else + { + save_password_to_disk(NULL); + } + gSavedSettings.setBOOL("RememberPassword", remember_password); + llinfos << "Attempting login as: " << firstname << " " << lastname << llendl; gDebugInfo["LoginName"] = firstname + " " + lastname; } @@ -823,13 +882,36 @@ BOOL idle_startup() if (show_connect_box) { + // TODO only set loginuri based on server choice if ! USE_VIEWER_AUTH + LLString server_label; + S32 domain_name_index; + BOOL user_picked_server = LLPanelLogin::getServer( server_label, domain_name_index ); + gGridChoice = (EGridInfo) domain_name_index; + gSavedSettings.setS32("ServerChoice", gGridChoice); + if (gGridChoice == GRID_INFO_OTHER) + { + snprintf(gGridName, MAX_STRING, "%s", server_label.c_str());/* Flawfinder: ignore */ + } + + if ( user_picked_server ) + { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gGridChoice + sAuthUris.clear(); + LLAppViewer::instance()->resetURIs(); + } + + LLString location; + LLPanelLogin::getLocation( location ); + LLURLSimString::setString( location ); + // END TODO LLPanelLogin::close(); } //For HTML parsing in text boxes. LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") ); - LLTextEditor::setURLCallbacks ( &LLWeb::loadURL, &LLURLDispatcher::dispatch, &LLURLDispatcher::dispatch ); + LLTextEditor::setURLCallbacks ( &LLWeb::loadURL, + &LLURLDispatcher::dispatchFromTextEditor, + &LLURLDispatcher::dispatchFromTextEditor ); //------------------------------------------------- // Handle startup progress screen @@ -933,9 +1015,15 @@ BOOL idle_startup() gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.push_back("god-connect"); } - LLAppViewer::instance()->getLoginURIs(); - sAuthUris = LLAppViewer::instance()->getLoginURIs(); - + const std::vector& uris = LLAppViewer::instance()->getLoginURIs(); + std::vector::const_iterator iter, end; + for (iter = uris.begin(), end = uris.end(); iter != end; ++iter) + { + std::vector rewritten; + rewritten = LLSRV::rewriteURI(*iter); + sAuthUris.insert(sAuthUris.end(), + rewritten.begin(), rewritten.end()); + } sAuthUriNum = 0; auth_method = "login_to_simulator"; auth_desc = "Logging in. "; @@ -979,12 +1067,14 @@ BOOL idle_startup() hashed_mac.finalize(); hashed_mac.hex_digest(hashed_mac_string); + // TODO if statement here to use web_login_key gUserAuthp->authenticate( sAuthUris[sAuthUriNum].c_str(), auth_method.c_str(), firstname.c_str(), lastname.c_str(), - web_login_key, + // web_login_key, + password.c_str(), start.str().c_str(), gSkipOptionalUpdate, gAcceptTOS, @@ -1256,7 +1346,16 @@ BOOL idle_startup() if(text) lastname.assign(text); gSavedSettings.setString("FirstName", firstname); gSavedSettings.setString("LastName", lastname); - + + if (remember_password) + { + save_password_to_disk(password.c_str()); + } + else + { + save_password_to_disk(NULL); + } + gSavedSettings.setBOOL("RememberPassword", remember_password); gSavedSettings.setBOOL("LoginLastLocation", gSavedSettings.getBOOL("LoginLastLocation")); text = gUserAuthp->getResponse("agent_access"); @@ -1461,6 +1560,8 @@ BOOL idle_startup() reset_login(); gAutoLogin = FALSE; show_connect_box = TRUE; + // Don't save an incorrect password to disk. + save_password_to_disk(NULL); } return do_normal_idle; } @@ -1747,8 +1848,8 @@ BOOL idle_startup() } else { - //llinfos << "######### QuickTime version (hex) is " << std::hex << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; - //llinfos << "######### QuickTime version is " << std::dec << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + llinfos << "QUICKTIME> QuickTime version (hex) is " << std::hex << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + llinfos << "QUICKTIME> QuickTime version is " << std::dec << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; if ( LLMediaEngine::getInstance()->getQuickTimeVersion() < LL_MIN_QUICKTIME_VERSION ) { // turn off QuickTime if version is less than required @@ -1764,6 +1865,8 @@ BOOL idle_startup() }; }; #elif LL_DARWIN + llinfos << "QUICKTIME> QuickTime version (hex) is " << std::hex << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + llinfos << "QUICKTIME> QuickTime version is " << std::dec << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; if ( LLMediaEngine::getInstance()->getQuickTimeVersion() < LL_MIN_QUICKTIME_VERSION ) { // turn off QuickTime if version is less than required @@ -2156,7 +2259,6 @@ BOOL idle_startup() msg->setHandlerFuncFast(_PREHASH_PreloadSound, process_preload_sound); msg->setHandlerFuncFast(_PREHASH_AttachedSound, process_attached_sound); msg->setHandlerFuncFast(_PREHASH_AttachedSoundGainChange, process_attached_sound_gain_change); - //msg->setHandlerFuncFast(_PREHASH_AttachedSoundCutoffRadius, process_attached_sound_cutoff_radius); llinfos << "Initialization complete" << llendl; @@ -2201,7 +2303,7 @@ BOOL idle_startup() else { args["[TYPE]"] = "home"; - args["[HELP]"] = "\nYou may want to set a new home location."; + args["[HELP]"] = "You may want to set a new home location."; } gViewerWindow->alertXml("AvatarMoved", args); } @@ -2339,7 +2441,7 @@ BOOL idle_startup() audio_update_volume(); // reset keyboard focus to sane state of pointing at world - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); #if 0 // sjb: enable for auto-enabling timer display gDebugView->mFastTimerView->setVisible(TRUE); @@ -2373,12 +2475,76 @@ void login_show() // UI textures have been previously loaded in doPreloadImages() llinfos << "Setting Servers" << llendl; + + if( GRID_INFO_OTHER == gGridChoice ) + { + LLPanelLogin::addServer( gGridName, GRID_INFO_OTHER ); + } + else + { + LLPanelLogin::addServer( gGridInfo[gGridChoice].mLabel, gGridChoice ); + } + + // Arg! We hate loops! + LLPanelLogin::addServer( gGridInfo[GRID_INFO_ADITI].mLabel, GRID_INFO_ADITI ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_AGNI].mLabel, GRID_INFO_AGNI ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_ARUNA].mLabel, GRID_INFO_ARUNA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_DURGA].mLabel, GRID_INFO_DURGA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_GANGA].mLabel, GRID_INFO_GANGA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_MITRA].mLabel, GRID_INFO_MITRA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_MOHINI].mLabel, GRID_INFO_MOHINI ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_NANDI].mLabel, GRID_INFO_NANDI ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_RADHA].mLabel, GRID_INFO_RADHA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_RAVI].mLabel, GRID_INFO_RAVI ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_SIVA].mLabel, GRID_INFO_SIVA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_SHAKTI].mLabel, GRID_INFO_SHAKTI ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_SOMA].mLabel, GRID_INFO_SOMA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_UMA].mLabel, GRID_INFO_UMA ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_VAAK].mLabel, GRID_INFO_VAAK ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_YAMI].mLabel, GRID_INFO_YAMI ); + LLPanelLogin::addServer( gGridInfo[GRID_INFO_LOCAL].mLabel, GRID_INFO_LOCAL ); } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. void login_callback(S32 option, void *userdata) { + const S32 CONNECT_OPTION = 0; + const S32 QUIT_OPTION = 1; + if (CONNECT_OPTION == option) + { + LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); + return; + } + else if (QUIT_OPTION == option) + { + // Make sure we don't save the password if the user is trying to clear it. + LLString first, last, password; + BOOL remember = TRUE; + LLPanelLogin::getFields(first, last, password, remember); + if (!remember) + { + // turn off the setting and write out to disk + gSavedSettings.setBOOL("RememberPassword", FALSE); + gSavedSettings.saveToFile(gSettingsFileName, TRUE); + + // stomp the saved password on disk + save_password_to_disk(NULL); + } + + // Next iteration through main loop should shut down the app cleanly. + LLAppViewer::instance()->userQuit(); + + if (LLAppViewer::instance()->quitRequested()) + { + LLPanelLogin::close(); + } + return; + } + else + { + llwarns << "Unknown login button clicked" << llendl; + } } LLString load_password_from_disk() @@ -2531,17 +2697,22 @@ void set_startup_status(const F32 frac, const char *string, const char* msg) void login_alert_status(S32 option, void* user_data) { - if (0 == option) - { - // OK button - } - else if (1 == option) - { - // Help button - std::string help_path; - help_path = gDirUtilp->getExpandedFilename(LL_PATH_HELP, "unable_to_connect.html"); - load_url_local_file(help_path.c_str() ); - } + // Buttons + switch( option ) + { + case 0: // OK + break; + case 1: // Help + LLWeb::loadURL( SUPPORT_URL ); + break; + case 2: // Teleport + // Restart the login process, starting at our home locaton + LLURLSimString::setString(LLURLSimString::sLocationStringHome); + LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); + break; + default: + llwarns << "Missing case in login_alert_status switch" << llendl; + } LLPanelLogin::giveFocus(); } @@ -2810,7 +2981,6 @@ void register_viewer_callbacks(LLMessageSystem* msg) msg->setHandlerFuncFast(_PREHASH_MeanCollisionAlert, process_mean_collision_alert_message, NULL); msg->setHandlerFunc("ViewerFrozenMessage", process_frozen_message); - //msg->setHandlerFuncFast(_PREHASH_RequestAvatarInfo, process_avatar_info_request); msg->setHandlerFuncFast(_PREHASH_NameValuePair, process_name_value); msg->setHandlerFuncFast(_PREHASH_RemoveNameValuePair, process_remove_name_value); msg->setHandlerFuncFast(_PREHASH_AvatarAnimation, process_avatar_animation); @@ -3641,7 +3811,8 @@ bool LLStartUp::dispatchURL() // ok, if we've gotten this far and have a startup URL if (!sSLURLCommand.empty()) { - LLURLDispatcher::dispatch(sSLURLCommand); + const bool from_external_browser = true; + LLURLDispatcher::dispatch(sSLURLCommand, from_external_browser); } else if (LLURLSimString::parse()) { @@ -3657,7 +3828,8 @@ bool LLStartUp::dispatchURL() || (dy*dy > SLOP*SLOP) ) { std::string url = LLURLSimString::getURL(); - LLURLDispatcher::dispatch(url); + const bool from_external_browser = true; + LLURLDispatcher::dispatch(url, from_external_browser); } return true; } diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h index 80f470a..872efba 100644 --- a/linden/indra/newview/llstartup.h +++ b/linden/indra/newview/llstartup.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstatbar.cpp b/linden/indra/newview/llstatbar.cpp index 8d24127..ceb9659 100644 --- a/linden/indra/newview/llstatbar.cpp +++ b/linden/indra/newview/llstatbar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstatbar.h b/linden/indra/newview/llstatbar.h index 2a2ffb5..7969454 100644 --- a/linden/indra/newview/llstatbar.h +++ b/linden/indra/newview/llstatbar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstatgraph.cpp b/linden/indra/newview/llstatgraph.cpp index b7497ce..910f85b 100644 --- a/linden/indra/newview/llstatgraph.cpp +++ b/linden/indra/newview/llstatgraph.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstatgraph.h b/linden/indra/newview/llstatgraph.h index 914b205..2c71e4d 100644 --- a/linden/indra/newview/llstatgraph.h +++ b/linden/indra/newview/llstatgraph.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index d7b60d9..29335d9 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -100,7 +100,6 @@ const LLColor4 SIM_WARN_COLOR(1.f, 1.f, 0.f, 1.f); const LLColor4 SIM_FULL_COLOR(1.f, 0.f, 0.f, 1.f); const F32 ICON_TIMER_EXPIRY = 3.f; // How long the balance and health icons should flash after a change. const F32 ICON_FLASH_FREQUENCY = 2.f; -const S32 GRAPHIC_FUDGE = 4; const S32 TEXT_HEIGHT = 18; static void onClickParcelInfo(void*); @@ -153,13 +152,13 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect) childSetAction("scriptout", onClickScriptDebug, this); childSetAction("health", onClickHealth, this); - childSetAction("fly", onClickFly, this); + childSetAction("no_fly", onClickFly, this); childSetAction("buyland", onClickBuyLand, this ); childSetAction("buycurrency", onClickBuyCurrency, this ); - childSetAction("build", onClickBuild, this ); - childSetAction("scripts", onClickScripts, this ); + childSetAction("no_build", onClickBuild, this ); + childSetAction("no_scripts", onClickScripts, this ); childSetAction("restrictpush", onClickPush, this ); - childSetAction("status_voice", onClickVoice, this ); + childSetAction("status_no_voice", onClickVoice, this ); childSetCommitCallback("search_editor", onCommitSearch, this); childSetAction("search_btn", onClickSearch, this); @@ -304,7 +303,7 @@ void LLStatusBar::refresh() // Health childGetRect( "health", buttonRect ); - r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight()); + r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight()); childSetRect("health", r); x += buttonRect.getWidth(); @@ -324,27 +323,32 @@ void LLStatusBar::refresh() (parcel && !parcel->getAllowFly()) ) { // No Fly Zone - childGetRect( "fly", buttonRect ); - childSetVisible( "fly", true ); - r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight()); - childSetRect( "fly", r ); + childGetRect( "no_fly", buttonRect ); + childSetVisible( "no_fly", true ); + r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight()); + childSetRect( "no_fly", r ); x += buttonRect.getWidth(); } else { - childSetVisible("fly", false); + // Fly Zone + childSetVisible("no_fly", false); } BOOL no_build = parcel && !parcel->getAllowModify(); - childSetVisible("build", no_build); if (no_build) { - childGetRect( "build", buttonRect ); + childSetVisible("no_build", TRUE); + childGetRect( "no_build", buttonRect ); // No Build Zone - r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight()); - childSetRect( "build", r ); + r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight()); + childSetRect( "no_build", r ); x += buttonRect.getWidth(); } + else + { + childSetVisible("no_build", FALSE); + } BOOL no_scripts = FALSE; if((region @@ -354,35 +358,56 @@ void LLStatusBar::refresh() { no_scripts = TRUE; } - childSetVisible("scripts", no_scripts); if (no_scripts) { // No scripts - childGetRect( "scripts", buttonRect ); - r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight()); - childSetRect( "scripts", r ); + childSetVisible("no_scripts", TRUE); + childGetRect( "no_scripts", buttonRect ); + r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight()); + childSetRect( "no_scripts", r ); x += buttonRect.getWidth(); } + else + { + // Yes scripts + childSetVisible("no_scripts", FALSE); + } BOOL no_region_push = (region && region->getRestrictPushObject()); BOOL no_push = no_region_push || (parcel && parcel->getRestrictPushObject()); - childSetVisible("restrictpush", no_push); if (no_push) { + childSetVisible("restrictpush", TRUE); childGetRect( "restrictpush", buttonRect ); - r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight()); + r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight()); childSetRect( "restrictpush", r ); x += buttonRect.getWidth(); } + else + { + childSetVisible("restrictpush", FALSE); + } - BOOL have_voice = gVoiceClient->getAreaVoiceDisabled() ? FALSE : TRUE; - childSetVisible("status_voice", have_voice); - if (have_voice) + BOOL voice_enabled = gVoiceClient->voiceEnabled(); + BOOL have_voice = parcel && parcel->getVoiceEnabled(); + if (!voice_enabled) { - childGetRect( "status_voice", buttonRect ); - r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight()); - childSetRect( "status_voice", r ); - x += buttonRect.getWidth(); + childSetVisible("status_no_voice", FALSE); + } + else + { + if (have_voice) + { + childSetVisible("status_no_voice", FALSE); + } + else if (!have_voice) + { + childSetVisible("status_no_voice", TRUE); + childGetRect( "status_no_voice", buttonRect ); + r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight()); + childSetRect( "status_no_voice", r ); + x += buttonRect.getWidth(); + } } BOOL canBuyLand = parcel @@ -512,7 +537,7 @@ void LLStatusBar::refresh() mTextParcelName->setText(location_name); // Adjust region name and parcel name - x += 4; + x += 8; const S32 PARCEL_RIGHT = llmin(mTextTime->getRect().mLeft, mTextParcelName->getTextPixelWidth() + x + 5); r.set(x+4, mRect.getHeight() - 2, PARCEL_RIGHT, 0); @@ -672,8 +697,7 @@ static void onClickPush(void* ) static void onClickVoice(void* ) { - LLNotifyBox::showXml("VoiceAvailablity"); - //LLFirstUse::useVoice(); + LLNotifyBox::showXml("NoVoice"); } static void onClickBuild(void*) @@ -708,7 +732,7 @@ static void onClickBuyLand(void*) void LLStatusBar::setupDate() { // fill the day array with what's in the xui - LLString day_list = childGetText("StatBarDaysOfWeek"); + LLString day_list = getFormattedUIString("StatBarDaysOfWeek"); size_t length = day_list.size(); // quick input check @@ -732,7 +756,7 @@ void LLStatusBar::setupDate() } // fill the day array with what's in the xui - LLString month_list = childGetText( "StatBarMonthsOfYear" ); + LLString month_list = getFormattedUIString( "StatBarMonthsOfYear" ); length = month_list.size(); // quick input check diff --git a/linden/indra/newview/llstatusbar.h b/linden/indra/newview/llstatusbar.h index 03c8ad0..72b0751 100644 --- a/linden/indra/newview/llstatusbar.h +++ b/linden/indra/newview/llstatusbar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstatview.cpp b/linden/indra/newview/llstatview.cpp index ee9fa0c..20e9503 100644 --- a/linden/indra/newview/llstatview.cpp +++ b/linden/indra/newview/llstatview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llstatview.h b/linden/indra/newview/llstatview.h index 9f78a20..0db0850 100644 --- a/linden/indra/newview/llstatview.h +++ b/linden/indra/newview/llstatview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsurface.cpp b/linden/indra/newview/llsurface.cpp index 9171e22..9e23713 100644 --- a/linden/indra/newview/llsurface.cpp +++ b/linden/indra/newview/llsurface.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsurface.h b/linden/indra/newview/llsurface.h index 7416a54..2ecfd81 100644 --- a/linden/indra/newview/llsurface.h +++ b/linden/indra/newview/llsurface.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsurfacepatch.cpp b/linden/indra/newview/llsurfacepatch.cpp index 0b255a6..f076508 100644 --- a/linden/indra/newview/llsurfacepatch.cpp +++ b/linden/indra/newview/llsurfacepatch.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llsurfacepatch.h b/linden/indra/newview/llsurfacepatch.h index 977a9a1..174743e 100644 --- a/linden/indra/newview/llsurfacepatch.h +++ b/linden/indra/newview/llsurfacepatch.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltable.h b/linden/indra/newview/lltable.h index 13acd5c..325497a 100644 --- a/linden/indra/newview/lltable.h +++ b/linden/indra/newview/lltable.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp index 88e4b33..8958516 100644 --- a/linden/indra/newview/lltexlayer.cpp +++ b/linden/indra/newview/lltexlayer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexlayer.h b/linden/indra/newview/lltexlayer.h index 32d4635..8306071 100644 --- a/linden/indra/newview/lltexlayer.h +++ b/linden/indra/newview/lltexlayer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index e490352..59d50d2 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexturecache.h b/linden/indra/newview/lltexturecache.h index 10a3e8b..c03576b 100644 --- a/linden/indra/newview/lltexturecache.h +++ b/linden/indra/newview/lltexturecache.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index ea01105..0314f7c 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexturectrl.h b/linden/indra/newview/lltexturectrl.h index 476c026..80fcac2 100644 --- a/linden/indra/newview/lltexturectrl.h +++ b/linden/indra/newview/lltexturectrl.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index ef369e7..1cc28d2 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltexturefetch.h b/linden/indra/newview/lltexturefetch.h index 8bb5e9b..d196978 100644 --- a/linden/indra/newview/lltexturefetch.h +++ b/linden/indra/newview/lltexturefetch.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltextureview.cpp b/linden/indra/newview/lltextureview.cpp index 8f09f79..96a6127 100644 --- a/linden/indra/newview/lltextureview.cpp +++ b/linden/indra/newview/lltextureview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -373,7 +373,6 @@ public: { S32 line_height = (S32)(LLFontGL::sMonospace->getLineHeight() + .5f); setRect(LLRect(0,0,100,line_height * 4)); - updateRect(); } virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_TEX_MEM_BAR; }; diff --git a/linden/indra/newview/lltextureview.h b/linden/indra/newview/lltextureview.h index 772876c..2bf9461 100644 --- a/linden/indra/newview/lltextureview.h +++ b/linden/indra/newview/lltextureview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltool.cpp b/linden/indra/newview/lltool.cpp index d36e9a5..2be76a0 100644 --- a/linden/indra/newview/lltool.cpp +++ b/linden/indra/newview/lltool.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltool.h b/linden/indra/newview/lltool.h index 9b7831e..50e4da0 100644 --- a/linden/indra/newview/lltool.h +++ b/linden/indra/newview/lltool.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolbar.cpp b/linden/indra/newview/lltoolbar.cpp index 5cddc59..e3aa9a3 100644 --- a/linden/indra/newview/lltoolbar.cpp +++ b/linden/indra/newview/lltoolbar.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -60,6 +60,11 @@ #include "llvieweruictrlfactory.h" #include "llviewerwindow.h" #include "lltoolgrab.h" +#include "llcombobox.h" +#include "llfloaterchat.h" +#include "llfloatermute.h" +#include "llimpanel.h" +#include "llscrolllistctrl.h" #if LL_DARWIN @@ -100,24 +105,20 @@ F32 LLToolBar::sInventoryAutoOpenTime = 1.f; // Functions // -LLToolBar::LLToolBar(const std::string& name, const LLRect& r) -: LLPanel(name, r, BORDER_NO) +LLToolBar::LLToolBar() +: LLPanel() #if LL_DARWIN , mResizeHandle(NULL) #endif // LL_DARWIN { setIsChrome(TRUE); - setFollows( FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM ); - - gUICtrlFactory->buildPanel(this, "panel_toolbar.xml"); - mIsFocusRoot = TRUE; - + setFocusRoot(TRUE); } BOOL LLToolBar::postBuild() { - childSetAction("communicate_btn", onClickCommunicate, this); + childSetCommitCallback("communicate_btn", onClickCommunicate, this); childSetControlName("communicate_btn", "ShowCommunicate"); childSetAction("chat_btn", onClickChat, this); @@ -270,29 +271,47 @@ void LLToolBar::layoutButtons() } #endif // LL_DARWIN + LLButton* chat_button = LLUICtrlFactory::getButtonByName(this, "chat_btn"); + if (chat_button) + { + width -= chat_button->getRect().getWidth() + pad; + } + // We actually want to extend "pad" pixels off the right edge of the // screen, such that the rightmost button is aligned. - F32 segment_width = (F32)(width + pad) / (F32)count; - S32 btn_width = lltrunc(segment_width - pad); + S32 segment_width = llround((F32)(width) / ((F32)count - 1.f)); + S32 btn_width = segment_width - pad; // Evenly space all views S32 height = -1; S32 i = count - 1; - for (child_list_const_iter_t child_iter = getChildList()->begin(); - child_iter != getChildList()->end(); ++child_iter) + S32 x = pad; + for (child_list_const_reverse_iter_t child_iter = getChildList()->rbegin(); + child_iter != getChildList()->rend(); ++child_iter) { LLView *btn_view = *child_iter; - if(btn_view->getWidgetType() == WIDGET_TYPE_BUTTON) + if(btn_view->getWidgetType() == WIDGET_TYPE_BUTTON || btn_view->getWidgetType() == WIDGET_TYPE_FLYOUT_BUTTON) { if (height < 0) { height = btn_view->getRect().getHeight(); } - S32 x = llround(i*segment_width); - S32 y = 0; - LLRect r; - r.setOriginAndSize(x, y, btn_width, height); - btn_view->setRect(r); + + LLRect r; + + if (btn_view->getName() == "chat_btn") + { + r.setOriginAndSize(x, 0, btn_view->getRect().getWidth(), height); + x += btn_view->getRect().getWidth() + pad; + } + else + { + r.setOriginAndSize(x, 0, btn_width, height); + x += segment_width; + } + + btn_view->setOrigin(r.mLeft, r.mBottom); + btn_view->reshape(r.getWidth(), r.getHeight()); i--; } } @@ -321,6 +340,7 @@ void LLToolBar::refresh() childSetEnabled("build_btn", gParcelMgr->agentCanBuild() ); + // Check to see if we're in build mode BOOL build_mode = gToolMgr->inEdit(); // And not just clicking on a scripted object @@ -329,13 +349,135 @@ void LLToolBar::refresh() build_mode = FALSE; } gSavedSettings.setBOOL("BuildBtnState", build_mode); + + updateCommunicateList(); +} + +void LLToolBar::updateCommunicateList() +{ + LLFlyoutButton* communicate_button = (LLFlyoutButton*)getChildByName("communicate_btn", TRUE); + if (communicate_button) + { + LLSD selected = communicate_button->getValue(); + + communicate_button->removeall(); + + LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater(); + LLScrollListItem* itemp = NULL; + + itemp = communicate_button->add(LLFloaterMyFriends::getInstance()->getShortTitle(), LLSD("contacts"), ADD_TOP); + if (LLFloaterMyFriends::getInstance() == frontmost_floater) + { + ((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD); + // make sure current tab is selected in list + if (selected.isUndefined()) + { + selected = itemp->getValue(); + } + } + itemp = communicate_button->add(LLFloaterChat::getInstance()->getShortTitle(), LLSD("local chat"), ADD_TOP); + if (LLFloaterChat::getInstance() == frontmost_floater) + { + ((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD); + if (selected.isUndefined()) + { + selected = itemp->getValue(); + } + } + communicate_button->addSeparator(ADD_TOP); + communicate_button->add(getUIString("Redock Windows"), LLSD("redock"), ADD_TOP); + communicate_button->addSeparator(ADD_TOP); + communicate_button->add(LLFloaterMute::getInstance()->getShortTitle(), LLSD("mute list"), ADD_TOP); + + std::set::const_iterator floater_handle_it; + + if (gIMMgr->getIMFloaterHandles().size() > 0) + { + communicate_button->addSeparator(ADD_TOP); + } + + for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it) + { + LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)LLFloater::getFloaterByHandle(*floater_handle_it); + if (im_floaterp) + { + LLString floater_title = im_floaterp->getNumUnreadMessages() > 0 ? "*" : ""; + floater_title.append(im_floaterp->getShortTitle()); + itemp = communicate_button->add(floater_title, im_floaterp->getSessionID(), ADD_TOP); + if (im_floaterp == frontmost_floater) + { + ((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD); + if (selected.isUndefined()) + { + selected = itemp->getValue(); + } + } + } + } + + communicate_button->setToggleState(gSavedSettings.getBOOL("ShowCommunicate")); + communicate_button->setValue(selected); + } } // static -void LLToolBar::onClickCommunicate(void* user_data) +void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, void* user_data) { - LLFloaterChatterBox::toggleInstance(LLSD()); + LLToolBar* toolbar = (LLToolBar*)user_data; + LLFlyoutButton* communicate_button = (LLFlyoutButton*)toolbar->getChildByName("communicate_btn", TRUE); + + LLSD selected_option = communicate_button->getValue(); + + if (selected_option.asString() == "contacts") + { + LLFloaterMyFriends::showInstance(); + } + else if (selected_option.asString() == "local chat") + { + LLFloaterChat::showInstance(); + } + else if (selected_option.asString() == "redock") + { + LLFloaterChatterBox::getInstance()->addFloater(LLFloaterMyFriends::getInstance(), FALSE); + LLFloaterChatterBox::getInstance()->addFloater(LLFloaterChat::getInstance(), FALSE); + LLUUID session_to_show; + + std::set::const_iterator floater_handle_it; + for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it) + { + LLFloater* im_floaterp = LLFloater::getFloaterByHandle(*floater_handle_it); + if (im_floaterp) + { + if (im_floaterp->isFrontmost()) + { + session_to_show = ((LLFloaterIMPanel*)im_floaterp)->getSessionID(); + } + LLFloaterChatterBox::getInstance()->addFloater(im_floaterp, FALSE); + } + } + + LLFloaterChatterBox::showInstance(session_to_show); + } + else if (selected_option.asString() == "mute list") + { + LLFloaterMute::showInstance(); + } + else if (selected_option.isUndefined()) // user just clicked the communicate button, treat as toggle + { + if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) + { + LLFloaterMyFriends::toggleInstance(); + } + else + { + LLFloaterChatterBox::toggleInstance(); + } + } + else // otherwise selection_option is a specific IM session id + { + LLFloaterChatterBox::showInstance(selected_option); + } } diff --git a/linden/indra/newview/lltoolbar.h b/linden/indra/newview/lltoolbar.h index c033240..d42d7bb 100644 --- a/linden/indra/newview/lltoolbar.h +++ b/linden/indra/newview/lltoolbar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -47,7 +47,7 @@ class LLToolBar : public LLPanel { public: - LLToolBar(const std::string& name, const LLRect& rect ); + LLToolBar(); ~LLToolBar(); /*virtual*/ BOOL postBuild(); @@ -70,7 +70,7 @@ public: void refresh(); // callbacks - static void onClickCommunicate(void*); + static void onClickCommunicate(LLUICtrl*, void*); static void onClickChat(void* data); static void onClickAppearance(void* data); static void onClickClothing(void* data); @@ -86,8 +86,13 @@ public: static F32 sInventoryAutoOpenTime; private: + void updateCommunicateList(); + + +private: BOOL mInventoryAutoOpen; LLFrameTimer mInventoryAutoOpenTimer; + S32 mNumUnreadIMs; #if LL_DARWIN LLFakeResizeHandle *mResizeHandle; #endif // LL_DARWIN diff --git a/linden/indra/newview/lltoolbrush.cpp b/linden/indra/newview/lltoolbrush.cpp index f1e0cac..5f402a8 100644 --- a/linden/indra/newview/lltoolbrush.cpp +++ b/linden/indra/newview/lltoolbrush.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolbrush.h b/linden/indra/newview/lltoolbrush.h index 041e2ea..129a08c 100644 --- a/linden/indra/newview/lltoolbrush.h +++ b/linden/indra/newview/lltoolbrush.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolcomp.cpp b/linden/indra/newview/lltoolcomp.cpp index 44a8f8d..2882b6f 100644 --- a/linden/indra/newview/lltoolcomp.cpp +++ b/linden/indra/newview/lltoolcomp.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolcomp.h b/linden/indra/newview/lltoolcomp.h index ff01512..ce4aec9 100644 --- a/linden/indra/newview/lltoolcomp.h +++ b/linden/indra/newview/lltoolcomp.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltooldraganddrop.cpp b/linden/indra/newview/lltooldraganddrop.cpp index 6f53f79..fb430d7 100644 --- a/linden/indra/newview/lltooldraganddrop.cpp +++ b/linden/indra/newview/lltooldraganddrop.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -1199,11 +1199,22 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, return TRUE; } + // In case the inventory has not been updated (e.g. due to some recent operation + // causing a dirty inventory), stall the user while fetching the inventory. + if (hit_obj->isInventoryDirty()) + { + hit_obj->fetchInventoryFromServer(); + LLString::format_map_t args; + args["[ERROR_MESSAGE]"] = "Unable to add texture.\nPlease wait a few seconds and try again."; + gViewerWindow->alertXml("ErrorMessage", args); + return FALSE; + } if (hit_obj->getInventoryItemByAsset(item->getAssetUUID())) { // if the asset is already in the object's inventory // then it can always be added to a side. // This saves some work if the task's inventory is already loaded + // and ensures that the texture item is only added once. return TRUE; } @@ -1241,7 +1252,10 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, return FALSE; } } - hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true); + // Add the texture item to the target object's inventory. + hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true); + // TODO: Check to see if adding the item was successful; if not, then + // we should return false here. } else if(!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) @@ -1253,8 +1267,12 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, } // *FIX: may want to make sure agent can paint hit_obj. - // make sure the object has the texture in it's inventory. - hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true); + // Add the texture item to the target object's inventory. + hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true); + // Force the object to update its refetch its inventory so it has this texture. + hit_obj->fetchInventoryFromServer(); + // TODO: Check to see if adding the item was successful; if not, then + // we should return false here. } return TRUE; } diff --git a/linden/indra/newview/lltooldraganddrop.h b/linden/indra/newview/lltooldraganddrop.h index 66499bd..1d97c8f 100644 --- a/linden/indra/newview/lltooldraganddrop.h +++ b/linden/indra/newview/lltooldraganddrop.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolface.cpp b/linden/indra/newview/lltoolface.cpp index 783fbfc..bb2fc04 100644 --- a/linden/indra/newview/lltoolface.cpp +++ b/linden/indra/newview/lltoolface.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolface.h b/linden/indra/newview/lltoolface.h index 106bd20..600d2a6 100644 --- a/linden/indra/newview/lltoolface.h +++ b/linden/indra/newview/lltoolface.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolfocus.cpp b/linden/indra/newview/lltoolfocus.cpp index efa78f7..fc64bd0 100644 --- a/linden/indra/newview/lltoolfocus.cpp +++ b/linden/indra/newview/lltoolfocus.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolfocus.h b/linden/indra/newview/lltoolfocus.h index 8fa3693..2881a10 100644 --- a/linden/indra/newview/lltoolfocus.h +++ b/linden/indra/newview/lltoolfocus.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolgrab.cpp b/linden/indra/newview/lltoolgrab.cpp index d84b37b..a60046b 100644 --- a/linden/indra/newview/lltoolgrab.cpp +++ b/linden/indra/newview/lltoolgrab.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolgrab.h b/linden/indra/newview/lltoolgrab.h index d546513..7b3114b 100644 --- a/linden/indra/newview/lltoolgrab.h +++ b/linden/indra/newview/lltoolgrab.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolgun.cpp b/linden/indra/newview/lltoolgun.cpp index befa854..ded0d52 100644 --- a/linden/indra/newview/lltoolgun.cpp +++ b/linden/indra/newview/lltoolgun.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolgun.h b/linden/indra/newview/lltoolgun.h index a1c0573..2a8ad1b 100644 --- a/linden/indra/newview/lltoolgun.h +++ b/linden/indra/newview/lltoolgun.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolindividual.cpp b/linden/indra/newview/lltoolindividual.cpp index 4bdf199..946a546 100644 --- a/linden/indra/newview/lltoolindividual.cpp +++ b/linden/indra/newview/lltoolindividual.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolindividual.h b/linden/indra/newview/lltoolindividual.h index 38e2b3f..31c1235 100644 --- a/linden/indra/newview/lltoolindividual.h +++ b/linden/indra/newview/lltoolindividual.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolmgr.cpp b/linden/indra/newview/lltoolmgr.cpp index 9f7f22c..99cb54c 100644 --- a/linden/indra/newview/lltoolmgr.cpp +++ b/linden/indra/newview/lltoolmgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolmgr.h b/linden/indra/newview/lltoolmgr.h index 47e5958..bdd24a7 100644 --- a/linden/indra/newview/lltoolmgr.h +++ b/linden/indra/newview/lltoolmgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolmorph.cpp b/linden/indra/newview/lltoolmorph.cpp index a4ed0fe..37f3216 100644 --- a/linden/indra/newview/lltoolmorph.cpp +++ b/linden/indra/newview/lltoolmorph.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolmorph.h b/linden/indra/newview/lltoolmorph.h index 33079fd..9f9a88b 100644 --- a/linden/indra/newview/lltoolmorph.h +++ b/linden/indra/newview/lltoolmorph.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolobjpicker.cpp b/linden/indra/newview/lltoolobjpicker.cpp index 1ca30d8..52469b7 100644 --- a/linden/indra/newview/lltoolobjpicker.cpp +++ b/linden/indra/newview/lltoolobjpicker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolobjpicker.h b/linden/indra/newview/lltoolobjpicker.h index d622315..3a3c628 100644 --- a/linden/indra/newview/lltoolobjpicker.h +++ b/linden/indra/newview/lltoolobjpicker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 76c514a..f41fa8f 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolpie.h b/linden/indra/newview/lltoolpie.h index 385bfb9..c2d41a0 100644 --- a/linden/indra/newview/lltoolpie.h +++ b/linden/indra/newview/lltoolpie.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolpipette.cpp b/linden/indra/newview/lltoolpipette.cpp index 348008e..67499cc 100644 --- a/linden/indra/newview/lltoolpipette.cpp +++ b/linden/indra/newview/lltoolpipette.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolpipette.h b/linden/indra/newview/lltoolpipette.h index 93e4107..db46769 100644 --- a/linden/indra/newview/lltoolpipette.h +++ b/linden/indra/newview/lltoolpipette.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolplacer.cpp b/linden/indra/newview/lltoolplacer.cpp index efce690..bf8a400 100644 --- a/linden/indra/newview/lltoolplacer.cpp +++ b/linden/indra/newview/lltoolplacer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -216,7 +216,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) // Play creation sound if (gAudiop) { - F32 volume = gSavedSettings.getF32("AudioLevelUI"); + F32 volume = gSavedSettings.getBOOL("MuteUI") ? 0.f : gSavedSettings.getF32("AudioLevelUI"); gAudiop->triggerSound( LLUUID(gSavedSettings.getString("UISndObjectCreate")), gAgent.getID(), volume); } diff --git a/linden/indra/newview/lltoolplacer.h b/linden/indra/newview/lltoolplacer.h index d9f01f7..3e4cad7 100644 --- a/linden/indra/newview/lltoolplacer.h +++ b/linden/indra/newview/lltoolplacer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolselect.cpp b/linden/indra/newview/lltoolselect.cpp index 5df16b3..33eb776 100644 --- a/linden/indra/newview/lltoolselect.cpp +++ b/linden/indra/newview/lltoolselect.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolselect.h b/linden/indra/newview/lltoolselect.h index 663cd16..3ae0274 100644 --- a/linden/indra/newview/lltoolselect.h +++ b/linden/indra/newview/lltoolselect.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolselectland.cpp b/linden/indra/newview/lltoolselectland.cpp index e83b43b..11943cc 100644 --- a/linden/indra/newview/lltoolselectland.cpp +++ b/linden/indra/newview/lltoolselectland.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolselectland.h b/linden/indra/newview/lltoolselectland.h index 033db64..a5b0b11 100644 --- a/linden/indra/newview/lltoolselectland.h +++ b/linden/indra/newview/lltoolselectland.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolselectrect.cpp b/linden/indra/newview/lltoolselectrect.cpp index cfde9e1..3b74770 100644 --- a/linden/indra/newview/lltoolselectrect.cpp +++ b/linden/indra/newview/lltoolselectrect.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolselectrect.h b/linden/indra/newview/lltoolselectrect.h index f763fe3..e4bb384 100644 --- a/linden/indra/newview/lltoolselectrect.h +++ b/linden/indra/newview/lltoolselectrect.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolview.cpp b/linden/indra/newview/lltoolview.cpp index f61d8ba..8aed5f8 100644 --- a/linden/indra/newview/lltoolview.cpp +++ b/linden/indra/newview/lltoolview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltoolview.h b/linden/indra/newview/lltoolview.h index 0ec84a4..22d6807 100644 --- a/linden/indra/newview/lltoolview.h +++ b/linden/indra/newview/lltoolview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lltracker.cpp b/linden/indra/newview/lltracker.cpp index 6851faf..6dfc700 100644 --- a/linden/indra/newview/lltracker.cpp +++ b/linden/indra/newview/lltracker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -639,6 +639,10 @@ void LLTracker::stopTrackingLocation(BOOL clear_ui) mTrackingLocationType = LOCATION_NOTHING; } +void LLTracker::clearFocus() +{ + instance()->mTrackingStatus = TRACKING_NOTHING; +} void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color) { diff --git a/linden/indra/newview/lltracker.h b/linden/indra/newview/lltracker.h index 858b501..6d45a8d 100644 --- a/linden/indra/newview/lltracker.h +++ b/linden/indra/newview/lltracker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -82,7 +82,8 @@ public: static ETrackingLocationType getTrackedLocationType() { return instance()->mTrackingLocationType; } static BOOL isTracking(void*) { return (BOOL) instance()->mTrackingStatus; } static void stopTracking(void*); - + static void clearFocus(); + static const LLUUID& getTrackedLandmarkAssetID() { return instance()->mTrackedLandmarkAssetID; } static const LLUUID& getTrackedLandmarkItemID() { return instance()->mTrackedLandmarkItemID; } diff --git a/linden/indra/newview/lluiconstants.h b/linden/indra/newview/lluiconstants.h index bd75d27..b3b9297 100644 --- a/linden/indra/newview/lluiconstants.h +++ b/linden/indra/newview/lluiconstants.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lluploaddialog.cpp b/linden/indra/newview/lluploaddialog.cpp index fa2baf0..fc58721 100644 --- a/linden/indra/newview/lluploaddialog.cpp +++ b/linden/indra/newview/lluploaddialog.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lluploaddialog.h b/linden/indra/newview/lluploaddialog.h index edbe8d7..02cb0be 100644 --- a/linden/indra/newview/lluploaddialog.h +++ b/linden/indra/newview/lluploaddialog.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llurl.cpp b/linden/indra/newview/llurl.cpp index 65511f5..3226eb8 100644 --- a/linden/indra/newview/llurl.cpp +++ b/linden/indra/newview/llurl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llurl.h b/linden/indra/newview/llurl.h index c37b3d0..62ec437 100644 --- a/linden/indra/newview/llurl.h +++ b/linden/indra/newview/llurl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llurldispatcher.cpp b/linden/indra/newview/llurldispatcher.cpp index c2c704d..78b305c 100644 --- a/linden/indra/newview/llurldispatcher.cpp +++ b/linden/indra/newview/llurldispatcher.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,13 +37,13 @@ #include "llcommandhandler.h" #include "llfloaterurldisplay.h" #include "llfloaterdirectory.h" -#include "llfloaterhtmlhelp.h" -//#include "llfloaterworldmap.h" +#include "llfloaterhtml.h" #include "llfloaterworldmap.h" #include "llpanellogin.h" #include "llstartup.h" // gStartupState #include "llurlsimstring.h" #include "llviewerwindow.h" // alertXml() +#include "llweb.h" #include "llworldmap.h" // library includes @@ -63,23 +63,24 @@ public: static bool isSLURLCommand(const std::string& url); - static bool dispatch(const std::string& url); - // returns true if handled + static bool dispatch(const std::string& url, bool from_external_browser); + // returns true if handled or explicitly blocked. static bool dispatchRightClick(const std::string& url); private: - static bool dispatchCore(const std::string& url, bool right_mouse); + static bool dispatchCore(const std::string& url, + bool from_external_browser, bool right_mouse); // handles both left and right click static bool dispatchHelp(const std::string& url, BOOL right_mouse); // Handles sl://app.floater.html.help by showing Help floater. // Returns true if handled. - static bool dispatchApp(const std::string& url, BOOL right_mouse); - // Handles secondlife://app/agent//about and similar + static bool dispatchApp(const std::string& url, bool from_external_browser, BOOL right_mouse); + // Handles secondlife:///app/agent//about and similar // by showing panel in Search floater. - // Returns true if handled. + // Returns true if handled or explicitly blocked. static bool dispatchRegion(const std::string& url, BOOL right_mouse); // handles secondlife://Ahern/123/45/67/ @@ -120,11 +121,11 @@ bool LLURLDispatcherImpl::isSLURLCommand(const std::string& url) } // static -bool LLURLDispatcherImpl::dispatchCore(const std::string& url, bool right_mouse) +bool LLURLDispatcherImpl::dispatchCore(const std::string& url, bool from_external_browser, bool right_mouse) { if (url.empty()) return false; if (dispatchHelp(url, right_mouse)) return true; - if (dispatchApp(url, right_mouse)) return true; + if (dispatchApp(url, from_external_browser, right_mouse)) return true; if (dispatchRegion(url, right_mouse)) return true; /* @@ -138,17 +139,20 @@ bool LLURLDispatcherImpl::dispatchCore(const std::string& url, bool right_mouse) } // static -bool LLURLDispatcherImpl::dispatch(const std::string& url) +bool LLURLDispatcherImpl::dispatch(const std::string& url, bool from_external_browser) { llinfos << "url: " << url << llendl; - return dispatchCore(url, false); // not right click + const bool right_click = false; + return dispatchCore(url, from_external_browser, right_click); } // static bool LLURLDispatcherImpl::dispatchRightClick(const std::string& url) { llinfos << "url: " << url << llendl; - return dispatchCore(url, true); // yes right click + const bool from_external_browser = false; + const bool right_click = true; + return dispatchCore(url, from_external_browser, right_click); } // static bool LLURLDispatcherImpl::dispatchHelp(const std::string& url, BOOL right_mouse) @@ -164,7 +168,9 @@ bool LLURLDispatcherImpl::dispatchHelp(const std::string& url, BOOL right_mouse) } // static -bool LLURLDispatcherImpl::dispatchApp(const std::string& url, BOOL right_mouse) +bool LLURLDispatcherImpl::dispatchApp(const std::string& url, + bool from_external_browser, + BOOL right_mouse) { if (!isSLURL(url)) { @@ -176,7 +182,8 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url, BOOL right_mouse) pathArray.erase(0); // erase "app" std::string cmd = pathArray.get(0); pathArray.erase(0); // erase "cmd" - bool handled = LLCommandDispatcher::dispatch(cmd, pathArray, uri.queryMap()); + bool handled = LLCommandDispatcher::dispatch( + cmd, from_external_browser, pathArray, uri.queryMap()); return handled; } @@ -197,7 +204,8 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, BOOL right_mous LLURLSimString::setString(url); // We're at the login screen, so make sure user can see // the login location box to know where they are going. - LLPanelLogin::loadLoginPage(); + + LLPanelLogin::refreshLocation( true ); return true; } @@ -297,7 +305,9 @@ std::string LLURLDispatcherImpl::stripProtocol(const std::string& url) class LLTeleportHandler : public LLCommandHandler { public: - LLTeleportHandler() : LLCommandHandler("teleport") { } + // not allowed from outside the app + LLTeleportHandler() : LLCommandHandler("teleport", false) { } + bool handle(const LLSD& tokens, const LLSD& queryMap) { // construct a "normal" SLURL, resolve the region to @@ -337,12 +347,28 @@ bool LLURLDispatcher::isSLURLCommand(const std::string& url) } // static -bool LLURLDispatcher::dispatch(const std::string& url) +bool LLURLDispatcher::dispatch(const std::string& url, bool from_external_browser) { - return LLURLDispatcherImpl::dispatch(url); + return LLURLDispatcherImpl::dispatch(url, from_external_browser); } // static bool LLURLDispatcher::dispatchRightClick(const std::string& url) { return LLURLDispatcherImpl::dispatchRightClick(url); } + +// static +bool LLURLDispatcher::dispatchFromTextEditor(const std::string& url) +{ + // text editors are by definition internal to our code + const bool from_external_browser = false; + return LLURLDispatcherImpl::dispatch(url, from_external_browser); +} + +// static +std::string LLURLDispatcher::buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z) +{ + std::string slurl = SLURL_SLURL_PREFIX + regionname + llformat("/%d/%d/%d",x,y,z); + slurl = LLWeb::escapeURL( slurl ); + return slurl; +} diff --git a/linden/indra/newview/llurldispatcher.h b/linden/indra/newview/llurldispatcher.h index b18cd66..dd6ffb4 100644 --- a/linden/indra/newview/llurldispatcher.h +++ b/linden/indra/newview/llurldispatcher.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -40,16 +40,21 @@ public: static bool isSLURLCommand(const std::string& url); // Is this a special secondlife://app/ URL? - static bool dispatch(const std::string& url); + static bool dispatch(const std::string& url, bool from_external_browser); // At startup time and on clicks in internal web browsers, // teleport, open map, or run requested command. // Handles: // secondlife://RegionName/123/45/67/ - // secondlife://app/agent/3d6181b0-6a4b-97ef-18d8-722652995cf1/show + // secondlife:///app/agent/3d6181b0-6a4b-97ef-18d8-722652995cf1/show // sl://app/foo/bar // Returns true if someone handled the URL. + static bool dispatchRightClick(const std::string& url); + static bool dispatchFromTextEditor(const std::string& url); + + static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z); + // builds: http://slurl.com/secondlife/RegionName/x/y/z/ }; #endif diff --git a/linden/indra/newview/llurlsimstring.cpp b/linden/indra/newview/llurlsimstring.cpp index 6abc6ff..8113326 100644 --- a/linden/indra/newview/llurlsimstring.cpp +++ b/linden/indra/newview/llurlsimstring.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llurlsimstring.h b/linden/indra/newview/llurlsimstring.h index 001b532..4d3c1ec 100644 --- a/linden/indra/newview/llurlsimstring.h +++ b/linden/indra/newview/llurlsimstring.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llurlwhitelist.cpp b/linden/indra/newview/llurlwhitelist.cpp index cd778d4..ebd6ccd 100644 --- a/linden/indra/newview/llurlwhitelist.cpp +++ b/linden/indra/newview/llurlwhitelist.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llurlwhitelist.h b/linden/indra/newview/llurlwhitelist.h index f4bbe2b..2b980b2 100644 --- a/linden/indra/newview/llurlwhitelist.h +++ b/linden/indra/newview/llurlwhitelist.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/lluserauth.cpp b/linden/indra/newview/lluserauth.cpp index 3c630b4..44df12c 100644 --- a/linden/indra/newview/lluserauth.cpp +++ b/linden/indra/newview/lluserauth.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -163,6 +163,94 @@ void LLUserAuth::authenticate( llinfos << "LLUserAuth::authenticate: uri=" << auth_uri << llendl; } + + +// Legacy version of constructor + +// passwd is already MD5 hashed by the time we get to it. +void LLUserAuth::authenticate( + const char* auth_uri, + const char* method, + const char* firstname, + const char* lastname, + const char* passwd, + const char* start, + BOOL skip_optional, + BOOL accept_tos, + BOOL accept_critical_message, + const LLUUID& viewer_digest, + BOOL last_exec_froze, + const std::vector& requested_options, + const std::string& hashed_mac, + const std::string& hashed_volume_serial) +{ + std::string dpasswd("$1$"); + dpasswd.append(passwd); + llinfos << "Authenticating: " << firstname << " " << lastname << ", " + << /*dpasswd.c_str() <<*/ llendl; + std::ostringstream option_str; + option_str << "Options: "; + std::ostream_iterator appender(option_str, ", "); + std::copy(requested_options.begin(), requested_options.end(), appender); + option_str << "END"; + llinfos << option_str.str().c_str() << llendl; + + mAuthResponse = E_NO_RESPONSE_YET; + //mDownloadTimer.reset(); + + // create the request + XMLRPC_REQUEST request = XMLRPC_RequestNew(); + XMLRPC_RequestSetMethodName(request, method); + XMLRPC_RequestSetRequestType(request, xmlrpc_request_call); + + // stuff the parameters + XMLRPC_VALUE params = XMLRPC_CreateVector(NULL, xmlrpc_vector_struct); + XMLRPC_VectorAppendString(params, "first", firstname, 0); + XMLRPC_VectorAppendString(params, "last", lastname, 0); + XMLRPC_VectorAppendString(params, "passwd", dpasswd.c_str(), 0); + XMLRPC_VectorAppendString(params, "start", start, 0); + XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name + XMLRPC_VectorAppendString(params, "channel", gChannelName.c_str(), 0); + XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); + XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); + // A bit of security through obscurity: id0 is volume_serial + XMLRPC_VectorAppendString(params, "id0", hashed_volume_serial.c_str(), 0); + if (skip_optional) + { + XMLRPC_VectorAppendString(params, "skipoptional", "true", 0); + } + if (accept_tos) + { + XMLRPC_VectorAppendString(params, "agree_to_tos", "true", 0); + } + if (accept_critical_message) + { + XMLRPC_VectorAppendString(params, "read_critical", "true", 0); + } + XMLRPC_VectorAppendString(params, "viewer_digest", viewer_digest.asString().c_str(), 0); + XMLRPC_VectorAppendInt(params, "last_exec_event", (int) last_exec_froze); + + // append optional requests in an array + XMLRPC_VALUE options = XMLRPC_CreateVector("options", xmlrpc_vector_array); + std::vector::const_iterator it = requested_options.begin(); + std::vector::const_iterator end = requested_options.end(); + for( ; it < end; ++it) + { + XMLRPC_VectorAppendString(options, NULL, (*it), 0); + } + XMLRPC_AddValueToVector(params, options); + + // put the parameters on the request + XMLRPC_RequestSetData(request, params); + + mTransaction = new LLXMLRPCTransaction(auth_uri, request); + + XMLRPC_RequestFree(request, 1); + + llinfos << "LLUserAuth::authenticate: uri=" << auth_uri << llendl; +} + + LLUserAuth::UserAuthcode LLUserAuth::authResponse() { if (!mTransaction) diff --git a/linden/indra/newview/lluserauth.h b/linden/indra/newview/lluserauth.h index 9494593..869b235 100644 --- a/linden/indra/newview/lluserauth.h +++ b/linden/indra/newview/lluserauth.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -93,6 +93,7 @@ public: typedef std::map response_t; typedef std::vector options_t; + // viewer auth version void authenticate( const char* auth_uri, const char* auth_method, @@ -109,6 +110,23 @@ public: const std::string& hashed_mac, const std::string& hashed_volume_serial); + // legacy version + void authenticate( + const char* auth_uri, + const char* auth_method, + const char* firstname, + const char* lastname, + const char* password, + const char* start, + BOOL skip_optional_update, + BOOL accept_tos, + BOOL accept_critical_message, + const LLUUID& viewer_digest, + BOOL last_exec_froze, + const std::vector& requested_options, + const std::string& hashed_mac, + const std::string& hashed_volume_serial); + UserAuthcode authResponse(); std::string errorMessage() const { return mErrorMessage; } diff --git a/linden/indra/newview/llvectorperfoptions.cpp b/linden/indra/newview/llvectorperfoptions.cpp index 1349cf3..b228ed5 100644 --- a/linden/indra/newview/llvectorperfoptions.cpp +++ b/linden/indra/newview/llvectorperfoptions.cpp @@ -1,17 +1,27 @@ /** - * @file llvectorperfoptions.cpp - * @brief Control of vector perfomance options. + * @file llvectorperfoptions.h + * @brief SSE/SSE2 vector math performance options. * - * $LicenseInfo:firstyear=2001&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2001-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, diff --git a/linden/indra/newview/llvectorperfoptions.h b/linden/indra/newview/llvectorperfoptions.h index 70a7749..da168ef 100644 --- a/linden/indra/newview/llvectorperfoptions.h +++ b/linden/indra/newview/llvectorperfoptions.h @@ -1,17 +1,27 @@ /** * @file llvectorperfoptions.h - * @brief Control of vector performance options + * @brief SSE/SSE2 vector math performance options. * - * $LicenseInfo:firstyear=2001&license=internal$ + * $LicenseInfo:firstyear=2007&license=viewergpl$ * - * Copyright (c) 2001-2008, Linden Research, Inc. + * Copyright (c) 2007-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, diff --git a/linden/indra/newview/llvelocitybar.cpp b/linden/indra/newview/llvelocitybar.cpp index 779e894..c5c4b5c 100644 --- a/linden/indra/newview/llvelocitybar.cpp +++ b/linden/indra/newview/llvelocitybar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvelocitybar.h b/linden/indra/newview/llvelocitybar.h index 06dcafa..ab73d51 100644 --- a/linden/indra/newview/llvelocitybar.h +++ b/linden/indra/newview/llvelocitybar.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewchildren.cpp b/linden/indra/newview/llviewchildren.cpp index 67184ea..5f579f9 100644 --- a/linden/indra/newview/llviewchildren.cpp +++ b/linden/indra/newview/llviewchildren.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewchildren.h b/linden/indra/newview/llviewchildren.h index c489c8d..75c550b 100644 --- a/linden/indra/newview/llviewchildren.h +++ b/linden/indra/newview/llviewchildren.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerassetstorage.cpp b/linden/indra/newview/llviewerassetstorage.cpp index e117433..00d9db2 100644 --- a/linden/indra/newview/llviewerassetstorage.cpp +++ b/linden/indra/newview/llviewerassetstorage.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerassetstorage.h b/linden/indra/newview/llviewerassetstorage.h index 3b859d9..7b57e99 100644 --- a/linden/indra/newview/llviewerassetstorage.h +++ b/linden/indra/newview/llviewerassetstorage.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvieweraudio.cpp b/linden/indra/newview/llvieweraudio.cpp index 1e6c2ca..58ce7a7 100644 --- a/linden/indra/newview/llvieweraudio.cpp +++ b/linden/indra/newview/llvieweraudio.cpp @@ -1,17 +1,27 @@ /** * @file llvieweraudio.cpp - * @brief Audio functions moved from viewer.cpp + * @brief Audio functions that used to be in viewer.cpp * - * $LicenseInfo:firstyear=2000&license=internal$ + * $LicenseInfo:firstyear=2002&license=viewergpl$ * - * Copyright (c) 2000-2008, Linden Research, Inc. + * Copyright (c) 2002-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, @@ -136,8 +146,10 @@ void audio_update_volume(bool force_update) if (gAudiop) { F32 music_volume = gSavedSettings.getF32("AudioLevelMusic"); + BOOL music_muted = gSavedSettings.getBOOL("MuteMusic"); music_volume = mute_volume * master_volume * (music_volume*music_volume); - gAudiop->setInternetStreamGain ( music_volume ); + gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume ); + } // Streaming Media @@ -145,7 +157,8 @@ void audio_update_volume(bool force_update) { F32 media_volume = gSavedSettings.getF32("AudioLevelMedia"); media_volume = mute_volume * master_volume * (media_volume*media_volume); - LLMediaEngine::getInstance()->setVolume(media_volume); + BOOL media_muted = gSavedSettings.getBOOL("MuteMedia"); + LLMediaEngine::getInstance()->setVolume(media_muted ? 0.f : media_volume); } // Voice @@ -153,8 +166,9 @@ void audio_update_volume(bool force_update) { F32 voice_volume = gSavedSettings.getF32("AudioLevelVoice"); voice_volume = mute_volume * master_volume * voice_volume; - gVoiceClient->setVoiceVolume(voice_volume); - gVoiceClient->setMicGain(gSavedSettings.getF32("AudioLevelMic")); + BOOL voice_mute = gSavedSettings.getBOOL("MuteVoice"); + gVoiceClient->setVoiceVolume(voice_mute ? 0.f : voice_volume); + gVoiceClient->setMicGain(voice_mute ? 0.f : gSavedSettings.getF32("AudioLevelMic")); if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) { @@ -221,7 +235,9 @@ void audio_update_wind(bool force_update) // want to screw up the fade-in on startup by setting actual source gain // outside the fade-in. F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient"); - gAudiop->mMaxWindGain = ambient_volume * ambient_volume; + gAudiop->mMaxWindGain = gSavedSettings.getBOOL("MuteAmbient") + ? 0.f + : ambient_volume * ambient_volume; last_camera_water_height = camera_water_height; gAudiop->updateWind(gRelativeWindVec, camera_water_height); diff --git a/linden/indra/newview/llvieweraudio.h b/linden/indra/newview/llvieweraudio.h index d473607..9b81058 100644 --- a/linden/indra/newview/llvieweraudio.h +++ b/linden/indra/newview/llvieweraudio.h @@ -1,17 +1,27 @@ /** * @file llvieweraudio.h - * @brief Audio functions originally in viewer.cpp + * @brief Audio functions that used to be in viewer.cpp * - * $LicenseInfo:firstyear=2000&license=internal$ + * $LicenseInfo:firstyear=2002&license=viewergpl$ * - * Copyright (c) 2000-2008, Linden Research, Inc. + * Copyright (c) 2002-2008, Linden Research, Inc. * - * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of - * this source code is governed by the Linden Lab Source Code Disclosure - * Agreement ("Agreement") previously entered between you and Linden - * Lab. By accessing, using, copying, modifying or distributing this - * software, you acknowledge that you have been informed of your - * obligations under the Agreement and agree to abide by those obligations. + * 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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, diff --git a/linden/indra/newview/llviewerbuild.h b/linden/indra/newview/llviewerbuild.h index 4581aae..0d6a6dc 100644 --- a/linden/indra/newview/llviewerbuild.h +++ b/linden/indra/newview/llviewerbuild.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewercamera.cpp b/linden/indra/newview/llviewercamera.cpp index 00b4be6..0a8e8c2 100644 --- a/linden/indra/newview/llviewercamera.cpp +++ b/linden/indra/newview/llviewercamera.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -29,11 +29,11 @@ * $/LicenseInfo$ */ -#include // for setprecision #include "llviewerprecompiledheaders.h" - #include "llviewercamera.h" +#include // for setprecision + #include "llquaternion.h" #include "llagent.h" diff --git a/linden/indra/newview/llviewercamera.h b/linden/indra/newview/llviewercamera.h index 8d4b24a..2fed21a 100644 --- a/linden/indra/newview/llviewercamera.h +++ b/linden/indra/newview/llviewercamera.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 4933c4b..81f5cc1 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewercontrol.h b/linden/indra/newview/llviewercontrol.h index c5b9eb3..e031053 100644 --- a/linden/indra/newview/llviewercontrol.h +++ b/linden/indra/newview/llviewercontrol.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index dccf02f..e85b275 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerdisplay.h b/linden/indra/newview/llviewerdisplay.h index 7b5a5c8..16ad023 100644 --- a/linden/indra/newview/llviewerdisplay.h +++ b/linden/indra/newview/llviewerdisplay.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewergenericmessage.cpp b/linden/indra/newview/llviewergenericmessage.cpp index b04f692..9480574 100644 --- a/linden/indra/newview/llviewergenericmessage.cpp +++ b/linden/indra/newview/llviewergenericmessage.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewergenericmessage.h b/linden/indra/newview/llviewergenericmessage.h index 36d5089..a5f2920 100644 --- a/linden/indra/newview/llviewergenericmessage.h +++ b/linden/indra/newview/llviewergenericmessage.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewergesture.cpp b/linden/indra/newview/llviewergesture.cpp index fb8e352..5c739b7 100644 --- a/linden/indra/newview/llviewergesture.cpp +++ b/linden/indra/newview/llviewergesture.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewergesture.h b/linden/indra/newview/llviewergesture.h index d04bb82..eccfc2a 100644 --- a/linden/indra/newview/llviewergesture.h +++ b/linden/indra/newview/llviewergesture.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp index 06ffda5..c771791 100644 --- a/linden/indra/newview/llviewerimage.cpp +++ b/linden/indra/newview/llviewerimage.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerimage.h b/linden/indra/newview/llviewerimage.h index c757cc9..6a0e32f 100644 --- a/linden/indra/newview/llviewerimage.h +++ b/linden/indra/newview/llviewerimage.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp index ff3faae..9c74b4a 100644 --- a/linden/indra/newview/llviewerimagelist.cpp +++ b/linden/indra/newview/llviewerimagelist.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -85,12 +85,12 @@ LLStat LLViewerImageList::sFormattedMemStat(32, TRUE); /////////////////////////////////////////////////////////////////////////////// LLViewerImageList::LLViewerImageList() - : LLImageProviderInterface(), - mForceResetTextureStats(FALSE), - mUpdateStats(FALSE), - mMaxResidentTexMem(0), - mVideoMemorySetting(0), - mMovieImageHasMips(FALSE) +: LLImageProviderInterface(), +mForceResetTextureStats(FALSE), +mUpdateStats(FALSE), +mMaxResidentTexMem(0), +mVideoMemorySetting(0), +mMovieImageHasMips(FALSE) { } @@ -99,20 +99,20 @@ void LLViewerImageList::init() sNumImages = 0; mMaxResidentTexMem = 0; mVideoMemorySetting = 0; - + if (gNoRender) { // Don't initialize GL stuff if we're not rendering. return; } - + mUpdateStats = TRUE; - + // Update how much texture RAM we're allowed to use. updateMaxResidentTexMem(); - + mMovieImageHasMips = FALSE; - + doPreloadImages(); } @@ -120,203 +120,228 @@ void LLViewerImageList::init() void LLViewerImageList::doPreloadImages() { llinfos << "Preloading images..." << llendl; - + // Set the "missing asset" image - LLViewerImage::sMissingAssetImagep = preloadImage("missing_asset.tga" , LLUUID::null, TRUE); - + LLViewerImage::sMissingAssetImagep = preloadUIImage("missing_asset.tga" , LLUUID::null, TRUE); + // Set the "white" image - LLViewerImage::sWhiteImagep = preloadImage("white.tga", LLUUID::null, TRUE); - + LLViewerImage::sWhiteImagep = preloadUIImage("white.tga", LLUUID::null, TRUE);; + // Speeds up startup by 4-5 seconds. JC if (!gPreloadImages) return; - + // Images listed here are immediately decoded, before the login screen. // Since this slows down perceived viewer startup time, only include // images here for buttons/checkboxes/etc. that are immediately visible. - preloadImage("button_disabled_32x128.tga", LLUUID::null, FALSE); - preloadImage("button_enabled_32x128.tga", LLUUID::null, FALSE); - preloadImage("button_enabled_selected_32x128.tga", LLUUID::null, FALSE); - preloadImage("checkbox_disabled_false.tga", LLUUID::null, FALSE); - preloadImage("checkbox_disabled_true.tga", LLUUID::null, FALSE); - preloadImage("checkbox_enabled_false.tga", LLUUID::null, FALSE); - preloadImage("checkbox_enabled_true.tga", LLUUID::null, FALSE); - preloadImage("close_in_blue.tga", LLUUID::null, FALSE); - preloadImage("combobox_arrow.tga", LLUUID::null, FALSE); - preloadImage("minimize.tga", LLUUID::null, FALSE); - preloadImage("minimize_pressed.tga", LLUUID::null, FALSE); - preloadImage("radio_active_false.tga", LLUUID::null, FALSE); - preloadImage("radio_active_true.tga", LLUUID::null, FALSE); - preloadImage("radio_inactive_false.tga", LLUUID::null, FALSE); - preloadImage("radio_inactive_true.tga", LLUUID::null, FALSE); - preloadImage("resize_handle_bottom_right_blue.tga", LLUUID::null, FALSE); - preloadImage("rounded_square.tga", LLUUID::null, FALSE); - preloadImage("rounded_square_soft.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_down_in_blue.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_down_out_blue.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_left_in_blue.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_left_out_blue.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_right_in_blue.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_right_out_blue.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_up_in_blue.tga", LLUUID::null, FALSE); - preloadImage("scrollbutton_up_out_blue.tga", LLUUID::null, FALSE); - preloadImage("spin_down_in_blue.tga", LLUUID::null, FALSE); - preloadImage("spin_down_out_blue.tga", LLUUID::null, FALSE); - preloadImage("spin_up_in_blue.tga", LLUUID::null, FALSE); - preloadImage("spin_up_out_blue.tga", LLUUID::null, FALSE); - preloadImage("square_btn_32x128.tga", LLUUID::null, FALSE); - preloadImage("square_btn_selected_32x128.tga", LLUUID::null, FALSE); - preloadImage("startup_logo.tga", LLUUID::null, FALSE); // <<<<<<< --- needed? - preloadImage("tab_bottom_blue.tga", LLUUID::null, FALSE); - preloadImage("tab_bottom_selected_blue.tga", LLUUID::null, FALSE); - preloadImage("tab_left.tga", LLUUID::null, FALSE); - preloadImage("tab_left_selected.tga", LLUUID::null, FALSE); - preloadImage("tab_top_blue.tga", LLUUID::null, FALSE); - preloadImage("tab_top_selected_blue.tga", LLUUID::null, FALSE); + preloadUIImage("button_disabled_32x128.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("button_enabled_32x128.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("button_enabled_selected_32x128.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("checkbox_disabled_false.tga", LLUUID::null, FALSE); + preloadUIImage("checkbox_disabled_true.tga", LLUUID::null, FALSE); + preloadUIImage("checkbox_enabled_false.tga", LLUUID::null, FALSE); + preloadUIImage("checkbox_enabled_true.tga", LLUUID::null, FALSE); + preloadUIImage("close_in_blue.tga", LLUUID::null, FALSE); + preloadUIImage("combobox_arrow.tga", LLUUID::null, FALSE); + preloadUIImage("minimize.tga", LLUUID::null, FALSE); + preloadUIImage("minimize_pressed.tga", LLUUID::null, FALSE); + preloadUIImage("radio_active_false.tga", LLUUID::null, FALSE); + preloadUIImage("radio_active_true.tga", LLUUID::null, FALSE); + preloadUIImage("radio_inactive_false.tga", LLUUID::null, FALSE); + preloadUIImage("radio_inactive_true.tga", LLUUID::null, FALSE); + preloadUIImage("resize_handle_bottom_right_blue.tga", LLUUID::null, FALSE); + preloadUIImage("rounded_square.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("rounded_square_soft.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("scrollbutton_down_in_blue.tga", LLUUID::null, FALSE); + preloadUIImage("scrollbutton_down_out_blue.tga", LLUUID::null, FALSE); + preloadUIImage("scrollbutton_left_in_blue.tga", LLUUID::null, FALSE); + preloadUIImage("scrollbutton_left_out_blue.tga", LLUUID::null, FALSE); + preloadUIImage("scrollbutton_right_in_blue.tga", LLUUID::null, FALSE); + preloadUIImage("scrollbutton_right_out_blue.tga", LLUUID::null, FALSE); + preloadUIImage("scrollbutton_up_in_blue.tga", LLUUID::null, FALSE); + preloadUIImage("scrollbutton_up_out_blue.tga", LLUUID::null, FALSE); + preloadUIImage("spin_down_in_blue.tga", LLUUID::null, FALSE); + preloadUIImage("spin_down_out_blue.tga", LLUUID::null, FALSE); + preloadUIImage("spin_up_in_blue.tga", LLUUID::null, FALSE); + preloadUIImage("spin_up_out_blue.tga", LLUUID::null, FALSE); + preloadUIImage("square_btn_32x128.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("square_btn_selected_32x128.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("startup_logo.tga", LLUUID::null, FALSE); // <<<<<<< --- needed? + preloadUIImage("tab_bottom_blue.tga", LLUUID::null, FALSE, LLRectf(0.109375f, 1.f - 0.4375f, 1.f - 0.109375f, 0.4375f)); + preloadUIImage("tab_bottom_selected_blue.tga", LLUUID::null, FALSE, LLRectf(0.109375f, 1.f - 0.4375f, 1.f - 0.109375f, 0.4375f)); + preloadUIImage("tab_left.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("tab_left_selected.tga", LLUUID::null, FALSE, LLRectf(.125f, 0.5f, .875f, 0.5f )); + preloadUIImage("tab_top_blue.tga", LLUUID::null, FALSE, LLRectf(0.109375f, 1.f - 0.4375f, 1.f - 0.109375f, 0.4375f)); + preloadUIImage("tab_top_selected_blue.tga", LLUUID::null, FALSE, LLRectf(0.109375f, 1.f - 0.4375f, 1.f - 0.109375f, 0.4375f)); decodeAllImages(2.f); // decode preloaded images // These images are queued for decode during the login sequence, when // we have a progress bar. - preloadImage("active_voice_tab.tga", LLUUID::null, FALSE); - preloadImage("button_anim_pause.tga", LLUUID::null, FALSE); - preloadImage("button_anim_pause_selected.tga", LLUUID::null, FALSE); - preloadImage("button_anim_play.tga", LLUUID::null, FALSE); - preloadImage("button_anim_play_selected.tga", LLUUID::null, FALSE); - preloadImage("button_anim_stop.tga", LLUUID::null, FALSE); - preloadImage("button_anim_stop_selected.tga", LLUUID::null, FALSE); - preloadImage("crosshairs.tga", LLUUID::null, FALSE); - preloadImage("direction_arrow.tga", LLUUID::null, FALSE); - preloadImage("eyes.tga", LLUUID::null, TRUE); - preloadImage("foot_shadow.tga", LLUUID::null, TRUE); - preloadImage("hair.tga", LLUUID::null, TRUE); - preloadImage("icon_for_sale.tga", LLUUID::null, FALSE); - preloadImage("icon_popular.tga", LLUUID::null, FALSE); - preloadImage("icon_top_pick.tga", LLUUID::null, FALSE); - preloadImage("img_shot.tga", IMG_SHOT, TRUE); - preloadImage("img_smoke_poof.tga", IMG_SMOKE_POOF, TRUE); - preloadImage("inv_folder_animation.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_bodypart.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_callingcard.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_clothing.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_gesture.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_landmark.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_lostandfound.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_notecard.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_object.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_plain_closed.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_script.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_snapshot.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_sound.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_texture.tga", LLUUID::null, FALSE); - preloadImage("inv_folder_trash.tga", LLUUID::null, FALSE); - preloadImage("inv_item_animation.tga", LLUUID::null, FALSE); - preloadImage("inv_item_bodypart.tga", LLUUID::null, FALSE); - preloadImage("inv_item_callingcard_offline.tga", LLUUID::null, FALSE); - preloadImage("inv_item_callingcard_online.tga", LLUUID::null, FALSE); - preloadImage("inv_item_eyes.tga", LLUUID::null, FALSE); - preloadImage("inv_item_gesture.tga", LLUUID::null, FALSE); - preloadImage("inv_item_gloves.tga", LLUUID::null, FALSE); - preloadImage("inv_item_hair.tga", LLUUID::null, FALSE); - preloadImage("inv_item_jacket.tga", LLUUID::null, FALSE); - preloadImage("inv_item_landmark.tga", LLUUID::null, FALSE); - preloadImage("inv_item_landmark_visited.tga", LLUUID::null, FALSE); - preloadImage("inv_item_notecard.tga", LLUUID::null, FALSE); - preloadImage("inv_item_object.tga", LLUUID::null, FALSE); - preloadImage("inv_item_object_multi.tga", LLUUID::null, FALSE); - preloadImage("inv_item_pants.tga", LLUUID::null, FALSE); - preloadImage("inv_item_script.tga", LLUUID::null, FALSE); - preloadImage("inv_item_shape.tga", LLUUID::null, FALSE); - preloadImage("inv_item_shirt.tga", LLUUID::null, FALSE); - preloadImage("inv_item_shoes.tga", LLUUID::null, FALSE); - preloadImage("inv_item_skirt.tga", LLUUID::null, FALSE); - preloadImage("inv_item_snapshot.tga", LLUUID::null, FALSE); - preloadImage("inv_item_socks.tga", LLUUID::null, FALSE); - preloadImage("inv_item_sound.tga", LLUUID::null, FALSE); - preloadImage("inv_item_texture.tga", LLUUID::null, FALSE); - preloadImage("inv_item_underpants.tga", LLUUID::null, FALSE); - preloadImage("inv_item_undershirt.tga", LLUUID::null, FALSE); - preloadImage("lag_status_critical.tga", LLUUID::null, FALSE); - preloadImage("lag_status_good.tga", LLUUID::null, FALSE); - preloadImage("lag_status_warning.tga", LLUUID::null, FALSE); - preloadImage("legend.tga", LLUUID::null, FALSE); - preloadImage("map_avatar_16.tga", LLUUID::null, FALSE); - preloadImage("map_avatar_8.tga", LLUUID::null, FALSE); - preloadImage("map_avatar_above_8.tga", LLUUID::null, FALSE); - preloadImage("map_avatar_below_8.tga", LLUUID::null, FALSE); - preloadImage("map_avatar_you_8.tga", LLUUID::null, FALSE); - preloadImage("map_event.tga", LLUUID::null, FALSE); - preloadImage("map_event_mature.tga", LLUUID::null, FALSE); - preloadImage("map_home.tga", LLUUID::null, FALSE); - preloadImage("map_infohub.tga", LLUUID::null, FALSE); - preloadImage("map_telehub.tga", LLUUID::null, FALSE); - preloadImage("map_track_16.tga", LLUUID::null, FALSE); - preloadImage("media_icon.tga", LLUUID::null, FALSE); - preloadImage("music_icon.tga", LLUUID::null, FALSE); - preloadImage("noentrylines.tga", LLUUID::null, TRUE); - preloadImage("noentrypasslines.tga", LLUUID::null, TRUE); - preloadImage("notify_tip_icon.tga", LLUUID::null, FALSE); - preloadImage("notify_caution_icon.tga", LLUUID::null, FALSE); - preloadImage("notify_box_icon.tga", LLUUID::null, FALSE); - preloadImage("object_cone.tga", LLUUID::null, FALSE); - preloadImage("object_cone_active.tga", LLUUID::null, FALSE); - preloadImage("object_cube.tga", LLUUID::null, FALSE); - preloadImage("object_cube_active.tga", LLUUID::null, FALSE); - preloadImage("object_cylinder.tga", LLUUID::null, FALSE); - preloadImage("object_cylinder_active.tga", LLUUID::null, FALSE); - preloadImage("object_grass.tga", LLUUID::null, FALSE); - preloadImage("object_grass_active.tga", LLUUID::null, FALSE); - preloadImage("object_hemi_cone.tga", LLUUID::null, FALSE); - preloadImage("object_hemi_cone_active.tga", LLUUID::null, FALSE); - preloadImage("object_hemi_cylinder.tga", LLUUID::null, FALSE); - preloadImage("object_hemi_cylinder_active.tga", LLUUID::null, FALSE); - preloadImage("object_hemi_sphere.tga", LLUUID::null, FALSE); - preloadImage("object_hemi_sphere_active.tga", LLUUID::null, FALSE); - preloadImage("object_prism.tga", LLUUID::null, FALSE); - preloadImage("object_prism_active.tga", LLUUID::null, FALSE); - preloadImage("object_pyramid.tga", LLUUID::null, FALSE); - preloadImage("object_pyramid_active.tga", LLUUID::null, FALSE); - preloadImage("object_ring.tga", LLUUID::null, FALSE); - preloadImage("object_ring_active.tga", LLUUID::null, FALSE); - preloadImage("object_sphere.tga", LLUUID::null, FALSE); - preloadImage("object_sphere_active.tga", LLUUID::null, FALSE); - preloadImage("object_tetrahedron.tga", LLUUID::null, FALSE); - preloadImage("object_tetrahedron_active.tga", LLUUID::null, FALSE); - preloadImage("object_torus.tga", LLUUID::null, FALSE); - preloadImage("object_torus_active.tga", LLUUID::null, FALSE); - preloadImage("object_tree.tga", LLUUID::null, FALSE); - preloadImage("object_tree_active.tga", LLUUID::null, FALSE); - preloadImage("object_tube.tga", LLUUID::null, FALSE); - preloadImage("object_tube_active.tga", LLUUID::null, FALSE); - preloadImage("pixiesmall.tga", LLUUID::null, TRUE); // particle systems - preloadImage("script_error.tga", LLUUID::null, TRUE); - preloadImage("silhouette.tga", LLUUID::null, TRUE); - preloadImage("status_build.tga", LLUUID::null, FALSE); - preloadImage("status_buy_currency.tga", LLUUID::null, FALSE); - preloadImage("status_buy_currency_pressed.tga", LLUUID::null, FALSE); - preloadImage("status_buy_land.tga", LLUUID::null, FALSE); - preloadImage("status_buy_land_pressed.tga", LLUUID::null, FALSE); - preloadImage("status_fly.tga", LLUUID::null, FALSE); - preloadImage("status_health.tga", LLUUID::null, FALSE); - preloadImage("status_scripts.tga", LLUUID::null, FALSE); - preloadImage("tool_dozer.tga", LLUUID::null, FALSE); - preloadImage("tool_dozer_active.tga", LLUUID::null, FALSE); - preloadImage("tool_zoom.tga", LLUUID::null, FALSE); - preloadImage("tool_zoom_active.tga", LLUUID::null, FALSE); - preloadImage("volume_icon.tga", LLUUID::null, FALSE); - preloadImage("icn_active-speakers-dot-lvl0.tga", LLUUID::null, FALSE); - preloadImage("icn_active-speakers-dot-lvl1.tga", LLUUID::null, FALSE); - preloadImage("icn_active-speakers-dot-lvl2.tga", LLUUID::null, FALSE); - preloadImage("icn_active-speakers-typing1.tga", LLUUID::null, FALSE); - preloadImage("icn_active-speakers-typing2.tga", LLUUID::null, FALSE); - preloadImage("icn_active-speakers-typing3.tga", LLUUID::null, FALSE); - preloadImage("icn_voice_ptt-off.tga", LLUUID::null, FALSE); - preloadImage("icn_voice_ptt-on.tga", LLUUID::null, FALSE); - preloadImage("icn_voice_ptt-on-lvl1.tga", LLUUID::null, FALSE); - preloadImage("icn_voice_ptt-on-lvl2.tga", LLUUID::null, FALSE); - preloadImage("icn_voice_ptt-on-lvl3.tga", LLUUID::null, FALSE); - preloadImage("lag_status_good.tga", LLUUID::null, FALSE); - preloadImage("lag_status_warning.tga", LLUUID::null, FALSE); - preloadImage("lag_status_critical.tga", LLUUID::null, FALSE); + preloadUIImage("active_voice_tab.tga", LLUUID::null, FALSE); + preloadUIImage("button_anim_pause.tga", LLUUID::null, FALSE); + preloadUIImage("button_anim_pause_selected.tga", LLUUID::null, FALSE); + preloadUIImage("button_anim_play.tga", LLUUID::null, FALSE); + preloadUIImage("button_anim_play_selected.tga", LLUUID::null, FALSE); + preloadUIImage("button_anim_stop.tga", LLUUID::null, FALSE); + preloadUIImage("button_anim_stop_selected.tga", LLUUID::null, FALSE); + preloadUIImage("crosshairs.tga", LLUUID::null, FALSE); + preloadUIImage("direction_arrow.tga", LLUUID::null, FALSE); + preloadUIImage("eyes.tga", LLUUID::null, TRUE); + preloadUIImage("foot_shadow.tga", LLUUID::null, TRUE); + preloadUIImage("hair.tga", LLUUID::null, TRUE); + preloadUIImage("icon_for_sale.tga", LLUUID::null, FALSE); + preloadUIImage("icon_popular.tga", LLUUID::null, FALSE); + preloadUIImage("icon_top_pick.tga", LLUUID::null, FALSE); + preloadUIImage("icon_group.tga", LLUUID::null, FALSE); + preloadUIImage("icon_lock.tga", LLUUID::null, FALSE); + preloadUIImage("img_shot.tga", IMG_SHOT, TRUE); + preloadUIImage("img_smoke_poof.tga", IMG_SMOKE_POOF, TRUE); + preloadUIImage("inv_folder_animation.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_bodypart.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_callingcard.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_clothing.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_gesture.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_landmark.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_lostandfound.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_notecard.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_object.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_plain_closed.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_script.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_snapshot.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_sound.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_texture.tga", LLUUID::null, FALSE); + preloadUIImage("inv_folder_trash.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_animation.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_bodypart.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_callingcard_offline.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_callingcard_online.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_eyes.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_gesture.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_gloves.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_hair.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_jacket.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_landmark.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_landmark_visited.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_notecard.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_object.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_object_multi.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_pants.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_script.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_shape.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_shirt.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_shoes.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_skirt.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_snapshot.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_socks.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_sound.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_texture.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_underpants.tga", LLUUID::null, FALSE); + preloadUIImage("inv_item_undershirt.tga", LLUUID::null, FALSE); + preloadUIImage("lag_status_critical.tga", LLUUID::null, FALSE); + preloadUIImage("lag_status_good.tga", LLUUID::null, FALSE); + preloadUIImage("lag_status_warning.tga", LLUUID::null, FALSE); + preloadUIImage("legend.tga", LLUUID::null, FALSE); + preloadUIImage("map_avatar_16.tga", LLUUID::null, FALSE); + preloadUIImage("map_avatar_8.tga", LLUUID::null, FALSE); + preloadUIImage("map_avatar_you_8.tga", LLUUID::null, FALSE); + preloadUIImage("map_event.tga", LLUUID::null, FALSE); + preloadUIImage("map_event_mature.tga", LLUUID::null, FALSE); + preloadUIImage("map_home.tga", LLUUID::null, FALSE); + preloadUIImage("map_infohub.tga", LLUUID::null, FALSE); + preloadUIImage("map_telehub.tga", LLUUID::null, FALSE); + preloadUIImage("map_track_16.tga", LLUUID::null, FALSE); + preloadUIImage("media_icon.tga", LLUUID::null, FALSE); + preloadUIImage("music_icon.tga", LLUUID::null, FALSE); + preloadUIImage("noentrylines.tga", LLUUID::null, TRUE); + preloadUIImage("noentrypasslines.tga", LLUUID::null, TRUE); + preloadUIImage("notify_tip_icon.tga", LLUUID::null, FALSE); + preloadUIImage("notify_caution_icon.tga", LLUUID::null, FALSE); + preloadUIImage("notify_box_icon.tga", LLUUID::null, FALSE); + preloadUIImage("object_cone.tga", LLUUID::null, FALSE); + preloadUIImage("object_cone_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_cube.tga", LLUUID::null, FALSE); + preloadUIImage("object_cube_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_cylinder.tga", LLUUID::null, FALSE); + preloadUIImage("object_cylinder_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_grass.tga", LLUUID::null, FALSE); + preloadUIImage("object_grass_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_hemi_cone.tga", LLUUID::null, FALSE); + preloadUIImage("object_hemi_cone_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_hemi_cylinder.tga", LLUUID::null, FALSE); + preloadUIImage("object_hemi_cylinder_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_hemi_sphere.tga", LLUUID::null, FALSE); + preloadUIImage("object_hemi_sphere_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_prism.tga", LLUUID::null, FALSE); + preloadUIImage("object_prism_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_pyramid.tga", LLUUID::null, FALSE); + preloadUIImage("object_pyramid_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_ring.tga", LLUUID::null, FALSE); + preloadUIImage("object_ring_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_sphere.tga", LLUUID::null, FALSE); + preloadUIImage("object_sphere_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_tetrahedron.tga", LLUUID::null, FALSE); + preloadUIImage("object_tetrahedron_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_torus.tga", LLUUID::null, FALSE); + preloadUIImage("object_torus_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_tree.tga", LLUUID::null, FALSE); + preloadUIImage("object_tree_active.tga", LLUUID::null, FALSE); + preloadUIImage("object_tube.tga", LLUUID::null, FALSE); + preloadUIImage("object_tube_active.tga", LLUUID::null, FALSE); + preloadUIImage("pixiesmall.tga", LLUUID::null, TRUE); + preloadUIImage("script_error.tga", LLUUID::null, TRUE); + preloadUIImage("silhouette.tga", LLUUID::null, TRUE); + preloadUIImage("status_no_build.tga", LLUUID::null, FALSE); + preloadUIImage("status_buy_currency.tga", LLUUID::null, FALSE); + preloadUIImage("status_buy_currency_pressed.tga", LLUUID::null, FALSE); + preloadUIImage("status_buy_land.tga", LLUUID::null, FALSE); + preloadUIImage("status_buy_land_pressed.tga", LLUUID::null, FALSE); + preloadUIImage("status_no_fly.tga", LLUUID::null, FALSE); + preloadUIImage("status_health.tga", LLUUID::null, FALSE); + preloadUIImage("status_no_push.tga", LLUUID::null, FALSE); + preloadUIImage("status_no_scripts.tga", LLUUID::null, FALSE); + preloadUIImage("tool_dozer.tga", LLUUID::null, FALSE); + preloadUIImage("tool_dozer_active.tga", LLUUID::null, FALSE); + preloadUIImage("tool_zoom.tga", LLUUID::null, FALSE); + preloadUIImage("tool_zoom_active.tga", LLUUID::null, FALSE); + preloadUIImage("icn-overlay_volume-panel.tga", LLUUID::null, FALSE); + preloadUIImage("icn_active-speakers-dot-lvl0.tga", LLUUID::null, FALSE); + preloadUIImage("icn_active-speakers-dot-lvl1.tga", LLUUID::null, FALSE); + preloadUIImage("icn_active-speakers-dot-lvl2.tga", LLUUID::null, FALSE); + preloadUIImage("icn_active-speakers-typing1.tga", LLUUID::null, FALSE); + preloadUIImage("icn_active-speakers-typing2.tga", LLUUID::null, FALSE); + preloadUIImage("icn_active-speakers-typing3.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice_ptt-off.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice_ptt-on.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice_ptt-on-lvl1.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice_ptt-on-lvl2.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice_ptt-on-lvl3.tga", LLUUID::null, FALSE); + preloadUIImage("lag_status_good.tga", LLUUID::null, FALSE); + preloadUIImage("lag_status_warning.tga", LLUUID::null, FALSE); + preloadUIImage("lag_status_critical.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice-call-end.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice-call-start.tga", LLUUID::null, FALSE); + preloadUIImage("mute_icon.tga", LLUUID::null, FALSE); + preloadUIImage("icn-overlay_volume-panel.tga", LLUUID::null, FALSE); + preloadUIImage("icn_slide-groove_dark.tga", LLUUID::null, FALSE); + preloadUIImage("icn_slide-highlight.tga", LLUUID::null, FALSE); + preloadUIImage("icn_slide-thumb_dark.tga", LLUUID::null, FALSE); + preloadUIImage("icn_speaker-muted_dark.tga", LLUUID::null, FALSE); + preloadUIImage("icn_speaker_dark.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice-localchat.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice-groupfocus.tga", LLUUID::null, FALSE); + preloadUIImage("icn_voice-pvtfocus.tga", LLUUID::null, FALSE); + preloadUIImage("icn_media-pause.tga", LLUUID::null, FALSE); + preloadUIImage("icn_media-play.tga", LLUUID::null, FALSE); + preloadUIImage("icn_music-play.tga", LLUUID::null, FALSE); + preloadUIImage("icn_music-pause.tga", LLUUID::null, FALSE); + preloadUIImage("icn_chatbar.tga", LLUUID::null, FALSE); + preloadUIImage("btn_chatbar.tga", LLUUID::null, FALSE, LLRectf(0.5f, 0.5f, 0.5f, 0.5f)); + preloadUIImage("btn_chatbar_selected.tga", LLUUID::null, FALSE, LLRectf(0.5f, 0.5f, 0.5f, 0.5f)); + preloadUIImage("icn_rounded-text-field.tga", LLUUID::null, FALSE); + preloadUIImage("flyout_btn_right_selected.tga", LLUUID::null, FALSE, LLRectf(0.125f, 0.5f, 0.2f, 0.5f)); + preloadUIImage("flyout_btn_right.tga", LLUUID::null, FALSE, LLRectf(0.125f, 0.5f, 0.2f, 0.5f)); + preloadUIImage("flyout_btn_left_selected.tga", LLUUID::null, FALSE, LLRectf(0.8f, 0.5f, 0.875f, 0.5f)); + preloadUIImage("flyout_btn_left.tga", LLUUID::null, FALSE, LLRectf(0.8f, 0.5f, 0.875f, 0.5f)); } static std::string get_texture_list_name() @@ -354,7 +379,7 @@ void LLViewerImageList::doPrefetchImages() image->addTextureStats((F32)pixel_area); } } - + } @@ -400,7 +425,7 @@ void LLViewerImageList::shutdown() if (++count >= max_count) break; } - + if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty()) { std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name()); @@ -416,14 +441,14 @@ void LLViewerImageList::shutdown() mIRCallbackData.clear(); // Clean up preloaded images - mPreloadedImages.clear(); + mUIImages.clear(); // Flush all of the references mLoadingStreamList.clear(); mCreateTextureList.clear(); - + mUUIDMap.clear(); - + mImageList.clear(); } @@ -433,14 +458,14 @@ void LLViewerImageList::dump() for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it) { LLViewerImage* image = *it; - + llinfos << "priority " << image->getDecodePriority() - << " boost " << image->getBoostLevel() - << " size " << image->getWidth() << "x" << image->getHeight() - << " discard " << image->getDiscardLevel() - << " desired " << image->getDesiredDiscardLevel() - << " http://asset.siva.lindenlab.com/" << image->getID() << ".texture" - << llendl; + << " boost " << image->getBoostLevel() + << " size " << image->getWidth() << "x" << image->getHeight() + << " discard " << image->getDiscardLevel() + << " desired " << image->getDesiredDiscardLevel() + << " http://asset.siva.lindenlab.com/" << image->getID() << ".texture" + << llendl; } } @@ -455,13 +480,13 @@ void LLViewerImageList::restoreGL() } /* Vertical tab container button image IDs -Seem to not decode when running app in debug. - -const LLUUID BAD_IMG_ONE("1097dcb3-aef9-8152-f471-431d840ea89e"); -const LLUUID BAD_IMG_TWO("bea77041-5835-1661-f298-47e2d32b7a70"); -*/ + Seem to not decode when running app in debug. + + const LLUUID BAD_IMG_ONE("1097dcb3-aef9-8152-f471-431d840ea89e"); + const LLUUID BAD_IMG_TWO("bea77041-5835-1661-f298-47e2d32b7a70"); + */ -LLImageGL* LLViewerImageList::getUIImageByID(const LLUUID& image_id, BOOL clamped) +LLImageGL* LLViewerImageList::getImageByID(const LLUUID& image_id, BOOL clamped) { LLViewerImage* imagep = getImage(image_id, MIPMAP_FALSE, TRUE); // force a high resolution decode for all UI images (pulled this from LLTextEditor) @@ -470,17 +495,38 @@ LLImageGL* LLViewerImageList::getUIImageByID(const LLUUID& image_id, BOOL clampe LLViewerImage::bindTexture(imagep); imagep->setClamp(clamped, clamped); imagep->unbindTexture(0, GL_TEXTURE_2D); - + return (LLImageGL*)imagep; } +LLUIImage* LLViewerImageList::getUIImageByID(const LLUUID& image_id, BOOL clamped) +{ + uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_id); + if (found_it != mUIImages.end()) + { + return found_it->second; + } + + // otherwise create new ui image wrapper + LLImageGL* image = getImageByID(image_id, clamped); + image->dontDiscard(); + LLPointer new_imagep = new LLUIImage(image); + mUIImages.insert(std::make_pair(image_id, new_imagep)); + + return new_imagep; +} + + /////////////////////////////////////////////////////////////////////////////// -LLViewerImage* LLViewerImageList::preloadImage(const LLString& filename, const LLUUID &image_set_id, BOOL use_mips) +LLViewerImage* LLViewerImageList::preloadUIImage(const LLString& filename, const LLUUID &image_set_id, BOOL use_mips, const LLRectf& scale_rect) { LLViewerImage* image = getImage(filename, image_set_id, use_mips, TRUE); image->dontDiscard(); - mPreloadedImages.push_back(image); + image->setClamp(TRUE, TRUE); + LLUIImage* ui_imagep = new LLUIImage(image); + ui_imagep->setScaleRegion(scale_rect); + mUIImages.insert(std::make_pair(image->getID(), LLPointer(ui_imagep))); return image; } @@ -510,7 +556,7 @@ LLViewerImage* LLViewerImageList::getImageFromFile(const LLString& filename, // Try to load an image from the skins directory. // Fall back to loading from the VFS if not found. - + // First verify that the image exists in gViewerArt LLUUID image_id = LLUUID( gViewerArt.getString(filename.c_str()) ); if (image_id.isNull()) @@ -534,7 +580,7 @@ LLViewerImage* LLViewerImageList::getImageFromFile(const LLString& filename, return (getImage(IMG_DEFAULT, TRUE, TRUE)); } } - + // Now that we have verified that filename exists, load it and assign it to // the filename's UUID, or image_set_id if non null. if (image_set_id.notNull()) @@ -545,7 +591,7 @@ LLViewerImage* LLViewerImageList::getImageFromFile(const LLString& filename, // Load the image LLViewerImage* imagep = getImageFromUUID(image_id, usemipmaps, level_immediate, internal_format, primary_format, LLHost()); - + return imagep; } @@ -566,27 +612,27 @@ LLViewerImage* LLViewerImageList::getImageFromUUID(const LLUUID &image_id, // Return the image with ID image_id // If the image is not found, creates new image and // enqueues a request for transmission - + if ((&image_id == NULL) || image_id.isNull()) { return (getImage(IMG_DEFAULT, TRUE, TRUE)); } - + LLPointer imagep = hasImage(image_id); - + if (imagep.isNull()) { imagep = new LLViewerImage(image_id, usemipmaps); // Might want to request from host other than where the agent is. JC imagep->setTargetHost(request_from_host); - + if (internal_format && primary_format) { imagep->setExplicitFormat(internal_format, primary_format); } - + addImage(imagep); - + if (level_immediate) { imagep->dontDiscard(); @@ -635,7 +681,7 @@ void LLViewerImageList::addImage(LLViewerImage *new_image) return; } LLUUID image_id = new_image->getID(); - + LLViewerImage *image = hasImage(image_id); if (image) { @@ -714,20 +760,20 @@ void LLViewerImageList::updateImages(F32 max_time) sGLBoundMemStat.addValue(LLImageGL::sBoundTextureMemory/(1024.f*1024.f)); sRawMemStat.addValue(LLImageRaw::sGlobalRawMemory/(1024.f*1024.f)); sFormattedMemStat.addValue(LLImageFormatted::sGlobalFormattedMemory/(1024.f*1024.f)); - + updateImagesDecodePriorities(); max_time -= updateImagesFetchTextures(max_time); max_time = llmax(max_time, 0.001f); max_time -= updateImagesCreateTextures(max_time); max_time = llmax(max_time, 0.001f); - + if (!mDirtyTextureList.empty()) { LLFastTimer t(LLFastTimer::FTM_IMAGE_MARK_DIRTY); gPipeline.dirtyPoolObjectTextures(mDirtyTextureList); mDirtyTextureList.clear(); } - + for (image_list_t::iterator iter = mCallbackList.begin(); iter != mCallbackList.end(); ) { @@ -760,7 +806,7 @@ void LLViewerImageList::updateImagesDecodePriorities() mLastUpdateUUID = iter->first; LLPointer imagep = iter->second; ++iter; // safe to incrament now - + // // Flush formatted images using a lazy flush // @@ -802,31 +848,31 @@ void LLViewerImageList::updateImagesDecodePriorities() } /* -static U8 get_image_type(LLViewerImage* imagep, LLHost target_host) -{ - // Having a target host implies this is a baked image. I don't - // believe that boost level has been set at this point. JC - U8 type_from_host = (target_host.isOk() - ? LLImageBase::TYPE_AVATAR_BAKE - : LLImageBase::TYPE_NORMAL); - S32 boost_level = imagep->getBoostLevel(); - U8 type_from_boost = ( (boost_level == LLViewerImage::BOOST_AVATAR_BAKED - || boost_level == LLViewerImage::BOOST_AVATAR_BAKED_SELF) - ? LLImageBase::TYPE_AVATAR_BAKE - : LLImageBase::TYPE_NORMAL); - if (type_from_host == LLImageBase::TYPE_NORMAL - && type_from_boost == LLImageBase::TYPE_AVATAR_BAKE) - { - llwarns << "TAT: get_image_type() type_from_host doesn't match type_from_boost" - << " host " << target_host - << " boost " << imagep->getBoostLevel() - << " imageid " << imagep->getID() - << llendl; - imagep->dump(); - } - return type_from_host; -} -*/ + static U8 get_image_type(LLViewerImage* imagep, LLHost target_host) + { + // Having a target host implies this is a baked image. I don't + // believe that boost level has been set at this point. JC + U8 type_from_host = (target_host.isOk() + ? LLImageBase::TYPE_AVATAR_BAKE + : LLImageBase::TYPE_NORMAL); + S32 boost_level = imagep->getBoostLevel(); + U8 type_from_boost = ( (boost_level == LLViewerImage::BOOST_AVATAR_BAKED + || boost_level == LLViewerImage::BOOST_AVATAR_BAKED_SELF) + ? LLImageBase::TYPE_AVATAR_BAKE + : LLImageBase::TYPE_NORMAL); + if (type_from_host == LLImageBase::TYPE_NORMAL + && type_from_boost == LLImageBase::TYPE_AVATAR_BAKE) + { + llwarns << "TAT: get_image_type() type_from_host doesn't match type_from_boost" + << " host " << target_host + << " boost " << imagep->getBoostLevel() + << " imageid " << imagep->getID() + << llendl; + imagep->dump(); + } + return type_from_host; + } + */ F32 LLViewerImageList::updateImagesCreateTextures(F32 max_time) { @@ -837,7 +883,7 @@ F32 LLViewerImageList::updateImagesCreateTextures(F32 max_time) // decoded, but haven't been pushed into GL). // LLFastTimer t(LLFastTimer::FTM_IMAGE_CREATE); - + LLTimer create_timer; image_list_t::iterator enditer = mCreateTextureList.begin(); for (image_list_t::iterator iter = mCreateTextureList.begin(); @@ -864,7 +910,7 @@ F32 LLViewerImageList::updateImagesFetchTextures(F32 max_time) // Make a list with 32 high priority entries + 256 cycled entries const size_t max_priority_count = 32; const size_t max_update_count = 256; - + // 32 high priority entries std::set entries; size_t update_counter = llmin(max_priority_count, mImageList.size()); @@ -890,13 +936,13 @@ F32 LLViewerImageList::updateImagesFetchTextures(F32 max_time) ++iter2; update_counter--; } - + S32 min_count = max_priority_count + max_update_count/4; for (std::set::iterator iter3 = entries.begin(); iter3 != entries.end(); ) { LLPointer imagep = *iter3++; - + imagep->updateFetch(); if (min_count <= 0 && image_op_timer.getElapsedTimeF32() > max_time) { @@ -911,68 +957,68 @@ void LLViewerImageList::updateImagesMediaStreams() { if (gNoRender || gGLManager.mIsDisabled) return; - // update media stream if required - LLMediaEngine* media_engine = LLMediaEngine::getInstance(); - if (media_engine) + // update media stream if required + LLMediaEngine* media_engine = LLMediaEngine::getInstance(); + if (media_engine) + { + if ( media_engine->update() ) { - if ( media_engine->update() ) + LLUUID media_uuid = media_engine->getImageUUID(); + updateMovieImage(media_uuid, TRUE); + if (!media_uuid.isNull()) { - LLUUID media_uuid = media_engine->getImageUUID(); - updateMovieImage(media_uuid, TRUE); - if (!media_uuid.isNull()) + LLViewerImage* viewerImage = getImage( media_uuid ); + if( viewerImage ) { - LLViewerImage* viewerImage = getImage( media_uuid ); - if( viewerImage ) + LLMediaBase* renderer = media_engine->getMediaRenderer(); + if ((renderer->getTextureWidth() != viewerImage->getWidth()) || + (renderer->getTextureHeight() != viewerImage->getHeight()) || + (renderer->getTextureDepth() != viewerImage->getComponents()) || + (viewerImage->getHasGLTexture() == FALSE)) { - LLMediaBase* renderer = media_engine->getMediaRenderer(); - if ((renderer->getTextureWidth() != viewerImage->getWidth()) || - (renderer->getTextureHeight() != viewerImage->getHeight()) || - (renderer->getTextureDepth() != viewerImage->getComponents()) || - (viewerImage->getHasGLTexture() == FALSE)) - { - // destroy existing GL image - viewerImage->destroyGLTexture(); - - // set new size - viewerImage->setSize( renderer->getTextureWidth(), - renderer->getTextureHeight(), - renderer->getTextureDepth() ); - - LLPointer raw = new LLImageRaw(renderer->getTextureWidth(), - renderer->getTextureHeight(), - renderer->getTextureDepth()); - raw->clear(0x7f,0x7f,0x7f,0xff); - viewerImage->createGLTexture(0, raw); - } - - // Set the explicit format the instance wants - viewerImage->setExplicitFormat(renderer->getTextureFormatInternal(), - renderer->getTextureFormatPrimary(), - renderer->getTextureFormatType(), - renderer->getTextureFormatSwapBytes()); - // This should be redundant, but just in case: - viewerImage->setUseMipMaps(FALSE); - - LLImageRaw* rawImage = media_engine->getImageRaw(); - if ( rawImage ) - { - viewerImage->setSubImage(rawImage, 0, 0, - renderer->getMediaWidth(), - renderer->getMediaHeight()); - } + // destroy existing GL image + viewerImage->destroyGLTexture(); + + // set new size + viewerImage->setSize( renderer->getTextureWidth(), + renderer->getTextureHeight(), + renderer->getTextureDepth() ); + + LLPointer raw = new LLImageRaw(renderer->getTextureWidth(), + renderer->getTextureHeight(), + renderer->getTextureDepth()); + raw->clear(0x7f,0x7f,0x7f,0xff); + viewerImage->createGLTexture(0, raw); } - else + + // Set the explicit format the instance wants + viewerImage->setExplicitFormat(renderer->getTextureFormatInternal(), + renderer->getTextureFormatPrimary(), + renderer->getTextureFormatType(), + renderer->getTextureFormatSwapBytes()); + // This should be redundant, but just in case: + viewerImage->setUseMipMaps(FALSE); + + LLImageRaw* rawImage = media_engine->getImageRaw(); + if ( rawImage ) { - llwarns << "MediaEngine update unable to get viewer image for GL texture" << llendl; + viewerImage->setSubImage(rawImage, 0, 0, + renderer->getMediaWidth(), + renderer->getMediaHeight()); } } - } - else - { - LLUUID media_uuid = media_engine->getImageUUID(); - updateMovieImage(media_uuid, FALSE); + else + { + llwarns << "MediaEngine update unable to get viewer image for GL texture" << llendl; + } } } + else + { + LLUUID media_uuid = media_engine->getImageUUID(); + updateMovieImage(media_uuid, FALSE); + } + } } void LLViewerImageList::updateImagesUpdateStats() @@ -994,7 +1040,7 @@ void LLViewerImageList::decodeAllImages(F32 max_time) { LLTimer timer; if(gNoRender) return; - + // Update texture stats and priorities std::vector > image_list; for (image_priority_list_t::iterator iter = mImageList.begin(); @@ -1046,11 +1092,11 @@ void LLViewerImageList::decodeAllImages(F32 max_time) max_time -= timer.getElapsedTimeF32(); max_time = llmax(max_time, .01f); F32 create_time = updateImagesCreateTextures(max_time); - + llinfos << "decodeAllImages() took " << timer.getElapsedTimeF32() << " seconds. " - << " fetch_pending " << fetch_pending - << " create_time " << create_time - << llendl; + << " fetch_pending " << fetch_pending + << " create_time " << create_time + << llendl; } @@ -1060,88 +1106,88 @@ BOOL LLViewerImageList::createUploadFile(const LLString& filename, { // First, load the image. LLPointer raw_image = new LLImageRaw; - + switch (codec) { - case IMG_CODEC_BMP: - { - LLPointer bmp_image = new LLImageBMP; - - if (!bmp_image->load(filename)) - { - return FALSE; - } - - if (!bmp_image->decode(raw_image)) - { - return FALSE; - } - } - break; - case IMG_CODEC_TGA: - { - LLPointer tga_image = new LLImageTGA; - - if (!tga_image->load(filename)) - { - return FALSE; - } - - if (!tga_image->decode(raw_image)) - { - return FALSE; - } - - if( (tga_image->getComponents() != 3) && - (tga_image->getComponents() != 4) ) - { - tga_image->setLastError( "Image files with less than 3 or more than 4 components are not supported." ); - return FALSE; - } - } - break; - case IMG_CODEC_JPEG: - { - LLPointer jpeg_image = new LLImageJPEG; - - if (!jpeg_image->load(filename)) - { - return FALSE; - } - - if (!jpeg_image->decode(raw_image)) - { - return FALSE; - } - } - 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; + case IMG_CODEC_BMP: + { + LLPointer bmp_image = new LLImageBMP; + + if (!bmp_image->load(filename)) + { + return FALSE; + } + + if (!bmp_image->decode(raw_image)) + { + return FALSE; + } + } + break; + case IMG_CODEC_TGA: + { + LLPointer tga_image = new LLImageTGA; + + if (!tga_image->load(filename)) + { + return FALSE; + } + + if (!tga_image->decode(raw_image)) + { + return FALSE; + } + + if( (tga_image->getComponents() != 3) && + (tga_image->getComponents() != 4) ) + { + tga_image->setLastError( "Image files with less than 3 or more than 4 components are not supported." ); + return FALSE; + } + } + break; + case IMG_CODEC_JPEG: + { + LLPointer jpeg_image = new LLImageJPEG; + + if (!jpeg_image->load(filename)) + { + return FALSE; + } + + if (!jpeg_image->decode(raw_image)) + { + return FALSE; + } + } + 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; } - + LLPointer compressedImage = convertToUploadFile(raw_image); - + if( !compressedImage->save(out_filename) ) { llinfos << "Couldn't create output file " << out_filename << llendl; return FALSE; } - + // test to see if the encode and save worked. LLPointer integrity_test = new LLImageJ2C; if( !integrity_test->loadAndValidate( out_filename ) ) @@ -1149,7 +1195,7 @@ BOOL LLViewerImageList::createUploadFile(const LLString& filename, llinfos << "Image: " << out_filename << " is corrupt." << llendl; return FALSE; } - + return TRUE; } @@ -1166,7 +1212,7 @@ LLPointer LLViewerImageList::convertToUploadFile(LLPointersetReversible(TRUE); compressedImage->encode(raw_image); - + return compressedImage; } @@ -1175,7 +1221,7 @@ S32 LLViewerImageList::getMaxVideoRamSetting(S32 max) { const U32 vram_settings[] = { 16, 32, 64, 128, 256, 512 }; const S32 num_vram_settings = sizeof(vram_settings) / sizeof(vram_settings[0]); - + U32 max_vram; if (gGLManager.mVRAM != 0) { @@ -1203,7 +1249,7 @@ S32 LLViewerImageList::getMaxVideoRamSetting(S32 max) { max_vram = llmin(max_vram, (U32)((F32)system_ram/1.5f)); } - + S32 idx; for (idx=0; idx < num_vram_settings; idx++) { @@ -1215,22 +1261,22 @@ S32 LLViewerImageList::getMaxVideoRamSetting(S32 max) break; } } - + if( idx == num_vram_settings ) { idx = num_vram_settings - 1; } - + return idx; } const S32 VIDEO_CARD_MEM_SIZES[6] = { 0x1000000, // 16MB - 0x2000000, // 32MB - 0x4000000, // 64MB - 0x8000000, // 128MB - 0x10000000, // 256MB - 0x20000000, // 512MB - }; + 0x2000000, // 32MB + 0x4000000, // 64MB + 0x8000000, // 128MB + 0x10000000, // 256MB + 0x20000000, // 512MB +}; const S32 VIDEO_CARD_FRAMEBUFFER_MEM = 0xC00000; // 12MB @@ -1257,13 +1303,13 @@ void LLViewerImageList::updateMaxResidentTexMem(S32 max, U32 fudge) mVideoMemorySetting = cur_setting; // TODO: set available resident texture mem based on use by other subsystems // currently max(12MB, VRAM/4) assumed... - + S32 vram_amt = VIDEO_CARD_MEM_SIZES[cur_setting]; S32 fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vram_amt/4); mMaxResidentTexMem = vram_amt - fb_mem - fudge; -// llinfos << "Graphics Card memory set to " << (VIDEO_CARD_MEM_SIZES[cur_setting]>>20) -// << " MB" << llendl; + // llinfos << "Graphics Card memory set to " << (VIDEO_CARD_MEM_SIZES[cur_setting]>>20) + // << " MB" << llendl; } /////////////////////////////////////////////////////////////////////////////// @@ -1272,15 +1318,15 @@ void LLViewerImageList::updateMaxResidentTexMem(S32 max, U32 fudge) void LLViewerImageList::receiveImageHeader(LLMessageSystem *msg, void **user_data) { LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES); - + // Receive image header, copy into image object and decompresses // if this is a one-packet image. - + LLUUID id; - + char ip_string[256]; u32_to_ip_string(msg->getSenderIP(),ip_string); - + if (msg->getReceiveCompressedSize()) { gImageList.sTextureBits += msg->getReceiveCompressedSize() * 8; @@ -1290,7 +1336,7 @@ void LLViewerImageList::receiveImageHeader(LLMessageSystem *msg, void **user_dat gImageList.sTextureBits += msg->getReceiveSize() * 8; } gImageList.sTexturePackets++; - + U8 codec; U16 packets; U32 totalbytes; @@ -1298,7 +1344,7 @@ void LLViewerImageList::receiveImageHeader(LLMessageSystem *msg, void **user_dat msg->getU8Fast(_PREHASH_ImageID, _PREHASH_Codec, codec); msg->getU16Fast(_PREHASH_ImageID, _PREHASH_Packets, packets); msg->getU32Fast(_PREHASH_ImageID, _PREHASH_Size, totalbytes); - + S32 data_size = msg->getSizeFast(_PREHASH_ImageData, _PREHASH_Data); if (!data_size) { @@ -1309,14 +1355,14 @@ void LLViewerImageList::receiveImageHeader(LLMessageSystem *msg, void **user_dat // msg->getSizeFast() is probably trying to tell us there // was an error. llerrs << "image header chunk size was negative: " - << data_size << llendl; + << data_size << llendl; return; } - + // this buffer gets saved off in the packet list U8 *data = new U8[data_size]; msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); - + LLViewerImage *image = gImageList.getImage(id); if (!image) { @@ -1339,13 +1385,13 @@ void LLViewerImageList::receiveImagePacket(LLMessageSystem *msg, void **user_dat // Receives image packet, copy into image object, // checks if all packets received, decompresses if so. - + LLUUID id; U16 packet_num; - + char ip_string[256]; u32_to_ip_string(msg->getSenderIP(),ip_string); - + if (msg->getReceiveCompressedSize()) { gImageList.sTextureBits += msg->getReceiveCompressedSize() * 8; @@ -1355,12 +1401,12 @@ void LLViewerImageList::receiveImagePacket(LLMessageSystem *msg, void **user_dat gImageList.sTextureBits += msg->getReceiveSize() * 8; } gImageList.sTexturePackets++; - + //llprintline("Start decode, image header..."); msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id); msg->getU16Fast(_PREHASH_ImageID, _PREHASH_Packet, packet_num); S32 data_size = msg->getSizeFast(_PREHASH_ImageData, _PREHASH_Data); - + if (!data_size) { return; @@ -1370,7 +1416,7 @@ void LLViewerImageList::receiveImagePacket(LLMessageSystem *msg, void **user_dat // msg->getSizeFast() is probably trying to tell us there // was an error. llerrs << "image data chunk size was negative: " - << data_size << llendl; + << data_size << llendl; return; } if (data_size > MTUBYTES) @@ -1380,7 +1426,7 @@ void LLViewerImageList::receiveImagePacket(LLMessageSystem *msg, void **user_dat } U8 *data = new U8[data_size]; msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); - + LLViewerImage *image = gImageList.getImage(id); if (!image) { @@ -1403,7 +1449,7 @@ void LLViewerImageList::processImageNotInDatabase(LLMessageSystem *msg,void **us LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES); LLUUID image_id; msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); - + LLViewerImage* image = gImageList.hasImage( image_id ); if( image ) { @@ -1422,10 +1468,10 @@ S32 LLViewerImageList::calcMaxTextureRAM() U32 available_memory = memory_info.getPhysicalMemoryClamped(); clamp_rescale((F32)available_memory, - (F32)(SIXTEEN_MEG * 16), - (F32)U32_MAX, - (F32)(SIXTEEN_MEG * 4), - (F32)(U32_MAX >> 1)); + (F32)(SIXTEEN_MEG * 16), + (F32)U32_MAX, + (F32)(SIXTEEN_MEG * 4), + (F32)(U32_MAX >> 1)); return available_memory; } diff --git a/linden/indra/newview/llviewerimagelist.h b/linden/indra/newview/llviewerimagelist.h index 8ee2731..306dd5b 100644 --- a/linden/indra/newview/llviewerimagelist.h +++ b/linden/indra/newview/llviewerimagelist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -37,6 +37,7 @@ #include "llgl.h" #include "llstat.h" #include "llviewerimage.h" +#include "llui.h" #include #include @@ -81,7 +82,8 @@ public: ~LLViewerImageList(); // LLImageProviderInterface - LLImageGL* getUIImageByID(const LLUUID& id, BOOL clamped = TRUE); + LLImageGL* getImageByID(const LLUUID& id, BOOL clamped = TRUE); + LLUIImage* getUIImageByID(const LLUUID& id, BOOL clamped = TRUE); void init(); void shutdown(); @@ -151,7 +153,7 @@ public: void doPrefetchImages(); private: - LLViewerImage* preloadImage(const LLString& filename, const LLUUID &image_set_id, BOOL use_mips); + LLViewerImage* preloadUIImage(const LLString& filename, const LLUUID &image_set_id, BOOL use_mips, const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f)); void updateImagesDecodePriorities(); F32 updateImagesCreateTextures(F32 max_time); F32 updateImagesFetchTextures(F32 max_time); @@ -190,7 +192,8 @@ private: LLUUID mMovieImageUUID; U8 mMovieImageHasMips; - std::vector > mPreloadedImages; + typedef std::map< LLUUID, LLPointer > uuid_ui_image_map_t; + uuid_ui_image_map_t mUIImages; public: static U32 sTextureBits; diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp index 3e8938b..add9f27 100644 --- a/linden/indra/newview/llviewerinventory.cpp +++ b/linden/indra/newview/llviewerinventory.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -47,7 +47,7 @@ #include "llviewerregion.h" #include "llviewerobjectlist.h" - +#include "llpreviewgesture.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -104,14 +104,9 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other) } LLViewerInventoryItem::LLViewerInventoryItem(const LLInventoryItem *other) : - LLInventoryItem(other) + LLInventoryItem(other), + mIsComplete(TRUE) { - LLInventoryItem::copy(other); - if (!mIsComplete) - { - llwarns << "LLViewerInventoryItem copy constructor for incomplete item" - << mUUID << llendl; - } } @@ -648,6 +643,26 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item) gGestureManager.activateGesture(inv_item); } +void CreateGestureCallback::fire(const LLUUID& inv_item) +{ + if (inv_item.isNull()) + return; + + gGestureManager.activateGesture(inv_item); + + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (!item) return; + gInventory.updateItem(item); + gInventory.notifyObservers(); + + if(!LLPreview::show(inv_item,FALSE)) + { + LLPreviewGesture* preview = LLPreviewGesture::show(LLString("Gesture: ") + item->getName(), inv_item, LLUUID::null); + // Force to be entirely onscreen. + gFloaterView->adjustToFitScreen(preview, FALSE); + } +} + LLInventoryCallbackManager gInventoryCallbacks; void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, diff --git a/linden/indra/newview/llviewerinventory.h b/linden/indra/newview/llviewerinventory.h index 5db0ec7..fcedcc1 100644 --- a/linden/indra/newview/llviewerinventory.h +++ b/linden/indra/newview/llviewerinventory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -223,6 +223,12 @@ public: void fire(const LLUUID& inv_item); }; +class CreateGestureCallback : public LLInventoryCallback +{ +public: + void fire(const LLUUID& inv_item); +}; + // misc functions //void inventory_reliable_callback(void**, S32 status); diff --git a/linden/indra/newview/llviewerjoint.cpp b/linden/indra/newview/llviewerjoint.cpp index 3a3f7d2..9645dfe 100644 --- a/linden/indra/newview/llviewerjoint.cpp +++ b/linden/indra/newview/llviewerjoint.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjoint.h b/linden/indra/newview/llviewerjoint.h index 76f139b..0433ba9 100644 --- a/linden/indra/newview/llviewerjoint.h +++ b/linden/indra/newview/llviewerjoint.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointattachment.cpp b/linden/indra/newview/llviewerjointattachment.cpp index 06660c2..1348ad0 100644 --- a/linden/indra/newview/llviewerjointattachment.cpp +++ b/linden/indra/newview/llviewerjointattachment.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointattachment.h b/linden/indra/newview/llviewerjointattachment.h index 86373cb..275fce5 100644 --- a/linden/indra/newview/llviewerjointattachment.h +++ b/linden/indra/newview/llviewerjointattachment.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointmesh.cpp b/linden/indra/newview/llviewerjointmesh.cpp index 006636f..d90db4a 100644 --- a/linden/indra/newview/llviewerjointmesh.cpp +++ b/linden/indra/newview/llviewerjointmesh.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointmesh.h b/linden/indra/newview/llviewerjointmesh.h index afca815..e1b5e58 100644 --- a/linden/indra/newview/llviewerjointmesh.h +++ b/linden/indra/newview/llviewerjointmesh.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointmesh_sse.cpp b/linden/indra/newview/llviewerjointmesh_sse.cpp index eec7a2e..79fda0b 100644 --- a/linden/indra/newview/llviewerjointmesh_sse.cpp +++ b/linden/indra/newview/llviewerjointmesh_sse.cpp @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointmesh_sse2.cpp b/linden/indra/newview/llviewerjointmesh_sse2.cpp index 3026762..d1f858d 100644 --- a/linden/indra/newview/llviewerjointmesh_sse2.cpp +++ b/linden/indra/newview/llviewerjointmesh_sse2.cpp @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointmesh_vec.cpp b/linden/indra/newview/llviewerjointmesh_vec.cpp index 27ab5a6..65bff2c 100644 --- a/linden/indra/newview/llviewerjointmesh_vec.cpp +++ b/linden/indra/newview/llviewerjointmesh_vec.cpp @@ -15,12 +15,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointshape.cpp b/linden/indra/newview/llviewerjointshape.cpp index d904af8..279115b 100644 --- a/linden/indra/newview/llviewerjointshape.cpp +++ b/linden/indra/newview/llviewerjointshape.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjointshape.h b/linden/indra/newview/llviewerjointshape.h index 2f7571e..91131c7 100644 --- a/linden/indra/newview/llviewerjointshape.h +++ b/linden/indra/newview/llviewerjointshape.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjoystick.cpp b/linden/indra/newview/llviewerjoystick.cpp index 12b851f..e3db0f2 100644 --- a/linden/indra/newview/llviewerjoystick.cpp +++ b/linden/indra/newview/llviewerjoystick.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerjoystick.h b/linden/indra/newview/llviewerjoystick.h index 4a8e9af..b4107bb 100644 --- a/linden/indra/newview/llviewerjoystick.h +++ b/linden/indra/newview/llviewerjoystick.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerkeyboard.cpp b/linden/indra/newview/llviewerkeyboard.cpp index a39f367..bca447f 100644 --- a/linden/indra/newview/llviewerkeyboard.cpp +++ b/linden/indra/newview/llviewerkeyboard.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerkeyboard.h b/linden/indra/newview/llviewerkeyboard.h index af671cf..97f0f67 100644 --- a/linden/indra/newview/llviewerkeyboard.h +++ b/linden/indra/newview/llviewerkeyboard.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerlayer.cpp b/linden/indra/newview/llviewerlayer.cpp index 282e90e..0402a22 100644 --- a/linden/indra/newview/llviewerlayer.cpp +++ b/linden/indra/newview/llviewerlayer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerlayer.h b/linden/indra/newview/llviewerlayer.h index 9a3d4c8..c0fbde5 100644 --- a/linden/indra/newview/llviewerlayer.h +++ b/linden/indra/newview/llviewerlayer.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index d48d5ed..18bdaad 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -60,7 +60,6 @@ #include "lltimer.h" #include "llvfile.h" #include "llvolumemgr.h" -#include "llwindow.h" // for shell_open() // newview includes #include "llagent.h" @@ -105,7 +104,6 @@ #include "llfloatergroupinvite.h" #include "llfloatergroups.h" #include "llfloaterhtml.h" -#include "llfloaterhtmlhelp.h" #include "llfloaterinspect.h" #include "llfloaterlagmeter.h" #include "llfloaterland.h" @@ -2113,7 +2111,7 @@ class LLObjectMute : public view_listener_t else { gMuteListp->add(mute); - gFloaterMute->show(); + LLFloaterMute::showInstance(); } return true; @@ -5279,7 +5277,7 @@ class LLShowFloater : public view_listener_t { if (gAgent.getWearablesLoaded()) { - gAgent.changeCameraToCustomizeAvatar(); + gAgent.changeCameraToCustomizeAvatar(gSavedSettings.getBOOL("AppearanceCameraMovement")); } } else if (floater_name == "friends") @@ -5308,7 +5306,7 @@ class LLShowFloater : public view_listener_t } else if (floater_name == "mute list") { - LLFloaterMute::toggle(NULL); + LLFloaterMute::toggleInstance(); } else if (floater_name == "camera controls") { @@ -5354,7 +5352,7 @@ class LLShowFloater : public view_listener_t } else if (floater_name == "about region") { - LLFloaterRegionInfo::show((void *)NULL); + LLFloaterRegionInfo::showInstance(); } else if (floater_name == "grid options") { @@ -5373,13 +5371,17 @@ class LLShowFloater : public view_listener_t else if (floater_name == "help in-world") { #if LL_LIBXUL_ENABLED - LLFloaterHtml::getInstance()->show( "in-world_help" ); + const bool open_app_slurls = true; + LLFloaterHtml::getInstance()->show( + "in-world_help", open_app_slurls ); #endif } else if (floater_name == "help additional") { #if LL_LIBXUL_ENABLED - LLFloaterHtml::getInstance()->show( "additional_help" ); + const bool open_app_slurls = true; + LLFloaterHtml::getInstance()->show( + "additional_help", open_app_slurls ); #endif } else if (floater_name == "complaint reporter") @@ -5446,7 +5448,7 @@ class LLFloaterVisible : public view_listener_t } else if (floater_name == "mute list") { - new_value = LLFloaterMute::visible(NULL); + new_value = LLFloaterMute::instanceVisible(); } else if (floater_name == "camera controls") { @@ -6051,12 +6053,39 @@ BOOL object_selected_and_point_valid(void *user_data) (selection->getFirstRootObject()->getNVPair("AssetContainer") == NULL); } + +BOOL object_is_wearable() +{ + if (!object_selected_and_point_valid(NULL)) + { + return FALSE; + } + if (sitting_on_selection()) + { + return FALSE; + } + LLObjectSelectionHandle selection = gSelectMgr->getSelection(); + for (LLObjectSelection::valid_root_iterator iter = gSelectMgr->getSelection()->valid_root_begin(); + iter != gSelectMgr->getSelection()->valid_root_end(); iter++) + { + LLSelectNode* node = *iter; + if (node->mPermissions->getOwner() == gAgent.getID()) + { + return TRUE; + } + } + return FALSE; +} + + // Also for seeing if object can be attached. See above. class LLObjectEnableWear : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - return object_selected_and_point_valid(NULL); + bool is_wearable = object_selected_and_point_valid(NULL); + gMenuHolder->findControl(userdata["control"].asString())->setValue(is_wearable); + return TRUE; } }; @@ -6931,13 +6960,12 @@ void handle_grab_texture(void* data) if(view) { LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); - LLFocusMgr::FocusLostCallback callback = gFocusMgr.getFocusCallback(); view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO); view->getPanel()->openSelected(); //LLInventoryView::dumpSelectionInformation((void*)view); // restore keyboard focus - gFocusMgr.setKeyboardFocus(focus_ctrl, callback); + gFocusMgr.setKeyboardFocus(focus_ctrl); } } else @@ -7135,7 +7163,8 @@ void handle_load_from_xml(void*) void handle_slurl_test(void*) { - LLFloaterHtml::getInstance()->show("http://secondlife.com/app/search/slurls.html", "SLURL Test"); + LLFloaterHtml::getInstance()->show( + "http://secondlife.com/app/search/slurls.html", "SLURL Test", true); } void handle_rebake_textures(void*) diff --git a/linden/indra/newview/llviewermenu.h b/linden/indra/newview/llviewermenu.h index 0cef3df..f548182 100644 --- a/linden/indra/newview/llviewermenu.h +++ b/linden/indra/newview/llviewermenu.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewermenufile.cpp b/linden/indra/newview/llviewermenufile.cpp index 5068736..231da59 100644 --- a/linden/indra/newview/llviewermenufile.cpp +++ b/linden/indra/newview/llviewermenufile.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -596,15 +596,9 @@ void upload_new_resource(const LLString& src_filename, std::string name, asset_type = LLAssetType::AT_SOUND; // tag it as audio S32 encode_result = 0; - S32 bitrate = 128; + llinfos << "Attempting to encode wav as an ogg file" << llendl; - if (compression_info) - { - bitrate = compression_info; - } - llinfos << "Attempting to encode wav as an ogg file at " << bitrate << "kbps" << llendl; - - encode_result = encode_vorbis_file_at(src_filename.c_str(), filename.c_str(), bitrate*1000); + encode_result = encode_vorbis_file(src_filename.c_str(), filename.c_str()); if (LLVORBISENC_NOERR != encode_result) { diff --git a/linden/indra/newview/llviewermenufile.h b/linden/indra/newview/llviewermenufile.h index 5dc56d5..94c18c4 100644 --- a/linden/indra/newview/llviewermenufile.h +++ b/linden/indra/newview/llviewermenufile.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index c624ab9..bad2f1c 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,6 +50,7 @@ #include "llfloaterimport.h" #include "llfocusmgr.h" #include "llfollowcamparams.h" +#include "llfloaterreleasemsg.h" #include "llinstantmessage.h" #include "llquantize.h" #include "llregionflags.h" @@ -59,7 +60,6 @@ #include "llteleportflags.h" #include "lltracker.h" #include "lltransactionflags.h" -#include "llwindow.h" // shell_open() #include "llxfermanager.h" #include "message.h" #include "sound_ids.h" @@ -131,6 +131,7 @@ #include "pipeline.h" #include "llappviewer.h" #include "llfloaterworldmap.h" +#include "llkeythrottle.h" #include "llviewerdisplay.h" #include "llkeythrottle.h" @@ -284,6 +285,7 @@ void process_logout_reply(LLMessageSystem* msg, void**) void process_layer_data(LLMessageSystem *mesgsys, void **user_data) { + if(!gWorldp) return; LLViewerRegion *regionp = gWorldp->getRegion(mesgsys->getSender()); if (!regionp || gNoRender) @@ -883,10 +885,8 @@ void open_offer(const std::vector& items, const std::string& from_name) //highlight item LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); - LLFocusMgr::FocusLostCallback callback; - callback = gFocusMgr.getFocusCallback(); view->getPanel()->setSelection(item->getUUID(), TAKE_FOCUS_NO); - gFocusMgr.setKeyboardFocus(focus_ctrl, callback); + gFocusMgr.setKeyboardFocus(focus_ctrl); } } @@ -915,7 +915,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, LLMute mute(blocked_id, from_name, type); if (gMuteListp->add(mute)) { - gFloaterMute->show(); + LLFloaterMute::showInstance(); gFloaterMute->selectMute(blocked_id); } @@ -1193,7 +1193,22 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) LLString::format_map_t args; args["[OBJECTNAME]"] = info->mDesc; - args["[OBJECTTYPE]"] = LLAssetType::lookupHumanReadable(info->mType); + // must protect against a NULL return from lookupHumanReadable() + const char* typestr = LLAssetType::lookupHumanReadable(info->mType); + if (typestr) + { + args["[OBJECTTYPE]"] = typestr; + } + else + { + llwarns << "LLAssetType::lookupHumanReadable() returned NULL - probably bad asset type: " << info->mType << llendl; + args["[OBJECTTYPE]"] = ""; + + // This seems safest, rather than propagating bogosity + llwarns << "Forcing an inventory-decline for probably-bad asset type." << llendl; + inventory_offer_callback(IOR_DECLINE, info); + return; + } // Name cache callbacks don't store userdata, so can't save // off the LLOfferInfo. Argh. JC @@ -2174,9 +2189,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) BOOL is_linden = FALSE; if (gMuteListp) { - is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat) - || gMuteListp->isMuted(owner_id, LLMute::flagTextChat); - is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && gMuteListp->isLinden(from_name); + is_muted = gMuteListp->isMuted( + from_id, + from_name, + LLMute::flagTextChat) + || gMuteListp->isMuted(owner_id, LLMute::flagTextChat); + is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && + gMuteListp->isLinden(from_name); } BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); @@ -2217,7 +2236,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) BOOL visible_in_chat_bubble = FALSE; std::string verb; - color.setVec(1,1,1,1); + color.setVec(1.f,1.f,1.f,1.f); msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, DB_CHAT_MSG_BUF_SIZE, mesg); BOOL ircstyle = FALSE; @@ -2592,6 +2611,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**) // Viewer trusts the simulator. gMessageSystem->enableCircuit(sim_host, TRUE); + if(!gWorldp) return; LLViewerRegion* regionp = gWorldp->addRegion(region_handle, sim_host); /* @@ -2660,6 +2680,13 @@ void process_avatar_init_complete(LLMessageSystem* msg, void**) } */ +static void display_release_message(S32, void* data) +{ + std::string* msg = (std::string*)data; + LLFloaterReleaseMsg::displayMessage(msg->c_str()); + delete msg; +} + void process_agent_movement_complete(LLMessageSystem* msg, void**) { gAgentMovementCompleted = TRUE; @@ -2699,6 +2726,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) F32 x, y; from_region_handle(region_handle, &x, &y); + if(!gWorldp) return; LLViewerRegion* regionp = gWorldp->getRegionFromHandle(region_handle); if (!regionp) { @@ -2729,9 +2757,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) gViewerThrottle.sendToSim(); gViewerWindow->sendShapeToSim(); - bool is_teleport = false; + bool is_teleport = gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING; - if( gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING ) + if( is_teleport ) { // Force the camera back onto the agent, don't animate. JC gAgent.setFocusOnAvatar(TRUE, FALSE); @@ -2746,15 +2774,20 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (avatarp) { + // Chat the "back" SLURL. (DEV-4907) + LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); + chat.mSourceType = CHAT_SOURCE_SYSTEM; + LLFloaterChat::addChatHistory(chat); + + // Set the new position avatarp->setPositionAgent(agent_pos); avatarp->clearChat(); avatarp->slamPosition(); } - - is_teleport = true; } else { + // This is likely just the initial logging in phase. gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); } @@ -2822,22 +2855,10 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) msg->addBOOLFast(_PREHASH_AlwaysRun, gAgent.getAlwaysRun()); gAgent.sendReliableMessage(); - - LLString version_channel = LLString(version_channel_char); - - if (gLastVersionChannel != version_channel) + if (LLFloaterReleaseMsg::checkVersion(version_channel_char)) { - //show release message if not on initial login - if (!gLastVersionChannel.empty()) - { - gLastVersionChannel = version_channel; - LLFloaterReleaseMsg::show(); - } - else { - gLastVersionChannel = version_channel; - } + LLNotifyBox::showXml("ServerVersionChanged", display_release_message, new std::string(version_channel_char) ); } - } void process_crossed_region(LLMessageSystem* msg, void**) @@ -2867,6 +2888,7 @@ void process_crossed_region(LLMessageSystem* msg, void**) send_complete_agent_movement(sim_host); + if(!gWorldp) return; LLViewerRegion* regionp = gWorldp->addRegion(region_handle, sim_host); regionp->setSeedCapability(std::string(seedCap)); } @@ -3251,6 +3273,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data) mesgsys->getVector3Fast(_PREHASH_TimeInfo, _PREHASH_SunDirection, sun_direction); mesgsys->getVector3Fast(_PREHASH_TimeInfo, _PREHASH_SunAngVelocity, sun_ang_velocity); + if(!gWorldp) return; gWorldp->setSpaceTimeUSec(space_time_usec); //lldebugs << "time_synch() - " << sun_direction << ", " << sun_ang_velocity @@ -3309,7 +3332,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **) return; } - F32 volume = gain * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (gain * gSavedSettings.getF32("AudioLevelSFX")); gAudiop->triggerSound(sound_id, owner_id, volume, pos_global); } @@ -3395,29 +3418,6 @@ void process_attached_sound_gain_change(LLMessageSystem *mesgsys, void **user_da objectp->adjustAudioGain(gain); } -/* Unused July 2006 -void process_attached_sound_cutoff_radius(LLMessageSystem *mesgsys, void **user_data) -{ - F32 radius = 0; - LLUUID object_guid; - LLViewerObject *objectp = NULL; - - mesgsys->getUUIDFast(_PREHASH_DataBlock, _PREHASH_ObjectID, object_guid); - - if (!((objectp = gObjectList.findObject(object_guid)))) - { - // we don't know about this object, just bail - return; - } - - mesgsys->getF32Fast(_PREHASH_DataBlock, _PREHASH_Radius, radius); - - if (gAudiop) - { -// gAudiop->attachToObject(sound_guid, object_guid, gain, priority, flags); - } -} -*/ void process_health_message(LLMessageSystem *mesgsys, void **user_data) { @@ -3563,19 +3563,6 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) } -// This info is requested by the simulator when the agent first logs in -// or when it moves into a simulator in which it did not already have -// a child agent. -/* -void process_avatar_info_request(LLMessageSystem *mesgsys, void **user_data) -{ - llinfos << "process_avatar_info_request()" << llendl; - - // Send the avatar appearance (parameters and texture entry UUIDs) - gAgent.sendAgentSetAppearance(); - send_agent_update(TRUE, TRUE); -}*/ - void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) { @@ -4435,6 +4422,10 @@ void script_question_cb(S32 option, void* user_data) notify_cautioned_script_question(cbdata, orig, allowed); } + if ( option == 2 ) + { + gMuteListp->add(LLMute(cbdata->mItemID, cbdata->mObjectName, LLMute::OBJECT)); + } delete cbdata; } diff --git a/linden/indra/newview/llviewermessage.h b/linden/indra/newview/llviewermessage.h index 535d6cb..c271de7 100644 --- a/linden/indra/newview/llviewermessage.h +++ b/linden/indra/newview/llviewermessage.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -87,12 +87,10 @@ void process_sound_trigger(LLMessageSystem *mesgsys, void **user_data); void process_preload_sound( LLMessageSystem *mesgsys, void **user_data); void process_attached_sound( LLMessageSystem *mesgsys, void **user_data); void process_attached_sound_gain_change( LLMessageSystem *mesgsys, void **user_data); -//void process_attached_sound_cutoff_radius( LLMessageSystem *mesgsys, void **user_data); void process_energy_statistics(LLMessageSystem *mesgsys, void **user_data); void process_health_message(LLMessageSystem *mesgsys, void **user_data); void process_sim_stats(LLMessageSystem *mesgsys, void **user_data); void process_shooter_agent_hit(LLMessageSystem* msg, void** user_data); -void process_avatar_info_request(LLMessageSystem *mesgsys, void **user_data); void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data); void process_avatar_appearance(LLMessageSystem *mesgsys, void **user_data); void process_camera_constraint(LLMessageSystem *mesgsys, void **user_data); diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index 3652ebb..bca7415 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -45,54 +45,30 @@ LLGridData gGridInfo[GRID_INFO_COUNT] = "util.agni.lindenlab.com", "https://login.agni.lindenlab.com/cgi-bin/login.cgi", "https://secondlife.com/helpers/" }, - { "DMZ", - "util.dmz.lindenlab.com", - "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", - "http://dmz-secondlife.webdev.lindenlab.com/helpers/" }, - { "Siva", - "util.siva.lindenlab.com", - "https://login.siva.lindenlab.com/cgi-bin/login.cgi", - "http://siva-secondlife.webdev.lindenlab.com/helpers/" }, + { "Aruna", + "util.aruna.lindenlab.com", + "https://login.aruna.lindenlab.com/cgi-bin/login.cgi", + "http://aruna-secondlife.webdev.lindenlab.com/helpers/" }, { "Durga", "util.durga.lindenlab.com", "https://login.durga.lindenlab.com/cgi-bin/login.cgi", "http://durga-secondlife.webdev.lindenlab.com/helpers/" }, - { "Shakti", - "util.shakti.lindenlab.com", - "https://login.shakti.lindenlab.com/cgi-bin/login.cgi", - "http://shakti-secondlife.webdev.lindenlab.com/helpers/" }, - { "Soma", - "util.soma.lindenlab.com", - "https://login.soma.lindenlab.com/cgi-bin/login.cgi", - "http://soma-secondlife.webdev.lindenlab.com/helpers/" }, { "Ganga", "util.ganga.lindenlab.com", "https://login.ganga.lindenlab.com/cgi-bin/login.cgi", "http://ganga-secondlife.webdev.lindenlab.com/helpers/" }, - { "Vaak", - "util.vaak.lindenlab.com", - "https://login.vaak.lindenlab.com/cgi-bin/login.cgi", - "http://vaak-secondlife.webdev.lindenlab.com/helpers/" }, - { "Uma", - "util.uma.lindenlab.com", - "https://login.uma.lindenlab.com/cgi-bin/login.cgi", - "http://uma-secondlife.webdev.lindenlab.com/helpers/" }, + { "Mitra", + "util.mitra.lindenlab.com", + "https://login.mitra.lindenlab.com/cgi-bin/login.cgi", + "http://mitra-secondlife.webdev.lindenlab.com/helpers/" }, { "Mohini", "util.mohini.lindenlab.com", "https://login.mohini.lindenlab.com/cgi-bin/login.cgi", "http://mohini-secondlife.webdev.lindenlab.com/helpers/" }, - { "Yami", - "util.yami.lindenlab.com", - "https://login.yami.lindenlab.com/cgi-bin/login.cgi", - "http://yami-secondlife.webdev.lindenlab.com/helpers/" }, { "Nandi", "util.nandi.lindenlab.com", "https://login.nandi.lindenlab.com/cgi-bin/login.cgi", "http://nandi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Mitra", - "util.mitra.lindenlab.com", - "https://login.mitra.lindenlab.com/cgi-bin/login.cgi", - "http://mitra-secondlife.webdev.lindenlab.com/helpers/" }, { "Radha", "util.radha.lindenlab.com", "https://login.radha.lindenlab.com/cgi-bin/login.cgi", @@ -101,10 +77,30 @@ LLGridData gGridInfo[GRID_INFO_COUNT] = "util.ravi.lindenlab.com", "https://login.ravi.lindenlab.com/cgi-bin/login.cgi", "http://ravi-secondlife.webdev.lindenlab.com/helpers/" }, - { "Aruna", - "util.aruna.lindenlab.com", - "https://login.aruna.lindenlab.com/cgi-bin/login.cgi", - "http://aruna-secondlife.webdev.lindenlab.com/helpers/" }, + { "Siva", + "util.siva.lindenlab.com", + "https://login.siva.lindenlab.com/cgi-bin/login.cgi", + "http://siva-secondlife.webdev.lindenlab.com/helpers/" }, + { "Shakti", + "util.shakti.lindenlab.com", + "https://login.shakti.lindenlab.com/cgi-bin/login.cgi", + "http://shakti-secondlife.webdev.lindenlab.com/helpers/" }, + { "Soma", + "util.soma.lindenlab.com", + "https://login.soma.lindenlab.com/cgi-bin/login.cgi", + "http://soma-secondlife.webdev.lindenlab.com/helpers/" }, + { "Uma", + "util.uma.lindenlab.com", + "https://login.uma.lindenlab.com/cgi-bin/login.cgi", + "http://uma-secondlife.webdev.lindenlab.com/helpers/" }, + { "Vaak", + "util.vaak.lindenlab.com", + "https://login.vaak.lindenlab.com/cgi-bin/login.cgi", + "http://vaak-secondlife.webdev.lindenlab.com/helpers/" }, + { "Yami", + "util.yami.lindenlab.com", + "https://login.yami.lindenlab.com/cgi-bin/login.cgi", + "http://yami-secondlife.webdev.lindenlab.com/helpers/" }, { "Local", "localhost", "https://login.dmz.lindenlab.com/cgi-bin/login.cgi", diff --git a/linden/indra/newview/llviewernetwork.h b/linden/indra/newview/llviewernetwork.h index 034e4c6..87678f6 100644 --- a/linden/indra/newview/llviewernetwork.h +++ b/linden/indra/newview/llviewernetwork.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -40,21 +40,20 @@ enum EGridInfo GRID_INFO_NONE, GRID_INFO_ADITI, GRID_INFO_AGNI, - GRID_INFO_DMZ, - GRID_INFO_SIVA, + GRID_INFO_ARUNA, GRID_INFO_DURGA, - GRID_INFO_SHAKTI, - GRID_INFO_SOMA, GRID_INFO_GANGA, - GRID_INFO_VAAK, - GRID_INFO_UMA, + GRID_INFO_MITRA, GRID_INFO_MOHINI, - GRID_INFO_YAMI, GRID_INFO_NANDI, - GRID_INFO_MITRA, GRID_INFO_RADHA, GRID_INFO_RAVI, - GRID_INFO_ARUNA, + GRID_INFO_SIVA, + GRID_INFO_SHAKTI, + GRID_INFO_SOMA, + GRID_INFO_UMA, + GRID_INFO_VAAK, + GRID_INFO_YAMI, GRID_INFO_LOCAL, GRID_INFO_OTHER, // IP address set via -user or other command line option GRID_INFO_COUNT diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index 8dcf29b..50ab57c 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -2343,8 +2343,19 @@ void LLViewerObject::requestInventory() doInventoryCallback(); } // throw away duplicate requests - else if (! mInventoryPending) + else { + fetchInventoryFromServer(); + } +} + +void LLViewerObject::fetchInventoryFromServer() +{ + if (!mInventoryPending) + { + delete mInventory; + mInventory = NULL; + mInventoryDirty = FALSE; LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_RequestTaskInventory); msg->nextBlockFast(_PREHASH_AgentData); @@ -2631,6 +2642,9 @@ LLInventoryObject* LLViewerObject::getInventoryRoot() LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id) { + if (mInventoryDirty) + llwarns << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << llendl; + LLViewerInventoryItem* rv = NULL; if(mInventory) { @@ -2717,7 +2731,7 @@ BOOL LLViewerObject::updateLOD() // Update volume of looping sounds if (mAudioSourcep && mAudioSourcep->isLoop()) { - F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (mAudioGain * gSavedSettings.getF32("AudioLevelSFX")); mAudioSourcep->setGain(volume); } return FALSE; @@ -4228,7 +4242,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow { BOOL queue = flags & LL_SOUND_FLAG_QUEUE; mAudioGain = gain; - F32 volume = gain * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : gain * gSavedSettings.getF32("AudioLevelSFX"); mAudioSourcep->setGain(volume); mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER); @@ -4267,7 +4281,7 @@ void LLViewerObject::adjustAudioGain(const F32 gain) if (mAudioSourcep) { mAudioGain = gain; - F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); mAudioSourcep->setGain(volume); } } diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h index 4e2cee0..36c6a21 100644 --- a/linden/indra/newview/llviewerobject.h +++ b/linden/indra/newview/llviewerobject.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -373,6 +373,7 @@ public: BOOL isInventoryPending() { return mInventoryPending; } void clearInventoryListeners(); void requestInventory(); + void fetchInventoryFromServer(); static void processTaskInv(LLMessageSystem* msg, void** user_data); void removeInventory(const LLUUID& item_id); diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index 548b098..df90954 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerobjectlist.h b/linden/indra/newview/llviewerobjectlist.h index 7edde8b..d08dc9c 100644 --- a/linden/indra/newview/llviewerobjectlist.h +++ b/linden/indra/newview/llviewerobjectlist.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp index a62af15..6ec29ae 100644 --- a/linden/indra/newview/llviewerparcelmgr.cpp +++ b/linden/indra/newview/llviewerparcelmgr.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -66,6 +66,7 @@ #include "llworld.h" #include "lloverlaybar.h" #include "roles_constants.h" +#include "llweb.h" const F32 PARCEL_COLLISION_DRAW_SECS = 1.f; @@ -265,23 +266,6 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out, *dwell_out = dwell; } -void LLViewerParcelMgr::getPrimInfo(S32 &sw_max, S32 &sw_total, S32 &max, S32 &total, S32 &owner, S32 &group, S32 &other, S32& selected, F32 &parcel_object_bonus, S32 &other_clean) -{ - if (mSelected && mCurrentParcel) - { - sw_max = mCurrentParcel->getSimWideMaxPrimCapacity(); - sw_total = mCurrentParcel->getSimWidePrimCount(); - max = llround(mCurrentParcel->getMaxPrimCapacity()*mCurrentParcel->getParcelPrimBonus()); - total = mCurrentParcel->getPrimCount(); - owner = mCurrentParcel->getOwnerPrimCount(); - group = mCurrentParcel->getGroupPrimCount(); - other = mCurrentParcel->getOtherPrimCount(); - selected = mCurrentParcel->getSelectedPrimCount(); - parcel_object_bonus = mCurrentParcel->getParcelPrimBonus(); - other_clean = mCurrentParcel->getCleanOtherTime(); - } -} - S32 LLViewerParcelMgr::getSelectedArea() const { S32 rv = 0; @@ -703,6 +687,7 @@ F32 LLViewerParcelMgr::agentDrawDistance() const BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const { + if (!gWorldp) return FALSE; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global ); if (!region) return FALSE; @@ -716,6 +701,7 @@ BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const { + if (!gWorldp) return FALSE; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global ); if (!region) return FALSE; @@ -729,6 +715,7 @@ BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const { + if (!gWorldp) return FALSE; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global ); if (!region) return FALSE; @@ -742,6 +729,7 @@ BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const BOOL LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const { + if (!gWorldp) return FALSE; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos_global ); if (!region) return FALSE; @@ -785,6 +773,7 @@ BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const { + if (!gWorldp) return FALSE; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(pos_global); if (region != gAgent.getRegion()) { @@ -842,7 +831,8 @@ void LLViewerParcelMgr::render() { // Rendering is done in agent-coordinates, so need to supply // an appropriate offset to the render code. - LLViewerRegion *regionp = gWorldp->getRegionFromPosGlobal( mWestSouth ); + if (!gWorldp) return; + LLViewerRegion* regionp = gWorldp->getRegionFromPosGlobal(mWestSouth); if (!regionp) return; renderHighlightSegments(mHighlightSegments, regionp); @@ -874,6 +864,7 @@ void LLViewerParcelMgr::sendParcelAccessListRequest(U32 flags) return; } + if(!gWorldp) return; LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) return; @@ -909,6 +900,7 @@ void LLViewerParcelMgr::sendParcelDwellRequest() return; } + if(!gWorldp) return; LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) return; @@ -941,6 +933,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id) east_north_region_check.mdV[VX] -= 0.5; east_north_region_check.mdV[VY] -= 0.5; + if(!gWorldp) return; LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) { @@ -997,7 +990,8 @@ void LLViewerParcelMgr::sendParcelGodForceToContent() gViewerWindow->alertXml("CannotContentifyNothingSelected"); return; } - LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); + if(!gWorldp) return; + LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) { gViewerWindow->alertXml("CannotContentifyNoRegion"); @@ -1022,6 +1016,7 @@ void LLViewerParcelMgr::sendParcelRelease() return; } + if(!gWorldp) return; LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) { @@ -1084,6 +1079,7 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy( return NULL; } + if(!gWorldp) return NULL; LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) { @@ -1194,6 +1190,7 @@ void LLViewerParcelMgr::sendParcelDeed(const LLUUID& group_id) gViewerWindow->alertXml("CannotDeedLandNoGroup"); return; } + if(!gWorldp) return; LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) { @@ -1261,7 +1258,7 @@ const LLString& LLViewerParcelMgr::getAgentParcelName() const void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel) { if (!parcel) return; - + if(!gWorldp) return; LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) return; @@ -1287,7 +1284,8 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel) void LLViewerParcelMgr::requestHoverParcelProperties(const LLVector3d& pos) { - LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( pos ); + if(!gWorldp) return; + LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( pos ); if (!region) { return; @@ -1539,7 +1537,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use (request_result == PARCEL_RESULT_MULTIPLE); // Select the whole parcel - LLViewerRegion *region = gWorldp->getRegion( msg->getSender() ); + if(!gWorldp) return; + LLViewerRegion* region = gWorldp->getRegion( msg->getSender() ); if (region) { if (!snap_selection) @@ -1724,6 +1723,10 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use std::string mediaUrl = std::string ( parcel->getMediaURL () ); LLString::trim(mediaUrl); + // clean spaces and whatnot + mediaUrl = LLWeb::escapeURL(mediaUrl); + + // something changed LLMediaEngine* me = LLMediaEngine::getInstance(); if ( ( me->getUrl () != mediaUrl ) @@ -1841,6 +1844,10 @@ void prepare_video(const LLParcel *parcel) { mediaUrl = std::string ( parcel->getMediaURL () ); } + + // clean spaces and whatnot + mediaUrl = LLWeb::escapeURL(mediaUrl); + LLMediaEngine::getInstance ()->setUrl ( mediaUrl ); LLMediaEngine::getInstance ()->setImageUUID ( parcel->getMediaID () ); LLMediaEngine::getInstance ()->setAutoScaled ( parcel->getMediaAutoScale () ? TRUE : FALSE ); // (U8 instead of BOOL for future expansion) @@ -1987,7 +1994,8 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 which) return; } - LLViewerRegion *region = gWorldp->getRegionFromPosGlobal( mWestSouth ); + if(!gWorldp) return; + LLViewerRegion* region = gWorldp->getRegionFromPosGlobal( mWestSouth ); if (!region) return; LLMessageSystem* msg = gMessageSystem; @@ -2178,6 +2186,7 @@ void LLViewerParcelMgr::startReleaseLand() } LLVector3d parcel_center = (mWestSouth + mEastNorth) / 2.0; + if(!gWorldp) return; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center); if (!region) { @@ -2282,6 +2291,7 @@ void LLViewerParcelMgr::callbackDivideLand(S32 option, void* data) LLViewerParcelMgr* self = (LLViewerParcelMgr*)data; LLVector3d parcel_center = (self->mWestSouth + self->mEastNorth) / 2.0; + if(!gWorldp) return; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center); if (!region) { @@ -2340,6 +2350,7 @@ void LLViewerParcelMgr::callbackJoinLand(S32 option, void* data) LLViewerParcelMgr* self = (LLViewerParcelMgr*)data; LLVector3d parcel_center = (self->mWestSouth + self->mEastNorth) / 2.0; + if(!gWorldp) return; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center); if (!region) { @@ -2388,6 +2399,7 @@ void LLViewerParcelMgr::startDeedLandToGroup() } LLVector3d parcel_center = (mWestSouth + mEastNorth) / 2.0; + if(!gWorldp) return; LLViewerRegion* region = gWorldp->getRegionFromPosGlobal(parcel_center); if (!region) { diff --git a/linden/indra/newview/llviewerparcelmgr.h b/linden/indra/newview/llviewerparcelmgr.h index ddf758e..88652d6 100644 --- a/linden/indra/newview/llviewerparcelmgr.h +++ b/linden/indra/newview/llviewerparcelmgr.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -134,8 +134,6 @@ public: void getDisplayInfo(S32* area, S32* claim, S32* rent, BOOL* for_sale, F32* dwell); - void getPrimInfo(S32 &sw_max, S32 &sw_total, S32 &max, S32 &total, S32 &owner, S32 &group, S32 &other, S32& selected, F32 &parcel_object_bonus, S32 &other_clean); - // Returns selected area S32 getSelectedArea() const; diff --git a/linden/indra/newview/llviewerparceloverlay.cpp b/linden/indra/newview/llviewerparceloverlay.cpp index a447680..e1373d0 100644 --- a/linden/indra/newview/llviewerparceloverlay.cpp +++ b/linden/indra/newview/llviewerparceloverlay.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerparceloverlay.h b/linden/indra/newview/llviewerparceloverlay.h index 7c1440e..40e488f 100644 --- a/linden/indra/newview/llviewerparceloverlay.h +++ b/linden/indra/newview/llviewerparceloverlay.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerpartsim.cpp b/linden/indra/newview/llviewerpartsim.cpp index 2c0202e..571e0b4 100644 --- a/linden/indra/newview/llviewerpartsim.cpp +++ b/linden/indra/newview/llviewerpartsim.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerpartsim.h b/linden/indra/newview/llviewerpartsim.h index 8baeb85..dbc0fce 100644 --- a/linden/indra/newview/llviewerpartsim.h +++ b/linden/indra/newview/llviewerpartsim.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerpartsource.cpp b/linden/indra/newview/llviewerpartsource.cpp index 1f1eadf..6c93e75 100644 --- a/linden/indra/newview/llviewerpartsource.cpp +++ b/linden/indra/newview/llviewerpartsource.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerpartsource.h b/linden/indra/newview/llviewerpartsource.h index 9dc4ac3..cb12517 100644 --- a/linden/indra/newview/llviewerpartsource.h +++ b/linden/indra/newview/llviewerpartsource.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerprecompiledheaders.cpp b/linden/indra/newview/llviewerprecompiledheaders.cpp index 6cd3a9e..f7d84a5 100644 --- a/linden/indra/newview/llviewerprecompiledheaders.cpp +++ b/linden/indra/newview/llviewerprecompiledheaders.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerprecompiledheaders.h b/linden/indra/newview/llviewerprecompiledheaders.h index a6fe9f7..db7baaa 100644 --- a/linden/indra/newview/llviewerprecompiledheaders.h +++ b/linden/indra/newview/llviewerprecompiledheaders.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -173,7 +173,6 @@ #include "llinstantmessage.h" #include "llinvite.h" //#include "llloginflags.h" -#include "lllogtextmessage.h" #include "llmail.h" #include "llmessagethrottle.h" #include "llnamevalue.h" diff --git a/linden/indra/newview/llviewerregion.cpp b/linden/indra/newview/llviewerregion.cpp index 54e7db7..f8b8f76 100644 --- a/linden/indra/newview/llviewerregion.cpp +++ b/linden/indra/newview/llviewerregion.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -50,6 +50,7 @@ #include "lldir.h" #include "lleventpoll.h" #include "llfloatergodtools.h" +#include "llfloaterreleasemsg.h" #include "llfloaterreporter.h" #include "llfloaterregioninfo.h" #include "llhttpnode.h" @@ -366,6 +367,11 @@ F32 LLViewerRegion::getWaterHeight() const return mLandp->getWaterHeight(); } +BOOL LLViewerRegion::isVoiceEnabled() const +{ + return (getRegionFlags() & REGION_FLAGS_ALLOW_VOICE); +} + void LLViewerRegion::setRegionFlags(U32 flags) { mRegionFlags = flags; @@ -841,6 +847,7 @@ public: const LLSD& context, const LLSD& input) const { + if(!gWorldp) return; LLHost host(input["sender"].asString()); LLViewerRegion* region = gWorldp->getRegion(host); if( !region ) @@ -1302,6 +1309,13 @@ public: mRegion->setCapability(iter->first, iter->second); llinfos << "BaseCapabilitiesComplete::result got capability for " << iter->first << llendl; + + /* HACK we're waiting for the ServerReleaseNotes */ + if ((iter->first == "ServerReleaseNotes") && (LLFloaterReleaseMsg::sDisplayMessage)) + { + LLFloaterReleaseMsg::show(); + LLFloaterReleaseMsg::sDisplayMessage = false; + } } if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) @@ -1340,6 +1354,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("EventQueueGet"); + capabilityNames.append("GroupProposalBallot"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); capabilityNames.append("NewFileAgentInventory"); @@ -1354,6 +1369,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) capabilityNames.append("SendUserReport"); capabilityNames.append("SendUserReportWithScreenshot"); capabilityNames.append("ServerReleaseNotes"); + capabilityNames.append("StartGroupProposal"); capabilityNames.append("UpdateGestureAgentInventory"); capabilityNames.append("UpdateNotecardAgentInventory"); capabilityNames.append("UpdateScriptAgentInventory"); diff --git a/linden/indra/newview/llviewerregion.h b/linden/indra/newview/llviewerregion.h index 9f59197..b8e19cc 100644 --- a/linden/indra/newview/llviewerregion.h +++ b/linden/indra/newview/llviewerregion.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -109,6 +109,8 @@ public: void setWaterHeight(F32 water_level); F32 getWaterHeight() const; + BOOL isVoiceEnabled() const; + void setBillableFactor(F32 billable_factor) { mBillableFactor = billable_factor; } F32 getBillableFactor() const { return mBillableFactor; } diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp index 2d2f951..ea24d9e 100644 --- a/linden/indra/newview/llviewerstats.cpp +++ b/linden/indra/newview/llviewerstats.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -52,7 +52,7 @@ #include "lldebugview.h" #include "llfasttimerview.h" #include "llviewerregion.h" -#include "llfloaterhtmlhelp.h" +#include "llfloaterhtml.h" #include "llworld.h" #include "llfeaturemanager.h" #if LL_WINDOWS && LL_LCD_COMPILE @@ -187,7 +187,7 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = // ST_CROSSING_MAX StatAttributes("CROSSING_MAX", FALSE, FALSE), // ST_LIBXUL_WIDGET_USED - StatAttributes("LibXUL Widget used", FALSE, FALSE), + StatAttributes("LibXUL Widget used", FALSE, FALSE), // Unused // ST_WINDOW_WIDTH StatAttributes("Window width", FALSE, FALSE), // ST_WINDOW_HEIGHT @@ -575,14 +575,6 @@ void update_statistics(U32 frame_count) gViewerStats->mTexturePacketsStat.addValue(LLViewerImageList::sTexturePackets); - // log when the LibXUL (aka Mozilla) widget is used and opened so we can monitor framerate changes - #if LL_LIBXUL_ENABLED - { - BOOL result = gViewerHtmlHelp.getFloaterOpened(); - gViewerStats->setStat(LLViewerStats::ST_LIBXUL_WIDGET_USED, (F64)result); - } - #endif - { static F32 visible_avatar_frames = 0.f; static F32 avg_visible_avatars = 0; diff --git a/linden/indra/newview/llviewerstats.h b/linden/indra/newview/llviewerstats.h index 7b47521..7d3698c 100644 --- a/linden/indra/newview/llviewerstats.h +++ b/linden/indra/newview/llviewerstats.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -154,7 +154,7 @@ public: ST_RENDER_SECS = 50, ST_CROSSING_AVG = 51, ST_CROSSING_MAX = 52, - ST_LIBXUL_WIDGET_USED = 53, + ST_LIBXUL_WIDGET_USED = 53, // Unused ST_WINDOW_WIDTH = 54, ST_WINDOW_HEIGHT = 55, ST_TEX_BAKES = 56, diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index b421c73..fcc73b4 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -606,54 +606,50 @@ void LLViewerTextEditor::makePristine() BOOL LLViewerTextEditor::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen) { - if (pointInView(x, y) && getVisible()) + for (child_list_const_iter_t child_iter = getChildList()->begin(); + child_iter != getChildList()->end(); ++child_iter) { - for (child_list_const_iter_t child_iter = getChildList()->begin(); - child_iter != getChildList()->end(); ++child_iter) + LLView *viewp = *child_iter; + S32 local_x = x - viewp->getRect().mLeft; + S32 local_y = y - viewp->getRect().mBottom; + if( viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen ) ) { - LLView *viewp = *child_iter; - S32 local_x = x - viewp->getRect().mLeft; - S32 local_y = y - viewp->getRect().mBottom; - if( viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen ) ) - { - return TRUE; - } + return TRUE; } + } + + if( mSegments.empty() ) + { + return TRUE; + } - if( mSegments.empty() ) + LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y ); + if( cur_segment ) + { + BOOL has_tool_tip = FALSE; + if( cur_segment->getStyle().getIsEmbeddedItem() ) { - return TRUE; + LLWString wtip; + has_tool_tip = getEmbeddedItemToolTipAtPos(cur_segment->getStart(), wtip); + msg = wstring_to_utf8str(wtip); } - - LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y ); - if( cur_segment ) + else { - BOOL has_tool_tip = FALSE; - if( cur_segment->getStyle().getIsEmbeddedItem() ) - { - LLWString wtip; - has_tool_tip = getEmbeddedItemToolTipAtPos(cur_segment->getStart(), wtip); - msg = wstring_to_utf8str(wtip); - } - else - { - has_tool_tip = cur_segment->getToolTip( msg ); - } - if( has_tool_tip ) - { - // Just use a slop area around the cursor - // Convert rect local to screen coordinates - S32 SLOP = 8; - localPointToScreen( - x - SLOP, y - SLOP, - &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); - sticky_rect_screen->mRight = sticky_rect_screen->mLeft + 2 * SLOP; - sticky_rect_screen->mTop = sticky_rect_screen->mBottom + 2 * SLOP; - } + has_tool_tip = cur_segment->getToolTip( msg ); + } + if( has_tool_tip ) + { + // Just use a slop area around the cursor + // Convert rect local to screen coordinates + S32 SLOP = 8; + localPointToScreen( + x - SLOP, y - SLOP, + &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) ); + sticky_rect_screen->mRight = sticky_rect_screen->mLeft + 2 * SLOP; + sticky_rect_screen->mTop = sticky_rect_screen->mBottom + 2 * SLOP; } - return TRUE; } - return FALSE; + return TRUE; } BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) @@ -760,9 +756,9 @@ BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) handled = TRUE; } - if (mTakesFocus) + if (hasTabStop()) { - setFocus( TRUE ); + setFocus(TRUE); handled = TRUE; } @@ -1017,11 +1013,7 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) } } - if (mTakesFocus) - { - setFocus( TRUE ); - } - + setCursorAtLocalPos( x, y, FALSE ); deselect(); @@ -1363,7 +1355,11 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, BOOL saved) void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item ) { // See if we can bring an existing preview to the front - if( !LLPreview::show( item->getUUID() ) ) + // *NOTE: Just for embedded Texture , we should use getAssetUUID(), + // not getUUID(), because LLPreviewTexture pass in AssetUUID into + // LLPreview constructor ItemUUID parameter. + + if( !LLPreview::show( item->getAssetUUID() ) ) { // There isn't one, so make a new preview if(item) @@ -1391,7 +1387,7 @@ void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item ) const F32 SOUND_GAIN = 1.0f; if(gAudiop) { - F32 volume = SOUND_GAIN * gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (SOUND_GAIN * gSavedSettings.getF32("AudioLevelSFX")); gAudiop->triggerSound(item->getAssetUUID(), gAgentID, volume, lpos_global); } showCopyToInvDialog( item ); diff --git a/linden/indra/newview/llviewertexteditor.h b/linden/indra/newview/llviewertexteditor.h index f7abfc9..b09e92e 100644 --- a/linden/indra/newview/llviewertexteditor.h +++ b/linden/indra/newview/llviewertexteditor.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewertextureanim.cpp b/linden/indra/newview/llviewertextureanim.cpp index aca354f..bfa999c 100644 --- a/linden/indra/newview/llviewertextureanim.cpp +++ b/linden/indra/newview/llviewertextureanim.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewertextureanim.h b/linden/indra/newview/llviewertextureanim.h index cdf5b18..a12c241 100644 --- a/linden/indra/newview/llviewertextureanim.h +++ b/linden/indra/newview/llviewertextureanim.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerthrottle.cpp b/linden/indra/newview/llviewerthrottle.cpp index 1763cdd..75357ba 100644 --- a/linden/indra/newview/llviewerthrottle.cpp +++ b/linden/indra/newview/llviewerthrottle.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerthrottle.h b/linden/indra/newview/llviewerthrottle.h index 84a9a63..07ecf85 100644 --- a/linden/indra/newview/llviewerthrottle.h +++ b/linden/indra/newview/llviewerthrottle.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvieweruictrlfactory.cpp b/linden/indra/newview/llvieweruictrlfactory.cpp index 663b4bf..e3162b1 100644 --- a/linden/indra/newview/llvieweruictrlfactory.cpp +++ b/linden/indra/newview/llvieweruictrlfactory.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvieweruictrlfactory.h b/linden/indra/newview/llvieweruictrlfactory.h index 843e54d..abfb701 100644 --- a/linden/indra/newview/llvieweruictrlfactory.h +++ b/linden/indra/newview/llvieweruictrlfactory.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewervisualparam.cpp b/linden/indra/newview/llviewervisualparam.cpp index 62c5169..1eac683 100644 --- a/linden/indra/newview/llviewervisualparam.cpp +++ b/linden/indra/newview/llviewervisualparam.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewervisualparam.h b/linden/indra/newview/llviewervisualparam.h index a77a874..aced826 100644 --- a/linden/indra/newview/llviewervisualparam.h +++ b/linden/indra/newview/llviewervisualparam.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 86c43bf..a8ff246 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -266,6 +266,8 @@ const S32 PICK_DIAMETER = 2 * PICK_HALF_WIDTH+1; const F32 MIN_DISPLAY_SCALE = 0.85f; +const S32 CONSOLE_BOTTOM_PAD = 40; + #ifdef SABINRIG /// ALL RIG STUFF bool rigControl = false; @@ -663,18 +665,17 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask // Topmost view gets a chance before the hierarchy LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); - BOOL mouse_over_top_ctrl = FALSE; if (top_ctrl) { S32 local_x, local_y; top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); if (top_ctrl->pointInView(local_x, local_y)) { - mouse_over_top_ctrl = TRUE; - if(top_ctrl->handleMouseDown(local_x, local_y, mask)) - { - return TRUE; - } + return top_ctrl->handleMouseDown(local_x, local_y, mask); + } + else + { + setTopCtrl(NULL); } } @@ -686,11 +687,6 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl; LLView::sMouseHandlerMessage = ""; } - if (top_ctrl && top_ctrl->hasFocus() && !mouse_over_top_ctrl) - { - // always defocus top view if we click off of it - top_ctrl->setFocus(FALSE); - } return TRUE; } else if (LLView::sDebugMouseHandling) @@ -698,12 +694,6 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask llinfos << "Left Mouse Down not handled by view" << llendl; } - if (top_ctrl && top_ctrl->hasFocus() && !mouse_over_top_ctrl) - { - // always defocus top view if we click off of it - top_ctrl->setFocus(FALSE); - } - if (gDisconnected) { return FALSE; @@ -716,7 +706,7 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask // This is necessary to force clicks in the world to cause edit // boxes that might have keyboard focus to relinquish it, and hence // cause a commit to update their value. JC - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); return TRUE; } } @@ -760,18 +750,17 @@ BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK ma // Check for hit on UI. LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); - BOOL mouse_over_top_ctrl = FALSE; if (top_ctrl) { S32 local_x, local_y; top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); if (top_ctrl->pointInView(local_x, local_y)) { - mouse_over_top_ctrl = TRUE; - if(top_ctrl->handleDoubleClick(local_x, local_y, mask)) - { - return TRUE; - } + return top_ctrl->handleDoubleClick(local_x, local_y, mask); + } + else + { + setTopCtrl(NULL); } } @@ -782,11 +771,6 @@ BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK ma llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl; LLView::sMouseHandlerMessage = ""; } - if (top_ctrl && top_ctrl->hasFocus() && !mouse_over_top_ctrl) - { - // always defocus top view if we click off of it - top_ctrl->setFocus(FALSE); - } return TRUE; } else if (LLView::sDebugMouseHandling) @@ -794,12 +778,6 @@ BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK ma llinfos << "Left Mouse Down not handled by view" << llendl; } - if (top_ctrl && top_ctrl->hasFocus() && !mouse_over_top_ctrl) - { - // always defocus top view if we click off of it - top_ctrl->setFocus(FALSE); - } - // Why is this here? JC 9/3/2002 if (gNoRender) { @@ -970,18 +948,17 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK } LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); - BOOL mouse_over_top_ctrl = FALSE; if (top_ctrl) { S32 local_x, local_y; top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); if (top_ctrl->pointInView(local_x, local_y)) { - mouse_over_top_ctrl = TRUE; - if(top_ctrl->handleRightMouseDown(local_x, local_y, mask)) - { - return TRUE; - } + return top_ctrl->handleRightMouseDown(local_x, local_y, mask); + } + else + { + setTopCtrl(NULL); } } @@ -992,11 +969,6 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK llinfos << "Right Mouse Down" << LLView::sMouseHandlerMessage << llendl; LLView::sMouseHandlerMessage = ""; } - if (top_ctrl && top_ctrl->hasFocus() && !mouse_over_top_ctrl) - { - // always defocus top view if we click off of it - top_ctrl->setFocus(FALSE); - } return TRUE; } else if (LLView::sDebugMouseHandling) @@ -1004,12 +976,6 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK llinfos << "Right Mouse Down not handled by view" << llendl; } - if (top_ctrl && top_ctrl->hasFocus() && !mouse_over_top_ctrl) - { - // always defocus top view if we click off of it - top_ctrl->setFocus(FALSE); - } - if (gToolMgr) { if(gToolMgr->getCurrentTool()->handleRightMouseDown( x, y, mask ) ) @@ -1017,7 +983,7 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK // This is necessary to force clicks in the world to cause edit // boxes that might have keyboard focus to relinquish it, and hence // cause a commit to update their value. JC - gFocusMgr.setKeyboardFocus(NULL, NULL); + gFocusMgr.setKeyboardFocus(NULL); return TRUE; } } @@ -1266,7 +1232,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window) // JC - Leave keyboard focus, so if you're popping in and out editing // a script, you don't have to click in the editor again and again. - // gFocusMgr.setKeyboardFocus( NULL, NULL ); + // gFocusMgr.setKeyboardFocus( NULL ); gShowTextEditCursor = FALSE; // If losing focus while keys are down, reset them. @@ -1451,7 +1417,8 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data) case SLURL_MESSAGE_TYPE: // received URL std::string url = (const char*)data; - if (LLURLDispatcher::dispatch(url)) + const bool from_external_browser = true; + if (LLURLDispatcher::dispatch(url, from_external_browser)) { // bring window to foreground, as it has just been "launched" from a URL mWindow->bringToFront(); @@ -1746,14 +1713,6 @@ void LLViewerWindow::initBase() gDebugView->setVisible(TRUE); mRootView->addChild(gDebugView); - // HUD elements just below floaters - LLRect hud_rect = full_window; - hud_rect.mTop -= 24; - hud_rect.mBottom += STATUS_BAR_HEIGHT; - gHUDView = new LLHUDView("hud_view", hud_rect); - gHUDView->setFollowsAll(); - mRootView->addChild(gHUDView); - // Add floater view at the end so it will be on top, and give it tab priority over others mRootView->addChild(gFloaterView, -1); mRootView->addChild(gSnapshotFloaterView); @@ -1823,6 +1782,22 @@ void adjust_rect_bottom_center(const LLString& control, const LLRect& window) } } + +void update_saved_window_size(const LLString& control,S32 delta_width, S32 delta_height) +{ + if (delta_width || delta_height ) + { + LLRect mXMLRect = gSavedSettings.getRect(control); + //hard code it all follows the right and top + mXMLRect.mRight += delta_width; + mXMLRect.mTop += delta_height; + mXMLRect.mLeft = llmax (0, mXMLRect.mLeft+delta_width); + mXMLRect.mBottom = llmax(0,mXMLRect.mBottom+delta_height); + gSavedSettings.setRect(control,mXMLRect); + } +} + + // Many rectangles can't be placed until we know the screen size. // These rectangles have their bottom-left corner as 0,0 void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window) @@ -1871,27 +1846,10 @@ void LLViewerWindow::initWorldUI() S32 width = mRootView->getRect().getWidth(); LLRect full_window(0, height, width, 0); - if ( gToolBar == NULL ) // Don't re-enter if objects are alreay created + if ( gBottomPanel == NULL ) // Don't re-enter if objects are alreay created { - LLRect bar_rect(-1, STATUS_BAR_HEIGHT, width+1, -1); - gToolBar = new LLToolBar("toolbar", bar_rect); - - LLRect chat_bar_rect(-1,CHAT_BAR_HEIGHT, width+1, -1); - chat_bar_rect.translate(0, STATUS_BAR_HEIGHT-1); - gChatBar = new LLChatBar("chat", chat_bar_rect); - - bar_rect.translate(0, STATUS_BAR_HEIGHT-1); - bar_rect.translate(0, CHAT_BAR_HEIGHT-1); - gOverlayBar = new LLOverlayBar("overlay", bar_rect); - // panel containing chatbar, toolbar, and overlay, over floaters - LLRect bottom_rect(-1, 2*STATUS_BAR_HEIGHT + CHAT_BAR_HEIGHT, width+1, -1); - gBottomPanel = new LLBottomPanel("bottom panel", bottom_rect); - - // the order here is important - gBottomPanel->addChild(gChatBar); - gBottomPanel->addChild(gToolBar); - gBottomPanel->addChild(gOverlayBar); + gBottomPanel = new LLBottomPanel(mRootView->getRect()); mRootView->addChild(gBottomPanel); // View for hover information @@ -1923,8 +1881,7 @@ void LLViewerWindow::initWorldUI() mRootView->addChild(gMorphView); gMorphView->setVisible(FALSE); - gFloaterMute = new LLFloaterMute(); - gFloaterMute->setVisible(FALSE); + gFloaterMute = LLFloaterMute::getInstance(); LLWorldMapView::initClass(); @@ -2119,7 +2076,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) glViewport(0, 0, width, height ); if (height > 0 && gCamera) - { + { gCamera->setViewHeightInPixels( height ); if (mWindow->getFullscreen()) { @@ -2132,6 +2089,9 @@ void LLViewerWindow::reshape(S32 width, S32 height) } } + // changes in window's width and hight + S32 delta_width = width - mWindowRect.getWidth(); + S32 delta_height = height - mWindowRect.getHeight(); // update our window rectangle mWindowRect.mRight = mWindowRect.mLeft + width; mWindowRect.mTop = mWindowRect.mBottom + height; @@ -2182,6 +2142,12 @@ void LLViewerWindow::reshape(S32 width, S32 height) { gSavedSettings.setS32("WindowWidth", window_size.mX); gSavedSettings.setS32("WindowHeight", window_size.mY); + if (!gFloaterMap) + { + update_saved_window_size("FloaterWorldMapRect",delta_width, delta_height); + update_saved_window_size("FloaterMapRect",delta_width, delta_height); + } + } } @@ -2205,11 +2171,11 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) gMenuBarView->setVisible( visible ); gMenuBarView->setEnabled( visible ); - // ...and set the menu color appropriately. - setMenuBackgroundColor(gAgent.getGodLevel() > GOD_NOT, - LLAppViewer::instance()->isInProductionGrid()); + // ...and set the menu color appropriately. + setMenuBackgroundColor(gAgent.getGodLevel() > GOD_NOT, + LLAppViewer::instance()->isInProductionGrid()); } - + if ( gStatusBar ) { gStatusBar->setVisible( visible ); @@ -2461,7 +2427,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { BOOL visible = ! gSavedSettings.getBOOL("ForceShowGrid"); gSavedSettings.setBOOL("ForceShowGrid", visible); - LLPanelLogin::loadLoginPage(); + + // Initialize visibility (and don't force visibility - use prefs) + LLPanelLogin::refreshLocation( false ); } } @@ -2482,6 +2450,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } + //if quit from menu, turn off the Keyboardmode for the menu. + if(LLMenuGL::getKeyboardMode()) + LLMenuGL::setKeyboardMode(FALSE); + + if (gFocusMgr.getTopCtrl()) + { + gFocusMgr.setTopCtrl(NULL); + return TRUE; + } + // *TODO: get this to play well with mouselook and hidden // cursor modes, etc, and re-enable. //if (gFocusMgr.getMouseCapture()) @@ -3022,23 +3000,9 @@ BOOL LLViewerWindow::handlePerFrameHover() } // Update rectangles for the various toolbars - if (gToolBar && gChatBar && gOverlayBar && gNotifyBoxView && gConsole) + if (gOverlayBar && gNotifyBoxView && gConsole) { LLRect bar_rect(-1, STATUS_BAR_HEIGHT, getWindowWidth()+1, -1); - if (gToolBar->getVisible()) - { - gToolBar->setRect(bar_rect); - bar_rect.translate(0, STATUS_BAR_HEIGHT-1); - } - - if (gChatBar->getVisible()) - { - // fix up the height - LLRect chat_bar_rect = bar_rect; - chat_bar_rect.mTop = chat_bar_rect.mBottom + CHAT_BAR_HEIGHT + 1; - gChatBar->setRect(chat_bar_rect); - bar_rect.translate(0, CHAT_BAR_HEIGHT-1); - } LLRect notify_box_rect = gNotifyBoxView->getRect(); notify_box_rect.mBottom = bar_rect.mBottom; @@ -3056,44 +3020,28 @@ BOOL LLViewerWindow::handlePerFrameHover() gFloaterView->setRect(floater_rect); } - if (gOverlayBar->getVisible()) + // snap floaters to top of chat bar/button strip + LLView* chatbar_and_buttons = gOverlayBar->getChildByName("chatbar_and_buttons", TRUE); + if (chatbar_and_buttons) { - LLRect overlay_rect = bar_rect; - overlay_rect.mTop = overlay_rect.mBottom + OVERLAY_BAR_HEIGHT; - - // Fitt's Law: Push buttons flush with bottom of screen if - // nothing else visible. - if (!gToolBar->getVisible() - && !gChatBar->getVisible()) - { - // *NOTE: this is highly depenent on the XML - // describing the position of the buttons - overlay_rect.translate(0, 0); - } - - gOverlayBar->setRect(overlay_rect); - gOverlayBar->updateRect(); - bar_rect.translate(0, gOverlayBar->getRect().getHeight()); - - gFloaterView->setSnapOffsetBottom(OVERLAY_BAR_HEIGHT); + // convert top/left corner of chatbar/buttons container to gFloaterView-relative coordinates + S32 top, left; + chatbar_and_buttons->localPointToOtherView( + chatbar_and_buttons->getLocalBoundingRect().mLeft, + chatbar_and_buttons->getLocalBoundingRect().mTop, + &left, + &top, + gFloaterView); + gFloaterView->setSnapOffsetBottom(top); } else { gFloaterView->setSnapOffsetBottom(0); } - // fix rectangle of bottom panel focus indicator - if(gBottomPanel && gBottomPanel->getFocusIndicator()) - { - LLRect focus_rect = gBottomPanel->getFocusIndicator()->getRect(); - focus_rect.mTop = (gToolBar->getVisible() ? STATUS_BAR_HEIGHT : 0) + - (gChatBar->getVisible() ? CHAT_BAR_HEIGHT : 0) - 2; - gBottomPanel->getFocusIndicator()->setRect(focus_rect); - } - // Always update console LLRect console_rect = gConsole->getRect(); - console_rect.mBottom = bar_rect.mBottom + 8; + console_rect.mBottom = gHUDView->getRect().mBottom + CONSOLE_BOTTOM_PAD; gConsole->reshape(console_rect.getWidth(), console_rect.getHeight()); gConsole->setRect(console_rect); } @@ -3671,13 +3619,6 @@ void LLViewerWindow::performPick() // 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; @@ -4604,9 +4545,9 @@ void LLViewerWindow::drawMouselookInstructions() // These functions are here only because LLViewerWindow used to do the work that gFocusMgr does now. // They let other objects continue to work without change. -void LLViewerWindow::setKeyboardFocus(LLUICtrl* new_focus,void (*on_focus_lost)(LLUICtrl* old_focus)) +void LLViewerWindow::setKeyboardFocus(LLUICtrl* new_focus) { - gFocusMgr.setKeyboardFocus( new_focus, on_focus_lost ); + gFocusMgr.setKeyboardFocus( new_focus ); } LLUICtrl* LLViewerWindow::getKeyboardFocus() @@ -5076,7 +5017,7 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, } mIgnoreActivate = FALSE; - gFocusMgr.setKeyboardFocus(keyboard_focus, NULL); + gFocusMgr.setKeyboardFocus(keyboard_focus); mWantFullscreen = mWindow->getFullscreen(); mShowFullscreenProgress = FALSE; @@ -5276,16 +5217,22 @@ LLAlertDialog* LLViewerWindow::alertXmlEditText(const std::string& xml_filename, //////////////////////////////////////////////////////////////////////////// -LLBottomPanel::LLBottomPanel(const LLString &name, const LLRect &rect) : - LLPanel(name, rect, FALSE), +LLBottomPanel::LLBottomPanel(const LLRect &rect) : + LLPanel("", rect, FALSE), mIndicator(NULL) { // bottom panel is focus root, so Tab moves through the toolbar and button bar, and overlay setFocusRoot(TRUE); - // don't capture mouse clicks that don't hit a child - setMouseOpaque(FALSE); - setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM); + // flag this panel as chrome so buttons don't grab keyboard focus setIsChrome(TRUE); + + mFactoryMap["toolbar"] = LLCallbackMap(createToolBar, NULL); + mFactoryMap["overlay"] = LLCallbackMap(createOverlayBar, NULL); + mFactoryMap["hud"] = LLCallbackMap(createHUD, NULL); + gUICtrlFactory->buildPanel(this, "panel_bars.xml", &getFactoryMap()); + + setOrigin(rect.mLeft, rect.mBottom); + reshape(rect.getWidth(), rect.getHeight()); } void LLBottomPanel::setFocusIndicator(LLView * indicator) @@ -5303,3 +5250,25 @@ void LLBottomPanel::draw() } LLPanel::draw(); } + +void* LLBottomPanel::createHUD(void* data) +{ + delete gHUDView; + gHUDView = new LLHUDView(); + return gHUDView; +} + + +void* LLBottomPanel::createOverlayBar(void* data) +{ + delete gOverlayBar; + gOverlayBar = new LLOverlayBar(); + return gOverlayBar; +} + +void* LLBottomPanel::createToolBar(void* data) +{ + delete gToolBar; + gToolBar = new LLToolBar(); + return gToolBar; +} diff --git a/linden/indra/newview/llviewerwindow.h b/linden/indra/newview/llviewerwindow.h index f792e3f..d27e74b 100644 --- a/linden/indra/newview/llviewerwindow.h +++ b/linden/indra/newview/llviewerwindow.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -186,7 +186,7 @@ public: // Handle the application becoming active (frontmost) or inactive //BOOL handleActivate(BOOL activate); - void setKeyboardFocus(LLUICtrl* new_focus,void (*on_focus_lost)(LLUICtrl* old_focus)); // new_focus = NULL to release the focus. + void setKeyboardFocus(LLUICtrl* new_focus); // new_focus = NULL to release the focus. LLUICtrl* getKeyboardFocus(); BOOL hasKeyboardFocus( const LLUICtrl* possible_focus ) const; BOOL childHasKeyboardFocus( const LLView* parent ) const; @@ -364,10 +364,15 @@ protected: class LLBottomPanel : public LLPanel { public: - LLBottomPanel(const LLString& name, const LLRect& rect); + LLBottomPanel(const LLRect& rect); void setFocusIndicator(LLView * indicator); LLView * getFocusIndicator() { return mIndicator; } /*virtual*/ void draw(); + + static void* createHUD(void* data); + static void* createOverlayBar(void* data); + static void* createToolBar(void* data); + protected: LLView * mIndicator; }; @@ -377,7 +382,7 @@ void toggle_flying(void*); void toggle_first_person(); void toggle_build(void*); void reset_viewer_state_on_sim(void); - +void update_saved_window_size(const LLString& control,S32 delta_width, S32 delta_height); // // Constants // diff --git a/linden/indra/newview/llvlcomposition.cpp b/linden/indra/newview/llvlcomposition.cpp index 2ab6a65..904c2b9 100644 --- a/linden/indra/newview/llvlcomposition.cpp +++ b/linden/indra/newview/llvlcomposition.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvlcomposition.h b/linden/indra/newview/llvlcomposition.h index 30b5b37..0ff9df4 100644 --- a/linden/indra/newview/llvlcomposition.h +++ b/linden/indra/newview/llvlcomposition.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvlmanager.cpp b/linden/indra/newview/llvlmanager.cpp index 8bfa7bf..f4dade5 100644 --- a/linden/indra/newview/llvlmanager.cpp +++ b/linden/indra/newview/llvlmanager.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvlmanager.h b/linden/indra/newview/llvlmanager.h index dc09de5..f6c138c 100644 --- a/linden/indra/newview/llvlmanager.h +++ b/linden/indra/newview/llvlmanager.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 53aae14..6798b4d 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -311,7 +311,13 @@ class LLBodyNoiseMotion : { public: // Constructor - LLBodyNoiseMotion(const LLUUID &id) : LLMotion(id) {mName = "body_noise";} + LLBodyNoiseMotion(const LLUUID &id) + : LLMotion(id) + { + mName = "body_noise"; + + mTorsoState = new LLJointState; + } // Destructor virtual ~LLBodyNoiseMotion() { } @@ -354,14 +360,14 @@ public: // must return true to indicate success and be available for activation virtual LLMotionInitStatus onInitialize(LLCharacter *character) { - if( !mTorsoState.setJoint( character->getJoint("mTorso") )) + if( !mTorsoState->setJoint( character->getJoint("mTorso") )) { return STATUS_FAILURE; } - mTorsoState.setUsage(LLJointState::ROT); + mTorsoState->setUsage(LLJointState::ROT); - addJointState( &mTorsoState ); + addJointState( mTorsoState ); return STATUS_SUCCESS; } @@ -388,7 +394,7 @@ public: F32 ry = TORSO_NOISE_AMOUNT * DEG_TO_RAD * noiseY / 0.42f; LLQuaternion tQn; tQn.setQuat( rx, ry, 0.0f ); - mTorsoState.setRotation( tQn ); + mTorsoState->setRotation( tQn ); return TRUE; } @@ -400,7 +406,7 @@ public: //------------------------------------------------------------------------- // joint states to be animated //------------------------------------------------------------------------- - LLJointState mTorsoState; + LLPointer mTorsoState; }; //----------------------------------------------------------------------------- @@ -417,6 +423,8 @@ public: mCharacter(NULL) { mName = "breathe_rot"; + + mChestState = new LLJointState; } // Destructor @@ -463,12 +471,12 @@ public: mCharacter = character; bool success = true; - if ( !mChestState.setJoint( character->getJoint( "mChest" ) ) ) { success = false; } + if ( !mChestState->setJoint( character->getJoint( "mChest" ) ) ) { success = false; } if ( success ) { - mChestState.setUsage(LLJointState::ROT); - addJointState( &mChestState ); + mChestState->setUsage(LLJointState::ROT); + addJointState( mChestState ); } if ( success ) @@ -495,7 +503,7 @@ public: F32 breathe_amt = (sinf(mBreatheRate * time) * BREATHE_ROT_MOTION_STRENGTH); - mChestState.setRotation(LLQuaternion(breathe_amt, LLVector3(0.f, 1.f, 0.f))); + mChestState->setRotation(LLQuaternion(breathe_amt, LLVector3(0.f, 1.f, 0.f))); return TRUE; } @@ -507,7 +515,7 @@ public: //------------------------------------------------------------------------- // joint states to be animated //------------------------------------------------------------------------- - LLJointState mChestState; + LLPointer mChestState; F32 mBreatheRate; LLCharacter* mCharacter; }; @@ -520,7 +528,13 @@ class LLPelvisFixMotion : { public: // Constructor - LLPelvisFixMotion(const LLUUID &id) : LLMotion(id), mCharacter(NULL) {mName = "pelvis_fix";} + LLPelvisFixMotion(const LLUUID &id) + : LLMotion(id), mCharacter(NULL) + { + mName = "pelvis_fix"; + + mPelvisState = new LLJointState; + } // Destructor virtual ~LLPelvisFixMotion() { } @@ -565,14 +579,14 @@ public: { mCharacter = character; - if (!mPelvisState.setJoint( character->getJoint("mPelvis"))) + if (!mPelvisState->setJoint( character->getJoint("mPelvis"))) { return STATUS_FAILURE; } - mPelvisState.setUsage(LLJointState::POS); + mPelvisState->setUsage(LLJointState::POS); - addJointState( &mPelvisState ); + addJointState( mPelvisState ); return STATUS_SUCCESS; } @@ -586,7 +600,7 @@ public: // must return FALSE when the motion is completed. virtual BOOL onUpdate(F32 time, U8* joint_mask) { - mPelvisState.setPosition(LLVector3::zero); + mPelvisState->setPosition(LLVector3::zero); return TRUE; } @@ -598,7 +612,7 @@ public: //------------------------------------------------------------------------- // joint states to be animated //------------------------------------------------------------------------- - LLJointState mPelvisState; + LLPointer mPelvisState; LLCharacter* mCharacter; }; @@ -3413,7 +3427,9 @@ void LLVOAvatar::updateCharacter(LLAgent &agent) // AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient"); - F32 gain = .50f * ambient_volume * ambient_volume; + F32 gain = gSavedSettings.getBOOL("MuteAmbient") + ? 0.f + : (.50f * ambient_volume * ambient_volume); LLUUID& step_sound_id = getStepSound(); LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); @@ -4388,7 +4404,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL //else { LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping")); - F32 volume = gSavedSettings.getF32("AudioLevelSFX"); + F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : gSavedSettings.getF32("AudioLevelSFX"); gAudiop->triggerSound(sound_id, getID(), volume, char_pos_global); } } diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index cb1c796..a8b8486 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h @@ -13,12 +13,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvocache.cpp b/linden/indra/newview/llvocache.cpp index b7f4ce7..39ee63f 100644 --- a/linden/indra/newview/llvocache.cpp +++ b/linden/indra/newview/llvocache.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvocache.h b/linden/indra/newview/llvocache.h index 8afbd70..c994d4b 100644 --- a/linden/indra/newview/llvocache.h +++ b/linden/indra/newview/llvocache.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvoclouds.cpp b/linden/indra/newview/llvoclouds.cpp index 6c98b37..56f7be9 100644 --- a/linden/indra/newview/llvoclouds.cpp +++ b/linden/indra/newview/llvoclouds.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvoclouds.h b/linden/indra/newview/llvoclouds.h index 7c62fe0..71e8c40 100644 --- a/linden/indra/newview/llvoclouds.h +++ b/linden/indra/newview/llvoclouds.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvograss.cpp b/linden/indra/newview/llvograss.cpp index 593b1d6..3b6b837 100644 --- a/linden/indra/newview/llvograss.cpp +++ b/linden/indra/newview/llvograss.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvograss.h b/linden/indra/newview/llvograss.h index 0f9dcdb..36a0e9f 100644 --- a/linden/indra/newview/llvograss.h +++ b/linden/indra/newview/llvograss.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvoground.cpp b/linden/indra/newview/llvoground.cpp index a0e9a82..ad627e6 100644 --- a/linden/indra/newview/llvoground.cpp +++ b/linden/indra/newview/llvoground.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvoground.h b/linden/indra/newview/llvoground.h index 417312a..25e6fa6 100644 --- a/linden/indra/newview/llvoground.h +++ b/linden/indra/newview/llvoground.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 891ea73..6079447 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -29,11 +29,11 @@ * $/LicenseInfo$ */ -#include - #include "llviewerprecompiledheaders.h" #include "llvoiceclient.h" +#include + #include "llsdutil.h" #include "llvoavatar.h" @@ -43,7 +43,6 @@ #include "llcallbacklist.h" #include "llviewerregion.h" #include "llviewernetwork.h" // for gGridChoice -#include "llfloateractivespeakers.h" // for LLSpeakerMgr #include "llbase64.h" #include "llviewercontrol.h" #include "llkeyboard.h" @@ -532,7 +531,7 @@ void LLVivoxProtocolParser::CharData(const char *buffer, int length) void LLVivoxProtocolParser::processResponse(std::string tag) { -// llinfos << tag << llendl; + //llinfos << tag << llendl; if (isEvent) { @@ -768,7 +767,7 @@ static HANDLE sGatewayHandle = 0; static bool isGatewayRunning() { bool result = false; - if(sGatewayHandle != 0) + if(sGatewayHandle != 0) { DWORD waitresult = WaitForSingleObject(sGatewayHandle, 0); if(waitresult != WAIT_OBJECT_0) @@ -854,7 +853,7 @@ LLVoiceClient::LLVoiceClient() setPTTKey(keyString); mPTTIsToggle = gSavedSettings.getBOOL("PushToTalkToggle"); mEarLocation = gSavedSettings.getS32("VoiceEarLocation"); - setVoiceVolume(gSavedSettings.getF32("AudioLevelVoice")); + setVoiceVolume(gSavedSettings.getBOOL("MuteVoice") ? 0.f : gSavedSettings.getF32("AudioLevelVoice")); std::string captureDevice = gSavedSettings.getString("VoiceInputAudioDevice"); setCaptureDevice(captureDevice); std::string renderDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); @@ -876,7 +875,6 @@ LLVoiceClient::LLVoiceClient() mTuningMicVolumeDirty = true; mTuningSpeakerVolume = 0; mTuningSpeakerVolumeDirty = true; - mTuningCaptureRunning = false; // gMuteListp isn't set up at this point, so we defer this until later. // gMuteListp->addObserver(&mutelist_listener); @@ -1138,14 +1136,15 @@ const char *LLVoiceClient::state2string(LLVoiceClient::state inState) CASE(stateConnectorStart); CASE(stateConnectorStarting); CASE(stateConnectorStarted); - CASE(stateMicTuningNoLogin); CASE(stateLoginRetry); CASE(stateLoginRetryWait); CASE(stateNeedsLogin); CASE(stateLoggingIn); CASE(stateLoggedIn); CASE(stateNoChannel); - CASE(stateMicTuningLoggedIn); + CASE(stateMicTuningStart); + CASE(stateMicTuningRunning); + CASE(stateMicTuningStop); CASE(stateSessionCreate); CASE(stateSessionConnect); CASE(stateJoiningSession); @@ -1164,6 +1163,7 @@ const char *LLVoiceClient::state2string(LLVoiceClient::state inState) CASE(stateJoinSessionFailed); CASE(stateJoinSessionFailedWaiting); CASE(stateJail); + CASE(stateMicTuningNoLogin); } #undef CASE @@ -1483,7 +1483,8 @@ void LLVoiceClient::stateMachine() } else if(mTuningMode) { - setState(stateMicTuningNoLogin); + mTuningExitState = stateConnectorStart; + setState(stateMicTuningStart); } break; @@ -1515,24 +1516,63 @@ void LLVoiceClient::stateMachine() } break; - case stateMicTuningNoLogin: - case stateMicTuningLoggedIn: - { - // Both of these behave essentially the same. The only difference is where the exit transition goes to. - if(mTuningMode && mVoiceEnabled && !mSessionTerminateRequested) - { - if(!mTuningCaptureRunning) + case stateMicTuningStart: + if(mUpdateTimer.hasExpired()) + { + if(mCaptureDeviceDirty || mRenderDeviceDirty) + { + // These can't be changed while in tuning mode. Set them before starting. + std::ostringstream stream; + + if(mCaptureDeviceDirty) + { + buildSetCaptureDevice(stream); + } + + if(mRenderDeviceDirty) + { + buildSetRenderDevice(stream); + } + + mCaptureDeviceDirty = false; + mRenderDeviceDirty = false; + + if(!stream.str().empty()) + { + writeString(stream.str()); + } + + // This will come around again in the same state and start the capture, after the timer expires. + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + } + else { // duration parameter is currently unused, per Mike S. tuningCaptureStartSendMessage(10000); + + setState(stateMicTuningRunning); } - - if(mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty || mCaptureDeviceDirty || mRenderDeviceDirty) + } + + break; + + case stateMicTuningRunning: + if(!mTuningMode || !mVoiceEnabled || mSessionTerminateRequested || mCaptureDeviceDirty || mRenderDeviceDirty) + { + // All of these conditions make us leave tuning mode. + setState(stateMicTuningStop); + } + else + { + // process mic/speaker volume changes + if(mTuningMicVolumeDirty || mTuningSpeakerVolumeDirty) { std::ostringstream stream; if(mTuningMicVolumeDirty) { + llinfos << "setting tuning mic level to " << mTuningMicVolume << llendl; stream << "" << "" << mTuningMicVolume << "" @@ -1547,20 +1587,8 @@ void LLVoiceClient::stateMachine() << "\n\n\n"; } - if(mCaptureDeviceDirty) - { - buildSetCaptureDevice(stream); - } - - if(mRenderDeviceDirty) - { - buildSetRenderDevice(stream); - } - mTuningMicVolumeDirty = false; mTuningSpeakerVolumeDirty = false; - mCaptureDeviceDirty = false; - mRenderDeviceDirty = false; if(!stream.str().empty()) { @@ -1568,23 +1596,19 @@ void LLVoiceClient::stateMachine() } } } - else - { - // transition out of mic tuning - if(mTuningCaptureRunning) - { - tuningCaptureStopSendMessage(); - } - - if(getState() == stateMicTuningNoLogin) - { - setState(stateConnectorStart); - } - else - { - setState(stateNoChannel); - } - } + break; + + case stateMicTuningStop: + { + // transition out of mic tuning + tuningCaptureStopSendMessage(); + + setState(mTuningExitState); + + // if we exited just to change devices, this will keep us from re-entering too fast. + mUpdateTimer.start(); + mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); + } break; @@ -1654,7 +1678,8 @@ void LLVoiceClient::stateMachine() } else if(mTuningMode) { - setState(stateMicTuningLoggedIn); + mTuningExitState = stateNoChannel; + setState(stateMicTuningStart); } else if(!mNextSessionHandle.empty()) { @@ -1880,6 +1905,12 @@ void LLVoiceClient::stateMachine() case stateJail: // We have given up. Do nothing. break; + + case stateMicTuningNoLogin: + // *TODO: Implement me. + llwarns << "stateMicTuningNoLogin not handled" + << llendl; + break; } if(mParticipantMapChanged) @@ -2183,9 +2214,9 @@ bool LLVoiceClient::inTuningMode() bool result = false; switch(getState()) { - case stateMicTuningNoLogin: - case stateMicTuningLoggedIn: + case stateMicTuningRunning: result = true; + break; default: break; } @@ -2193,10 +2224,7 @@ bool LLVoiceClient::inTuningMode() } void LLVoiceClient::tuningRenderStartSendMessage(const std::string& name, bool loop) -{ - if(!inTuningMode()) - return; - +{ mTuningAudioFile = name; std::ostringstream stream; stream @@ -2210,9 +2238,6 @@ void LLVoiceClient::tuningRenderStartSendMessage(const std::string& name, bool l void LLVoiceClient::tuningRenderStopSendMessage() { - if(!inTuningMode()) - return; - std::ostringstream stream; stream << "" @@ -2224,9 +2249,8 @@ void LLVoiceClient::tuningRenderStopSendMessage() void LLVoiceClient::tuningCaptureStartSendMessage(int duration) { - if(!inTuningMode()) - return; - + llinfos << "sending CaptureAudioStart" << llendl; + std::ostringstream stream; stream << "" @@ -2234,15 +2258,12 @@ void LLVoiceClient::tuningCaptureStartSendMessage(int duration) << "\n\n\n"; writeString(stream.str()); - - mTuningCaptureRunning = true; } void LLVoiceClient::tuningCaptureStopSendMessage() { - if(!inTuningMode()) - return; - + llinfos << "sending CaptureAudioStop" << llendl; + std::ostringstream stream; stream << "" @@ -2250,7 +2271,7 @@ void LLVoiceClient::tuningCaptureStopSendMessage() writeString(stream.str()); - mTuningCaptureRunning = false; + mTuningEnergy = 0.0f; } void LLVoiceClient::tuningSetMicVolume(float volume) @@ -2914,12 +2935,16 @@ void LLVoiceClient::sessionNewEvent( LLUUID caller_id; if(IDFromName(nameString, caller_id)) { - gIMMgr->inviteToSession(LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, caller_id), - LLString::null, - caller_id, - LLString::null, - IM_SESSION_P2P_INVITE, - eventSessionHandle); + gIMMgr->inviteToSession( + LLIMMgr::computeSessionID( + IM_SESSION_P2P_INVITE, + caller_id), + LLString::null, + caller_id, + LLString::null, + IM_SESSION_P2P_INVITE, + LLIMMgr::INVITATION_TYPE_VOICE, + eventSessionHandle); } else { @@ -2985,6 +3010,7 @@ void LLVoiceClient::participantPropertiesEvent( { participant->mPTT = !isLocallyMuted; participant->mIsSpeaking = isSpeaking; + participant->mIsModeratorMuted = isModeratorMuted; if (isSpeaking) { participant->mSpeakingTimeout.reset(); @@ -3022,7 +3048,7 @@ void LLVoiceClient::muteListChanged() ///////////////////////////// // Managing list of participants LLVoiceClient::participantState::participantState(const std::string &uri) : - mURI(uri), mPTT(false), mIsSpeaking(false), mPower(0.0), mServiceType(serviceTypeUnknown), + mURI(uri), mPTT(false), mIsSpeaking(false), mIsModeratorMuted(false), mPower(0.0), mServiceType(serviceTypeUnknown), mOnMuteList(false), mUserVolume(100), mVolumeDirty(false), mAvatarIDValid(false) { } @@ -3204,7 +3230,6 @@ void LLVoiceClient::parcelChanged() std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest"); LLSD data; - data["method"] = "call"; LLHTTPClient::post( url, data, @@ -3265,6 +3290,7 @@ void LLVoiceClient::switchChannel( { // Leave any channel we may be in llinfos << "leaving channel" << llendl; + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); } else { @@ -3786,6 +3812,19 @@ BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) return result; } +BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) +{ + BOOL result = FALSE; + + participantState *participant = findParticipantByID(id); + if(participant) + { + result = participant->mIsModeratorMuted; + } + + return result; +} + F32 LLVoiceClient::getCurrentPower(const LLUUID& id) { F32 result = 0; @@ -3956,7 +3995,14 @@ void LLVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusTy { case 20713: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_FULL; break; case 20714: status = LLVoiceClientStatusObserver::ERROR_CHANNEL_LOCKED; break; - case 20715: status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + case 20715: + //invalid channel, we may be using a set of poorly cached + //info + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; + break; + case 1009: + //invalid username and password + status = LLVoiceClientStatusObserver::ERROR_NOT_AVAILABLE; break; } diff --git a/linden/indra/newview/llvoiceclient.h b/linden/indra/newview/llvoiceclient.h index 71044a8..d12bfa8 100644 --- a/linden/indra/newview/llvoiceclient.h +++ b/linden/indra/newview/llvoiceclient.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -63,6 +63,7 @@ public: STATUS_JOINING, STATUS_JOINED, STATUS_LEFT_CHANNEL, + STATUS_VOICE_DISABLED, BEGIN_ERROR_STATUS, ERROR_CHANNEL_FULL, ERROR_CHANNEL_LOCKED, @@ -139,6 +140,7 @@ class LLVoiceClient: public LLSingleton void tuningStart(); void tuningStop(); bool inTuningMode(); + bool inTuningStates(); void tuningRenderStartSendMessage(const std::string& name, bool loop); void tuningRenderStopSendMessage(); @@ -218,6 +220,7 @@ class LLVoiceClient: public LLSingleton // Accessors for data related to nearby speakers BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar BOOL getIsSpeaking(const LLUUID& id); + BOOL getIsModeratorMuted(const LLUUID& id); F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... BOOL getPTTPressed(const LLUUID& id); // This is the inverse of the "locally muted" property. BOOL getOnMuteList(const LLUUID& id); @@ -242,6 +245,7 @@ class LLVoiceClient: public LLSingleton std::string mDisplayName; bool mPTT; bool mIsSpeaking; + bool mIsModeratorMuted; LLFrameTimer mSpeakingTimeout; F32 mLastSpokeTimestamp; F32 mPower; @@ -316,7 +320,9 @@ class LLVoiceClient: public LLSingleton stateLoggingIn, // waiting for account handle stateLoggedIn, // account handle received stateNoChannel, // - stateMicTuningLoggedIn, // mic tuning for a logged in user + stateMicTuningStart, + stateMicTuningRunning, + stateMicTuningStop, stateSessionCreate, // need to send Session.Create command stateSessionConnect, // need to send Session.Connect command stateJoiningSession, // waiting for session handle @@ -387,7 +393,7 @@ class LLVoiceClient: public LLSingleton bool mTuningMicVolumeDirty; int mTuningSpeakerVolume; bool mTuningSpeakerVolumeDirty; - bool mTuningCaptureRunning; + state mTuningExitState; // state to return to when we leave tuning mode. std::string mSpatialSessionURI; diff --git a/linden/indra/newview/llvoiceremotectrl.cpp b/linden/indra/newview/llvoiceremotectrl.cpp index 6b3db08..099e528 100644 --- a/linden/indra/newview/llvoiceremotectrl.cpp +++ b/linden/indra/newview/llvoiceremotectrl.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -41,14 +41,33 @@ #include "llvoiceclient.h" #include "llimpanel.h" #include "llfloateractivespeakers.h" +#include "llfloaterchatterbox.h" #include "lliconctrl.h" +#include "lloverlaybar.h" +#include "lltextbox.h" LLVoiceRemoteCtrl::LLVoiceRemoteCtrl (const LLString& name) : LLPanel(name) { setIsChrome(TRUE); - gUICtrlFactory->buildPanel(this, "panel_voice_remote.xml"); + if (gSavedSettings.getBOOL("ShowVoiceChannelPopup")) + { + gUICtrlFactory->buildPanel(this, "panel_voice_remote_expanded.xml"); + } + else + { + gUICtrlFactory->buildPanel(this, "panel_voice_remote.xml"); + } + + mIsFocusRoot = TRUE; +} + +LLVoiceRemoteCtrl::~LLVoiceRemoteCtrl() +{ +} +BOOL LLVoiceRemoteCtrl::postBuild() +{ mTalkBtn = LLUICtrlFactory::getButtonByName(this, "push_to_talk"); mTalkBtn->setClickedCallback(onBtnTalkClicked); mTalkBtn->setHeldDownCallback(onBtnTalkHeld); @@ -56,15 +75,25 @@ LLVoiceRemoteCtrl::LLVoiceRemoteCtrl (const LLString& name) : LLPanel(name) mTalkLockBtn = LLUICtrlFactory::getButtonByName(this, "ptt_lock"); mTalkLockBtn->setClickedCallback(onBtnLock); + mTalkLockBtn->setCallbackUserData(this); mSpeakersBtn = LLUICtrlFactory::getButtonByName(this, "speakers_btn"); mSpeakersBtn->setClickedCallback(onClickSpeakers); + mSpeakersBtn->setCallbackUserData(this); - mIsFocusRoot = TRUE; -} + childSetAction("show_channel", onClickPopupBtn, this); + childSetAction("end_call_btn", onClickEndCall, this); -LLVoiceRemoteCtrl::~LLVoiceRemoteCtrl() -{ + LLTextBox* text = LLUICtrlFactory::getTextBoxByName(this, "channel_label"); + if (text) + { + text->setUseEllipses(TRUE); + } + + childSetAction("voice_channel_bg", onClickVoiceChannel, this); + + + return TRUE; } void LLVoiceRemoteCtrl::draw() @@ -79,17 +108,6 @@ void LLVoiceRemoteCtrl::draw() mTalkBtn->setEnabled(voice_active); mTalkLockBtn->setEnabled(voice_active); -// if (voice_active) -// { -// mTalkBtn->setToolTip(""); -// mTalkLockBtn->setToolTip(""); -// } -// else -// { -// mTalkBtn->setToolTip(""); -// mTalkLockBtn->setToolTip(""); -// } - // propagate ptt state to button display, if (!mTalkBtn->hasMouseCapture()) { @@ -138,6 +156,63 @@ void LLVoiceRemoteCtrl::draw() icon->setImage(talk_blip_image_id); } + LLFloater* voice_floater = LLFloaterChatterBox::getInstance()->getCurrentVoiceFloater(); + LLString active_channel_name; + if (voice_floater) + { + active_channel_name = voice_floater->getShortTitle(); + } + + LLVoiceChannel* current_channel = LLVoiceChannel::getCurrentVoiceChannel(); + childSetEnabled("end_call_btn", LLVoiceClient::voiceEnabled() + && current_channel + && current_channel->isActive() + && current_channel != LLVoiceChannelProximal::getInstance()); + + childSetValue("channel_label", active_channel_name); + childSetToolTip("voice_channel_bg", active_channel_name); + + if (current_channel) + { + LLIconCtrl* voice_channel_icon = LLUICtrlFactory::getIconByName(this, "voice_channel_icon"); + if (voice_channel_icon && voice_floater) + { + voice_channel_icon->setImage(LLUUID(gViewerArt.getString(voice_floater->getUIString("voice_icon")))); + } + + LLButton* voice_channel_bg = LLUICtrlFactory::getButtonByName(this, "voice_channel_bg"); + if (voice_channel_bg) + { + LLColor4 bg_color; + if (current_channel->isActive()) + { + bg_color = lerp(LLColor4::green, LLColor4::white, 0.7f); + } + else if (current_channel->getState() == LLVoiceChannel::STATE_ERROR) + { + bg_color = lerp(LLColor4::red, LLColor4::white, 0.7f); + } + else // active, but not connected + { + bg_color = lerp(LLColor4::yellow, LLColor4::white, 0.7f); + } + voice_channel_bg->setImageColor(bg_color); + } + } + + LLButton* expand_button = LLUICtrlFactory::getButtonByName(this, "show_channel"); + if (expand_button) + { + if (expand_button->getToggleState()) + { + expand_button->setImageOverlay("arrow_down.tga"); + } + else + { + expand_button->setImageOverlay("arrow_up.tga"); + } + } + LLPanel::draw(); } @@ -172,12 +247,45 @@ void LLVoiceRemoteCtrl::onBtnLock(void* user_data) { LLVoiceRemoteCtrl* remotep = (LLVoiceRemoteCtrl*)user_data; - remotep->mTalkLockBtn->toggleState(); gSavedSettings.setBOOL("PTTCurrentlyEnabled", !remotep->mTalkLockBtn->getToggleState()); } +//static +void LLVoiceRemoteCtrl::onClickPopupBtn(void* user_data) +{ + LLVoiceRemoteCtrl* remotep = (LLVoiceRemoteCtrl*)user_data; + + remotep->deleteAllChildren(); + if (gSavedSettings.getBOOL("ShowVoiceChannelPopup")) + { + gUICtrlFactory->buildPanel(remotep, "panel_voice_remote_expanded.xml"); + } + else + { + gUICtrlFactory->buildPanel(remotep, "panel_voice_remote.xml"); + } + gOverlayBar->layoutButtons(); +} + +//static +void LLVoiceRemoteCtrl::onClickEndCall(void* user_data) +{ + LLVoiceChannel* current_channel = LLVoiceChannel::getCurrentVoiceChannel(); + + if (current_channel && current_channel != LLVoiceChannelProximal::getInstance()) + { + current_channel->deactivate(); + } +} + + void LLVoiceRemoteCtrl::onClickSpeakers(void *user_data) { LLFloaterActiveSpeakers::toggleInstance(LLSD()); } +//static +void LLVoiceRemoteCtrl::onClickVoiceChannel(void* user_data) +{ + LLFloaterChatterBox::showInstance(); +} diff --git a/linden/indra/newview/llvoiceremotectrl.h b/linden/indra/newview/llvoiceremotectrl.h index 8c88fb6..17f55fb 100644 --- a/linden/indra/newview/llvoiceremotectrl.h +++ b/linden/indra/newview/llvoiceremotectrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -42,6 +42,7 @@ public: LLVoiceRemoteCtrl (const LLString& name); virtual ~LLVoiceRemoteCtrl(); + /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); static void onBtnLock(void* user_data); @@ -49,6 +50,9 @@ public: static void onBtnTalkReleased(void* user_data); static void onBtnTalkClicked(void* user_data); static void onClickSpeakers(void *user_data); + static void onClickPopupBtn(void* user_data); + static void onClickVoiceChannel(void* user_data); + static void onClickEndCall(void* user_data); protected: LLButton* mTalkBtn; diff --git a/linden/indra/newview/llvoicevisualizer.cpp b/linden/indra/newview/llvoicevisualizer.cpp index fa7b2fb..c931734 100644 --- a/linden/indra/newview/llvoicevisualizer.cpp +++ b/linden/indra/newview/llvoicevisualizer.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -111,7 +111,7 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type ) for (int i=0; ishow( eventIn.getStringValue(), "Second Life Browser"); + // If we spawn a new LLFloaterHTML, assume we want it to + // follow this LLWebBrowserCtrl's setting for whether or + // not to open secondlife:///app/ links. JC. + LLFloaterHtml::getInstance()->show( + eventIn.getStringValue(), + "Second Life Browser", + mOpenAppSLURLs); }; }; }; @@ -649,7 +647,15 @@ void LLWebBrowserCtrl::onClickLinkHref( const EventType& eventIn ) void LLWebBrowserCtrl::onClickLinkSecondLife( const EventType& eventIn ) { std::string url = eventIn.getStringValue(); - LLURLDispatcher::dispatch(url); + if (LLURLDispatcher::isSLURLCommand(url) + && !mOpenAppSLURLs) + { + // block handling of this secondlife:///app/ URL + return; + } + + const bool from_external_browser = false; + LLURLDispatcher::dispatch(url, from_external_browser); // chain this event on to observers of an instance of LLWebBrowserCtrl LLWebBrowserCtrlEvent event( eventIn.getStringValue() ); diff --git a/linden/indra/newview/llwebbrowserctrl.h b/linden/indra/newview/llwebbrowserctrl.h index 006df70..20dfbd7 100644 --- a/linden/indra/newview/llwebbrowserctrl.h +++ b/linden/indra/newview/llwebbrowserctrl.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -194,8 +194,15 @@ class LLWebBrowserCtrl : bool canNavigateForward(); void setOpenInExternalBrowser( bool valIn ); void setOpenInInternalBrowser( bool valIn ); - void setOpenSLURLsInMap( bool valIn ); - void setOpenSLURLsViaTeleport( bool valIn ); + + // By default, we do not handle "secondlife:///app/" SLURLs, because + // those can cause teleports, open windows, etc. We cannot be sure + // that each "click" is actually due to a user action, versus + // Javascript or some other mechanism. However, we need the search + // floater and login page to handle these URLs. Those are safe + // because we control the page content. See DEV-9530. JC. + void setOpenAppSLURLs( bool valIn ); + void setHomePageUrl( const std::string urlIn ); std::string getHomePageUrl(); @@ -249,8 +256,7 @@ class LLWebBrowserCtrl : bool mFrequentUpdates; bool mOpenLinksInExternalBrowser; bool mOpenLinksInInternalBrowser; - bool mOpenSLURLsInMap; - bool mOpenSLURLsViaTeleport; + bool mOpenAppSLURLs; std::string mHomePageUrl; bool mIgnoreUIScale; bool mAlwaysRefresh; diff --git a/linden/indra/newview/llwind.cpp b/linden/indra/newview/llwind.cpp index adc6a61..5d20112 100644 --- a/linden/indra/newview/llwind.cpp +++ b/linden/indra/newview/llwind.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llwind.h b/linden/indra/newview/llwind.h index 2210fc9..5481fdc 100644 --- a/linden/indra/newview/llwind.h +++ b/linden/indra/newview/llwind.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llwindebug.cpp b/linden/indra/newview/llwindebug.cpp index 52b2c0a..cf30f34 100644 --- a/linden/indra/newview/llwindebug.cpp +++ b/linden/indra/newview/llwindebug.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llwindebug.h b/linden/indra/newview/llwindebug.h index 782204c..fdc9a52 100644 --- a/linden/indra/newview/llwindebug.h +++ b/linden/indra/newview/llwindebug.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 621ab1d..c03ef6e 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -770,6 +770,7 @@ void LLWorld::printPacketsLost() void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data) { + if(!gWorldp) return; LLViewerRegion* region = gWorldp->getRegion(msg->getSender()); if( region ) { @@ -1026,6 +1027,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) // Viewer trusts the simulator. msg->enableCircuit(sim, TRUE); + if(!gWorldp) return; gWorldp->addRegion(handle, sim); // give the simulator a message it can use to get ip and port @@ -1063,6 +1065,7 @@ public: LLHost sim(input["body"]["sim-ip-and-port"].asString()); + if(!gWorldp) return; LLViewerRegion* regionp = gWorldp->getRegion(sim); if (!regionp) { @@ -1081,6 +1084,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data) LLHost host = mesgsys->getSender(); //llinfos << "Disabling simulator with message from " << host << llendl; + if(!gWorldp) return; gWorldp->removeRegion(host); mesgsys->disableCircuit(host); @@ -1090,6 +1094,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data) void process_region_handshake(LLMessageSystem* msg, void** user_data) { LLHost host = msg->getSender(); + if(!gWorldp) return; LLViewerRegion* regionp = gWorldp->getRegion(host); if (!regionp) { diff --git a/linden/indra/newview/llworld.h b/linden/indra/newview/llworld.h index 6323a61..cad24da 100644 --- a/linden/indra/newview/llworld.h +++ b/linden/indra/newview/llworld.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llworldmap.cpp b/linden/indra/newview/llworldmap.cpp index 0a92aa0..0a2b33e 100644 --- a/linden/indra/newview/llworldmap.cpp +++ b/linden/indra/newview/llworldmap.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llworldmap.h b/linden/indra/newview/llworldmap.h index 90298a8..bc8d653 100644 --- a/linden/indra/newview/llworldmap.h +++ b/linden/indra/newview/llworldmap.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp index 84845f9..266ffbc 100644 --- a/linden/indra/newview/llworldmapview.cpp +++ b/linden/indra/newview/llworldmapview.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -100,6 +100,16 @@ S32 LLWorldMapView::sTrackingArrowY = 0; F32 LLWorldMapView::sPixelsPerMeter = 1.f; F32 CONE_SIZE = 0.6f; + +#define SIM_NULL_MAP_SCALE 1 // width in pixels, where we start drawing "null" sims +#define SIM_MAP_AGENT_SCALE 2 // width in pixels, where we start drawing agents +#define SIM_MAP_SCALE 1 // width in pixels, where we start drawing sim tiles + +// Updates for agent locations. +#define AGENTS_UPDATE_TIME 60.0 // in seconds + + + void LLWorldMapView::initClass() { LLUUID image_id; @@ -458,7 +468,7 @@ void LLWorldMapView::draw() LLViewerImage* simimage = info->mCurrentImage; LLViewerImage* overlayimage = info->mOverlayImage; - if (gMapScale < 8.f) + if (gMapScale < SIM_MAP_SCALE) { simimage->setBoostLevel(0); if (overlayimage) overlayimage->setBoostLevel(0); @@ -1117,11 +1127,6 @@ LLVector3d LLWorldMapView::viewPosToGlobal( S32 x, S32 y ) BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen ) { - if( !getVisible() || !pointInView( x, y ) ) - { - return FALSE; - } - LLVector3d pos_global = viewPosToGlobal(x, y); LLSimInfo* info = gWorldMap->simInfoFromPosGlobal(pos_global); diff --git a/linden/indra/newview/llworldmapview.h b/linden/indra/newview/llworldmapview.h index 9d7ce2b..32f2d6e 100644 --- a/linden/indra/newview/llworldmapview.h +++ b/linden/indra/newview/llworldmapview.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -52,13 +52,6 @@ class LLCoordGL; class LLViewerImage; class LLTextBox; -#define SIM_NULL_MAP_SCALE 2 // width in pixels, where we start drawing "null" sims -#define SIM_MAP_AGENT_SCALE 20 // width in pixels, where we start drawing agents -#define SIM_MAP_SCALE 90 // width in pixels, where we start drawing sim tiles - -// Updates for agent locations. -#define AGENTS_UPDATE_TIME 60.0 // in seconds - class LLWorldMapView : public LLPanel { diff --git a/linden/indra/newview/llxmlrpctransaction.cpp b/linden/indra/newview/llxmlrpctransaction.cpp index 3096e85..96f3326 100644 --- a/linden/indra/newview/llxmlrpctransaction.cpp +++ b/linden/indra/newview/llxmlrpctransaction.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/llxmlrpctransaction.h b/linden/indra/newview/llxmlrpctransaction.h index 69297b7..878ff7c 100644 --- a/linden/indra/newview/llxmlrpctransaction.h +++ b/linden/indra/newview/llxmlrpctransaction.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/macmain.h b/linden/indra/newview/macmain.h index 9a28d8b..941766e 100644 --- a/linden/indra/newview/macmain.h +++ b/linden/indra/newview/macmain.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/macutil_Prefix.h b/linden/indra/newview/macutil_Prefix.h index e6feb99..81918f3 100644 --- a/linden/indra/newview/macutil_Prefix.h +++ b/linden/indra/newview/macutil_Prefix.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/macview.xcodeproj/project.pbxproj b/linden/indra/newview/macview.xcodeproj/project.pbxproj index 598abb5..c1cb556 100644 --- a/linden/indra/newview/macview.xcodeproj/project.pbxproj +++ b/linden/indra/newview/macview.xcodeproj/project.pbxproj @@ -557,12 +557,10 @@ 9CD49D5709D0BAC100192434 /* llflexibleobject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD49D5609D0BAC100192434 /* llflexibleobject.cpp */; }; 9CD49D5B09D0BB1500192434 /* lllocalanimationobject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD49D5909D0BB1500192434 /* lllocalanimationobject.cpp */; }; A241CB7D07B3DE0D001A39E3 /* llviewerprecompiledheaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A241CB7B07B3DE0D001A39E3 /* llviewerprecompiledheaders.cpp */; }; - A241CB9007B3E383001A39E3 /* lllogtextmessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A241CB8C07B3E383001A39E3 /* lllogtextmessage.cpp */; }; A241CB9207B3E383001A39E3 /* llmessagethrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A241CB8E07B3E383001A39E3 /* llmessagethrottle.cpp */; }; A241CB9507B3E3A7001A39E3 /* llperlin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A241CB9407B3E3A7001A39E3 /* llperlin.cpp */; }; A30273570B3A13D800704420 /* llvertexbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A30273550B3A13D800704420 /* llvertexbuffer.cpp */; }; A3077C0709DCB8140059ED75 /* lldrawpoolstars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3077BFB09DCB8140059ED75 /* lldrawpoolstars.cpp */; }; - A3077C0909DCB8140059ED75 /* llfloaterhtmlhelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3077BFF09DCB8140059ED75 /* llfloaterhtmlhelp.cpp */; }; A3077C0B09DCB8140059ED75 /* llpanelvolume.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3077C0309DCB8140059ED75 /* llpanelvolume.cpp */; }; A3077C0C09DCB8140059ED75 /* llvostars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3077C0509DCB8140059ED75 /* llvostars.cpp */; }; A32748BF0B5F38A00099BE18 /* llfontgl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D628315D0B4F3FA100F8830F /* llfontgl.cpp */; }; @@ -674,7 +672,6 @@ C1E4A5D00CC0216F005FB0A6 /* net.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6192220D074A9B59005E1F34 /* net.cpp */; }; C1E4A5D10CC0216F005FB0A6 /* llxfer_mem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 619221FF074A9B59005E1F34 /* llxfer_mem.cpp */; }; C1E4A5D20CC0216F005FB0A6 /* llthrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 619221EC074A9B59005E1F34 /* llthrottle.cpp */; }; - C1E4A5D30CC0216F005FB0A6 /* lllogtextmessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A241CB8C07B3E383001A39E3 /* lllogtextmessage.cpp */; }; C1E4A5D40CC0216F005FB0A6 /* llinstantmessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93AE41CF08F4845400141675 /* llinstantmessage.cpp */; }; C1E4A5D50CC0216F005FB0A6 /* llmessagebuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38D0FA6B0B4BF898003323BA /* llmessagebuilder.cpp */; }; C1E4A5D60CC0216F005FB0A6 /* lldatapacker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 619221C5074A9B59005E1F34 /* lldatapacker.cpp */; }; @@ -843,7 +840,7 @@ "$(DERIVED_FILES_DIR)/${CURRENT_ARCH}/$(INPUT_FILE_BASE).y.cpp", "$(DERIVED_FILES_DIR)/${CURRENT_ARCH}/$(INPUT_FILE_BASE).y.h", ); - script = "mkdir -p \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}\"\n/usr/bin/yacc -d -o \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.cpp\" \"${INPUT_FILE_PATH}\"\n\nif [ -f \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.hpp\" ];\nthen\n\tmv \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.hpp\" \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.h\" ;\nfi\n"; + script = "mkdir -p \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}\"\n/usr/bin/yacc -d -o \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.cpp\" \"${INPUT_FILE_PATH}\"\n\nif [ -f \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.hpp\" ] ; then\n\tif [ \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.hpp\" -nt \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.h\" ] ; then\n\t\tcp \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.hpp\" \"${DERIVED_FILES_DIR}/${CURRENT_ARCH}/${INPUT_FILE_BASE}.y.h\"\n\tfi\nfi\n"; }; 99AB96D808833FCD00AA3C8C /* PBXBuildRule */ = { isa = PBXBuildRule; @@ -1031,7 +1028,7 @@ 1AA2EEA30CBBE2BF0017E185 /* llfloaterurldisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfloaterurldisplay.cpp; sourceTree = ""; }; 1AA2EEA50CBBE2D40017E185 /* llremoteparcelrequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llremoteparcelrequest.h; sourceTree = ""; }; 1AA2EEA60CBBE2D40017E185 /* llremoteparcelrequest.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llremoteparcelrequest.cpp; sourceTree = ""; }; - 1AB0DADC0A52E8A0001CACEB /* message_template.msg */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = message_template.msg; path = ../../scripts/messages/message_template.msg; sourceTree = SOURCE_ROOT; }; + 1AB0DADC0A52E8A0001CACEB /* message_template.msg */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = message_template.msg; path = ../../scripts/messages/message_template.msg; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; }; 1AD3940C0CAB0003004BA76A /* llurlsimstring.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llurlsimstring.h; sourceTree = ""; }; 1AD3940D0CAB0003004BA76A /* llurldispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llurldispatcher.h; sourceTree = ""; }; 1AD3940E0CAB000F004BA76A /* llurlsimstring.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llurlsimstring.cpp; sourceTree = ""; }; @@ -1538,7 +1535,7 @@ 6192227F074A9B5A005E1F34 /* lscript_byteconvert.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lscript_byteconvert.h; sourceTree = ""; }; 61922280074A9B5B005E1F34 /* lscript_byteformat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lscript_byteformat.h; sourceTree = ""; }; 61922286074A9B5B005E1F34 /* indra.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; path = indra.l; sourceTree = ""; }; - 61922287074A9B5B005E1F34 /* indra.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; path = indra.y; sourceTree = ""; }; + 61922287074A9B5B005E1F34 /* indra.y */ = {isa = PBXFileReference; explicitFileType = sourcecode.yacc; fileEncoding = 30; path = indra.y; sourceTree = ""; }; 61922289074A9B5B005E1F34 /* lscript_bytecode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lscript_bytecode.cpp; sourceTree = ""; }; 6192228A074A9B5B005E1F34 /* lscript_bytecode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lscript_bytecode.h; sourceTree = ""; }; 6192228B074A9B5B005E1F34 /* lscript_error.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lscript_error.cpp; sourceTree = ""; }; @@ -2085,8 +2082,6 @@ A241CB7C07B3DE0D001A39E3 /* llviewerprecompiledheaders.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llviewerprecompiledheaders.h; sourceTree = ""; }; A241CB8807B3E324001A39E3 /* llperlin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llperlin.h; sourceTree = ""; }; A241CB8907B3E324001A39E3 /* llplane.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llplane.h; sourceTree = ""; }; - A241CB8C07B3E383001A39E3 /* lllogtextmessage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lllogtextmessage.cpp; sourceTree = ""; }; - A241CB8D07B3E383001A39E3 /* lllogtextmessage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lllogtextmessage.h; sourceTree = ""; }; A241CB8E07B3E383001A39E3 /* llmessagethrottle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llmessagethrottle.cpp; sourceTree = ""; }; A241CB8F07B3E383001A39E3 /* llmessagethrottle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llmessagethrottle.h; sourceTree = ""; }; A241CB9407B3E3A7001A39E3 /* llperlin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llperlin.cpp; sourceTree = ""; }; @@ -2096,8 +2091,6 @@ A30273560B3A13D800704420 /* llvertexbuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llvertexbuffer.h; sourceTree = ""; }; A3077BFB09DCB8140059ED75 /* lldrawpoolstars.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lldrawpoolstars.cpp; sourceTree = ""; }; A3077BFC09DCB8140059ED75 /* lldrawpoolstars.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = lldrawpoolstars.h; sourceTree = ""; }; - A3077BFF09DCB8140059ED75 /* llfloaterhtmlhelp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llfloaterhtmlhelp.cpp; sourceTree = ""; }; - A3077C0009DCB8140059ED75 /* llfloaterhtmlhelp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llfloaterhtmlhelp.h; sourceTree = ""; }; A3077C0309DCB8140059ED75 /* llpanelvolume.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llpanelvolume.cpp; sourceTree = ""; }; A3077C0409DCB8140059ED75 /* llpanelvolume.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llpanelvolume.h; sourceTree = ""; }; A3077C0509DCB8140059ED75 /* llvostars.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvostars.cpp; sourceTree = ""; }; @@ -2274,6 +2267,7 @@ EB9E831E082AEEF3007B4479 /* llview.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llview.h; sourceTree = ""; }; EBAAFE160858EBA400B9269A /* llxmlnode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llxmlnode.cpp; sourceTree = ""; }; EBAAFE170858EBA400B9269A /* llxmlnode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llxmlnode.h; sourceTree = ""; }; + F4DE841C0CC5567300BD4636 /* llpreeditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llpreeditor.h; sourceTree = ""; }; F62641080B1F757D00E5BBAD /* llwindowheadless.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llwindowheadless.cpp; sourceTree = ""; }; F62641090B1F757D00E5BBAD /* llwindowheadless.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = llwindowheadless.h; sourceTree = ""; }; FD1558220A06BB5F00DE9AE5 /* lldate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = lldate.cpp; sourceTree = ""; }; @@ -2688,8 +2682,6 @@ 26F52A7E051F61DF00A80050 /* llfloatergroups.cpp */, 91A155FE081EE7F70089988C /* llfloaterhtml.cpp */, 91A15600081EE8060089988C /* llfloaterhtml.h */, - A3077BFF09DCB8140059ED75 /* llfloaterhtmlhelp.cpp */, - A3077C0009DCB8140059ED75 /* llfloaterhtmlhelp.h */, 91B9EC4C06370E4D007B3F3E /* llfloaterimagepreview.cpp */, EB3EE70B083AC23D002BF676 /* llfloaterimagepreview.h */, E224ACBC0874D6150039C1A6 /* llfloaterimport.cpp */, @@ -3276,8 +3268,6 @@ 9190431308327117002396D4 /* llpumpio.h */, 9190431408327117002396D4 /* llservice.cpp */, 9190431508327117002396D4 /* llservice.h */, - A241CB8C07B3E383001A39E3 /* lllogtextmessage.cpp */, - A241CB8D07B3E383001A39E3 /* lllogtextmessage.h */, A241CB8E07B3E383001A39E3 /* llmessagethrottle.cpp */, A241CB8F07B3E383001A39E3 /* llmessagethrottle.h */, 616C4E2C07550E97006C2C65 /* sound_ids.h */, @@ -3524,6 +3514,7 @@ 6192226F074A9B5A005E1F34 /* llmousehandler.h */, 61922274074A9B5A005E1F34 /* llwindow.cpp */, 61922275074A9B5A005E1F34 /* llwindow.h */, + F4DE841C0CC5567300BD4636 /* llpreeditor.h */, ); name = llwindow; path = ../llwindow; @@ -4639,7 +4630,6 @@ 91287B4C078DE4B300E958B2 /* llviewerkeyboard.cpp in Sources */, 913AA1FD079855E900D111CE /* llfloaterfriends.cpp in Sources */, A241CB7D07B3DE0D001A39E3 /* llviewerprecompiledheaders.cpp in Sources */, - A241CB9007B3E383001A39E3 /* lllogtextmessage.cpp in Sources */, A241CB9207B3E383001A39E3 /* llmessagethrottle.cpp in Sources */, A241CB9507B3E3A7001A39E3 /* llperlin.cpp in Sources */, 91E86A1907BBFA5D00F56E75 /* llmediaengine.cpp in Sources */, @@ -4728,7 +4718,6 @@ 9CD49D5709D0BAC100192434 /* llflexibleobject.cpp in Sources */, 9CD49D5B09D0BB1500192434 /* lllocalanimationobject.cpp in Sources */, A3077C0709DCB8140059ED75 /* lldrawpoolstars.cpp in Sources */, - A3077C0909DCB8140059ED75 /* llfloaterhtmlhelp.cpp in Sources */, A3077C0B09DCB8140059ED75 /* llpanelvolume.cpp in Sources */, A3077C0C09DCB8140059ED75 /* llvostars.cpp in Sources */, 1AFA409C0A2DFC7F00C13F70 /* llviewernetwork.cpp in Sources */, @@ -4929,7 +4918,6 @@ C1E4A5D00CC0216F005FB0A6 /* net.cpp in Sources */, C1E4A5D10CC0216F005FB0A6 /* llxfer_mem.cpp in Sources */, C1E4A5D20CC0216F005FB0A6 /* llthrottle.cpp in Sources */, - C1E4A5D30CC0216F005FB0A6 /* lllogtextmessage.cpp in Sources */, C1E4A5920CC02160005FB0A6 /* llevent.cpp in Sources */, C1E4A5D40CC0216F005FB0A6 /* llinstantmessage.cpp in Sources */, C1E4A5D50CC0216F005FB0A6 /* llmessagebuilder.cpp in Sources */, @@ -5236,6 +5224,7 @@ isa = XCBuildConfiguration; buildSettings = { LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = ""; PRODUCT_NAME = llcommon; }; name = Universal; @@ -5362,6 +5351,7 @@ "-ffor-scope", "-Wno-reorder", ); + OTHER_LDFLAGS = "-Wl,-search_paths_first"; PREBINDING = NO; PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; @@ -5385,6 +5375,7 @@ GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GENERATE_MASTER_OBJECT_FILE = NO; @@ -5410,6 +5401,7 @@ EXPORTED_SYMBOLS_FILE = ""; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_MODEL_TUNING = G5; GENERATE_MASTER_OBJECT_FILE = NO; INSTALL_PATH = "@executable_path/../Resources/"; @@ -5432,6 +5424,7 @@ EXECUTABLE_PREFIX = lib; EXPORTED_SYMBOLS_FILE = ""; GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_MODEL_TUNING = G5; GENERATE_MASTER_OBJECT_FILE = NO; INSTALL_PATH = "@executable_path/../Resources/"; @@ -5451,6 +5444,7 @@ isa = XCBuildConfiguration; buildSettings = { LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = ""; PRODUCT_NAME = llcommon; }; name = Development; @@ -5459,6 +5453,7 @@ isa = XCBuildConfiguration; buildSettings = { LIBRARY_SEARCH_PATHS = "$(inherited)"; + OTHER_LDFLAGS = ""; PRODUCT_NAME = llcommon; }; name = Deployment; @@ -5635,6 +5630,7 @@ "-ffor-scope", "-Wno-reorder", ); + OTHER_LDFLAGS = "-Wl,-search_paths_first"; PREBINDING = NO; PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; @@ -5689,12 +5685,15 @@ "-DLL_RELEASE_FOR_DOWNLOAD=1", "-DNDEBUG", "-fconstant-cfstrings", + "-gfull", + "-mlong-branch", ); OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-ffor-scope", "-Wno-reorder", ); + OTHER_LDFLAGS = "-Wl,-search_paths_first"; PREBINDING = NO; PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; @@ -5712,6 +5711,7 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; EXECUTABLE_PREFIX = lib; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -5723,6 +5723,7 @@ LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_LDFLAGS = "-Wl,-search_paths_first"; PREBINDING = NO; + PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO; PRODUCT_NAME = llkdu; ZERO_LINK = YES; }; @@ -5732,6 +5733,7 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = NO; EXECUTABLE_PREFIX = lib; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; @@ -5743,6 +5745,7 @@ LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../../libraries/powerpc-darwin/lib_release\""; OTHER_LDFLAGS = "-Wl,-search_paths_first"; PREBINDING = NO; + PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO; PRODUCT_NAME = llkdu; ZERO_LINK = NO; }; @@ -5751,6 +5754,7 @@ D645935C0B3B4DA300FAB68F /* Universal */ = { isa = XCBuildConfiguration; buildSettings = { + DEAD_CODE_STRIPPING = NO; EXECUTABLE_PREFIX = lib; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_INLINES_ARE_PRIVATE_EXTERN = NO; @@ -5761,6 +5765,7 @@ LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../../libraries/powerpc-darwin/lib_release\""; OTHER_LDFLAGS = "-Wl,-search_paths_first"; PREBINDING = NO; + PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO; PRODUCT_NAME = llkdu; ZERO_LINK = YES; }; diff --git a/linden/indra/newview/macview_Prefix.h b/linden/indra/newview/macview_Prefix.h index d4b388c..acb31d9 100644 --- a/linden/indra/newview/macview_Prefix.h +++ b/linden/indra/newview/macview_Prefix.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -221,7 +221,7 @@ #include "indra_constants.h" // for key and mask constants #include "llfontgl.h" #include "v4color.h" -#include "llwindow_impl.h" // shell_open() +#include "llwindow_impl.h" #include "llbutton.h" #include "llcheckboxctrl.h" diff --git a/linden/indra/newview/moviemaker.cpp b/linden/indra/newview/moviemaker.cpp index 6c6707e..369637a 100644 --- a/linden/indra/newview/moviemaker.cpp +++ b/linden/indra/newview/moviemaker.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/moviemaker.h b/linden/indra/newview/moviemaker.h index 0ff3a4b..f18ce3e 100644 --- a/linden/indra/newview/moviemaker.h +++ b/linden/indra/newview/moviemaker.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/newview.vcproj b/linden/indra/newview/newview.vcproj index 069446a..952ea09 100644 --- a/linden/indra/newview/newview.vcproj +++ b/linden/indra/newview/newview.vcproj @@ -37,7 +37,7 @@ Name="VCCustomBuildTool"/> - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - @@ -2263,10 +2259,6 @@ > - - @@ -3357,7 +3349,7 @@ + + @@ -3449,6 +3445,10 @@ > + + @@ -3469,6 +3469,10 @@ > + + @@ -3521,6 +3525,14 @@ > + + + + @@ -3533,6 +3545,10 @@ > + + @@ -3541,10 +3557,18 @@ > + + + + @@ -3553,6 +3577,10 @@ > + + @@ -3589,10 +3617,18 @@ > + + + + @@ -3625,6 +3661,10 @@ > + + @@ -3637,6 +3677,10 @@ > + + @@ -3669,6 +3713,10 @@ > + + @@ -3677,6 +3725,10 @@ > + + @@ -3689,6 +3741,10 @@ > + + @@ -3705,6 +3761,10 @@ > + + @@ -3825,6 +3885,10 @@ > + + @@ -3845,10 +3909,18 @@ > + + + + @@ -3857,6 +3929,10 @@ > + + @@ -3869,6 +3945,14 @@ > + + + + @@ -3885,6 +3969,14 @@ > + + + + @@ -3897,6 +3989,10 @@ > + + @@ -3929,6 +4025,10 @@ > + + @@ -3937,10 +4037,22 @@ > + + + + + + @@ -4001,6 +4113,14 @@ > + + + + @@ -4053,6 +4173,10 @@ > + + @@ -4065,6 +4189,26 @@ > + + + + + + + + + + @@ -4089,6 +4233,10 @@ > + + @@ -4116,6 +4264,10 @@ RelativePath=".\app_settings\trees.xml" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/newview/noise.cpp b/linden/indra/newview/noise.cpp index a9ce757..6b8a9b4 100644 --- a/linden/indra/newview/noise.cpp +++ b/linden/indra/newview/noise.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/noise.h b/linden/indra/newview/noise.h index fc449ee..dad239c 100644 --- a/linden/indra/newview/noise.h +++ b/linden/indra/newview/noise.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 919560c..a5b7d34 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -3667,6 +3667,11 @@ void LLPipeline::clearRenderMap() void LLPipeline::resetVertexBuffers(LLDrawable* drawable) { + if (!drawable) + { + return; + } + for (S32 i = 0; i < drawable->getNumFaces(); i++) { LLFace* facep = drawable->getFace(i); diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h index f28ca41..9b0706f 100644 --- a/linden/indra/newview/pipeline.h +++ b/linden/indra/newview/pipeline.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/randgauss.h b/linden/indra/newview/randgauss.h index ac9bf7f..ab2b07c 100644 --- a/linden/indra/newview/randgauss.h +++ b/linden/indra/newview/randgauss.h @@ -12,12 +12,12 @@ * ("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 + * online at http://secondlifegrid.net/programs/open_source/licensing/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 + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt index ae96b9a..f88987d 100644 --- a/linden/indra/newview/releasenotes.txt +++ b/linden/indra/newview/releasenotes.txt @@ -1,105 +1,132 @@ -Release Notes for Second Life 1.18.6(4) January 14, 2007 +Release Notes for Second Life 1.19.0(0) February 1st, 2008 ===================================== -Known issue: -* VWR-2574: Non-default sound devices for voice can't be used in Vista -** This appears to be a Vista issue not a Second Life issue. - -Fixes: -* Fix German translation of the "Release Keys" tab -* Crash on login page when using Logitech LCD Keyboard -* Connect button doesn't enable -* Language names need to have a consistent format in preferences drop-down -* QuickTime disabled message cannot be ignored -* Linux client doesn't recognise that a viewer is already running -* Display HTML error page in selected language when viewer is unable to connect to second life URL -* SVC-1125: New Search: Beacons aren't shown when teleporting to regions with "Allow Direct Teleport" disabled -* VWR-3948: Underlayers no longer removable by pie menu in Windlight, release candidates -* VWR-3667;About Land > Access: On group owned land, group owner gets eject message when "Public Access" is unchecked -* VWR-3829: Cursor in Logon edit boxes difficult to see -* VWR-3501: Create/Edit Gesture window preview button blanks after pressing -* VWR-4010: New search does not accept non ASCII characters - -Source changes: -* VWR-3748: Builds fail on 1.18.6 RC if not using MOZLIB due to miss -* Fix for viewer_manifest.py for 64-bit builds - - -Release Notes for Second Life 1.18.6(3) December 29, 2007 -===================================== -Fixes: -* Corrected login page URL for German language +New features and changes: +* Age Verification: +** The user interface for parcel and estate access has been clarified and improved. +** Added the ability to restrict access to parcels and estates to age verified adults. +** Removed the ability to *ban* access to Residents who have provided payment info or who have used payment info. We continue to support the ability to *allow* access to only those who have provided payment info. +* Crash Reporter +** The crash reporting mechanism has been improved. Following a crash, more useful information will be sent and reports should now take less than 10 seconds. -Release Notes for Second Life 1.18.6(2) December 20, 2007 -===================================== -New features: -* VWR-1115: Added preference settings for web browser proxy -* VWR-3741: Added -loginpage option to client to specify the login page +* VWR-210: Voice Support on Linux (EXPERIMENTAL) - see README-linux-voice.txt -Changes: -* Reverted bad fix for: -** Connect button does not have focus in HTML login screen +* Other changes: +** Change alert message that pops up when you set Busy +** Add "Teleporting from SLURL to SLURL" to the chat history to provide quick and dirty "back" links +** Print the name of the missing gesture in the error message +** Remove "New Account..." and "Preferences" buttons from login screen for 1.19.0 Fixes: -* VWR-3815: Double-click on login name/password doesn't select name/password -* VWR-3814: Fix tracking of click-throughs for Classifieds -* Menubar doesn't turn red when connecting to a beta grid -* VWR-3703: No wind sound -* VWR-3659: Log in screen in 1.18.6 RC(0) displays UI elements that should be viewable only after login -* SVC-1032: Age Verification status shows in profile -* XML resizing files to accommodate translated strings -* New translated strings for the UI -* Disable QuickTime when the installed version is less than version with RTSP exploit +* SVC-750: Avatar sitting on a prim no longer able to be manipulated with llSetLinkPrimitiveParams +* SVC-930: Prims set for sale - prices are incorrectly set when multiple prims taken to inventory and rezzed +* SVC-1125: New Search: Beacons aren't shown when teleporting to regions with "Allow Direct Teleport" disabled +* VWR-1125: Clicking Title Bar While Mouselook'd Repositions SL Window +* VWR-1137: Inventory names out of sync after renaming via Properties window +* VWR-1145: Unable To Connect help not available +* VWR-1162: Land for sale includes L$1 parcels that are not actually for sale +* VWR-1350: Color settings do not appear to be applied to LSL default text +* VWR-1475: OpenJPEG always uploads single layer lossless images +* VWR-1590: Keyboard changes inventory selection after right-click +* VWR-1627: Classified metrics are reset to 0 when the ad is updated +* VWR-1651: Add ability to open a partners profile whilst viewing an avatar's profile +* VWR-1774: Some avatar positions result in no Z-axis arrow when editing attachments +* VWR-1873: Typos in en-us locale file * VWR-1919: Remove texture UUID information from UI unless full-perm -* Fixed crash in Crash Logger - -Source changes: -* Add support for setting proxy innformation to LLMozLib -* Add support for changing caret color in embedded browser - - -Release Notes for Second Life 1.18.6(1) December 12, 2007 -===================================== -Changes: +* VWR-2030: Avatar only turns half-way in Appearance Mode +* VWR-2142: Parcel voice icon doesn't reflect disabled status if voice isn't used +* VWR-2256: Mac updater directory permission issues +* VWR-2367: Wrong handling of maximum length of Group Notice message +* VWR-2404: lossless texture compression on small textures not lossless +* VWR-2410: noise dot appear in chat window when clien running long with chatting. +* VWR-2411: Possible crash in pipeline.cpp +* VWR-2412: Possible crash drawpoolwater +* VWR-2421: ATI Radeon HD 2900 XT + Second Life = "Couldn't match GPU to a class","Setting GPU Class to Class0" +* VWR-2483: the macviewer.xcodeprj file doesn't create stripped binaries on Deployment or Universal +* VWR-250: Preedit (composition) strings are shown poorly when typing Japanese text on Windows +* VWR-2550: Scuplty vertex coordinates are size/256 meters too small on the positive faces +* VWR-2614: gActiveChannelSpeakerMgr not deleted at end of program in viewer.cpp +* VWR-2617: Adds LLSD support to flex/light/sculpt params for primitives +* VWR-2652: Changes needed to compile viewer against lastest libopenjpeg2000 +* VWR-2684: Minor leak in floaters using layoutstacks +* VWR-2722: Muting an object with pie menu only mutes the prim you select, not entire linkset +* VWR-2847: Wrong hover text in Japanese UI +* VWR-2854: Some sculpted prims render as balls on close zoom, which look fine in older clients +* VWR-2867: Eyes rotate unnaturally around their X axis. Clockwise/Counter-Clockwise +* VWR-289: URLs for video media streaming need to be URL-encoded or stream doesn't work +* VWR-2959: Windows (Visual Studio) solution file refers to a non-existing project "build_all" +* VWR-3088: Unchecking "Automatic Appearance Camera Movement" no longer has any effect +* VWR-3206: OpenJPEG svn478 causes slviewer to crash +* VWR-3428: Checking a users profile while editing a linked set causes viewer crash +* VWR-3458: Mouse cursor background is opaque white instead of transparent on big endian systems +* VWR-3558: llLoadURL cannot be muted +* VWR-356: Move delete to the bottom of context menus, separated by spacer +* VWR-3748: Builds fail on 1.18.6 RC if not using MOZLIB due to missing #if LL_LIBXUL_ENABLED in 3 places in indra/newview/llpanellogin.cpp +* VWR-3948: Underlayers no longer removable by pie menu in Windlight, release candidates +* VWR-412: Object editing arrows hidden but clickable on objects you can't edit. +* dialogs have extra vertical space +* Photo Album: name in Properties cut off some Japanese characters +* New gestures do not appear active in inventory +* Make parcel name in menu "look" active +* "Wear" pie option shows up for many objects even if resident does not own and cannot wear them. +* Textures on no-transfer objects can be transferred +* Deleted gestures still work +* Inventory description out of sync after renaming via Properties window +* Show private estate tiles when World Map is zoomed out +* Properties description not updated when preview description updated +* Buying object contents broken +* Improve window opening behavior, ensuring it is mostly on screen +* No-modify objects can be modified through Open pane +* Inventory names out of sync after renaming via Properties +* Japanese IME mode should be set and postiion of any input windows fixed for non-Japanese fields +* ctrl-shift-w doesn't work if no windows have focus +* Avatar falling in place - Alliez Mysterio +* Linux crash reporter does not run on next execution after forcing an infinite loop and forcefully exiting +* hitting enter should immediately set the value of a field +* Inventory Folder Loading state not clearly indicated +* Add warning dialog to the Land Sale process to warn against selling land to Anyone +* Legacy flossexception link needs to be fixed in source +* make link from client log in window to "Forgot Password" page +* Remove button under estate managers list enables after estate manager clicks in the list +* Changing search field should cancel current selection +* Estate tab within Tools / Region Estate has wrong settings for enable of Restrict Access upon initialization +* llEscapeURL and llUnescapeURL caps output to 255 characters +* XUI LoadFromXML function doesn't work +* Sanitize floater sizing behavior when SL window is made very small +* Animation won't stop if avatar teleports while animated +* Can't paste name of object into View > Mute List > Mute object by name +* pressing ctrl-F10 then Escape causes keyboard to be unresponsive +* Make SL viewer updater show a progress bar so that people know how long to wait +* Can't double-click on groups in profile after changing your active title +* Getting multiple copies of texture dragged onto prim +* blue dialog's 'next' widget steals focus +* Audio should be encoded for upload at a 'good enough' quality rather than a user-selected bitrate +* multiple preview windows open for a single texture/snapshot saved inside a note card +* Enhance Viewer to support new Age Verification feature +* Rename crash setting to cause crash logger to come up for all residents * Change crash logger "Remember this choice" function to default to on -* Connect button now has focus on login screen -* Inventory folder loading state now more clearly indicated +* Rework Ban tab of floater_about_land +* Windows IME positioning fixed +* Viewer crashes in assert when playing Sword Strike animation +* Unable to set 'Group Access' for land that is also 'Public Access' (Was VWR-3667) +* Disable QuickTime when the installed version is less than version with RTSP exploit +* Move fullscreen message from login screen to viewer prefs +* linux client doesn't recognise that a viewer is already running (slurl crapout) +* Search results window displays "s..." and "n..." instead of "searching..." and "none found" +* QuickTime disabled message can not be ignored +* Crash on login page when using Logitech LCD Keyboard +* SEC-17 Ability to Access Sculpted Prim Textures from Database without owning actual sculpt texture, allowing for people to "steal" sculpts. +* info window does not pop up when transitioning from a Havok1 to Havok4 region +* Repoint Report Bug... Viewer link to Pjira -Fixes: -* VWR-3558: llLoadURL cannot be muted -* VWR-3428: Checking a users profile while editing a linked set causes viewer crash -* Viewer channel and version numbers reported incorrectly during login -* Inventory cache version number incorrectly incremented, leading to perceved loss -* Age verification status hard to read in the profile field +Source changes: +* Upgrade Win32 libvorbis to v1.2 +* VWR-2881: Bundled Mesa libs are not GPL compatible +* upgrade in-tree Linux GL headers to Mesa 7.x +* upgrade in-tree Win32 GL headers to version without SGI Free B license +* Rebuild and/or update libraries to use statically linked libs. +* Remove llfloaterhtmlhelp.cpp / h and floater_html_help.xml -Release Notes for Second Life 1.18.6(0) December 5, 2007 -===================================== -Changes: -* Age Verification: -** The user interface for parcel and estate access has been clarified and improved. -** Added the ability to restrict access to parcels and estates to age verified adults. See an upcoming blog post for more details -** Removed the ability to *ban* access to Residents who have provided payment info or who have used payment info. We continue to support the ability to *allow* access to only those who have provided payment info. -* Login/Authentication -** We changed the way viewers login to Second Life to support future anti-fraud efforts -** The changes are largely internal -** Apart from some minor cosmetic differences, the behavior of the login screen is unchanged -** For more information, read our public Wiki article found here: http://wiki.secondlife.com/wiki/Viewer_Authentication -* Crash Reporter -** The crash reporting mechanism has been improved. Following a crash, more useful information will be sent and reports should now take less than 10 seconds. - -Fixes: -* VWR-1627: Classified metrics are reset to 0 when the ad is updated -* VWR-1162: Land for sale includes L$1 parcels that are not actually for sale -* VWR-1125: Clicking Title Bar While Mouselook'd Repositions SL -* VWR-2483: the macviewer.xcodeprj file doesn't create stripped binaries on Deployment or Universal -* VWR-2404: lossless texture compression on small textures not lossless -* VWR-2046: Focus is sent to menu/money/notification window -* Land owners can no longer delete objects belonging to others (but can still return objects) -* Positioning fixes for Japanese IME for fields where only ASCII is allowed -* Ctrl-Shift-W now works even if no windows have focus -* Fixed issue where avatar is stuck falling in place after login -* HTML login screen now functional again on Linux -* Floater sizing behavior corrected when viewer window is made very small Release Notes for Second Life 1.18.5(3) November 29, 2007 ===================================== diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc index ba25ec0..7ae5595 100644 --- a/linden/indra/newview/res/newViewRes.rc +++ b/linden/indra/newview/res/newViewRes.rc @@ -228,8 +228,8 @@ TOOLPIPETTE CURSOR "toolpipette.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,18,6,4 - PRODUCTVERSION 1,18,6,4 + FILEVERSION 1,19,0,0 + PRODUCTVERSION 1,19,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -246,12 +246,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "1.18.6.3" + VALUE "FileVersion", "1.19.0.0" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright © 2001-2007, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "1.18.6.3" + VALUE "ProductVersion", "1.19.0.0" END END BLOCK "VarFileInfo" diff --git a/linden/indra/newview/res/resource.h b/linden/indra/newview/res/resource.h index e4d01b1..32eceb7 100644 --- a/linden/indra/newview/res/resource.h +++ b/linden/indra/newview/res/resource.h @@ -1,3 +1,33 @@ +/** + * @file resource.h + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2008, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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. + * $/LicenseInfo$ + */ + //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by newViewRes.rc diff --git a/linden/indra/newview/skins/textures/textures.xml b/linden/indra/newview/skins/textures/textures.xml index cc9f61c..b2586fb 100644 --- a/linden/indra/newview/skins/textures/textures.xml +++ b/linden/indra/newview/skins/textures/textures.xml @@ -86,17 +86,24 @@ - + + - - - - - + + + + 1 - + + + + + + + + @@ -290,7 +297,6 @@ - @@ -305,9 +311,6 @@ - - - @@ -404,7 +407,6 @@ - @@ -419,4 +421,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linden/indra/newview/skins/xui/de/alerts.xml b/linden/indra/newview/skins/xui/de/alerts.xml index b98dd58..f09d0f6 100644 --- a/linden/indra/newview/skins/xui/de/alerts.xml +++ b/linden/indra/newview/skins/xui/de/alerts.xml @@ -150,6 +150,20 @@ Möchten Sie [FIRST_NAME] [LAST_NAME] Änderungsrechte gewähren? Nein + + + Die Gewährung von Änderungsrechten an andere Einwohner ermöglicht es diesen, +JEDES BELIEBIGE Objekt zu ändern, das Sie in der Second Life-Welt besitzen. Seien Sie SEHR vorsichtig beim Erteilen +dieser Erlaubnis. +Möchten Sie den ausgewählten Einwohnern Änderungsrechte gewähren? + + + + Möchten Sie [FIRST_NAME] [LAST_NAME] die Änderungsrechte entziehen? @@ -161,6 +175,17 @@ Möchten Sie [FIRST_NAME] [LAST_NAME] Änderungsrechte gewähren? Nein + + + Möchten Sie den ausgewählten Einwohnern die Änderungsrechte entziehen? + + + + Möchten Sie [FIRST] [LAST] aus Ihrer Freundesliste entfernen? @@ -470,6 +495,20 @@ Der Verkaufspreis beträgt [SALE_PRICE] L$ und wird automatisch für den Verkauf Abbrechen + + + ACHTUNG: Wenn Sie auf 'An jeden verkaufen' klicken, kann jeder in Second Life Ihr Land kaufen, auch Einwohner in anderen Regionen. + +Die ausgewählten [LAND_SIZE] qm Land werden zum Verkauf freigegeben. +Der Verkaufspreis beträgt [SALE_PRICE] L$ und wird automatisch für den Verkauf an [NAME] autorisiert. + + + + Möchten Sie alle Ihre Objekte auf dieser Parzelle, @@ -688,9 +727,20 @@ Möchten Sie auf www.secondlife.com ein Konto anlegen? Abbrechen + + + QuickTime wurde deaktiviert, weil Sie eine alte Version verwenden + + + Streaming-Video wurde deaktiviert, weil die QuickTime-Version +auf Ihrem Computer nicht mehr aktuell ist. + +Laden Sie ein Update von http://www.apple.com/quicktime/ herunter. + + - Anzeigen erscheinen für eine Woche auf der Registerkarte 'Anzeigen' + Anzeigen erscheinen für eine Woche unter 'Anzeigen' im Suchverzeichnis. Füllen Sie Ihre Anzeige aus und klicken Sie auf 'Veröffentlichen...', um sie zum Verzeichnis hinzuzufügen. @@ -1365,7 +1415,7 @@ Region. - Mindestens ein Objekt ist gesperrt oder gehört nicht Ihnen. + Mindestens ein Objekt ist gesperrt oder gehört Ihnen nicht. Wenn Ihnen ein Objekt nicht gehört und Sie es nehmen, werden die Rechte für den nächsten Eigentümer angewandt und Sie können es möglicherweise nicht bearbeiten oder kopieren. @@ -2499,11 +2549,9 @@ Bitte überprüfen Sie Ihre Netzwerkverbindung. - Verbindung nicht möglich. Anmeldeserver hat das Anmeldepaket -nie erhalten. + Die Verbindung kann nicht hergestellt werden. Möglicherweise besteht ein Problem mit Ihrer Internetverbindung oder den Second Life-Servern. -Bitte versuchen Sie es in einigen Minuten erneut oder klicken Sie -für Unterstützung und einen Link auf die Systemstatus-Webseite auf 'Hilfe'. +Ãœberprüfen Sie Ihre Internetverbindung und versuchen Sie es dann erneut, oder klicken Sie auf 'Hilfe', um zu unserer Supportseite zu gelangen, oder klicken Sie auf 'Teleportieren', um nach Hause zu teleportieren. + @@ -3129,7 +3180,8 @@ Inhalten wird das Objekt beschädigt. Möchten Sie dieses Element löschen? Beschäftigt-Modus aktiviert. Chat und Instant Messages werden ausgeblendet. Instant Messages erhalten Ihre Beschäftigt-Antwort. Alle Teleport- -und Inventarangebote werden abgelehnt. +Angebote werden ausgeschlagen. Alle Inventar-Angebote werden in den +Papierkorb verschoben. Beim Aktivieren des Beschäftigt-Modus @@ -3665,10 +3717,24 @@ Wenn der Wert unter 45 liegt, öffnen Sie den Bereich 'Time' (Zeit) ga - Schlechte Sim-Performance ist oftmals auf physische Objekte zurückzuführen. Öffnen Sie die Statistikleiste (Strg-Umschalt-1). Sehen Sie sich den Wert für 'Simulator Physics FPS' (Simulator Physik-FPS) an. Wenn der Wert unter 45 liegt, öffnen Sie den Bereich 'Time' (Zeit) ganz unten in der Statistikleiste. Wenn der Wert für 'Sim Time (Physics) ' [Sim Time (Physik)] 20 ms oder höher ist, klicken Sie auf 'Top-Kollisionsobjekte'. Der Name und die Position der physikalischen Objekte, die für die schlechte Performance verantwortlich sind, werden angezeigt. - Wenn Sie das Kontrollkästchen 'Kollisionen deaktivieren' aktivieren und auf -'Ãœbernehmen' klicken, werden alle Objekt-Objekt-Kollisionen in der Region zeitweilig deaktiviert. Dieser Schritt ist eventuell notwendig, damit Sie an die Position des gemeldeten 'Top-Kollisionsobjekts' reisen können. Sobald Sie dort angekommen sind, sollten Sie das Objekt untersuchen – kollidiert es ständig mit anderen Objekten? Möglicherweise müssen Sie sich an den Objekt-Eigentümer wenden oder das Objekt löschen bzw. zurückgeben. Um Kollisionen in der Region wieder zu aktivieren, deaktivieren Sie 'Kollisionen deaktivieren' und klicken Sie auf 'Ãœbernehmen'. - Standard: aus + Schlechte Sim-Performance ist oftmals auf physische Objekte zurückzuführen. +Öffnen Sie die Statistikleiste (Strg-Umschalt-1). Sehen Sie sich den Wert 'Simulator +Physics FPS' an. Liegt dieser unter 45, öffnen Sie unten in der +Statistikleiste den 'Time'-Bereich. Liegt die 'Sim Time (Physics)' +bei 20 ms oder darüber, klicken Sie auf 'Top-Kollisionsobjekte'. +Der Name und der Standort der physischen Objekte, die das +Problem verursachen, werden angezeigt. + +Wenn Sie das Kontrollkästchen 'Kollisionen deaktivieren' aktivieren und auf +'Ãœbernehmen' klicken, werden alle Objekt-Objekt-Kollisionen in der Region zeitweilig deaktiviert. Dieser Schritt +ist eventuell notwendig, damit Sie an die Position des gemeldeten +'Top-Kollisionsobjekts' reisen können. Ãœberprüfen Sie das Objekt an der angegebenen Position. +Kollidiert es ständig mit anderen Objekten? Wenden Sie sich +eventuell an den Eigentümer des Objekts, löschen Sie es oder geben Sie es zurück. +Deaktivieren Sie die Option 'Kollisionen deaktivieren' und klicken Sie auf 'Ãœbernehmen', +um Kollisionen in dieser Region wieder zu aktivieren. + +Standard: aus @@ -4101,13 +4167,17 @@ funktioniert aber nur, wenn ein Skript mit einem money() Ereignis hinzugefügt w - Verwenden Sie dieses Tool, um Verletzungen der Servicebedingungen und Community-Standards zu melden. Siehe: + Verwenden Sie dieses Tool, um Verletzungen der Servicebedingungen +und Community-Standards zu melden. Siehe: http://secondlife.com/corporate/tos.php http://secondlife.com/corporate/cs.php Alle gemeldeten Verletzungen der Servicebedingungen und Community-Standards -werden geprüft und geklärt. Sie werden per E-Mail über die Klärung informiert. Sie können den Prozess auch im Police Blotter verfolgen: http://secondlife.com/community/blotter.php +werden geprüft und geklärt. Sie können den Prozess im +Police Blotter verfolgen: + +http://secondlife.com/community/blotter.php @@ -4299,10 +4369,10 @@ wirklich permanent löschen? Die folgende SLURL wurde in die Zwischenablage kopiert: - [SLURL] + [SLURL] - Veröffentlichen Sie sie auf einer Website, um anderen den Zugang zu diesem Ort - zu erleichtern, oder testen Sie sie, indem Sie sie in die Adressleiste Ihres Browsers kopieren. +Veröffentlichen Sie sie auf einer Website, um anderen den Zugang zu diesem Ort +zu erleichtern, oder testen Sie sie, indem Sie sie in die Adressleiste Ihres Browsers kopieren. Beim Kopieren einer SLURL in die Zwischenablage @@ -4347,7 +4417,7 @@ wirklich permanent löschen? Fehler beim Starten einer neuen Chat-Sitzung mit [RECIPIENT]. - [REASON] +[REASON]