summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt45
-rw-r--r--indra/newview/FixBundle.cmake.in66
-rw-r--r--indra/newview/FixPackage.cmake.in66
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/ViewerInstall.cmake2
-rw-r--r--indra/newview/app_settings/settings.xml171
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl82
-rw-r--r--indra/newview/fsfloatersearch.cpp3212
-rw-r--r--indra/newview/fsfloatersearch.h404
-rw-r--r--indra/newview/gltf/asset.cpp35
-rw-r--r--indra/newview/gltf/asset.h2
-rw-r--r--indra/newview/gltf/llgltfloader.cpp13
-rw-r--r--indra/newview/gltf/llgltfloader.h2
-rw-r--r--indra/newview/installers/windows/installer_template.nsi49
-rw-r--r--indra/newview/llaccountingcostmanager.cpp4
-rw-r--r--indra/newview/llagent.cpp22
-rw-r--r--indra/newview/llagent.h11
-rw-r--r--indra/newview/llagentpicksinfo.cpp2
-rw-r--r--indra/newview/llagentwearables.h4
-rw-r--r--indra/newview/llaisapi.cpp13
-rw-r--r--indra/newview/llaisapi.h4
-rw-r--r--indra/newview/llappcorehttp.cpp4
-rw-r--r--indra/newview/llappdelegate-objc.mm132
-rw-r--r--indra/newview/llappearancemgr.cpp6
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llappviewer.cpp239
-rw-r--r--indra/newview/llappviewer.h24
-rw-r--r--indra/newview/llappviewerlistener.h4
-rw-r--r--indra/newview/llappviewerwin32.cpp35
-rw-r--r--indra/newview/llappviewerwin32.h2
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp8
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h60
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp12
-rw-r--r--indra/newview/llchiclet.h2
-rw-r--r--indra/newview/llcofwearables.h2
-rw-r--r--indra/newview/llcommandlineparser.cpp18
-rw-r--r--indra/newview/llcommandlineparser.h6
-rw-r--r--indra/newview/llcompilequeue.cpp4
-rw-r--r--indra/newview/llcompilequeue.h2
-rw-r--r--indra/newview/llconversationlog.cpp5
-rw-r--r--indra/newview/llconversationloglistitem.cpp5
-rw-r--r--indra/newview/lldndbutton.h2
-rw-r--r--indra/newview/lldrawable.cpp15
-rw-r--r--indra/newview/lldrawable.h13
-rw-r--r--indra/newview/lldrawpoolalpha.cpp2
-rw-r--r--indra/newview/lldrawpoolavatar.cpp2
-rw-r--r--indra/newview/lldrawpoolavatar.h6
-rw-r--r--indra/newview/lldrawpoolbump.cpp4
-rw-r--r--indra/newview/lldrawpoolbump.h2
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp1
-rw-r--r--indra/newview/llenvironment.cpp72
-rw-r--r--indra/newview/llenvironment.h4
-rw-r--r--indra/newview/llestateinfomodel.cpp4
-rw-r--r--indra/newview/lleventnotifier.cpp118
-rw-r--r--indra/newview/lleventnotifier.h52
-rw-r--r--indra/newview/lleventpoll.cpp64
-rw-r--r--indra/newview/llexperiencelog.cpp2
-rw-r--r--indra/newview/llexternaleditor.cpp22
-rw-r--r--indra/newview/llface.h14
-rw-r--r--indra/newview/llfavoritesbar.cpp36
-rw-r--r--indra/newview/llfeaturemanager.cpp23
-rw-r--r--indra/newview/llfilepicker_mac.h3
-rw-r--r--indra/newview/llfilepicker_mac.mm75
-rw-r--r--indra/newview/llfloater360capture.cpp2
-rw-r--r--indra/newview/llfloaterabout.cpp10
-rw-r--r--indra/newview/llfloateravatarpicker.cpp154
-rw-r--r--indra/newview/llfloateravatarpicker.h5
-rw-r--r--indra/newview/llfloaterbanduration.h2
-rw-r--r--indra/newview/llfloaterbulkupload.cpp3
-rw-r--r--indra/newview/llfloaterbulkupload.h1
-rw-r--r--indra/newview/llfloaterbvhpreview.cpp4
-rw-r--r--indra/newview/llfloaterdirectory.cpp100
-rw-r--r--indra/newview/llfloaterdirectory.h81
-rw-r--r--indra/newview/llfloateremojipicker.h4
-rw-r--r--indra/newview/llfloaterexperiencepicker.h4
-rw-r--r--indra/newview/llfloaterexperiences.cpp13
-rw-r--r--indra/newview/llfloaterexperiences.h5
-rw-r--r--indra/newview/llfloatergesture.cpp82
-rw-r--r--indra/newview/llfloatergridstatus.cpp8
-rw-r--r--indra/newview/llfloatergroups.h3
-rw-r--r--indra/newview/llfloaterimagepreview.cpp7
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp2
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp2
-rw-r--r--indra/newview/llfloatermodeluploadbase.cpp4
-rw-r--r--indra/newview/llfloatermyscripts.cpp4
-rw-r--r--indra/newview/llfloaterpay.cpp12
-rw-r--r--indra/newview/llfloaterperms.cpp4
-rw-r--r--indra/newview/llfloaterpreference.cpp26
-rw-r--r--indra/newview/llfloaterregioninfo.cpp5
-rw-r--r--indra/newview/llfloaterregionrestartschedule.cpp12
-rw-r--r--indra/newview/llfloaterreporter.cpp6
-rw-r--r--indra/newview/llfloaterscriptlimits.cpp16
-rw-r--r--indra/newview/llfloaterscriptlimits.h3
-rw-r--r--indra/newview/llfloatersimplesnapshot.cpp12
-rw-r--r--indra/newview/llfloatersimplesnapshot.h2
-rw-r--r--indra/newview/llfloatertos.cpp6
-rw-r--r--indra/newview/llfloatertos.h1
-rw-r--r--indra/newview/llfloaterurlentry.cpp8
-rw-r--r--indra/newview/llfriendcard.cpp2
-rw-r--r--indra/newview/llfriendcard.h2
-rw-r--r--indra/newview/llgesturemgr.cpp2
-rw-r--r--indra/newview/llgesturemgr.h2
-rw-r--r--indra/newview/llglsandbox.cpp66
-rw-r--r--indra/newview/llgltfmateriallist.cpp6
-rw-r--r--indra/newview/llgltfmaterialpreviewmgr.cpp2
-rw-r--r--indra/newview/llgroupmgr.cpp18
-rw-r--r--indra/newview/llimprocessing.cpp16
-rw-r--r--indra/newview/llimview.cpp16
-rw-r--r--indra/newview/llinventorybridge.cpp13
-rw-r--r--indra/newview/llinventorybridge.h4
-rw-r--r--indra/newview/llinventoryfunctions.cpp2
-rw-r--r--indra/newview/llinventoryfunctions.h8
-rw-r--r--indra/newview/llinventorygallery.cpp10
-rw-r--r--indra/newview/llinventorygallery.h4
-rw-r--r--indra/newview/llinventorygallerymenu.cpp23
-rw-r--r--indra/newview/llinventoryitemslist.cpp54
-rw-r--r--indra/newview/llinventoryitemslist.h1
-rw-r--r--indra/newview/llinventorylistitem.cpp2
-rw-r--r--indra/newview/llinventorymodel.cpp14
-rw-r--r--indra/newview/llinventorymodel.h7
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp92
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h4
-rw-r--r--indra/newview/llinventoryobserver.cpp2
-rw-r--r--indra/newview/llinventoryobserver.h2
-rw-r--r--indra/newview/llinventorypanel.cpp10
-rw-r--r--indra/newview/llinventorypanel.h7
-rw-r--r--indra/newview/lllandmarkactions.cpp101
-rw-r--r--indra/newview/lllandmarkactions.h6
-rw-r--r--indra/newview/lllandmarklist.cpp49
-rw-r--r--indra/newview/lllandmarklist.h7
-rw-r--r--indra/newview/lllistcontextmenu.h2
-rw-r--r--indra/newview/lllocationhistory.h5
-rw-r--r--indra/newview/lllogininstance.cpp83
-rw-r--r--indra/newview/lllogininstance.h7
-rw-r--r--indra/newview/llmaniptranslate.cpp34
-rw-r--r--indra/newview/llmarketplacefunctions.cpp58
-rw-r--r--indra/newview/llmarketplacefunctions.h8
-rw-r--r--indra/newview/llmarketplacenotifications.h4
-rw-r--r--indra/newview/llmaterialeditor.cpp9
-rw-r--r--indra/newview/llmaterialmgr.cpp22
-rw-r--r--indra/newview/llmediadataclient.cpp18
-rw-r--r--indra/newview/llmeshrepository.cpp59
-rw-r--r--indra/newview/llmutelist.cpp10
-rw-r--r--indra/newview/llnamelistctrl.h4
-rw-r--r--indra/newview/llnotificationlistitem.h22
-rw-r--r--indra/newview/llnotificationmanager.cpp2
-rw-r--r--indra/newview/llnotificationstorage.cpp2
-rw-r--r--indra/newview/lloutfitslist.cpp61
-rw-r--r--indra/newview/lloutfitslist.h17
-rw-r--r--indra/newview/llpanelappearancetab.cpp2
-rw-r--r--indra/newview/llpanelappearancetab.h2
-rw-r--r--indra/newview/llpanelavatar.cpp6
-rw-r--r--indra/newview/llpanelblockedlist.cpp2
-rw-r--r--indra/newview/llpanelblockedlist.h2
-rw-r--r--indra/newview/llpanelclassified.cpp4
-rw-r--r--indra/newview/llpaneldirbrowser.cpp1145
-rw-r--r--indra/newview/llpaneldirbrowser.h167
-rw-r--r--indra/newview/llpaneldirclassified.cpp109
-rw-r--r--indra/newview/llpaneldirclassified.h55
-rw-r--r--indra/newview/llpaneldirevents.cpp247
-rw-r--r--indra/newview/llpaneldirevents.h61
-rw-r--r--indra/newview/llpaneldirgroups.cpp90
-rw-r--r--indra/newview/llpaneldirgroups.h45
-rw-r--r--indra/newview/llpaneldirland.cpp233
-rw-r--r--indra/newview/llpaneldirland.h53
-rw-r--r--indra/newview/llpaneldirpeople.cpp105
-rw-r--r--indra/newview/llpaneldirpeople.h48
-rw-r--r--indra/newview/llpaneldirplaces.cpp184
-rw-r--r--indra/newview/llpaneldirplaces.h51
-rw-r--r--indra/newview/llpaneldirweb.cpp148
-rw-r--r--indra/newview/llpaneldirweb.h63
-rw-r--r--indra/newview/llpaneleditsky.cpp8
-rw-r--r--indra/newview/llpaneleditwearable.cpp2
-rw-r--r--indra/newview/llpaneleventinfo.cpp195
-rw-r--r--indra/newview/llpaneleventinfo.h76
-rw-r--r--indra/newview/llpanelexperiencelisteditor.h2
-rw-r--r--indra/newview/llpanelexperiencepicker.h4
-rw-r--r--indra/newview/llpanelface.cpp62
-rw-r--r--indra/newview/llpanelface.h4
-rw-r--r--indra/newview/llpanelgroup.cpp6
-rw-r--r--indra/newview/llpanelgroup.h1
-rw-r--r--indra/newview/llpanellogin.cpp18
-rw-r--r--indra/newview/llpanelmediasettingssecurity.cpp2
-rw-r--r--indra/newview/llpanelpeople.cpp2
-rw-r--r--indra/newview/llpanelplaceprofile.cpp4
-rw-r--r--indra/newview/llpanelplaceprofile.h2
-rw-r--r--indra/newview/llpanelplaces.cpp9
-rw-r--r--indra/newview/llpanelplaces.h2
-rw-r--r--indra/newview/llpanelprofile.cpp34
-rw-r--r--indra/newview/llpanelprofile.h4
-rw-r--r--indra/newview/llpanelprofileclassifieds.h3
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp6
-rw-r--r--indra/newview/llpanelwearing.cpp4
-rw-r--r--indra/newview/llparticipantlist.cpp2
-rw-r--r--indra/newview/llparticipantlist.h4
-rw-r--r--indra/newview/llpathfindingcharacterlist.cpp2
-rw-r--r--indra/newview/llpathfindinglinksetlist.cpp2
-rw-r--r--indra/newview/llpathfindingmanager.cpp25
-rw-r--r--indra/newview/llpathfindingmanager.h8
-rw-r--r--indra/newview/llpathfindingnavmesh.h4
-rw-r--r--indra/newview/llpathfindingnavmeshzone.h6
-rw-r--r--indra/newview/llpathfindingobject.h4
-rw-r--r--indra/newview/llpathfindingpathtool.cpp1
-rw-r--r--indra/newview/llpathfindingpathtool.h4
-rw-r--r--indra/newview/llpbrterrainfeatures.cpp12
-rw-r--r--indra/newview/llpersistentnotificationstorage.cpp2
-rw-r--r--indra/newview/llpopupview.cpp4
-rw-r--r--indra/newview/llpopupview.h2
-rw-r--r--indra/newview/llpostcard.h2
-rw-r--r--indra/newview/llpresetsmanager.cpp20
-rw-r--r--indra/newview/llpreviewscript.h2
-rw-r--r--indra/newview/llproductinforequest.cpp4
-rw-r--r--indra/newview/llremoteparcelrequest.cpp4
-rw-r--r--indra/newview/llsearchcombobox.h10
-rw-r--r--indra/newview/llsetkeybinddialog.cpp2
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp4
-rw-r--r--indra/newview/llspatialpartition.h24
-rw-r--r--indra/newview/llspeakers.cpp8
-rw-r--r--indra/newview/llspeakers.h5
-rw-r--r--indra/newview/llsplitbutton.cpp2
-rw-r--r--indra/newview/llstartup.cpp137
-rw-r--r--indra/newview/llstatusbar.cpp10
-rw-r--r--indra/newview/llsyntaxid.cpp4
-rw-r--r--indra/newview/llsyswellitem.h2
-rw-r--r--indra/newview/llteleporthistory.h4
-rw-r--r--indra/newview/llteleporthistorystorage.h2
-rw-r--r--indra/newview/llterrainpaintmap.cpp2
-rw-r--r--indra/newview/lltexturectrl.cpp26
-rw-r--r--indra/newview/lltexturectrl.h12
-rw-r--r--indra/newview/lltexturefetch.cpp20
-rw-r--r--indra/newview/lltoast.cpp4
-rw-r--r--indra/newview/lltoast.h2
-rw-r--r--indra/newview/lltoolpipette.h1
-rw-r--r--indra/newview/lltranslate.cpp22
-rw-r--r--indra/newview/lltranslate.h10
-rw-r--r--indra/newview/llurllineeditorctrl.cpp4
-rw-r--r--indra/newview/llvelopack.cpp1201
-rw-r--r--indra/newview/llvelopack.h59
-rw-r--r--indra/newview/llversioninfo.cpp2
-rw-r--r--indra/newview/llversioninfo.h4
-rw-r--r--indra/newview/llviewerassetstats.h2
-rw-r--r--indra/newview/llviewerassetstorage.cpp79
-rw-r--r--indra/newview/llviewerassetupload.cpp26
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewerdisplayname.cpp6
-rw-r--r--indra/newview/llviewerfloaterreg.cpp13
-rw-r--r--indra/newview/llviewerinput.cpp21
-rw-r--r--indra/newview/llviewerinput.h2
-rw-r--r--indra/newview/llviewerinventory.cpp6
-rw-r--r--indra/newview/llviewerinventory.h8
-rw-r--r--indra/newview/llviewerjoystick.cpp10
-rw-r--r--indra/newview/llviewermedia.cpp26
-rw-r--r--indra/newview/llviewermenu.cpp26
-rw-r--r--indra/newview/llviewermenufile.cpp21
-rw-r--r--indra/newview/llviewermenufile.h2
-rw-r--r--indra/newview/llviewermessage.cpp17
-rw-r--r--indra/newview/llviewermessage.h7
-rw-r--r--indra/newview/llviewernetwork.cpp24
-rw-r--r--indra/newview/llviewernetwork.h19
-rw-r--r--indra/newview/llviewerobject.cpp6
-rw-r--r--indra/newview/llviewerobjectlist.cpp8
-rw-r--r--indra/newview/llviewerparcelaskplay.h2
-rw-r--r--indra/newview/llviewerparcelmgr.h7
-rw-r--r--indra/newview/llviewerpartsim.cpp10
-rw-r--r--indra/newview/llviewerprecompiledheaders.h1
-rwxr-xr-xindra/newview/llviewerregion.cpp12
-rw-r--r--indra/newview/llviewerregion.h8
-rw-r--r--indra/newview/llviewershadermgr.cpp6
-rw-r--r--indra/newview/llviewerstats.cpp6
-rw-r--r--indra/newview/llviewertexturelist.cpp3
-rw-r--r--indra/newview/llviewerwindow.cpp12
-rw-r--r--indra/newview/llviewerwindow.h5
-rw-r--r--indra/newview/llvoavatar.cpp8
-rw-r--r--indra/newview/llvoavatarself.cpp8
-rw-r--r--indra/newview/llvograss.cpp2
-rw-r--r--indra/newview/llvoicechannel.cpp4
-rw-r--r--indra/newview/llvoicechannel.h2
-rw-r--r--indra/newview/llvoicevivox.cpp12
-rw-r--r--indra/newview/llvoicewebrtc.cpp63
-rw-r--r--indra/newview/llvovolume.cpp11
-rw-r--r--indra/newview/llvvmquery.cpp189
-rw-r--r--indra/newview/llvvmquery.h42
-rw-r--r--indra/newview/llwatchdog.cpp266
-rw-r--r--indra/newview/llwatchdog.h101
-rw-r--r--indra/newview/llwebprofile.cpp8
-rw-r--r--indra/newview/llwebprofile.h2
-rw-r--r--indra/newview/llwindowlistener.cpp27
-rw-r--r--indra/newview/llwindowlistener.h4
-rw-r--r--indra/newview/llwlhandlers.cpp8
-rw-r--r--indra/newview/llworldmap.h1
-rw-r--r--indra/newview/llworldmapmessage.cpp62
-rw-r--r--indra/newview/llworldmapmessage.h4
-rw-r--r--indra/newview/llxmlrpclistener.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp15
-rw-r--r--indra/newview/pipeline.cpp35
-rw-r--r--indra/newview/pipeline.h1
-rw-r--r--indra/newview/skins/default/textures/icon_auction.tgabin1068 -> 1068 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_event.tga (renamed from indra/newview/skins/default/textures/icon_legacy_event.tga)bin1068 -> 1068 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_event_adult.tga (renamed from indra/newview/skins/default/textures/icon_legacy_event_adult.tga)bin648 -> 648 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_event_mature.tga (renamed from indra/newview/skins/default/textures/icon_legacy_event_mature.tga)bin1068 -> 1068 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_group.tgabin1068 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icon_place.tgabin1068 -> 1068 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_1.pngbin6163 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_10.pngbin6310 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_11.pngbin6169 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_12.pngbin6197 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_2.pngbin6227 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_3.pngbin6090 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_4.pngbin6295 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_5.pngbin6158 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_6.pngbin6220 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_7.pngbin6100 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_8.pngbin6223 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ProgressLarge_9.pngbin6034 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/megapahit/icon_group.pngbin1479 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/megapahit/icon_land_auction.pngbin1464 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/megapahit/icon_land_forsale.pngbin1485 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/megapahit/icon_place.pngbin1584 -> 0 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml28
-rw-r--r--indra/newview/skins/default/xui/da/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_directory.xml150
-rw-r--r--indra/newview/skins/default/xui/en/floater_fs_search.xml337
-rw-r--r--indra/newview/skins/default/xui/en/floater_gesture.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_world_map.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_favorites.xml6
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml37
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml29
-rw-r--r--indra/newview/skins/default/xui/en/panel_classified_info.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_dir_classified.xml215
-rw-r--r--indra/newview/skins/default/xui/en/panel_dir_events.xml300
-rw-r--r--indra/newview/skins/default/xui/en/panel_dir_groups.xml129
-rw-r--r--indra/newview/skins/default/xui/en/panel_dir_land.xml268
-rw-r--r--indra/newview/skins/default/xui/en/panel_dir_people.xml120
-rw-r--r--indra/newview/skins/default/xui/en/panel_dir_places.xml215
-rw-r--r--indra/newview/skins/default/xui/en/panel_dir_web.xml76
-rw-r--r--indra/newview/skins/default/xui/en/panel_event_info.xml212
-rw-r--r--indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml169
-rw-r--r--indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml258
-rw-r--r--indra/newview/skins/default/xui/en/panel_fs_search_legacy_groups.xml159
-rw-r--r--indra/newview/skins/default/xui/en/panel_fs_search_legacy_land.xml281
-rw-r--r--indra/newview/skins/default/xui/en/panel_fs_search_legacy_people.xml89
-rw-r--r--indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml169
-rw-r--r--indra/newview/skins/default/xui/en/panel_fs_search_legacy_web.xml21
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml21
-rw-r--r--indra/newview/skins/default/xui/es/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/it/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/panel_status_bar.xml3
-rw-r--r--indra/newview/skins/default/xui/pt/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/panel_status_bar.xml3
-rw-r--r--indra/newview/skins/default/xui/tr/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/panel_status_bar.xml2
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp6
-rw-r--r--indra/newview/tests/llslurl_test.cpp20
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp2
-rwxr-xr-xindra/newview/viewer_manifest.py286
361 files changed, 9436 insertions, 7389 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a5d949d25b..68d075efbc 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -43,6 +43,7 @@ include(TinyEXR)
include(ThreeJS)
include(Tracy)
include(UI)
+#include(Velopack)
include(ViewerMiscLibs)
#include(ViewerManager)
include(VisualLeakDetector)
@@ -227,6 +228,7 @@ set(viewer_SOURCE_FILES
llfloatercreatelandmark.cpp
llfloaterdeleteprefpreset.cpp
llfloaterdestinations.cpp
+ llfloaterdirectory.cpp
llfloaterdisplayname.cpp
llfloatereditenvironmentbase.cpp
llfloatereditextdaycycle.cpp
@@ -251,7 +253,6 @@ set(viewer_SOURCE_FILES
llfloaterhelpbrowser.cpp
llfloaterhoverheight.cpp
mpfloatertuning.cpp
- fsfloatersearch.cpp
llfloaterhowto.cpp
llfloaterhud.cpp
llfloaterimagepreview.cpp
@@ -451,11 +452,20 @@ set(viewer_SOURCE_FILES
llpanelblockedlist.cpp
llpanelclassified.cpp
llpanelcontents.cpp
+ llpaneldirbrowser.cpp
+ llpaneldirclassified.cpp
+ llpaneldirevents.cpp
+ llpaneldirgroups.cpp
+ llpaneldirland.cpp
+ llpaneldirpeople.cpp
+ llpaneldirplaces.cpp
+ llpaneldirweb.cpp
llpaneleditsky.cpp
llpaneleditwater.cpp
llpaneleditwearable.cpp
llpanelemojicomplete.cpp
llpanelenvironment.cpp
+ llpaneleventinfo.cpp
llpanelexperiencelisteditor.cpp
llpanelexperiencelog.cpp
llpanelexperiencepicker.cpp
@@ -659,6 +669,7 @@ set(viewer_SOURCE_FILES
llurllineeditorctrl.cpp
llurlwhitelist.cpp
llversioninfo.cpp
+ llvvmquery.cpp
llviewchildren.cpp
llviewerassetstats.cpp
llviewerassetstorage.cpp
@@ -736,7 +747,6 @@ set(viewer_SOURCE_FILES
llvovolume.cpp
llvowater.cpp
llvowlsky.cpp
- llwatchdog.cpp
llwearableitemslist.cpp
llwearablelist.cpp
llweb.cpp
@@ -913,6 +923,7 @@ set(viewer_HEADER_FILES
llfloatercreatelandmark.h
llfloaterdeleteprefpreset.h
llfloaterdestinations.h
+ llfloaterdirectory.h
llfloaterdisplayname.h
llfloatereditenvironmentbase.h
llfloatereditextdaycycle.h
@@ -937,7 +948,6 @@ set(viewer_HEADER_FILES
llfloaterhelpbrowser.h
llfloaterhoverheight.h
mpfloatertuning.h
- fsfloatersearch.h
llfloaterhowto.h
llfloaterhud.h
llfloaterimagepreview.h
@@ -1129,11 +1139,20 @@ set(viewer_HEADER_FILES
llpanelblockedlist.h
llpanelclassified.h
llpanelcontents.h
+ llpaneldirbrowser.h
+ llpaneldirclassified.h
+ llpaneldirevents.h
+ llpaneldirgroups.h
+ llpaneldirland.h
+ llpaneldirpeople.h
+ llpaneldirplaces.h
+ llpaneldirweb.h
llpaneleditsky.h
llpaneleditwater.h
llpaneleditwearable.h
llpanelemojicomplete.h
llpanelenvironment.h
+ llpaneleventinfo.h
llpanelexperiencelisteditor.h
llpanelexperiencelog.h
llpanelexperiencepicker.h
@@ -1339,6 +1358,7 @@ set(viewer_HEADER_FILES
llurllineeditorctrl.h
llurlwhitelist.h
llversioninfo.h
+ llvvmquery.h
llviewchildren.h
llviewerassetstats.h
llviewerassetstorage.h
@@ -1415,7 +1435,6 @@ set(viewer_HEADER_FILES
llvovolume.h
llvowater.h
llvowlsky.h
- llwatchdog.h
llwearableitemslist.h
llwearablelist.h
llweb.h
@@ -1465,6 +1484,8 @@ if (DARWIN)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.h)
LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm)
LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h)
+ LIST(APPEND viewer_SOURCE_FILES llvelopack.cpp)
+ LIST(APPEND viewer_HEADER_FILES llvelopack.h)
set_source_files_properties(
llappviewermacosx-objc.mm
@@ -1530,16 +1551,19 @@ if (WINDOWS)
list(APPEND viewer_SOURCE_FILES
llappviewerwin32.cpp
+ llvelopack.cpp
llwindebug.cpp
)
set_source_files_properties(
llappviewerwin32.cpp
+ llvelopack.cpp
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
)
list(APPEND viewer_HEADER_FILES
llappviewerwin32.h
+ llvelopack.h
llwindebug.h
)
@@ -2059,6 +2083,7 @@ if (WINDOWS)
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
+ "--velopack=${USE_VELOPACK}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
"--channel=${VIEWER_CHANNEL}"
@@ -2100,6 +2125,7 @@ elseif (DARWIN)
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_BINARY_DIR}/llphysicsextensionsos/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsos"
)
+ add_dependencies(${VIEWER_BINARY_NAME} llphysicsextensionsos)
elseif(HAVOK_TPV)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
@@ -2110,6 +2136,7 @@ elseif (DARWIN)
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${ARCH_PREBUILT_DIRS}/ -lllphysicsextensions_tpv"
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_BINARY_DIR}/llphysicsextensionsos/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsos"
)
+ add_dependencies(${VIEWER_BINARY_NAME} llphysicsextensionsos)
else()
target_link_libraries(${VIEWER_BINARY_NAME} llphysicsextensionsos)
endif()
@@ -2192,6 +2219,10 @@ if (USE_DISCORD)
target_link_libraries(${VIEWER_BINARY_NAME} ll::discord_sdk )
endif ()
+if (TARGET ll::velopack)
+ target_link_libraries(${VIEWER_BINARY_NAME} ll::velopack )
+endif ()
+
if( TARGET ll::intel_memops )
target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops )
endif()
@@ -2263,6 +2294,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES GNU)
gltf/animation.cpp
gltf/primitive.cpp
PROPERTIES COMPILE_FLAGS -Wno-unused-function)
+ set_source_files_properties(llmutelist.cpp
+ PROPERTIES COMPILE_FLAGS -Wno-free-nonheap-object)
endif ()
message("Copying fonts")
@@ -2378,7 +2411,7 @@ if (LINUX)
set(CPACK_RPM_PACKAGE_REQUIRES "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg2, SDL2, vlc-libs, vlc-plugins-base, libvorbis"
CACHE STRING "RPM package requirements.")
else ()
- set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_90_0, libboost_program_options1_90_0, libboost_regex1_90_0, libboost_thread1_90_0, libboost_url1_90_0, libboost_url1_90_0-x86-64-v3, libpng16-16 expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, vlc-codecs, libvorbis0"
+ set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_90_0, libboost_program_options1_90_0, libboost_regex1_90_0, libboost_thread1_90_0, libboost_url1_90_0, libboost_url1_90_0-x86-64-v3, libpng16-16 expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, libvlc5, libvorbis0"
CACHE STRING "RPM package requirements.")
endif ()
endif ()
@@ -2550,9 +2583,11 @@ if (DARWIN)
--arch=${ARCH}
--artwork=${ARTWORK_DIR}
"--bugsplat=${BUGSPLAT_DB}"
+ --bundleid=${MACOSX_BUNDLE_GUI_IDENTIFIER}
"--discord=${USE_DISCORD}"
"--openal=${USE_OPENAL}"
"--tracy=${USE_TRACY}"
+ "--velopack=${USE_VELOPACK}"
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=$<CONFIG>
"--channel=${VIEWER_CHANNEL}"
diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in
index abeb7a8a5e..ac5e3cbe3e 100644
--- a/indra/newview/FixBundle.cmake.in
+++ b/indra/newview/FixBundle.cmake.in
@@ -80,18 +80,18 @@ file(CREATE_LINK
SYMBOLIC
)
file(CREATE_LINK
- "../../../../Frameworks/libicudata.76.dylib"
- "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.76.dylib"
+ "../../../../Frameworks/libicudata.78.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.78.dylib"
SYMBOLIC
)
file(CREATE_LINK
- "../../../../Frameworks/libicui18n.76.dylib"
- "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.76.dylib"
+ "../../../../Frameworks/libicui18n.78.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.78.dylib"
SYMBOLIC
)
file(CREATE_LINK
- "../../../../Frameworks/libicuuc.76.dylib"
- "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.76.dylib"
+ "../../../../Frameworks/libicuuc.78.dylib"
+ "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.78.dylib"
SYMBOLIC
)
file(CREATE_LINK
@@ -158,9 +158,9 @@ execute_process(
COMMAND lipo libbz2.1.0.8.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libbz2.1.0.8.dylib
- COMMAND lipo libexpat.1.11.1.dylib
+ COMMAND lipo libexpat.1.11.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libexpat.1.11.1.dylib
+ -output libexpat.1.11.2.dylib
COMMAND lipo libfreetype.6.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libfreetype.6.dylib
@@ -170,24 +170,21 @@ execute_process(
COMMAND lipo libiconv.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libiconv.2.dylib
- COMMAND lipo libicudata.76.1.dylib
+ COMMAND lipo libicudata.78.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libicudata.76.1.dylib
- COMMAND lipo libicui18n.76.1.dylib
+ -output libicudata.78.3.dylib
+ COMMAND lipo libicui18n.78.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libicui18n.76.1.dylib
- COMMAND lipo libicuuc.76.1.dylib
+ -output libicui18n.78.3.dylib
+ COMMAND lipo libicuuc.78.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libicuuc.76.1.dylib
+ -output libicuuc.78.3.dylib
COMMAND lipo libjpeg.8.3.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libjpeg.8.3.2.dylib
COMMAND lipo libllwebrtc.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libllwebrtc.dylib
- COMMAND lipo liblzma.5.dylib
- -thin ${CMAKE_OSX_ARCHITECTURES}
- -output liblzma.5.dylib
COMMAND lipo libminizip.1.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libminizip.1.dylib
@@ -203,9 +200,9 @@ execute_process(
COMMAND lipo libogg.0.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libogg.0.dylib
- COMMAND lipo libopenal.1.24.2.dylib
+ COMMAND lipo libopenal.1.25.1.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libopenal.1.24.2.dylib
+ -output libopenal.1.25.1.dylib
COMMAND lipo libopenjp2.2.5.4.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libopenjp2.2.5.4.dylib
@@ -227,12 +224,12 @@ execute_process(
COMMAND lipo libvorbisfile.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libvorbisfile.3.dylib
- COMMAND lipo libxml2.2.dylib
+ COMMAND lipo libxml2.16.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libxml2.2.dylib
- COMMAND lipo libz.1.3.1.dylib
+ -output libxml2.16.dylib
+ COMMAND lipo libz.1.3.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libz.1.3.1.dylib
+ -output libz.1.3.2.dylib
WORKING_DIRECTORY ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Frameworks
ERROR_QUIET
)
@@ -261,22 +258,21 @@ execute_process(
Frameworks/libbrotlidec.1.2.0.dylib
Frameworks/libbz2.1.0.8.dylib
Frameworks/libdiscord_partner_sdk.dylib
- Frameworks/libexpat.1.11.1.dylib
+ Frameworks/libexpat.1.11.2.dylib
Frameworks/libfreetype.6.dylib
Frameworks/libhunspell-1.7.0.dylib
Frameworks/libiconv.2.dylib
- Frameworks/libicudata.76.1.dylib
- Frameworks/libicui18n.76.1.dylib
- Frameworks/libicuuc.76.1.dylib
+ Frameworks/libicudata.78.3.dylib
+ Frameworks/libicui18n.78.3.dylib
+ Frameworks/libicuuc.78.3.dylib
Frameworks/libjpeg.8.3.2.dylib
Frameworks/libllwebrtc.dylib
- Frameworks/liblzma.5.dylib
Frameworks/libminizip.1.dylib
Frameworks/libncurses.6.dylib
Frameworks/libndofdev.dylib
Frameworks/libnghttp2.14.dylib
Frameworks/libogg.0.dylib
- Frameworks/libopenal.1.24.2.dylib
+ Frameworks/libopenal.1.25.1.dylib
Frameworks/libopenjp2.2.5.4.dylib
Frameworks/libpng16.16.dylib
Frameworks/libvlc.5.dylib
@@ -284,12 +280,11 @@ execute_process(
Frameworks/libvorbis.0.dylib
Frameworks/libvorbisenc.2.dylib
Frameworks/libvorbisfile.3.dylib
- Frameworks/libxml2.2.dylib
- Frameworks/libz.1.3.1.dylib
+ Frameworks/libxml2.16.dylib
+ Frameworks/libz.1.3.2.dylib
Resources/libndofdev.dylib
Resources/SLPlugin.app/Contents/Frameworks/media_plugin_cef.dylib
Resources/SLPlugin.app/Contents/Frameworks/media_plugin_libvlc.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/liba52_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libaccess_concat_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libaccess_imem_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libaccess_mms_plugin.dylib
@@ -338,8 +333,8 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libblend_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libblendbench_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluescreen_plugin.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-awt-j2se-1.3.2.jar
- Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-j2se-1.3.2.jar
+ Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-awt-j2se-1.4.0.jar
+ Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-j2se-1.4.0.jar
Resources/SLPlugin.app/Contents/Frameworks/plugins/libbonjour_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcache_block_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcache_read_plugin.dylib
@@ -360,7 +355,6 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcvdsub_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcvpx_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdav1d_plugin.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/libdca_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdcp_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libddummy_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdecomp_plugin.dylib
@@ -371,6 +365,7 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdemuxdump_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdiracsys_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdirectory_demux_plugin.dylib
+ Resources/SLPlugin.app/Contents/Frameworks/plugins/libdmxmus_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdolby_surround_decoder_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdummy_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdvbsub_plugin.dylib
@@ -441,7 +436,6 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libkeychain_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblibass_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblibbluray_plugin.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/liblibmpeg2_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblive555_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblogger_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblogo_plugin.dylib
diff --git a/indra/newview/FixPackage.cmake.in b/indra/newview/FixPackage.cmake.in
index c130bf4784..a0eea41292 100644
--- a/indra/newview/FixPackage.cmake.in
+++ b/indra/newview/FixPackage.cmake.in
@@ -80,18 +80,18 @@ file(CREATE_LINK
SYMBOLIC
)
file(CREATE_LINK
- "../../../../Frameworks/libicudata.76.dylib"
- "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.76.dylib"
+ "../../../../Frameworks/libicudata.78.dylib"
+ "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.78.dylib"
SYMBOLIC
)
file(CREATE_LINK
- "../../../../Frameworks/libicui18n.76.dylib"
- "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.76.dylib"
+ "../../../../Frameworks/libicui18n.78.dylib"
+ "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.78.dylib"
SYMBOLIC
)
file(CREATE_LINK
- "../../../../Frameworks/libicuuc.76.dylib"
- "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.76.dylib"
+ "../../../../Frameworks/libicuuc.78.dylib"
+ "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.78.dylib"
SYMBOLIC
)
file(CREATE_LINK
@@ -158,9 +158,9 @@ execute_process(
COMMAND lipo libbz2.1.0.8.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libbz2.1.0.8.dylib
- COMMAND lipo libexpat.1.11.1.dylib
+ COMMAND lipo libexpat.1.11.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libexpat.1.11.1.dylib
+ -output libexpat.1.11.2.dylib
COMMAND lipo libfreetype.6.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libfreetype.6.dylib
@@ -170,24 +170,21 @@ execute_process(
COMMAND lipo libiconv.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libiconv.2.dylib
- COMMAND lipo libicudata.76.1.dylib
+ COMMAND lipo libicudata.78.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libicudata.76.1.dylib
- COMMAND lipo libicui18n.76.1.dylib
+ -output libicudata.78.3.dylib
+ COMMAND lipo libicui18n.78.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libicui18n.76.1.dylib
- COMMAND lipo libicuuc.76.1.dylib
+ -output libicui18n.78.3.dylib
+ COMMAND lipo libicuuc.78.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libicuuc.76.1.dylib
+ -output libicuuc.78.3.dylib
COMMAND lipo libjpeg.8.3.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libjpeg.8.3.2.dylib
COMMAND lipo libllwebrtc.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libllwebrtc.dylib
- COMMAND lipo liblzma.5.dylib
- -thin ${CMAKE_OSX_ARCHITECTURES}
- -output liblzma.5.dylib
COMMAND lipo libminizip.1.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libminizip.1.dylib
@@ -203,9 +200,9 @@ execute_process(
COMMAND lipo libogg.0.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libogg.0.dylib
- COMMAND lipo libopenal.1.24.2.dylib
+ COMMAND lipo libopenal.1.25.1.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libopenal.1.24.2.dylib
+ -output libopenal.1.25.1.dylib
COMMAND lipo libopenjp2.2.5.4.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libopenjp2.2.5.4.dylib
@@ -227,12 +224,12 @@ execute_process(
COMMAND lipo libvorbisfile.3.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
-output libvorbisfile.3.dylib
- COMMAND lipo libxml2.2.dylib
+ COMMAND lipo libxml2.16.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libxml2.2.dylib
- COMMAND lipo libz.1.3.1.dylib
+ -output libxml2.16.dylib
+ COMMAND lipo libz.1.3.2.dylib
-thin ${CMAKE_OSX_ARCHITECTURES}
- -output libz.1.3.1.dylib
+ -output libz.1.3.2.dylib
WORKING_DIRECTORY ${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Frameworks
ERROR_QUIET
)
@@ -261,22 +258,21 @@ execute_process(
Frameworks/libbrotlidec.1.2.0.dylib
Frameworks/libbz2.1.0.8.dylib
Frameworks/libdiscord_partner_sdk.dylib
- Frameworks/libexpat.1.11.1.dylib
+ Frameworks/libexpat.1.11.2.dylib
Frameworks/libfreetype.6.dylib
Frameworks/libhunspell-1.7.0.dylib
Frameworks/libiconv.2.dylib
- Frameworks/libicudata.76.1.dylib
- Frameworks/libicui18n.76.1.dylib
- Frameworks/libicuuc.76.1.dylib
+ Frameworks/libicudata.78.3.dylib
+ Frameworks/libicui18n.78.3.dylib
+ Frameworks/libicuuc.78.3.dylib
Frameworks/libjpeg.8.3.2.dylib
Frameworks/libllwebrtc.dylib
- Frameworks/liblzma.5.dylib
Frameworks/libminizip.1.dylib
Frameworks/libncurses.6.dylib
Frameworks/libndofdev.dylib
Frameworks/libnghttp2.14.dylib
Frameworks/libogg.0.dylib
- Frameworks/libopenal.1.24.2.dylib
+ Frameworks/libopenal.1.25.1.dylib
Frameworks/libopenjp2.2.5.4.dylib
Frameworks/libpng16.16.dylib
Frameworks/libvlc.5.dylib
@@ -284,12 +280,11 @@ execute_process(
Frameworks/libvorbis.0.dylib
Frameworks/libvorbisenc.2.dylib
Frameworks/libvorbisfile.3.dylib
- Frameworks/libxml2.2.dylib
- Frameworks/libz.1.3.1.dylib
+ Frameworks/libxml2.16.dylib
+ Frameworks/libz.1.3.2.dylib
Resources/libndofdev.dylib
Resources/SLPlugin.app/Contents/Frameworks/media_plugin_cef.dylib
Resources/SLPlugin.app/Contents/Frameworks/media_plugin_libvlc.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/liba52_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libaccess_concat_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libaccess_imem_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libaccess_mms_plugin.dylib
@@ -338,8 +333,8 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libblend_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libblendbench_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluescreen_plugin.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-awt-j2se-1.3.2.jar
- Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-j2se-1.3.2.jar
+ Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-awt-j2se-1.4.0.jar
+ Resources/SLPlugin.app/Contents/Frameworks/plugins/libbluray-j2se-1.4.0.jar
Resources/SLPlugin.app/Contents/Frameworks/plugins/libbonjour_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcache_block_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcache_read_plugin.dylib
@@ -360,7 +355,6 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcvdsub_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libcvpx_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdav1d_plugin.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/libdca_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdcp_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libddummy_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdecomp_plugin.dylib
@@ -371,6 +365,7 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdemuxdump_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdiracsys_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdirectory_demux_plugin.dylib
+ Resources/SLPlugin.app/Contents/Frameworks/plugins/libdmxmus_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdolby_surround_decoder_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdummy_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/libdvbsub_plugin.dylib
@@ -441,7 +436,6 @@ execute_process(
Resources/SLPlugin.app/Contents/Frameworks/plugins/libkeychain_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblibass_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblibbluray_plugin.dylib
- Resources/SLPlugin.app/Contents/Frameworks/plugins/liblibmpeg2_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblive555_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblogger_plugin.dylib
Resources/SLPlugin.app/Contents/Frameworks/plugins/liblogo_plugin.dylib
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 429dc57af3..124b7a2cd0 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-7.2.3
+26.1.1
diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake
index 5aadc51869..b8c8af6234 100644
--- a/indra/newview/ViewerInstall.cmake
+++ b/indra/newview/ViewerInstall.cmake
@@ -208,7 +208,7 @@ if (LINUX)
install(FILES
${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so
${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13
- ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13.33
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libfmod.so.13.34
DESTINATION ${_LIB})
endif (USE_FMODSTUDIO)
endif (LINUX)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ecea9a3238..3648a40412 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -663,7 +663,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/vawp/index.html</string>
+ <string>https://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/vawp/index.html</string>
</map>
<!--AvatarBakedTextureUploadTimeout is in use by QA-->
<key>AvatarBakedTextureUploadTimeout</key>
@@ -677,6 +677,28 @@
<key>Value</key>
<integer>60</integer>
</map>
+ <key>AvatarRotateThresholdSlow</key>
+ <map>
+ <key>Comment</key>
+ <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving slowly (degrees)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <integer>60</integer>
+ </map>
+ <key>AvatarRotateThresholdFast</key>
+ <map>
+ <key>Comment</key>
+ <string>Angle between avatar facing and camera facing at which avatar turns to face same direction as camera, when moving fast (degrees)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <integer>2</integer>
+ </map>
<key>AvatarPhysics</key>
<map>
<key>Comment</key>
@@ -2467,7 +2489,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/guide.html</string>
+ <string>https://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/guide.html</string>
</map>
<key>DisableCameraConstraints</key>
<map>
@@ -2786,7 +2808,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://events.[GRID]/viewer/embed/event/[EVENT_ID]</string>
+ <string>https://events.[GRID]/viewer/embed/event/[EVENT_ID]</string>
</map>
<key>MainWorkTime</key>
<map>
@@ -3443,7 +3465,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://viewer-help.secondlife.com/[LANGUAGE]/[CHANNEL]/[VERSION]/[TOPIC][DEBUG_MODE]</string>
+ <string>https://viewer-help.secondlife.com/[LANGUAGE]/[CHANNEL]/[VERSION]/[TOPIC][DEBUG_MODE]</string>
</map>
<key>HowToHelpURL</key>
<map>
@@ -3454,7 +3476,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/howto/index.html</string>
+ <string>https://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/howto/index.html</string>
</map>
<key>HomeSidePanelURL</key>
<map>
@@ -4070,7 +4092,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://wiki.secondlife.com/wiki/[LSL_STRING]</string>
+ <string>https://wiki.secondlife.com/wiki/[LSL_STRING]</string>
</map>
<key>LSLFontSizeName</key>
<map>
@@ -4248,7 +4270,17 @@
<key>Value</key>
<string>0.0.0</string>
</map>
-
+ <key>PreviousInstallChecked</key>
+ <map>
+ <key>Comment</key>
+ <string>Whether viewer checked previous install on the same channel for NSIS</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>LimitDragDistance</key>
<map>
<key>Comment</key>
@@ -4495,13 +4527,24 @@
<key>MainloopTimeoutDefault</key>
<map>
<key>Comment</key>
- <string>Timeout duration for mainloop lock detection, in seconds.</string>
+ <string>Timeout duration for mainloop lock detection during teleports, login and logout, in seconds.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>60.0</real>
+ <real>120.0</real>
+ </map>
+ <key>MainloopTimeoutStarted</key>
+ <map>
+ <key>Comment</key>
+ <string>Timeout duration for mainloop lock detection when logged in and not teleporting, in seconds.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>60.0</real>
</map>
<key>MapScale</key>
<map>
@@ -7329,7 +7372,7 @@
<key>RenderAvatarCloth</key>
<map>
<key>Comment</key>
- <string>DEPRECATED - only false supported - Controls if avatars use wavy cloth</string>
+ <string>Controls if system avatar clothes use wavy cloth</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -7368,7 +7411,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>32.0</real>
+ <real>48.0</real>
</map>
<key>RenderCPUBasis</key>
<map>
@@ -9086,6 +9129,17 @@
<key>Value</key>
<integer>16</integer>
</map>
+ <key>RenderReflectionProbeShowTransparent</key>
+ <map>
+ <key>Comment</key>
+ <string>Show reflection probes in the transparency debug view</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderReflectionProbeVolumes</key>
<map>
<key>Comment</key>
@@ -11250,6 +11304,45 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ShowPGClassifieds</key>
+ <map>
+ <key>Comment</key>
+ <string>Display results of find classifieds that are flagged as general</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>HideFromEditor</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>ShowMatureClassifieds</key>
+ <map>
+ <key>Comment</key>
+ <string>Display results of find classifieds that are flagged as moderate</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>HideFromEditor</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ShowAdultClassifieds</key>
+ <map>
+ <key>Comment</key>
+ <string>Display results of find classifieds that are flagged as adult</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>HideFromEditor</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>ShowPGSims</key>
<map>
<key>Comment</key>
@@ -11289,6 +11382,54 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ShowPGEvents</key>
+ <map>
+ <key>Comment</key>
+ <string>Display results of find events that are flagged as general</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>HideFromEditor</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>ShowMatureGroups</key>
+ <map>
+ <key>Comment</key>
+ <string>Include groups that are flagged as mature to Search results</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>HideFromEditor</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>FindLandArea</key>
+ <map>
+ <key>Comment</key>
+ <string>Enables filtering of land search results by area</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>FindLandPrice</key>
+ <map>
+ <key>Comment</key>
+ <string>Enables filtering of land search results by price</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ShowNearClip</key>
<map>
<key>Comment</key>
@@ -13080,11 +13221,11 @@
<key>UpdaterShowReleaseNotes</key>
<map>
<key>Comment</key>
- <string>Enables displaying of the Release notes in a web floater after update.</string>
+ <string>Enables displaying of the Release notes in a web floater after update. 0 - don't show, 1 - show, 2 - show even for test viewers</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>Boolean</string>
+ <string>S32</string>
<key>Value</key>
<integer>1</integer>
</map>
@@ -13896,7 +14037,7 @@
<key>WatchdogEnabled</key>
<map>
<key>Comment</key>
- <string>Controls whether the thread watchdog timer is activated. Value is boolean. Set to -1 to defer to built-in default.</string>
+ <string>Controls whether the thread watchdog timer is activated. Value is S32. Set to -1 to defer to built-in default.</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
@@ -15308,7 +15449,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/404.html</string>
+ <string>https://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/404.html</string>
</map>
<key>OpenIMOnVoice</key>
<map>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
index aabbbac12a..1b1233790e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarV.glsl
@@ -28,6 +28,9 @@ uniform mat4 projection_matrix;
in vec3 position;
in vec3 normal;
in vec2 texcoord0;
+#ifdef AVATAR_CLOTH
+in vec4 clothing;
+#endif
mat4 getSkinnedTransform();
@@ -37,6 +40,15 @@ out vec3 vary_normal;
out vec2 vary_texcoord0;
out vec3 vary_position;
+#ifdef AVATAR_CLOTH
+uniform vec4 gWindDir;
+uniform vec4 gSinWaveParams;
+uniform vec4 gGravity;
+
+const vec4 gMinMaxConstants = vec4(1.0, 0.166666, 0.0083143, .00018542); // #minimax-generated coefficients
+const vec4 gPiConstants = vec4(0.159154943, 6.28318530, 3.141592653, 1.5707963); // # {1/2PI, 2PI, PI, PI/2}
+#endif
+
void main()
{
vary_texcoord0 = texcoord0;
@@ -46,16 +58,78 @@ void main()
vec4 pos_in = vec4(position.xyz, 1.0);
mat4 trans = getSkinnedTransform();
- pos.x = dot(trans[0], pos_in);
- pos.y = dot(trans[1], pos_in);
- pos.z = dot(trans[2], pos_in);
- pos.w = 1.0;
norm.x = dot(trans[0].xyz, normal);
norm.y = dot(trans[1].xyz, normal);
norm.z = dot(trans[2].xyz, normal);
norm = normalize(norm);
+#ifdef AVATAR_CLOTH
+ //wind
+ vec4 windEffect;
+ windEffect = vec4(dot(norm, gWindDir.xyz));
+ pos.x = dot(trans[2], pos_in);
+ windEffect.xyz = pos.x * vec3(0.015, 0.015, 0.015)
+ + windEffect.xyz;
+ windEffect.w = windEffect.w * 2.0 + 1.0; // move wind offset value to [-1, 3]
+ windEffect.w = windEffect.w*gWindDir.w; // modulate wind strength
+
+ windEffect.xyz = windEffect.xyz*gSinWaveParams.xyz
+ +vec3(gSinWaveParams.w); // use sin wave params to scale and offset input
+
+ //reduce to period of 2 PI
+ vec4 temp1, temp0, temp2, offsetPos;
+ temp1.xyz = windEffect.xyz * gPiConstants.x; // change input as multiple of [0-2PI] to [0-1]
+ temp0.y = mod(temp1.x,1.0);
+ windEffect.x = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI]
+ temp1.z = temp1.z - gPiConstants.w; // shift normal oscillation by PI/2
+ temp0.y = mod(temp1.z,1.0);
+
+ windEffect.z = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI]
+ windEffect.xyz = windEffect.xyz + vec3(-3.141592); // offset to [-PI, PI]
+
+ //calculate sinusoid
+ vec4 sinWave;
+ temp1 = windEffect*windEffect;
+ sinWave = -temp1 * gMinMaxConstants.w
+ + vec4(gMinMaxConstants.z); // y = -(x^2)/7! + 1/5!
+ sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.y); // y = -(x^2) * (-(x^2)/7! + 1/5!) + 1/3!
+ sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.x); // y = -(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1
+ sinWave = sinWave * windEffect; // y = x * (-(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1)
+
+ // sinWave.x holds sin(norm . wind_direction) with primary frequency
+ // sinWave.y holds sin(norm . wind_direction) with secondary frequency
+ // sinWave.z hold cos(norm . wind_direction) with primary frequency
+ sinWave.xyz = sinWave.xyz * gWindDir.w
+ + vec3(windEffect.w); // multiply by wind strength in gWindDir.w [-wind, wind]
+
+ // add normal facing bias offset [-wind,wind] -> [-wind - .25, wind + 1]
+ temp1 = vec4(dot(norm, gGravity.xyz)); // how much is this normal facing in direction of gGravity?
+ temp1 = min(temp1, vec4(0.2,0.0,0.0,0.0)); // clamp [-1, 1] to [-1, 0.2]
+ temp1 = temp1*vec4(1.5,0.0,0.0,0.0); // scale from [-1,0.2] to [-1.5, 0.3]
+ sinWave.x = sinWave.x + temp1.x; // add gGravity effect to sinwave (only primary frequency)
+ sinWave.xyz = sinWave.xyz * clothing.w; // modulate by clothing coverage
+
+ sinWave.xyz = max(sinWave.xyz, vec3(-1.0, -1.0, -1.0)); // clamp to underlying body shape
+ offsetPos = clothing * sinWave.x; // multiply wind effect times clothing displacement
+ temp2 = gWindDir*sinWave.z + vec4(norm,0); // calculate normal offset due to wind oscillation
+ offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+pos_in; // add to offset vertex position, and zero out effect from w
+ norm += temp2.xyz*2.0; // add sin wave effect on normals (exaggerated)
+
+ //renormalize normal (again)
+ norm = normalize(norm);
+
+ pos.x = dot(trans[0], offsetPos);
+ pos.y = dot(trans[1], offsetPos);
+ pos.z = dot(trans[2], offsetPos);
+ pos.w = 1.0;
+#else
+ pos.x = dot(trans[0], pos_in);
+ pos.y = dot(trans[1], pos_in);
+ pos.z = dot(trans[2], pos_in);
+ pos.w = 1.0;
+#endif
+
vary_normal = norm;
vary_position = pos.xyz;
diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp
deleted file mode 100644
index 7e0a873452..0000000000
--- a/indra/newview/fsfloatersearch.cpp
+++ /dev/null
@@ -1,3212 +0,0 @@
-/**
- * @file fsfloatersearch.cpp
- * @brief Firestorm Search Floater
- *
- * $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
- * Phoenix Firestorm Viewer Source Code
- * Copyright (C) 2012, Cinder Roxley <cinder.roxley@phoenixviewer.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
- * http://www.firestormviewer.org
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "fsfloatersearch.h"
-
-#include "lldispatcher.h"
-#include "llagent.h"
-#include "llavataractions.h"
-#include "llavatarname.h"
-#include "llavatarnamecache.h"
-#include "llavatarpropertiesprocessor.h"
-#include "llclassifiedflags.h"
-#include "llclassifiedinfo.h"
-#include "llcombobox.h"
-#include "lldateutil.h"
-#include "lleventflags.h"
-#include "lleventnotifier.h"
-#include "llfloaterreg.h"
-#include "llfloaterworldmap.h"
-#include "llgroupactions.h"
-#include "llgroupmgr.h"
-#include "llloadingindicator.h"
-#include "lllogininstance.h"
-#include "llnotificationsutil.h"
-#include "llpanelprofile.h"
-#include "llpanelprofileclassifieds.h"
-#include "llparcel.h"
-#include "llproductinforequest.h"
-#include "llqueryflags.h"
-#include "llregionhandle.h"
-#include "llremoteparcelrequest.h"
-#include "lltimer.h"
-#include "lltrans.h"
-#include "llviewercontrol.h"
-#include "llviewergenericmessage.h"
-#include "llviewernetwork.h"
-#include "llviewerregion.h"
-#include "llworldmapmessage.h"
-#include "message.h"
-#include <boost/tokenizer.hpp>
-#include <boost/algorithm/string.hpp>
-#include <string>
-
-#include <chrono>
-
-static const S32 MIN_SEARCH_STRING_SIZE = 2;
-static const S32 RESULT_PAGE_SIZE = 100;
-
-// (observeur) Hack to avoid Find to be called several times (due to a bug in llsearchcombobox)
-static std::chrono::time_point<std::chrono::system_clock> lastRequestTime;
-static const S32 REQUEST_MIN_ELAPSED_TIME = 500;
-
-std::string filterShortWords(std::string query_string);
-void fillSearchComboBox(LLSearchComboBox* search_combo);
-
-////////////////////////////////////////
-// Observer Classes //
-////////////////////////////////////////
-
-class FSSearchRemoteParcelInfoObserver : public LLRemoteParcelInfoObserver
-{
-public:
- FSSearchRemoteParcelInfoObserver(FSFloaterSearch* floater, bool for_events) : LLRemoteParcelInfoObserver(),
- mParent(floater),
- mForEvents(for_events)
- {}
-
- ~FSSearchRemoteParcelInfoObserver()
- {
- // remove any in-flight observers
- std::set<LLUUID>::iterator it;
- for (it = mParcelIDs.begin(); it != mParcelIDs.end(); ++it)
- {
- const LLUUID &id = *it;
- LLRemoteParcelInfoProcessor::getInstance()->removeObserver(id, this);
- }
- mParcelIDs.clear();
- }
-
- /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data)
- {
- if (mParent)
- {
- if (mForEvents)
- {
- mParent->displayEventParcelImage(parcel_data);
- }
- else
- {
- mParent->displayParcelDetails(parcel_data);
- }
- }
- mParcelIDs.erase(parcel_data.parcel_id);
- LLRemoteParcelInfoProcessor::getInstance()->removeObserver(parcel_data.parcel_id, this);
- }
-
- /*virtual*/ void setParcelID(const LLUUID& parcel_id)
- {
- if (!parcel_id.isNull())
- {
- mParcelIDs.insert(parcel_id);
- LLRemoteParcelInfoProcessor::getInstance()->addObserver(parcel_id, this);
- LLRemoteParcelInfoProcessor::getInstance()->sendParcelInfoRequest(parcel_id);
- }
- }
-
- /*virtual*/ void setErrorStatus(S32 status, const std::string& reason)
- {
- LL_WARNS("Search") << "Can't complete remote parcel request. Http Status: " << status << ". Reason : " << reason << LL_ENDL;
- }
-private:
- std::set<LLUUID> mParcelIDs;
- FSFloaterSearch* mParent;
- bool mForEvents;
-};
-
-///// Avatar Properties Observer /////
-
-class FSSearchAvatarPropertiesObserver : public LLAvatarPropertiesObserver
-{
-public:
- FSSearchAvatarPropertiesObserver(FSFloaterSearch* floater) : LLAvatarPropertiesObserver(),
- mParent(floater)
- {}
-
- ~FSSearchAvatarPropertiesObserver()
- {
- // remove any in-flight observers
- std::set<LLUUID>::iterator it;
- for (it = mAvatarIDs.begin(); it != mAvatarIDs.end(); ++it)
- {
- const LLUUID &id = *it;
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(id, this);
- }
- mAvatarIDs.clear();
- }
-
- void processProperties(void* data, EAvatarProcessorType type)
- {
- if (!data)
- return;
-
- if (APT_PROPERTIES == type)
- {
- LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
- if (avatar_data)
- {
- mParent->displayAvatarDetails(avatar_data);
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(avatar_data->avatar_id, this);
- }
- }
- else if (APT_PROPERTIES_LEGACY == type)
- {
- LLAvatarData avatar_data(*static_cast<LLAvatarLegacyData*>(data));
- mParent->displayAvatarDetails(&avatar_data);
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(avatar_data.avatar_id, this);
- }
- if (APT_CLASSIFIED_INFO == type)
- {
- LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
- if (c_info)
- {
- mParent->displayClassifiedDetails(c_info);
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(c_info->classified_id, this);
- std::string url = gAgent.getRegionCapability("SearchStatRequest");
- if (!url.empty())
- {
- LL_INFOS("Search") << "Classified stat request via capability" << LL_ENDL;
- LLSD body;
- body["classified_id"] = c_info->classified_id;
- LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, body, boost::bind(&LLPanelProfileClassified::handleSearchStatResponse, c_info->classified_id, _1));
- }
- }
- }
- }
-private:
- std::set<LLUUID> mAvatarIDs;
- FSFloaterSearch* mParent;
-};
-
-///// Group Info Observer /////
-
-class FSSearchGroupInfoObserver : public LLGroupMgrObserver
-{
-public:
- FSSearchGroupInfoObserver(const LLUUID& group_id, FSFloaterSearch* parent) :
- LLGroupMgrObserver(group_id),
- mParent(parent)
- {
- LLGroupMgr* groupmgr = LLGroupMgr::getInstance();
- if (!group_id.isNull() && groupmgr)
- {
- groupmgr->addObserver(this);
- mID = group_id;
- groupmgr->sendGroupPropertiesRequest(group_id);
- }
- }
-
- ~FSSearchGroupInfoObserver()
- {
- LLGroupMgr::getInstance()->removeObserver(this);
- }
-
- void changed(LLGroupChange gc)
- {
- if (gc == GC_PROPERTIES)
- {
- LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID);
- mParent->displayGroupDetails(group_data);
- LLGroupMgr::getInstance()->removeObserver(this);
- }
- }
-private:
- FSFloaterSearch* mParent;
- LLUUID mID;
-};
-
-///// Silly Classified Clickthrough Class /////
-class FSDispatchClassifiedClickThrough : public LLDispatchHandler
-{
-public:
- virtual bool operator()(
- const LLDispatcher* dispatcher,
- const std::string& key,
- const LLUUID& invoice,
- const sparam_t& strings)
- {
- if (strings.size() != 4) return false;
- LLUUID classified_id(strings[0]);
- S32 teleport_clicks = atoi(strings[1].c_str());
- S32 map_clicks = atoi(strings[2].c_str());
- S32 profile_clicks = atoi(strings[3].c_str());
-
- LLPanelProfileClassified::setClickThrough(
- classified_id, teleport_clicks, map_clicks, profile_clicks, false);
-
- return true;
- }
-};
-static FSDispatchClassifiedClickThrough sClassifiedClickThrough;
-
-SearchQuery::SearchQuery()
-: category("category", "")
-, query("query")
-{}
-
-////////////////////////////////////////
-// The floater itself //
-////////////////////////////////////////
-
-FSFloaterSearch::FSFloaterSearch(const Params& key)
-: LLFloater(key)
-{
- mRemoteParcelObserver = new FSSearchRemoteParcelInfoObserver(this, false);
- mRemoteParcelEventLocationObserver = new FSSearchRemoteParcelInfoObserver(this, true);
- mAvatarPropertiesObserver = new FSSearchAvatarPropertiesObserver(this);
- mEventNotifierConnection = gEventNotifier.setNewEventCallback(boost::bind(&FSFloaterSearch::displayEventDetails, this, boost::placeholders::_1));
-}
-
-FSFloaterSearch::~FSFloaterSearch()
-{
- mEventNotifierConnection.disconnect();
- delete mRemoteParcelObserver;
- delete mRemoteParcelEventLocationObserver;
- delete mAvatarPropertiesObserver;
- gGenericDispatcher.addHandler("classifiedclickthrough", nullptr);
-}
-
-// virtual
-void FSFloaterSearch::onOpen(const LLSD& key)
-{
- Params p(key);
- mPanelWeb->loadURL(p.search);
- if (key.has("query"))
- {
- mTabContainer->selectTabPanel(mPanelWeb);
- }
- else if (key.has("tab") && key["tab"].asString() == "groups")
- {
- mTabContainer->selectTabPanel(mPanelGroups);
- }
-
- FSSearchPanelBase* current_panel = dynamic_cast<FSSearchPanelBase*>(mTabContainer->getCurrentPanel());
- if (current_panel)
- {
- current_panel->focusDefaultElement();
- }
-}
-
-//virtual
-void FSFloaterSearch::onClose(bool app_quitting)
-{
- if (mTabContainer)
- {
- gSavedSettings.setS32("FSLastSearchTab", mTabContainer->getCurrentPanelIndex());
- }
-}
-
-bool FSFloaterSearch::postBuild()
-{
- childSetAction("people_profile_btn", boost::bind(&FSFloaterSearch::onBtnPeopleProfile, this));
- childSetAction("people_message_btn", boost::bind(&FSFloaterSearch::onBtnPeopleIM, this));
- childSetAction("people_friend_btn", boost::bind(&FSFloaterSearch::onBtnPeopleFriend, this));
- childSetAction("group_profile_btn", boost::bind(&FSFloaterSearch::onBtnGroupProfile, this));
- childSetAction("group_message_btn", boost::bind(&FSFloaterSearch::onBtnGroupChat, this));
- childSetAction("group_join_btn", boost::bind(&FSFloaterSearch::onBtnGroupJoin, this));
- childSetAction("event_reminder_btn", boost::bind(&FSFloaterSearch::onBtnEventReminder, this));
- childSetAction("teleport_btn", boost::bind(&FSFloaterSearch::onBtnTeleport, this));
- childSetAction("map_btn", boost::bind(&FSFloaterSearch::onBtnMap, this));
- resetVerbs();
-
- mPanelPeople = findChild<FSPanelSearchPeople>("panel_ls_people");
- mPanelGroups = findChild<FSPanelSearchGroups>("panel_ls_groups");
- mPanelPlaces = findChild<FSPanelSearchPlaces>("panel_ls_places");
- mPanelEvents = findChild<FSPanelSearchEvents>("panel_ls_events");
- mPanelLand = findChild<FSPanelSearchLand>("panel_ls_land");
- mPanelClassifieds = findChild<FSPanelSearchClassifieds>("panel_ls_classifieds");
- mPanelWeb = findChild<FSPanelSearchWeb>("panel_ls_web");
-
- mDetailsPanel = getChild<LLPanel>("panel_ls_details");
- mDetailTitle = getChild<LLTextEditor>("title");
- mDetailDesc = getChild<LLTextEditor>("desc");
- mDetailAux1 = getChild<LLTextEditor>("aux1");
- mDetailAux2 = getChild<LLTextEditor>("aux2");
- mDetailLocation = getChild<LLTextEditor>("location");
- mDetailSnapshot = getChild<LLTextureCtrl>("snapshot");
- mDetailSnapshotParcel = getChild<LLTextureCtrl>("snapshot_parcel");
- mDetailMaturity = getChild<LLIconCtrl>("maturity_icon");
- mTabContainer = getChild<LLTabContainer>("ls_tabs");
-
- mTabContainer->setCommitCallback(boost::bind(&FSFloaterSearch::onTabChange, this));
-
- flushDetails();
-
- mDetailsPanel->setVisible(false);
-
- mHasSelection = false;
-
- if (!mTabContainer->selectTab(gSavedSettings.getS32("FSLastSearchTab")))
- {
- mTabContainer->selectFirstTab();
- }
-
- return TRUE;
-}
-
-void FSFloaterSearch::onTabChange()
-{
- LL_INFOS() << "onTabChange()()" << LL_ENDL;
-
- flushDetails();
-
- LLPanel* active_panel = mTabContainer->getCurrentPanel();
-
- if (active_panel == mPanelWeb)
- {
- mDetailsPanel->setVisible(false);
- mPanelWeb->resetFocusOnLoad();
- }
- else if (active_panel == mPanelPeople)
- {
- mDetailsPanel->setVisible(mHasSelection);
- }
-
- if (active_panel == mPanelPeople || active_panel == mPanelGroups)
- {
- mDetailSnapshotParcel->setVisible(FALSE);
- mDetailSnapshot->setVisible(TRUE);
- }
- else if (active_panel == mPanelPlaces || active_panel == mPanelLand ||
- active_panel == mPanelEvents || active_panel == mPanelClassifieds)
- {
- mDetailSnapshot->setVisible(FALSE);
- mDetailSnapshotParcel->setVisible(TRUE);
- }
-}
-
-//static
-template <class T>
-T* FSFloaterSearch::getSearchPanel(const std::string& panel_name)
-{
- FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search");
- if (search_instance && search_instance->mTabContainer)
- {
- return dynamic_cast<T*>(search_instance->mTabContainer->getPanelByName(panel_name));
- }
- else
- {
- return nullptr;
- }
-}
-
-void FSFloaterSearch::onSelectedItem(const LLUUID& selected_item, ESearchCategory type)
-{
- LL_INFOS() << "onSelectedItem()" << LL_ENDL;
-
- if (!selected_item.isNull())
- {
- mSelectedID = selected_item;
- resetVerbs();
- flushDetails();
- switch (type)
- {
- case SC_AVATAR:
- {
- LLAvatarPropertiesProcessor::getInstance()->addObserver(selected_item, mAvatarPropertiesObserver);
- LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(selected_item);
- }
- break;
- case SC_GROUP:
- mGroupPropertiesRequest = new FSSearchGroupInfoObserver(selected_item, this);
- break;
- case SC_PLACE:
- mRemoteParcelObserver->setParcelID(selected_item);
- break;
- case SC_CLASSIFIED:
- LLAvatarPropertiesProcessor::getInstance()->addObserver(selected_item, mAvatarPropertiesObserver);
- LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(selected_item);
- gGenericDispatcher.addHandler("classifiedclickthrough", &sClassifiedClickThrough);
- break;
- }
- setLoadingProgress(true);
- }
-}
-
-void FSFloaterSearch::onSelectedEvent(const S32 selected_event)
-{
- LL_INFOS() << "onSelectedEvent()()" << LL_ENDL;
-
- resetVerbs();
- flushDetails();
-
- gMessageSystem->newMessageFast(_PREHASH_EventInfoRequest);
- gMessageSystem->nextBlockFast(_PREHASH_AgentData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID);
- gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
- gMessageSystem->nextBlockFast(_PREHASH_EventData);
- gMessageSystem->addU32Fast(_PREHASH_EventID, selected_event);
- gAgent.sendReliableMessage();
-}
-
-void FSFloaterSearch::displayParcelDetails(const LLParcelData& parcel_data)
-{
- S32 region_x;
- S32 region_y;
- S32 region_z;
- region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS;
- region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS;
- region_z = ll_round(parcel_data.global_z);
- // HACK: Flag 0x2 == adult region,
- // Flag 0x1 == mature region, otherwise assume PG
- if (parcel_data.flags & 0x2)
- {
- mDetailMaturity->setValue("Parcel_R_Dark");
- }
- else if (parcel_data.flags & 0x1)
- {
- mDetailMaturity->setValue("Parcel_M_Dark");
- }
- else
- {
- mDetailMaturity->setValue("Parcel_PG_Dark");
- }
-
- LLStringUtil::format_map_t map;
- map["DWELL"] = llformat("%.0f", (F64)parcel_data.dwell);
- map["AREA"] = llformat("%d m²", parcel_data.actual_area);
- map["LOCATION"] = llformat("%s (%d, %d, %d)", parcel_data.sim_name.c_str(), region_x, region_y, region_z);
-
- mParcelGlobal = LLVector3d(parcel_data.global_x, parcel_data.global_y, parcel_data.global_z);
- mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_places" || mTabContainer->getCurrentPanel()->getName() == "panel_ls_land");
- mHasSelection = true;
- mDetailMaturity->setVisible(true);
- mDetailTitle->setValue(parcel_data.name);
- mDetailDesc->setValue(parcel_data.desc);
- mDetailAux1->setValue(getString("string.traffic", map));
- mDetailAux2->setValue(getString("string.area", map));
- mDetailLocation->setValue(getString("string.location", map));
- mDetailSnapshotParcel->setValue(parcel_data.snapshot_id);
- childSetVisible("teleport_btn", true);
- childSetVisible("map_btn", true);
- setLoadingProgress(false);
-}
-
-void FSFloaterSearch::displayAvatarDetails(LLAvatarData* avatar_data)
-{
- if (avatar_data)
- {
- LLStringUtil::format_map_t map;
- map["AGE"] = LLDateUtil::ageFromDate(avatar_data->born_on, LLDate::now());
- if (avatar_data->partner_id.notNull())
- {
- map["PARTNER"] = LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString();
- mDetailAux2->setValue(getString("string.partner", map));
- }
-
- mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_people");
- mHasSelection = true;
- mDetailTitle->setValue(LLTrans::getString("LoadingData"));
- mDetailDesc->setValue(avatar_data->about_text);
- mDetailSnapshot->setValue(avatar_data->image_id);
- mDetailAux1->setValue(avatar_data->hide_age ? "" : getString("string.age", map));
- LLAvatarNameCache::get(avatar_data->avatar_id, boost::bind(&FSFloaterSearch::avatarNameUpdatedCallback,this, _1, _2));
- childSetVisible("people_profile_btn", true);
- childSetVisible("people_message_btn", true);
- childSetVisible("people_friend_btn", true);
- getChildView("people_friend_btn")->setEnabled(!LLAvatarActions::isFriend(avatar_data->avatar_id));
- }
-}
-
-void FSFloaterSearch::displayGroupDetails(LLGroupMgrGroupData*& group_data)
-{
- if (group_data)
- {
- LLStringUtil::format_map_t map;
- map["MEMBER_COUNT"] = llformat("%d",group_data->mMemberCount);
- map["FOUNDER"] = LLSLURL("agent", group_data->mFounderID, "inspect").getSLURLString();
-
- mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_groups");
- mHasSelection = true;
- mDetailTitle->setValue(LLTrans::getString("LoadingData"));
- mDetailDesc->setValue(group_data->mCharter);
- mDetailSnapshot->setValue(group_data->mInsigniaID);
- mDetailAux1->setValue(getString("string.members", map));
- mDetailAux2->setValue(getString("string.founder", map));
- LLGroupData agent_gdatap;
- bool is_member = gAgent.getGroupData(getSelectedID(),agent_gdatap) || gAgent.isGodlike();
- bool join_btn_enabled = !is_member && group_data->mOpenEnrollment;
- childSetVisible("group_profile_btn", true);
- childSetVisible("group_message_btn", true);
- childSetVisible("group_join_btn", true);
- getChildView("group_join_btn")->setEnabled(join_btn_enabled);
- getChildView("group_message_btn")->setEnabled(is_member);
- gCacheName->getGroup(getSelectedID(), boost::bind(&FSFloaterSearch::groupNameUpdatedCallback, this, _1, _2, _3));
- }
-}
-
-void FSFloaterSearch::displayClassifiedDetails(LLAvatarClassifiedInfo*& c_info)
-{
- if (c_info)
- {
- if (c_info->flags & CLASSIFIED_FLAG_MATURE)
- {
- mDetailMaturity->setValue("Parcel_M_Dark");
- }
- else
- {
- mDetailMaturity->setValue("Parcel_PG_Dark");
- }
-
- LLStringUtil::format_map_t map;
- map["LISTING_PRICE"] = llformat("L$%d", c_info->price_for_listing);
- map["SLURL"] = LLSLURL("parcel", c_info->parcel_id, "about").getSLURLString();
-
- mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_classifieds");
- mHasSelection = true;
- mDetailMaturity->setVisible(true);
- mParcelGlobal = c_info->pos_global;
- mDetailTitle->setValue(c_info->name);
- mDetailDesc->setValue(c_info->description);
- mDetailSnapshotParcel->setValue(c_info->snapshot_id);
- mDetailAux1->setValue(getString("string.listing_price", map));
- mDetailLocation->setValue(getString("string.slurl", map));
- childSetVisible("teleport_btn", true);
- childSetVisible("map_btn", true);
- setLoadingProgress(false);
- }
-}
-
-bool FSFloaterSearch::displayEventDetails(LLEventStruct event)
-{
- if (event.flags == EVENT_FLAG_ADULT)
- {
- mDetailMaturity->setValue("Parcel_R_Dark");
- }
- else if (event.flags == EVENT_FLAG_MATURE)
- {
- mDetailMaturity->setValue("Parcel_M_Dark");
- }
- else
- {
- mDetailMaturity->setValue("Parcel_PG_Dark");
- }
-
- S32 region_x;
- S32 region_y;
- S32 region_z;
- region_x = (S64)ll_round(event.globalPos.mdV[VX]) % REGION_WIDTH_UNITS;
- region_y = (S64)ll_round(event.globalPos.mdV[VY]) % REGION_WIDTH_UNITS;
- region_z = (S32)ll_round(event.globalPos.mdV[VZ]);
- LLStringUtil::format_map_t map;
- map["DURATION"] = llformat("%d:%.2d", event.duration / 60, event.duration % 60);
- map["LOCATION"] = llformat("%s (%d, %d, %d)", event.simName.c_str(), region_x, region_y, region_z);
- if (event.cover > 0)
- {
- map["COVERCHARGE"] = llformat("L$%d", event.cover);
- mDetailAux2->setValue(getString("string.covercharge", map));
- }
-
- mParcelGlobal = event.globalPos;
- mEventID = event.eventId;
- mDetailsPanel->setVisible(mTabContainer->getCurrentPanel()->getName() == "panel_ls_events");
- mHasSelection = true;
- mDetailMaturity->setVisible(true);
- mDetailTitle->setValue(event.eventName);
- mDetailDesc->setValue(event.desc);
- mDetailAux1->setValue(getString("string.duration", map));
- mDetailLocation->setValue(getString("string.location", map));
- mDetailSnapshotParcel->setValue(LLUUID::null);
- childSetVisible("teleport_btn", true);
- childSetVisible("map_btn", true);
- childSetVisible("event_reminder_btn", true);
-
- LLWorldMapMessage::getInstance()->sendNamedRegionRequest(event.simName, boost::bind(&FSFloaterSearch::regionHandleCallback, this, _1, event.globalPos), "", false);
- return true;
-}
-
-void FSFloaterSearch::regionHandleCallback(U64 region_handle, LLVector3d pos_global)
-{
- std::string url = gAgent.getRegionCapability("RemoteParcelRequest");
- if (!url.empty())
- {
- auto region_origin = from_region_handle(region_handle);
- LLVector3 pos_region(LLVector3(pos_global - region_origin));
-
- LLRemoteParcelInfoProcessor::getInstance()->requestRegionParcelInfo(url,
- LLUUID::null, pos_region, pos_global, mRemoteParcelEventLocationObserver->getObserverHandle());
- }
- else
- {
- setLoadingProgress(false);
- }
-}
-
-void FSFloaterSearch::displayEventParcelImage(const LLParcelData& parcel_data)
-{
- mDetailSnapshotParcel->setValue(parcel_data.snapshot_id);
- setLoadingProgress(false);
-}
-
-void FSFloaterSearch::avatarNameUpdatedCallback(const LLUUID& id, const LLAvatarName& av_name)
-{
- if (id == getSelectedID())
- {
- mDetailTitle->setValue(av_name.getCompleteName());
- setLoadingProgress(false);
- }
- // Otherwise possibly a request for an older selection, ignore it.
-}
-
-void FSFloaterSearch::groupNameUpdatedCallback(const LLUUID& id, const std::string& name, bool is_group)
-{
- if (id == getSelectedID())
- {
- mDetailTitle->setValue( LLSD(name) );
- setLoadingProgress(false);
- }
- // Otherwise possibly a request for an older selection, ignore it.
-}
-
-void FSFloaterSearch::setLoadingProgress(bool started)
-{
- LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("loading");
-
- indicator->setVisible(started);
-
- if (started)
- {
- indicator->start();
- }
- else
- {
- indicator->stop();
- }
-}
-
-void FSFloaterSearch::resetVerbs()
-{
- childSetVisible("people_profile_btn", false);
- childSetVisible("people_message_btn", false);
- childSetVisible("people_friend_btn", false);
- childSetVisible("group_profile_btn", false);
- childSetVisible("group_message_btn", false);
- childSetVisible("group_join_btn", false);
- childSetVisible("event_reminder_btn", false);
- childSetVisible("teleport_btn", false);
- childSetVisible("map_btn", false);
-}
-
-void FSFloaterSearch::flushDetails()
-{
- LL_INFOS() << "flushDetails()" << LL_ENDL;
- mDetailTitle->setValue("");
- mDetailDesc->setValue("");
- mDetailAux1->setValue("");
- mDetailAux2->setValue("");
- mDetailLocation->setValue("");
- mDetailSnapshot->setValue(LLSD());
- mDetailMaturity->setVisible(false);
- mParcelGlobal.setZero();
-}
-
-void FSFloaterSearch::onBtnPeopleProfile()
-{
- LLAvatarActions::showProfile(getSelectedID());
-}
-
-void FSFloaterSearch::onBtnPeopleIM()
-{
- LLAvatarActions::startIM(getSelectedID());
-}
-
-void FSFloaterSearch::onBtnPeopleFriend()
-{
- LLAvatarActions::requestFriendshipDialog(getSelectedID());
-}
-
-void FSFloaterSearch::onBtnGroupProfile()
-{
- LLGroupActions::show(getSelectedID());
-}
-
-void FSFloaterSearch::onBtnGroupChat()
-{
- LLGroupActions::startIM(getSelectedID());
-}
-
-void FSFloaterSearch::onBtnGroupJoin()
-{
- LLGroupActions::join(getSelectedID());
-}
-
-void FSFloaterSearch::onBtnTeleport()
-{
- if (!mParcelGlobal.isExactlyZero())
- {
- gAgent.teleportViaLocationLookAt(mParcelGlobal);
- LLFloaterWorldMap::getInstance()->trackLocation(mParcelGlobal);
- /// <FS:CR> What should we do when when we teleport? The default (1) is to close the floater,
- /// the user may elect to minimize the floater (2), or to do nothing (any other setting)
- static LLCachedControl<U32> teleport_action(gSavedSettings, "FSLegacySearchActionOnTeleport");
- if (teleport_action == 1)
- {
- closeFloater();
- }
- else if (teleport_action == 2)
- {
- setMinimized(TRUE);
- }
- }
-}
-
-void FSFloaterSearch::onBtnMap()
-{
- if (!mParcelGlobal.isExactlyZero())
- {
- LLFloaterWorldMap::getInstance()->trackLocation(mParcelGlobal);
- LLFloaterReg::showInstance("world_map", "center");
- }
-}
-
-void FSFloaterSearch::onBtnEventReminder()
-{
- gEventNotifier.add(mEventID);
-}
-
-////////////////////////////////////////
-// People Search Panel //
-////////////////////////////////////////
-
-static LLPanelInjector<FSPanelSearchPeople> t_panel_fs_search_people("panel_ls_people");
-
-FSPanelSearchPeople::FSPanelSearchPeople() : FSSearchPanelBase()
-, mQueryID(nullptr)
-, mStartSearch(0)
-, mResultsReceived(0)
-, mResultsContent()
-, mAvatarNameCallbackConnection()
-{
-}
-
-FSPanelSearchPeople::~FSPanelSearchPeople()
-{
- if (mAvatarNameCallbackConnection.connected())
- {
- mAvatarNameCallbackConnection.disconnect();
- }
-}
-
-bool FSPanelSearchPeople::postBuild()
-{
- mSearchComboBox = findChild<LLSearchComboBox>("people_edit");
- mSearchResults = findChild<LLScrollListCtrl>("search_results_people");
- if (mSearchComboBox)
- {
- mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchPeople::onBtnFind, this));
- fillSearchComboBox(mSearchComboBox);
- }
- if (mSearchResults)
- {
- mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchPeople::onSelectItem, this));
- mSearchResults->setEnabled(FALSE);
- mSearchResults->setCommentText(LLTrans::getString("no_results"));
- mSearchResults->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
- }
-
- childSetAction("people_next", boost::bind(&FSPanelSearchPeople::onBtnNext, this));
- childSetAction("people_back", boost::bind(&FSPanelSearchPeople::onBtnBack, this));
- getChildView("people_next")->setEnabled(FALSE);
- getChildView("people_back")->setEnabled(FALSE);
-
- return TRUE;
-}
-
-void FSPanelSearchPeople::focusDefaultElement()
-{
- mSearchComboBox->focusTextEntry();
-}
-
-void FSPanelSearchPeople::find()
-{
- std::string text = mSearchComboBox->getSimple();
- boost::trim(text);
-
- if (text.size() <= MIN_SEARCH_STRING_SIZE)
- {
- mSearchResults->setCommentText(LLTrans::getString("search_short"));
- return;
- }
-
- if (LLUUID::validate(text))
- {
- LLUUID id(text);
-
- mSearchResults->deleteAllItems();
- mSearchResults->setCommentText(LLTrans::getString("searching"));
- mResultsReceived = 0;
- mNumResultsReturned = 0;
-
- if (mAvatarNameCallbackConnection.connected())
- {
- mAvatarNameCallbackConnection.disconnect();
- }
- mAvatarNameCallbackConnection = LLAvatarNameCache::get(id, boost::bind(&FSPanelSearchPeople::onAvatarNameCallback, this, _1, _2));
-
- return;
- }
-
- LLStringUtil::replaceChar(text, '.', ' ');
-
- mResultsReceived = 0;
- if (mQueryID.notNull())
- {
- mQueryID.setNull();
- }
- mQueryID.generate();
-
- if (mStartSearch < 0)
- {
- mStartSearch = 0;
- }
-
- gMessageSystem->newMessage("DirFindQuery");
- gMessageSystem->nextBlock("AgentData");
- gMessageSystem->addUUID("AgentID", gAgentID);
- gMessageSystem->addUUID("SessionID", gAgentSessionID);
- gMessageSystem->nextBlock("QueryData");
- gMessageSystem->addUUID("QueryID", getQueryID());
- gMessageSystem->addString("QueryText", text);
- gMessageSystem->addU32("QueryFlags", DFQ_PEOPLE);
- gMessageSystem->addS32("QueryStart", mStartSearch);
- gAgent.sendReliableMessage();
- LL_INFOS("Search") << "Firing off search request: " << getQueryID() << LL_ENDL;
-
- mSearchResults->deleteAllItems();
- mSearchResults->setCommentText(LLTrans::getString("searching"));
- mNumResultsReturned = 0;
-}
-
-void FSPanelSearchPeople::onBtnFind()
-{
- std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
- auto elapsed = now - lastRequestTime;
- U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
- if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return;
- lastRequestTime = now;
-
- std::string text = mSearchComboBox->getSimple();
-
- if (!text.empty())
- {
- LLSearchHistory::getInstance()->addEntry(text);
- }
-
- resetSearch();
-
- find();
-}
-
-void FSPanelSearchPeople::onBtnNext()
-{
- mStartSearch += RESULT_PAGE_SIZE;
- getChildView("people_back")->setEnabled(TRUE);
-
- find();
-}
-
-void FSPanelSearchPeople::onBtnBack()
-{
- mStartSearch -= RESULT_PAGE_SIZE;
- getChildView("people_back")->setEnabled(mStartSearch > 0);
-
- find();
-}
-
-void FSPanelSearchPeople::resetSearch()
-{
- mStartSearch = 0;
- getChildView("people_back")->setEnabled(FALSE);
- getChildView("people_next")->setEnabled(FALSE);
-}
-
-S32 FSPanelSearchPeople::showNextButton(S32 rows)
-{
- bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE);
- getChildView("people_next")->setEnabled(show_next_button);
- if (show_next_button)
- {
- rows -= (mResultsReceived - RESULT_PAGE_SIZE);
- }
- return rows;
-}
-
-void FSPanelSearchPeople::onSelectItem()
-{
- if (!mSearchResults)
- {
- return;
- }
- FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search");
- if (search_instance)
- {
- search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_AVATAR);
- }
-}
-
-// static
-void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**)
-{
- LLUUID query_id;
- std::string first_name;
- std::string last_name;
- LLUUID agent_id;
-
- msg->getUUIDFast(_PREHASH_QueryData, _PREHASH_QueryID, query_id);
- msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
-
- // This result is not for us.
- if (agent_id != gAgentID)
- {
- return;
- }
- LL_INFOS("Search") << "received search results - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL;
-
- FSPanelSearchPeople* self = FSFloaterSearch::getSearchPanel<FSPanelSearchPeople>("panel_ls_people");
-
- // floater is closed or these are not results from our last request
- if (!self || query_id != self->getQueryID())
- {
- return;
- }
-
- LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_people");
-
- if (self->mNumResultsReturned++ == 0)
- {
- search_results->deleteAllItems();
- }
-
- // Check for status messages
- if (msg->getNumberOfBlocks("StatusData"))
- {
- U32 status;
- msg->getU32("StatusData", "Status", status);
- if (status & STATUS_SEARCH_PLACES_FOUNDNONE)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("people_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_SHORTSTRING)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_short"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_BANNEDWORD)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_banned"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_disabled"));
- return;
- }
- }
-
- bool found_one = false;
- S32 num_new_rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies);
- if (num_new_rows == 0 && self->mResultsReceived == 0)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("people_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
-
- self->mResultsReceived += num_new_rows;
- num_new_rows = self->showNextButton(num_new_rows);
-
- for (S32 i = 0; i < num_new_rows; i++)
- {
- msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_FirstName, first_name, i);
- msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_LastName, last_name, i);
- msg->getUUIDFast( _PREHASH_QueryReplies, _PREHASH_AgentID, agent_id, i);
- //msg->getU8Fast( _PREHASH_QueryReplies, _PREHASH_Online, online, i);
-
- if (agent_id.isNull())
- {
- LL_INFOS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL;
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("people_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
- else
- {
- LL_DEBUGS("Search") << "Got: " << first_name << " " << last_name << " AgentID: " << agent_id << LL_ENDL;
- search_results->setEnabled(TRUE);
- found_one = true;
-
- std::string avatar_name;
- avatar_name = LLCacheName::buildFullName(first_name, last_name);
-
- LLSD content;
- LLSD element;
-
- element["id"] = agent_id;
-
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "icon_avatar_offline.tga";
-
- element["columns"][1]["column"] = "username";
- element["columns"][1]["value"] = avatar_name;
-
- content["name"] = avatar_name;
-
- search_results->addElement(element, ADD_BOTTOM);
- self->mResultsContent[agent_id.asString()] = content;
- }
- }
- if (found_one)
- {
- search_results->selectFirstItem();
- search_results->setFocus(TRUE);
- self->onSelectItem();
- }
-}
-
-void FSPanelSearchPeople::onAvatarNameCallback(const LLUUID& id, const LLAvatarName& av_name)
-{
- if (mAvatarNameCallbackConnection.connected())
- {
- mAvatarNameCallbackConnection.disconnect();
- }
-
- LLScrollListCtrl* search_results = getChild<LLScrollListCtrl>("search_results_people");
-
- if (av_name.getAccountName() != "(?\?\?).(?\?\?)")
- {
- LLSD content;
- LLSD data;
- data["id"] = id;
-
- data["columns"][0]["column"] = "icon";
- data["columns"][0]["type"] = "icon";
- data["columns"][0]["value"] = "icon_avatar_offline.tga";
-
- data["columns"][1]["name"] = "username";
- data["columns"][1]["value"] = av_name.getUserName();
-
- content["name"] = av_name.getUserName();
-
- search_results->addElement(data);
-
- mResultsContent[id.asString()] = content;
- mResultsReceived = 1;
- mNumResultsReturned = 1;
-
- search_results->setEnabled(TRUE);
- search_results->selectFirstItem();
- search_results->setFocus(TRUE);
- onSelectItem();
- }
- else
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = getChild<LLUICtrl>("people_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
-}
-
-////////////////////////////////////////
-// Groups Search Panel //
-////////////////////////////////////////
-
-static LLPanelInjector<FSPanelSearchGroups> t_panel_fs_search_groups("panel_ls_groups");
-
-FSPanelSearchGroups::FSPanelSearchGroups() : FSSearchPanelBase()
-, mQueryID(nullptr)
-, mStartSearch(0)
-, mResultsReceived(0)
-, mResultsContent()
-{
-}
-
-FSPanelSearchGroups::~FSPanelSearchGroups()
-{
-}
-
-bool FSPanelSearchGroups::postBuild()
-{
- mSearchComboBox = findChild<LLSearchComboBox>("groups_edit");
- mSearchResults = findChild<LLScrollListCtrl>("search_results_groups");
- if (mSearchComboBox)
- {
- mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchGroups::onBtnFind, this));
- fillSearchComboBox(mSearchComboBox);
- }
- if (mSearchResults)
- {
- mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchGroups::onSelectItem, this));
- mSearchResults->setEnabled(FALSE);
- mSearchResults->setCommentText(LLTrans::getString("no_results"));
- }
-
- childSetAction("groups_next", boost::bind(&FSPanelSearchGroups::onBtnNext, this));
- childSetAction("groups_back", boost::bind(&FSPanelSearchGroups::onBtnBack, this));
- getChildView("groups_next")->setEnabled(FALSE);
- getChildView("groups_back")->setEnabled(FALSE);
-
- lastRequestTime = std::chrono::system_clock::now();
-
- return TRUE;
-}
-
-void FSPanelSearchGroups::focusDefaultElement()
-{
- mSearchComboBox->focusTextEntry();
-}
-
-void FSPanelSearchGroups::find()
-{
- std::string text = filterShortWords(mSearchComboBox->getSimple());
- if (text.size() == 0)
- {
- mSearchResults->setCommentText(LLTrans::getString("search_short"));
- return;
- }
-
- static LLUICachedControl<bool> inc_pg("ShowPGSims", 1);
- static LLUICachedControl<bool> inc_mature("ShowMatureSims", 0);
- static LLUICachedControl<bool> inc_adult("ShowAdultSims", 0);
- if (!(inc_pg || inc_mature || inc_adult))
- {
- LLNotificationsUtil::add("NoContentToSearch");
- return;
- }
- U32 scope = 0;
- if (gAgent.wantsPGOnly())
- {
- scope |= DFQ_PG_SIMS_ONLY;
- }
- bool adult_enabled = gAgent.canAccessAdult();
- bool mature_enabled = gAgent.canAccessMature();
- if (inc_pg)
- {
- scope |= DFQ_INC_PG;
- }
- if (inc_mature && mature_enabled)
- {
- scope |= DFQ_INC_MATURE;
- }
- if (inc_adult && adult_enabled)
- {
- scope |= DFQ_INC_ADULT;
- }
- scope |= DFQ_GROUPS;
-
- mResultsReceived = 0;
- if (mQueryID.notNull())
- {
- mQueryID.setNull();
- }
- mQueryID.generate();
-
- if (mStartSearch < 0)
- {
- mStartSearch = 0;
- }
-
- gMessageSystem->newMessage("DirFindQuery");
- gMessageSystem->nextBlock("AgentData");
- gMessageSystem->addUUID("AgentID", gAgentID);
- gMessageSystem->addUUID("SessionID", gAgentSessionID);
- gMessageSystem->nextBlock("QueryData");
- gMessageSystem->addUUID("QueryID", getQueryID());
- gMessageSystem->addString("QueryText", text);
- gMessageSystem->addU32("QueryFlags", scope);
- gMessageSystem->addS32("QueryStart", mStartSearch);
- gAgent.sendReliableMessage();
- LL_DEBUGS("Search") << "Firing off search request: " << getQueryID() << LL_ENDL;
-
- mSearchResults->deleteAllItems();
- mSearchResults->setCommentText(LLTrans::getString("searching"));
- mNumResultsReturned = 0;
-}
-
-void FSPanelSearchGroups::onBtnFind()
-{
- std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
- auto elapsed = now - lastRequestTime;
- U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
- if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return;
- lastRequestTime = now;
-
- std::string text = mSearchComboBox->getSimple();
- if (!text.empty())
- {
- LLSearchHistory::getInstance()->addEntry(text);
- }
-
- resetSearch();
-
- find();
-}
-
-void FSPanelSearchGroups::onBtnNext()
-{
- mStartSearch += RESULT_PAGE_SIZE;
- getChildView("groups_back")->setEnabled(TRUE);
-
- find();
-}
-
-void FSPanelSearchGroups::onBtnBack()
-{
- mStartSearch -= RESULT_PAGE_SIZE;
- getChildView("groups_back")->setEnabled(mStartSearch > 0);
-
- find();
-}
-
-void FSPanelSearchGroups::resetSearch()
-{
- mStartSearch = 0;
- getChildView("groups_back")->setEnabled(FALSE);
- getChildView("groups_next")->setEnabled(FALSE);
-}
-
-S32 FSPanelSearchGroups::showNextButton(S32 rows)
-{
- bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE);
- getChildView("groups_next")->setEnabled(show_next_button);
- if (show_next_button)
- {
- rows -= (mResultsReceived - RESULT_PAGE_SIZE);
- }
- return rows;
-}
-
-void FSPanelSearchGroups::onSelectItem()
-{
- if (!mSearchResults)
- {
- return;
- }
- FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search");
- if (search_instance)
- {
- search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_GROUP);
- }
-}
-
-// static
-void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**)
-{
- LLUUID query_id;
- LLUUID group_id;
- LLUUID agent_id;
- std::string group_name;
- S32 members;
- F32 search_order;
-
- msg->getUUIDFast( _PREHASH_QueryData, _PREHASH_QueryID, query_id);
- msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, agent_id);
-
- // Not for us
- if (agent_id != gAgentID)
- {
- return;
- }
- LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL;
-
- FSPanelSearchGroups* self = FSFloaterSearch::getSearchPanel<FSPanelSearchGroups>("panel_ls_groups");
-
- // floater is closed or these are not results from our last request
- if (!self || query_id != self->mQueryID)
- {
- return;
- }
-
- LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_groups");
-
- // Clear "Searching" label on first results
- if (self->mNumResultsReturned++ == 0)
- {
- search_results->deleteAllItems();
- }
-
- // Check for status messages
- if (msg->getNumberOfBlocks("StatusData"))
- {
- U32 status;
- msg->getU32("StatusData", "Status", status);
- if (status & STATUS_SEARCH_PLACES_FOUNDNONE)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("groups_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- return;
- }
- else if(status & STATUS_SEARCH_PLACES_SHORTSTRING)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_short"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_BANNEDWORD)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_banned"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_disabled"));
- return;
- }
- }
-
- bool found_one = false;
- S32 num_new_rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies);
- if (num_new_rows == 0 && self->mResultsReceived == 0)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("groups_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
-
- self->mResultsReceived += num_new_rows;
- num_new_rows = self->showNextButton(num_new_rows);
-
- for (S32 i = 0; i < num_new_rows; i++)
- {
- msg->getUUIDFast( _PREHASH_QueryReplies, _PREHASH_GroupID, group_id, i);
- msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_GroupName, group_name, i);
- msg->getS32Fast( _PREHASH_QueryReplies, _PREHASH_Members, members, i);
- msg->getF32Fast( _PREHASH_QueryReplies, _PREHASH_SearchOrder, search_order,i);
- if (group_id.isNull())
- {
- LL_DEBUGS("Search") << "No results returned for QueryID: " << query_id << LL_ENDL;
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("groups_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
- else
- {
- LL_DEBUGS("Search") << "Got: " << group_name << " GroupID: " << group_id << LL_ENDL;
- search_results->setEnabled(TRUE);
- found_one = true;
-
- LLSD content;
- LLSD element;
-
- element["id"] = group_id;
-
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Group";
-
- element["columns"][1]["column"] = "group_name";
- element["columns"][1]["value"] = group_name;
-
- element["columns"][2]["column"] = "members";
- element["columns"][2]["value"] = members;
-
- element["columns"][3]["column"] = "score";
- element["columns"][3]["value"] = search_order;
-
- content["name"] = group_name;
-
- search_results->addElement(element, ADD_BOTTOM);
- self->mResultsContent[group_id.asString()] = content;
- }
- }
- if (found_one)
- {
- search_results->selectFirstItem();
- search_results->setFocus(TRUE);
- self->onSelectItem();
- }
-}
-
-////////////////////////////////////////
-// Places Search Panel //
-////////////////////////////////////////
-
-static LLPanelInjector<FSPanelSearchPlaces> t_panel_fs_search_places("panel_ls_places");
-
-FSPanelSearchPlaces::FSPanelSearchPlaces() : FSSearchPanelBase()
-, mQueryID(nullptr)
-, mStartSearch(0)
-, mResultsReceived(0)
-, mResultsContent()
-{
- mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchPlaces::find, this));
-}
-
-FSPanelSearchPlaces::~FSPanelSearchPlaces()
-{
-}
-
-bool FSPanelSearchPlaces::postBuild()
-{
- mSearchComboBox = findChild<LLSearchComboBox>("places_edit");
- mSearchResults = findChild<LLScrollListCtrl>("search_results_places");
- mPlacesCategory = findChild<LLComboBox>("places_category");
- if (mSearchComboBox)
- {
- mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchPlaces::onBtnFind, this));
- fillSearchComboBox(mSearchComboBox);
- }
- if (mSearchResults)
- {
- mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchPlaces::onSelectItem, this));
- mSearchResults->setEnabled(FALSE);
- mSearchResults->setCommentText(LLTrans::getString("no_results"));
- }
- if (mPlacesCategory)
- {
- mPlacesCategory->add(LLTrans::getString("all_categories"), LLSD("any"));
- mPlacesCategory->addSeparator();
- for (int category = LLParcel::C_LINDEN; category < LLParcel::C_COUNT; category++)
- {
- LLParcel::ECategory eCategory = (LLParcel::ECategory)category;
- mPlacesCategory->add(LLTrans::getString(LLParcel::getCategoryUIString(eCategory)), LLParcel::getCategoryString(eCategory));
- }
- }
- childSetAction("places_next", boost::bind(&FSPanelSearchPlaces::onBtnNext, this));
- childSetAction("places_back", boost::bind(&FSPanelSearchPlaces::onBtnBack, this));
- getChildView("places_next")->setEnabled(FALSE);
- getChildView("places_back")->setEnabled(FALSE);
-
- return TRUE;
-}
-
-void FSPanelSearchPlaces::focusDefaultElement()
-{
- mSearchComboBox->focusTextEntry();
-}
-
-void FSPanelSearchPlaces::find()
-{
- std::string text = filterShortWords(mSearchComboBox->getSimple());
- if (text.empty())
- {
- mSearchResults->setCommentText(LLTrans::getString("search_short"));
- return;
- }
-
- static LLUICachedControl<bool> inc_pg("ShowPGSims", 1);
- static LLUICachedControl<bool> inc_mature("ShowMatureSims", 0);
- static LLUICachedControl<bool> inc_adult("ShowAdultSims", 0);
- if (!(inc_pg || inc_mature || inc_adult))
- {
- LLNotificationsUtil::add("NoContentToSearch");
- return;
- }
- S8 category;
- std::string category_string = mPlacesCategory->getSelectedValue();
- if (category_string == "any")
- {
- category = LLParcel::C_ANY;
- }
- else
- {
- category = LLParcel::getCategoryFromString(category_string);
- }
- U32 scope = 0;
- if (gAgent.wantsPGOnly())
- {
- scope |= DFQ_PG_SIMS_ONLY;
- }
- bool adult_enabled = gAgent.canAccessAdult();
- bool mature_enabled = gAgent.canAccessMature();
- if (inc_pg)
- {
- scope |= DFQ_INC_PG;
- }
- if (inc_mature && mature_enabled)
- {
- scope |= DFQ_INC_MATURE;
- }
- if (inc_adult && adult_enabled)
- {
- scope |= DFQ_INC_ADULT;
- }
- scope |= DFQ_DWELL_SORT;
-
- mResultsReceived = 0;
- if (mQueryID.notNull())
- {
- mQueryID.setNull();
- }
- mQueryID.generate();
-
- if (mStartSearch < 0)
- {
- mStartSearch = 0;
- }
-
- gMessageSystem->newMessage("DirPlacesQuery");
- gMessageSystem->nextBlock("AgentData");
- gMessageSystem->addUUID("AgentID", gAgentID);
- gMessageSystem->addUUID("SessionID", gAgentSessionID);
- gMessageSystem->nextBlock("QueryData");
- gMessageSystem->addUUID("QueryID", getQueryID());
- gMessageSystem->addString("QueryText", text);
- gMessageSystem->addU32("QueryFlags", scope);
- gMessageSystem->addS8("Category", category);
- // TODO: Search filter by region name.
- gMessageSystem->addString("SimName", "");
- gMessageSystem->addS32("QueryStart", mStartSearch);
- gAgent.sendReliableMessage();
- LL_INFOS("Search") << "Firing off places search request: " << getQueryID() << LL_ENDL;
-
- mSearchResults->deleteAllItems();
- mSearchResults->setCommentText(LLTrans::getString("searching"));
- mNumResultsReturned = 0;
-}
-
-void FSPanelSearchPlaces::onBtnFind()
-{
- std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
- auto elapsed = now - lastRequestTime;
- U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
- if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return;
- lastRequestTime = now;
-
- std::string text = mSearchComboBox->getSimple();
- if (!text.empty())
- {
- LLSearchHistory::getInstance()->addEntry(text);
- }
-
- resetSearch();
-
- find();
-}
-
-void FSPanelSearchPlaces::onBtnNext()
-{
- mStartSearch += RESULT_PAGE_SIZE;
- getChildView("places_back")->setEnabled(TRUE);
-
- find();
-}
-
-void FSPanelSearchPlaces::onBtnBack()
-{
- mStartSearch -= RESULT_PAGE_SIZE;
- getChildView("places_back")->setEnabled(mStartSearch > 0);
-
- find();
-}
-
-void FSPanelSearchPlaces::resetSearch()
-{
- mStartSearch = 0;
- getChildView("places_back")->setEnabled(FALSE);
- getChildView("places_next")->setEnabled(FALSE);
-}
-
-S32 FSPanelSearchPlaces::showNextButton(S32 rows)
-{
- bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE);
- getChildView("places_next")->setEnabled(show_next_button);
- if (show_next_button)
- {
- rows -= (mResultsReceived - RESULT_PAGE_SIZE);
- }
- return rows;
-}
-
-void FSPanelSearchPlaces::onSelectItem()
-{
- if (!mSearchResults)
- {
- return;
- }
- FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search");
- if (search_instance)
- {
- search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_PLACE);
- }
-}
-
-// static
-void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**)
-{
- LLUUID agent_id;
- LLUUID query_id;
- LLUUID parcel_id;
- std::string name;
- bool for_sale;
- bool auction;
- F32 dwell;
-
- msg->getUUID("AgentData", "AgentID", agent_id);
- msg->getUUID("QueryData", "QueryID", query_id);
-
- // Not for us
- if (agent_id != gAgentID)
- {
- return;
- }
- LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL;
-
- FSPanelSearchPlaces* self = FSFloaterSearch::getSearchPanel<FSPanelSearchPlaces>("panel_ls_places");
-
- // floater is closed or these are not results from our last request
- if (!self || query_id != self->getQueryID())
- {
- return;
- }
-
- LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_places");
-
- // Clear "Searching" label on first results
- if (self->mNumResultsReturned++ == 0)
- {
- search_results->deleteAllItems();
- }
-
- // Check for status messages
- if (msg->getNumberOfBlocks("StatusData"))
- {
- U32 status;
- msg->getU32("StatusData", "Status", status);
- if (status & STATUS_SEARCH_PLACES_FOUNDNONE)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("places_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- return;
- }
- else if(status & STATUS_SEARCH_PLACES_SHORTSTRING)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_short"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_BANNEDWORD)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_banned"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_disabled"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_ESTATEEMPTY)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_disabled"));
- return;
- }
- }
-
- bool found_one = false;
- S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies");
- if (num_new_rows == 0 && self->mResultsReceived == 0)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("places_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
-
- self->mResultsReceived += num_new_rows;
- num_new_rows = self->showNextButton(num_new_rows);
-
- for (S32 i = 0; i < num_new_rows; i++)
- {
- msg->getUUID( "QueryReplies", "ParcelID", parcel_id, i);
- msg->getString( "QueryReplies", "Name", name, i);
- msg->getBOOL( "QueryReplies", "ForSale", for_sale,i);
- msg->getBOOL( "QueryReplies", "Auction", auction, i);
- msg->getF32( "QueryReplies", "Dwell", dwell, i);
- if (parcel_id.isNull())
- {
- LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL;
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("places_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
- else
- {
- LL_DEBUGS("Search") << "Got: " << name << " ParcelID: " << parcel_id << LL_ENDL;
- search_results->setEnabled(TRUE);
- found_one = true;
-
- LLSD content;
- LLSD element;
-
- element["id"] = parcel_id;
-
- if (auction)
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Auction";
- }
- else if (for_sale)
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_For_Sale";
- }
- else
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Place";
- }
-
- element["columns"][1]["column"] = "place_name";
- element["columns"][1]["value"] = name;
-
- content["name"] = name;
-
- std::string buffer = llformat("%.0f", (F64)dwell);
- element["columns"][2]["column"] = "dwell";
- element["columns"][2]["value"] = buffer;
-
- search_results->addElement(element, ADD_BOTTOM);
- self->mResultsContent[parcel_id.asString()] = content;
- }
- }
- if (found_one)
- {
- search_results->selectFirstItem();
- search_results->setFocus(TRUE);
- self->onSelectItem();
- }
-}
-
-////////////////////////////////////////
-// Land Search Panel //
-////////////////////////////////////////
-
-static LLPanelInjector<FSPanelSearchLand> t_panel_fs_search_land("panel_ls_land");
-
-FSPanelSearchLand::FSPanelSearchLand() : FSSearchPanelBase()
-, mQueryID(nullptr)
-, mStartSearch(0)
-, mResultsReceived(0)
-, mResultsContent()
-{
- mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchLand::find, this));
-}
-
-FSPanelSearchLand::~FSPanelSearchLand()
-{
-}
-
-bool FSPanelSearchLand::postBuild()
-{
- mSearchResults = getChild<LLScrollListCtrl>("search_results_land");
- mPriceEditor = findChild<LLLineEditor>("price_edit");
- mAreaEditor = findChild<LLLineEditor>("area_edit");
- if (mSearchResults)
- {
- mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchLand::onSelectItem, this));
- mSearchResults->setEnabled(FALSE);
- mSearchResults->setCommentText(LLTrans::getString("no_results"));
- }
- if (mPriceEditor)
- {
- mPriceEditor->setCommitOnFocusLost(false);
- mPriceEditor->setCommitCallback(boost::bind(&FSPanelSearchLand::onBtnFind, this));
- }
- if (mAreaEditor)
- {
- mAreaEditor->setCommitOnFocusLost(false);
- mAreaEditor->setCommitCallback(boost::bind(&FSPanelSearchLand::find, this));
- }
- childSetAction("land_find", boost::bind(&FSPanelSearchLand::onBtnFind, this));
- childSetAction("land_next", boost::bind(&FSPanelSearchLand::onBtnNext, this));
- childSetAction("land_back", boost::bind(&FSPanelSearchLand::onBtnBack, this));
-
- getChildView("land_next")->setEnabled(FALSE);
- getChildView("land_back")->setEnabled(FALSE);
-
- return TRUE;
-}
-
-void FSPanelSearchLand::find()
-{
- static LLUICachedControl<bool> inc_pg("ShowPGLand", 1);
- static LLUICachedControl<bool> inc_mature("ShowMatureLand", 0);
- static LLUICachedControl<bool> inc_adult("ShowAdultLand", 0);
- static LLUICachedControl<bool> limit_price("FindLandPrice", 1);
- static LLUICachedControl<bool> limit_area("FindLandArea", 1);
- if (!(inc_pg || inc_mature || inc_adult))
- {
- LLNotificationsUtil::add("NoContentToSearch");
- return;
- }
-
- U32 category = ST_ALL;
- const std::string& selection = findChild<LLComboBox>("land_category")->getSelectedValue().asString();
- if (!selection.empty())
- {
- if (selection == "Auction")
- {
- category = ST_AUCTION;
- }
- else if (selection == "Mainland")
- {
- category = ST_MAINLAND;
- }
- else if (selection == "Estate")
- {
- category = ST_ESTATE;
- }
- }
-
- U32 scope = 0;
- if (gAgent.wantsPGOnly())
- {
- scope |= DFQ_PG_SIMS_ONLY;
- }
- bool mature_enabled = gAgent.canAccessMature();
- bool adult_enabled = gAgent.canAccessAdult();
- if (inc_pg)
- {
- scope |= DFQ_INC_PG;
- }
- if (inc_mature && mature_enabled)
- {
- scope |= DFQ_INC_MATURE;
- }
- if (inc_adult && adult_enabled)
- {
- scope |= DFQ_INC_ADULT;
- }
- const std::string& sort = findChild<LLComboBox>("land_sort_combo")->getSelectedValue().asString();
- if (!sort.empty())
- {
- if (sort == "Name")
- {
- scope |= DFQ_NAME_SORT;
- }
- else if (sort == "Price")
- {
- scope |= DFQ_PRICE_SORT;
- }
- else if (sort == "PPM")
- {
- scope |= DFQ_PER_METER_SORT;
- }
- else if (sort == "Area")
- {
- scope |= DFQ_AREA_SORT;
- }
- }
- else
- {
- scope |= DFQ_PRICE_SORT;
- }
- if (childGetValue("ascending_check").asBoolean())
- {
- scope |= DFQ_SORT_ASC;
- }
- if (limit_price)
- {
- scope |= DFQ_LIMIT_BY_PRICE;
- }
- if (limit_area)
- {
- scope |= DFQ_LIMIT_BY_AREA;
- }
- S32 price = childGetValue("edit_price").asInteger();
- S32 area = childGetValue("edit_area").asInteger();
-
- mResultsReceived = 0;
- if (mQueryID.notNull())
- {
- mQueryID.setNull();
- }
- mQueryID.generate();
-
- if (mStartSearch < 0)
- {
- mStartSearch = 0;
- }
-
- gMessageSystem->newMessage("DirLandQuery");
- gMessageSystem->nextBlock("AgentData");
- gMessageSystem->addUUID("AgentID", gAgentID);
- gMessageSystem->addUUID("SessionID", gAgentSessionID);
- gMessageSystem->nextBlock("QueryData");
- gMessageSystem->addUUID("QueryID", getQueryID());
- gMessageSystem->addU32("QueryFlags", scope);
- gMessageSystem->addU32("SearchType", category);
- gMessageSystem->addS32("Price", price);
- gMessageSystem->addS32("Area", area);
- gMessageSystem->addS32("QueryStart", mStartSearch);
- gAgent.sendReliableMessage();
- LL_DEBUGS("Search") << "Firing off places search request: " << getQueryID() << category << LL_ENDL;
-
- mSearchResults->deleteAllItems();
- mSearchResults->setCommentText(LLTrans::getString("searching"));
- mNumResultsReturned = 0;
-}
-
-void FSPanelSearchLand::onBtnFind()
-{
- std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
- auto elapsed = now - lastRequestTime;
- U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
- if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return;
- lastRequestTime = now;
-
- resetSearch();
-
- find();
-}
-
-void FSPanelSearchLand::onBtnNext()
-{
- mStartSearch += RESULT_PAGE_SIZE;
- getChildView("land_back")->setEnabled(TRUE);
-
- find();
-}
-
-void FSPanelSearchLand::onBtnBack()
-{
- mStartSearch -= RESULT_PAGE_SIZE;
- getChildView("land_back")->setEnabled(mStartSearch > 0);
-
- find();
-}
-
-void FSPanelSearchLand::resetSearch()
-{
- mStartSearch = 0;
- getChildView("land_back")->setEnabled(FALSE);
- getChildView("land_next")->setEnabled(FALSE);
-}
-
-S32 FSPanelSearchLand::showNextButton(S32 rows)
-{
- bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE);
- getChildView("land_next")->setEnabled(show_next_button);
- if (show_next_button)
- {
- rows -= (mResultsReceived - RESULT_PAGE_SIZE);
- }
- return rows;
-}
-
-void FSPanelSearchLand::onSelectItem()
-{
- if (!mSearchResults)
- {
- return;
- }
- FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search");
- if (search_instance)
- {
- search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_PLACE);
- }
-}
-
-// static
-void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**)
-{
- LLUUID agent_id;
- LLUUID query_id;
- LLUUID parcel_id;
- std::string name;
- std::string land_sku;
- std::string land_type;
- bool auction;
- bool for_sale;
- S32 price;
- S32 area;
-
- msg->getUUID("AgentData", "AgentID", agent_id);
- msg->getUUID("QueryData", "QueryID", query_id);
-
- // Not for us
- if (agent_id != gAgentID)
- {
- return;
- }
- LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL;
-
- FSPanelSearchLand* self = FSFloaterSearch::getSearchPanel<FSPanelSearchLand>("panel_ls_land");
-
- // floater is closed or these are not results from our last request
- if (!self || query_id != self->mQueryID)
- {
- return;
- }
-
- LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_land");
- // clear "Searching" label on first results
- if (self->mNumResultsReturned++ == 0)
- {
- search_results->deleteAllItems();
- }
-
- static LLUICachedControl<bool> use_price("FindLandPrice", 1);
- static LLUICachedControl<bool> use_area("FindLandArea", 1);
- S32 limit_price = self->childGetValue("edit_price").asInteger();
- S32 limit_area = self->childGetValue("edit_area").asInteger();
-
- bool found_one = false;
- S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies");
- if (num_new_rows == 0 && self->mResultsReceived == 0)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("events_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
- self->mResultsReceived += num_new_rows;
-
- S32 not_auction = 0;
- for (S32 i = 0; i < num_new_rows; i++)
- {
- msg->getUUID( "QueryReplies", "ParcelID", parcel_id, i);
- msg->getString( "QueryReplies", "Name", name, i);
- msg->getBOOL( "QueryReplies", "Auction", auction, i);
- msg->getBOOL( "QueryReplies", "ForSale", for_sale, i);
- msg->getS32( "QueryReplies", "SalePrice", price, i);
- msg->getS32( "QueryReplies", "ActualArea", area, i);
- if (parcel_id.isNull())
- {
- LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL;
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("no_results"));
- }
- else
- {
- LL_DEBUGS("Search") << "Got: " << name << " ClassifiedID: " << parcel_id << LL_ENDL;
- search_results->setEnabled(TRUE);
- found_one = true;
- if (msg->getSizeFast(_PREHASH_QueryReplies, i, _PREHASH_ProductSKU) > 0)
- {
- msg->getStringFast( _PREHASH_QueryReplies, _PREHASH_ProductSKU, land_sku, i);
- land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku);
- }
- else
- {
- land_sku.clear();
- land_type = LLTrans::getString("land_type_unknown");
- }
- if (parcel_id.isNull())
- {
- continue;
- }
- if (use_price && (price > limit_price))
- {
- continue;
- }
- if (use_area && (area < limit_area))
- {
- continue;
- }
-
- LLSD content;
- LLSD element;
-
- element["id"] = parcel_id;
- if (auction)
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Auction";
- }
- else if (for_sale)
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_For_Sale";
- }
- else
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Place";
- }
-
- element["columns"][1]["column"] = "land_name";
- element["columns"][1]["value"] = name;
-
- content["place_name"] = name;
-
- std::string buffer = "Auction";
- if (!auction)
- {
- buffer = llformat("%d", price);
- not_auction++;
- }
- element["columns"][2]["column"] = "price";
- element["columns"][2]["value"] = price;
-
- element["columns"][3]["column"] = "area";
- element["columns"][3]["value"] = area;
- if (!auction)
- {
- F32 ppm;
- if (area > 0)
- {
- ppm = (F32)price / (F32)area;
- }
- else
- {
- ppm = 0.f;
- }
- std::string ppm_buffer = llformat("%.1f", ppm);
- element["columns"][4]["column"] = "ppm";
- element["columns"][4]["value"] = ppm_buffer;
- }
- else
- {
- element["columns"][4]["column"] = "ppm";
- element["columns"][4]["value"] = "1.0";
- }
-
- element["columns"][5]["column"] = "land_type";
- element["columns"][5]["value"] = land_type;
-
- search_results->addElement(element, ADD_BOTTOM);
- self->mResultsContent[parcel_id.asString()] = content;
- }
- // We test against non-auction properties because they don't count towards the page limit.
- self->showNextButton(not_auction);
- }
- if (found_one)
- {
- search_results->selectFirstItem();
- search_results->setFocus(TRUE);
- self->onSelectItem();
- }
-}
-
-////////////////////////////////////////
-// Classifieds Search Panel //
-////////////////////////////////////////
-
-static LLPanelInjector<FSPanelSearchClassifieds> t_panel_fs_search_classifieds("panel_ls_classifieds");
-
-FSPanelSearchClassifieds::FSPanelSearchClassifieds() : FSSearchPanelBase()
-, mQueryID(nullptr)
-, mStartSearch(0)
-, mResultsReceived(0)
-, mResultsContent()
-{
- mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchClassifieds::find, this));
-}
-
-FSPanelSearchClassifieds::~FSPanelSearchClassifieds()
-{
-}
-
-bool FSPanelSearchClassifieds::postBuild()
-{
- mSearchComboBox = findChild<LLSearchComboBox>("classifieds_edit");
- mSearchResults = getChild<LLScrollListCtrl>("search_results_classifieds");
- if (mSearchComboBox)
- {
- mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchClassifieds::onBtnFind, this));
- fillSearchComboBox(mSearchComboBox);
- }
- if (mSearchResults)
- {
- mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchClassifieds::onSelectItem, this));
- mSearchResults->setEnabled(FALSE);
- mSearchResults->setCommentText(LLTrans::getString("no_results"));
- }
-
- mClassifiedsCategory = getChild<LLComboBox>("classifieds_category");
- if (mClassifiedsCategory)
- {
- LLClassifiedInfo::cat_map::iterator iter;
- mClassifiedsCategory->add(LLTrans::getString("all_categories"), LLSD(0));
- mClassifiedsCategory->addSeparator();
- for (iter = LLClassifiedInfo::sCategories.begin();
- iter != LLClassifiedInfo::sCategories.end();
- iter++)
- {
- mClassifiedsCategory->add(LLTrans::getString(iter->second), LLSD((S32)iter->first));
- }
- }
- childSetAction("classifieds_next", boost::bind(&FSPanelSearchClassifieds::onBtnNext, this));
- childSetAction("classifieds_back", boost::bind(&FSPanelSearchClassifieds::onBtnBack, this));
-
- getChildView("classifieds_next")->setEnabled(FALSE);
- getChildView("classifieds_back")->setEnabled(FALSE);
-
- return TRUE;
-}
-
-void FSPanelSearchClassifieds::focusDefaultElement()
-{
- mSearchComboBox->focusTextEntry();
-}
-
-void FSPanelSearchClassifieds::find()
-{
- std::string text = filterShortWords(mSearchComboBox->getSimple());
- if (text.size() == 0)
- {
- mSearchResults->setCommentText(LLTrans::getString("search_short"));
- return;
- }
-
- static LLUICachedControl<bool> inc_pg("ShowPGClassifieds", 1);
- static LLUICachedControl<bool> inc_mature("ShowMatureClassifieds", 0);
- static LLUICachedControl<bool> inc_adult("ShowAdultClassifieds", 0);
- if (!(inc_pg || inc_mature || inc_adult))
- {
- LLNotificationsUtil::add("NoContentToSearch");
- return;
- }
- U32 category = mClassifiedsCategory->getValue().asInteger();
- bool auto_renew = FALSE;
- U32 flags = pack_classified_flags_request(auto_renew, inc_pg, inc_mature, inc_adult);
-
- mResultsReceived = 0;
- if (mQueryID.notNull())
- {
- mQueryID.setNull();
- }
- mQueryID.generate();
-
- if (mStartSearch < 0)
- {
- mStartSearch = 0;
- }
-
- gMessageSystem->newMessageFast(_PREHASH_DirClassifiedQuery);
- gMessageSystem->nextBlockFast(_PREHASH_AgentData);
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID);
- gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
- gMessageSystem->nextBlockFast(_PREHASH_QueryData);
- gMessageSystem->addUUIDFast(_PREHASH_QueryID, getQueryID());
- gMessageSystem->addStringFast(_PREHASH_QueryText, text);
- gMessageSystem->addU32Fast(_PREHASH_QueryFlags, flags);
- gMessageSystem->addU32Fast(_PREHASH_Category, category);
- gMessageSystem->addS32Fast(_PREHASH_QueryStart, mStartSearch);
- gAgent.sendReliableMessage();
- LL_DEBUGS("Search") << "Firing off classified ad search request: " << getQueryID() << LL_ENDL;
-
- mSearchResults->deleteAllItems();
- mSearchResults->setCommentText(LLTrans::getString("searching"));
- mNumResultsReturned = 0;
-}
-
-void FSPanelSearchClassifieds::onBtnFind()
-{
- std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
- auto elapsed = now - lastRequestTime;
- U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
- if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return;
- lastRequestTime = now;
-
- std::string text = mSearchComboBox->getSimple();
- if (!text.empty())
- {
- LLSearchHistory::getInstance()->addEntry(text);
- }
-
- resetSearch();
-
- find();
-}
-
-void FSPanelSearchClassifieds::onBtnNext()
-{
- mStartSearch += RESULT_PAGE_SIZE;
- getChildView("classifieds_back")->setEnabled(TRUE);
-
- find();
-}
-
-void FSPanelSearchClassifieds::onBtnBack()
-{
- mStartSearch -= RESULT_PAGE_SIZE;
- getChildView("classifieds_back")->setEnabled(mStartSearch > 0);
-
- find();
-}
-
-void FSPanelSearchClassifieds::resetSearch()
-{
- mStartSearch = 0;
- getChildView("classifieds_back")->setEnabled(FALSE);
- getChildView("classifieds_next")->setEnabled(FALSE);
-}
-
-S32 FSPanelSearchClassifieds::showNextButton(S32 rows)
-{
- bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE);
- getChildView("classifieds_next")->setEnabled(show_next_button);
- if (show_next_button)
- {
- rows -= (mResultsReceived - RESULT_PAGE_SIZE);
- }
- return rows;
-}
-
-void FSPanelSearchClassifieds::onSelectItem()
-{
- if (!mSearchResults)
- {
- return;
- }
- FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search");
- if (search_instance)
- {
- search_instance->FSFloaterSearch::onSelectedItem(mSearchResults->getSelectedValue(), FSFloaterSearch::SC_CLASSIFIED);
- }
-}
-
-// static
-void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**)
-{
- LLUUID agent_id;
- LLUUID query_id;
- LLUUID classified_id;
- std::string name;
- U32 creation_date;
- U32 expiration_date;
- S32 price_for_listing;
-
- msg->getUUID("AgentData", "AgentID", agent_id);
- msg->getUUID("QueryData", "QueryID", query_id);
-
- // Not for us
- if (agent_id != gAgentID)
- {
- return;
- }
- LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL;
-
- FSPanelSearchClassifieds* self = FSFloaterSearch::getSearchPanel<FSPanelSearchClassifieds>("panel_ls_classifieds");
-
- if (msg->getNumberOfBlocks("StatusData"))
- {
- U32 status;
- msg->getU32("StatusData", "Status", status);
- if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD)
- {
- LLNotificationsUtil::add("SearchWordBanned");
- }
- }
-
- // floater is closed or these are not results from our last request
- if (!self || query_id != self->mQueryID)
- {
- return;
- }
-
- LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_classifieds");
-
- // Clear "Searching" label on first results
- if (self->mNumResultsReturned++ == 0)
- {
- search_results->deleteAllItems();
- }
-
- // Check for status messages
- if (msg->getNumberOfBlocks("StatusData"))
- {
- U32 status;
- msg->getU32("StatusData", "Status", status);
- if (status & STATUS_SEARCH_PLACES_FOUNDNONE)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("classifieds_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- return;
- }
- else if(status & STATUS_SEARCH_PLACES_SHORTSTRING)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_short"));
- return;
- }
- else if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_banned"));
- return;
- }
- else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_disabled"));
- return;
- }
- }
-
- bool found_one = false;
- S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies");
- if (num_new_rows == 0 && self->mResultsReceived == 0)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("classifieds_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
- self->mResultsReceived += num_new_rows;
- num_new_rows = self->showNextButton(num_new_rows);
-
- for (S32 i = 0; i < num_new_rows; i++)
- {
- msg->getUUID( "QueryReplies", "ClassifiedID", classified_id, i);
- msg->getString( "QueryReplies", "Name", name, i);
- msg->getU32( "QueryReplies", "CreationDate", creation_date, i);
- msg->getU32( "QueryReplies", "ExpirationDate", expiration_date,i);
- msg->getS32( "QueryReplies", "PriceForListing", price_for_listing,i);
- if (classified_id.isNull())
- {
- LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL;
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("classifieds_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
- else
- {
- LL_DEBUGS("Search") << "Got: " << name << " ClassifiedID: " << classified_id << LL_ENDL;
- search_results->setEnabled(TRUE);
- found_one = true;
-
- LLSD content;
- LLSD element;
-
- element["id"] = classified_id;
-
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "icon_top_pick.tga";
-
- element["columns"][1]["column"] = "classified_name";
- element["columns"][1]["value"] = name;
-
- element["columns"][2]["column"] = "price";
- element["columns"][2]["value"] = price_for_listing;
-
- content["name"] = name;
-
- search_results->addElement(element, ADD_BOTTOM);
- self->mResultsContent[classified_id.asString()] = content;
- }
- }
- if (found_one)
- {
- search_results->selectFirstItem();
- search_results->setFocus(TRUE);
- self->onSelectItem();
- }
-}
-
-////////////////////////////////////////
-// Events Search Panel //
-////////////////////////////////////////
-
-static LLPanelInjector<FSPanelSearchEvents> t_panel_fs_search_events("panel_ls_events");
-
-FSPanelSearchEvents::FSPanelSearchEvents() : FSSearchPanelBase()
-, mQueryID(nullptr)
-, mResultsReceived(0)
-, mStartSearch(0)
-, mDay(0)
-, mResultsContent()
-{
- mCommitCallbackRegistrar.add("CommitSearch", boost::bind(&FSPanelSearchEvents::find, this));
-}
-
-FSPanelSearchEvents::~FSPanelSearchEvents()
-{
-}
-
-bool FSPanelSearchEvents::postBuild()
-{
- mSearchComboBox = findChild<LLSearchComboBox>("events_edit");
- mSearchResults = getChild<LLScrollListCtrl>("search_results_events");
- mEventsMode = findChild<LLRadioGroup>("events_search_mode");
- if (mSearchComboBox)
- {
- mSearchComboBox->setCommitCallback(boost::bind(&FSPanelSearchEvents::onBtnFind, this));
- fillSearchComboBox(mSearchComboBox);
- }
- if (mSearchResults)
- {
- mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchEvents::onSelectItem, this));
- mSearchResults->setEnabled(FALSE);
- mSearchResults->setCommentText(LLTrans::getString("no_results"));
- }
- if (mEventsMode)
- {
- mEventsMode->setCommitCallback(boost::bind(&FSPanelSearchEvents::onSearchModeChanged, this));
- mEventsMode->selectFirstItem();
- }
-
- childSetAction("events_next", boost::bind(&FSPanelSearchEvents::onBtnNext, this));
- childSetAction("events_back", boost::bind(&FSPanelSearchEvents::onBtnBack, this));
- childSetAction("events_tomorrow", boost::bind(&FSPanelSearchEvents::onBtnTomorrow, this));
- childSetAction("events_yesterday", boost::bind(&FSPanelSearchEvents::onBtnYesterday, this));
- childSetAction("events_today", boost::bind(&FSPanelSearchEvents::onBtnToday, this));
-
- getChildView("events_next")->setEnabled(FALSE);
- getChildView("events_back")->setEnabled(FALSE);
- getChildView("events_tomorrow")->setEnabled(FALSE);
- getChildView("events_yesterday")->setEnabled(FALSE);
- getChildView("events_today")->setEnabled(FALSE);
- setDay(0);
-
- return TRUE;
-}
-
-void FSPanelSearchEvents::focusDefaultElement()
-{
- mSearchComboBox->focusTextEntry();
-}
-
-void FSPanelSearchEvents::find()
-{
- std::string text = filterShortWords(mSearchComboBox->getSimple());
-
- static LLUICachedControl<bool> inc_pg("ShowPGEvents", 1);
- static LLUICachedControl<bool> inc_mature("ShowMatureEvents", 0);
- static LLUICachedControl<bool> inc_adult("ShowAdultEvents", 0);
- if (!(inc_pg || inc_mature || inc_adult))
- {
- LLNotificationsUtil::add("NoContentToSearch");
- return;
- }
-
- U32 category = findChild<LLComboBox>("events_category")->getSelectedValue().asInteger();
- U32 scope = DFQ_DATE_EVENTS;
- if (gAgent.wantsPGOnly())
- {
- scope |= DFQ_PG_SIMS_ONLY;
- }
- bool mature_enabled = gAgent.canAccessMature();
- bool adult_enabled = gAgent.canAccessAdult();
- if (inc_pg)
- {
- scope |= DFQ_INC_PG;
- }
- if (inc_mature && mature_enabled)
- {
- scope |= DFQ_INC_MATURE;
- }
- if (inc_adult && adult_enabled)
- {
- scope |= DFQ_INC_ADULT;
- }
-
- std::ostringstream string;
-
- if ("current" == childGetValue("events_search_mode").asString())
- {
- string << "u|";
- }
- else
- {
- string << mDay << "|";
- }
- string << category << "|";
- string << text;
-
- mResultsReceived = 0;
- if (mQueryID.notNull())
- {
- mQueryID.setNull();
- }
- mQueryID.generate();
-
- if (mStartSearch < 0)
- {
- mStartSearch = 0;
- }
-
- gMessageSystem->newMessage("DirFindQuery");
- gMessageSystem->nextBlock("AgentData");
- gMessageSystem->addUUID("AgentID", gAgentID);
- gMessageSystem->addUUID("SessionID", gAgentSessionID);
- gMessageSystem->nextBlock("QueryData");
- gMessageSystem->addUUID("QueryID", getQueryID());
- gMessageSystem->addString("QueryText", string.str());
- gMessageSystem->addU32("QueryFlags", scope);
- gMessageSystem->addS32("QueryStart", mStartSearch);
- gAgent.sendReliableMessage();
- LL_INFOS("Search") << "Firing off search request: " << getQueryID() << " Search Text: " << string.str() << LL_ENDL;
-
- mSearchResults->deleteAllItems();
- mSearchResults->setCommentText(LLTrans::getString("searching"));
- mNumResultsReturned = 0;
-}
-
-void FSPanelSearchEvents::onBtnFind()
-{
- std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
- auto elapsed = now - lastRequestTime;
- U64 elapsedMS = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count();
- if(elapsedMS < REQUEST_MIN_ELAPSED_TIME) return;
- lastRequestTime = now;
-
- std::string text = mSearchComboBox->getSimple();
- if (!text.empty())
- {
- LLSearchHistory::getInstance()->addEntry(text);
- }
-
- resetSearch();
-
- find();
-}
-
-void FSPanelSearchEvents::onBtnNext()
-{
- mStartSearch += RESULT_PAGE_SIZE;
- getChildView("events_back")->setEnabled(TRUE);
-
- find();
-}
-
-void FSPanelSearchEvents::onBtnBack()
-{
- mStartSearch -= RESULT_PAGE_SIZE;
- getChildView("events_back")->setEnabled(mStartSearch > 0);
-
- find();
-}
-
-void FSPanelSearchEvents::onBtnTomorrow()
-{
- resetSearch();
- setDay(mDay + 1);
-
- find();
-}
-
-void FSPanelSearchEvents::onBtnYesterday()
-{
- resetSearch();
- setDay(mDay - 1);
-
- find();
-}
-
-void FSPanelSearchEvents::onBtnToday()
-{
- resetSearch();
- setDay(0);
-
- find();
-}
-
-void FSPanelSearchEvents::resetSearch()
-{
- mStartSearch = 0;
- getChildView("events_back")->setEnabled(FALSE);
- getChildView("events_next")->setEnabled(FALSE);
-}
-
-void FSPanelSearchEvents::onSearchModeChanged()
-{
- if (mEventsMode->getValue().asString() == "current")
- {
- getChildView("events_yesterday")->setEnabled(FALSE);
- getChildView("events_tomorrow")->setEnabled(FALSE);
- getChildView("events_today")->setEnabled(FALSE);
- }
- else
- {
- getChildView("events_yesterday")->setEnabled(TRUE);
- getChildView("events_tomorrow")->setEnabled(TRUE);
- getChildView("events_today")->setEnabled(TRUE);
- }
-}
-
-void FSPanelSearchEvents::setDay(S32 day)
-{
- mDay = day;
- struct tm* internal_time;
-
- time_t utc = time_corrected();
- utc += day * 24 * 60 * 60;
- internal_time = utc_to_pacific_time(utc, is_daylight_savings());
- std::string buffer = llformat("%d/%d", 1 + internal_time->tm_mon, internal_time->tm_mday);
- childSetValue("events_date", buffer);
-}
-
-S32 FSPanelSearchEvents::showNextButton(S32 rows)
-{
- bool show_next_button = (mResultsReceived > RESULT_PAGE_SIZE);
- getChildView("events_next")->setEnabled(show_next_button);
- if (show_next_button)
- {
- rows -= (mResultsReceived - RESULT_PAGE_SIZE);
- }
- return rows;
-}
-
-void FSPanelSearchEvents::onSelectItem()
-{
- if (!mSearchResults)
- {
- return;
- }
- S32 event_id = mSearchResults->getSelectedValue();
- FSFloaterSearch* search_instance = LLFloaterReg::findTypedInstance<FSFloaterSearch>("search");
- if (search_instance)
- {
- search_instance->FSFloaterSearch::onSelectedEvent(event_id);
- }
-}
-
-// static
-void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**)
-{
- LLUUID agent_id;
- LLUUID query_id;
- LLUUID owner_id;
- std::string name;
- std::string date;
-
- msg->getUUID("AgentData", "AgentID", agent_id);
- msg->getUUID("QueryData", "QueryID", query_id);
-
- // Not for us
- if (agent_id != gAgentID)
- {
- return;
- }
- LL_DEBUGS("Search") << "received directory request - QueryID: " << query_id << " AgentID: " << agent_id << LL_ENDL;
-
- FSPanelSearchEvents* self = FSFloaterSearch::getSearchPanel<FSPanelSearchEvents>("panel_ls_events");
-
- // floater is closed or these are not results from our last request
- if (!self || query_id != self->mQueryID)
- {
- return;
- }
-
- LLScrollListCtrl* search_results = self->getChild<LLScrollListCtrl>("search_results_events");
-
- // Clear "Searching" label on first results
- if (self->mNumResultsReturned++ == 0)
- {
- search_results->deleteAllItems();
- }
- // Check for status messages
- if (msg->getNumberOfBlocks("StatusData"))
- {
- U32 status;
- msg->getU32("StatusData", "Status", status);
- if (status & STATUS_SEARCH_EVENTS_FOUNDNONE)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("events_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- return;
- }
- else if(status & STATUS_SEARCH_EVENTS_SHORTSTRING)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_short"));
- return;
- }
- else if (status & STATUS_SEARCH_EVENTS_BANNEDWORD)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_banned"));
- return;
- }
- else if (status & STATUS_SEARCH_EVENTS_SEARCHDISABLED)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_disabled"));
- return;
- }
- else if (status & STATUS_SEARCH_EVENTS_NODATEOFFSET)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_no_date_offset"));
- return;
- }
- else if (status & STATUS_SEARCH_EVENTS_NOCATEGORY)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_no_events_category"));
- return;
- }
- else if (status & STATUS_SEARCH_EVENTS_NOQUERY)
- {
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("search_no_query"));
- return;
- }
- }
-
- S32 num_new_rows = msg->getNumberOfBlocks("QueryReplies");
- if (num_new_rows == 0 && self->mResultsReceived == 0)
- {
- LLStringUtil::format_map_t map;
- map["[TEXT]"] = self->getChild<LLUICtrl>("events_edit")->getValue().asString();
- search_results->setEnabled(FALSE);
- search_results->setCommentText(LLTrans::getString("not_found", map));
- }
-
- self->mResultsReceived += num_new_rows;
- num_new_rows = self->showNextButton(num_new_rows);
- static LLUICachedControl<bool> inc_pg("ShowPGEvents", 1);
- static LLUICachedControl<bool> inc_mature("ShowMatureEvents", 0);
- static LLUICachedControl<bool> inc_adult("ShowAdultEvents", 0);
- bool found_one = false;
-
- for (S32 i = 0; i < num_new_rows; i++)
- {
- U32 event_id;
- U32 unix_time;
- U32 event_flags;
-
- msg->getUUID( "QueryReplies", "OwnerID", owner_id, i);
- msg->getString( "QueryReplies", "Name", name, i);
- msg->getU32( "QueryReplies", "EventID", event_id, i);
- msg->getString( "QueryReplies", "Date", date, i);
- msg->getU32( "QueryReplies", "UnixTime", unix_time, i);
- msg->getU32( "QueryReplies", "EventFlags", event_flags,i);
-
- // Skip empty events...
- if (owner_id.isNull())
- {
- LL_INFOS("Search") << "Skipped " << event_id << " because of a nullptr owner result" << LL_ENDL;
- continue;
- }
- // Skips events that don't match our scope...
- if (((event_flags & (EVENT_FLAG_ADULT | EVENT_FLAG_MATURE)) == EVENT_FLAG_NONE) && !inc_pg)
- {
- LL_INFOS("Search") << "Skipped " << event_id << " because it was out of scope" << LL_ENDL;
- continue;
- }
- if ((event_flags & EVENT_FLAG_MATURE) && !inc_mature)
- {
- LL_INFOS("Search") << "Skipped " << event_id << " because it was out of scope" << LL_ENDL;
- continue;
- }
- if ((event_flags & EVENT_FLAG_ADULT) && !inc_adult)
- {
- LL_INFOS("Search") << "Skipped " << event_id << " because it was out of scope" << LL_ENDL;
- continue;
- }
- search_results->setEnabled(TRUE);
- found_one = true;
-
- LLSD content;
- LLSD element;
-
- element["id"] = llformat("%u", event_id);
-
- if (event_flags == EVENT_FLAG_ADULT)
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Legacy_Event_Adult";
- }
- else if (event_flags == EVENT_FLAG_MATURE)
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Legacy_Event_Mature";
- }
- else
- {
- element["columns"][0]["column"] = "icon";
- element["columns"][0]["type"] = "icon";
- element["columns"][0]["value"] = "Icon_Legacy_Event_PG";
- }
- element["columns"][1]["column"] = "name";
- element["columns"][1]["value"] = name;
-
- element["columns"][2]["column"] = "date";
- element["columns"][2]["value"] = date;
-
- element["columns"][3]["column"] = "time";
- element["columns"][3]["value"] = llformat("%u", unix_time);
-
- content["name"] = name;
- content["event_id"] = (S32)event_id;
-
- search_results->addElement(element, ADD_BOTTOM);
- std::string event = llformat("%u", event_id);
- self->mResultsContent[event] = content;
- }
- if (found_one)
- {
- search_results->selectFirstItem();
- search_results->setFocus(TRUE);
- self->onSelectItem();
- }
-}
-
-////////////////////////////////////////
-// WebSearch Panel //
-////////////////////////////////////////
-
-static LLPanelInjector<FSPanelSearchWeb> t_panel_fs_search_web("panel_ls_web");
-
-FSPanelSearchWeb::FSPanelSearchWeb() : FSSearchPanelBase()
-, mWebBrowser(nullptr)
-, mResetFocusOnLoad(false)
-{
- // Second Life grids use a different URL format now
- mCategoryPaths = LLSD::emptyMap();
- if (LLGridManager::getInstance()->isInSecondlife())
- {
- // declare a map that transforms a category name into
- // the parameter list that is used to search that category
- mCategoryPaths["people"] = "collection_chosen=people";
- mCategoryPaths["places"] = "collection_chosen=places";
- mCategoryPaths["events"] = "collection_chosen=events";
- mCategoryPaths["groups"] = "collection_chosen=groups";
- mCategoryPaths["destinations"] = "collection_chosen=destinations";
-
- mCategoryPaths["classifieds"] = "search_type=classified";
- mCategoryPaths["wiki"] = "search/wiki"; // not sure if this is still a thing in the new search
-
- mCategoryPaths["all"] = mCategoryPaths["people"].asString() + "&" +
- mCategoryPaths["places"].asString() + "&" +
- mCategoryPaths["events"].asString() + "&" +
- mCategoryPaths["groups"].asString() + "&" +
- mCategoryPaths["destinations"].asString();
- }
- // OpenSim currently still uses the old URL format
- else
- {
- // declare a map that transforms a category name into
- // the URL suffix that is used to search that category
- mCategoryPaths["all"] = "search";
- mCategoryPaths["people"] = "search/people";
- mCategoryPaths["places"] = "search/places";
- mCategoryPaths["events"] = "search/events";
- mCategoryPaths["groups"] = "search/groups";
- mCategoryPaths["wiki"] = "search/wiki";
- mCategoryPaths["destinations"] = "destinations";
- mCategoryPaths["classifieds"] = "classifieds";
- }
-}
-
-bool FSPanelSearchWeb::postBuild()
-{
- mWebBrowser = getChild<LLMediaCtrl>("search_browser");
- return TRUE;
-}
-
-void FSPanelSearchWeb::loadURL(const SearchQuery &p)
-{
- if (!mWebBrowser || !p.validateBlock())
- {
- return;
- }
-
- // CATEGORY is no longer used as part of the path on Second Life grids
- LLSD subs = LLSD().with("CATEGORY", "");
-
- // on OpenSim grids it probably is currently still being used, so keep the old behavior
- if (!LLGridManager::getInstance()->isInSecondlife())
- {
- // work out the subdir to use based on the requested category
- LLSD subs = LLSD().with("CATEGORY", (mCategoryPaths.has(p.category.getValue()) ? mCategoryPaths[p.category.getValue()].asString() : mCategoryPaths["all"].asString()));
- }
-
- // add the search query string
- subs["QUERY"] = LLURI::escape(p.query.getValue());
-
- // add the permissions token that login.cgi gave us
- // We use "search_token", and fallback to "auth_token" if not present.
- LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token");
- if (search_token.asString().empty())
- {
- search_token = LLLoginInstance::getInstance()->getResponse("auth_token");
- }
- subs["AUTH_TOKEN"] = search_token.asString();
-
- // add the user's preferred maturity (can be changed via prefs)
- std::string maturity;
-
- // on Second Life grids, the maturity level is now a "&maturity" parameter that's not in the provided search URL
- if (LLGridManager::getInstance()->isInSecondlife())
- {
- if (gAgent.prefersAdult())
- {
- maturity = "gma"; // PG,Mature,Adult
- }
- else if (gAgent.prefersMature())
- {
- maturity = "gm"; // PG,Mature
- }
- else
- {
- maturity = "g"; // PG
- }
-
- // not used on the SL search anymore, so clear out the respective parameter
- subs["MATURITY"] = "";
- }
- // OpenSim probably still uses the old maturity variant, so keep the old behavior here
- else
- {
- if (gAgent.prefersAdult())
- {
- maturity = "42"; // PG,Mature,Adult
- }
- else if (gAgent.prefersMature())
- {
- maturity = "21"; // PG,Mature
- }
- else
- {
- maturity = "13"; // PG
- }
- subs["MATURITY"] = maturity;
- }
-
- // add the user's god status
- subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0";
-
- // Get the search URL and expand all of the substitutions
- // (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
-
- // add the maturity and category variables to the new Second Life search URL
- //std::string url = gAgent.getRegion() != nullptr ? gAgent.getRegion()->getSearchServerURL() : gSavedSettings.getString(LLGridManager::getInstance()->isInOpenSim() ? "OpenSimSearchURL" : "SearchURL");
-
- std::string url = gSavedSettings.getString("SearchURL");
-
- if (LLGridManager::getInstance()->isInSecondlife())
- {
- url.append("&maturity=" + maturity + "&" + mCategoryPaths[p.category.getValue()].asString());
- }
-
- url = LLWeb::expandURLSubstitutions(url, subs);
-
- // Finally, load the URL in the webpanel
- mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
-}
-
-void FSPanelSearchWeb::focusDefaultElement()
-{
- mWebBrowser->setFocus(TRUE);
-}
-
-void FSPanelSearchWeb::draw()
-{
- if (mResetFocusOnLoad)
- {
- focusDefaultElement();
- mResetFocusOnLoad = false;
- }
-
- FSSearchPanelBase::draw();
-}
-
-////////////////////////////////////////
-// Local functions //
-////////////////////////////////////////
-
-std::string filterShortWords(std::string query_string)
-{
- if (query_string.length() < 1)
- {
- return "";
- }
-
- std::string final_query;
- bool filtered = false;
- boost::char_separator<char> sep(" ");
- boost::tokenizer<boost::char_separator<char> > tokens(query_string, sep);
- boost::tokenizer<boost::char_separator<char> >::iterator iter = tokens.begin();
- boost::tokenizer<boost::char_separator<char> >::iterator last = tokens.end();
- boost::tokenizer<boost::char_separator<char> >::iterator temp;
- for (; iter != last; ++iter)
- {
- if ((*iter).length() > MIN_SEARCH_STRING_SIZE)
- {
- final_query.append((*iter));
- temp = iter; ++temp;
- if (temp != last)
- {
- final_query.append(" ");
- }
- }
- else
- {
- filtered = true;
- }
- }
-
- if (filtered)
- {
- LLSD args = LLSD().with("FINALQUERY", final_query);
- LLNotificationsUtil::add("SeachFilteredOnShortWords", args);
- }
-
- return final_query;
-}
-
-void fillSearchComboBox(LLSearchComboBox* search_combo)
-{
- if (search_combo == nullptr)
- {
- return;
- }
-
- LLSearchHistory::getInstance()->load();
-
- LLSearchHistory::search_history_list_t search_list =
- LLSearchHistory::getInstance()->getSearchHistoryList();
- LLSearchHistory::search_history_list_t::const_iterator it = search_list.begin();
- for ( ; search_list.end() != it; ++it)
- {
- LLSearchHistory::LLSearchHistoryItem item = *it;
- search_combo->add(item.search_query);
- }
-}
diff --git a/indra/newview/fsfloatersearch.h b/indra/newview/fsfloatersearch.h
deleted file mode 100644
index 90e2a8cb89..0000000000
--- a/indra/newview/fsfloatersearch.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * @file fsfloatersearch.h
- * @brief Firestorm search definitions
- *
- * $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
- * Phoenix Firestorm Viewer Source Code
- * Copyright (C) 2012, Cinder Roxley <cinder.roxley@phoenixviewer.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
- * http://www.firestormviewer.org
- * $/LicenseInfo$
- */
-
-#ifndef FS_FLOATERSEARCH_H
-#define FS_FLOATERSEARCH_H
-
-#include "llfloater.h"
-#include "lliconctrl.h"
-#include "lltexteditor.h"
-#include "lltexturectrl.h"
-#include "llremoteparcelrequest.h"
-#include "llavatarpropertiesprocessor.h"
-#include "llgroupmgr.h"
-#include "llavatarnamecache.h"
-#include "llmediactrl.h"
-#include "llradiogroup.h"
-#include "llsearchcombobox.h"
-#include "llscrolllistctrl.h"
-#include "lltabcontainer.h"
-#include "lleventnotifier.h"
-
-class FSSearchRemoteParcelInfoObserver;
-class LLAvatarPropertiesObserver;
-class LLGroupMgrObserver;
-class LLSearchEditor;
-class LLSearchComboBox;
-class FSFloaterSearch;
-class LLPanelProfile;
-class FSScrollListCtrl;
-
-struct SearchQuery : public LLInitParam::Block<SearchQuery>
-{
- Optional<std::string> category;
- Optional<std::string> query;
-
- SearchQuery();
-};
-
-///////////////////////////////
-// Search Panels //
-///////////////////////////////
-
-class FSSearchPanelBase : public LLPanel
-{
-public:
- FSSearchPanelBase() : LLPanel() { }
- virtual ~FSSearchPanelBase() = default;
- virtual void focusDefaultElement() { }
-};
-
-class FSPanelSearchPeople : public FSSearchPanelBase
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- FSPanelSearchPeople();
- static void processSearchReply(LLMessageSystem* msg, void**);
-
- /*virtual*/ void focusDefaultElement();
-
-protected:
- const S32& getNumResultsReturned() const { return mNumResultsReturned; };
- const S32& getNumResultsReceived() const { return mResultsReceived; };
-
-private:
- /*virtual*/ bool postBuild();
- virtual ~FSPanelSearchPeople();
-
- void onBtnFind();
- void onSelectItem();
- void onBtnNext();
- void onBtnBack();
-
- void find();
- void resetSearch();
- S32 showNextButton(S32);
-
- const LLUUID& getQueryID() const { return mQueryID; }
-
- void onAvatarNameCallback(const LLUUID& id, const LLAvatarName& av_name);
-
- typedef boost::signals2::connection avatar_name_callback_connection_t;
- avatar_name_callback_connection_t mAvatarNameCallbackConnection;
-
- S32 mNumResultsReturned;
- S32 mStartSearch;
- S32 mResultsReceived;
- LLSD mResultsContent;
- LLUUID mQueryID;
-
- LLSearchComboBox* mSearchComboBox;
- LLScrollListCtrl* mSearchResults;
-};
-
-class FSPanelSearchGroups : public FSSearchPanelBase
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- FSPanelSearchGroups();
- static void processSearchReply(LLMessageSystem* msg, void**);
-
- /*virtual*/ void focusDefaultElement();
-
-private:
- /*virtual*/ bool postBuild();
- virtual ~FSPanelSearchGroups();
-
- void onBtnFind();
- void onSelectItem();
- void onBtnNext();
- void onBtnBack();
-
- void find();
- void resetSearch();
- S32 showNextButton(S32);
-
- const LLUUID& getQueryID() const { return mQueryID; }
-
- S32 mNumResultsReturned;
- S32 mStartSearch;
- S32 mResultsReceived;
- LLSD mResultsContent;
- LLUUID mQueryID;
-
- LLSearchComboBox* mSearchComboBox;
- LLScrollListCtrl* mSearchResults;
-};
-
-class FSPanelSearchPlaces : public FSSearchPanelBase
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- FSPanelSearchPlaces();
- static void processSearchReply(LLMessageSystem* msg, void**);
-
- /*virtual*/ void focusDefaultElement();
-
-private:
- /*virtual*/ bool postBuild();
- virtual ~FSPanelSearchPlaces();
-
- void onBtnFind();
- void onSelectItem();
- void onBtnNext();
- void onBtnBack();
-
- void find();
- void resetSearch();
- S32 showNextButton(S32);
-
- const LLUUID& getQueryID() const { return mQueryID; }
-
- S32 mNumResultsReturned;
- S32 mStartSearch;
- S32 mResultsReceived;
- LLSD mResultsContent;
- LLUUID mQueryID;
-
- LLSearchComboBox* mSearchComboBox;
- LLScrollListCtrl* mSearchResults;
- LLComboBox* mPlacesCategory;
-};
-
-class FSPanelSearchLand : public FSSearchPanelBase
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- FSPanelSearchLand();
- static void processSearchReply(LLMessageSystem* msg, void**);
-
-private:
- /*virtual*/ bool postBuild();
- virtual ~FSPanelSearchLand();
-
- void onBtnFind();
- void onSelectItem();
- void onBtnNext();
- void onBtnBack();
-
- void find();
- void resetSearch();
- S32 showNextButton(S32);
-
- const LLUUID& getQueryID() const { return mQueryID; }
-
- S32 mNumResultsReturned;
- S32 mStartSearch;
- S32 mResultsReceived;
- LLSD mResultsContent;
- LLUUID mQueryID;
-
- LLLineEditor* mPriceEditor;
- LLLineEditor* mAreaEditor;
- LLScrollListCtrl* mSearchResults;
-};
-
-class FSPanelSearchClassifieds : public FSSearchPanelBase
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- FSPanelSearchClassifieds();
- static void processSearchReply(LLMessageSystem* msg, void**);
-
- /*virtual*/ void focusDefaultElement();
-
-private:
- /*virtual*/ bool postBuild();
- virtual ~FSPanelSearchClassifieds();
-
- void onBtnFind();
- void onSelectItem();
- void onBtnNext();
- void onBtnBack();
-
- void find();
- void resetSearch();
- S32 showNextButton(S32);
-
- const LLUUID& getQueryID() const { return mQueryID; }
-
- S32 mNumResultsReturned;
- S32 mStartSearch;
- S32 mResultsReceived;
- LLSD mResultsContent;
- LLUUID mQueryID;
-
- LLSearchComboBox* mSearchComboBox;
- LLScrollListCtrl* mSearchResults;
- LLComboBox* mClassifiedsCategory;
-};
-
-class FSPanelSearchEvents : public FSSearchPanelBase
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- FSPanelSearchEvents();
- static void processSearchReply(LLMessageSystem* msg, void**);
-
- /*virtual*/ void focusDefaultElement();
-
-private:
- /*virtual*/ bool postBuild();
- virtual ~FSPanelSearchEvents();
-
- void onBtnFind();
- void onSelectItem();
- void onBtnNext();
- void onBtnBack();
- void onBtnTomorrow();
- void onBtnYesterday();
- void onBtnToday();
-
- void find();
- void setDay(S32 day);
- void onSearchModeChanged();
- void resetSearch();
- S32 showNextButton(S32);
-
- const LLUUID& getQueryID() const { return mQueryID; }
-
- S32 mNumResultsReturned;
- S32 mResultsReceived;
- S32 mStartSearch;
- S32 mDay;
- LLSD mResultsContent;
- LLUUID mQueryID;
-
- LLSearchComboBox* mSearchComboBox;
- LLScrollListCtrl* mSearchResults;
- LLRadioGroup* mEventsMode;
-};
-
-class FSPanelSearchWeb : public FSSearchPanelBase
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- FSPanelSearchWeb();
- /*virtual*/ bool postBuild();
- void loadURL(const SearchQuery &query);
- /*virtual*/ void focusDefaultElement();
- /*virtual*/ void draw();
- void resetFocusOnLoad() { mResetFocusOnLoad = true; }
-
-private:
- virtual ~FSPanelSearchWeb() {};
-
- LLMediaCtrl* mWebBrowser;
- LLSD mCategoryPaths;
-
- bool mResetFocusOnLoad;
-};
-
-class FSFloaterSearch : public LLFloater
-{
- LOG_CLASS(FSFloaterSearch);
-public:
- typedef enum e_search_category
- {
- SC_AVATAR,
- SC_GROUP,
- SC_PLACE,
- SC_CLASSIFIED
- } ESearchCategory;
-
- struct _Params : public LLInitParam::Block<_Params, LLFloater::Params>
- {
- Optional<SearchQuery> search;
- };
-
- typedef LLSDParamAdapter<_Params> Params;
-
- FSFloaterSearch(const Params& key);
- ~FSFloaterSearch();
- void onOpen(const LLSD& key);
- bool postBuild();
-
- void avatarNameUpdatedCallback(const LLUUID& id, const LLAvatarName& av_name);
- void groupNameUpdatedCallback(const LLUUID& id, const std::string& name, bool is_group);
- void onSelectedItem(const LLUUID& selected_item, ESearchCategory type);
- void onSelectedEvent(const S32 selected_event);
- void displayParcelDetails(const LLParcelData& parcel_data);
- void displayClassifiedDetails(LLAvatarClassifiedInfo*& c_info);
- void displayAvatarDetails(LLAvatarData* avatar_data);
- void displayGroupDetails(LLGroupMgrGroupData*& group_data);
- bool displayEventDetails(LLEventStruct event);
- void displayEventParcelImage(const LLParcelData& parcel_data);
- void setLoadingProgress(bool started);
-
- template <class T>
- static T* getSearchPanel(const std::string& panel_name);
-
-private:
- virtual void onClose(bool app_quitting);
- const LLUUID& getSelectedID() { return mSelectedID; }
- LLVector3d mParcelGlobal;
- LLUUID mSelectedID;
- U32 mEventID;
- bool mHasSelection;
-
- void resetVerbs();
- void flushDetails();
- void onTabChange();
- void onBtnPeopleProfile();
- void onBtnPeopleIM();
- void onBtnPeopleFriend();
- void onBtnGroupProfile();
- void onBtnGroupChat();
- void onBtnGroupJoin();
- void onBtnEventReminder();
- void onBtnTeleport();
- void onBtnMap();
-
- void regionHandleCallback(U64 region_handle, LLVector3d pos_global);
-
- FSSearchRemoteParcelInfoObserver* mRemoteParcelObserver;
- FSSearchRemoteParcelInfoObserver* mRemoteParcelEventLocationObserver;
- LLAvatarPropertiesObserver* mAvatarPropertiesObserver;
- LLGroupMgrObserver* mGroupPropertiesRequest;
- boost::signals2::connection mEventNotifierConnection;
-
- FSPanelSearchPeople* mPanelPeople;
- FSPanelSearchGroups* mPanelGroups;
- FSPanelSearchPlaces* mPanelPlaces;
- FSPanelSearchEvents* mPanelEvents;
- FSPanelSearchLand* mPanelLand;
- FSPanelSearchClassifieds* mPanelClassifieds;
- FSPanelSearchWeb* mPanelWeb;
-
- LLPanel* mDetailsPanel;
- LLTextEditor* mDetailTitle;
- LLTextEditor* mDetailDesc;
- LLTextEditor* mDetailAux1;
- LLTextEditor* mDetailAux2;
- LLTextEditor* mDetailLocation;
- LLTextureCtrl* mDetailSnapshot;
- LLTextureCtrl* mDetailSnapshotParcel;
- LLIconCtrl* mDetailMaturity;
- LLTabContainer* mTabContainer;
-};
-
-#endif // FS_FLOATERSEARCH_H
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index f7a5a20872..a2f9cd2852 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -33,10 +33,11 @@
#include "../llviewertexturelist.h"
#include "../pipeline.h"
#include "buffer_util.h"
-#include <boost/url.hpp>
#include "llimagejpeg.h"
#include "../llskinningutil.h"
+#include <future>
+
using namespace LL::GLTF;
using namespace boost::json;
@@ -961,9 +962,41 @@ LLViewerFetchedTexture* fetch_texture(const LLUUID& id);
bool Image::prep(Asset& asset, bool loadIntoVRAM)
{
mLoadIntoTexturePipe = loadIntoVRAM;
+
LLUUID id;
if (mUri.size() == UUID_STR_SIZE && LLUUID::parseUUID(mUri, &id) && id.notNull())
{ // loaded from an asset, fetch the texture from the asset system
+ LL_DEBUGS("GLTF") << "Loading image from an id" << id<< LL_ENDL;
+ }
+ else if (mUri.find("data:") == 0)
+ { // embedded in a data URI, load the texture from the URI
+ LL_WARNS("GLTF") << "Data URIs not yet supported" << LL_ENDL;
+ return false;
+ }
+
+ // Image::prepImpl containes code that must run on the main thread
+ std::promise<bool> prep_promise;
+ std::future<bool> prep_future = prep_promise.get_future();
+
+ LLAppViewer::instance()->postToMainCoro([this, &asset, id, &prep_promise]() mutable {
+ try {
+ bool result = prepImpl(asset, id);
+ prep_promise.set_value(result);
+ }
+ catch (...) {
+ // Propagate exception to the waiting thread
+ prep_promise.set_exception(std::current_exception());
+ }
+ });
+
+ // Block until prep is done on the main thread
+ return prep_future.get();
+}
+
+bool Image::prepImpl(Asset& asset, const LLUUID& id)
+{
+ if (id.notNull())
+ { // loaded from an asset, fetch the texture from the asset system
mTexture = fetch_texture(id);
}
else if (mUri.find("data:") == 0)
diff --git a/indra/newview/gltf/asset.h b/indra/newview/gltf/asset.h
index b9554d753c..2802664ed3 100644
--- a/indra/newview/gltf/asset.h
+++ b/indra/newview/gltf/asset.h
@@ -320,6 +320,8 @@ namespace LL
void clearData(Asset& asset);
bool prep(Asset& asset, bool loadIntoVRAM);
+ private:
+ bool prepImpl(Asset& asset, const LLUUID& id);
};
// Render Batch -- vertex buffer and list of primitives to render using
diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp
index 4f8f80129d..3a1d8079a9 100644
--- a/indra/newview/gltf/llgltfloader.cpp
+++ b/indra/newview/gltf/llgltfloader.cpp
@@ -602,11 +602,12 @@ LLGLTFLoader::LLGLTFImportMaterial LLGLTFLoader::processMaterial(S32 material_in
if (material->mPbrMetallicRoughness.mBaseColorTexture.mIndex >= 0)
{
S32 texIndex = material->mPbrMetallicRoughness.mBaseColorTexture.mIndex;
- std::string filename = processTexture(texIndex, "base_color", material->mName);
+ std::string full_path;
+ std::string filename = processTexture(full_path, texIndex, "base_color", material->mName);
if (!filename.empty())
{
- impMat.mDiffuseMapFilename = filename;
+ impMat.mDiffuseMapFilename = full_path;
impMat.mDiffuseMapLabel = material->mName.empty() ? filename : material->mName;
// Check if the texture is already loaded
@@ -637,7 +638,7 @@ LLGLTFLoader::LLGLTFImportMaterial LLGLTFLoader::processMaterial(S32 material_in
return cachedMat;
}
-std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& texture_type, const std::string& material_name)
+std::string LLGLTFLoader::processTexture(std::string& full_path_out, S32 texture_index, const std::string& texture_type, const std::string& material_name)
{
S32 sourceIndex;
if (!validateTextureIndex(texture_index, sourceIndex))
@@ -661,6 +662,12 @@ std::string LLGLTFLoader::processTexture(S32 texture_index, const std::string& t
{
// Uri might be escaped
filename = LLURI::unescape(filename);
+ full_path = dir + gDirUtilp->getDirDelimiter() + filename;
+ }
+
+ if (gDirUtilp->fileExists(full_path))
+ {
+ full_path_out = full_path;
}
LL_INFOS("GLTF_IMPORT") << "Found texture: " << filename << " for material: " << material_name << LL_ENDL;
diff --git a/indra/newview/gltf/llgltfloader.h b/indra/newview/gltf/llgltfloader.h
index 7aa1a94c20..a847e567a6 100644
--- a/indra/newview/gltf/llgltfloader.h
+++ b/indra/newview/gltf/llgltfloader.h
@@ -149,7 +149,7 @@ private:
void processNodeHierarchy(S32 node_idx, std::map<std::string, S32>& mesh_name_counts, U32 submodel_limit, const LLVolumeParams& volume_params);
bool addJointToModelSkin(LLMeshSkinInfo& skin_info, S32 gltf_skin_idx, size_t gltf_joint_idx);
LLGLTFImportMaterial processMaterial(S32 material_index, S32 fallback_index);
- std::string processTexture(S32 texture_index, const std::string& texture_type, const std::string& material_name);
+ std::string processTexture(std::string& full_path_out, S32 texture_index, const std::string& texture_type, const std::string& material_name);
bool validateTextureIndex(S32 texture_index, S32& source_index);
std::string generateMaterialName(S32 material_index, S32 fallback_index = -1);
bool populateModelFromMesh(LLModel* pModel, const std::string& base_name, const LL::GLTF::Mesh &mesh, const LL::GLTF::Node &node, material_map& mats);
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 0e36698018..07ed0d0824 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -767,8 +767,21 @@ Function un.UserSettingsFiles
StrCmp $DO_UNINSTALL_V2 "true" Keep # Don't remove user's settings files on auto upgrade
-# Ask if user wants to keep data files or not
-MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep
+ClearErrors
+Push $0
+${GetParameters} $COMMANDLINE
+${GetOptionsS} $COMMANDLINE "/clrusrfiles" $0
+# GetOptionsS returns an error if option does not exist, jump past Goto.
+IfErrors +3 0
+ Pop $0
+ Goto Remove
+
+Pop $0
+ClearErrors
+
+ifSilent Keep 0
+ # Ask if user wants to keep data files or not
+ MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep
Remove:
Push $0
@@ -864,11 +877,25 @@ RMDir "$INSTDIR"
IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER
FOLDERFOUND:
+ifSilent NOFOLDER 0
MessageBox MB_OK $(DeleteProgramFilesMB) /SD IDOK IDOK NOFOLDER
NOFOLDER:
-MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete
+ClearErrors
+Push $0
+${GetParameters} $COMMANDLINE
+${GetOptionsS} $COMMANDLINE "/clearreg" $0
+# GetOptionsS returns an error if option does not exist, jump past Goto.
+IfErrors +3 0
+ Pop $0
+ Goto DeleteKeys
+
+Pop $0
+ClearErrors
+
+ifSilent NoDelete 0
+ MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete
DeleteKeys:
DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\x-grid-location-info"
@@ -912,21 +939,7 @@ Function .onInstSuccess
Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch.
StrCmp $SKIP_AUTORUN "true" +2;
- # Assumes SetOutPath $INSTDIR
- # Run INSTEXE (our updater), passing VIEWER_EXE plus the command-line
- # arguments built into our shortcuts. This gives the updater a chance
- # to verify that the viewer we just installed is appropriate for the
- # running system -- or, if not, to download and install a different
- # viewer. For instance, if a user running 32-bit Windows installs a
- # 64-bit viewer, it cannot run on this system. But since the updater
- # is a 32-bit executable even in the 64-bit viewer package, the
- # updater can detect the problem and adapt accordingly.
- # Once everything is in order, the updater will run the specified
- # viewer with the specified params.
- # Quote the updater executable and the viewer executable because each
- # must be a distinct command-line token, but DO NOT quote the language
- # string because it must decompose into separate command-line tokens.
- Exec '"$INSTDIR\$INSTEXE" precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM'
+ Exec '"$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM'
#
FunctionEnd
diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp
index 54d8ceb85a..b30fe16c58 100644
--- a/indra/newview/llaccountingcostmanager.cpp
+++ b/indra/newview/llaccountingcostmanager.cpp
@@ -53,8 +53,8 @@ void LLAccountingCostManager::accountingCostCoro(std::string url,
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AccountingCost", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("accountingCostCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
try
{
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index abea7926ee..aa620625ea 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -441,8 +441,8 @@ LLAgent::LLAgent() :
mAutoPilotTargetDist(0.f),
mAutoPilotNoProgressFrameCount(0),
mAutoPilotRotationThreshold(0.f),
- mAutoPilotFinishedCallback(NULL),
- mAutoPilotCallbackData(NULL),
+ mAutoPilotFinishedCallback(nullptr),
+ mAutoPilotCallbackData(nullptr),
mMovementKeysLocked(false),
@@ -459,8 +459,8 @@ LLAgent::LLAgent() :
mVoiceConnected(false),
- mMouselookModeInSignal(NULL),
- mMouselookModeOutSignal(NULL)
+ mMouselookModeInSignal(nullptr),
+ mMouselookModeOutSignal(nullptr)
{
for (U32 i = 0; i < TOTAL_CONTROLS; i++)
{
@@ -468,7 +468,7 @@ LLAgent::LLAgent() :
mControlsTakenPassedOnCount[i] = 0;
}
- mListener.reset(new LLAgentListener(*this));
+ mListener = std::make_shared<LLAgentListener>(*this);
addParcelChangedCallback(&setCanEditParcel);
@@ -4714,9 +4714,9 @@ void LLAgent::requestAgentUserInfoCoro(std::string capurl)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAgentUserInfoCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
@@ -4774,9 +4774,9 @@ void LLAgent::updateAgentUserInfoCoro(std::string capurl, std::string directory_
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAgentUserInfoCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index a2d2ecea9f..f5d928a1be 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -39,9 +39,10 @@
#include "httprequest.h"
#include "llcorehttputil.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
extern const bool ANIMATE;
extern const U8 AGENT_STATE_TYPING; // Typing indication
extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected
@@ -257,7 +258,7 @@ public:
void changeParcels(); // called by LLViewerParcelMgr when we cross a parcel boundary
// Register a boost callback to be called when the agent changes parcels
- typedef boost::function<void()> parcel_changed_callback_t;
+ typedef std::function<void()> parcel_changed_callback_t;
boost::signals2::connection addParcelChangedCallback(parcel_changed_callback_t);
private:
@@ -769,7 +770,7 @@ public:
void requestEnterGodMode();
void requestLeaveGodMode();
- typedef boost::function<void (U8)> god_level_change_callback_t;
+ typedef std::function<void(U8)> god_level_change_callback_t;
typedef boost::signals2::signal<void (U8)> god_level_change_signal_t;
typedef boost::signals2::connection god_level_change_slot_t;
@@ -977,8 +978,8 @@ public:
/// Utilities for allowing the the agent sub managers to post and get via
/// HTTP using the agent's policy settings and headers.
- bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
- bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+ bool requestPostCapability(const std::string &capName, LLSD &postData, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
+ bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
LLCore::HttpRequest::policy_t getAgentPolicy() const { return mHttpPolicy; }
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
index 265e4060ff..4a5c037f1f 100644
--- a/indra/newview/llagentpicksinfo.cpp
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -53,7 +53,7 @@ public:
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgent.getID());
}
- typedef boost::function<void(LLAvatarData*)> server_respond_callback_t;
+ typedef std::function<void(LLAvatarData*)> server_respond_callback_t;
void setServerRespondCallback(const server_respond_callback_t& cb)
{
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 1e118ffa98..70da86805c 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -189,11 +189,11 @@ public:
// Signals
//--------------------------------------------------------------------
public:
- typedef boost::function<void()> loading_started_callback_t;
+ typedef std::function<void()> loading_started_callback_t;
typedef boost::signals2::signal<void()> loading_started_signal_t;
boost::signals2::connection addLoadingStartedCallback(loading_started_callback_t cb);
- typedef boost::function<void()> loaded_callback_t;
+ typedef std::function<void()> loaded_callback_t;
typedef boost::signals2::signal<void()> loaded_signal_t;
boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 5114ac8a08..9c76f56ef3 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -861,8 +861,8 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
return;
}
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOptions->setTimeout(HTTP_TIMEOUT);
@@ -950,7 +950,7 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
LL_DEBUGS("Inventory", "AIS3") << "Result: " << result << LL_ENDL;
onUpdateReceived(result, type, body);
- if (callback && !callback.empty())
+ if (callback != nullptr)
{
bool needs_callback = true;
LLUUID id(LLUUID::null);
@@ -1060,7 +1060,12 @@ void AISUpdate::checkTimeout()
{
if (mTimer.hasExpired())
{
- llcoro::suspend();
+ // If we are taking too long, don't starve other tasks,
+ // yield to mainloop.
+ // If we use normal suspend(), there will be a chance of
+ // waking up from other suspends, before main coro had
+ // a chance, so wait for a frame tick instead.
+ llcoro::suspendUntilNextFrame();
LLCoros::checkStop();
mTimer.setTimerExpirySec(AIS_EXPIRY_SECONDS);
}
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index dd490c8268..cfc286da2e 100644
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -44,7 +44,7 @@ public:
LIBRARY
} ITEM_TYPE;
- typedef boost::function<void(const LLUUID &invItem)> completion_t;
+ typedef std::function<void(const LLUUID& invItem)> completion_t;
static bool isAvailable();
static void getCapNames(LLSD& capNames);
@@ -89,7 +89,7 @@ private:
static const std::string INVENTORY_CAP_NAME;
static const std::string LIBRARY_CAP_NAME;
- typedef boost::function < LLSD (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
+ typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
const std::string, LLSD, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t;
static void EnqueueAISCommand(const std::string &procName, LLCoprocedureManager::CoProcedure_t proc);
diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp
index f4f19906f1..f3265afebd 100644
--- a/indra/newview/llappcorehttp.cpp
+++ b/indra/newview/llappcorehttp.cpp
@@ -145,8 +145,8 @@ LLAppCoreHttp::~LLAppCoreHttp()
void LLAppCoreHttp::init()
{
LLCoreHttpUtil::setPropertyMethods(
- boost::bind(&LLControlGroup::getBOOL, boost::ref(gSavedSettings), _1),
- boost::bind(&LLControlGroup::declareBOOL, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_NONDFT));
+ std::bind(&LLControlGroup::getBOOL, std::ref(gSavedSettings), std::placeholders::_1),
+ std::bind(&LLControlGroup::declareBOOL, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_NONDFT));
LLCore::LLHttp::initialize();
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index af18dca185..0b3d0355a2 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -28,9 +28,11 @@
#if defined(LL_BUGSPLAT)
#include <boost/filesystem.hpp>
#include <vector>
-@import BugsplatMac;
+@import CrashReporter;
+@import HockeySDK;
+@import BugSplatMac;
// derived from BugsplatMac's BugsplatTester/AppDelegate.m
-@interface LLAppDelegate () <BugsplatStartupManagerDelegate>
+@interface LLAppDelegate () <BugSplatDelegate>
@end
#endif
#include "llwindowmacosx-objc.h"
@@ -68,13 +70,22 @@
#if defined(LL_BUGSPLAT)
infos("bugsplat setup");
- // Engage BugsplatStartupManager *before* calling initViewer() to handle
+ // Engage BugSplat *before* calling initViewer() to handle
// any crashes during initialization.
// https://www.bugsplat.com/docs/platforms/os-x#initialization
- [BugsplatStartupManager sharedManager].autoSubmitCrashReport = YES;
- [BugsplatStartupManager sharedManager].askUserDetails = NO;
- [BugsplatStartupManager sharedManager].delegate = self;
- [[BugsplatStartupManager sharedManager] start];
+
+ // Initialize BugSplat
+ [[BugSplat shared] setDelegate:self];
+ [[BugSplat shared] setAutoSubmitCrashReport:YES];
+ [[BugSplat shared] setPersistUserDetails:NO];
+ [[BugSplat shared] setAskUserDetails:NO];
+ [BugSplat shared].expirationTimeInterval = 0;
+ [[BugSplat shared] start];
+
+ // Optionally, add some attributes to your crash reports.
+ // Attributes are artibrary key/value pairs that are searchable in the BugSplat dashboard.
+ // [[BugSplat shared] setValue:@"Value of Plain Attribute" forAttribute:@"PlainAttribute"];
+
#endif
infos("post-bugsplat setup");
@@ -213,9 +224,54 @@
return true;
}
+- (void) setBugsplatValue:(nullable NSString *)value forAttribute:(NSString *)attribute
+{
+#if defined(LL_BUGSPLAT)
+ //[[BugSplat shared] setValue:@"Value of not so plain <value> Attribute" forAttribute:@"NotSoPlainAttribute"];
+ [[BugSplat shared] setValue:value forAttribute:attribute];
+#endif // LL_BUGSPLAT
+}
+
#if defined(LL_BUGSPLAT)
-- (NSString *)applicationLogForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager
+- (void)bugSplatWillSendCrashReport:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillSendCrashReport");
+}
+
+- (void)bugSplatWillSendCrashReportsAlways:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillSendCrashReportsAlways");
+}
+
+- (void)bugSplatDidFinishSendingCrashReport:(BugSplat *)bugSplat
+{
+ infos("bugSplatDidFinishSendingCrashReport");
+
+ if(!secondLogPath.empty())
+ {
+ boost::filesystem::remove(secondLogPath);
+ }
+ clearDumpLogsDir();
+}
+
+- (void)bugSplatWillCancelSendingCrashReport:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillCancelSendingCrashReport");
+}
+
+- (void)bugSplatWillShowSubmitCrashReportAlert:(BugSplat *)bugSplat
+{
+ infos("bugSplatWillShowSubmitCrashReportAlert");
+}
+
+- (void)bugSplat:(BugSplat *)bugSplat didFailWithError:(NSError *)error
+{
+ std::string error_str([[error localizedDescription] UTF8String]);
+ infos("bugSplat:didFailWithError: " + error_str);
+}
+
+- (NSString *)applicationLogForBugSplat:(BugSplat *)bugSplat;
{
CrashMetadata& meta(CrashMetadata_instance());
// As of BugsplatMac 1.0.6, userName and userEmail properties are now
@@ -226,16 +282,21 @@
// report we are about to send.
infos("applicationLogForBugsplatStartupManager setting userName = '" +
meta.agentFullname + '"');
- bugsplatStartupManager.userName =
+ bugSplat.userName =
[NSString stringWithCString:meta.agentFullname.c_str()
encoding:NSUTF8StringEncoding];
// Use the email field for OS version, just as we do on Windows, until
// BugSplat provides more metadata fields.
infos("applicationLogForBugsplatStartupManager setting userEmail = '" +
meta.OSInfo + '"');
- bugsplatStartupManager.userEmail =
+ bugSplat.userEmail =
[NSString stringWithCString:meta.OSInfo.c_str()
encoding:NSUTF8StringEncoding];
+
+ //bugSplat.userID =
+ // [NSString stringWithCString:meta.regionName.c_str()
+ // encoding:NSUTF8StringEncoding];
+
// This strangely-named override method's return value contributes the
// User Description metadata field.
infos("applicationLogForBugsplatStartupManager -> '" + meta.fatalMessage + "'");
@@ -243,7 +304,8 @@
encoding:NSUTF8StringEncoding];
}
-- (NSString *)applicationKeyForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager signal:(NSString *)signal exceptionName:(NSString *)exceptionName exceptionReason:(NSString *)exceptionReason {
+- (NSString *)applicationKeyForBugSplat:(BugSplat *)bugSplat signal:(NSString *)signal exceptionName:(NSString *)exceptionName exceptionReason:(NSString *)exceptionReason
+{
// TODO: exceptionName, exceptionReason
// Windows sends location within region as well, but that's because
@@ -258,27 +320,6 @@
encoding:NSUTF8StringEncoding];
}
-- (NSString *)defaultUserNameForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager {
- std::string agentFullname(CrashMetadata_instance().agentFullname);
- infos("defaultUserNameForBugsplatStartupManager -> '" + agentFullname + "'");
- return [NSString stringWithCString:agentFullname.c_str()
- encoding:NSUTF8StringEncoding];
-}
-
-- (NSString *)defaultUserEmailForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager {
- // Use the email field for OS version, just as we do on Windows, until
- // BugSplat provides more metadata fields.
- std::string OSInfo(CrashMetadata_instance().OSInfo);
- infos("defaultUserEmailForBugsplatStartupManager -> '" + OSInfo + "'");
- return [NSString stringWithCString:OSInfo.c_str()
- encoding:NSUTF8StringEncoding];
-}
-
-- (void)bugsplatStartupManagerWillSendCrashReport:(BugsplatStartupManager *)bugsplatStartupManager
-{
- infos("bugsplatStartupManagerWillSendCrashReport");
-}
-
struct AttachmentInfo
{
AttachmentInfo(const std::string& path, const std::string& type):
@@ -290,7 +331,7 @@ struct AttachmentInfo
std::string pathname, basename, mimetype;
};
-- (NSArray<BugsplatAttachment *> *)attachmentsForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager
+- (NSArray<BugSplatAttachment *> *)attachmentsForBugSplat:(BugSplat *)bugSplat
{
const CrashMetadata& metadata(CrashMetadata_instance());
@@ -311,12 +352,12 @@ struct AttachmentInfo
info.push_back(AttachmentInfo(secondLogPath, "text/xml"));
}
- // We "happen to know" that info[0].basename is "SecondLife.old" -- due to
+ // We "happen to know" that info[0].basename is "SecondLife.crash" -- due to
// the fact that BugsplatMac only notices a crash during the viewer run
// following the crash.
// The Bugsplat service doesn't respect the MIME type above when returning
// the log data to a browser, so take this opportunity to rename the file
- // from <base>.old to <base>_log.txt
+ // from <base>.crash to <base>_log.txt
info[0].basename =
boost::filesystem::path(info[0].pathname).stem().string() + "_log.txt";
infos("attachmentsForBugsplatStartupManager attaching log " + info[0].basename);
@@ -334,8 +375,8 @@ struct AttachmentInfo
encoding:NSUTF8StringEncoding];
NSData *nsdata = [NSData dataWithContentsOfFile:nspathname];
- BugsplatAttachment *attachment =
- [[BugsplatAttachment alloc] initWithFilename:nsbasename
+ BugSplatAttachment *attachment =
+ [[BugSplatAttachment alloc] initWithFilename:nsbasename
attachmentData:nsdata
contentType:nsmimetype];
@@ -346,23 +387,6 @@ struct AttachmentInfo
return attachments;
}
-- (void)bugsplatStartupManagerDidFinishSendingCrashReport:(BugsplatStartupManager *)bugsplatStartupManager
-{
- infos("Sent crash report to BugSplat");
-
- if(!secondLogPath.empty())
- {
- boost::filesystem::remove(secondLogPath);
- }
- clearDumpLogsDir();
-}
-
-- (void)bugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager didFailWithError:(NSError *)error
-{
- // TODO: message string from NSError
- infos("Could not send crash report to BugSplat");
-}
-
#endif // LL_BUGSPLAT
@end
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index cb352ac3e5..614d9fdeb1 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -3908,7 +3908,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
LL_DEBUGS("Avatar") << "Will send request for cof_version " << cofVersion << LL_ENDL;
bRetry = false;
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
{
@@ -4381,8 +4381,8 @@ LLAppearanceMgr::LLAppearanceMgr():
outfit_observer.addCOFSavedCallback(boost::bind(
&LLAppearanceMgr::setOutfitLocked, this, false));
- mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer((F32)gSavedSettings.getS32(
- "OutfitOperationsTimeout")));
+ mUnlockOutfitTimer = std::make_unique<LLOutfitUnLockTimer>((F32)gSavedSettings.getS32(
+ "OutfitOperationsTimeout"));
gIdleCallbacks.addFunction(&LLAttachmentsMgr::onIdle, NULL);
gIdleCallbacks.addFunction(&LLAppearanceMgr::onIdle, NULL); //sheduling appearance update requests
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 0a41a91750..131b6817ed 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -235,7 +235,7 @@ public:
void setAppearanceServiceURL(const std::string& url) { mAppearanceServiceURL = url; }
std::string getAppearanceServiceURL() const;
- typedef boost::function<void ()> attachments_changed_callback_t;
+ typedef std::function<void()> attachments_changed_callback_t;
typedef boost::signals2::signal<void ()> attachments_changed_signal_t;
boost::signals2::connection setAttachmentsChangedCallback(attachments_changed_callback_t cb);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c34441932d..1db62f2fab 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -98,6 +98,11 @@
#include "llurlmatch.h"
#include "lltextutil.h"
#include "lllogininstance.h"
+#include "llvvmquery.h"
+
+#if LL_VELOPACK
+#include "llvelopack.h"
+#endif
#include "llprogressview.h"
#include "llvocache.h"
#include "lldiskcache.h"
@@ -220,7 +225,6 @@
#include "llfloatersimplesnapshot.h"
#include "llfloatersnapshot.h"
#include "llsidepanelinventory.h"
-#include "llatmosphere.h"
// includes for idle() idleShutdown()
#include "llviewercontrol.h"
@@ -396,10 +400,6 @@ const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker");
const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker");
static std::string gLaunchFileOnQuit;
-// Used on Win32 for other apps to identify our window (eg, win_setup)
-const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
-
-
//----------------------------------------------------------------------------
// List of entries from strings.xml to always replace
@@ -680,7 +680,6 @@ LLAppViewer::LLAppViewer()
mPurgeCacheOnExit(false),
mPurgeUserDataOnExit(false),
mSecondInstance(false),
- mUpdaterNotFound(false),
mSavedFinalSnapshot(false),
mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded.
mQuitRequested(false),
@@ -1136,68 +1135,17 @@ bool LLAppViewer::init()
gGLActive = false;
-#if 0 // LL_RELEASE_FOR_DOWNLOAD && !LL_LINUX
- // Skip updater if this is a non-interactive instance
+//#if LL_RELEASE_FOR_DOWNLOAD
+ // Launch VVM update check
if (!gSavedSettings.getBOOL("CmdLineSkipUpdater") && !gNonInteractive)
{
- LLProcess::Params updater;
- updater.desc = "updater process";
- // Because it's the updater, it MUST persist beyond the lifespan of the
- // viewer itself.
- updater.autokill = false;
- std::string updater_file;
-#if LL_WINDOWS
- updater_file = "SLVersionChecker.exe";
- updater.executable = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, updater_file);
-#elif LL_DARWIN
- updater_file = "SLVersionChecker";
- updater.executable = gDirUtilp->add(gDirUtilp->getAppRODataDir(), "updater", updater_file);
-#else
- updater_file = "SLVersionChecker";
- updater.executable = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, updater_file);
-#endif
- // add LEAP mode command-line argument to whichever of these we selected
- updater.args.add("leap");
- // UpdaterServiceSettings
- if (gSavedSettings.getBOOL("FirstLoginThisInstall"))
- {
- // Befor first login, treat this as 'manual' updates,
- // updater won't install anything, but required updates
- updater.args.add("0");
- }
- else
- {
- updater.args.add(stringize(gSavedSettings.getU32("UpdaterServiceSetting")));
- }
- // channel
- updater.args.add(LLVersionInfo::instance().getChannel());
- // testok
- updater.args.add(stringize(gSavedSettings.getBOOL("UpdaterWillingToTest")));
- // ForceAddressSize
- updater.args.add(stringize(gSavedSettings.getU32("ForceAddressSize")));
-
- try
- {
- // Run the updater. An exception from launching the updater should bother us.
- LLLeap::create(updater, true);
- mUpdaterNotFound = false;
- }
- catch (...)
- {
- LLUIString details = LLNotifications::instance().getGlobalString("LLLeapUpdaterFailure");
- details.setArg("[UPDATER_APP]", updater_file);
- OSMessageBox(
- details.getString(),
- LLStringUtil::null,
- OSMB_OK);
- mUpdaterNotFound = true;
- }
+ initVVMUpdateCheck();
}
else
{
LL_WARNS("InitInfo") << "Skipping updater check." << LL_ENDL;
}
-#endif //LL_RELEASE_FOR_DOWNLOAD
+//#endif //LL_RELEASE_FOR_DOWNLOAD
{
// Iterate over --leap command-line options. But this is a bit tricky: if
@@ -1255,15 +1203,15 @@ bool LLAppViewer::init()
/// Tell the Coprocedure manager how to discover and store the pool sizes
// what I wanted
LLCoprocedureManager::getInstance()->setPropertyMethods(
- boost::bind(&LLControlGroup::getU32, boost::ref(gSavedSettings), _1),
- boost::bind(&LLControlGroup::declareU32, boost::ref(gSavedSettings), _1, _2, _3, LLControlVariable::PERSIST_ALWAYS));
+ std::bind(&LLControlGroup::getU32, std::ref(gSavedSettings), std::placeholders::_1),
+ std::bind(&LLControlGroup::declareU32, std::ref(gSavedSettings), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, LLControlVariable::PERSIST_ALWAYS));
// TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement
// some other protection to make sure we don't use network before initializng proxy
/*----------------------------------------------------------------------*/
// nat 2016-06-29 moved the following here from the former mainLoop().
- mMainloopTimeout = new LLWatchdogTimeout();
+ mMainloopTimeout = new LLWatchdogTimeout("mainloop");
// Create IO Pump to use for HTTP Requests.
gServicePump = new LLPumpIO(gAPRPoolp);
@@ -1374,6 +1322,8 @@ bool LLAppViewer::frame()
bool LLAppViewer::doFrame()
{
+ resumeMainloopTimeout("Main:doFrameStart");
+
U32 fpsLimitMaxFps = (U32)gSavedSettings.getU32("MaxFPS");
if(fpsLimitMaxFps > 120) fpsLimitMaxFps = 0;
@@ -1464,12 +1414,14 @@ bool LLAppViewer::doFrame()
{
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df mainloop");
+ pingMainloopTimeout("df mainloop");
// canonical per-frame event
mainloop.post(newFrame);
}
{
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df suspend");
+ pingMainloopTimeout("df suspend");
// give listeners a chance to run
llcoro::suspend();
// if one of our coroutines threw an uncaught exception, rethrow it now
@@ -1505,6 +1457,7 @@ bool LLAppViewer::doFrame()
{
{
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df pauseMainloopTimeout");
+ pingMainloopTimeout("df idle"); // So that it will be aware of last state.
pauseMainloopTimeout(); // *TODO: Remove. Messages shouldn't be stalling for 20+ seconds!
}
@@ -1516,7 +1469,7 @@ bool LLAppViewer::doFrame()
{
LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df resumeMainloopTimeout");
- resumeMainloopTimeout();
+ resumeMainloopTimeout("df idle");
}
}
@@ -1531,7 +1484,7 @@ bool LLAppViewer::doFrame()
}
disconnectViewer();
- resumeMainloopTimeout();
+ resumeMainloopTimeout("df snapshot n disconnect");
}
// Render scene.
@@ -1696,17 +1649,20 @@ bool LLAppViewer::doFrame()
if (LLApp::isExiting())
{
+ pingMainloopTimeout("Main:qSnapshot");
// Save snapshot for next time, if we made it through initialization
if (STATE_STARTED == LLStartUp::getStartupState())
{
saveFinalSnapshot();
}
+ pingMainloopTimeout("Main:TerminateVoice");
if (LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->terminate();
}
+ pingMainloopTimeout("Main:TerminatePump");
delete gServicePump;
gServicePump = NULL;
@@ -1715,6 +1671,11 @@ bool LLAppViewer::doFrame()
LL_INFOS() << "Exiting main_loop" << LL_ENDL;
}
}LLPerfStats::StatsRecorder::endFrame();
+
+ // Not viewer's fault if something outside frame
+ // pauses viewer (ex: macOS doesn't call oneFrame),
+ // so stop tracking on exit.
+ pauseMainloopTimeout();
LL_PROFILER_FRAME_END;
return ! LLApp::isRunning();
@@ -1758,7 +1719,15 @@ void LLAppViewer::flushLFSIO()
bool LLAppViewer::cleanup()
{
- LLAtmosphere::cleanupClass();
+#if LL_VELOPACK
+ // Apply any pending Velopack update before shutdown
+ if (velopack_is_update_pending())
+ {
+ LL_INFOS("AppInit") << "Applying pending Velopack update on shutdown..." << LL_ENDL;
+ velopack_apply_pending_update(velopack_should_restart_after_update());
+ }
+ velopack_cleanup();
+#endif
//ditch LLVOAvatarSelf instance
gAgentAvatarp = NULL;
@@ -2365,7 +2334,22 @@ void errorHandler(const std::string& title_string, const std::string& message_st
}
if (!message_string.empty())
{
- OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK);
+ if (on_main_thread())
+ {
+ // Prevent watchdog from killing us while dialog is up.
+ // Can't do pauseMainloopTimeout, since this may be called
+ // from threads and we are not going to need watchdog now.
+ LLAppViewer::instance()->pauseMainloopTimeout();
+
+ // todo: might want to have non-crashing timeout for OOM cases
+ // and needs a way to pause main loop.
+ OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK);
+ LLAppViewer::instance()->resumeMainloopTimeout();
+ }
+ else
+ {
+ OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK);
+ }
}
}
@@ -3184,7 +3168,7 @@ bool LLAppViewer::initWindow()
LLViewerWindow::Params window_params;
window_params
.title(gWindowTitle)
- .name(VIEWER_WINDOW_CLASSNAME)
+ .name(sWindowClass)
.x(gSavedSettings.getS32("WindowX"))
.y(gSavedSettings.getS32("WindowY"))
.width(gSavedSettings.getU32("WindowWidth"))
@@ -3209,7 +3193,7 @@ bool LLAppViewer::initWindow()
// Need to load feature table before cheking to start watchdog.
bool use_watchdog = false;
- int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled");
+ S32 watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled");
if (watchdog_enabled_setting == -1)
{
use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled");
@@ -3228,7 +3212,18 @@ bool LLAppViewer::initWindow()
if (use_watchdog)
{
- LLWatchdog::getInstance()->init();
+ LLWatchdog::getInstance()->init([]()
+ {
+ LLAppViewer* app = LLAppViewer::instance();
+ if (app->logoutRequestSent())
+ {
+ app->createErrorMarker(LAST_EXEC_LOGOUT_FROZE);
+ }
+ else
+ {
+ app->createErrorMarker(LAST_EXEC_FROZE);
+ }
+ });
}
LLNotificationsUI::LLNotificationManager::getInstance();
@@ -3298,16 +3293,6 @@ bool LLAppViewer::initWindow()
return true;
}
-bool LLAppViewer::isUpdaterMissing()
-{
- return mUpdaterNotFound;
-}
-
-bool LLAppViewer::waitForUpdater()
-{
- return !gSavedSettings.getBOOL("CmdLineSkipUpdater") && !mUpdaterNotFound && !gNonInteractive;
-}
-
void LLAppViewer::writeDebugInfo(bool isStatic)
{
#if LL_WINDOWS && LL_BUGSPLAT
@@ -3684,10 +3669,15 @@ void LLAppViewer::writeSystemInfo()
if (! gDebugInfo.has("Dynamic") )
gDebugInfo["Dynamic"] = LLSD::emptyMap();
-#if LL_WINDOWS && !LL_BUGSPLAT
+#if LL_DARWIN
+ // crash processing in CrashMetadataSingleton reads SLLog
+ gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.crash");
+#elif LL_WINDOWS && !LL_BUGSPLAT
gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"SecondLife.log");
#else
- //Not ideal but sufficient for good reporting.
+ // Far from ideal, especially when multiple instances get involved.
+ // Note that attachmentsForBugSplat expects .old extendion.
+ // Todo: improve.
gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.old"); //LLError::logFileName();
#endif
@@ -4010,7 +4000,7 @@ void LLAppViewer::processMarkerFiles()
#if LL_WINDOWS && LL_BUGSPLAT
// bugsplat will set correct state in bugsplatSendLog
// Might be more accurate to rename this one into 'unknown'
- gLastExecEvent = LAST_EXEC_FROZE;
+ gLastExecEvent = LAST_EXEC_UNKNOWN;
#else
gLastExecEvent = LAST_EXEC_OTHER_CRASH;
#endif // LL_WINDOWS
@@ -4056,7 +4046,8 @@ void LLAppViewer::processMarkerFiles()
{
if (markerIsSameVersion(logout_marker_file))
{
- gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;
+ // Either froze, got killed or somehow crash was not caught
+ gLastExecEvent = LAST_EXEC_LOGOUT_UNKNOWN;
LL_INFOS("MarkerFile") << "Logout crash marker '"<< logout_marker_file << "', changing LastExecEvent to LOGOUT_FROZE" << LL_ENDL;
}
else
@@ -4094,6 +4085,22 @@ void LLAppViewer::processMarkerFiles()
}
LLAPRFile::remove(error_marker_file);
}
+
+#if LL_DARWIN
+ if (!mSecondInstance && gLastExecEvent != LAST_EXEC_NORMAL)
+ {
+ // While windows reports crashes immediately, mac reports next run and
+ // may take a while to trigger crash report so it has a special file.
+ // Remove .crash file if exists
+ std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.old");
+ std::string crash_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.crash");
+ LLFile::remove(crash_log_file);
+ // Rename ".old" log file to ".crash"
+ LLFile::rename(old_log_file, crash_log_file);
+ }
+#endif
}
void LLAppViewer::removeMarkerFiles()
@@ -4187,6 +4194,7 @@ void LLAppViewer::requestQuit()
return;
}
+ pingMainloopTimeout("Main:qMetrics");
// Try to send metrics back to the grid
metricsSend(!gDisconnected);
@@ -4202,6 +4210,7 @@ void LLAppViewer::requestQuit()
LLHUDManager::getInstance()->sendEffects();
effectp->markDead() ;//remove it.
+ pingMainloopTimeout("Main:qFloaters");
// Attempt to close all floaters that might be
// editing things.
if (gFloaterView)
@@ -4210,6 +4219,7 @@ void LLAppViewer::requestQuit()
gFloaterView->closeAllChildren(true);
mClosingFloaters = true;
}
+ pingMainloopTimeout("Main:qStats");
// Send preferences once, when exiting
bool include_preferences = true;
@@ -4217,6 +4227,7 @@ void LLAppViewer::requestQuit()
gLogoutTimer.reset();
mQuitRequested = true;
+ pingMainloopTimeout("Main:LoggingOut");
}
static bool finish_quit(const LLSD& notification, const LLSD& response)
@@ -4448,6 +4459,8 @@ bool LLAppViewer::initCache()
LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL;
gSavedSettings.setString("CacheLocation", "");
gSavedSettings.setString("CacheLocationTopFolder", "");
+ gSavedSettings.setString("NewCacheLocation", "");
+ gSavedSettings.setString("NewCacheLocationTopFolder", "");
}
const std::string cache_dir = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, cache_dir_name);
@@ -4500,7 +4513,7 @@ bool LLAppViewer::initCache()
return true;
}
-void LLAppViewer::addOnIdleCallback(const boost::function<void()>& cb)
+void LLAppViewer::addOnIdleCallback(const std::function<void()>& cb)
{
gMainloopWork.post(cb);
}
@@ -5495,6 +5508,7 @@ void LLAppViewer::outOfMemorySoftQuit()
LLLFSThread::sLocal->pause();
gLogoutTimer.reset();
mQuitRequested = true;
+ destroyMainloopTimeout();
LLError::LLUserWarningMsg::showOutOfMemory();
}
@@ -5860,12 +5874,12 @@ void LLAppViewer::forceExceptionThreadCrash()
thread->start();
}
-void LLAppViewer::initMainloopTimeout(std::string_view state, F32 secs)
+void LLAppViewer::initMainloopTimeout(std::string_view state)
{
if (!mMainloopTimeout)
{
- mMainloopTimeout = new LLWatchdogTimeout();
- resumeMainloopTimeout(state, secs);
+ mMainloopTimeout = new LLWatchdogTimeout("mainloop");
+ resumeMainloopTimeout(state);
}
}
@@ -5878,17 +5892,11 @@ void LLAppViewer::destroyMainloopTimeout()
}
}
-void LLAppViewer::resumeMainloopTimeout(std::string_view state, F32 secs)
+void LLAppViewer::resumeMainloopTimeout(std::string_view state)
{
if (mMainloopTimeout)
{
- if (secs < 0.0f)
- {
- static LLCachedControl<F32> mainloop_timeout(gSavedSettings, "MainloopTimeoutDefault", 60.f);
- secs = mainloop_timeout;
- }
-
- mMainloopTimeout->setTimeout(secs);
+ mMainloopTimeout->setTimeout(getMainloopTimeoutSec());
mMainloopTimeout->start(state);
}
}
@@ -5901,27 +5909,48 @@ void LLAppViewer::pauseMainloopTimeout()
}
}
-void LLAppViewer::pingMainloopTimeout(std::string_view state, F32 secs)
+void LLAppViewer::pingMainloopTimeout(std::string_view state)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
if (mMainloopTimeout)
{
- if (secs < 0.0f)
- {
- static LLCachedControl<F32> mainloop_timeout(gSavedSettings, "MainloopTimeoutDefault", 60);
- secs = mainloop_timeout;
- }
-
- mMainloopTimeout->setTimeout(secs);
+ mMainloopTimeout->setTimeout(getMainloopTimeoutSec());
mMainloopTimeout->ping(state);
}
}
+
+F32 LLAppViewer::getMainloopTimeoutSec() const
+{
+ if (isQuitting() || mQuitRequested)
+ {
+ constexpr F32 QUITTING_SECONDS = 240.f;
+ return QUITTING_SECONDS;
+ }
+ if (LLStartUp::getStartupState() == STATE_STARTED
+ && gAgent.getTeleportState() == LLAgent::TELEPORT_NONE)
+ {
+ // consider making this value match 'disconnected' timout.
+ static LLCachedControl<F32> mainloop_started(gSavedSettings, "MainloopTimeoutStarted", 60.f);
+ return mainloop_started();
+ }
+ else
+ {
+ static LLCachedControl<F32> mainloop_default(gSavedSettings, "MainloopTimeoutDefault", 120.f);
+ return mainloop_default();
+ }
+}
+
void LLAppViewer::handleLoginComplete()
{
gLoggedInTime.start();
initMainloopTimeout("Mainloop Init");
+ LLWindow* viewer_window = gViewerWindow->getWindow();
+ if (viewer_window) // in case of a headless client
+ {
+ viewer_window->initWatchdog();
+ }
// Store some data to DebugInfo in case of a freeze.
gDebugInfo["ClientInfo"]["Name"] = LLVersionInfo::instance().getChannel();
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 4f2583cb16..cbe8be7741 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -77,6 +77,8 @@ typedef enum
LAST_EXEC_BAD_ALLOC,
LAST_EXEC_MISSING_FILES,
LAST_EXEC_GRAPHICS_INIT,
+ LAST_EXEC_UNKNOWN,
+ LAST_EXEC_LOGOUT_UNKNOWN,
LAST_EXEC_COUNT
} eLastExecEvent;
@@ -115,9 +117,6 @@ public:
bool quitRequested() { return mQuitRequested; }
bool logoutRequestSent() { return mLogoutRequestSent; }
bool isSecondInstance() { return mSecondInstance; }
- bool isUpdaterMissing(); // In use by tests
- bool waitForUpdater();
-
void writeDebugInfo(bool isStatic=true);
void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; }
@@ -204,11 +203,13 @@ public:
// For thread debugging.
// llstartup needs to control init.
// llworld, send_agent_pause() also controls pause/resume.
- void initMainloopTimeout(std::string_view state, F32 secs = -1.0f);
+ void initMainloopTimeout(std::string_view state);
void destroyMainloopTimeout();
void pauseMainloopTimeout();
- void resumeMainloopTimeout(std::string_view state = "", F32 secs = -1.0f);
- void pingMainloopTimeout(std::string_view state, F32 secs = -1.0f);
+ void resumeMainloopTimeout(std::string_view state = "");
+ void pingMainloopTimeout(std::string_view state);
+
+ F32 getMainloopTimeoutSec() const;
// Handle the 'login completed' event.
// *NOTE:Mani Fix this for login abstraction!!
@@ -222,7 +223,7 @@ public:
return mOnLoginCompleted.connect(cb);
}
- void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
+ void addOnIdleCallback(const std::function<void()>& cb); // add a callback to fire (once) when idle
void initGeneralThread();
void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; }
@@ -283,6 +284,14 @@ protected:
virtual void sendOutOfDiskSpaceNotification();
+protected:
+
+ // NSIS relies on this to detect if viewer is up.
+ // NSIS's method is somewhat unreliable since window
+ // can close long before cleanup is done.
+ // sendURLToOtherInstance also relies on this to detect if viewer is up.
+ static constexpr const char* sWindowClass = "Second Life";
+
private:
bool doFrame();
@@ -323,7 +332,6 @@ private:
static LLAppViewer* sInstance;
bool mSecondInstance; // Is this a second instance of the app?
- bool mUpdaterNotFound; // True when attempt to start updater failed
std::string mMarkerFileName;
LLAPRFile mMarkerFile; // A file created to indicate the app is running.
diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h
index 5ade3d3e04..8686d6522e 100644
--- a/indra/newview/llappviewerlistener.h
+++ b/indra/newview/llappviewerlistener.h
@@ -30,7 +30,7 @@
#define LL_LLAPPVIEWERLISTENER_H
#include "lleventapi.h"
-#include <boost/function.hpp>
+#include <functional>
class LLAppViewer;
class LLSD;
@@ -39,7 +39,7 @@ class LLSD;
class LLAppViewerListener: public LLEventAPI
{
public:
- typedef boost::function<LLAppViewer*(void)> LLAppViewerGetter;
+ typedef std::function<LLAppViewer*(void)> LLAppViewerGetter;
/// Bind the LLAppViewer instance to use (e.g. LLAppViewer::instance()).
LLAppViewerListener(const LLAppViewerGetter& getter);
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index bd1a08798b..8c9da7ef28 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -76,6 +76,11 @@
#include <fstream>
#include <exception>
+// Velopack installer and update framework
+#if LL_VELOPACK
+#include "llvelopack.h"
+#endif
+
// Bugsplat (http://bugsplat.com) crash reporting tool
#ifdef LL_BUGSPLAT
#include "BugSplat.h"
@@ -180,7 +185,7 @@ namespace
LLAppViewer* app = LLAppViewer::instance();
if (!app->isSecondInstance() && !app->errorMarkerExists())
{
- // If marker doesn't exist, create a marker with 'other' code for next launch
+ // If marker doesn't exist, create a marker with 'other' or 'logout' code for next launch
// otherwise don't override existing file
// Any unmarked crashes will be considered as freezes
if (app->logoutRequestSent())
@@ -224,7 +229,6 @@ LONG WINAPI catchallCrashHandler(EXCEPTION_POINTERS * /*ExceptionInfo*/)
return 0;
}
-const std::string LLAppViewerWin32::sWindowClass = "Second Life";
#if !_M_ARM64
/*
@@ -432,6 +436,31 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
PWSTR pCmdLine,
int nCmdShow)
{
+#if LL_VELOPACK
+ // Velopack MUST be initialized first - it may handle install/uninstall
+ // commands and exit the process before we do anything else.
+ if (!velopack_initialize())
+ {
+ // Velopack handled the invocation (install/uninstall hook)
+
+ // Drop install related settings
+ gDirUtilp->initAppDirs("SecondLife");
+
+ std::string user_settings_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml");
+ LLControlGroup settings("global");
+ if (settings.loadFromFile(user_settings_path))
+ {
+ // If user reinstalls or updates, we want to recheck for nsis leftovers.
+ if (settings.controlExists("PreviousInstallChecked"))
+ {
+ settings.setBOOL("PreviousInstallChecked", false);
+ }
+ settings.saveToFile(user_settings_path, true);
+ }
+ return 0;
+ }
+#endif
+
// Call Tracy first thing to have it allocate memory
// https://github.com/wolfpld/tracy/issues/196
LL_PROFILER_FRAME_END;
@@ -949,7 +978,7 @@ bool LLAppViewerWin32::restoreErrorTrap()
bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url)
{
wchar_t window_class[256]; /* Flawfinder: ignore */ // Assume max length < 255 chars.
- mbstowcs(window_class, sWindowClass.c_str(), 255);
+ mbstowcs(window_class, sWindowClass, 255);
window_class[255] = 0;
// Use the class instead of the window name.
HWND other_window = FindWindow(window_class, NULL);
diff --git a/indra/newview/llappviewerwin32.h b/indra/newview/llappviewerwin32.h
index 3fad53ec72..0741758a0c 100644
--- a/indra/newview/llappviewerwin32.h
+++ b/indra/newview/llappviewerwin32.h
@@ -59,8 +59,6 @@ protected:
std::string generateSerialNumber();
- static const std::string sWindowClass;
-
private:
void disableWinErrorReporting();
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index a2e81ed255..9d9948731f 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -269,11 +269,11 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAvatarPropertiesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAvatarPropertiesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
std::string finalUrl = cap_url + "/" + avatar_id.asString();
@@ -473,8 +473,6 @@ void LLAvatarPropertiesProcessor::processClassifiedInfoReply(LLMessageSystem* ms
// Request processed, no longer pending
self->removePendingRequest(c_info.creator_id, APT_CLASSIFIED_INFO);
self->notifyObservers(c_info.creator_id, &c_info, APT_CLASSIFIED_INFO);
- self->removePendingRequest(c_info.classified_id, APT_CLASSIFIED_INFO);
- self->notifyObservers(c_info.classified_id, &c_info, APT_CLASSIFIED_INFO);
}
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index a490f3da10..1592629fca 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -52,9 +52,6 @@ enum EAvatarProcessorType
{
APT_PROPERTIES_LEGACY, // APT_PROPERTIES via udp request (Truncates data!!!)
APT_PROPERTIES, // APT_PROPERTIES via http request
- APT_NOTES,
- APT_GROUPS,
- APT_PICKS,
APT_PICK_INFO,
APT_TEXTURES,
APT_CLASSIFIEDS,
@@ -108,24 +105,6 @@ struct LLAvatarData
typedef std::pair<LLUUID, std::string> pick_data_t;
typedef std::list< pick_data_t> picks_list_t;
picks_list_t picks_list;
- BOOL allow_publish;
- LLAvatarData() = default;
- LLAvatarData(const LLAvatarLegacyData& legacy_data)
- {
- agent_id = legacy_data.agent_id;
- avatar_id = legacy_data.avatar_id;
- image_id = legacy_data.image_id;
- fl_image_id = legacy_data.fl_image_id;
- partner_id = legacy_data.partner_id;
- about_text = legacy_data.about_text;
- fl_about_text = legacy_data.fl_about_text;
- born_on = legacy_data.born_on;
- profile_url = legacy_data.profile_url;
- caption_index = legacy_data.caption_index;
- caption_text = legacy_data.caption_text;
- customer_type = legacy_data.customer_type;
- flags = legacy_data.flags;
- }
};
struct LLAvatarData::LLGroupData
@@ -161,45 +140,6 @@ struct LLPickData
LLUUID session_id;
};
-struct LLAvatarPicks
-{
- LLUUID agent_id;
- LLUUID target_id; //target id
-
- typedef std::pair<LLUUID,std::string> pick_data_t;
- typedef std::list< pick_data_t> picks_list_t;
- picks_list_t picks_list;
-};
-
-struct LLAvatarNotes
-{
- LLUUID agent_id;
- LLUUID target_id; //target id
- std::string notes;
-};
-
-struct LLAvatarGroups
-{
- LLUUID agent_id;
- LLUUID avatar_id; //target id
- BOOL list_in_profile;
-
- struct LLGroupData;
- typedef std::list<LLGroupData> group_list_t;
-
- group_list_t group_list;
-
- struct LLGroupData
- {
- U64 group_powers;
- BOOL accept_notices;
- std::string group_title;
- LLUUID group_id;
- std::string group_name;
- LLUUID group_insignia_id;
- };
-};
-
struct LLAvatarClassifieds
{
LLUUID agent_id;
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 44f35981b0..309bed6f8b 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -77,9 +77,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("AvatarRenderInfoAccountant", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
// Going to request each 15 seconds either way, so don't wait
// too long and don't repeat
@@ -194,9 +194,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("AvatarRenderInfoAccountant", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
// Going to request each 60+ seconds, timeout is 30s.
// Don't repeat too often, will be sending newer data soon
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 5114c97beb..c19f7dc1c1 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -187,7 +187,7 @@ public:
/*virtual*/ boost::signals2::connection setLeftButtonClickCallback(
const commit_callback_t& cb);
- typedef boost::function<void (LLChiclet* ctrl, const LLSD& param)>
+ typedef std::function<void(LLChiclet* ctrl, const LLSD& param)>
chiclet_size_changed_callback_t;
/**
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index 6f0e97a98b..b349f35921 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -54,7 +54,7 @@ public:
LLCOFCallbacks() {};
virtual ~LLCOFCallbacks() {};
- typedef boost::function<void ()> cof_callback_t;
+ typedef std::function<void()> cof_callback_t;
cof_callback_t mAddWearable;
cof_callback_t mMoveWearableCloser;
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index f21bae9805..0734b12531 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -32,7 +32,6 @@
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp>
#include <boost/tokenizer.hpp>
-#include <boost/assign/list_of.hpp>
#include "llsdserialize.h"
#include "llerror.h"
@@ -61,14 +60,7 @@ namespace
// List of command-line switches that can't map-to settings variables.
// Going forward, we want every new command-line switch to map-to some
// settings variable. This list is used to validate that.
- const std::set<std::string> unmapped_options = boost::assign::list_of
- ("help")
- ("set")
- ("setdefault")
- ("settings")
- ("sessionsettings")
- ("usersessionsettings")
- ;
+ const std::set<std::string> unmapped_options = { "help", "set", "setdefault", "settings", "sessionsettings", "usersessionsettings" };
po::options_description gOptionsDesc;
po::positional_options_description gPositionalOptions;
@@ -101,7 +93,7 @@ class LLCLPValue : public po::value_semantic_codecvt_helper<char>
unsigned mMinTokens;
unsigned mMaxTokens;
bool mIsComposing;
- typedef boost::function1<void, const LLCommandLineParser::token_vector_t&> notify_callback_t;
+ typedef std::function<void(const LLCommandLineParser::token_vector_t&)> notify_callback_t;
notify_callback_t mNotifyCallback;
bool mLastOption;
@@ -226,7 +218,7 @@ protected:
// LLCommandLineParser defintions
//----------------------------------------------------------------------------
void LLCommandLineParser::addOptionDesc(const std::string& option_name,
- boost::function1<void, const token_vector_t&> notify_callback,
+ std::function<void(const token_vector_t&)> notify_callback,
unsigned int token_count,
const std::string& description,
const std::string& short_name,
@@ -255,7 +247,7 @@ void LLCommandLineParser::addOptionDesc(const std::string& option_name,
value_desc,
description.c_str()));
- if(!notify_callback.empty())
+ if(notify_callback)
{
value_desc->setNotifyCallback(notify_callback);
}
@@ -693,7 +685,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
last_option = option_params["last_option"].asBoolean();
}
- boost::function1<void, const token_vector_t&> callback;
+ std::function<void(const token_vector_t&)> callback;
if (! option_params.has("map-to"))
{
// If this option isn't mapped to a settings variable, is it
diff --git a/indra/newview/llcommandlineparser.h b/indra/newview/llcommandlineparser.h
index 5279d02c0a..984bcfbad0 100644
--- a/indra/newview/llcommandlineparser.h
+++ b/indra/newview/llcommandlineparser.h
@@ -27,7 +27,7 @@
#ifndef LL_LLCOMMANDLINEPARSER_H
#define LL_LLCOMMANDLINEPARSER_H
-#include <boost/function/function1.hpp>
+#include <functional>
// *NOTE:Mani The following is a forward decl of
// boost::program_options::command_line_parser
@@ -58,7 +58,7 @@ public:
*/
void addOptionDesc(
const std::string& option_name,
- boost::function1<void, const token_vector_t&> notify_callback = 0,
+ std::function<void(const token_vector_t&)> notify_callback = nullptr,
unsigned int num_tokens = 0,
const std::string& description = LLStringUtil::null,
const std::string& short_name = LLStringUtil::null,
@@ -121,7 +121,7 @@ public:
* The parser_func takes an input string, and should return a
* name/value pair as the result.
*/
- typedef boost::function1<std::pair<std::string, std::string>, const std::string&> parser_func;
+ typedef std::function<std::pair<std::string, std::string>(const std::string&)> parser_func;
void setCustomParser(parser_func f) { mExtraParser = f; }
private:
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 552ea75559..e0236ca618 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -467,7 +467,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
std::string url = object->getRegion()->getCapability("UpdateScriptTask");
{
- LLResourceUploadInfo::ptr_t uploadInfo(new LLQueuedScriptAssetUpload(object->getID(),
+ LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLQueuedScriptAssetUpload>(object->getID(),
inventory->getUUID(),
assetId,
monocompile ? LLScriptAssetUpload::MONO : LLScriptAssetUpload::LSL2,
@@ -475,7 +475,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloat
inventory->getName(),
LLUUID(),
experienceId,
- boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4)));
+ boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4));
LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo);
}
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index 951d4800e8..bcbb166c58 100644
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -98,7 +98,7 @@ protected:
std::string mStartString;
bool mMono;
- typedef boost::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t;
+ typedef std::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t;
static void objectScriptProcessingQueueCoro(std::string action, LLHandle<LLFloaterScriptQueue> hfloater, object_data_list_t objectList, fnQueueAction_t func);
};
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 65a068e08d..4a4985d8ac 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -157,7 +157,10 @@ void LLConversation::setListenIMFloaterOpened()
// if floater is already opened or this conversation doesn't have unread offline messages
if (mHasOfflineIMs && !offline_ims_visible)
{
- mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversation::onIMFloaterShown, this, _1));
+ mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback([this](const LLUUID& session_id)
+ {
+ onIMFloaterShown(session_id);
+ });
}
else
{
diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp
index 20d5b0175b..e21a772f67 100644
--- a/indra/newview/llconversationloglistitem.cpp
+++ b/indra/newview/llconversationloglistitem.cpp
@@ -53,7 +53,10 @@ LLConversationLogListItem::LLConversationLogListItem(const LLConversation* conve
if (mConversation->hasOfflineMessages() && !ims_are_read)
{
- mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback(boost::bind(&LLConversationLogListItem::onIMFloaterShown, this, _1));
+ mIMFloaterShowedConnection = LLFloaterIMSession::setIMFloaterShowedCallback([this](const LLUUID& session_id)
+ {
+ onIMFloaterShown(session_id);
+ });
}
}
diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h
index 277c2aad69..d503b367e1 100644
--- a/indra/newview/lldndbutton.h
+++ b/indra/newview/lldndbutton.h
@@ -47,7 +47,7 @@ public:
LLDragAndDropButton(const Params& params);
- typedef boost::function<bool (
+ typedef std::function<bool (
S32 /*x*/, S32 /*y*/, MASK /*mask*/, bool /*drop*/,
EDragAndDropType /*cargo_type*/,
void* /*cargo_data*/,
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 9d212cfe8b..322ee90541 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -925,7 +925,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin();
LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box);
mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f));
- mVObjp->updateLOD();
+ if (mVObjp)
+ {
+ mVObjp->updateLOD();
+ }
return;
}
}
@@ -936,7 +939,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
pos -= camera.getOrigin();
mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f);
- mVObjp->updateLOD();
+ if (mVObjp)
+ {
+ mVObjp->updateLOD();
+ }
}
}
@@ -948,6 +954,11 @@ void LLDrawable::updateTexture()
return;
}
+ if (!mVObjp)
+ {
+ return;
+ }
+
if (getNumFaces() != mVObjp->getNumTEs())
{ //drawable is transitioning its face count
return;
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index a7ac9da618..6f6faf9909 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -67,17 +67,8 @@ class LLDrawable
public:
typedef std::vector<LLFace*> face_list_t;
- LLDrawable(const LLDrawable& rhs)
- : LLViewerOctreeEntryData(rhs)
- {
- *this = rhs;
- }
-
- const LLDrawable& operator=(const LLDrawable& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLDrawable(const LLDrawable& rhs) = delete;
+ const LLDrawable& operator=(const LLDrawable& rhs) = delete;
static void initClass();
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 87b6ce6cb3..bc45734e66 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -278,7 +278,7 @@ void LLDrawPoolAlpha::forwardRender(bool rigged)
void LLDrawPoolAlpha::renderDebugAlpha()
{
- if (sShowDebugAlpha)
+ if (sShowDebugAlpha && !gCubeSnapshot)
{
gHighlightProgram.bind();
gGL.diffuseColor4f(1, 0, 0, 1);
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 90ee95d424..f0f589e7f4 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -794,7 +794,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- if ((sShaderLevel >= SHADER_LEVEL_CLOTH))
+ if (LLPipeline::RenderAvatarCloth)
{
LLMatrix4 rot_mat;
LLViewerCamera::getInstance()->getMatrixToLocal(rot_mat);
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 1a53861a03..87a87e225e 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -46,12 +46,6 @@ class LLDrawPoolAvatar : public LLFacePool
public:
enum
{
- SHADER_LEVEL_BUMP = 2,
- SHADER_LEVEL_CLOTH = 3
- };
-
- enum
- {
VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_NORMAL |
LLVertexBuffer::MAP_TEXCOORD0 |
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index ea2bc74daa..1affef18db 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -55,8 +55,6 @@
// static
LLStandardBumpmap gStandardBumpmapList[TEM_BUMPMAP_COUNT];
-LL::WorkQueue::weak_t LLBumpImageList::sMainQueue;
-LL::WorkQueue::weak_t LLBumpImageList::sTexUpdateQueue;
LLRenderTarget LLBumpImageList::sRenderTarget;
// static
@@ -629,8 +627,6 @@ void LLBumpImageList::init()
llassert( mDarknessEntries.size() == 0 );
LLStandardBumpmap::restoreGL();
- sMainQueue = LL::WorkQueue::getInstance("mainloop");
- sTexUpdateQueue = LL::WorkQueue::getInstance("LLImageGL"); // Share work queue with tex loader.
}
void LLBumpImageList::clear()
diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h
index 15976884ca..e1a468cd18 100644
--- a/indra/newview/lldrawpoolbump.h
+++ b/indra/newview/lldrawpoolbump.h
@@ -152,8 +152,6 @@ private:
typedef std::unordered_map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t;
bump_image_map_t mBrightnessEntries;
bump_image_map_t mDarknessEntries;
- static LL::WorkQueue::weak_t sMainQueue;
- static LL::WorkQueue::weak_t sTexUpdateQueue;
static LLRenderTarget sRenderTarget;
};
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 305215f541..e6d0b036e0 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -32,7 +32,6 @@
#include "llface.h"
#include "llimage.h"
#include "llrender.h"
-#include "llatmosphere.h"
#include "llenvironment.h"
#include "llglslshader.h"
#include "llgl.h"
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 875dac103c..d942715fff 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -54,7 +54,6 @@
#include "llregioninfomodel.h"
-#include "llatmosphere.h"
#include "llagent.h"
#include "roles_constants.h"
#include "llestateinfomodel.h"
@@ -965,54 +964,6 @@ LLSettingsWater::ptr_t LLEnvironment::getCurrentWater() const
return pwater;
}
-void LayerConfigToDensityLayer(const LLSD& layerConfig, DensityLayer& layerOut)
-{
- layerOut.constant_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM].asReal();
- layerOut.exp_scale = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR].asReal();
- layerOut.exp_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM].asReal();
- layerOut.linear_term = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM].asReal();
- layerOut.width = (F32)layerConfig[LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH].asReal();
-}
-
-void LLEnvironment::getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky)
-{
- settingsOut.m_skyBottomRadius = psky->getSkyBottomRadius();
- settingsOut.m_skyTopRadius = psky->getSkyTopRadius();
- settingsOut.m_sunArcRadians = psky->getSunArcRadians();
- settingsOut.m_mieAnisotropy = psky->getMieAnisotropy();
-
- LLSD rayleigh = psky->getRayleighConfigs();
- settingsOut.m_rayleighProfile.clear();
- for (LLSD::array_iterator itf = rayleigh.beginArray(); itf != rayleigh.endArray(); ++itf)
- {
- DensityLayer layer;
- LLSD& layerConfig = (*itf);
- LayerConfigToDensityLayer(layerConfig, layer);
- settingsOut.m_rayleighProfile.push_back(layer);
- }
-
- LLSD mie = psky->getMieConfigs();
- settingsOut.m_mieProfile.clear();
- for (LLSD::array_iterator itf = mie.beginArray(); itf != mie.endArray(); ++itf)
- {
- DensityLayer layer;
- LLSD& layerConfig = (*itf);
- LayerConfigToDensityLayer(layerConfig, layer);
- settingsOut.m_mieProfile.push_back(layer);
- }
- settingsOut.m_mieAnisotropy = psky->getMieAnisotropy();
-
- LLSD absorption = psky->getAbsorptionConfigs();
- settingsOut.m_absorptionProfile.clear();
- for (LLSD::array_iterator itf = absorption.beginArray(); itf != absorption.endArray(); ++itf)
- {
- DensityLayer layer;
- LLSD& layerConfig = (*itf);
- LayerConfigToDensityLayer(layerConfig, layer);
- settingsOut.m_absorptionProfile.push_back(layer);
- }
-}
-
bool LLEnvironment::canAgentUpdateParcelEnvironment() const
{
LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel());
@@ -2022,8 +1973,8 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExtEnvironment");
if (url.empty())
@@ -2070,8 +2021,8 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExtEnvironment");
if (url.empty())
@@ -2186,8 +2137,8 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ResetEnvironment", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExtEnvironment");
if (url.empty())
@@ -2743,13 +2694,6 @@ bool LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
mSky->update();
mBlenderSky.reset();
- if (gAtmosphere)
- {
- AtmosphericModelSettings settings;
- LLEnvironment::getAtmosphericModelSettings(settings, psky);
- gAtmosphere->configureAtmosphericModel(settings);
- }
-
return changed;
}
@@ -3418,8 +3362,8 @@ namespace
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("testExperiencesOnParcelCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("testExperiencesOnParcelCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = gAgent.getRegionCapability("ExperienceQuery");
if (url.empty())
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index e56548d618..559a34bc47 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -38,8 +38,6 @@
#include "llsettingswater.h"
#include "llsettingsdaycycle.h"
-#include "llatmosphere.h"
-
#include "llglslshader.h"
#include <boost/signals2.hpp>
@@ -133,8 +131,6 @@ public:
LLSettingsSky::ptr_t getCurrentSky() const;
LLSettingsWater::ptr_t getCurrentWater() const;
- static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky);
-
void update(const LLViewerCamera * cam);
static void updateGLVariablesForSettings(LLShaderUniforms* uniforms, const LLSettingsBase::ptr_t &psetting);
diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp
index a7d18d85ce..54be045c3d 100644
--- a/indra/newview/llestateinfomodel.cpp
+++ b/indra/newview/llestateinfomodel.cpp
@@ -138,8 +138,8 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EstateChangeInfo", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EstateChangeInfo", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD body;
body["estate_name"] = getName();
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index 16897e9ebd..66a922e288 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -166,28 +166,19 @@ bool LLEventNotifier::handleResponse(U32 eventId, const LLSD& notification, cons
return true;
}
-bool LLEventNotifier::add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName)
+bool LLEventNotifier::add(LLEventInfo event)
{
- LLEventNotification *new_enp = new LLEventNotification(eventId, eventEpoch, eventDateStr, eventName);
-
- LL_INFOS() << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << LL_ENDL;
- if(!new_enp->isValid())
- {
- delete new_enp;
+ if (mEventInfoSignal(event))
return false;
- }
-
- mEventNotifications[new_enp->getEventID()] = new_enp;
- return true;
+ return add(event.mID, event.mUnixTime, event.mTimeStr, event.mName);
}
-bool LLEventNotifier::add(const LLEventStruct& event)
+bool LLEventNotifier::add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName)
{
- if (mNewEventSignal(event)) return false;
- LLEventNotification *new_enp = new LLEventNotification(event.eventId, event.eventEpoch, event.eventDateStr, event.eventName);
+ LLEventNotification *new_enp = new LLEventNotification(eventId, eventEpoch, eventDateStr, eventName);
- LL_INFOS() << "Add event " << event.eventName << " id " << event.eventId << " date " << event.eventDateStr << LL_ENDL;
+ LL_INFOS() << "Add event " << eventName << " id " << eventId << " date " << eventDateStr << LL_ENDL;
if(!new_enp->isValid())
{
delete new_enp;
@@ -215,34 +206,9 @@ void LLEventNotifier::add(U32 eventId)
//static
void LLEventNotifier::processEventInfoReply(LLMessageSystem *msg, void **)
{
- // extract the agent id
- LLUUID agent_id;
- U32 event_id;
- std::string event_name;
- std::string eventd_date;
- U32 event_time_utc;
-
- msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
- msg->getU32("EventData", "EventID", event_id);
- msg->getString("EventData", "Name", event_name);
- msg->getString("EventData", "Date", eventd_date);
- msg->getU32("EventData", "DateUTC", event_time_utc);
-
- //gEventNotifier.add(event_id, (F64)event_time_utc, eventd_date, event_name);
-
- LLEventStruct event(event_id, (F64)event_time_utc, eventd_date, event_name);
- msg->getString("EventData", "Creator", event.creator);
- msg->getString("EventData", "Category", event.category);
- msg->getString("EventData", "Desc", event.desc);
- msg->getU32("EventData", "Duration", event.duration);
- msg->getU32("EventData", "Cover", event.cover);
- msg->getU32("EventData", "Amount", event.amount);
- msg->getString("EventData", "SimName", event.simName);
- msg->getVector3d("EventData", "GlobalPos", event.globalPos);
- msg->getU32("EventData", "EventFlags", event.flags);
-
- gEventNotifier.add(event);
-
+ LLEventInfo info;
+ info.unpack(msg);
+ gEventNotifier.add(info);
}
@@ -280,15 +246,11 @@ void LLEventNotifier::load(const LLSD& event_options)
substitution["datetime"] = date;
LLStringUtil::format(dateStr, substitution);
- //add(response["event_id"].asInteger(), response["event_date_ut"], dateStr, response["event_name"].asString());
- LLEventStruct event(response["event_id"].asInteger(), response["event_date_ut"], dateStr, response["event_name"].asString());
- add(event);
+ add(response["event_id"].asInteger(), response["event_date_ut"], dateStr, response["event_name"].asString());
}
else
{
- //add(response["event_id"].asInteger(), response["event_date_ut"], response["event_date"].asString(), response["event_name"].asString());
- LLEventStruct event(response["event_id"].asInteger(), response["event_date_ut"], response["event_date"].asString(), response["event_name"].asString());
- add(event);
+ add(response["event_id"].asInteger(), response["event_date_ut"], response["event_date"].asString(), response["event_name"].asString());
}
}
}
@@ -322,21 +284,67 @@ void LLEventNotifier::remove(const U32 event_id)
void LLEventNotifier::serverPushRequest(U32 event_id, bool add)
{
// Push up a message to tell the server we have this notification.
- gMessageSystem->newMessageFast(add ? _PREHASH_EventNotificationAddRequest : _PREHASH_EventNotificationRemoveRequest);
+ gMessageSystem->newMessage(add?"EventNotificationAddRequest":"EventNotificationRemoveRequest");
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- gMessageSystem->nextBlockFast(_PREHASH_EventData);
- gMessageSystem->addU32Fast(_PREHASH_EventID, event_id);
+ gMessageSystem->nextBlock("EventData");
+ gMessageSystem->addU32("EventID", event_id);
gAgent.sendReliableMessage();
}
+void LLEventInfo::unpack(LLMessageSystem* msg)
+{
+ U32 event_id;
+ msg->getU32("EventData", "EventID", event_id);
+ mID = event_id;
+
+ msg->getString("EventData", "Name", mName);
+
+ msg->getString("EventData", "Category", mCategoryStr);
+
+ msg->getString("EventData", "Date", mTimeStr);
+
+ U32 duration;
+ msg->getU32("EventData", "Duration", duration);
+ mDuration = duration;
+
+ U32 date;
+ msg->getU32("EventData", "DateUTC", date);
+ mUnixTime = date;
+
+ msg->getString("EventData", "Desc", mDesc);
+
+ std::string buffer;
+ msg->getString("EventData", "Creator", buffer);
+ mRunByID = LLUUID(buffer);
+
+ U32 foo;
+ msg->getU32("EventData", "Cover", foo);
+
+ mHasCover = foo ? true : false;
+ if (mHasCover)
+ {
+ U32 cover;
+ msg->getU32("EventData", "Amount", cover);
+ mCover = cover;
+ }
+
+ msg->getString("EventData", "SimName", mSimName);
+
+ msg->getVector3d("EventData", "GlobalPos", mPosGlobal);
+
+ // Mature content
+ U32 event_flags;
+ msg->getU32("EventData", "EventFlags", event_flags);
+ mEventFlags = event_flags;
+}
-LLEventNotification::LLEventNotification(U32 eventId, F64 eventEpoch, std::string eventDateStr, std::string eventName) :
+LLEventNotification::LLEventNotification(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName) :
mEventID(eventId),
- mEventName(std::move(eventName)),
+ mEventName(eventName),
mEventDateEpoch(eventEpoch),
- mEventDateStr(std::move(eventDateStr))
+ mEventDateStr(eventDateStr)
{
}
diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h
index f013f6d02e..2a9295129d 100644
--- a/indra/newview/lleventnotifier.h
+++ b/indra/newview/lleventnotifier.h
@@ -27,31 +27,30 @@
#ifndef LL_LLEVENTNOTIFIER_H
#define LL_LLEVENTNOTIFIER_H
-#include <utility>
#include "llframetimer.h"
#include "v3dmath.h"
class LLEventNotification;
class LLMessageSystem;
-typedef struct event_st{
- U32 eventId = 0;
- F64 eventEpoch = 0.0;
- std::string eventDateStr;
- std::string eventName;
- std::string creator;
- std::string category;
- std::string desc;
- U32 duration = 0;
- U32 cover = 0;
- U32 amount = 0;
- std::string simName;
- LLVector3d globalPos;
- U32 flags = 0;
- event_st(U32 id, F64 epoch, std::string date_str, std::string name)
- : eventId(id), eventEpoch(epoch), eventDateStr(std::move(date_str)), eventName(std::move(name)){}
- event_st() = default;
-} LLEventStruct;
+struct LLEventInfo
+{
+ void unpack(LLMessageSystem* msg);
+
+ std::string mName;
+ U32 mID;
+ std::string mDesc;
+ std::string mCategoryStr;
+ U32 mDuration;
+ std::string mTimeStr;
+ LLUUID mRunByID;
+ std::string mSimName;
+ LLVector3d mPosGlobal;
+ F64 mUnixTime; // seconds from 1970
+ BOOL mHasCover;
+ U32 mCover;
+ U32 mEventFlags;
+};
class LLEventNotifier
{
@@ -60,8 +59,8 @@ public:
virtual ~LLEventNotifier();
void update(); // Notify the user of the event if it's coming up
- bool add(const LLEventStruct& event);
bool add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName);
+ bool add(LLEventInfo event);
void add(U32 eventId);
@@ -76,23 +75,20 @@ public:
static void processEventInfoReply(LLMessageSystem *msg, void **);
- typedef boost::signals2::signal<bool(LLEventStruct event)> new_event_signal_t;
- new_event_signal_t mNewEventSignal;
- boost::signals2::connection setNewEventCallback(const new_event_signal_t::slot_type& cb)
- {
- return mNewEventSignal.connect(cb);
- };
+ typedef boost::signals2::signal<bool(LLEventInfo event)> info_received_signal_t;
+ boost::signals2::connection setEventInfoCallback(const info_received_signal_t::slot_type& cb) { return mEventInfoSignal.connect(cb); };
protected:
en_map mEventNotifications;
- LLFrameTimer mNotificationTimer;
+ LLFrameTimer mNotificationTimer;
+ info_received_signal_t mEventInfoSignal;
};
class LLEventNotification
{
public:
- LLEventNotification(U32 eventId, F64 eventEpoch, std::string eventDateStr, std::string eventName);
+ LLEventNotification(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName);
U32 getEventID() const { return mEventID; }
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 86c58a3497..f1b46f0533 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -56,6 +56,7 @@ namespace Details
private:
void eventPollCoro(std::string url);
+ void handleMessage(const std::string& msg_name, const LLSD& body);
void handleMessage(const LLSD &content);
bool mDone;
@@ -90,26 +91,28 @@ namespace Details
{
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
- mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest);
+ mHttpRequest = std::make_shared<LLCore::HttpRequest>();
mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_LONG_POLL);
mSenderIp = sender.getIPandPort();
}
+ void LLEventPollImpl::handleMessage(const std::string &msg_name, const LLSD &body)
+ {
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
+ LLSD message;
+ message["sender"] = mSenderIp;
+ message["body"] = body;
+
+ LLMessageSystem::dispatch(msg_name, message);
+ }
+
void LLEventPollImpl::handleMessage(const LLSD& content)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_APP;
std::string msg_name = content["message"].asString();
LLSD message;
- try
- {
- message["sender"] = mSenderIp;
- message["body"] = content["body"];
- }
- catch (std::bad_alloc&)
- {
- LLError::LLUserWarningMsg::showOutOfMemory();
- LL_ERRS("LLCoros") << "Bad memory allocation on message: " << msg_name << LL_ENDL;
- }
+ message["sender"] = mSenderIp;
+ message["body"] = content["body"];
LLMessageSystem::dispatch(msg_name, message);
}
@@ -144,7 +147,7 @@ namespace Details
void LLEventPollImpl::eventPollCoro(std::string url)
{
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EventPoller", mHttpPolicy));
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EventPoller", mHttpPolicy);
LLSD acknowledge;
int errorCount = 0;
int counter = mCounter; // saved on the stack for logging.
@@ -156,7 +159,7 @@ namespace Details
// This is a loop with its own waitToRetry implementation,
// so disable retries.
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setRetries(0);
LL::WorkQueue::ptr_t main_queue = nullptr;
@@ -194,7 +197,7 @@ namespace Details
break;
}
- LLSD httpResults = result["http_result"];
+ LLSD &httpResults = result["http_result"];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
if (!status)
@@ -299,7 +302,7 @@ namespace Details
}
acknowledge = result["id"];
- LLSD events = result["events"];
+ LLSD &events = result["events"];
if (acknowledge.isUndefined())
{
@@ -310,20 +313,37 @@ namespace Details
LL_DEBUGS("LLEventPollImpl") << " <" << counter << "> " << events.size() << "events (id " << acknowledge << ")" << LL_ENDL;
- LLSD::array_const_iterator i = events.beginArray();
- LLSD::array_const_iterator end = events.endArray();
+ LLSD::array_iterator i = events.beginArray();
+ LLSD::array_iterator end = events.endArray();
for (; i != end; ++i)
{
if (i->has("message"))
{
if (main_queue)
- { // shuttle to a sensible spot in the main thread instead
+ {
+ // Shuttle copy to a sensible spot in the main thread instead
// of wherever this coroutine happens to be executing
- const LLSD& msg = *i;
- main_queue->post([this, msg]()
+
+ LL::WorkQueue::Work work;
+ {
+ // LLSD is too smart for it's own good and may act like a smart
+ // pointer for the content of (*i), so instead of passing (*i)
+ // pass a prepared name and move ownership of "body",
+ // as we are not going to need "body" anywhere else.
+ std::string msg_name = (*i)["message"].asString();
+
+ // WARNING: This is a shallow copy!
+ // If something still retains the data (like in httpAdapter?) this might still
+ // result in a crash, if it does appear to be the case, make a deep copy or
+ // convert data to string and pass that string.
+ const LLSD body = (*i)["body"];
+ (*i)["body"].clear();
+ work = [this, msg_name, body]()
{
- handleMessage(msg);
- });
+ handleMessage(msg_name, body);
+ };
+ }
+ main_queue->post(work);
}
else
{
diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp
index ce10fba2ca..b86474c5ca 100644
--- a/indra/newview/llexperiencelog.cpp
+++ b/indra/newview/llexperiencelog.cpp
@@ -279,6 +279,6 @@ void LLExperienceLog::setNotifyNewEvent( bool val )
}
else if( val && !mNotifyConnection.connected())
{
- mNotifyConnection = addUpdateSignal(boost::function<void(LLSD&)>(LLExperienceLog::notify));
+ mNotifyConnection = addUpdateSignal(std::function<void(LLSD&)>(LLExperienceLog::notify));
}
}
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index 3decd15bbd..cc4e8973c4 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -44,8 +44,26 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env
std::string cmd = findCommand(env_var, override);
if (cmd.empty())
{
- LL_WARNS() << "Editor command is empty or not set" << LL_ENDL;
- return EC_NOT_SPECIFIED;
+ LL_INFOS() << "Editor command is empty or not set, falling back to OS open handler" << LL_ENDL;
+#if LL_WINDOWS
+ std::string os_cmd = LLStringUtil::getenv("SystemRoot", "");
+ if (!os_cmd.empty())
+ {
+ os_cmd.append("\\explorer.exe \"%s\"");
+ }
+#elif LL_DARWIN
+ static const std::string os_cmd = "/usr/bin/open -t \"%s\"";
+#elif LL_LINUX
+ static const std::string os_cmd = "/usr/bin/xdg-open \"%s\"";
+#elif __FreeBSD__
+ static const std::string os_cmd = "/usr/local/bin/xdg-open \"%s\"";
+#endif
+ cmd = findCommand("", os_cmd);
+ if (cmd.empty())
+ {
+ LL_WARNS() << "Failed to find OS open handler \"" << cmd << "\"" << LL_ENDL;
+ return EC_NOT_SPECIFIED;
+ }
}
string_vec_t tokens;
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 65637fbf85..df31e9ea90 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -58,16 +58,8 @@ class alignas(16) LLFace
{
LL_ALIGN_NEW
public:
- LLFace(const LLFace& rhs)
- {
- *this = rhs;
- }
-
- const LLFace& operator=(const LLFace& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLFace(const LLFace& rhs) = delete;
+ const LLFace& operator=(const LLFace& rhs) = delete;
enum EMasks
{
@@ -127,7 +119,7 @@ public:
void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index; }
void setWorldMatrix(const LLMatrix4& mat);
- const LLTextureEntry* getTextureEntry() const { return mVObjp->getTE(mTEOffset); }
+ const LLTextureEntry* getTextureEntry() const { return mVObjp ? mVObjp->getTE(mTEOffset) : nullptr; }
LLFacePool* getPool() const { return mDrawPoolp; }
U32 getPoolType() const { return mPoolType; }
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 377710c170..98b3ca820b 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -1395,6 +1395,19 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata)
{
return !LLAgentPicksInfo::getInstance()->isPickLimitReached();
}
+ else if (param == "copy_slurl"
+ || param == "show_on_map")
+ {
+ LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID);
+ if (nullptr == item)
+ return false; // shouldn't happen as it is selected from existing items
+
+ const LLUUID& asset_id = item->getAssetUUID();
+
+ // Favorites are supposed to be loaded first, it should be here already
+ LLLandmark* landmark = gLandmarkList.getAsset(asset_id, NULL /*callback*/);
+ return nullptr != landmark;
+ }
return false;
}
@@ -1425,10 +1438,17 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
LLVector3d posGlobal;
LLLandmarkActions::getLandmarkGlobalPos(mSelectedItemID, posGlobal);
+ // inventory item and asset exist, otherwise
+ // enableSelected wouldn't have let it get here,
+ // only need to check location validity
if (!posGlobal.isExactlyZero())
{
LLLandmarkActions::getSLURLfromPosGlobal(posGlobal, copy_slurl_to_clipboard_cb);
}
+ else
+ {
+ LLNotificationsUtil::add("LandmarkLocationUnknown");
+ }
}
else if (action == "show_on_map")
{
@@ -1437,10 +1457,20 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
LLVector3d posGlobal;
LLLandmarkActions::getLandmarkGlobalPos(mSelectedItemID, posGlobal);
- if (!posGlobal.isExactlyZero() && worldmap_instance)
+ if (worldmap_instance)
{
- worldmap_instance->trackLocation(posGlobal);
- LLFloaterReg::showInstance("world_map", "center");
+ // inventory item and asset exist, otherwise
+ // enableSelected wouldn't have let it get here,
+ // only need to check location validity
+ if (!posGlobal.isExactlyZero())
+ {
+ worldmap_instance->trackLocation(posGlobal);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
+ else
+ {
+ LLNotificationsUtil::add("LandmarkLocationUnknown");
+ }
}
}
else if (action == "create_pick")
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 9e69fcef29..68443dfc5b 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -30,7 +30,6 @@
#include <fstream>
#include <boost/regex.hpp>
-#include <boost/assign/list_of.hpp>
#include "llfeaturemanager.h"
#include "lldir.h"
@@ -184,15 +183,15 @@ void LLFeatureList::dump()
}
}
-static const std::vector<std::string> sGraphicsLevelNames = boost::assign::list_of
- ("Low")
- ("LowMid")
- ("Mid")
- ("MidHigh")
- ("High")
- ("HighUltra")
- ("Ultra")
-;
+static const std::vector<std::string> sGraphicsLevelNames = {
+ "Low",
+ "LowMid",
+ "Mid",
+ "MidHigh",
+ "High",
+ "HighUltra",
+ "Ultra"
+};
U32 LLFeatureManager::getMaxGraphicsLevel() const
{
@@ -496,7 +495,9 @@ bool LLFeatureManager::loadGPUClass()
{
mGPUClass = GPU_CLASS_2;
}
- else if (gbps <= class1_gbps*4.f)
+ else if ((gbps <= class1_gbps*4.f)
+ // Cap silicon's GPUs at med+ as they have high throughput, low capability
+ || gGLManager.mIsApple)
{
mGPUClass = GPU_CLASS_3;
}
diff --git a/indra/newview/llfilepicker_mac.h b/indra/newview/llfilepicker_mac.h
index 77cc8540bc..d0374c5a08 100644
--- a/indra/newview/llfilepicker_mac.h
+++ b/indra/newview/llfilepicker_mac.h
@@ -42,6 +42,9 @@
std::unique_ptr<std::vector<std::string>> doLoadDialog(const std::vector<std::string>* allowed_types,
unsigned int flags);
+// doLoadDialogModeless if window does not exists creates a modeless
+// window, if it does exist, creates a 'sheet' that does not block
+// thread but blocks window interractions
void doLoadDialogModeless(const std::vector<std::string>* allowed_types,
unsigned int flags,
void (*callback)(bool, std::vector<std::string>&, void*),
diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm
index 6cb7c4ad51..6921cd6101 100644
--- a/indra/newview/llfilepicker_mac.mm
+++ b/indra/newview/llfilepicker_mac.mm
@@ -114,38 +114,73 @@ void doLoadDialogModeless(const std::vector<std::string>* allowed_types,
@autoreleasepool
{
- // Note: might need to return and save this panel
- // so that it does not close immediately
NSOpenPanel *panel = init_panel(allowed_types,flags);
+ NSWindow *mainWindow = [NSApp mainWindow];
- [panel beginWithCompletionHandler:^(NSModalResponse result)
+ if (mainWindow)
{
- std::vector<std::string> outfiles;
- if (result == NSModalResponseOK)
+ [panel beginSheetModalForWindow:mainWindow
+ completionHandler:^(NSModalResponse result)
{
- NSArray *filesToOpen = [panel URLs];
- int i, count = [filesToOpen count];
-
- if (count > 0)
+ std::vector<std::string> outfiles;
+ if (result == NSModalResponseOK)
{
+ NSArray *filesToOpen = [panel URLs];
+ int i, count = [filesToOpen count];
- for (i=0; i<count; i++) {
- NSString *aFile = [[filesToOpen objectAtIndex:i] path];
- std::string *afilestr = new std::string([aFile UTF8String]);
- outfiles.push_back(*afilestr);
+ if (count > 0)
+ {
+
+ for (i=0; i<count; i++) {
+ NSString *aFile = [[filesToOpen objectAtIndex:i] path];
+ std::string *afilestr = new std::string([aFile UTF8String]);
+ outfiles.push_back(*afilestr);
+ }
+ callback(true, outfiles, userdata);
+ }
+ else // no valid result
+ {
+ callback(false, outfiles, userdata);
}
- callback(true, outfiles, userdata);
}
- else // no valid result
+ else // cancel
{
callback(false, outfiles, userdata);
}
- }
- else // cancel
+ }];
+ }
+ else
+ {
+ //present as modeless window
+ [panel beginWithCompletionHandler:^(NSModalResponse result)
{
- callback(false, outfiles, userdata);
- }
- }];
+ std::vector<std::string> outfiles;
+ if (result == NSModalResponseOK)
+ {
+ NSArray *filesToOpen = [panel URLs];
+ int i, count = [filesToOpen count];
+
+ if (count > 0)
+ {
+
+ for (i=0; i<count; i++) {
+ NSString *aFile = [[filesToOpen objectAtIndex:i] path];
+ std::string *afilestr = new std::string([aFile UTF8String]);
+ outfiles.push_back(*afilestr);
+ }
+ callback(true, outfiles, userdata);
+ }
+ else // no valid result
+ {
+ callback(false, outfiles, userdata);
+ }
+ }
+ else // cancel
+ {
+ callback(false, outfiles, userdata);
+ }
+ }];
+ }
}
}
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index 25970f8a08..95e7b9af41 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -716,7 +716,7 @@ void LLFloater360Capture::onSaveLocalBtn()
{
// region name and URL
std::string region_name; // no sensible default
- std::string region_url("http://secondlife.com");
+ std::string region_url("https://secondlife.com");
LLViewerRegion* region = gAgent.getRegion();
if (region)
{
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index a6419f5ad4..05f6c4a867 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -105,7 +105,7 @@ private:
static const std::string sCheckUpdateListenerName;
static void startFetchServerReleaseNotes();
- static void fetchServerReleaseNotesCoro(const std::string& cap_url);
+ static void fetchServerReleaseNotesCoro(const std::string cap_url);
static void handleServerReleaseNotes(LLSD results);
};
@@ -227,12 +227,12 @@ void LLFloaterAbout::startFetchServerReleaseNotes()
}
/*static*/
-void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string& cap_url)
+void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string cap_url)
{
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 08a54b7369..c7851013c7 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -34,6 +34,7 @@
#include "llfloaterreg.h"
#include "llimview.h" // for gIMMgr
#include "lltooldraganddrop.h" // for LLToolDragAndDrop
+#include "lltrans.h"
#include "llviewercontrol.h"
#include "llviewerregion.h" // getCapability()
#include "llworld.h"
@@ -405,15 +406,50 @@ bool LLFloaterAvatarPicker::visibleItemsSelected() const
}
/*static*/
-void LLFloaterAvatarPicker::findCoro(std::string url, LLUUID queryID, std::string name)
+void LLFloaterAvatarPicker::findByIdCoro(std::string url, LLUUID query_id, LLUUID agent_id, std::string floater_key)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("findByIdCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
- LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL;
+ httpOpts->setTimeout(AVATAR_PICKER_SEARCH_TIMEOUT);
+
+ LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
+
+ LL_DEBUGS("Agent") << result << LL_ENDL;
+
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+ if (status || (status == LLCore::HttpStatus(HTTP_BAD_REQUEST)))
+ {
+ result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
+ }
+ else
+ {
+ result["failure_reason"] = status.toString();
+ }
+
+ LLFloaterAvatarPicker* floater =
+ LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker", floater_key);
+ if (floater)
+ {
+ floater->processResponse(query_id, result);
+ }
+}
+
+/*static*/
+void LLFloaterAvatarPicker::findByNameCoro(std::string url, LLUUID queryID, std::string name)
+{
+ LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("findByNameCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+
+ LL_INFOS("HttpCoroutineAdapter", "genericPostCoro", "Agent") << "Generic POST for " << url << LL_ENDL;
httpOpts->setTimeout(AVATAR_PICKER_SEARCH_TIMEOUT);
@@ -447,6 +483,7 @@ void LLFloaterAvatarPicker::find()
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
+ LLUUID agent_id;
size_t separator_index = text.find_first_of(" ._");
if (separator_index != text.npos)
{
@@ -458,51 +495,92 @@ void LLFloaterAvatarPicker::find()
text = first;
}
}
+ else if (!text.empty())
+ {
+ agent_id.set(text);
+ }
mQueryID.generate();
+ mNumResultsReturned = 0;
- std::string url;
- url.reserve(128); // avoid a memory allocation or two
+ getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems();
+ getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching"));
+ getChildView("ok_btn")->setEnabled(false);
- LLViewerRegion* region = gAgent.getRegion();
- if(region)
+ if (agent_id.notNull())
{
- url = region->getCapability("AvatarPickerSearch");
- // Prefer use of capabilities to search on both SLID and display name
- if (!url.empty())
+ // Search by uuid
+ // While cache could have been nicer, it neither has a failure callback, nor
+ // can cleanup in case of an invalid uuid. So we go directly to the capability.
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
{
- // capability urls don't end in '/', but we need one to parse
- // query parameters correctly
- if (url.size() > 0 && url[url.size()-1] != '/')
+ std::string url;
+ url.reserve(128);
+ url = region->getCapability("GetDisplayNames");
+ if (!url.empty())
{
- url += "/";
- }
- url += "?page_size=100&names=";
- std::replace(text.begin(), text.end(), '.', ' ');
- url += LLURI::escape(text);
- LL_INFOS() << "avatar picker " << url << LL_ENDL;
+ // capability urls don't end in '/', but we need one to parse
+ // query parameters correctly
+ if (url[url.size() - 1] != '/')
+ {
+ url += "/";
+ }
+ url += "?ids=";
+ url += agent_id.asString();
+ LL_DEBUGS("Agent") << "avatar picker " << url << LL_ENDL;
- LLCoros::instance().launch("LLFloaterAvatarPicker::findCoro",
- boost::bind(&LLFloaterAvatarPicker::findCoro, url, mQueryID, getKey().asString()));
+ LLCoros::instance().launch("LLFloaterAvatarPicker::findCoro",
+ boost::bind(&LLFloaterAvatarPicker::findByIdCoro, url, mQueryID, agent_id, getKey().asString()));
+ }
+ else
+ {
+ LLSD content;
+ content["failure_reason"] = LLTrans::getString("ServerUnavailable");
+ processResponse(mQueryID, content);
+ }
}
- else
+ }
+ else
+ {
+ std::string url;
+ url.reserve(128); // avoid a memory allocation or two
+
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("AvatarPickerRequest");
- msg->nextBlock("AgentData");
- msg->addUUID("AgentID", gAgent.getID());
- msg->addUUID("SessionID", gAgent.getSessionID());
- msg->addUUID("QueryID", mQueryID); // not used right now
- msg->nextBlock("Data");
- msg->addString("Name", text);
- gAgent.sendReliableMessage();
+ url = region->getCapability("AvatarPickerSearch");
+ // Prefer use of capabilities to search on both SLID and display name
+ if (!url.empty())
+ {
+ // capability urls don't end in '/', but we need one to parse
+ // query parameters correctly
+ if (url.size() > 0 && url[url.size() - 1] != '/')
+ {
+ url += "/";
+ }
+ url += "?page_size=100&names=";
+ std::replace(text.begin(), text.end(), '.', ' ');
+ url += LLURI::escape(text);
+ LL_DEBUGS("Agent") << "avatar picker " << url << LL_ENDL;
+
+ LLCoros::instance().launch("LLFloaterAvatarPicker::findCoro",
+ boost::bind(&LLFloaterAvatarPicker::findByNameCoro, url, mQueryID, getKey().asString()));
+ }
+ else
+ {
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessage("AvatarPickerRequest");
+ msg->nextBlock("AgentData");
+ msg->addUUID("AgentID", gAgent.getID());
+ msg->addUUID("SessionID", gAgent.getSessionID());
+ msg->addUUID("QueryID", mQueryID); // not used right now
+ msg->nextBlock("Data");
+ msg->addString("Name", text);
+ gAgent.sendReliableMessage();
+ }
}
}
- getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems();
- getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching"));
-
- getChildView("ok_btn")->setEnabled(false);
- mNumResultsReturned = 0;
}
void LLFloaterAvatarPicker::setAllowMultiple(bool allow_multiple)
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 330f1a1226..1761497f83 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -43,7 +43,7 @@ public:
typedef validate_signal_t::slot_type validate_callback_t;
// The callback function will be called with an avatar name and UUID.
- typedef boost::function<void (const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
// Call this to select an avatar.
static LLFloaterAvatarPicker* show(select_callback_t callback,
bool allow_multiple = false,
@@ -86,7 +86,8 @@ private:
void populateFriend();
bool visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
- static void findCoro(std::string url, LLUUID mQueryID, std::string mName);
+ static void findByIdCoro(std::string url, LLUUID query_id, LLUUID agent_id, std::string floater_key);
+ static void findByNameCoro(std::string url, LLUUID mQueryID, std::string mName);
void find();
void setAllowMultiple(bool allow_multiple);
LLScrollListCtrl* getActiveList();
diff --git a/indra/newview/llfloaterbanduration.h b/indra/newview/llfloaterbanduration.h
index 4793b524f7..0f8944a56a 100644
--- a/indra/newview/llfloaterbanduration.h
+++ b/indra/newview/llfloaterbanduration.h
@@ -31,7 +31,7 @@
class LLFloaterBanDuration : public LLFloater
{
- typedef boost::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&, const S32 duration)> select_callback_t;
public:
LLFloaterBanDuration(const LLSD& target);
diff --git a/indra/newview/llfloaterbulkupload.cpp b/indra/newview/llfloaterbulkupload.cpp
index b898cb28b6..d11e9949f6 100644
--- a/indra/newview/llfloaterbulkupload.cpp
+++ b/indra/newview/llfloaterbulkupload.cpp
@@ -41,6 +41,7 @@ LLFloaterBulkUpload::LLFloaterBulkUpload(const LLSD& key)
mUploadCost = key["upload_cost"].asInteger();
mUploadCount = key["upload_count"].asInteger();
mHas2kTextures = key["has_2k_textures"].asBoolean();
+ mDestinationFolderId = key["dest"];
if (key["files"].isArray())
{
const LLSD& files = key["files"];
@@ -125,7 +126,7 @@ void LLFloaterBulkUpload::onUpload2KCheckBox()
void LLFloaterBulkUpload::onClickUpload()
{
- do_bulk_upload(mFiles, mAllow2kTextures);
+ do_bulk_upload(mFiles, mAllow2kTextures, mDestinationFolderId);
closeFloater();
}
diff --git a/indra/newview/llfloaterbulkupload.h b/indra/newview/llfloaterbulkupload.h
index d07dc8eabe..3d3004d84d 100644
--- a/indra/newview/llfloaterbulkupload.h
+++ b/indra/newview/llfloaterbulkupload.h
@@ -59,6 +59,7 @@ private:
std::vector<std::string> mFiles;
bool mAllow2kTextures = true;
bool mHas2kTextures = false;
+ LLUUID mDestinationFolderId;
S32 mUploadCost = 0;
S32 mUploadCount = 0;
};
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index 392079efe4..3acf28044c 100644
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -1021,7 +1021,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
std::string desc = floaterp->getChild<LLUICtrl>("description_form")->getValue().asString();
S32 expected_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost();
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
floaterp->mTransactionID, LLAssetType::AT_ANIMATION,
name, desc, 0,
LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION,
@@ -1029,7 +1029,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
expected_upload_cost,
- floaterp->mDestinationFolderId));
+ floaterp->mDestinationFolderId);
upload_new_resource(assetUploadInfo);
}
diff --git a/indra/newview/llfloaterdirectory.cpp b/indra/newview/llfloaterdirectory.cpp
new file mode 100644
index 0000000000..e062ca7ac6
--- /dev/null
+++ b/indra/newview/llfloaterdirectory.cpp
@@ -0,0 +1,100 @@
+/**
+ * @file llfloaterdirectory.cpp
+ * @brief The legacy "Search" floater
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterdirectory.h"
+
+#include "llpaneldirevents.h"
+#include "llpaneleventinfo.h"
+#include "llpaneldirland.h"
+#include "llpaneldirpeople.h"
+#include "llpaneldirgroups.h"
+#include "llpaneldirplaces.h"
+#include "llpaneldirclassified.h"
+#include "llpaneldirweb.h"
+#include "llscrollbar.h"
+#include "llviewercontrol.h"
+#include "llpanelavatar.h"
+#include "llpanelclassified.h"
+#include "llpanelgroup.h"
+#include "llpanelplaces.h"
+#include "llpanelprofile.h"
+
+LLFloaterDirectory::LLFloaterDirectory(const std::string& name)
+: LLFloater(name),
+ mPanelAvatarp(nullptr),
+ mPanelGroupp(nullptr),
+ mPanelPlacep(nullptr),
+ mPanelClassifiedp(nullptr),
+ mPanelEventp(nullptr)
+{
+}
+
+LLFloaterDirectory::~LLFloaterDirectory()
+{
+}
+
+bool LLFloaterDirectory::postBuild()
+{
+ const std::vector<std::string> panel_names = {
+ "panel_dir_classified",
+ "panel_dir_events",
+ "panel_dir_places",
+ "panel_dir_land",
+ "panel_dir_people",
+ "panel_dir_groups" };
+
+ for (const std::string& panel_name : panel_names)
+ {
+ if (LLPanelDirBrowser* panel_tab = findChild<LLPanelDirBrowser>(panel_name))
+ {
+ panel_tab->setFloaterDirectory(this);
+ }
+ }
+ findChild<LLPanelDirWeb>("panel_dir_web")->setFloaterDirectory(this);
+
+ mPanelAvatarp = findChild<LLPanelProfileSecondLife>("panel_profile_secondlife");
+ mPanelAvatarp->setAllowEdit(false);
+ mPanelGroupp = findChild<LLPanelGroup>("panel_group_info_sidetray");
+ mPanelGroupp->hideBackBtn();
+ mPanelPlacep = findChild<LLPanelPlaces>("panel_places");
+ mPanelPlacep->hideBackBtn();
+ mPanelClassifiedp = findChild<LLPanelClassifiedInfo>("panel_classified_info");
+ mPanelClassifiedp->setBackgroundVisible(false);
+ mPanelEventp = findChild<LLPanelEventInfo>("panel_event_info");
+
+ return true;
+}
+
+void LLFloaterDirectory::hideAllDetailPanels()
+{
+ if (mPanelAvatarp) mPanelAvatarp->setVisible(false);
+ if (mPanelGroupp) mPanelGroupp->setVisible(false);
+ if (mPanelPlacep) mPanelPlacep->setVisible(false);
+ if (mPanelClassifiedp) mPanelClassifiedp->setVisible(false);
+ if (mPanelEventp) mPanelEventp->setVisible(false);
+}
diff --git a/indra/newview/llfloaterdirectory.h b/indra/newview/llfloaterdirectory.h
new file mode 100644
index 0000000000..de788443be
--- /dev/null
+++ b/indra/newview/llfloaterdirectory.h
@@ -0,0 +1,81 @@
+/**
+ * @file llfloaterdirectory.h
+ * @brief The legacy "Search" floater
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERDIRECTORY_H
+#define LL_LLFLOATERDIRECTORY_H
+
+#include "llfloater.h"
+#include "lltabcontainer.h"
+
+#include "llpaneldirevents.h"
+#include "llpaneldirland.h"
+#include "llpaneldirpeople.h"
+#include "llpaneldirgroups.h"
+#include "llpaneldirplaces.h"
+#include "llpaneldirclassified.h"
+
+class LLDirectoryCore;
+class LLPanelDirBrowser;
+
+class LLPanelDirAdvanced;
+class LLPanelDirClassified;
+class LLPanelDirEvents;
+class LLPanelDirGroups;
+class LLPanelDirLand;
+class LLPanelDirPeople;
+class LLPanelDirPlaces;
+
+class LLPanelProfileSecondLife;
+class LLPanelEventInfo;
+class LLPanelGroup;
+class LLPanelPlaces;
+class LLPanelClassifiedInfo;
+
+// Floater to find people, places, things
+class LLFloaterDirectory : public LLFloater
+{
+public:
+ LLFloaterDirectory(const std::string& name);
+ /*virtual*/ ~LLFloaterDirectory();
+
+ void hideAllDetailPanels();
+
+ bool postBuild() override;
+
+public:
+ LLPanelProfileSecondLife* mPanelAvatarp;
+ LLPanelEventInfo* mPanelEventp;
+ LLPanelGroup* mPanelGroupp;
+ LLPanelPlaces* mPanelPlacep;
+ LLPanelClassifiedInfo* mPanelClassifiedp;
+
+private:
+ static LLFloaterDirectory *sInstance;
+};
+
+//extern BOOL gDisplayEventHack;
+
+#endif // LL_LLDIRECTORYFLOATER_H
diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h
index b807adb67d..88d288b141 100644
--- a/indra/newview/llfloateremojipicker.h
+++ b/indra/newview/llfloateremojipicker.h
@@ -40,8 +40,8 @@ class LLFloaterEmojiPicker : public LLFloater
public:
// The callback function will be called with an emoji char.
- typedef boost::function<void (llwchar)> pick_callback_t;
- typedef boost::function<void ()> close_callback_t;
+ typedef std::function<void(llwchar)> pick_callback_t;
+ typedef std::function<void ()> close_callback_t;
LLFloaterEmojiPicker(const LLSD& key);
diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h
index 0a001478f1..d0fb611bd4 100644
--- a/indra/newview/llfloaterexperiencepicker.h
+++ b/indra/newview/llfloaterexperiencepicker.h
@@ -38,9 +38,9 @@ class LLFloaterExperiencePicker : public LLFloater
{
public:
- typedef boost::function<void (const uuid_vec_t&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&)> select_callback_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> filter_function;
+ typedef std::function<bool(const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin);
diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp
index e79055fdae..999a473a49 100644
--- a/indra/newview/llfloaterexperiences.cpp
+++ b/indra/newview/llfloaterexperiences.cpp
@@ -171,7 +171,7 @@ void LLFloaterExperiences::onOpen( const LLSD& key )
refreshContents();
return;
}
- region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterExperiences::refreshContents, this));
+ mCapsReceivedConnection = region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterExperiences::refreshContents, this));
return;
}
}
@@ -231,6 +231,7 @@ bool LLFloaterExperiences::updatePermissions( const LLSD& permission )
void LLFloaterExperiences::onClose( bool app_quitting )
{
+ mCapsReceivedConnection.disconnect();
LLEventPumps::instance().obtain("experience_permission").stopListening("LLFloaterExperiences");
LLFloater::onClose(app_quitting);
}
@@ -365,10 +366,10 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("retrieveExperienceListCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("retrieveExperienceListCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
if (url.empty())
@@ -406,7 +407,7 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url,
{
const LLSD& ids = result[it->first];
tab->setExperienceList(ids);
- if (!cback.empty())
+ if (cback != nullptr)
{
cback(tab, result);
}
diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h
index 5e657767d2..ec5f52d2f7 100644
--- a/indra/newview/llfloaterexperiences.h
+++ b/indra/newview/llfloaterexperiences.h
@@ -43,7 +43,7 @@ public:
static LLFloaterExperiences* findInstance();
protected:
typedef std::map<std::string, std::string> NameMap_t;
- typedef boost::function<void(LLPanelExperiences*, const LLSD&)> Callback_t;
+ typedef std::function<void(LLPanelExperiences*, const LLSD&)> Callback_t;
void clearFromRecent(const LLSD& ids);
void resizeToTabs();
@@ -65,12 +65,13 @@ protected:
const std::string &errorNotify, Callback_t cback);
private:
- typedef boost::function < LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
+ typedef std::function<LLSD(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t, LLCore::HttpRequest::ptr_t,
const std::string, LLCore::HttpOptions::ptr_t, LLCore::HttpHeaders::ptr_t) > invokationFn_t;
static void retrieveExperienceListCoro(std::string url, LLHandle<LLFloaterExperiences> hparent,
NameMap_t tabMapping, std::string errorNotify, Callback_t cback, invokationFn_t invoker);
std::vector<LLUUID> mPrepurchaseIds;
+ boost::signals2::scoped_connection mCapsReceivedConnection;
};
#endif //LL_LLFLOATEREXPERIENCES_H
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 936096d8fe..21ae98d380 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -320,15 +320,29 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur
if (gesture)
{
+ element["columns"][0]["column"] = "active";
+ element["columns"][0]["type"] = "icon";
if (gesture->mPlaying)
{
font_style = "BOLD";
+ element["columns"][0]["value"] = "Activate_Checkmark";
}
+
+ // Only add "playing" if we've got the name, less confusing. JC
item_name = gesture->mName;
- element["columns"][0]["column"] = "trigger";
- element["columns"][0]["value"] = gesture->mTrigger;
- element["columns"][0]["font"]["name"] = "SANSSERIF";
- element["columns"][0]["font"]["style"] = font_style;
+ if (item && gesture->mPlaying)
+ {
+ item_name += " " + getString("playing");
+ }
+ element["columns"][1]["column"] = "name";
+ element["columns"][1]["value"] = item_name;
+ element["columns"][1]["font"]["name"] = "SANSSERIF";
+ element["columns"][1]["font"]["style"] = font_style;
+
+ element["columns"][2]["column"] = "trigger";
+ element["columns"][2]["value"] = gesture->mTrigger;
+ element["columns"][2]["font"]["name"] = "SANSSERIF";
+ element["columns"][2]["font"]["style"] = font_style;
std::string key_string;
std::string buffer;
@@ -345,45 +359,38 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur
gesture->mKey);
}
- element["columns"][1]["column"] = "shortcut";
- element["columns"][1]["value"] = buffer;
- element["columns"][1]["font"]["name"] = "SANSSERIF";
- element["columns"][1]["font"]["style"] = font_style;
-
// hidden column for sorting
- element["columns"][2]["column"] = "key";
- element["columns"][2]["value"] = key_string;
- element["columns"][2]["font"]["name"] = "SANSSERIF";
- element["columns"][2]["font"]["style"] = font_style;
-
- // Only add "playing" if we've got the name, less confusing. JC
- if (item && gesture->mPlaying)
- {
- item_name += " " + getString("playing");
- }
- element["columns"][3]["column"] = "name";
- element["columns"][3]["value"] = item_name;
+ element["columns"][3]["column"] = "key";
+ element["columns"][3]["value"] = key_string;
element["columns"][3]["font"]["name"] = "SANSSERIF";
element["columns"][3]["font"]["style"] = font_style;
+
+ element["columns"][4]["column"] = "shortcut";
+ element["columns"][4]["value"] = buffer;
+ element["columns"][4]["font"]["name"] = "SANSSERIF";
+ element["columns"][4]["font"]["style"] = font_style;
}
else
{
- element["columns"][0]["column"] = "trigger";
+ element["columns"][0]["column"] = "active";
+ element["columns"][0]["type"] = "icon";
element["columns"][0]["value"] = "";
- element["columns"][0]["font"]["name"] = "SANSSERIF";
- element["columns"][0]["font"]["style"] = font_style;
- element["columns"][1]["column"] = "shortcut";
- element["columns"][1]["value"] = "---";
+ element["columns"][1]["column"] = "name";
+ element["columns"][1]["value"] = item_name;
element["columns"][1]["font"]["name"] = "SANSSERIF";
element["columns"][1]["font"]["style"] = font_style;
- element["columns"][2]["column"] = "key";
- element["columns"][2]["value"] = "~~~";
+ element["columns"][2]["column"] = "trigger";
+ element["columns"][2]["value"] = "";
element["columns"][2]["font"]["name"] = "SANSSERIF";
element["columns"][2]["font"]["style"] = font_style;
- element["columns"][3]["column"] = "name";
- element["columns"][3]["value"] = item_name;
+ element["columns"][3]["column"] = "key";
+ element["columns"][3]["value"] = "~~~";
element["columns"][3]["font"]["name"] = "SANSSERIF";
element["columns"][3]["font"]["style"] = font_style;
+ element["columns"][4]["column"] = "shortcut";
+ element["columns"][4]["value"] = "---";
+ element["columns"][4]["font"]["name"] = "SANSSERIF";
+ element["columns"][4]["font"]["style"] = font_style;
}
LL_DEBUGS("Gesture") << "Added gesture [" << item_name << "]" << LL_ENDL;
@@ -391,9 +398,18 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur
LLScrollListItem* sl_item = list->addElement(element, ADD_BOTTOM);
if(sl_item)
{
- LLFontGL::StyleFlags style = LLGestureMgr::getInstance()->isGestureActive(item_id) ? LLFontGL::BOLD : LLFontGL::NORMAL;
- // *TODO find out why ["font"]["style"] does not affect font style
- ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(style);
+ if (LLGestureMgr::getInstance()->isGestureActive(item_id))
+ {
+ // If gesture was not yet loaded, will have to set active state here
+ ((LLScrollListIcon*)sl_item->getColumn(0))->setValue("Activate_Checkmark");
+ ((LLScrollListIcon*)sl_item->getColumn(0))->setIconSize(10);
+ ((LLScrollListText*)sl_item->getColumn(1))->setFontStyle(LLFontGL::BOLD);
+ }
+ else
+ {
+ ((LLScrollListIcon*)sl_item->getColumn(0))->setValue("");
+ ((LLScrollListText*)sl_item->getColumn(1))->setFontStyle(LLFontGL::NORMAL);
+ }
}
}
diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp
index b6b844b307..e8e36b5c93 100644
--- a/indra/newview/llfloatergridstatus.cpp
+++ b/indra/newview/llfloatergridstatus.cpp
@@ -90,10 +90,10 @@ void LLFloaterGridStatus::getGridStatusRSSCoro()
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getGridStatusRSSCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getGridStatusRSSCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL fails
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h
index be6ced40bf..93a6deb0a3 100644
--- a/indra/newview/llfloatergroups.h
+++ b/indra/newview/llfloatergroups.h
@@ -40,8 +40,9 @@
#include "lluuid.h"
#include "llfloater.h"
+#include "llevent.h"
+
#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLUICtrl;
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index c924807273..bbff3e4c86 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -280,7 +280,7 @@ void LLFloaterImagePreview::onBtnOK()
LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE);
fmt_file.write(formatted->getData(), formatted->getDataSize());
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
tid, LLAssetType::AT_TEXTURE,
getChild<LLUICtrl>("name_form")->getValue().asString(),
getChild<LLUICtrl>("description_form")->getValue().asString(),
@@ -289,8 +289,9 @@ void LLFloaterImagePreview::onBtnOK()
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost
- ));
+ expected_upload_cost,
+ mDestinationFolderId
+ );
upload_new_resource(assetUploadInfo);
}
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index b649514bff..f0d696361a 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -907,7 +907,7 @@ class LLChatCommandHandler : public LLCommandHandler
{
public:
// not allowed from outside the app
- LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { }
+ LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_CLICK_ONLY) { }
// Your code here
bool handle(const LLSD& tokens,
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index c920a3c898..ec9458ea9b 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -87,7 +87,7 @@ public:
void addChat (LLSD& chat);
void arrangeToasts ();
- typedef boost::function<LLFloaterIMNearbyChatToastPanel* (void )> create_toast_panel_callback_t;
+ typedef std::function<LLFloaterIMNearbyChatToastPanel*(void)> create_toast_panel_callback_t;
void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;}
void onToastDestroyed (LLToast* toast, bool app_quitting);
diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp
index ec4f7593ca..dd53d0ffcf 100644
--- a/indra/newview/llfloatermodeluploadbase.cpp
+++ b/indra/newview/llfloatermodeluploadbase.cpp
@@ -66,8 +66,8 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro(std::string url
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("MeshUploadFlag", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("MeshUploadFlag", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp
index 0283855f15..8685243867 100644
--- a/indra/newview/llfloatermyscripts.cpp
+++ b/indra/newview/llfloatermyscripts.cpp
@@ -93,8 +93,8 @@ void LLFloaterMyScripts::getAttachmentLimitsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getAttachmentLimitsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index e4e7c4ee39..d5e45c09e3 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -127,8 +127,8 @@ const S32 PAY_AMOUNT_NOTIFICATION = 200;
LLFloaterPay::LLFloaterPay(const LLSD& key)
: LLFloater(key),
mCallbackData(),
- mCallback(NULL),
- mObjectNameText(NULL),
+ mCallback(nullptr),
+ mObjectNameText(nullptr),
mTargetUUID(key.asUUID()),
mTargetIsGroup(false),
mHaveName(false)
@@ -154,7 +154,7 @@ bool LLFloaterPay::postBuild()
{
S32 i = 0;
- give_money_ptr info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_0));
+ give_money_ptr info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_0);
mCallbackData.push_back(info);
childSetAction("fastpay 1", boost::bind(LLFloaterPay::onGive, info));
@@ -164,7 +164,7 @@ bool LLFloaterPay::postBuild()
mQuickPayInfo[i] = info;
++i;
- info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_1));
+ info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_1);
mCallbackData.push_back(info);
childSetAction("fastpay 5", boost::bind(LLFloaterPay::onGive, info));
@@ -174,7 +174,7 @@ bool LLFloaterPay::postBuild()
mQuickPayInfo[i] = info;
++i;
- info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_2));
+ info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_2);
mCallbackData.push_back(info);
childSetAction("fastpay 10", boost::bind(LLFloaterPay::onGive, info));
@@ -184,7 +184,7 @@ bool LLFloaterPay::postBuild()
mQuickPayInfo[i] = info;
++i;
- info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_3));
+ info = std::make_shared<LLGiveMoneyInfo>(this, PAY_BUTTON_DEFAULT_3);
mCallbackData.push_back(info);
childSetAction("fastpay 20", boost::bind(LLFloaterPay::onGive, info));
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 7311f0deb6..4c3578119e 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -209,8 +209,8 @@ void LLFloaterPermsDefault::updateCapCoro(std::string url)
std::string previousReason;
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("updateCapCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData = LLSD::emptyMap();
postData["default_object_perm_masks"]["Group"] =
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index aa36782942..eb1b758332 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -410,11 +410,11 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("put_avatar_properties_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
std::string finalUrl = cap_url + "/" + gAgentID.asString();
@@ -1735,6 +1735,22 @@ void LLFloaterPreference::onChangeMaturity()
|| sim_access == SIM_ACCESS_ADULT);
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
+
+ // Update Legacy Search maturity settings
+ bool can_access_mature = gAgent.canAccessMature();
+ bool can_access_adult = gAgent.canAccessAdult();
+ if (!can_access_mature)
+ {
+ gSavedSettings.setBOOL("ShowMatureSims", false);
+ gSavedSettings.setBOOL("ShowMatureLand", false);
+ gSavedSettings.setBOOL("ShowMatureClassifieds", false);
+ }
+ if (!can_access_adult)
+ {
+ gSavedSettings.setBOOL("ShowAdultSims", false);
+ gSavedSettings.setBOOL("ShowAdultLand", false);
+ gSavedSettings.setBOOL("ShowAdultClassifieds", false);
+ }
}
void LLFloaterPreference::onChangeComplexityMode(const LLSD& newvalue)
@@ -2068,7 +2084,7 @@ class LLPanelPreference::Updater : public LLEventTimer
public:
- typedef boost::function<bool(const LLSD&)> callback_t;
+ typedef std::function<bool(const LLSD&)> callback_t;
Updater(callback_t cb, F32 period)
:LLEventTimer(period),
@@ -3680,7 +3696,7 @@ void LLFloaterPreference::collectSearchableItems()
LLTabContainer *pRoot = getChild< LLTabContainer >( "pref core" );
if( mFilterEdit && pRoot )
{
- mSearchData.reset(new ll::prefs::SearchData() );
+ mSearchData = std::make_unique<ll::prefs::SearchData>();
ll::prefs::TabContainerDataPtr pRootTabcontainer = ll::prefs::TabContainerDataPtr( new ll::prefs::TabContainerData );
pRootTabcontainer->mTabContainer = pRoot;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 7673c2bacd..2be5953ecd 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -94,7 +94,6 @@
#include "llmeshrepository.h"
#include "llfloaterregionrestarting.h"
#include "llpanelexperiencelisteditor.h"
-#include <boost/function.hpp>
#include "llpanelexperiencepicker.h"
#include "llexperiencecache.h"
#include "llpanelexperiences.h"
@@ -4048,8 +4047,8 @@ void LLPanelEstateAccess::updateLists()
void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestEstateGetAccessoCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestEstateGetAccessoCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llfloaterregionrestartschedule.cpp b/indra/newview/llfloaterregionrestartschedule.cpp
index 59bcb22dce..cd699efd5b 100644
--- a/indra/newview/llfloaterregionrestartschedule.cpp
+++ b/indra/newview/llfloaterregionrestartschedule.cpp
@@ -272,9 +272,9 @@ void LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RegionShcheduleRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -367,9 +367,9 @@ void LLFloaterRegionRestartSchedule::setRegionShcheduleCoro(std::string url, LLS
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleSetter", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RegionShcheduleSetter", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index e2c6305f4f..7e7eb91636 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -417,8 +417,8 @@ void LLFloaterReporter::requestAbuseCategoriesCoro(std::string url, LLHandle<LLF
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAbuseCategoriesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestAbuseCategoriesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -860,7 +860,7 @@ void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url
if(!sshot_url.empty())
{
// try to upload screenshot
- LLResourceUploadInfo::ptr_t uploadInfo(new LLARScreenShotUploader(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType));
+ LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLARScreenShotUploader>(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType);
LLViewerAssetUpload::EnqueueInventoryUpload(sshot_url, uploadInfo);
}
else
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp
index b3452a25c5..58d624a7d0 100644
--- a/indra/newview/llfloaterscriptlimits.cpp
+++ b/indra/newview/llfloaterscriptlimits.cpp
@@ -178,8 +178,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(std::string url
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptResourcesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptResourcesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
@@ -222,8 +222,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptSummaryCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptSummaryCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -274,8 +274,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptDetailsCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandScriptDetailsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -487,13 +487,13 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
names_requested.push_back(owner_id);
if (is_group_owned)
{
- gCacheName->getGroup(owner_id,
+ mGroupNameCacheConnection = gCacheName->getGroup(owner_id,
boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache,
this, _1, _2));
}
else
{
- LLAvatarNameCache::get(owner_id,
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(owner_id,
boost::bind(&LLPanelScriptLimitsRegionMemory::onAvatarNameCache,
this, _1, _2));
}
diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h
index e1eb8cb079..fe96bfbf3a 100644
--- a/indra/newview/llfloaterscriptlimits.h
+++ b/indra/newview/llfloaterscriptlimits.h
@@ -136,6 +136,9 @@ private:
std::vector<LLSD> mObjectListItems;
+ boost::signals2::scoped_connection mAvatarNameCacheConnection;
+ boost::signals2::scoped_connection mGroupNameCacheConnection;
+
void getLandScriptResourcesCoro(std::string url);
void getLandScriptSummaryCoro(std::string url);
void getLandScriptDetailsCoro(std::string url);
diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp
index c0de8ab811..55b39d9193 100644
--- a/indra/newview/llfloatersimplesnapshot.cpp
+++ b/indra/newview/llfloatersimplesnapshot.cpp
@@ -54,11 +54,11 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("post_profile_image_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders);
@@ -87,9 +87,9 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L
// Upload the image
- LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions);
+ LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared<LLCore::HttpOptions>();
S64 length;
{
diff --git a/indra/newview/llfloatersimplesnapshot.h b/indra/newview/llfloatersimplesnapshot.h
index 487e77469c..5620a15d87 100644
--- a/indra/newview/llfloatersimplesnapshot.h
+++ b/indra/newview/llfloatersimplesnapshot.h
@@ -63,7 +63,7 @@ public:
void postSave();
- typedef boost::function<void(const LLUUID& asset_id)> completion_t;
+ typedef std::function<void(const LLUUID& asset_id)> completion_t;
void setComplectionCallback(completion_t callback) { mUploadCompletionCallback = callback; }
static void uploadThumbnail(const std::string &file_path,
const LLUUID &inventory_id,
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 63ba51e559..1ccb25f5df 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -250,9 +250,9 @@ void LLFloaterTOS::testSiteIsAliveCoro(LLHandle<LLFloater> handle, std::string u
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("testSiteIsAliveCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setHeadersOnly(true);
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 3bec4da58d..82a8c8ac5a 100644
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -30,7 +30,6 @@
#include "llmodaldialog.h"
#include "llassetstorage.h"
#include "llmediactrl.h"
-#include <boost/function.hpp>
#include "lleventcoro.h"
#include "llcoros.h"
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index 2f1857ec61..9696c3d3f8 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -201,10 +201,10 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle<LLFloater> pa
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMediaTypeCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMediaTypeCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
httpOpts->setHeadersOnly(true);
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 5300627cec..b9f19b5247 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -136,7 +136,7 @@ bool LLFindAgentCallingCard::operator()(LLInventoryCategory* cat, LLInventoryIte
class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInitialFriendCardsFetch(const LLUUID& folder_id,
callback_t cb) :
diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h
index e3bd25aae7..f6c0a991bc 100644
--- a/indra/newview/llfriendcard.h
+++ b/indra/newview/llfriendcard.h
@@ -96,7 +96,7 @@ public:
void syncFriendCardsFolders();
private:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 1bbeba43ec..550af7af53 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -71,7 +71,7 @@ LLGestureMgr::LLGestureMgr()
mLoadingCount(0)
{
gInventory.addObserver(this);
- mListener.reset(new LLGestureListener());
+ mListener = std::make_shared<LLGestureListener>();
}
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 8db36c6d89..e10bc8bbb4 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -54,7 +54,7 @@ class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchIt
~LLGestureMgr();
public:
- typedef boost::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
+ typedef std::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
// Maps inventory item_id to gesture
typedef std::map<LLUUID, LLMultiGesture*> item_map_t;
typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t;
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index fffc520d9c..807ba1b3ed 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -900,6 +900,39 @@ private:
};
+F32 shader_timer_benchmark(std::vector<LLRenderTarget> & dest, TextureHolder & texHolder, U32 textures_count, LLVertexBuffer * buff, F32 &seconds)
+{
+ // run GPU timer benchmark
+
+ //number of samples to take
+ const S32 samples = 64;
+
+ {
+ ShaderProfileHelper initProfile;
+ dest[0].bindTarget("benchmark", 1);
+ gBenchmarkProgram.bind();
+ for (S32 c = 0; c < samples; ++c)
+ {
+ for (U32 i = 0; i < textures_count; ++i)
+ {
+ texHolder.bind(i);
+ buff->setBuffer();
+ buff->drawArrays(LLRender::TRIANGLES, 0, 3);
+ }
+ }
+ gBenchmarkProgram.unbind();
+ dest[0].flush();
+ }
+
+ F32 ms = gBenchmarkProgram.mTimeElapsed / 1000000.f;
+ seconds = ms / 1000.f;
+
+ F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn;
+ F64 gpixels_drawn = samples_drawn / 1000000000.0;
+ F32 samples_sec = (F32)(gpixels_drawn / seconds);
+ return samples_sec * 4; // 4 bytes per sample
+}
+
//-----------------------------------------------------------------------------
// gpu_benchmark()
// returns measured memory bandwidth of GPU in gigabytes per second
@@ -941,9 +974,6 @@ F32 gpu_benchmark()
//number of textures
const U32 count = 32;
- //number of samples to take
- const S32 samples = 64;
-
//time limit, allocation operations shouldn't take longer then 30 seconds, same for actual benchmark.
const F32 time_limit = 30;
@@ -1033,33 +1063,15 @@ F32 gpu_benchmark()
LLGLSLShader::unbind();
- // run GPU timer benchmark
- {
- ShaderProfileHelper initProfile;
- dest[0].bindTarget("benchmark", 1);
- gBenchmarkProgram.bind();
- for (S32 c = 0; c < samples; ++c)
- {
- for (U32 i = 0; i < count; ++i)
- {
- texHolder.bind(i);
- buff->setBuffer();
- buff->drawArrays(LLRender::TRIANGLES, 0, 3);
- }
- }
- gBenchmarkProgram.unbind();
- dest[0].flush();
- }
+ // run GPU timer benchmark twice
+ F32 seconds = 0;
+ F32 gbps = shader_timer_benchmark(dest, texHolder, count, buff.get(), seconds);
- F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f;
- F32 seconds = ms/1000.f;
+ LL_INFOS("Benchmark") << "Memory bandwidth, 1st run is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL;
- F64 samples_drawn = (F64)gBenchmarkProgram.mSamplesDrawn;
- F64 gpixels_drawn = samples_drawn / 1000000000.0;
- F32 samples_sec = (F32)(gpixels_drawn/seconds);
- F32 gbps = samples_sec*4; // 4 bytes per sample
+ gbps = shader_timer_benchmark(dest, texHolder, count, buff.get(), seconds);
- LL_INFOS("Benchmark") << "Memory bandwidth is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL;
+ LL_INFOS("Benchmark") << "Memory bandwidth, final run is " << llformat("%.3f", gbps) << " GB/sec according to ARB_timer_query, total time " << seconds << " seconds" << LL_ENDL;
return gbps;
}
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 3e4aadc381..ac8477a615 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -723,9 +723,9 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyMaterialCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("modifyMaterialCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index 02b6751307..4712b5a5e0 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -464,7 +464,7 @@ bool LLGLTFPreviewTexture::render()
// Set up camera and viewport
const LLVector3 origin(0.0, 0.0, 0.0);
camera.lookAt(origin, object_position);
- camera.setAspect((F32)(mFullHeight / mFullWidth));
+ camera.setAspect((F32)(mFullWidth / mFullHeight));
const LLRect texture_rect(0, mFullHeight, mFullWidth, 0);
camera.setPerspective(NOT_FOR_SELECTION, texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight(), false, camera.getNear(), MAX_FAR_CLIP*2.f);
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index d53b36e59f..e0da762279 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -1975,8 +1975,8 @@ void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID group_id)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string finalUrl = url + "?group_id=" + group_id.asString();
@@ -2004,10 +2004,10 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID group_id,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
httpOptions->setFollowRedirects(false);
@@ -2141,9 +2141,9 @@ void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 p
<< ", sort_column: " << sort_column << ", sort_descending: " << sort_descending << LL_ENDL;
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("groupMembersRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLSD postData = LLSD::emptyMap();
postData["group_id"] = group_id;
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 7cd0171a37..779ed725ac 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -202,9 +202,19 @@ void inventory_offer_handler(LLOfferInfo* info)
auto indx = msg.find(" ( http://slurl.com/secondlife/");
if (indx == std::string::npos)
{
- // try to find new slurl host
+ // https
+ indx = msg.find(" ( https://slurl.com/secondlife/");
+ }
+ if (indx == std::string::npos)
+ {
+ // try to find new slurl http host
indx = msg.find(" ( http://maps.secondlife.com/secondlife/");
}
+ if (indx == std::string::npos)
+ {
+ // try to find new slurl https host
+ indx = msg.find(" ( https://maps.secondlife.com/secondlife/");
+ }
if (indx >= 0)
{
LLStringUtil::truncate(msg, indx);
@@ -1551,8 +1561,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestOfflineMessagesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestOfflineMessagesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 67b62433f8..f3cef660f6 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -431,8 +431,8 @@ void startConferenceCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceChatStart", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ConferenceChatStart", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "start conference";
@@ -480,8 +480,8 @@ void startConferenceCoro(std::string url,
void startP2PVoiceCoro(std::string url, LLUUID sessionID, LLUUID creatorId, LLUUID otherParticipantId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("StartP2PVoiceCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("StartP2PVoiceCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "start p2p voice";
@@ -520,8 +520,8 @@ void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvit
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceInviteStart", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ConferenceInviteStart", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "accept invitation";
@@ -638,8 +638,8 @@ void chatterBoxHistoryCoro(std::string url, LLUUID sessionId, std::string from,
{ // if parameters from, message and timestamp have values, they are a message that opened chat
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ChatHistory", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("ChatHistory", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "fetch history";
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1ec7ec85c9..7d9fad5a54 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1860,7 +1860,14 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
{
LLVector3d global_pos;
landmark->getGlobalPos(global_pos);
- LLLandmarkActions::getSLURLfromPosGlobal(global_pos, &copy_slurl_to_clipboard_callback_inv, true);
+ if (!global_pos.isExactlyZero())
+ {
+ LLLandmarkActions::getSLURLfromPosGlobal(global_pos, &copy_slurl_to_clipboard_callback_inv, true);
+ }
+ else
+ {
+ LLNotificationsUtil::add("LandmarkLocationUnknown");
+ }
}
}
}
@@ -3316,7 +3323,7 @@ bool move_inv_category_world_to_agent(const LLUUID& object_id,
if (drop && accept)
{
- std::shared_ptr<LLMoveInv> move_inv(new LLMoveInv);
+ std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>();
move_inv->mObjectID = object_id;
move_inv->mCategoryID = category_id;
move_inv->mCallback = callback;
@@ -5991,7 +5998,7 @@ bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (accept && drop)
{
LLUUID item_id = inv_item->getUUID();
- std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>();
move_inv->mObjectID = inv_item->getParentUUID();
two_uuids_t item_pair(mUUID, item_id);
move_inv->mMoveList.push_back(item_pair);
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index d96adbd1d2..decb2c0528 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -239,7 +239,7 @@ public:
const LLUUID& uuid) :
LLInvFVBridge(inventory, root, uuid) {}
- typedef boost::function<void(std::string& slurl)> slurl_callback_t;
+ typedef std::function<void(std::string& slurl)> slurl_callback_t;
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void selectItem();
@@ -833,7 +833,7 @@ void rez_attachment(LLViewerInventoryItem* item,
bool move_inv_category_world_to_agent(const LLUUID& object_id,
const LLUUID& category_id,
bool drop,
- std::function<void(S32, void*, const LLMoveInv *)> callback = NULL,
+ std::function<void(S32, void*, const LLMoveInv *)> callback = nullptr,
void* user_data = NULL,
LLInventoryFilter* filter = NULL);
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e6b33453d5..3cc57e851f 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1758,7 +1758,7 @@ bool sort_alpha(const LLViewerInventoryCategory* cat1, const LLViewerInventoryCa
// The only inventory changes that are done is to move and sort folders containing no-copy items to stock folders.
// @pending_callbacks - how many callbacks we are waiting for, must be inited before use
// @result - true if things validate, false if issues are raised, must be inited before use
-typedef boost::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t;
+typedef std::function<void(S32 pending_callbacks, bool result)> validation_result_callback_t;
void validate_marketplacelistings(
LLInventoryCategory* cat,
validation_result_callback_t cb_result,
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 77a2a18877..eba67be313 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -151,13 +151,13 @@ class LLMarketplaceValidator: public LLSingleton<LLMarketplaceValidator>
LOG_CLASS(LLMarketplaceValidator);
public:
- typedef boost::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t;
- typedef boost::function<void(bool result)> validation_done_callback_t;
+ typedef std::function<void(std::string& validation_message, S32 depth, LLError::ELevel log_level)> validation_msg_callback_t;
+ typedef std::function<void(bool result)> validation_done_callback_t;
void validateMarketplaceListings(
const LLUUID &category_id,
- validation_done_callback_t cb_done = NULL,
- validation_msg_callback_t cb_msg = NULL,
+ validation_done_callback_t cb_done = nullptr,
+ validation_msg_callback_t cb_msg = nullptr,
bool fix_hierarchy = true,
S32 depth = -1);
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index c54af7d9f1..f77088e0b1 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -1816,8 +1816,8 @@ void LLInventoryGallery::paste(const LLUUID& dest,
const LLUUID& marketplacelistings_id)
{
LLHandle<LLPanel> handle = getHandle();
- std::function <void(const LLUUID)> on_copy_callback = NULL;
- LLPointer<LLInventoryCallback> cb = NULL;
+ std::function<void(const LLUUID)> on_copy_callback = nullptr;
+ LLPointer<LLInventoryCallback> cb = nullptr;
if (dest == mFolderID)
{
on_copy_callback = [handle](const LLUUID& inv_item)
@@ -3582,12 +3582,12 @@ bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop,
if (accept && drop)
{
- std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ std::shared_ptr<LLMoveInv> move_inv = std::make_shared<LLMoveInv>();
move_inv->mObjectID = inv_item->getParentUUID();
std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID());
move_inv->mMoveList.push_back(item_pair);
- move_inv->mCallback = NULL;
- move_inv->mUserData = NULL;
+ move_inv->mCallback = nullptr;
+ move_inv->mUserData = nullptr;
if (is_move)
{
warn_move_inventory(object, move_inv);
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index 7f53f9998d..a53637a477 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -44,14 +44,14 @@ class LLGalleryGestureObserver;
class LLInventoryGalleryContextMenu;
-typedef boost::function<void()> callback_t;
+typedef std::function<void()> callback_t;
class LLInventoryGallery : public LLPanel, public LLEditMenuHandler
{
public:
typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t;
- typedef boost::function<void(const LLUUID&)> selection_change_callback_t;
+ typedef std::function<void(const LLUUID&)> selection_change_callback_t;
typedef std::deque<LLUUID> selection_deque;
struct Params
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 6bea648380..22f6414960 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -340,14 +340,21 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
{
LLVector3d global_pos;
landmark->getGlobalPos(global_pos);
- boost::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](const std::string& slurl)
+ if (!global_pos.isExactlyZero())
{
- gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl));
- LLSD args;
- args["SLURL"] = slurl;
- LLNotificationsUtil::add("CopySLURL", args);
- };
- LLLandmarkActions::getSLURLfromPosGlobal(global_pos, copy_slurl_to_clipboard_cb, true);
+ boost::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](const std::string& slurl)
+ {
+ gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl));
+ LLSD args;
+ args["SLURL"] = slurl;
+ LLNotificationsUtil::add("CopySLURL", args);
+ };
+ LLLandmarkActions::getSLURLfromPosGlobal(global_pos, copy_slurl_to_clipboard_cb, true);
+ }
+ else
+ {
+ LLNotificationsUtil::add("LandmarkLocationUnknown");
+ }
};
LLLandmark* landmark = LLLandmarkActions::getLandmark(mUUIDs.front(), copy_slurl_cb);
if (landmark)
@@ -364,7 +371,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
}
else if ("show_on_map" == action)
{
- boost::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark)
+ std::function<void(LLLandmark*)> show_on_map_cb = [](LLLandmark* landmark)
{
LLVector3d landmark_global_pos;
if (landmark->getGlobalPos(landmark_global_pos))
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 73cc953692..15735ebde3 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -51,6 +51,7 @@ LLInventoryItemsList::LLInventoryItemsList(const LLInventoryItemsList::Params& p
: LLFlatListViewEx(p)
, mRefreshState(REFRESH_COMPLETE)
, mForceRefresh(false)
+, mNeedsArrange(true)
{
// TODO: mCommitOnSelectionChange is set to "false" in LLFlatListView
// but reset to true in all derived classes. This settings might need to
@@ -144,6 +145,7 @@ void LLInventoryItemsList::updateSelection()
bool LLInventoryItemsList::doIdle()
{
if (mRefreshState == REFRESH_COMPLETE) return true; // done
+ LL_PROFILE_ZONE_SCOPED;
if (isInVisibleChain() || mForceRefresh || !getFilterSubString().empty())
{
@@ -165,7 +167,7 @@ void LLInventoryItemsList::idle(void* user_data)
using namespace std::chrono;
auto start = steady_clock::now();
- const milliseconds time_limit = milliseconds(3);
+ const milliseconds time_limit = milliseconds(2);
const auto end_time = start + time_limit;
S32 max_update_count = 50;
@@ -218,8 +220,6 @@ void LLInventoryItemsList::refresh()
mRefreshState = REFRESH_LIST_SORT;
}
- rearrangeItems();
- notifyParentItemsRectChanged();
break;
}
case REFRESH_LIST_ERASE:
@@ -229,10 +229,21 @@ void LLInventoryItemsList::refresh()
for (; mRemovedItems.end() != it; ++it)
{
// don't filter items right away
- removeItemByUUID(*it, false);
+ removeItemByUUID(*it, false /*don't rearrange*/);
}
mRemovedItems.clear();
- mRefreshState = REFRESH_LIST_SORT; // fix visibility and arrange
+ mRefreshState = REFRESH_LIST_SORT; // fix visibility
+
+ // Assume that visible items were removed.
+ if (getVisible())
+ {
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ }
+ else
+ {
+ mNeedsArrange = true;
+ }
break;
}
case REFRESH_LIST_APPEND:
@@ -275,18 +286,25 @@ void LLInventoryItemsList::refresh()
LLSD action;
action.with("match_filter", cur_filter);
+ bool new_visible_items = false;
pairs_const_iterator_t pair_it = panel_list.begin();
for (; pair_it != panel_list.end(); ++pair_it)
{
item_pair_t* item_pair = *pair_it;
if (item_pair->first->getParent() != NULL)
{
- updateItemVisibility(item_pair->first, action);
+ new_visible_items |= updateItemVisibility(item_pair->first, action);
}
}
- rearrangeItems();
- notifyParentItemsRectChanged();
+ mNeedsArrange |= new_visible_items;
+ if (mNeedsArrange && getVisible())
+ {
+ // show changes now
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ mNeedsArrange = false;
+ }
if (mAddedItems.size() > 0)
{
@@ -304,16 +322,33 @@ void LLInventoryItemsList::refresh()
{
LL_PROFILE_ZONE_NAMED("items_refresh_sort");
// Filter, sort, rearrange and notify parent about shape changes
- filterItems(true, true);
+ if (filterItems(true, true))
+ {
+ mNeedsArrange = false; // just rearranged
+ }
if (mAddedItems.size() == 0)
{
+ if (mNeedsArrange)
+ {
+ // Done, last chance to rearrange
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ mNeedsArrange = false;
+ }
// After list building completed, select items that had been requested to select before list was build
updateSelection();
mRefreshState = REFRESH_COMPLETE;
}
else
{
+ if (mNeedsArrange && getVisible())
+ {
+ // show changes now
+ rearrangeItems();
+ notifyParentItemsRectChanged();
+ mNeedsArrange = false;
+ }
mRefreshState = REFRESH_LIST_APPEND;
}
break;
@@ -347,6 +382,7 @@ void LLInventoryItemsList::computeDifference(
LLPanel* LLInventoryItemsList::createNewItem(LLViewerInventoryItem* item)
{
+ LL_PROFILE_ZONE_SCOPED;
if (!item)
{
LL_WARNS() << "No inventory item. Couldn't create flat list item." << LL_ENDL;
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index b20c27eec8..f80d6b31b8 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -117,6 +117,7 @@ protected:
};
ERefreshStates mRefreshState;
+ bool mNeedsArrange = true;
private:
uuid_vec_t mIDs; // IDs of items that were added in refreshList().
diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp
index 5fb5b0f23f..a435a4f7c7 100644
--- a/indra/newview/llinventorylistitem.cpp
+++ b/indra/newview/llinventorylistitem.cpp
@@ -69,6 +69,7 @@ LLPanelInventoryListItemBase::Params::Params()
LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLPanelInventoryListItemBase* list_item = NULL;
if (item)
{
@@ -189,6 +190,7 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show)
bool LLPanelInventoryListItemBase::postBuild()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
LLViewerInventoryItem* inv_item = getItem();
if (inv_item)
{
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 943f41b6a7..3a7bc20c30 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1037,7 +1037,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
{
if (new_category.isNull())
{
- if (callback && !callback.empty())
+ if (callback)
{
callback(new_category);
}
@@ -1064,7 +1064,7 @@ void LLInventoryModel::createNewCategory(const LLUUID& parent_id,
updateCategory(cat);
}
- if (callback && !callback.empty())
+ if (callback)
{
callback(new_category);
}
@@ -1107,9 +1107,9 @@ void LLInventoryModel::createNewCategoryCoro(std::string url, LLSD postData, inv
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("createNewCategoryCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("createNewCategoryCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -3257,11 +3257,11 @@ void LLInventoryModel::initHttpRequest()
mHttpRequestFG = new LLCore::HttpRequest;
mHttpRequestBG = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpOptions->setTransferTimeout(300);
mHttpOptions->setUseRetryAfter(true);
// mHttpOptions->setTrace(2); // Do tracing of requests
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_INVENTORY);
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index d28743357e..2859923df9 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -122,9 +122,8 @@ public:
FetchItemHttpHandler(const LLSD & request_sd);
virtual ~FetchItemHttpHandler();
- protected:
- FetchItemHttpHandler(const FetchItemHttpHandler &); // Not defined
- void operator=(const FetchItemHttpHandler &); // Not defined
+ FetchItemHttpHandler(const FetchItemHttpHandler&) = delete;
+ FetchItemHttpHandler& operator=(const FetchItemHttpHandler&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
@@ -489,7 +488,7 @@ public:
void createNewCategory(const LLUUID& parent_id,
LLFolderType::EType preferred_type,
const std::string& name,
- inventory_func_type callback = NULL,
+ inventory_func_type callback = nullptr,
const LLUUID& thumbnail_id = LLUUID::null);
protected:
// Internal methods that add inventory and make sure that all of
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 2cf1554957..1e5f771ba7 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -125,9 +125,8 @@ public:
LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
}
-protected:
- BGItemHttpHandler(const BGItemHttpHandler&); // Not defined
- void operator=(const BGItemHttpHandler&); // Not defined
+ BGItemHttpHandler(const BGItemHttpHandler&) = delete;
+ BGItemHttpHandler& operator=(const BGItemHttpHandler&) = delete;
};
@@ -159,8 +158,8 @@ public:
}
protected:
- BGFolderHttpHandler(const BGFolderHttpHandler&); // Not defined
- void operator=(const BGFolderHttpHandler&); // Not defined
+ BGFolderHttpHandler(const BGFolderHttpHandler&) = delete;
+ BGFolderHttpHandler& operator=(const BGFolderHttpHandler&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse* response);
@@ -886,31 +885,34 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
static LLCachedControl<S32> ais_batch(gSavedSettings, "BatchSizeAIS3", 20);
S32 batch_limit = llclamp(ais_batch(), 1, 40);
- for (LLInventoryModel::cat_array_t::iterator it = categories->begin();
- it != categories->end();
- ++it)
+ if (categories)
{
- LLViewerInventoryCategory* child_cat = (*it);
- if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion()
- || child_cat->getFetching() >= target_state)
+ for (LLInventoryModel::cat_array_t::iterator it = categories->begin();
+ it != categories->end();
+ ++it)
{
- continue;
- }
+ LLViewerInventoryCategory* child_cat = (*it);
+ if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion()
+ || child_cat->getFetching() >= target_state)
+ {
+ continue;
+ }
- if (child_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS)
- {
- // special case, marketplace will fetch that as needed
- continue;
- }
+ if (child_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS)
+ {
+ // special case, marketplace will fetch that as needed
+ continue;
+ }
- children.emplace_back(child_cat->getUUID());
- mExpectedFolderIds.emplace_back(child_cat->getUUID());
- child_cat->setFetching(target_state);
+ children.emplace_back(child_cat->getUUID());
+ mExpectedFolderIds.emplace_back(child_cat->getUUID());
+ child_cat->setFetching(target_state);
- if (children.size() >= batch_limit)
- {
- content_done = false;
- break;
+ if (children.size() >= batch_limit)
+ {
+ content_done = false;
+ break;
+ }
}
}
@@ -940,14 +942,17 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
// This will have a bit of overlap with onAISContentCalback,
// but something else might have downloaded folders, so verify
// every child that is complete has it's children done as well
- for (LLInventoryModel::cat_array_t::iterator it = categories->begin();
- it != categories->end();
- ++it)
+ if (categories)
{
- LLViewerInventoryCategory* child_cat = (*it);
- if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion())
+ for (LLInventoryModel::cat_array_t::iterator it = categories->begin();
+ it != categories->end();
+ ++it)
{
- mFetchFolderQueue.emplace_back(child_cat->getUUID(), FT_RECURSIVE);
+ LLViewerInventoryCategory* child_cat = (*it);
+ if (LLViewerInventoryCategory::VERSION_UNKNOWN != child_cat->getVersion())
+ {
+ mFetchFolderQueue.emplace_back(child_cat->getUUID(), FT_RECURSIVE);
+ }
}
}
}
@@ -998,12 +1003,15 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
LLInventoryModel::cat_array_t* categories(NULL);
LLInventoryModel::item_array_t* items(NULL);
gInventory.getDirectDescendentsOf(cat_id, categories, items);
- for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
- it != categories->end();
- ++it)
+ if (categories)
{
- // not emplace_front to not cause an infinite loop
- mFetchFolderQueue.emplace_back((*it)->getUUID(), FT_RECURSIVE);
+ for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
+ it != categories->end();
+ ++it)
+ {
+ // not emplace_front to not cause an infinite loop
+ mFetchFolderQueue.emplace_back((*it)->getUUID(), FT_RECURSIVE);
+ }
}
}
}
@@ -1208,7 +1216,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
if (! url.empty())
{
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(folder_request_body, recursive_cats);
gInventory.requestPost(false, url, folder_request_body, handler, "Inventory Folder");
}
}
@@ -1219,7 +1227,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
if (! url.empty())
{
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body_lib, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(folder_request_body_lib, recursive_cats);
gInventory.requestPost(false, url, folder_request_body_lib, handler, "Library Folder");
}
}
@@ -1235,7 +1243,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
{
LLSD body;
body["items"] = item_request_body;
- LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGItemHttpHandler>(body);
gInventory.requestPost(false, url, body, handler, "Inventory Item");
}
}
@@ -1248,7 +1256,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
{
LLSD body;
body["items"] = item_request_body_lib;
- LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGItemHttpHandler>(body);
gInventory.requestPost(false, url, body, handler, "Library Item");
}
}
@@ -1534,7 +1542,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
{
LLSD request_body;
request_body["folders"] = folders;
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(request_body, recursive_cats);
gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
recursive_cats.clear();
folders.clear();
@@ -1544,7 +1552,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
LLSD request_body;
request_body["folders"] = folders;
- LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<BGFolderHttpHandler>(request_body, recursive_cats);
gInventory.requestPost(false, url, request_body, handler, "Inventory Folder");
return;
}
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index 2e9f69ee29..ef6fa06e9f 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -53,7 +53,7 @@ public:
void scheduleFolderFetch(const LLUUID& cat_id, bool forced = false);
void scheduleItemFetch(const LLUUID& item_id, bool forced = false);
- typedef boost::function<void()> nullary_func_t;
+ typedef std::function<void()> nullary_func_t;
// AIS3 only, Fetches folder and everything links inside the folder point to
// Intended for outfits
void fetchFolderAndLinks(const LLUUID& cat_id, nullary_func_t callback);
@@ -78,7 +78,7 @@ public:
bool isBulkFetchProcessingComplete() const;
void setAllFoldersFetched();
- typedef boost::function<void()> folders_fetched_callback_t;
+ typedef std::function<void()> folders_fetched_callback_t;
boost::signals2::connection setFetchCompletionCallback(folders_fetched_callback_t cb);
void addRequestAtFront(const LLUUID& id, bool recursive, bool is_category);
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index ac22be9d5a..a50d6b579e 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -249,7 +249,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
if (!url.empty())
{
body[i]["agent_id"] = gAgent.getID();
- LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body[i]));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLInventoryModel::FetchItemHttpHandler>(body[i]);
gInventory.requestPost(true, url, body[i], handler, (i ? "Library Item" : "Inventory Item"));
continue;
}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 12d6c44521..99cb9ec811 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -258,7 +258,7 @@ protected:
class LLInventoryCategoriesObserver : public LLInventoryObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInventoryCategoriesObserver() {};
virtual void changed(U32 mask);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 4b436e894a..9919dd5f8f 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -113,7 +113,7 @@ protected:
class LLInvPanelComplObserver : public LLInventoryCompletionObserver
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
LLInvPanelComplObserver(callback_t cb)
: mCallback(cb)
@@ -628,7 +628,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
// This could be anything. For now, just refresh the item.
if (mask & LLInventoryObserver::INTERNAL)
{
- if (view_item)
+ if (view_item && view_item->getViewModelItem())
{
view_item->refresh();
}
@@ -647,7 +647,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
if (mask & LLInventoryObserver::UPDATE_FAVORITE)
{
- if (view_item)
+ if (view_item && view_item->getViewModelItem())
{
view_item->refresh();
LLFolderViewFolder* parent = view_item->getParentFolder();
@@ -1596,7 +1596,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, bool take_keyboard_foc
setSelectionByID(obj_id, take_keyboard_focus);
}
-void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
+void LLInventoryPanel::setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
{
if (mFolderRoot.get())
{
@@ -2768,7 +2768,7 @@ void LLInventorySingleFolderPanel::updateSingleFolderRoot()
mFolderRoot.get()->setFollowsAll();
mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox);
- if (!mSelectionCallback.empty())
+ if (mSelectionCallback != nullptr)
{
mFolderRoot.get()->setSelectCallback(mSelectionCallback);
}
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 5a73df54b0..644e0a1855 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -37,6 +37,7 @@
#include "llinventorymodel.h"
#include "llscrollcontainer.h"
#include "lluictrlfactory.h"
+#include <functional>
#include <set>
class LLInvFVBridge;
@@ -182,7 +183,7 @@ public:
// Call this method to set the selection.
void openAllFolders();
void setSelection(const LLUUID& obj_id, bool take_keyboard_focus);
- void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb);
+ void setSelectCallback(const std::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb);
void clearSelection();
selected_items_t getSelectedItems() const;
@@ -375,7 +376,7 @@ protected:
virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop);
virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge);
- boost::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback;
+ std::function<void(const std::deque<LLFolderViewItem*>& items, bool user_action)> mSelectionCallback;
// buildViewsTree does not include some checks and is meant
// for recursive use, use buildNewViews() for first call
@@ -437,7 +438,7 @@ public:
std::list<LLUUID> getNavBackwardList() { return mBackwardFolders; }
std::list<LLUUID> getNavForwardList() { return mForwardFolders; }
- typedef boost::function<void()> root_changed_callback_t;
+ typedef std::function<void()> root_changed_callback_t;
boost::signals2::connection setRootChangedCallback(root_changed_callback_t cb);
protected:
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index 73425e9f4c..9b90e41549 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -80,6 +80,40 @@ public:
}
};
+class LLFetchFirstLandmarkByPos : public LLInventoryCollectFunctor
+{
+private:
+ LLVector3d mPos;
+ bool mFound = false;
+public:
+ LLFetchFirstLandmarkByPos(const LLVector3d& pos) :
+ mPos(pos), mFound(false)
+ {
+ }
+
+ /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if (mFound || !item || item->getType() != LLAssetType::AT_LANDMARK)
+ return false;
+
+ LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID());
+ if (!landmark) // the landmark not been loaded yet
+ return false;
+
+ LLVector3d landmark_global_pos;
+ if (!landmark->getGlobalPos(landmark_global_pos))
+ return false;
+ //we have to round off each coordinates to compare positions properly
+ mFound = ll_round(mPos.mdV[VX]) == ll_round(landmark_global_pos.mdV[VX])
+ && ll_round(mPos.mdV[VY]) == ll_round(landmark_global_pos.mdV[VY])
+ && ll_round(mPos.mdV[VZ]) == ll_round(landmark_global_pos.mdV[VZ]);
+ return mFound;
+ }
+
+ // only care about first found landmark, so stop when found
+ /*virtual*/ bool exceedsLimit() { return mFound; }
+};
+
class LLFetchLandmarksByName : public LLInventoryCollectFunctor
{
private:
@@ -155,6 +189,9 @@ public:
mFounded = LLViewerParcelMgr::getInstance()->inAgentParcel(landmark_global_pos);
return mFounded;
}
+
+ // only care about first found landmark, so stop when found
+ /*virtual*/ bool exceedsLimit() { return mFounded; }
};
static void fetch_landmarks(LLInventoryModel::cat_array_t& cats,
@@ -197,23 +234,61 @@ bool LLLandmarkActions::landmarkAlreadyExists()
//static
bool LLLandmarkActions::hasParcelLandmark()
{
+ static LLUUID sLastItemID;
+ static S32 sLastFrame = -1;
+ if (sLastItemID.notNull())
+ {
+ LLInventoryItem* item = gInventory.getItem(sLastItemID);
+ if (item)
+ {
+ LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID());
+ if (landmark)
+ {
+ LLVector3d landmark_global_pos;
+ if (landmark->getGlobalPos(landmark_global_pos)
+ && LLViewerParcelMgr::getInstance()->inAgentParcel(landmark_global_pos))
+ {
+ return true;
+ }
+ }
+ }
+ // Cached landmark does not match current parcel anymore,
+ // repeat inventory search to find a replacement landmark
+ // or to make sure there are none.
+ sLastItemID.setNull();
+ sLastFrame = -1;
+ }
+
+ if (sLastFrame == LLFrameTimer::getFrameCount())
+ {
+ // Ideally this should also check parcel change and landmark additions,
+ // not just frame change.
+ // But should be sufficient to check only frame as this is used
+ // after inventory and parcel operations.
+ return false;
+ }
+ sLastFrame = LLFrameTimer::getFrameCount();
+
LLFirstAgentParcelLandmark get_first_agent_landmark;
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
fetch_landmarks(cats, items, get_first_agent_landmark);
- return !items.empty();
-
+ if (!items.empty())
+ {
+ sLastItemID = items[0]->getUUID();
+ return true;
+ }
+ return false;
}
-// *TODO: This could be made more efficient by only fetching the FIRST
-// landmark that meets the criteria
LLViewerInventoryItem* LLLandmarkActions::findLandmarkForGlobalPos(const LLVector3d &pos)
{
// Determine whether there are landmarks pointing to the current parcel.
+ // Will stop after first found landmark.
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
- LLFetchlLandmarkByPos is_current_pos_landmark(pos);
- fetch_landmarks(cats, items, is_current_pos_landmark);
+ LLFetchFirstLandmarkByPos get_landmark_from_pos(pos);
+ fetch_landmarks(cats, items, get_landmark_from_pos);
if(items.empty())
{
@@ -385,12 +460,24 @@ void LLLandmarkActions::copySLURLtoClipboard(const LLUUID& landmarkInventoryItem
{
LLVector3d global_pos;
landmark->getGlobalPos(global_pos);
- LLLandmarkActions::getSLURLfromPosGlobal(global_pos,&copy_slurl_to_clipboard_callback,true);
+ if (!global_pos.isExactlyZero())
+ {
+ LLLandmarkActions::getSLURLfromPosGlobal(global_pos, &copy_slurl_to_clipboard_callback, true);
+ }
+ else
+ {
+ LLNotificationsUtil::add("LandmarkLocationUnknown");
+ }
}
}
void copy_slurl_to_clipboard_callback(const std::string& slurl)
{
+ if (slurl.empty())
+ {
+ LLNotificationsUtil::add("LandmarkLocationUnknown");
+ return;
+ }
gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl));
LLSD args;
args["SLURL"] = slurl;
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index 1abf10e110..0996dfed29 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -39,8 +39,8 @@ class LLLandmark;
class LLLandmarkActions
{
public:
- typedef boost::function<void(std::string& slurl)> slurl_callback_t;
- typedef boost::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;
+ typedef std::function<void(std::string& slurl)> slurl_callback_t;
+ typedef std::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;
/**
* @brief Fetches landmark LLViewerInventoryItems for the given landmark name.
@@ -107,7 +107,7 @@ public:
*
* @return pointer to loaded landmark from gLandmarkList or NULL if landmark does not exist or wasn't loaded.
*/
- static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = NULL);
+ static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID, LLLandmarkList::loaded_callback_t cb = nullptr);
/**
* @brief Performs standard action of copying of SLURL from landmark to user's clipboard.
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index 3fa0ab99f3..b25a42a938 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -147,29 +147,66 @@ void LLLandmarkList::processGetAssetReply(
else
{
// failed to parse, shouldn't happen
+ LL_WARNS("Landmarks") << "Failed to parse landmark " << uuid << LL_ENDL;
gLandmarkList.eraseCallbacks(uuid);
}
}
else
{
// got a good status, but no file, shouldn't happen
+ LL_WARNS("Landmarks") << "Empty buffer for landmark " << uuid << LL_ENDL;
gLandmarkList.eraseCallbacks(uuid);
}
+
+ // We got this asset, remove it from retry and bad lists.
+ gLandmarkList.mRetryList.erase(uuid);
+ gLandmarkList.mBadList.erase(uuid);
}
else
{
- // SJB: No use case for a notification here. Use LL_DEBUGS() instead
- if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
+ if (LL_ERR_NO_CAP == status)
+ {
+ // A problem with asset cap, always allow retrying.
+ // Todo: should this reschedule?
+ gLandmarkList.mRequestedList.erase(uuid);
+ gLandmarkList.eraseCallbacks(uuid);
+ // If there was a previous request, it likely failed due to an obsolete cap
+ // so clear the retry marker to allow multiple retries.
+ gLandmarkList.mRetryList.erase(uuid);
+ return;
+ }
+ if (gLandmarkList.mBadList.find(uuid) != gLandmarkList.mBadList.end())
+ {
+ // Already on the 'bad' list, ignore
+ gLandmarkList.mRequestedList.erase(uuid);
+ gLandmarkList.eraseCallbacks(uuid);
+ return;
+ }
+ if (LL_ERR_ASSET_REQUEST_FAILED == status
+ && gLandmarkList.mRetryList.find(uuid) == gLandmarkList.mRetryList.end())
+ {
+ // There is a number of reasons why an asset request can fail,
+ // like a cap being obsolete due to user teleporting.
+ // Let viewer rerequest at least once more.
+ // Todo: should this reshchedule?
+ gLandmarkList.mRetryList.emplace(uuid);
+ gLandmarkList.mRequestedList.erase(uuid);
+ gLandmarkList.eraseCallbacks(uuid);
+ return;
+ }
+
+ if (LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status)
{
- LL_WARNS("Landmarks") << "Missing Landmark" << LL_ENDL;
- //LLNotificationsUtil::add("LandmarkMissing");
+ LL_WARNS("Landmarks") << "Missing Landmark " << uuid << LL_ENDL;
}
else
{
- LL_WARNS("Landmarks") << "Unable to load Landmark" << LL_ENDL;
- //LLNotificationsUtil::add("UnableToLoadLandmark");
+ LL_WARNS("Landmarks") << "Unable to load Landmark " << uuid
+ << ". asset status: " << status
+ << ". Extended status: " << (S64)ext_status << LL_ENDL;
}
+ gLandmarkList.mRetryList.erase(uuid);
gLandmarkList.mBadList.insert(uuid);
gLandmarkList.mRequestedList.erase(uuid); //mBadList effectively blocks any load, so no point keeping id in requests
gLandmarkList.eraseCallbacks(uuid);
diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h
index 508148abde..76b5b97211 100644
--- a/indra/newview/lllandmarklist.h
+++ b/indra/newview/lllandmarklist.h
@@ -27,7 +27,7 @@
#ifndef LL_LLLANDMARKLIST_H
#define LL_LLLANDMARKLIST_H
-#include <boost/function.hpp>
+#include <functional>
#include <map>
#include "lllandmark.h"
#include "lluuid.h"
@@ -40,7 +40,7 @@ class LLInventoryItem;
class LLLandmarkList
{
public:
- typedef boost::function<void(LLLandmark*)> loaded_callback_t;
+ typedef std::function<void(LLLandmark*)> loaded_callback_t;
LLLandmarkList() {}
~LLLandmarkList();
@@ -50,7 +50,7 @@ public:
//const LLLandmark* getNext() { return mList.getNextData(); }
bool assetExists(const LLUUID& asset_uuid);
- LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = NULL);
+ LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = nullptr);
static void processGetAssetReply(
const LLUUID& uuid,
LLAssetType::EType type,
@@ -72,6 +72,7 @@ protected:
typedef std::set<LLUUID> landmark_uuid_list_t;
landmark_uuid_list_t mBadList;
+ landmark_uuid_list_t mRetryList;
typedef std::map<LLUUID,F32> landmark_requested_list_t;
landmark_requested_list_t mRequestedList;
diff --git a/indra/newview/lllistcontextmenu.h b/indra/newview/lllistcontextmenu.h
index 4b515a3b26..cb2ca5260f 100644
--- a/indra/newview/lllistcontextmenu.h
+++ b/indra/newview/lllistcontextmenu.h
@@ -63,7 +63,7 @@ public:
virtual void hide();
protected:
- typedef boost::function<void (const LLUUID& id)> functor_t;
+ typedef std::function<void (const LLUUID& id)> functor_t;
virtual LLContextMenu* createMenu() = 0;
diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h
index ca9b81457c..34cb83367f 100644
--- a/indra/newview/lllocationhistory.h
+++ b/indra/newview/lllocationhistory.h
@@ -29,10 +29,9 @@
#include "llsingleton.h" // for LLSingleton
+#include <functional>
#include <vector>
#include <string>
-#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLSD;
@@ -115,7 +114,7 @@ public:
};
typedef std::vector<LLLocationHistoryItem> location_list_t;
- typedef boost::function<void(EChangeType event)> history_changed_callback_t;
+ typedef std::function<void(EChangeType event)> history_changed_callback_t;
typedef boost::signals2::signal<void(EChangeType event)> history_changed_signal_t;
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 41cec4f074..0358233637 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -80,7 +80,7 @@ std::string construct_start_string();
LLLoginInstance::LLLoginInstance() :
- mLoginModule(new LLLogin()),
+ mLoginModule(std::make_unique<LLLogin>()),
mNotifications(NULL),
mLoginState("offline"),
mSaveMFA(true),
@@ -277,11 +277,6 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
mRequestData["params"] = request_params;
mRequestData["options"] = requested_options;
mRequestData["http_params"] = http_params;
-#if LL_RELEASE_FOR_DOWNLOAD
- mRequestData["wait_for_updater"] = LLAppViewer::instance()->waitForUpdater();
-#else
- mRequestData["wait_for_updater"] = false;
-#endif
}
bool LLLoginInstance::handleLoginEvent(const LLSD& event)
@@ -316,13 +311,6 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
// Login has failed.
// Figure out why and respond...
LLSD response = event["data"];
- LLSD updater = response["updater"];
-
- // Always provide a response to the updater, if in fact the updater
- // contacted us, if in fact the ping contains a 'reply' key. Most code
- // paths tell it not to proceed with updating.
- ResponsePtr resp(std::make_shared<LLEventAPI::Response>
- (LLSDMap("update", false), updater));
std::string reason_response = response["reason"].asString();
std::string message_response = response["message"].asString();
@@ -385,26 +373,15 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
else if(reason_response == "update")
{
- // This can happen if the user clicked Login quickly, before we heard
- // back from the Viewer Version Manager, but login failed because
- // login.cgi is insisting on a required update. We were called with an
- // event that bundles both the login.cgi 'response' and the
- // synchronization event from the 'updater'.
+ // login.cgi rejected login and requires an update. Since Velopack
+ // handles updates now, the best we can do here is tell the user
+ // to download the update manually via the release notes URL.
std::string login_version = response["message_args"]["VERSION"];
- std::string vvm_version = updater["VERSION"];
- std::string relnotes = updater["URL"];
LL_WARNS("LLLogin") << "Login failed because an update to version " << login_version << " is required." << LL_ENDL;
- // vvm_version might be empty because we might not have gotten
- // SLVersionChecker's LoginSync handshake. But if it IS populated, it
- // should (!) be the same as the version we got from login.cgi.
- if ((! vvm_version.empty()) && vvm_version != login_version)
- {
- LL_WARNS("LLLogin") << "VVM update version " << vvm_version
- << " differs from login version " << login_version
- << "; presenting VVM version to match release notes URL"
- << LL_ENDL;
- login_version = vvm_version;
- }
+
+ // Try to use the release notes URL from the VVM query if available,
+ // otherwise fall back to constructing one from the version.
+ std::string relnotes = LLVersionInfo::instance().getReleaseNotes();
if (relnotes.empty() || relnotes.find("://") == std::string::npos)
{
relnotes = LLTrans::getString("RELEASE_NOTES_BASE_URL");
@@ -420,32 +397,11 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
args["VERSION"] = login_version;
args["URL"] = relnotes;
- if (updater.isUndefined())
- {
- // If the updater failed to shake hands, better advise the user to
- // download the update him/herself.
- LLNotificationsUtil::add(
- "RequiredUpdate",
- args,
- updater,
- boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2));
- }
- else
- {
- // If we've heard from the updater that an update is required,
- // then display the prompt that assures the user we'll take care
- // of it. This is the one case in which we bind 'resp':
- // instead of destroying our Response object (and thus sending a
- // negative reply to the updater) as soon as we exit this
- // function, bind our shared_ptr so it gets passed into
- // syncWithUpdater. That ensures that the response is delayed
- // until the user has responded to the notification.
- LLNotificationsUtil::add(
- "PauseForUpdate",
- args,
- updater,
- boost::bind(&LLLoginInstance::syncWithUpdater, this, resp, _1, _2));
- }
+ LLNotificationsUtil::add(
+ "RequiredUpdate",
+ args,
+ LLSD(),
+ boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2));
}
else if(reason_response == "mfa_challenge")
{
@@ -479,19 +435,6 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
}
}
-void LLLoginInstance::syncWithUpdater(ResponsePtr resp, const LLSD& notification, const LLSD& response)
-{
- LL_INFOS("LLLogin") << "LLLoginInstance::syncWithUpdater" << LL_ENDL;
- // 'resp' points to an instance of LLEventAPI::Response that will be
- // destroyed as soon as we return and the notification response functor is
- // unregistered. Modify it so that it tells the updater to go ahead and
- // perform the update. Naturally, if we allowed the user a choice as to
- // whether to proceed or not, this assignment would reflect the user's
- // selection.
- (*resp)["update"] = true;
- attemptComplete();
-}
-
void LLLoginInstance::handleLoginDisallowed(const LLSD& notification, const LLSD& response)
{
attemptComplete();
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 941b378b14..551ad92d33 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -28,9 +28,6 @@
#define LL_LLLOGININSTANCE_H
#include "lleventdispatcher.h"
-#include "lleventapi.h"
-#include <boost/function.hpp>
-#include <memory> // std::shared_ptr
#include "llsecapi.h"
class LLLogin;
class LLEventStream;
@@ -73,10 +70,7 @@ public:
void saveMFAHash(LLSD const& response);
private:
- typedef std::shared_ptr<LLEventAPI::Response> ResponsePtr;
void constructAuthParams(LLPointer<LLCredential> user_credentials);
- void updateApp(bool mandatory, const std::string& message);
- bool updateDialogCallback(const LLSD& notification, const LLSD& response);
bool handleLoginEvent(const LLSD& event);
void handleLoginFailure(const LLSD& event);
@@ -84,7 +78,6 @@ private:
void handleDisconnect(const LLSD& event);
void handleIndeterminate(const LLSD& event);
void handleLoginDisallowed(const LLSD& notification, const LLSD& response);
- void syncWithUpdater(ResponsePtr resp, const LLSD& notification, const LLSD& response);
bool handleTOSResponse(bool v, const std::string& key);
void showMFAChallange(const std::string& message);
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 0888f630e8..9bcfd9e2c0 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -695,24 +695,28 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// handle attachments in local space
if (object->isAttachment() && object->mDrawable.notNull())
{
- // calculate local version of relative move
- LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation();
- objWorldRotation.transQuat();
+ LLXform* object_xform_parent = object->mDrawable->mXform.getParent();
+ if (object_xform_parent)
+ {
+ // calculate local version of relative move
+ LLQuaternion objWorldRotation = object_xform_parent->getWorldRotation();
+ objWorldRotation.transQuat();
- LLVector3 old_position_local = object->getPosition();
- LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation);
+ LLVector3 old_position_local = object->getPosition();
+ LLVector3 new_position_local = selectNode->mSavedPositionLocal + (clamped_relative_move_f * objWorldRotation);
- //RN: I forget, but we need to do this because of snapping which doesn't often result
- // in position changes even when the mouse moves
- object->setPosition(new_position_local);
- rebuild(object);
- gAgentAvatarp->clampAttachmentPositions();
- new_position_local = object->getPosition();
+ //RN: I forget, but we need to do this because of snapping which doesn't often result
+ // in position changes even when the mouse moves
+ object->setPosition(new_position_local);
+ rebuild(object);
+ gAgentAvatarp->clampAttachmentPositions();
+ new_position_local = object->getPosition();
- if (selectNode->mIndividualSelection)
- {
- // counter-translate child objects if we are moving the root as an individual
- object->resetChildrenPosition(old_position_local - new_position_local, true);
+ if (selectNode->mIndividualSelection)
+ {
+ // counter-translate child objects if we are moving the root as an individual
+ object->resetChildrenPosition(old_position_local - new_position_local, true);
+ }
}
}
else
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 7b8211ded8..ac2f52a262 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -206,10 +206,10 @@ namespace LLMarketplaceImport
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplacePostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("marketplacePostCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(true);
@@ -267,17 +267,17 @@ namespace LLMarketplaceImport
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplaceGetCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("marketplaceGetCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(!sMarketplaceCookie.empty());
if (buildHeaders)
{
- httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*");
httpHeaders->append(HTTP_OUT_HEADER_COOKIE, sMarketplaceCookie);
@@ -783,9 +783,9 @@ void LLMarketplaceData::getMerchantStatusCoro()
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
@@ -861,9 +861,9 @@ void LLMarketplaceData::getSLMListingsCoro(LLUUID folderId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getSLMListingsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -926,9 +926,9 @@ void LLMarketplaceData::getSingleListingCoro(S32 listingId, LLUUID folderId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getSingleListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -997,9 +997,9 @@ void LLMarketplaceData::createSLMListingCoro(LLUUID folderId, LLUUID versionId,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("createSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -1071,9 +1071,9 @@ void LLMarketplaceData::updateSLMListingCoro(LLUUID folderId, S32 listingId, LLU
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("updateSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -1166,9 +1166,9 @@ void LLMarketplaceData::associateSLMListingCoro(LLUUID folderId, S32 listingId,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("associateSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
@@ -1247,9 +1247,9 @@ void LLMarketplaceData::deleteSLMListingCoro(S32 listingId)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("deleteSLMListingCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append("Accept", "application/json");
httpHeaders->append("Content-Type", "application/json");
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 281743c1d6..07ed667b0a 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -28,15 +28,11 @@
#ifndef LL_LLMARKETPLACEFUNCTIONS_H
#define LL_LLMARKETPLACEFUNCTIONS_H
-
-#include <llsd.h>
-#include <boost/function.hpp>
-#include <boost/signals2.hpp>
-
+#include "llsd.h"
#include "llsingleton.h"
#include "llstring.h"
-
+#include <boost/signals2.hpp>
namespace MarketplaceErrorCodes
{
diff --git a/indra/newview/llmarketplacenotifications.h b/indra/newview/llmarketplacenotifications.h
index a602b930de..0b03bde16c 100644
--- a/indra/newview/llmarketplacenotifications.h
+++ b/indra/newview/llmarketplacenotifications.h
@@ -30,7 +30,7 @@
#include <llsd.h>
-#include <boost/function.hpp>
+#include <functional>
//
@@ -48,7 +48,7 @@ namespace LLMarketplaceInventoryNotifications
{
void update();
- typedef boost::function<void (const LLSD&)> NoCopyCallbackFunction;
+ typedef std::function<void (const LLSD&)> NoCopyCallbackFunction;
void addNoCopyNotification(const LLSD& payload, const NoCopyCallbackFunction& cb);
};
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index cac72bb085..4e14f416e9 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -494,7 +494,7 @@ bool LLMaterialEditor::postBuild()
refreshUploadCost();
}
- boost::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
+ std::function<void(LLUICtrl*, void*)> changes_callback = [this](LLUICtrl * ctrl, void* userData)
{
const U32 *flag = (const U32*)userData;
markChangesUnsaved(*flag);
@@ -1987,12 +1987,14 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
{
// Prespecified material
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, index);
}
else if (model_in.materials.size() == 1)
{
// Only one material, just load it
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, 0);
}
else
@@ -2018,11 +2020,12 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
material_list.push_back(LLTrans::getString("material_batch_import_text"));
LLFloaterComboOptions::showUI(
- [model_in, filename](const std::string& option, S32 index)
+ [model_in, filename, dest_folder](const std::string& option, S32 index)
{
if (index >= 0) // -1 on cancel
{
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
+ me->mUploadFolder = dest_folder;
me->loadMaterial(model_in, filename, index);
}
},
@@ -2448,7 +2451,7 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::
if (index == model_in.materials.size())
{
// bulk upload all the things
- upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, LLUUID::null);
+ upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, mUploadFolder);
return;
}
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index ee5e5b438e..723f834d6f 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -67,7 +67,7 @@
class LLMaterialHttpHandler : public LLHttpSDHandler
{
public:
- typedef boost::function<void(bool, const LLSD&)> CallbackFunction;
+ typedef std::function<void(bool, const LLSD&)> CallbackFunction;
typedef std::shared_ptr<LLMaterialHttpHandler> ptr_t;
LLMaterialHttpHandler(const std::string& method, CallbackFunction cback);
@@ -137,9 +137,9 @@ LLMaterialMgr::LLMaterialMgr():
{
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
- mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest());
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
+ mHttpRequest = std::make_shared<LLCore::HttpRequest>();
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_MATERIALS);
mMaterials.insert(std::pair<LLMaterialID, LLMaterialPtr>(LLMaterialID::null, LLMaterialPtr(NULL)));
@@ -684,9 +684,9 @@ void LLMaterialMgr::processGetQueue()
LLSD postData = LLSD::emptyMap();
postData[MATERIALS_CAP_ZIP_FIELD] = materialBinary;
- LLCore::HttpHandler::ptr_t handler(new LLMaterialHttpHandler("POST",
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLMaterialHttpHandler>("POST",
boost::bind(&LLMaterialMgr::onGetResponse, this, _1, _2, region_id)
- ));
+ );
LL_DEBUGS("Materials") << "POSTing to region '" << regionp->getName() << "' at '" << capURL << " for " << materialsData.size() << " materials."
<< "\ndata: " << ll_pretty_print_sd(materialsData) << LL_ENDL;
@@ -864,9 +864,9 @@ void LLMaterialMgr::processGetAllQueueCoro(LLUUID regionId)
LL_DEBUGS("Materials") << "GET all for region " << regionId << "url " << capURL << LL_ENDL;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, capURL);
@@ -973,9 +973,9 @@ void LLMaterialMgr::processPutQueue()
LL_DEBUGS("Materials") << "put for " << itRequest->second.size() << " faces to region " << itRequest->first->getName() << LL_ENDL;
- LLCore::HttpHandler::ptr_t handler (new LLMaterialHttpHandler("PUT",
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLMaterialHttpHandler>("PUT",
boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2)
- ));
+ );
LLCore::HttpHandle handle = LLCoreHttpUtil::requestPutWithLLSD(
mHttpRequest, mHttpPolicy, capURL,
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 83a6e66019..50236587ac 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -172,9 +172,9 @@ LLMediaDataClient::LLMediaDataClient(F32 queue_timer_delay, F32 retry_timer_dela
mMaxSortedQueueSize(max_sorted_queue_size),
mMaxRoundRobinQueueSize(max_round_robin_queue_size),
mQueueTimerIsRunning(false),
- mHttpRequest(new LLCore::HttpRequest()),
- mHttpHeaders(new LLCore::HttpHeaders()),
- mHttpOpts(new LLCore::HttpOptions()),
+ mHttpRequest(std::make_shared<LLCore::HttpRequest>()),
+ mHttpHeaders(std::make_shared<LLCore::HttpHeaders>()),
+ mHttpOpts(std::make_shared<LLCore::HttpOptions>()),
mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID)
{
// *TODO: Look up real Policy ID
@@ -660,7 +660,7 @@ void LLMediaDataClient::Handler::onFailure(LLCore::HttpResponse * response, LLCo
void LLObjectMediaDataClient::fetchMedia(LLMediaDataClientObject *object)
{
// Create a get request and put it in the queue.
- enqueue(Request::ptr_t(new RequestGet(object, this)));
+ enqueue(std::make_shared<RequestGet>(object, this));
}
const char *LLObjectMediaDataClient::getCapabilityName() const
@@ -880,14 +880,14 @@ LLSD LLObjectMediaDataClient::RequestGet::getPayload() const
LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestGet::createHandler()
{
- return LLCore::HttpHandler::ptr_t(new LLObjectMediaDataClient::Handler(shared_from_this()));
+ return std::make_shared<LLObjectMediaDataClient::Handler>(shared_from_this());
}
void LLObjectMediaDataClient::updateMedia(LLMediaDataClientObject *object)
{
// Create an update request and put it in the queue.
- enqueue(Request::ptr_t(new RequestUpdate(object, this)));
+ enqueue(std::make_shared<RequestUpdate>(object, this));
}
LLObjectMediaDataClient::RequestUpdate::RequestUpdate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc):
@@ -917,7 +917,7 @@ LLSD LLObjectMediaDataClient::RequestUpdate::getPayload() const
LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestUpdate::createHandler()
{
// This just uses the base class's responder.
- return LLCore::HttpHandler::ptr_t(new LLMediaDataClient::Handler(shared_from_this()));
+ return std::make_shared<LLMediaDataClient::Handler>(shared_from_this());
}
void LLObjectMediaDataClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content)
@@ -1037,7 +1037,7 @@ void LLObjectMediaNavigateClient::navigate(LLMediaDataClientObject *object, U8 t
// LL_INFOS("LLMediaDataClient") << "navigate() initiated: " << ll_print_sd(sd_payload) << LL_ENDL;
// Create a get request and put it in the queue.
- enqueue(Request::ptr_t(new RequestNavigate(object, this, texture_index, url)));
+ enqueue(std::make_shared<RequestNavigate>(object, this, texture_index, url));
}
LLObjectMediaNavigateClient::RequestNavigate::RequestNavigate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc, U8 texture_index, const std::string &url):
@@ -1058,7 +1058,7 @@ LLSD LLObjectMediaNavigateClient::RequestNavigate::getPayload() const
LLCore::HttpHandler::ptr_t LLObjectMediaNavigateClient::RequestNavigate::createHandler()
{
- return LLCore::HttpHandler::ptr_t(new LLObjectMediaNavigateClient::Handler(shared_from_this()));
+ return std::make_shared<LLObjectMediaNavigateClient::Handler>(shared_from_this());
}
void LLObjectMediaNavigateClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content)
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 413f02b723..c0b1a5326a 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -654,12 +654,10 @@ public:
mRequestedBytes(requested_bytes)
{}
- virtual ~LLMeshHandlerBase()
- {}
+ virtual ~LLMeshHandlerBase() = default;
-protected:
- LLMeshHandlerBase(const LLMeshHandlerBase &); // Not defined
- void operator=(const LLMeshHandlerBase &); // Not defined
+ LLMeshHandlerBase(const LLMeshHandlerBase &) = delete;
+ LLMeshHandlerBase& operator=(const LLMeshHandlerBase&) = delete;
public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
@@ -693,9 +691,8 @@ public:
}
virtual ~LLMeshHeaderHandler();
-protected:
- LLMeshHeaderHandler(const LLMeshHeaderHandler &); // Not defined
- void operator=(const LLMeshHeaderHandler &); // Not defined
+ LLMeshHeaderHandler(const LLMeshHeaderHandler&) = delete;
+ LLMeshHeaderHandler& operator=(const LLMeshHeaderHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -719,9 +716,8 @@ public:
}
virtual ~LLMeshLODHandler();
-protected:
- LLMeshLODHandler(const LLMeshLODHandler &); // Not defined
- void operator=(const LLMeshLODHandler &); // Not defined
+ LLMeshLODHandler(const LLMeshLODHandler&) = delete;
+ LLMeshLODHandler& operator=(const LLMeshLODHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -750,9 +746,8 @@ public:
}
virtual ~LLMeshSkinInfoHandler();
-protected:
- LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler &); // Not defined
- void operator=(const LLMeshSkinInfoHandler &); // Not defined
+ LLMeshSkinInfoHandler(const LLMeshSkinInfoHandler&) = delete;
+ LLMeshSkinInfoHandler& operator=(const LLMeshSkinInfoHandler&) = delete;
void processSkin(U8* data, S32 data_size);
@@ -778,9 +773,8 @@ public:
{}
virtual ~LLMeshDecompositionHandler();
-protected:
- LLMeshDecompositionHandler(const LLMeshDecompositionHandler &); // Not defined
- void operator=(const LLMeshDecompositionHandler &); // Not defined
+ LLMeshDecompositionHandler(const LLMeshDecompositionHandler&) = delete;
+ LLMeshDecompositionHandler& operator=(const LLMeshDecompositionHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -804,9 +798,8 @@ public:
{}
virtual ~LLMeshPhysicsShapeHandler();
-protected:
- LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler &); // Not defined
- void operator=(const LLMeshPhysicsShapeHandler &); // Not defined
+ LLMeshPhysicsShapeHandler(const LLMeshPhysicsShapeHandler&) = delete;
+ LLMeshPhysicsShapeHandler& operator=(const LLMeshPhysicsShapeHandler&) = delete;
public:
virtual void processData(LLCore::BufferArray * body, S32 body_offset, U8 * data, S32 data_size);
@@ -943,20 +936,20 @@ LLMeshRepoThread::LLMeshRepoThread()
mSkinMapMutex = new LLMutex();
mSignal = new LLCondition();
mHttpRequest = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpOptions->setTransferTimeout(SMALL_MESH_XFER_TIMEOUT);
mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
- mHttpLargeOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpLargeOptions = std::make_shared<LLCore::HttpOptions>();
mHttpLargeOptions->setTransferTimeout(LARGE_MESH_XFER_TIMEOUT);
mHttpLargeOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_VND_LL_MESH);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_MESH2);
mHttpLargePolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_LARGE_MESH);
// Lod processing is expensive due to the number of requests
// and a need to do expensive cacheOptimize().
- mMeshThreadPool.reset(new LL::ThreadPool("MeshLodProcessing", 2));
+ mMeshThreadPool = std::make_unique<LL::ThreadPool>("MeshLodProcessing", 2);
mMeshThreadPool->start();
}
@@ -1653,7 +1646,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
if (!http_url.empty())
{
- LLMeshHandlerBase::ptr_t handler(new LLMeshSkinInfoHandler(mesh_id, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshSkinInfoHandler>(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -1761,7 +1754,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
if (!http_url.empty())
{
- LLMeshHandlerBase::ptr_t handler(new LLMeshDecompositionHandler(mesh_id, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshDecompositionHandler>(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -1860,7 +1853,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
if (!http_url.empty())
{
- LLMeshHandlerBase::ptr_t handler(new LLMeshPhysicsShapeHandler(mesh_id, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshPhysicsShapeHandler>(mesh_id, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -1988,7 +1981,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params)
//within the first 4KB
//NOTE -- this will break of headers ever exceed 4KB
- LLMeshHandlerBase::ptr_t handler(new LLMeshHeaderHandler(mesh_params, 0, MESH_HEADER_SIZE));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshHeaderHandler>(mesh_params, 0, MESH_HEADER_SIZE);
LLCore::HttpHandle handle = getByteRange(http_url, 0, MESH_HEADER_SIZE, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -2164,7 +2157,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
{
LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the simulator." << LL_ENDL;
- LLMeshHandlerBase::ptr_t handler(new LLMeshLODHandler(mesh_params, lod, offset, size));
+ LLMeshHandlerBase::ptr_t handler = std::make_shared<LLMeshLODHandler>(mesh_params, lod, offset, size);
LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler);
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
@@ -2611,11 +2604,11 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list_t& data
mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut");
mHttpRequest = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
mHttpOptions->setTransferTimeout(mMeshUploadTimeOut);
mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
mHttpOptions->setRetries(UPLOAD_RETRY_LIMIT);
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS);
}
@@ -4321,7 +4314,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para
else
{
//first request for this mesh
- std::shared_ptr<PendingRequestBase> request(new PendingRequestLOD(mesh_params, new_lod));
+ std::shared_ptr<PendingRequestBase> request = std::make_shared<PendingRequestLOD>(mesh_params, new_lod);
mPendingRequests.emplace_back(request);
mLoadingMeshes[new_lod][mesh_id].initData(vobj, request);
LLMeshRepository::sLODPending++;
@@ -4819,7 +4812,7 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOV
else
{
//first request for this mesh
- std::shared_ptr<PendingRequestBase> request(new PendingRequestUUID(mesh_id, MESH_REQUEST_SKIN));
+ std::shared_ptr<PendingRequestBase> request = std::make_shared<PendingRequestUUID>(mesh_id, MESH_REQUEST_SKIN);
mLoadingSkins[mesh_id].initData(requesting_obj, request);
mPendingRequests.emplace_back(request);
}
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index f6d635f51f..f47a8cd241 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -190,7 +190,7 @@ LLMuteList::~LLMuteList()
void LLMuteList::cleanupSingleton()
{
- LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL);
+ LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(nullptr);
}
bool LLMuteList::isLinden(const std::string& name)
@@ -803,6 +803,10 @@ void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**)
std::string unclean_filename;
msg->getStringFast(_PREHASH_MuteData, _PREHASH_Filename, unclean_filename);
std::string filename = LLDir::getScrubbedFileName(unclean_filename);
+ if (filename.empty())
+ {
+ LL_WARNS() << "Received empty mute list filename." << LL_ENDL;
+ }
LLMuteList* mute_list = getInstance();
mute_list->mLoadState = ML_REQUESTED;
@@ -835,16 +839,16 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**)
void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status)
{
- LL_INFOS() << "LLMuteList::processMuteListFile()" << LL_ENDL;
-
std::string* local_filename_and_path = (std::string*)user_data;
if(local_filename_and_path && !local_filename_and_path->empty() && (error_code == 0))
{
+ LL_INFOS() << "Received mute list from server" << LL_ENDL;
LLMuteList::getInstance()->loadFromFile(*local_filename_and_path);
LLFile::remove(*local_filename_and_path);
}
else
{
+ LL_INFOS() << "LLMuteList xfer failed with code " << error_code << LL_ENDL;
LLMuteList::getInstance()->mLoadState = ML_FAILED;
}
delete local_filename_and_path;
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index dde85f4d29..ffff21c95c 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -210,12 +210,12 @@ private:
boost::signals2::signal<void(const LLUUID &)> mIconClickedSignal;
public:
- boost::signals2::connection setOnNameListCompleteCallback(boost::function<void(bool)> onNameListCompleteCallback)
+ boost::signals2::connection setOnNameListCompleteCallback(std::function<void(bool)> onNameListCompleteCallback)
{
return mNameListCompleteSignal.connect(onNameListCompleteCallback);
}
- boost::signals2::connection setIconClickedCallback(boost::function<void(const LLUUID &)> cb)
+ boost::signals2::connection setIconClickedCallback(std::function<void(const LLUUID&)> cb)
{
return mIconClickedSignal.connect(cb);
}
diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h
index 2ed90e31b2..b3283ca642 100644
--- a/indra/newview/llnotificationlistitem.h
+++ b/indra/newview/llnotificationlistitem.h
@@ -84,7 +84,7 @@ public:
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
//callbacks
- typedef boost::function<void (LLNotificationListItem* item)> item_callback_t;
+ typedef std::function<void (LLNotificationListItem* item)> item_callback_t;
typedef boost::signals2::signal<void (LLNotificationListItem* item)> item_signal_t;
item_signal_t mOnItemClose;
item_signal_t mOnItemClick;
@@ -156,8 +156,8 @@ protected:
LLTextBox* mGroupNameBoxExp;
private:
- LLGroupNotificationListItem(const LLGroupNotificationListItem &);
- LLGroupNotificationListItem & operator=(LLGroupNotificationListItem &);
+ LLGroupNotificationListItem(const LLGroupNotificationListItem&) = delete;
+ LLGroupNotificationListItem& operator=(LLGroupNotificationListItem&) = delete;
void setGroupName(std::string name);
bool updateFromCache();
@@ -175,8 +175,8 @@ public:
private:
friend class LLNotificationListItem;
LLGroupInviteNotificationListItem(const Params& p);
- LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem &);
- LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &);
+ LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem&) = delete;
+ LLGroupInviteNotificationListItem& operator=(LLGroupInviteNotificationListItem&) = delete;
void setFee(S32 fee);
@@ -202,8 +202,8 @@ public:
private:
friend class LLNotificationListItem;
LLGroupNoticeNotificationListItem(const Params& p);
- LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem &);
- LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &);
+ LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem&) = delete;
+ LLGroupNoticeNotificationListItem& operator=(LLGroupNoticeNotificationListItem&) = delete;
void setSender(std::string sender);
void onClickAttachment();
@@ -226,8 +226,8 @@ public:
private:
friend class LLNotificationListItem;
LLTransactionNotificationListItem(const Params& p);
- LLTransactionNotificationListItem(const LLTransactionNotificationListItem &);
- LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &);
+ LLTransactionNotificationListItem(const LLTransactionNotificationListItem&) = delete;
+ LLTransactionNotificationListItem& operator=(LLTransactionNotificationListItem&) = delete;
LLAvatarIconCtrl* mAvatarIcon;
LLAvatarIconCtrl* mAvatarIconExp;
};
@@ -239,8 +239,8 @@ public:
private:
friend class LLNotificationListItem;
LLSystemNotificationListItem(const Params& p);
- LLSystemNotificationListItem(const LLSystemNotificationListItem &);
- LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &);
+ LLSystemNotificationListItem(const LLSystemNotificationListItem&) = delete;
+ LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &) = delete;
LLIconCtrl* mSystemNotificationIcon;
LLIconCtrl* mSystemNotificationIconExp;
bool mIsCaution;
diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp
index 505f276f8c..29f11f7ca6 100644
--- a/indra/newview/llnotificationmanager.cpp
+++ b/indra/newview/llnotificationmanager.cpp
@@ -60,7 +60,7 @@ void LLNotificationManager::init()
mChannels.emplace_back(new LLBrowserNotification());
mChannels.emplace_back(new LLIMHandler());
- mChatHandler = std::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler());
+ mChatHandler = std::make_shared<LLFloaterIMNearbyChatHandler>();
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index 75bafb8785..5cec35fc88 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -41,7 +41,7 @@
#include "llregistry.h"
#include "llviewermessage.h"
-typedef boost::function<LLNotificationResponderInterface * (const LLSD& pParams)> responder_constructor_t;
+typedef std::function<LLNotificationResponderInterface*(const LLSD& pParams)> responder_constructor_t;
class LLResponderRegistry : public LLRegistrySingleton<std::string, responder_constructor_t, LLResponderRegistry>
{
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 58cd9fab83..32831fcd9b 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -54,7 +54,7 @@
#include "llvoavatarself.h"
#include "llwearableitemslist.h"
-static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y);
+static bool is_tab_header_clicked(LLOutfitAccordionCtrlTab* tab, S32 y);
static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR;
static const LLOutfitTabFavComparator OUTFIT_TAB_FAV_COMPARATOR;
@@ -246,7 +246,10 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
list->setCommitCallback(boost::bind(&LLOutfitsList::onListSelectionChange, this, _1));
// Setting list refresh callback to apply filter on list change.
- list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onRefreshComplete, this, _1));
+ list->setRefreshCompleteCallback([this, tab](LLUICtrl* ctrl, const LLSD& sd)
+ {
+ onRefreshComplete(ctrl, tab);
+ });
list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3));
@@ -294,7 +297,7 @@ void LLOutfitsList::updateRemovedCategory(LLUUID cat_id)
if (outfits_iter != mOutfitsMap.end())
{
const LLUUID& outfit_id = outfits_iter->first;
- LLAccordionCtrlTab* tab = outfits_iter->second;
+ LLOutfitAccordionCtrlTab* tab = outfits_iter->second;
// An outfit is removed from the list. Do the following:
// 1. Remove outfit category from observer to stop monitoring its changes.
@@ -322,11 +325,11 @@ void LLOutfitsList::onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id)
{
if (mOutfitsMap[prev_id])
{
- ((LLOutfitAccordionCtrlTab*)mOutfitsMap[prev_id])->setOutfitSelected(false);
+ mOutfitsMap[prev_id]->setOutfitSelected(false);
}
if (mOutfitsMap[base_id])
{
- ((LLOutfitAccordionCtrlTab*)mOutfitsMap[base_id])->setOutfitSelected(true);
+ mOutfitsMap[base_id]->setOutfitSelected(true);
}
}
@@ -370,7 +373,7 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid)
{
if (outfit_uuid == iter->first)
{
- LLAccordionCtrlTab* tab = iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
if (!tab) continue;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
@@ -464,7 +467,7 @@ void LLOutfitsList::onCollapseAllFolders()
iter != mOutfitsMap.end();
++iter)
{
- LLAccordionCtrlTab* tab = iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
if(tab && tab->isExpanded())
{
tab->changeOpenClose(true);
@@ -478,7 +481,7 @@ void LLOutfitsList::onExpandAllFolders()
iter != mOutfitsMap.end();
++iter)
{
- LLAccordionCtrlTab* tab = iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
if(tab && !tab->isExpanded())
{
tab->changeOpenClose(false);
@@ -501,7 +504,7 @@ void LLOutfitsList::updateChangedCategoryName(LLViewerInventoryCategory *cat, st
if (outfits_iter != mOutfitsMap.end())
{
// Update tab name with the new category name.
- LLOutfitAccordionCtrlTab* tab = (LLOutfitAccordionCtrlTab*) outfits_iter->second;
+ LLOutfitAccordionCtrlTab* tab = outfits_iter->second;
if (tab)
{
tab->setName(name);
@@ -554,7 +557,7 @@ void LLOutfitsList::deselectOutfit(const LLUUID& category_id)
LLOutfitListBase::deselectOutfit(category_id);
}
-void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id)
+void LLOutfitsList::restoreOutfitSelection(LLOutfitAccordionCtrlTab* tab, const LLUUID& category_id)
{
// Try restoring outfit selection after filtering.
if (mAccordion->getSelectedTab() == tab)
@@ -563,23 +566,21 @@ void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID
}
}
-void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl)
+void LLOutfitsList::onRefreshComplete(LLUICtrl* ctrl, LLOutfitAccordionCtrlTab* tab)
{
if (!ctrl || getFilterSubString().empty())
return;
- for (outfits_map_t::iterator
- iter = mOutfitsMap.begin(),
- iter_end = mOutfitsMap.end();
- iter != iter_end; ++iter)
+ LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
+ if (list != ctrl)
{
- LLAccordionCtrlTab* tab = iter->second;
- if (!tab) continue;
-
- LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
- if (list != ctrl) continue;
-
- applyFilterToTab(iter->first, tab, getFilterSubString());
+ llassert(false);
+ LL_WARNS() << "LLOutfitsList::onRefreshComplete: ctrl does not match tab's list!" << LL_ENDL;
+ return;
+ }
+ if (tab->getFilterGeneration() != getFilterGeneration())
+ {
+ applyFilterToTab(tab->getFolderID(), tab, getFilterSubString());
}
}
@@ -592,7 +593,7 @@ void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, cons
while (iter != iter_end)
{
const LLUUID& category_id = iter->first;
- LLAccordionCtrlTab* tab = iter++->second;
+ LLOutfitAccordionCtrlTab* tab = iter++->second;
if (!tab) continue;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
@@ -631,9 +632,10 @@ void LLOutfitsList::onFilterSubStringChanged(const std::string& new_string, cons
void LLOutfitsList::applyFilterToTab(
const LLUUID& category_id,
- LLAccordionCtrlTab* tab,
+ LLOutfitAccordionCtrlTab* tab,
const std::string& filter_substring)
{
+ LL_PROFILE_ZONE_SCOPED;
if (!tab) return;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (!list) return;
@@ -645,6 +647,7 @@ void LLOutfitsList::applyFilterToTab(
LLStringUtil::toUpper(cur_filter);
tab->setTitle(tab->getTitle(), cur_filter);
+ tab->setFilterGeneration(getFilterGeneration());
if (std::string::npos == title.find(cur_filter))
{
@@ -768,7 +771,7 @@ void LLOutfitsList::onCOFChanged()
outfits_map_t::iterator map_iter = mOutfitsMap.begin(), map_end = mOutfitsMap.end();
while (map_iter != map_end)
{
- LLAccordionCtrlTab* tab = (map_iter++)->second;
+ LLOutfitAccordionCtrlTab* tab = (map_iter++)->second;
if (!tab) continue;
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
@@ -799,7 +802,7 @@ void LLOutfitsList::sortOutfits()
void LLOutfitsList::onOutfitRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)
{
- LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl);
+ LLOutfitAccordionCtrlTab* tab = dynamic_cast<LLOutfitAccordionCtrlTab*>(ctrl);
if (mOutfitMenu && is_tab_header_clicked(tab, y) && cat_id.notNull())
{
// Focus tab header to trigger tab selection change.
@@ -822,7 +825,7 @@ void LLOutfitsList::handleInvFavColorChange()
++iter)
{
if (!iter->second) continue;
- LLOutfitAccordionCtrlTab* tab = (LLOutfitAccordionCtrlTab*)iter->second;
+ LLOutfitAccordionCtrlTab* tab = iter->second;
// refresh font color
tab->setFavorite(tab->getFavorite());
@@ -849,7 +852,7 @@ void LLOutfitsList::onChangeSortOrder(const LLSD& userdata)
{
for (outfits_map_t::value_type& outfit : mOutfitsMap)
{
- LLAccordionCtrlTab* tab = outfit.second;
+ LLOutfitAccordionCtrlTab* tab = outfit.second;
const LLUUID& category_id = outfit.first;
if (!tab) continue;
@@ -890,7 +893,7 @@ LLOutfitListGearMenuBase* LLOutfitsList::createGearMenu()
}
-bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y)
+bool is_tab_header_clicked(LLOutfitAccordionCtrlTab* tab, S32 y)
{
if(!tab || !tab->getHeaderVisible()) return false;
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 0bf5becb05..bcf7e45696 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -38,14 +38,13 @@
#include "lltoggleablemenu.h"
#include "llviewermenu.h"
-class LLAccordionCtrlTab;
+class LLOutfitAccordionCtrlTab;
class LLInventoryCategoriesObserver;
class LLOutfitListGearMenuBase;
class LLOutfitListSortMenuBase;
class LLWearableItemsList;
class LLListContextMenu;
-
/**
* @class LLOutfitTabNameComparator
*
@@ -76,7 +75,7 @@ public:
class LLOutfitListBase : public LLPanelAppearanceTab
{
public:
- typedef boost::function<void(const LLUUID&)> selection_change_callback_t;
+ typedef std::function<void(const LLUUID&)> selection_change_callback_t;
typedef boost::signals2::signal<void(const LLUUID&)> selection_change_signal_t;
LLOutfitListBase();
@@ -266,7 +265,10 @@ public:
void setFavorite(bool is_favorite);
bool getFavorite() const { return mIsFavorite; }
+ LLUUID getFolderID() const { return mFolderID; }
void setOutfitSelected(bool val);
+ U32 getFilterGeneration() const { return mFilterGeneration; }
+ void setFilterGeneration(U32 generation) { mFilterGeneration = generation; }
static LLUIImage* sFavoriteIcon;
static LLUIColor sFgColor;
@@ -284,6 +286,7 @@ public:
LLUUID mFolderID;
bool mIsFavorite = false;
bool mIsSelected = false;
+ U32 mFilterGeneration = 0;
};
/**
* @class LLOutfitsList
@@ -386,20 +389,20 @@ private:
*
* A tab may be hidden if it doesn't match current filter.
*/
- void restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id);
+ void restoreOutfitSelection(LLOutfitAccordionCtrlTab* tab, const LLUUID& category_id);
/**
* Called upon list refresh event to update tab visibility depending on
* the results of applying filter to the title and list items of the tab.
*/
- void onRefreshComplete(LLUICtrl* ctrl);
+ void onRefreshComplete(LLUICtrl* ctrl, LLOutfitAccordionCtrlTab* tab);
/**
* Applies filter to the given tab
*
* @see applyFilter()
*/
- void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring);
+ void applyFilterToTab(const LLUUID& category_id, LLOutfitAccordionCtrlTab* tab, const std::string& filter_substring);
/**
* Returns true if all selected items can be worn.
@@ -426,7 +429,7 @@ private:
typedef wearables_lists_map_t::value_type wearables_lists_map_value_t;
wearables_lists_map_t mSelectedListsMap;
- typedef std::map<LLUUID, LLAccordionCtrlTab*> outfits_map_t;
+ typedef std::map<LLUUID, LLOutfitAccordionCtrlTab*> outfits_map_t;
typedef outfits_map_t::value_type outfits_map_value_t;
outfits_map_t mOutfitsMap;
diff --git a/indra/newview/llpanelappearancetab.cpp b/indra/newview/llpanelappearancetab.cpp
index 3ee4ab8e51..ef04d7f13f 100644
--- a/indra/newview/llpanelappearancetab.cpp
+++ b/indra/newview/llpanelappearancetab.cpp
@@ -40,6 +40,7 @@ void LLPanelAppearanceTab::setFilterSubString(const std::string& new_string)
{
std::string old_string = mFilterSubString;
mFilterSubString = new_string;
+ mFilterGeneration++;
onFilterSubStringChanged(mFilterSubString, old_string);
}
@@ -52,6 +53,7 @@ void LLPanelAppearanceTab::checkFilterSubString()
{
std::string old_string = mFilterSubString;
mFilterSubString = sRecentFilterSubString;
+ mFilterGeneration++;
onFilterSubStringChanged(mFilterSubString, old_string);
}
}
diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h
index e088c3e6f0..936fe2aec7 100644
--- a/indra/newview/llpanelappearancetab.h
+++ b/indra/newview/llpanelappearancetab.h
@@ -48,6 +48,7 @@ public:
virtual void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const {}
const std::string& getFilterSubString() { return mFilterSubString; }
+ U32 getFilterGeneration() { return mFilterGeneration; }
virtual void updateMenuItemsVisibility() = 0;
virtual LLToggleableMenu* getGearMenu() = 0;
@@ -63,6 +64,7 @@ protected:
private:
std::string mFilterSubString;
+ U32 mFilterGeneration = 0;
static std::string sRecentFilterSubString;
};
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 0e72771bd8..35624436b3 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -126,11 +126,11 @@ static void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLS
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("put_avatar_properties_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
std::string finalUrl = cap_url + "/" + agent_id.asString();
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 7d55ba3265..69f51b03b6 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -263,7 +263,7 @@ void LLPanelBlockedList::callbackBlockByName(const std::string& text)
// Constructor/Destructor
LLFloaterGetBlockedObjectName::LLFloaterGetBlockedObjectName(const LLSD& key)
: LLFloater(key)
-, mGetObjectNameCallback(NULL)
+, mGetObjectNameCallback(nullptr)
{
}
diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h
index 1f470199ce..782a44bc5b 100644
--- a/indra/newview/llpanelblockedlist.h
+++ b/indra/newview/llpanelblockedlist.h
@@ -95,7 +95,7 @@ class LLFloaterGetBlockedObjectName : public LLFloater
{
friend class LLFloaterReg;
public:
- typedef boost::function<void (const std::string&)> get_object_name_callback_t;
+ typedef std::function<void(const std::string&)> get_object_name_callback_t;
bool postBuild() override;
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 449a670de9..aefda39fb9 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -153,8 +153,10 @@ void LLPanelClassifiedInfo::reshape(S32 width, S32 height, bool called_from_pare
void LLPanelClassifiedInfo::onOpen(const LLSD& key)
{
+ bool from_search = key.has("from_search") ? key["from_search"].asBoolean() : false;
+
LLUUID avatar_id = key["classified_creator_id"];
- if(avatar_id.isNull())
+ if(avatar_id.isNull() && !from_search)
{
return;
}
diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp
new file mode 100644
index 0000000000..69329c4ea4
--- /dev/null
+++ b/indra/newview/llpaneldirbrowser.cpp
@@ -0,0 +1,1145 @@
+/**
+ * @file llpaneldirbrowser.cpp
+ * @brief Base class for panels in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+// Base class for the various search panels/results browsers
+// in the Find floater. For example, Find > Popular Places
+// is derived from this.
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirbrowser.h"
+
+// linden library includes
+#include "lldir.h"
+#include "lleventflags.h"
+#include "llqueryflags.h"
+#include "message.h"
+
+// viewer project includes
+#include "llagent.h"
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "lllineeditor.h"
+#include "llnotificationsutil.h"
+#include "llpanelavatar.h"
+#include "llpanelgroup.h"
+#include "llpanelclassified.h"
+#include "llpaneldirevents.h"
+#include "llpaneldirland.h"
+#include "llproductinforequest.h"
+#include "llscrolllistctrl.h"
+#include "lltextbox.h"
+#include "lltrans.h"
+#include "llviewercontrol.h"
+#include "llfloaterdirectory.h"
+#include "llpanelprofile.h"
+#include "llpanelplaces.h"
+#include "llpaneleventinfo.h"
+
+
+std::map<LLUUID, LLPanelDirBrowser*> gDirBrowserInstances;
+
+LLPanelDirBrowser::LLPanelDirBrowser()
+: LLPanel(),
+ mSearchID(),
+ mWantSelectID(),
+ mCurrentSortColumn("name"),
+ mCurrentSortAscending(true),
+ mSearchStart(0),
+ mResultsPerPage(RESULTS_PER_PAGE_DEFAULT),
+ mResultsReceived(0),
+ mMinSearchChars(1),
+ mResultsContents(),
+ mHaveSearchResults(false),
+ mDidAutoSelect(true),
+ mLastResultTimer(),
+ mFloaterDirectory(nullptr)
+{
+}
+
+bool LLPanelDirBrowser::postBuild()
+{
+ childSetCommitCallback("results", onCommitList, this);
+
+ mPrevPageBtn = getChild<LLButton>("prev_btn");
+ mNextPageBtn = getChild<LLButton>("next_btn");
+
+ mPrevPageBtn->setClickedCallback([this](LLUICtrl*, const LLSD&){ prevPage(); });
+ mPrevPageBtn->setVisible(false);
+
+ mNextPageBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { nextPage(); });
+ mNextPageBtn->setVisible(false);
+
+ return true;
+}
+
+LLPanelDirBrowser::~LLPanelDirBrowser()
+{
+ // Children all cleaned up by default view destructor.
+ gDirBrowserInstances.erase(mSearchID);
+}
+
+// virtual
+void LLPanelDirBrowser::draw()
+{
+ // HACK: If the results panel has data, we want to select the first
+ // item. Unfortunately, we don't know when the find is actually done,
+ // so only do this if it's been some time since the last packet of
+ // results was received.
+ if (mLastResultTimer.getElapsedTimeF32() > 0.5)
+ {
+ if (!mDidAutoSelect &&
+ !childHasFocus("results"))
+ {
+ LLCtrlListInterface *list = childGetListInterface("results");
+ if (list)
+ {
+ if (list->getCanSelect())
+ {
+ list->selectFirstItem(); // select first item by default
+ childSetFocus("results", true);
+ }
+ // Request specific data from the server
+ onCommitList(NULL, this);
+ }
+ }
+ mDidAutoSelect = true;
+ }
+
+ LLPanel::draw();
+}
+
+
+// virtual
+void LLPanelDirBrowser::nextPage()
+{
+ mSearchStart += mResultsPerPage;
+ mPrevPageBtn->setVisible(true);
+
+ performQuery();
+}
+
+
+// virtual
+void LLPanelDirBrowser::prevPage()
+{
+ mSearchStart -= mResultsPerPage;
+ mPrevPageBtn->setVisible(mSearchStart > 0);
+
+ performQuery();
+}
+
+
+void LLPanelDirBrowser::resetSearchStart()
+{
+ mSearchStart = 0;
+ mNextPageBtn->setVisible(false);
+ mPrevPageBtn->setVisible(false);
+}
+
+// protected
+void LLPanelDirBrowser::updateResultCount()
+{
+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");
+
+ S32 result_count = list->getItemCount();
+ std::string result_text;
+
+ if (!mHaveSearchResults) result_count = 0;
+
+ if (mNextPageBtn && mNextPageBtn->getVisible())
+ {
+ // Item count be off by a few if bogus items sent from database
+ // Just use the number of results per page. JC
+ result_text = llformat(">%d found", mResultsPerPage);
+ }
+ else
+ {
+ result_text = llformat("%d found", result_count);
+ }
+
+ childSetValue("result_text", result_text);
+
+ if (result_count == 0)
+ {
+ // add none found response
+ if (list->getItemCount() == 0)
+ {
+ list->setCommentText(std::string("None found.")); // *TODO: Translate
+ list->operateOnAll(LLCtrlListInterface::OP_DESELECT);
+ }
+ }
+ else
+ {
+ childEnable("results");
+ }
+}
+
+// static
+std::string LLPanelDirBrowser::filterShortWords(const std::string source_string, int shortest_word_length, bool& was_filtered)
+{
+ // degenerate case
+ if ( source_string.length() < 1 )
+ return "";
+
+ std::stringstream codec( source_string );
+ std::string each_word;
+ std::vector< std::string > all_words;
+
+ while( codec >> each_word )
+ all_words.push_back( each_word );
+
+ std::ostringstream dest_string( "" );
+
+ was_filtered = false;
+
+ std::vector< std::string >::iterator iter = all_words.begin();
+ while( iter != all_words.end() )
+ {
+ if ( (int)(*iter).length() >= shortest_word_length )
+ {
+ dest_string << *iter;
+ dest_string << " ";
+ }
+ else
+ {
+ was_filtered = true;
+ }
+
+ ++iter;
+ };
+
+ return dest_string.str();
+}
+
+void LLPanelDirBrowser::selectByUUID(const LLUUID& id)
+{
+ LLCtrlListInterface *list = childGetListInterface("results");
+ if (!list) return;
+ bool found = list->setCurrentByID(id);
+ if (found)
+ {
+ // we got it, don't wait for network
+ // Don't bother looking for this in the draw loop.
+ mWantSelectID.setNull();
+ // Make sure UI updates.
+ onCommitList(NULL, this);
+ }
+ else
+ {
+ // waiting for this item from the network
+ mWantSelectID = id;
+ }
+}
+
+void LLPanelDirBrowser::selectEventByID(S32 event_id)
+{
+ if (mFloaterDirectory)
+ {
+ if (mFloaterDirectory->mPanelEventp)
+ {
+ mFloaterDirectory->mPanelEventp->setVisible(true);
+ mFloaterDirectory->mPanelEventp->setEventID(event_id);
+ }
+ }
+}
+
+void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type)
+{
+ LLCtrlListInterface *list = childGetListInterface("results");
+ if (!list) return;
+
+ LLSD id_sd = childGetValue("results");
+
+ *id = id_sd.asUUID();
+
+ std::string id_str = id_sd.asString();
+ *type = mResultsContents[id_str]["type"];
+}
+
+
+// static
+void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data)
+{
+ LLPanelDirBrowser* self = (LLPanelDirBrowser*)data;
+ LLCtrlListInterface *list = self->childGetListInterface("results");
+ if (!list) return;
+
+ // Start with everyone invisible
+ if (self->mFloaterDirectory)
+ {
+ self->mFloaterDirectory->hideAllDetailPanels();
+ }
+
+ if (!list->getCanSelect())
+ {
+ return;
+ }
+
+ std::string id_str = self->childGetValue("results").asString();
+ if (id_str.empty())
+ {
+ return;
+ }
+
+ LLSD item_id = list->getCurrentID();
+ S32 type = self->mResultsContents[id_str]["type"];
+ if (type == EVENT_CODE)
+ {
+ // all but events use the UUID above
+ item_id = self->mResultsContents[id_str]["event_id"];
+ }
+ //std::string name = self->mResultsContents[id_str]["name"].asString();
+ self->showDetailPanel(type, item_id);
+}
+
+void LLPanelDirBrowser::showDetailPanel(S32 type, LLSD id)
+{
+ switch(type)
+ {
+ case AVATAR_CODE:
+ if (mFloaterDirectory && mFloaterDirectory->mPanelAvatarp)
+ {
+ mFloaterDirectory->mPanelAvatarp->setVisible(true);
+ mFloaterDirectory->mPanelAvatarp->onOpen(id);
+ mFloaterDirectory->mPanelAvatarp->updateData();
+ }
+ break;
+ case GROUP_CODE:
+ if (mFloaterDirectory && mFloaterDirectory->mPanelGroupp)
+ {
+ mFloaterDirectory->mPanelGroupp->setVisible(true);
+ mFloaterDirectory->mPanelGroupp->onOpen(LLSD().with("group_id", id));
+ }
+ break;
+ case PLACE_CODE:
+ case FOR_SALE_CODE:
+ case AUCTION_CODE:
+ if (mFloaterDirectory && mFloaterDirectory->mPanelPlacep)
+ {
+ mFloaterDirectory->mPanelPlacep->setVisible(true);
+ LLSD key;
+ key["type"] = "remote_place";
+ key["id"]= id;
+ mFloaterDirectory->mPanelPlacep->onOpen(key);
+ }
+ break;
+ case CLASSIFIED_CODE:
+ if (mFloaterDirectory && mFloaterDirectory->mPanelClassifiedp)
+ {
+ mFloaterDirectory->mPanelClassifiedp->setVisible(true);
+ LLSD key;
+ key["classified_id"] = id;
+ key["from_search"] = true;
+ mFloaterDirectory->mPanelClassifiedp->onOpen(key);
+ }
+ break;
+ case EVENT_CODE:
+ {
+ U32 event_id = (U32)id.asInteger();
+ showEvent(event_id);
+ }
+ break;
+ default:
+ {
+ LL_WARNS() << "Unknown event type!" << LL_ENDL;
+ }
+ break;
+ }
+}
+
+
+void LLPanelDirBrowser::showEvent(const U32 event_id)
+{
+ // Start with everyone invisible
+ if (mFloaterDirectory)
+ {
+ mFloaterDirectory->hideAllDetailPanels();
+ if (mFloaterDirectory->mPanelEventp)
+ {
+ mFloaterDirectory->mPanelEventp->setVisible(true);
+ mFloaterDirectory->mPanelEventp->setEventID(event_id);
+ }
+ }
+}
+
+void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**)
+{
+ LLUUID query_id;
+ std::string first_name;
+ std::string last_name;
+ LLUUID agent_id;
+
+ msg->getUUIDFast(_PREHASH_QueryData,_PREHASH_QueryID, query_id);
+
+ LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL);
+ if (!self)
+ {
+ // data from an old query
+ return;
+ }
+
+ self->mHaveSearchResults = true;
+
+ LLCtrlListInterface *list = self->childGetListInterface("results");
+ if (!list) return;
+
+ if (!list->getCanSelect())
+ {
+ list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ self->mResultsContents = LLSD();
+ }
+
+ S32 rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies);
+ self->mResultsReceived += rows;
+
+ rows = self->showNextButton(rows);
+
+ for (S32 i = 0; i < rows; i++)
+ {
+ msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_FirstName, first_name, i);
+ msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_LastName, last_name, i);
+ msg->getUUIDFast( _PREHASH_QueryReplies,_PREHASH_AgentID, agent_id, i);
+ // msg->getU8Fast( _PREHASH_QueryReplies,_PREHASH_Online, online, i);
+ // unused
+ // msg->getStringFast(_PREHASH_QueryReplies,_PREHASH_Group, group, i);
+ // msg->getS32Fast( _PREHASH_QueryReplies,_PREHASH_Reputation, reputation, i);
+
+ if (agent_id.isNull())
+ {
+ continue;
+ }
+
+ LLSD content;
+
+ LLSD row;
+ row["id"] = agent_id;
+
+ // We don't show online status in the finder anymore,
+ // so just use the 'offline' icon as the generic 'person' icon
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_avatar_offline.tga";
+
+ content["type"] = AVATAR_CODE;
+
+ std::string fullname = first_name + " " + last_name;
+ row["columns"][1]["column"] = "name";
+ row["columns"][1]["value"] = fullname;
+ row["columns"][1]["font"] = "SANSSERIF";
+
+ content["name"] = fullname;
+
+ list->addElement(row);
+ self->mResultsContents[agent_id.asString()] = content;
+ }
+
+ list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending);
+ self->updateResultCount();
+
+ // Poke the result received timer
+ self->mLastResultTimer.reset();
+ self->mDidAutoSelect = false;
+}
+
+
+void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**)
+{
+ LLUUID agent_id;
+ LLUUID query_id;
+ LLUUID parcel_id;
+ std::string name;
+ bool is_for_sale = false;
+ bool is_auction = false;
+ F32 dwell;
+
+ msg->getUUID("AgentData", "AgentID", agent_id);
+ msg->getUUID("QueryData", "QueryID", query_id );
+
+ if (msg->getNumberOfBlocks("StatusData"))
+ {
+ U32 status;
+ msg->getU32("StatusData", "Status", status);
+ if (status & STATUS_SEARCH_PLACES_BANNEDWORD)
+ {
+ LLNotificationsUtil::add("SearchWordBanned");
+ }
+ }
+
+ LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL);
+ if (!self)
+ {
+ // data from an old query
+ return;
+ }
+
+ self->mHaveSearchResults = true;
+
+ LLCtrlListInterface *list = self->childGetListInterface("results");
+ if (!list) return;
+
+ if (!list->getCanSelect())
+ {
+ list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ self->mResultsContents = LLSD();
+ }
+
+ S32 count = msg->getNumberOfBlocks("QueryReplies");
+ self->mResultsReceived += count;
+
+ count = self->showNextButton(count);
+
+ for (S32 i = 0; i < count ; i++)
+ {
+ msg->getUUID("QueryReplies", "ParcelID", parcel_id, i);
+ msg->getString("QueryReplies", "Name", name, i);
+ msg->getBOOL("QueryReplies", "ForSale", is_for_sale, i);
+ msg->getBOOL("QueryReplies", "Auction", is_auction, i);
+ msg->getF32("QueryReplies", "Dwell", dwell, i);
+
+ if (parcel_id.isNull())
+ {
+ continue;
+ }
+
+ LLSD content;
+ S32 type;
+
+ LLSD row = self->createLandSale(parcel_id, is_auction, is_for_sale, name, &type);
+
+ content["type"] = type;
+ content["name"] = name;
+
+ std::string buffer = llformat("%.0f", (F64)dwell);
+ row["columns"][2]["column"] = "dwell";
+ row["columns"][2]["value"] = buffer;
+ row["columns"][2]["font"] = "SansSerifSmall";
+
+ list->addElement(row);
+ self->mResultsContents[parcel_id.asString()] = content;
+ }
+
+ list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending);
+ self->updateResultCount();
+
+ // Poke the result received timer
+ self->mLastResultTimer.reset();
+ self->mDidAutoSelect = false;
+}
+
+
+void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**)
+{
+ LLUUID agent_id;
+ LLUUID query_id;
+ LLUUID owner_id;
+ std::string name;
+ std::string date;
+
+ msg->getUUID("AgentData", "AgentID", agent_id);
+ msg->getUUID("QueryData", "QueryID", query_id );
+
+ LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL);
+ if (!self)
+ {
+ return;
+ }
+
+ if (msg->getNumberOfBlocks("StatusData"))
+ {
+ U32 status;
+ msg->getU32("StatusData", "Status", status);
+ if (status & STATUS_SEARCH_EVENTS_BANNEDWORD)
+ {
+ LLNotificationsUtil::add("SearchWordBanned");
+ }
+ }
+
+ self->mHaveSearchResults = true;
+
+ LLCtrlListInterface *list = self->childGetListInterface("results");
+ if (!list) return;
+
+ if (!list->getCanSelect())
+ {
+ list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ self->mResultsContents = LLSD();
+ }
+
+ S32 rows = msg->getNumberOfBlocks("QueryReplies");
+ self->mResultsReceived += rows;
+
+ rows = self->showNextButton(rows);
+
+ for (S32 i = 0; i < rows; i++)
+ {
+ U32 event_id;
+ U32 unix_time;
+ U32 event_flags;
+
+ msg->getUUID("QueryReplies", "OwnerID", owner_id, i);
+ msg->getString("QueryReplies", "Name", name, i);
+ msg->getU32("QueryReplies", "EventID", event_id, i);
+ msg->getString("QueryReplies", "Date", date, i);
+ msg->getU32("QueryReplies", "UnixTime", unix_time, i);
+ msg->getU32("QueryReplies", "EventFlags", event_flags, i);
+
+ // Skip empty events
+ if (owner_id.isNull())
+ {
+ //RN: should this check event_id instead?
+ LL_WARNS() << "skipped event due to owner_id null, event_id " << event_id << LL_ENDL;
+ continue;
+ }
+ LLSD content;
+
+ content["type"] = EVENT_CODE;
+ content["name"] = name;
+ content["event_id"] = (S32)event_id;
+
+ LLSD row;
+ row["id"] = llformat("%u", event_id);
+
+ // Column 0 - event icon
+ LLUUID image_id;
+ if (event_flags == EVENT_FLAG_ADULT)
+ {
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_event_adult.tga";
+ }
+ else if (event_flags == EVENT_FLAG_MATURE)
+ {
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_event_mature.tga";
+ }
+ else
+ {
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_event.tga";
+ }
+
+ row["columns"][1]["column"] = "name";
+ row["columns"][1]["value"] = name;
+ row["columns"][1]["font"] = "SANSSERIF";
+
+ row["columns"][2]["column"] = "date";
+ row["columns"][2]["value"] = date;
+ row["columns"][2]["font"] = "SansSerifSmall";
+
+ row["columns"][3]["column"] = "time";
+ row["columns"][3]["value"] = llformat("%u", unix_time);
+ row["columns"][3]["font"] = "SansSerifSmall";
+
+ list->addElement(row, ADD_TOP /*ADD_SORTED*/);
+
+ std::string id_str = llformat("%u", event_id);
+ self->mResultsContents[id_str] = content;
+ }
+
+ list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending);
+ self->updateResultCount();
+
+ // Poke the result received timer
+ self->mLastResultTimer.reset();
+ self->mDidAutoSelect = false;
+}
+
+
+// static
+void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**)
+{
+ S32 i;
+
+ LLUUID query_id;
+ LLUUID group_id;
+ std::string group_name;
+ S32 members;
+ F32 search_order;
+
+ msg->getUUIDFast(_PREHASH_QueryData,_PREHASH_QueryID, query_id );
+
+ LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL);
+ if (!self)
+ {
+ return;
+ }
+
+ self->mHaveSearchResults = true;
+
+ LLCtrlListInterface *list = self->childGetListInterface("results");
+ if (!list) return;
+
+ if (!list->getCanSelect())
+ {
+ list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ self->mResultsContents = LLSD();
+ }
+
+ S32 rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies);
+ self->mResultsReceived += rows;
+
+ rows = self->showNextButton(rows);
+
+ for (i = 0; i < rows; i++)
+ {
+ msg->getUUIDFast(_PREHASH_QueryReplies, _PREHASH_GroupID, group_id, i );
+ msg->getStringFast(_PREHASH_QueryReplies, _PREHASH_GroupName, group_name, i);
+ msg->getS32Fast(_PREHASH_QueryReplies, _PREHASH_Members, members, i );
+ msg->getF32Fast(_PREHASH_QueryReplies, _PREHASH_SearchOrder, search_order, i );
+
+ if (group_id.isNull())
+ {
+ continue;
+ }
+
+ LLSD content;
+ content["type"] = GROUP_CODE;
+ content["name"] = group_name;
+
+ LLSD row;
+ row["id"] = group_id;
+
+ LLUUID image_id;
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_group.tga";
+
+ row["columns"][1]["column"] = "name";
+ row["columns"][1]["value"] = group_name;
+ row["columns"][1]["font"] = "SANSSERIF";
+
+ row["columns"][2]["column"] = "members";
+ row["columns"][2]["value"] = members;
+ row["columns"][2]["font"] = "SansSerifSmall";
+
+ row["columns"][3]["column"] = "score";
+ row["columns"][3]["value"] = search_order;
+
+ list->addElement(row);
+ self->mResultsContents[group_id.asString()] = content;
+ }
+ list->sortByColumn(self->mCurrentSortColumn, self->mCurrentSortAscending);
+ self->updateResultCount();
+
+ // Poke the result received timer
+ self->mLastResultTimer.reset();
+ self->mDidAutoSelect = false;
+}
+
+
+// static
+void LLPanelDirBrowser::processDirClassifiedReply(LLMessageSystem* msg, void**)
+{
+ S32 i;
+ S32 num_new_rows;
+
+ LLUUID agent_id;
+ LLUUID query_id;
+
+ msg->getUUID("AgentData", "AgentID", agent_id);
+ if (agent_id != gAgent.getID())
+ {
+ LL_WARNS() << "Message for wrong agent " << agent_id
+ << " in processDirClassifiedReply" << LL_ENDL;
+ return;
+ }
+
+ msg->getUUID("QueryData", "QueryID", query_id);
+ LLPanelDirBrowser* self = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL);
+ if (!self)
+ {
+ return;
+ }
+
+ if (msg->getNumberOfBlocks("StatusData"))
+ {
+ U32 status;
+ msg->getU32("StatusData", "Status", status);
+ if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD)
+ {
+ LLNotificationsUtil::add("SearchWordBanned");
+ }
+ }
+
+ self->mHaveSearchResults = true;
+
+ LLCtrlListInterface *list = self->childGetListInterface("results");
+ if (!list) return;
+
+ if (!list->getCanSelect())
+ {
+ list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ self->mResultsContents = LLSD();
+ }
+
+ num_new_rows = msg->getNumberOfBlocksFast(_PREHASH_QueryReplies);
+ self->mResultsReceived += num_new_rows;
+
+ num_new_rows = self->showNextButton(num_new_rows);
+ for (i = 0; i < num_new_rows; i++)
+ {
+ LLUUID classified_id;
+ std::string name;
+ U32 creation_date = 0; // unix timestamp
+ U32 expiration_date = 0; // future use
+ S32 price_for_listing = 0;
+ msg->getUUID("QueryReplies", "ClassifiedID", classified_id, i);
+ msg->getString("QueryReplies", "Name", name, i);
+ msg->getU32("QueryReplies","CreationDate",creation_date,i);
+ msg->getU32("QueryReplies","ExpirationDate",expiration_date,i);
+ msg->getS32("QueryReplies","PriceForListing",price_for_listing,i);
+
+ if ( classified_id.notNull() )
+ {
+ self->addClassified(list, classified_id, name, creation_date, price_for_listing);
+
+ LLSD content;
+ content["type"] = CLASSIFIED_CODE;
+ content["name"] = name;
+ self->mResultsContents[classified_id.asString()] = content;
+ }
+ }
+ // The server does the initial sort, by price paid per listing and date. JC
+ self->updateResultCount();
+
+ // Poke the result received timer
+ self->mLastResultTimer.reset();
+ self->mDidAutoSelect = false;
+}
+
+void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**)
+{
+ LLUUID agent_id;
+ LLUUID query_id;
+ LLUUID parcel_id;
+ std::string name;
+ std::string land_sku;
+ std::string land_type;
+ bool auction = false;
+ bool for_sale = false;
+ S32 sale_price;
+ S32 actual_area;
+
+ msg->getUUID("AgentData", "AgentID", agent_id);
+ msg->getUUID("QueryData", "QueryID", query_id );
+
+ LLPanelDirBrowser* browser = get_if_there(gDirBrowserInstances, query_id, (LLPanelDirBrowser*)NULL);
+ if (!browser)
+ {
+ // data from an old query
+ return;
+ }
+
+ // Only handled by LLPanelDirLand
+ LLPanelDirLand* self = (LLPanelDirLand*)browser;
+
+ self->mHaveSearchResults = true;
+
+ LLCtrlListInterface *list = self->childGetListInterface("results");
+ if (!list) return;
+
+ if (!list->getCanSelect())
+ {
+ list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ self->mResultsContents = LLSD();
+ }
+
+ bool use_price = gSavedSettings.getBOOL("FindLandPrice");
+ S32 limit_price = self->childGetValue("priceedit").asInteger();
+
+ bool use_area = gSavedSettings.getBOOL("FindLandArea");
+ S32 limit_area = self->childGetValue("areaedit").asInteger();
+
+ S32 i;
+ S32 count = msg->getNumberOfBlocks("QueryReplies");
+ self->mResultsReceived += count;
+
+ S32 non_auction_count = 0;
+ for (i = 0; i < count; i++)
+ {
+ msg->getUUID("QueryReplies", "ParcelID", parcel_id, i);
+ msg->getString("QueryReplies", "Name", name, i);
+ msg->getBOOL("QueryReplies", "Auction", auction, i);
+ msg->getBOOL("QueryReplies", "ForSale", for_sale, i);
+ msg->getS32("QueryReplies", "SalePrice", sale_price, i);
+ msg->getS32("QueryReplies", "ActualArea", actual_area, i);
+
+ if ( msg->getSizeFast(_PREHASH_QueryReplies, i, _PREHASH_ProductSKU) > 0 )
+ {
+ msg->getStringFast(_PREHASH_QueryReplies, _PREHASH_ProductSKU, land_sku, i);
+ land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku);
+ }
+ else
+ {
+ land_sku.clear();
+ land_type = LLTrans::getString("land_type_unknown");
+ }
+
+ if (parcel_id.isNull()) continue;
+
+ if (use_price && (sale_price > limit_price)) continue;
+
+ if (use_area && (actual_area < limit_area)) continue;
+
+ LLSD content;
+ S32 type;
+
+ LLSD row = self->createLandSale(parcel_id, auction, for_sale, name, &type);
+
+ content["type"] = type;
+ content["name"] = name;
+ content["landtype"] = land_type;
+
+ std::string buffer = "Auction";
+ if (!auction)
+ {
+ buffer = llformat("%d", sale_price);
+ non_auction_count++;
+ }
+ row["columns"][2]["column"] = "price";
+ row["columns"][2]["value"] = buffer;
+ row["columns"][2]["font"] = "SansSerifSmall";
+
+ buffer = llformat("%d", actual_area);
+ row["columns"][3]["column"] = "area";
+ row["columns"][3]["value"] = buffer;
+ row["columns"][3]["font"] = "SansSerifSmall";
+
+ if (!auction)
+ {
+ F32 price_per_meter;
+ if (actual_area > 0)
+ {
+ price_per_meter = (F32)sale_price / (F32)actual_area;
+ }
+ else
+ {
+ price_per_meter = 0.f;
+ }
+ // Prices are usually L$1 - L$10 / meter
+ buffer = llformat("%.1f", price_per_meter);
+ row["columns"][4]["column"] = "per_meter";
+ row["columns"][4]["value"] = buffer;
+ row["columns"][4]["font"] = "SansSerifSmall";
+ }
+ else
+ {
+ // Auctions start at L$1 per meter
+ row["columns"][4]["column"] = "per_meter";
+ row["columns"][4]["value"] = "1.0";
+ row["columns"][4]["font"] = "SansSerifSmall";
+ }
+
+ row["columns"][5]["column"] = "landtype";
+ row["columns"][5]["value"] = land_type;
+ row["columns"][5]["font"] = "SansSerifSmall";
+
+ list->addElement(row);
+ self->mResultsContents[parcel_id.asString()] = content;
+ }
+
+ // All auction results are shown on the first page
+ // But they don't count towards the 100 / page limit
+ // So figure out the next button here, when we know how many aren't auctions
+ count = self->showNextButton(non_auction_count);
+
+ self->updateResultCount();
+
+ // Poke the result received timer
+ self->mLastResultTimer.reset();
+ self->mDidAutoSelect = false;
+}
+
+void LLPanelDirBrowser::addClassified(LLCtrlListInterface *list, const LLUUID& pick_id, const std::string& name, const U32 creation_date, const S32 price_for_listing)
+{
+ std::string type = llformat("%d", CLASSIFIED_CODE);
+
+ LLSD row;
+ row["id"] = pick_id;
+
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_top_pick.tga";
+
+ row["columns"][1]["column"] = "name";
+ row["columns"][1]["value"] = name;
+ row["columns"][1]["font"] = "SANSSERIF";
+
+ row["columns"][2]["column"] = "price";
+ row["columns"][2]["value"] = price_for_listing;
+ row["columns"][2]["font"] = "SansSerifSmall";
+
+ list->addElement(row);
+}
+
+LLSD LLPanelDirBrowser::createLandSale(const LLUUID& parcel_id, bool is_auction, bool is_for_sale, const std::string& name, S32 *type)
+{
+ LLSD row;
+ row["id"] = parcel_id;
+ LLUUID image_id;
+
+ // Icon and type
+ if(is_auction)
+ {
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_auction.tga";
+
+ *type = AUCTION_CODE;
+ }
+ else if (is_for_sale)
+ {
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_for_sale.tga";
+
+ *type = FOR_SALE_CODE;
+ }
+ else
+ {
+ row["columns"][0]["column"] = "icon";
+ row["columns"][0]["type"] = "icon";
+ row["columns"][0]["value"] = "icon_place.tga";
+
+ *type = PLACE_CODE;
+ }
+
+ row["columns"][1]["column"] = "name";
+ row["columns"][1]["value"] = name;
+ row["columns"][1]["font"] = "SANSSERIF";
+
+ return row;
+}
+
+void LLPanelDirBrowser::setupNewSearch()
+{
+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");
+
+ gDirBrowserInstances.erase(mSearchID);
+ // Make a new query ID
+ mSearchID.generate();
+
+ gDirBrowserInstances.emplace(mSearchID, this);
+
+ // ready the list for results
+ list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ list->setCommentText(LLTrans::getString("Searching"));
+ list->setEnabled(false);
+
+ mResultsReceived = 0;
+ mHaveSearchResults = false;
+
+ // Set all panels to be invisible
+ mFloaterDirectory->hideAllDetailPanels();
+
+ updateResultCount();
+}
+
+
+// static
+// called from calssifieds, events, groups, land, people, and places
+void LLPanelDirBrowser::onClickSearchCore(void* userdata)
+{
+ LLPanelDirBrowser* self = (LLPanelDirBrowser*)userdata;
+ if (!self) return;
+
+ self->resetSearchStart();
+ self->performQuery();
+}
+
+
+// static
+void LLPanelDirBrowser::sendDirFindQuery(
+ LLMessageSystem* msg,
+ const LLUUID& query_id,
+ const std::string& text,
+ U32 flags,
+ S32 query_start)
+{
+ msg->newMessage("DirFindQuery");
+ msg->nextBlock("AgentData");
+ msg->addUUID("AgentID", gAgent.getID());
+ msg->addUUID("SessionID", gAgent.getSessionID());
+ msg->nextBlock("QueryData");
+ msg->addUUID("QueryID", query_id);
+ msg->addString("QueryText", text);
+ msg->addU32("QueryFlags", flags);
+ msg->addS32("QueryStart", query_start);
+ gAgent.sendReliableMessage();
+}
+
+
+void LLPanelDirBrowser::onKeystrokeName(LLLineEditor* line, void* data)
+{
+ LLPanelDirBrowser *self = (LLPanelDirBrowser*)data;
+ if (line->getLength() >= (S32)self->mMinSearchChars)
+ {
+ self->setDefaultBtn( "Search" );
+ self->childEnable("Search");
+ }
+ else
+ {
+ self->setDefaultBtn();
+ self->childDisable("Search");
+ }
+}
+
+// setup results when shown
+void LLPanelDirBrowser::onVisibilityChange(bool new_visibility)
+{
+ if (new_visibility)
+ {
+ onCommitList(NULL, this);
+ }
+ LLPanel::onVisibilityChange(new_visibility);
+}
+
+S32 LLPanelDirBrowser::showNextButton(S32 rows)
+{
+ // HACK: This hack doesn't work for llpaneldirfind (ALL)
+ // because other data is being returned as well.
+ if ( getName() != "find_all_old_panel")
+ {
+ // HACK: The (mResultsPerPage)+1th entry indicates there are 'more'
+ bool show_next = (mResultsReceived > mResultsPerPage);
+ mNextPageBtn->setVisible(show_next);
+ if (show_next)
+ {
+ rows -= (mResultsReceived - mResultsPerPage);
+ }
+ }
+ else
+ {
+ // Hide page buttons
+ mNextPageBtn->setVisible(false);
+ mPrevPageBtn->setVisible(false);
+ }
+ return rows;
+}
diff --git a/indra/newview/llpaneldirbrowser.h b/indra/newview/llpaneldirbrowser.h
new file mode 100644
index 0000000000..f422affc4b
--- /dev/null
+++ b/indra/newview/llpaneldirbrowser.h
@@ -0,0 +1,167 @@
+/**
+ * @file llpaneldirbrowser.h
+ * @brief Base class for panels in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELDIRBROWSER_H
+#define LL_LLPANELDIRBROWSER_H
+
+#include "llpanel.h"
+
+#include "llframetimer.h"
+
+class LLMessageSystem;
+class LLFloaterDirectory;
+class LLLineEditor;
+
+class LLPanelDirBrowser: public LLPanel
+{
+public:
+ LLPanelDirBrowser();
+ virtual ~LLPanelDirBrowser();
+
+ bool postBuild() override;
+ void setFloaterDirectory(LLFloaterDirectory* floater) { mFloaterDirectory = floater; }
+
+ // Use to get periodic updates.
+ void draw() override;
+
+ void onVisibilityChange(bool curVisibilityIn) override;
+
+ // Redo your search for the prev/next page of results
+ virtual void prevPage();
+ virtual void nextPage();
+ void resetSearchStart();
+ // Do the current query (used by prevPage/nextPage)
+ virtual void performQuery() {};
+
+ const LLUUID& getSearchID() const { return mSearchID; }
+
+ // Select the line in the scroll list control with this ID,
+ // either now or when data arrives from the server.
+ void selectByUUID(const LLUUID& id);
+
+ void selectEventByID(S32 event_id);
+
+ void getSelectedInfo(LLUUID* id, S32 *type);
+
+ void showDetailPanel(S32 type, LLSD item_id);
+ // type is EVENT_CODE, PLACE_CODE, etc. from below.
+ // item_id is integer for events, UUID for all others.
+
+ // from llpaneldirbase
+ void setupNewSearch();
+
+ // default handler for clicking the search button resets the
+ // next/prev state and performs the query.
+ // Expects a pointer to an LLPanelDirBrowser object.
+ static void onClickSearchCore(void* userdata);
+
+ // query_start indicates the first result row to
+ // return, usually 0 or 100 or 200 because the searches
+ // return a max of 100 rows
+ static void sendDirFindQuery(
+ LLMessageSystem* msg,
+ const LLUUID& query_id,
+ const std::string& text,
+ U32 flags,
+ S32 query_start);
+
+ void showEvent(const U32 event_id);
+
+ static void onCommitList(LLUICtrl* ctrl, void* data);
+
+ static void processDirPeopleReply(LLMessageSystem* msg, void**);
+ static void processDirPlacesReply(LLMessageSystem* msg, void**);
+ static void processDirEventsReply(LLMessageSystem* msg, void**);
+ static void processDirGroupsReply(LLMessageSystem* msg, void**);
+ static void processDirClassifiedReply(LLMessageSystem* msg, void**);
+ static void processDirLandReply(LLMessageSystem *msg, void**);
+
+ std::string filterShortWords( const std::string source_string, int shortest_word_length, bool& was_filtered );
+
+protected:
+ void updateResultCount();
+
+ void addClassified(LLCtrlListInterface *list, const LLUUID& classified_id, const std::string& name, const U32 creation_date, const S32 price_for_listing);
+ LLSD createLandSale(const LLUUID& parcel_id, bool is_auction, bool is_for_sale, const std::string& name, S32 *type);
+
+ static void onKeystrokeName(LLLineEditor* line, void* data);
+
+ // If this is a search for a panel like "people_panel" (and not the "all" panel)
+ // optionally show the "Next" button. Return the actual number of
+ // rows to display.
+ S32 showNextButton(S32 rows);
+
+protected:
+ LLUUID mSearchID; // Unique ID for a pending search
+ LLUUID mWantSelectID; // scroll item to select on arrival
+ std::string mCurrentSortColumn;
+ bool mCurrentSortAscending;
+ // Some searches return a max of 100 items per page, so we can
+ // start the search from the 100th item rather than the 0th, etc.
+ S32 mSearchStart;
+ // Places is 100 per page, events is 200 per page
+ S32 mResultsPerPage;
+ S32 mResultsReceived;
+
+ U32 mMinSearchChars;
+
+ LLSD mResultsContents;
+
+ bool mHaveSearchResults;
+ bool mDidAutoSelect;
+ LLFrameTimer mLastResultTimer;
+
+ LLFloaterDirectory* mFloaterDirectory;
+ LLButton* mPrevPageBtn;
+ LLButton* mNextPageBtn;
+};
+
+constexpr S32 RESULTS_PER_PAGE_DEFAULT = 100;
+constexpr S32 RESULTS_PER_PAGE_EVENTS = 200;
+
+// Codes used for sorting by type.
+const S32 INVALID_CODE = -1;
+const S32 EVENT_CODE = 0;
+const S32 PLACE_CODE = 1;
+// We no longer show online vs. offline in search result icons.
+//const S32 ONLINE_CODE = 2;
+//const S32 OFFLINE_CODE = 3;
+const S32 AVATAR_CODE = 3;
+const S32 GROUP_CODE = 4;
+const S32 CLASSIFIED_CODE = 5;
+const S32 FOR_SALE_CODE = 6; // for sale place
+const S32 AUCTION_CODE = 7; // for auction place
+const S32 POPULAR_CODE = 8; // popular by dwell
+
+// mask values for search flags
+const S32 SEARCH_NONE = 0; // should try not to send this to the search engine
+const S32 SEARCH_PG = 1;
+const S32 SEARCH_MATURE = 2;
+const S32 SEARCH_ADULT = 4;
+
+extern std::map<LLUUID, LLPanelDirBrowser*> gDirBrowserInstances;
+
+#endif // LL_LLPANELDIRBROWSER_H
diff --git a/indra/newview/llpaneldirclassified.cpp b/indra/newview/llpaneldirclassified.cpp
new file mode 100644
index 0000000000..ca625b956b
--- /dev/null
+++ b/indra/newview/llpaneldirclassified.cpp
@@ -0,0 +1,109 @@
+/**
+ * @file llpaneldirclassified.cpp
+ * @brief Classified panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirclassified.h"
+
+#include "llclassifiedflags.h"
+
+#include "llfontgl.h"
+#include "message.h"
+#include "llqueryflags.h"
+
+#include "llagent.h"
+#include "llbutton.h"
+#include "llcontrol.h"
+#include "llcombobox.h"
+#include "llclassifiedinfo.h"
+#include "lluiconstants.h"
+#include "llpaneldirbrowser.h"
+#include "lltextbox.h"
+
+#include "llcheckboxctrl.h"
+#include "llfloaterdirectory.h"
+#include "lllineeditor.h"
+#include "llsearcheditor.h"
+#include "llviewermenu.h"
+#include "llnotificationsutil.h"
+
+static LLPanelInjector<LLPanelDirClassified> t_panel_dir_classified("panel_dir_classified");
+
+LLPanelDirClassified::LLPanelDirClassified()
+: LLPanelDirBrowser()
+{
+}
+
+bool LLPanelDirClassified::postBuild()
+{
+ LLPanelDirBrowser::postBuild();
+
+ childSetAction("Search", onClickSearchCore, this);
+ setDefaultBtn("Search");
+ return true;
+}
+
+LLPanelDirClassified::~LLPanelDirClassified()
+{
+}
+
+void LLPanelDirClassified::performQuery()
+{
+ static LLUICachedControl<bool> inc_pg("ShowPGClassifieds", true);
+ static LLUICachedControl<bool> inc_mature("ShowMatureClassifieds", false);
+ static LLUICachedControl<bool> inc_adult("ShowAdultClassifieds", false);
+
+ if (!(inc_pg || inc_mature || inc_adult))
+ {
+ LLNotificationsUtil::add("NoContentToSearch");
+ return;
+ }
+
+ // This sets mSearchID and clears the list of results
+ setupNewSearch();
+
+ // send the message
+ LLMessageSystem *msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_DirClassifiedQuery);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+
+ bool filter_auto_renew = false;
+ U32 query_flags = pack_classified_flags_request(filter_auto_renew, inc_pg,
+ inc_mature && gAgent.canAccessMature(),
+ inc_adult && gAgent.canAccessAdult());
+ U32 category = childGetValue("Category").asInteger();
+
+ msg->nextBlockFast(_PREHASH_QueryData);
+ msg->addUUIDFast(_PREHASH_QueryID, mSearchID );
+ msg->addStringFast(_PREHASH_QueryText, childGetValue("name").asString());
+ msg->addU32Fast(_PREHASH_QueryFlags, query_flags);
+ msg->addU32Fast(_PREHASH_Category, category);
+ msg->addS32Fast(_PREHASH_QueryStart,mSearchStart);
+
+ gAgent.sendReliableMessage();
+}
diff --git a/indra/newview/llpaneldirclassified.h b/indra/newview/llpaneldirclassified.h
new file mode 100644
index 0000000000..6682f73929
--- /dev/null
+++ b/indra/newview/llpaneldirclassified.h
@@ -0,0 +1,55 @@
+/**
+ * @file llpaneldirclassified.h
+ * @brief Classified panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELDIRCLASSIFIED_H
+#define LL_LLPANELDIRCLASSIFIED_H
+
+#include "llpaneldirbrowser.h"
+
+// UI class forward declarations
+class LLButton;
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLLineEditor;
+class LLScrollListCtrl;
+
+class LLPanelDirClassified : public LLPanelDirBrowser
+{
+public:
+ LLPanelDirClassified();
+ /*virtual*/ ~LLPanelDirClassified();
+
+ bool postBuild();
+
+ // Request the classifieds from the database
+ void performQuery();
+
+protected:
+ // onClickNext and onClickPrev are special case searches
+ static void onClickSearch(void *userdata);
+};
+
+#endif
diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp
new file mode 100644
index 0000000000..7ac1229637
--- /dev/null
+++ b/indra/newview/llpaneldirevents.cpp
@@ -0,0 +1,247 @@
+/**
+ * @file llpaneldirevents.cpp
+ * @brief Events panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirevents.h"
+
+#include <sstream>
+
+// linden library includes
+#include "message.h"
+#include "llqueryflags.h"
+
+// viewer project includes
+#include "llagent.h"
+#include "llviewercontrol.h"
+#include "llnotificationsutil.h"
+#include "llpaneldirbrowser.h"
+#include "llresmgr.h"
+#include "lluiconstants.h"
+#include "llappviewer.h"
+
+static LLPanelInjector<LLPanelDirEvents> t_panel_dir_events("panel_dir_events");
+
+constexpr S32 DAY_TO_SEC = 24 * 60 * 60;
+
+LLPanelDirEvents::LLPanelDirEvents()
+ : LLPanelDirBrowser(),
+ mDay(0)
+{
+ // more results per page for this
+ mResultsPerPage = RESULTS_PER_PAGE_EVENTS;
+}
+
+bool LLPanelDirEvents::postBuild()
+{
+ LLPanelDirBrowser::postBuild();
+
+ childSetCommitCallback("date_mode", onDateModeCallback, this);
+
+ childSetAction("back_btn", onBackBtn, this);
+ childSetAction("forward_btn", onForwardBtn, this);
+
+ childSetCommitCallback("mature", onCommitMature, this);
+
+ childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this);
+ setDefaultBtn("Search");
+
+ onDateModeCallback(NULL, this);
+
+ mCurrentSortColumn = "time";
+
+ setDay(0); // for today
+
+ return true;
+}
+
+LLPanelDirEvents::~LLPanelDirEvents()
+{
+}
+
+void LLPanelDirEvents::setDay(S32 day)
+{
+ mDay = day;
+
+ // Get time UTC
+ time_t utc_time = time_corrected();
+
+ // Correct for offset
+ utc_time += day * DAY_TO_SEC;
+
+ // There's only one internal tm buffer.
+ struct tm* internal_time;
+
+ // Convert to Pacific, based on server's opinion of whether
+ // it's daylight savings time there.
+ internal_time = utc_to_pacific_time(utc_time, is_daylight_savings());
+
+ std::string buffer = llformat("%d/%d",
+ 1 + internal_time->tm_mon, // Jan = 0
+ internal_time->tm_mday); // 2001 = 101
+ childSetValue("date_text", buffer);
+}
+
+// virtual
+void LLPanelDirEvents::performQuery()
+{
+ // event_id 0 will perform no delete action.
+ performQueryOrDelete(0);
+}
+
+void LLPanelDirEvents::performQueryOrDelete(U32 event_id)
+{
+ S32 relative_day = mDay;
+ // Update the date field to show the date IN THE SERVER'S
+ // TIME ZONE, as that is what will be displayed in each event
+
+ // Get time UTC
+ time_t utc_time = time_corrected();
+
+ // Correct for offset
+ utc_time += relative_day * DAY_TO_SEC;
+
+ // There's only one internal tm buffer.
+ struct tm* internal_time;
+
+ // Convert to Pacific, based on server's opinion of whether
+ // it's daylight savings time there.
+ internal_time = utc_to_pacific_time(utc_time, is_daylight_savings());
+
+ std::string buffer = llformat("%d/%d",
+ 1 + internal_time->tm_mon, // Jan = 0
+ internal_time->tm_mday); // 2001 = 101
+ childSetValue("date_text", buffer);
+
+ // Record the relative day so back and forward buttons
+ // offset from this day.
+ mDay = relative_day;
+
+ static LLUICachedControl<bool> incpg("ShowPGEvents", true);
+ static LLUICachedControl<bool> incmature("ShowMatureEvents", false);
+ static LLUICachedControl<bool> incadult("ShowAdultEvents", false);
+ if (!(incpg || incmature || incadult))
+ {
+ LLNotificationsUtil::add("NoContentToSearch");
+ return;
+ }
+
+ U32 scope = DFQ_DATE_EVENTS;
+ if (incpg) scope |= DFQ_INC_PG;
+ if (incmature && gAgent.canAccessMature()) scope |= DFQ_INC_MATURE;
+ if (incadult && gAgent.canAccessAdult()) scope |= DFQ_INC_ADULT;
+
+ setupNewSearch();
+
+ std::ostringstream params;
+
+ // Date mode for the search
+ if ("current" == childGetValue("date_mode").asString())
+ {
+ params << "u|";
+ }
+ else
+ {
+ params << mDay << "|";
+ }
+
+ // Categories are stored in the database in table indra.event_category
+ // XML must match.
+ U32 cat_id = childGetValue("category_combo").asInteger();
+
+ params << cat_id << "|";
+ params << childGetValue("event_search_text").asString();
+
+ // send the message
+ if (0 == event_id)
+ {
+ sendDirFindQuery(gMessageSystem, mSearchID, params.str(), scope, mSearchStart);
+ }
+ else
+ {
+ // This delete will also perform a query.
+ LLMessageSystem* msg = gMessageSystem;
+
+ msg->newMessageFast(_PREHASH_EventGodDelete);
+
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+
+ msg->nextBlockFast(_PREHASH_EventData);
+ msg->addU32Fast(_PREHASH_EventID, event_id);
+
+ msg->nextBlockFast(_PREHASH_QueryData);
+ msg->addUUIDFast(_PREHASH_QueryID, mSearchID);
+ msg->addStringFast(_PREHASH_QueryText, params.str());
+ msg->addU32Fast(_PREHASH_QueryFlags, scope);
+ msg->addS32Fast(_PREHASH_QueryStart, mSearchStart);
+ gAgent.sendReliableMessage();
+ }
+}
+
+// static
+void LLPanelDirEvents::onDateModeCallback(LLUICtrl* ctrl, void *data)
+{
+ LLPanelDirEvents* self = (LLPanelDirEvents*)data;
+ if (self->childGetValue("date_mode").asString() == "date")
+ {
+ self->childEnable("forward_btn");
+ self->childEnable("back_btn");
+ }
+ else
+ {
+ self->childDisable("forward_btn");
+ self->childDisable("back_btn");
+ }
+}
+
+// static
+void LLPanelDirEvents::onBackBtn(void* data)
+{
+ LLPanelDirEvents* self = (LLPanelDirEvents*)data;
+ self->resetSearchStart();
+ self->setDay(self->mDay - 1);
+ self->performQuery();
+}
+
+
+// static
+void LLPanelDirEvents::onForwardBtn(void* data)
+{
+ LLPanelDirEvents* self = (LLPanelDirEvents*)data;
+ self->resetSearchStart();
+ self->setDay(self->mDay + 1);
+ self->performQuery();
+}
+
+
+// static
+void LLPanelDirEvents::onCommitMature(LLUICtrl* ctrl, void* data)
+{
+ // just perform another search
+ onClickSearchCore(data);
+}
diff --git a/indra/newview/llpaneldirevents.h b/indra/newview/llpaneldirevents.h
new file mode 100644
index 0000000000..596abc5f0e
--- /dev/null
+++ b/indra/newview/llpaneldirevents.h
@@ -0,0 +1,61 @@
+/**
+ * @file llpaneldirevents.h
+ * @brief Events panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELDIREVENTS_H
+#define LL_LLPANELDIREVENTS_H
+
+#include "llpaneldirbrowser.h"
+
+class LLUICtrl;
+class LLPanelDirBrowser;
+
+class LLPanelDirEvents : public LLPanelDirBrowser
+{
+public:
+ LLPanelDirEvents();
+ virtual ~LLPanelDirEvents();
+
+ bool postBuild() override;
+
+ /*virtual*/ void performQuery() override;
+
+ void performQueryOrDelete(U32 event_id);
+
+ // pass 0 for today, 1 for tomorrow
+ void setDay(S32 day);
+
+protected:
+ static void onDateModeCallback(LLUICtrl* ctrl, void *data);
+ static void onBackBtn(void* data);
+ static void onForwardBtn(void* data);
+ static void onCommitMature(LLUICtrl* ctrl, void* data);
+
+protected:
+ S32 mDay; // 0 = today, 1 = tomorrow
+};
+
+
+#endif
diff --git a/indra/newview/llpaneldirgroups.cpp b/indra/newview/llpaneldirgroups.cpp
new file mode 100644
index 0000000000..992d92091c
--- /dev/null
+++ b/indra/newview/llpaneldirgroups.cpp
@@ -0,0 +1,90 @@
+/**
+ * @file llpaneldirgroups.cpp
+ * @brief Groups panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirgroups.h"
+
+#include "llagent.h"
+#include "llqueryflags.h"
+#include "llviewercontrol.h"
+#include "llsearcheditor.h"
+
+static LLPanelInjector<LLPanelDirGroups> t_panel_dir_groups("panel_dir_groups");
+
+LLPanelDirGroups::LLPanelDirGroups()
+ : LLPanelDirBrowser()
+{
+ mMinSearchChars = 3;
+}
+
+
+bool LLPanelDirGroups::postBuild()
+{
+ LLPanelDirBrowser::postBuild();
+
+ //getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL);
+
+ childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
+ setDefaultBtn( "Search" );
+
+ return true;
+}
+
+LLPanelDirGroups::~LLPanelDirGroups()
+{
+}
+
+// virtual
+void LLPanelDirGroups::performQuery()
+{
+ if (childGetValue("name").asString().length() < mMinSearchChars)
+ {
+ return;
+ }
+
+ setupNewSearch();
+
+ // groups
+ U32 scope = DFQ_GROUPS;
+
+ // Check group mature filter.
+ if ( !gSavedSettings.getBOOL("ShowMatureGroups") || gAgent.isTeen() )
+ {
+ scope |= DFQ_FILTER_MATURE;
+ }
+
+ mCurrentSortColumn = "score";
+ mCurrentSortAscending = false;
+
+ // send the message
+ sendDirFindQuery(
+ gMessageSystem,
+ mSearchID,
+ childGetValue("name").asString(),
+ scope,
+ mSearchStart);
+}
diff --git a/indra/newview/llpaneldirgroups.h b/indra/newview/llpaneldirgroups.h
new file mode 100644
index 0000000000..1e10353e2a
--- /dev/null
+++ b/indra/newview/llpaneldirgroups.h
@@ -0,0 +1,45 @@
+/**
+ * @file llpaneldirgroups.h
+ * @brief Groups panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LLPANELDIRGROUPS_H
+#define LLPANELDIRGROUPS_H
+
+#include "llpaneldirbrowser.h"
+
+class LLPanelDirGroups : public LLPanelDirBrowser
+{
+public:
+ LLPanelDirGroups();
+ virtual ~LLPanelDirGroups();
+
+ /*virtual*/ bool postBuild();
+
+ /*virtual*/ void performQuery();
+
+ static void onClickSearch(void *userdata);
+};
+
+#endif
diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp
new file mode 100644
index 0000000000..f85a8b948e
--- /dev/null
+++ b/indra/newview/llpaneldirland.cpp
@@ -0,0 +1,233 @@
+/**
+ * @file llpaneldirland.cpp
+ * @brief Land panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirland.h"
+
+#include "llagent.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "lllineeditor.h"
+#include "llnotificationsutil.h"
+#include "llqueryflags.h"
+#include "llscrolllistctrl.h"
+#include "llstatusbar.h"
+#include "lltextbox.h"
+#include "llviewercontrol.h"
+#include "llviewermessage.h"
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+static const char FIND_ALL[] = "All Types";
+static const char FIND_AUCTION[] = "Auction";
+static const char FIND_MAINLANDSALES[] = "Mainland Sales";
+static const char FIND_ESTATESALES[] = "Estate Sales";
+
+static LLPanelInjector<LLPanelDirLand> t_panel_dir_land("panel_dir_land");
+
+LLPanelDirLand::LLPanelDirLand()
+ : LLPanelDirBrowser()
+{
+}
+
+bool LLPanelDirLand::postBuild()
+{
+ LLPanelDirBrowser::postBuild();
+
+ childSetValue("type", gSavedSettings.getString("FindLandType"));
+
+ childSetCommitCallback("pricecheck", onCommitPrice, this);
+ childSetCommitCallback("areacheck", onCommitArea, this);
+
+ if (gStatusBar)
+ {
+ childSetValue("priceedit", gStatusBar->getBalance());
+ }
+ childSetEnabled("priceedit", gSavedSettings.getBOOL("FindLandPrice"));
+ LLLineEditor* priceedit = getChild<LLLineEditor>("priceedit");
+ priceedit->setPrevalidateInput(LLTextValidate::validateNonNegativeS32);
+
+ childSetEnabled("areaedit", gSavedSettings.getBOOL("FindLandArea"));
+ LLLineEditor* areaedit = getChild<LLLineEditor>("areaedit");
+ areaedit->setPrevalidateInput(LLTextValidate::validateNonNegativeS32);
+
+ childSetAction("Search", onClickSearchCore, this);
+ setDefaultBtn("Search");
+
+ mCurrentSortColumn = "per_meter";
+
+ LLScrollListCtrl* results = getChild<LLScrollListCtrl>("results");
+ if (results)
+ {
+ results->setSortChangedCallback(boost::bind(&LLPanelDirLand::onClickSort, this));
+ results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending);
+ }
+
+ return true;
+}
+
+LLPanelDirLand::~LLPanelDirLand()
+{
+ // Children all cleaned up by default view destructor.
+}
+
+void LLPanelDirLand::onClickSort()
+{
+ performQuery();
+}
+
+// static
+void LLPanelDirLand::onCommitPrice(LLUICtrl* ctrl, void* data)
+{
+ LLPanelDirLand* self = (LLPanelDirLand*)data;
+ LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl;
+
+ if (!self || !check) return;
+ self->childSetEnabled("priceedit", check->get());
+}
+
+// static
+void LLPanelDirLand::onCommitArea(LLUICtrl* ctrl, void* data)
+{
+ LLPanelDirLand* self = (LLPanelDirLand*)data;
+ LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl;
+
+ if (!self || !check) return;
+ self->childSetEnabled("areaedit", check->get());
+}
+
+void LLPanelDirLand::performQuery()
+{
+ static LLUICachedControl<bool> inc_pg("ShowPGLand", true);
+ static LLUICachedControl<bool> inc_mature("ShowMatureLand", false);
+ static LLUICachedControl<bool> inc_adult("ShowAdultLand", false);
+ if (!(inc_pg || inc_mature || inc_adult))
+ {
+ LLNotificationsUtil::add("NoContentToSearch");
+ return;
+ }
+
+ LLMessageSystem* msg = gMessageSystem;
+
+ setupNewSearch();
+
+ // We could change the UI to allow arbitrary combinations of these options
+ U32 search_type = ST_ALL;
+ const std::string& type = childGetValue("type").asString();
+ if(!type.empty())
+ {
+ if (FIND_AUCTION == type) search_type = ST_AUCTION;
+ else if(FIND_MAINLANDSALES == type) search_type = ST_MAINLAND;
+ else if(FIND_ESTATESALES == type) search_type = ST_ESTATE;
+ }
+
+ U32 query_flags = 0x0;
+ if (gAgent.wantsPGOnly()) query_flags |= DFQ_PG_SIMS_ONLY;
+
+ bool adult_enabled = gAgent.canAccessAdult();
+ bool mature_enabled = gAgent.canAccessMature();
+
+ if (inc_pg)
+ {
+ query_flags |= DFQ_INC_PG;
+ }
+
+ if (inc_mature && mature_enabled)
+ {
+ query_flags |= DFQ_INC_MATURE;
+ }
+
+ if (inc_adult && adult_enabled)
+ {
+ query_flags |= DFQ_INC_ADULT;
+ }
+
+ // Add old flags in case we are talking to an old dataserver
+ if (inc_pg && !inc_mature)
+ {
+ query_flags |= DFQ_PG_SIMS_ONLY;
+ }
+
+ if (!inc_pg && inc_mature)
+ {
+ query_flags |= DFQ_MATURE_SIMS_ONLY;
+ }
+
+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");
+ if (list)
+ {
+ std::string sort_name = list->getSortColumnName();
+ BOOL sort_asc = list->getSortAscending();
+
+ if (sort_name == "name")
+ {
+ query_flags |= DFQ_NAME_SORT;
+ }
+ else if (sort_name == "price")
+ {
+ query_flags |= DFQ_PRICE_SORT;
+ }
+ else if (sort_name == "per_meter")
+ {
+ query_flags |= DFQ_PER_METER_SORT;
+ }
+ else if (sort_name == "area")
+ {
+ query_flags |= DFQ_AREA_SORT;
+ }
+
+ if (sort_asc)
+ {
+ query_flags |= DFQ_SORT_ASC;
+ }
+ }
+
+ if (childGetValue("pricecheck").asBoolean())
+ {
+ query_flags |= DFQ_LIMIT_BY_PRICE;
+ }
+
+ if (childGetValue("areacheck").asBoolean())
+ {
+ query_flags |= DFQ_LIMIT_BY_AREA;
+ }
+
+ msg->newMessage("DirLandQuery");
+ msg->nextBlock("AgentData");
+ msg->addUUID("AgentID", gAgent.getID());
+ msg->addUUID("SessionID", gAgent.getSessionID());
+ msg->nextBlock("QueryData");
+ msg->addUUID("QueryID", getSearchID());
+ msg->addU32("QueryFlags", query_flags);
+ msg->addU32("SearchType", search_type);
+ msg->addS32("Price", childGetValue("priceedit").asInteger());
+ msg->addS32("Area", childGetValue("areaedit").asInteger());
+ msg->addS32Fast(_PREHASH_QueryStart,mSearchStart);
+ gAgent.sendReliableMessage();
+}
diff --git a/indra/newview/llpaneldirland.h b/indra/newview/llpaneldirland.h
new file mode 100644
index 0000000000..197c4cdc3d
--- /dev/null
+++ b/indra/newview/llpaneldirland.h
@@ -0,0 +1,53 @@
+/**
+ * @file llpaneldirland.h
+ * @brief Land panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELDIRLAND_H
+#define LL_LLPANELDIRLAND_H
+
+#include "llpaneldirbrowser.h"
+
+class LLUICtrl;
+class LLPanelDirBrowser;
+
+class LLPanelDirLand : public LLPanelDirBrowser
+{
+public:
+ LLPanelDirLand();
+ /*virtual*/ ~LLPanelDirLand();
+
+ bool postBuild();
+
+ void performQuery();
+
+protected:
+ void onClickSort();
+ static void onCommitPrice(LLUICtrl* ctrl, void* data);
+ static void onCommitArea(LLUICtrl* ctrl, void* data);
+
+};
+
+
+#endif
diff --git a/indra/newview/llpaneldirpeople.cpp b/indra/newview/llpaneldirpeople.cpp
new file mode 100644
index 0000000000..6a55e3bc7c
--- /dev/null
+++ b/indra/newview/llpaneldirpeople.cpp
@@ -0,0 +1,105 @@
+/**
+ * @file llpaneldirpeople.cpp
+ * @brief People panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirpeople.h"
+#include "llviewerwindow.h"
+#include "llsearcheditor.h"
+
+// viewer project includes
+#include "llqueryflags.h"
+#include "llnotificationsutil.h"
+
+static LLPanelInjector<LLPanelDirPeople> t_panel_dir_people("panel_dir_people");
+
+LLPanelDirPeople::LLPanelDirPeople()
+: LLPanelDirBrowser()
+{
+ mMinSearchChars = 3;
+}
+
+bool LLPanelDirPeople::postBuild()
+{
+ LLPanelDirBrowser::postBuild();
+
+ //getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL);
+
+ childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
+ setDefaultBtn( "Search" );
+
+ return true;
+}
+
+LLPanelDirPeople::~LLPanelDirPeople()
+{
+}
+
+// virtual
+void LLPanelDirPeople::performQuery()
+{
+ if (childGetValue("name").asString().length() < mMinSearchChars)
+ {
+ return;
+ }
+
+ // filter short words out of the query string
+ // and indidate if we did have to filter it
+ // The shortest username is 2 characters long.
+ const S32 SHORTEST_WORD_LEN = 2;
+ bool query_was_filtered = false;
+ std::string query_string = LLPanelDirBrowser::filterShortWords(
+ childGetValue("name").asString(),
+ SHORTEST_WORD_LEN,
+ query_was_filtered );
+
+ // possible we threw away all the short words in the query so check length
+ if ( query_string.length() < mMinSearchChars )
+ {
+ LLNotificationsUtil::add("SeachFilteredOnShortWordsEmpty");
+ return;
+ };
+
+ // if we filtered something out, display a popup
+ if ( query_was_filtered )
+ {
+ LLSD args;
+ args["FINALQUERY"] = query_string;
+ LLNotificationsUtil::add("SeachFilteredOnShortWords", args);
+ };
+
+ setupNewSearch();
+
+ U32 scope = DFQ_PEOPLE;
+
+ // send the message
+ sendDirFindQuery(
+ gMessageSystem,
+ mSearchID,
+ query_string,
+ scope,
+ mSearchStart);
+}
diff --git a/indra/newview/llpaneldirpeople.h b/indra/newview/llpaneldirpeople.h
new file mode 100644
index 0000000000..a8a7d17cb2
--- /dev/null
+++ b/indra/newview/llpaneldirpeople.h
@@ -0,0 +1,48 @@
+/**
+ * @file llpaneldirpeople.h
+ * @brief People panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELDIRPEOPLE_H
+#define LL_LLPANELDIRPEOPLE_H
+
+#include "llpaneldirbrowser.h"
+class LLLineEditor;
+class LLFloaterDirectory;
+
+class LLPanelDirPeople : public LLPanelDirBrowser
+{
+public:
+ LLPanelDirPeople();
+ virtual ~LLPanelDirPeople();
+
+ /*virtual*/ bool postBuild();
+
+ /*virtual*/ void performQuery();
+
+ static void onClickSearch(void *userdata);
+ static void onKeystrokeName(LLLineEditor* line, void* data);
+};
+
+#endif
diff --git a/indra/newview/llpaneldirplaces.cpp b/indra/newview/llpaneldirplaces.cpp
new file mode 100644
index 0000000000..3501baf697
--- /dev/null
+++ b/indra/newview/llpaneldirplaces.cpp
@@ -0,0 +1,184 @@
+/**
+ * @file llpaneldirplaces.cpp
+ * @brief Places panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirplaces.h"
+
+#include "message.h"
+#include "llparcel.h"
+#include "llregionflags.h"
+#include "llqueryflags.h"
+
+#include "llagent.h"
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "llfloaterdirectory.h"
+#include "lllineeditor.h"
+#include "llnotificationsutil.h"
+#include "llpaneldirbrowser.h"
+#include "llsearcheditor.h"
+#include "lltextbox.h"
+#include "llviewercontrol.h"
+
+static LLPanelInjector<LLPanelDirPlaces> t_panel_dir_people("panel_dir_places");
+
+LLPanelDirPlaces::LLPanelDirPlaces()
+ : LLPanelDirBrowser()
+{
+ mMinSearchChars = 3;
+}
+
+bool LLPanelDirPlaces::postBuild()
+{
+ LLPanelDirBrowser::postBuild();
+
+ //getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL);
+
+ childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
+ setDefaultBtn("Search");
+
+ mCurrentSortColumn = "dwell";
+ mCurrentSortAscending = false;
+
+ return true;
+}
+
+LLPanelDirPlaces::~LLPanelDirPlaces()
+{
+}
+
+// virtual
+void LLPanelDirPlaces::performQuery()
+{
+ std::string place_name = childGetValue("name").asString();
+ if (place_name.length() < mMinSearchChars)
+ {
+ return;
+ }
+
+ // "hi " is three chars but not a long-enough search
+ std::string query_string = place_name;
+ LLStringUtil::trim( query_string );
+ bool query_was_filtered = (query_string != place_name);
+
+ // possible we threw away all the short words in the query so check length
+ if ( query_string.length() < mMinSearchChars )
+ {
+ LLNotificationsUtil::add("SeachFilteredOnShortWordsEmpty");
+ return;
+ };
+
+ // if we filtered something out, display a popup
+ if ( query_was_filtered )
+ {
+ LLSD args;
+ args["FINALQUERY"] = query_string;
+ LLNotificationsUtil::add("SeachFilteredOnShortWords", args);
+ };
+
+ std::string catstring = childGetValue("Category").asString();
+
+ // Because LLParcel::C_ANY is -1, must do special check
+ S32 category = 0;
+ if (catstring == "any")
+ {
+ category = LLParcel::C_ANY;
+ }
+ else
+ {
+ category = LLParcel::getCategoryFromString(catstring);
+ }
+
+ U32 flags = 0x0;
+ bool adult_enabled = gAgent.canAccessAdult();
+ bool mature_enabled = gAgent.canAccessMature();
+
+ static LLUICachedControl<bool> inc_pg("ShowPGSims", true);
+ static LLUICachedControl<bool> inc_mature("ShowMatureSims", false);
+ static LLUICachedControl<bool> inc_adult("ShowAdultSims", false);
+ if (!(inc_pg || inc_mature || inc_adult))
+ {
+ LLNotificationsUtil::add("NoContentToSearch");
+ return;
+ }
+
+ if (inc_pg)
+ {
+ flags |= DFQ_INC_PG;
+ }
+
+ if (inc_mature && mature_enabled)
+ {
+ flags |= DFQ_INC_MATURE;
+ }
+
+ if (inc_adult && adult_enabled)
+ {
+ flags |= DFQ_INC_ADULT;
+ }
+
+ queryCore(query_string, category, flags);
+}
+
+void LLPanelDirPlaces::initialQuery()
+{
+ // All Linden locations in PG/Mature sims, any name.
+ U32 flags = DFQ_INC_PG | DFQ_INC_MATURE;
+ queryCore(LLStringUtil::null, LLParcel::C_LINDEN, flags);
+}
+
+void LLPanelDirPlaces::queryCore(const std::string& name, S32 category, U32 flags)
+{
+ setupNewSearch();
+
+// JC: Sorting by dwell severely impacts the performance of the query.
+// Instead of sorting on the dataserver, we sort locally once the results
+// are received.
+// IW: Re-enabled dwell sort based on new 3-character minimum description
+// Hopefully we'll move to next-gen Find before this becomes a big problem
+
+ flags |= DFQ_DWELL_SORT;
+
+ LLMessageSystem* msg = gMessageSystem;
+
+ msg->newMessage("DirPlacesQuery");
+ msg->nextBlock("AgentData");
+ msg->addUUID("AgentID", gAgent.getID());
+ msg->addUUID("SessionID", gAgent.getSessionID());
+ msg->nextBlock("QueryData");
+ msg->addUUID("QueryID", getSearchID());
+ msg->addString("QueryText", name);
+ msg->addU32("QueryFlags", flags);
+ msg->addS8("Category", (S8)category);
+ // No longer support queries by region name, too many regions
+ // for combobox, no easy way to do autocomplete. JC
+ msg->addString("SimName", "");
+ msg->addS32Fast(_PREHASH_QueryStart,mSearchStart);
+ gAgent.sendReliableMessage();
+}
+
diff --git a/indra/newview/llpaneldirplaces.h b/indra/newview/llpaneldirplaces.h
new file mode 100644
index 0000000000..069414ebf5
--- /dev/null
+++ b/indra/newview/llpaneldirplaces.h
@@ -0,0 +1,51 @@
+/**
+ * @file llpaneldirplaces.h
+ * @brief Places panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELDIRPLACES_H
+#define LL_LLPANELDIRPLACES_H
+
+#include "llpaneldirbrowser.h"
+
+class LLLineEditor;
+
+class LLPanelDirPlaces : public LLPanelDirBrowser
+{
+public:
+ LLPanelDirPlaces();
+ virtual ~LLPanelDirPlaces();
+
+ bool postBuild() override;
+
+ void performQuery() override;
+
+ // Initially fill in some data for the panel.
+ void initialQuery();
+
+private:
+ void queryCore(const std::string& name, S32 category, U32 flags);
+};
+
+#endif
diff --git a/indra/newview/llpaneldirweb.cpp b/indra/newview/llpaneldirweb.cpp
new file mode 100644
index 0000000000..9e76bb81a6
--- /dev/null
+++ b/indra/newview/llpaneldirweb.cpp
@@ -0,0 +1,148 @@
+/**
+ * @file llpaneldirweb.cpp
+ * @brief Web panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneldirweb.h"
+
+#include "llagent.h"
+#include "llbutton.h"
+#include "llfloaterdirectory.h"
+#include "lltextbox.h"
+#include "llviewercontrol.h"
+#include "llweb.h"
+
+static LLPanelInjector<LLPanelDirWeb> t_panel_dir_web("panel_dir_web");
+
+LLPanelDirWeb::LLPanelDirWeb()
+: LLPanel(),
+ mFloaterDirectory(nullptr),
+ mWebBrowser(nullptr)
+{
+}
+
+bool LLPanelDirWeb::postBuild()
+{
+ childSetAction("home_btn", onClickHome, this);
+
+ mBtnBack = getChild<LLButton>("back_btn");
+ mBtnForward = getChild<LLButton>("forward_btn");
+ mStatusBarText = getChild<LLTextBox>("statusbartext");
+
+ mBtnBack->setClickedCallback([this](LLUICtrl*, const LLSD&) { mWebBrowser->navigateBack(); });
+ mBtnForward->setClickedCallback([this](LLUICtrl*, const LLSD&) { mWebBrowser->navigateForward(); });
+
+ mWebBrowser = findChild<LLMediaCtrl>("web_search");
+ navigateToDefaultPage();
+ mWebBrowser->addObserver(this);
+
+ return true;
+}
+
+void LLPanelDirWeb::draw()
+{
+ // Asynchronous so we need to keep checking
+ mBtnBack->setEnabled(mWebBrowser->canNavigateBack());
+ mBtnForward->setEnabled(mWebBrowser->canNavigateForward());
+
+ LLPanel::draw();
+}
+
+LLPanelDirWeb::~LLPanelDirWeb()
+{
+}
+
+// When we show any browser-based view, we want to hide all
+// the right-side XUI detail panels.
+// virtual
+void LLPanelDirWeb::onVisibilityChange(bool new_visibility)
+{
+ if (new_visibility && mFloaterDirectory)
+ {
+ mFloaterDirectory->hideAllDetailPanels();
+ }
+ LLPanel::onVisibilityChange(new_visibility);
+}
+
+void LLPanelDirWeb::navigateToDefaultPage()
+{
+ std::string url = gSavedSettings.getString("SearchURL");
+
+ LLSD subs;
+ subs["QUERY"] = "";
+ subs["TYPE"] = "standard";
+ // Default to PG
+ std::string maturity = "g";
+ if (gAgent.prefersAdult())
+ {
+ // PG,Mature,Adult
+ maturity = "gma";
+ }
+ else if (gAgent.prefersMature())
+ {
+ // PG,Mature
+ maturity = "gm";
+ }
+ subs["MATURITY"] = maturity;
+ url = LLWeb::expandURLSubstitutions(url, subs);
+ mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
+}
+
+// static
+void LLPanelDirWeb::onClickHome( void* data )
+{
+ LLPanelDirWeb* self = (LLPanelDirWeb*)data;
+ if (!self)
+ return;
+ self->navigateToDefaultPage();
+}
+
+void LLPanelDirWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
+{
+ if (event == MEDIA_EVENT_LOCATION_CHANGED)
+ {
+ const std::string url = self->getLocation();
+ if (url.length())
+ mStatusBarText->setText(url);
+ }
+ else if (event == MEDIA_EVENT_NAVIGATE_COMPLETE)
+ {
+ // we populate the status bar with URLs as they change so clear it now we're done
+ const std::string end_str = "";
+ mStatusBarText->setText(end_str);
+ }
+ else if (event == MEDIA_EVENT_STATUS_TEXT_CHANGED)
+ {
+ const std::string text = self->getStatusText();
+ if (text.length())
+ mStatusBarText->setText(text);
+ }
+ else if (event == MEDIA_EVENT_LINK_HOVERED)
+ {
+ const std::string link = self->getHoverLink();
+ mStatusBarText->setText(link);
+ }
+}
diff --git a/indra/newview/llpaneldirweb.h b/indra/newview/llpaneldirweb.h
new file mode 100644
index 0000000000..db7bdc4a6a
--- /dev/null
+++ b/indra/newview/llpaneldirweb.h
@@ -0,0 +1,63 @@
+/**
+ * @file llpaneldirweb.h
+ * @brief Web panel in the legacy Search directory.
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELDIRWEB_H
+#define LL_LLPANELDIRWEB_H
+
+#include "llpanel.h"
+#include "llmediactrl.h"
+
+class LLTextBox;
+class LLFloaterDirectory;
+class LLWebBrowserCtrlObserver;
+
+class LLPanelDirWeb : public LLPanel, public LLViewerMediaObserver
+{
+public:
+ LLPanelDirWeb();
+ ~LLPanelDirWeb();
+
+ bool postBuild() override;
+ void onVisibilityChange(bool new_visibility) override;
+ void draw() override;
+
+ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override;
+
+ void navigateToDefaultPage();
+
+ void setFloaterDirectory(LLFloaterDirectory* floater) { mFloaterDirectory = floater; }
+
+protected:
+ static void onClickHome( void* data );
+
+ LLButton* mBtnBack;
+ LLButton* mBtnForward;
+ LLTextBox* mStatusBarText;
+ LLFloaterDirectory* mFloaterDirectory;
+ LLMediaCtrl* mWebBrowser;
+};
+
+#endif
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 3d376251ff..578206a768 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -35,7 +35,6 @@
#include "llvirtualtrackball.h"
#include "llsettingssky.h"
#include "llenvironment.h"
-#include "llatmosphere.h"
#include "llviewercontrol.h"
namespace
@@ -926,13 +925,6 @@ void LLPanelSettingsSkyDensityTab::updateProfile()
mSkySettings->setAbsorptionConfigs(absorption_config);
mSkySettings->update();
setIsDirty();
-
- if (gAtmosphere)
- {
- AtmosphericModelSettings atmospheric_settings;
- LLEnvironment::getAtmosphericModelSettings(atmospheric_settings, mSkySettings);
- gAtmosphere->configureAtmosphericModel(atmospheric_settings);
- }
}
void LLPanelSettingsSkyDensityTab::onRayleighExponentialChanged()
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 282b6d4a0a..8bcb6e9ec3 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -438,7 +438,7 @@ template <typename T>
const LLEditWearableDictionary::PickerControlEntry*
get_picker_entry (const ETextureIndex index) { return NULL; }
-typedef boost::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t;
+typedef std::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t;
typedef struct PickerControlEntryNamePredicate
{
diff --git a/indra/newview/llpaneleventinfo.cpp b/indra/newview/llpaneleventinfo.cpp
new file mode 100644
index 0000000000..43b20b3851
--- /dev/null
+++ b/indra/newview/llpaneleventinfo.cpp
@@ -0,0 +1,195 @@
+/**
+ * @file llpaneleventinfo.cpp
+ * @brief Info panel for events in the legacy Search
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpaneleventinfo.h"
+
+#include "llagent.h"
+#include "llbutton.h"
+#include "lleventflags.h"
+#include "llfloaterreg.h"
+#include "llfloaterworldmap.h"
+#include "lltextbox.h"
+#include "llviewertexteditor.h"
+#include "llworldmap.h"
+
+static LLPanelInjector<LLPanelEventInfo> t_panel_event_info("panel_event_info");
+
+LLPanelEventInfo::LLPanelEventInfo()
+ : LLPanel()
+{
+}
+
+LLPanelEventInfo::~LLPanelEventInfo()
+{
+ if (mEventInfoConnection.connected())
+ {
+ mEventInfoConnection.disconnect();
+ }
+}
+
+bool LLPanelEventInfo::postBuild()
+{
+ mTBName = getChild<LLTextBox>("event_name");
+
+ mTBCategory = getChild<LLTextBox>("event_category");
+ mTBDate = getChild<LLTextBox>("event_date");
+ mTBDuration = getChild<LLTextBox>("event_duration");
+ mTBDesc = getChild<LLTextEditor>("event_desc");
+ mTBDesc->setWordWrap(true);
+
+ mTBRunBy = getChild<LLTextBox>("event_runby");
+ mTBLocation = getChild<LLTextBox>("event_location");
+ mTBCover = getChild<LLTextBox>("event_cover");
+
+ mTeleportBtn = getChild<LLButton>( "teleport_btn");
+ mTeleportBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickTeleport, this));
+
+ mMapBtn = getChild<LLButton>( "map_btn");
+ mMapBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickMap, this));
+
+ mNotifyBtn = getChild<LLButton>( "notify_btn");
+ mNotifyBtn->setClickedCallback(boost::bind(&LLPanelEventInfo::onClickNotify, this));
+
+ mEventInfoConnection = gEventNotifier.setEventInfoCallback(boost::bind(&LLPanelEventInfo::processEventInfoReply, this, _1));
+
+ return true;
+}
+
+void LLPanelEventInfo::setEventID(const U32 event_id)
+{
+ mEventID = event_id;
+
+ if (event_id != 0)
+ {
+ sendEventInfoRequest();
+ }
+}
+
+void LLPanelEventInfo::sendEventInfoRequest()
+{
+ LLMessageSystem *msg = gMessageSystem;
+
+ msg->newMessageFast(_PREHASH_EventInfoRequest);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() );
+ msg->nextBlockFast(_PREHASH_EventData);
+ msg->addU32Fast(_PREHASH_EventID, mEventID);
+ gAgent.sendReliableMessage();
+}
+
+bool LLPanelEventInfo::processEventInfoReply(LLEventInfo event)
+{
+ if (event.mID != getEventID())
+ return false;
+
+ mTBName->setText(event.mName);
+ mTBName->setToolTip(event.mName);
+ mTBCategory->setText(event.mCategoryStr);
+ mTBDate->setText(event.mTimeStr);
+ mTBDesc->setText(event.mDesc);
+ mTBRunBy->setText(LLSLURL("agent", event.mRunByID, "inspect").getSLURLString());
+
+ mTBDuration->setText(llformat("%d:%.2d", event.mDuration / 60, event.mDuration % 60));
+
+ if (!event.mHasCover)
+ {
+ mTBCover->setText(getString("none"));
+ }
+ else
+ {
+ mTBCover->setText(llformat("%d", event.mCover));
+ }
+
+ mTBLocation->setText(LLSLURL(event.mSimName, event.mPosGlobal).getSLURLString());
+
+ if (event.mEventFlags & EVENT_FLAG_MATURE)
+ {
+ childSetVisible("event_mature_yes", true);
+ childSetVisible("event_mature_no", false);
+ }
+ else
+ {
+ childSetVisible("event_mature_yes", false);
+ childSetVisible("event_mature_no", true);
+ }
+
+ if (event.mUnixTime < time_corrected())
+ {
+ mNotifyBtn->setEnabled(false);
+ }
+ else
+ {
+ mNotifyBtn->setEnabled(true);
+ }
+
+ if (gEventNotifier.hasNotification(event.mID))
+ {
+ mNotifyBtn->setLabel(getString("dont_notify"));
+ }
+ else
+ {
+ mNotifyBtn->setLabel(getString("notify"));
+ }
+ mEventInfo = event;
+ return true;
+}
+
+void LLPanelEventInfo::onClickTeleport()
+{
+ LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
+ if (world_map)
+ {
+ world_map->trackLocation(mEventInfo.mPosGlobal);
+ gAgent.teleportViaLocation(mEventInfo.mPosGlobal);
+ }
+}
+
+void LLPanelEventInfo::onClickMap()
+{
+ LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance();
+ if (world_map)
+ {
+ world_map->trackLocation(mEventInfo.mPosGlobal);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
+}
+
+void LLPanelEventInfo::onClickNotify()
+{
+ if (!gEventNotifier.hasNotification(mEventID))
+ {
+ gEventNotifier.add(mEventInfo.mID, mEventInfo.mUnixTime, mEventInfo.mTimeStr, mEventInfo.mName);
+ mNotifyBtn->setLabel(getString("dont_notify"));
+ }
+ else
+ {
+ gEventNotifier.remove(mEventInfo.mID);
+ mNotifyBtn->setLabel(getString("notify"));
+ }
+}
diff --git a/indra/newview/llpaneleventinfo.h b/indra/newview/llpaneleventinfo.h
new file mode 100644
index 0000000000..4f0e547493
--- /dev/null
+++ b/indra/newview/llpaneleventinfo.h
@@ -0,0 +1,76 @@
+/**
+ * @file llpaneleventinfo.h
+ * @brief Info panel for events in the legacy Search
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELEVENTINFO_H
+#define LL_LLPANELEVENTINFO_H
+
+#include "lleventnotifier.h"
+
+class LLTextBox;
+class LLTextEditor;
+class LLButton;
+
+class LLPanelEventInfo : public LLPanel
+{
+public:
+ LLPanelEventInfo();
+ /*virtual*/ ~LLPanelEventInfo();
+
+ /*virtual*/ bool postBuild() override;
+
+ void setEventID(const U32 event_id);
+ void sendEventInfoRequest();
+
+ bool processEventInfoReply(LLEventInfo event);
+
+ U32 getEventID() { return mEventID; }
+
+protected:
+ void onClickTeleport();
+ void onClickMap();
+ void onClickNotify();
+
+protected:
+ LLTextBox* mTBName;
+ LLTextBox* mTBCategory;
+ LLTextBox* mTBDate;
+ LLTextBox* mTBDuration;
+ LLTextEditor* mTBDesc;
+
+ LLTextBox* mTBRunBy;
+ LLTextBox* mTBLocation;
+ LLTextBox* mTBCover;
+
+ LLButton* mTeleportBtn;
+ LLButton* mMapBtn;
+ LLButton* mNotifyBtn;
+
+ U32 mEventID;
+ LLEventInfo mEventInfo;
+ boost::signals2::connection mEventInfoConnection;
+};
+
+#endif // LL_LLPANELEVENTINFO_H
diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h
index 7ff1ddac5a..70bc2ecd3c 100644
--- a/indra/newview/llpanelexperiencelisteditor.h
+++ b/indra/newview/llpanelexperiencelisteditor.h
@@ -42,7 +42,7 @@ public:
typedef boost::signals2::signal<void (const LLUUID&) > list_changed_signal_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> experience_function;
+ typedef std::function<bool(const LLSD&)> experience_function;
typedef std::vector<experience_function> filter_list;
typedef LLHandle<LLFloaterExperiencePicker> PickerHandle;
LLPanelExperienceListEditor();
diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h
index 72c0b1b74d..5cde0a03fb 100644
--- a/indra/newview/llpanelexperiencepicker.h
+++ b/indra/newview/llpanelexperiencepicker.h
@@ -39,9 +39,9 @@ public:
friend class LLExperienceSearchResponder;
friend class LLFloaterExperiencePicker;
- typedef boost::function<void (const uuid_vec_t&)> select_callback_t;
+ typedef std::function<void(const uuid_vec_t&)> select_callback_t;
// filter function for experiences, return true if the experience should be hidden.
- typedef boost::function<bool (const LLSD&)> filter_function;
+ typedef std::function<bool(const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
LLPanelExperiencePicker();
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index fc5c468297..6c0ff4a929 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1166,26 +1166,22 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool missing_asset = false;
{
LLGLenum image_format = GL_RGB;
+ bool has_alpha = false;
bool identical_image_format = false;
- LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset);
+ LLSelectedTE::getImageFormat(image_format, has_alpha, identical_image_format, missing_asset);
if (!missing_asset)
{
- mIsAlpha = false;
+ mIsAlpha = has_alpha;
switch (image_format)
{
case GL_RGBA:
case GL_ALPHA:
- {
- mIsAlpha = true;
- }
- break;
-
case GL_RGB:
break;
default:
{
- LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
+ LL_WARNS() << "Unexpected tex format in LLPanelFace..." << LL_ENDL;
}
break;
}
@@ -1205,7 +1201,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
// See if that's been overridden by a material setting for same...
//
- LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(alpha_mode, identical_alpha_mode, mIsAlpha);
+ LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(alpha_mode, identical_alpha_mode);
// it is invalid to have any alpha mode other than blend if transparency is greater than zero ...
// Want masking? Want emissive? Tough! You get BLEND!
@@ -1215,6 +1211,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
alpha_mode = mIsAlpha ? alpha_mode : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode);
+ mComboAlphaMode->setTentative(!identical_alpha_mode);
+ if (!identical_alpha_mode)
+ {
+ std::string multiple = LLTrans::getString("multiple_textures");
+ mComboAlphaMode->setLabel(multiple);
+ }
updateAlphaControls();
mExcludeWater &= (LLMaterial::DIFFUSE_ALPHA_MODE_BLEND == alpha_mode);
@@ -3292,23 +3294,22 @@ void LLPanelFace::onSelectTexture()
sendTexture();
LLGLenum image_format;
+ bool has_alpha;
bool identical_image_format = false;
bool missing_asset = false;
- LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset);
+ LLSelectedTE::getImageFormat(image_format, has_alpha, identical_image_format, missing_asset);
- U32 alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
if (!missing_asset)
{
+ U32 alpha_mode = has_alpha ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
switch (image_format)
{
case GL_RGBA:
case GL_ALPHA:
- alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND;
- break;
case GL_RGB:
break;
default:
- LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
+ LL_WARNS() << "Unexpected tex format in LLPanelFace..." << LL_ENDL;
break;
}
@@ -5258,12 +5259,13 @@ void LLPanelFace::LLSelectedTE::getFace(LLFace*& face_to_return, bool& identical
identical_face = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&get_te_face_func, face_to_return, false, (LLFace*)nullptr);
}
-void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, bool& identical_face, bool& missing_asset)
+void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return, bool& has_alpha, bool& identical_face, bool& missing_asset)
{
struct LLSelectedTEGetmatId : public LLSelectedTEFunctor
{
LLSelectedTEGetmatId()
: mImageFormat(GL_RGB)
+ , mHasAlpha(false)
, mIdentical(true)
, mMissingAsset(false)
, mFirstRun(true)
@@ -5278,6 +5280,10 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return,
{
format = image->getPrimaryFormat();
missing = image->isMissingAsset();
+ if (format == GL_RGBA || format == GL_ALPHA)
+ {
+ mHasAlpha = true;
+ }
}
if (mFirstRun)
@@ -5294,6 +5300,7 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return,
return true;
}
LLGLenum mImageFormat;
+ bool mHasAlpha;
bool mIdentical;
bool mMissingAsset;
bool mFirstRun;
@@ -5301,6 +5308,7 @@ void LLPanelFace::LLSelectedTE::getImageFormat(LLGLenum& image_format_to_return,
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
image_format_to_return = func.mImageFormat;
+ has_alpha = func.mHasAlpha;
identical_face = func.mIdentical;
missing_asset = func.mMissingAsset;
}
@@ -5482,32 +5490,40 @@ void LLPanelFace::LLSelectedTEMaterial::getMaxNormalRepeats(F32& repeats, bool&
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &max_norm_repeats_func, repeats);
}
-void LLPanelFace::LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha)
+void LLPanelFace::LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical)
{
struct LLSelectedTEGetDiffuseAlphaMode : public LLSelectedTEGetFunctor<U8>
{
- LLSelectedTEGetDiffuseAlphaMode() : _isAlpha(false) {}
- LLSelectedTEGetDiffuseAlphaMode(bool diffuse_texture_has_alpha) : _isAlpha(diffuse_texture_has_alpha) {}
+ LLSelectedTEGetDiffuseAlphaMode() {}
virtual ~LLSelectedTEGetDiffuseAlphaMode() {}
U8 get(LLViewerObject* object, S32 face)
{
- U8 diffuse_mode = _isAlpha ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
-
LLTextureEntry* tep = object->getTE(face);
if (tep)
{
LLMaterial* mat = tep->getMaterialParams().get();
if (mat)
{
- diffuse_mode = mat->getDiffuseAlphaMode();
+ return mat->getDiffuseAlphaMode();
+ }
+ }
+
+ bool has_alpha = false;
+ LLViewerTexture* image = object->getTEImage(face);
+ if (image)
+ {
+ LLGLenum format = image->getPrimaryFormat();
+ if (format == GL_RGBA || format == GL_ALPHA)
+ {
+ has_alpha = true;
}
}
+ U8 diffuse_mode = has_alpha ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
return diffuse_mode;
}
- bool _isAlpha; // whether or not the diffuse texture selected contains alpha information
- } get_diff_mode(diffuse_texture_has_alpha);
+ } get_diff_mode;
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &get_diff_mode, diffuse_alpha_mode);
}
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 0911378582..86d5282518 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -652,7 +652,7 @@ public:
static void getCurrent(LLMaterialPtr& material_ptr, bool& identical_material);
static void getMaxSpecularRepeats(F32& repeats, bool& identical);
static void getMaxNormalRepeats(F32& repeats, bool& identical);
- static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha);
+ static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical);
static void selectionNormalScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter);
static void selectionSpecularScaleAutofit(LLPanelFace* panel_face, F32 repeats_per_meter);
@@ -697,7 +697,7 @@ public:
{
public:
static void getFace(class LLFace*& face_to_return, bool& identical_face);
- static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face, bool& missing_asset);
+ static void getImageFormat(LLGLenum& image_format_to_return, bool& has_alpha, bool& identical_face, bool& missing_asset);
static void getTexId(LLUUID& id, bool& identical);
static void getPbrMaterialId(LLUUID& id, bool& identical, bool& has_pbr, bool& has_faces_without_pbr);
static void getObjectScaleS(F32& scale_s, bool& identical);
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 65aa1876b0..ecb66f9cea 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -231,6 +231,12 @@ void LLPanelGroup::onBackBtnClick()
}
}
+void LLPanelGroup::hideBackBtn()
+{
+ childSetVisible("back", false);
+ setBackgroundVisible(false);
+}
+
void LLPanelGroup::onBtnRefresh(void* user_data)
{
LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index fa0e1d4104..b43a93bc40 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -87,6 +87,7 @@ public:
const std::string& inventory_name,
LLOfferInfo* inventory_offer);
+ void hideBackBtn();
protected:
virtual void update(LLGroupChange gc);
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index ed80c8b732..0a585722f2 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -37,6 +37,9 @@
#include "llappviewer.h"
#include "llbutton.h"
+#if LL_VELOPACK
+#include "llvelopack.h"
+#endif
#include "llcheckboxctrl.h"
#include "llcommandhandler.h" // for secondlife:///app/login/
#include "llcombobox.h"
@@ -183,7 +186,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
: LLPanel(),
mCallback(callback),
mCallbackData(cb_data),
- mListener(new LLPanelLoginListener(this)),
+ mListener(std::make_unique<LLPanelLoginListener>(this)),
mFirstLoginThisInstall(gSavedSettings.getBOOL("FirstLoginThisInstall")),
mUsernameLength(0),
mPasswordLength(0),
@@ -936,6 +939,19 @@ void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
// static
void LLPanelLogin::onClickConnect(bool commit_fields)
{
+#if LL_VELOPACK
+ // In theory, you should never be able to get here.
+ // If there's a required update, try as you might you're not supposed to actually close the downloading update dialog.
+ // But just in case...
+ if (velopack_is_required_update_in_progress())
+ {
+ LLSD args;
+ args["VERSION"] = velopack_get_required_update_version();
+ LLNotificationsUtil::add("DownloadingUpdate", args);
+ return;
+ }
+#endif
+
if (sInstance && sInstance->mCallback)
{
if (commit_fields)
diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp
index 6e4e9f426d..68e2808a83 100644
--- a/indra/newview/llpanelmediasettingssecurity.cpp
+++ b/indra/newview/llpanelmediasettingssecurity.cpp
@@ -220,7 +220,7 @@ const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string&
if ( candidate_url.scheme().empty() )
{
// build a URL comprised of default scheme and the original fragment
- const std::string default_scheme( "http://" );
+ const std::string default_scheme( "https://" );
return default_scheme + src_url;
};
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 42c40fe404..54ce205fb0 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -252,7 +252,7 @@ static LLPanelInjector<LLPanelPeople> t_people("panel_people");
class LLPanelPeople::Updater
{
public:
- typedef boost::function<void()> callback_t;
+ typedef std::function<void()> callback_t;
Updater(callback_t cb)
: mCallback(cb)
{
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 87f05f2028..c380b6860f 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -517,7 +517,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
std::string parcel_owner =
LLSLURL("agent", parcel->getOwnerID(), "inspect").getSLURLString();
mParcelOwner->setText(parcel_owner);
- LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText));
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(region->getOwner(), boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mRegionOwnerText));
mRegionGroupText->setText( getString("none_text"));
}
@@ -548,7 +548,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
if(auth_buyer_id.notNull())
{
- LLAvatarNameCache::get(auth_buyer_id, boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mSaleToText));
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(auth_buyer_id, boost::bind(&LLPanelPlaceInfo::onAvatarNameCache, _1, _2, mSaleToText));
// Show sales info to a specific person or a group he belongs to.
if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id))
diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h
index f562be0f5d..0c161198f8 100644
--- a/indra/newview/llpanelplaceprofile.h
+++ b/indra/newview/llpanelplaceprofile.h
@@ -118,6 +118,8 @@ private:
LLTextEditor* mResaleText;
LLTextBox* mSaleToText;
LLAccordionCtrl* mAccordionCtrl;
+
+ boost::signals2::scoped_connection mAvatarNameCacheConnection;
};
#endif // LL_LLPANELPLACEPROFILE_H
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 7deb1d9fd4..5435a79e16 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -651,7 +651,7 @@ void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_fi
void LLPanelPlaces::onTabSelected()
{
mActivePanel = dynamic_cast<LLPanelPlacesTab*>(mTabContainer->getCurrentPanel());
- if (!mActivePanel)
+ if (!mActivePanel || !mTabsCreated)
return;
onFilterEdit(mActivePanel->getFilterSubString(), true);
@@ -1335,6 +1335,13 @@ LLPanelPlaceInfo* LLPanelPlaces::getCurrentInfoPanel()
return NULL;
}
+void LLPanelPlaces::hideBackBtn()
+{
+ mPlaceProfileBackBtn->setVisible(false);
+ setBackgroundVisible(false);
+ mPlaceProfile->setBackgroundVisible(false);
+}
+
static bool is_agent_in_selected_parcel(LLParcel* parcel)
{
LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance();
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index fc04d8d45d..8360380b22 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -81,6 +81,8 @@ public:
/*virtual*/ S32 notifyParent(const LLSD& info);
+ void hideBackBtn();
+
private:
void onLandmarkLoaded(LLLandmark* landmark);
void onFilterEdit(const std::string& search_string, bool force_filter);
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 24a6875d5a..758ca0b0fa 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -106,11 +106,11 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("post_profile_image_coro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLCore::HttpHeaders::ptr_t httpHeaders;
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setFollowRedirects(true);
LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders);
@@ -138,9 +138,9 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri
}
// Upload the image
- LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions);
+ LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared<LLCore::HttpHeaders>();
+ LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared<LLCore::HttpOptions>();
S64 length;
{
@@ -693,6 +693,7 @@ LLPanelProfileSecondLife::LLPanelProfileSecondLife()
, mWaitingForImageUpload(false)
, mAllowPublish(false)
, mHideAge(false)
+ , mAllowEdit(true)
{
}
@@ -709,6 +710,10 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife()
{
mAvatarNameCacheConnection.disconnect();
}
+ if (mMenuNameCacheConnection.connected())
+ {
+ mMenuNameCacheConnection.disconnect();
+ }
}
bool LLPanelProfileSecondLife::postBuild()
@@ -757,14 +762,15 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
LLUUID avatar_id = getAvatarId();
bool own_profile = getSelfProfile();
+ bool allow_edit = own_profile && mAllowEdit;
mGroupList->setShowNone(!own_profile);
- childSetVisible("notes_panel", !own_profile);
- childSetVisible("settings_panel", own_profile);
- childSetVisible("about_buttons_panel", own_profile);
+ childSetVisible("notes_panel", !allow_edit);
+ childSetVisible("settings_panel", allow_edit);
+ childSetVisible("about_buttons_panel", allow_edit);
- if (own_profile)
+ if (allow_edit)
{
// Group list control cannot toggle ForAgent loading
// Less than ideal, but viewing own profile via search is edge case
@@ -789,7 +795,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key)
mAgentActionMenuButton->setMenu("menu_profile_other.xml", LLMenuButton::MP_BOTTOM_RIGHT);
}
- mDescriptionEdit->setParseHTML(!own_profile);
+ mDescriptionEdit->setParseHTML(!allow_edit);
if (!own_profile)
{
@@ -1022,7 +1028,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
if (getSelfProfile())
{
mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH;
- mShowInSearchCombo->setValue(mAllowPublish);
+ mShowInSearchCombo->setValue(mAllowPublish ? LLSD::Integer(1) : LLSD::Integer(0));
}
}
@@ -1280,7 +1286,7 @@ void LLPanelProfileSecondLife::setLoaded()
{
mHideAgeCombo->setEnabled(true);
}
- mDescriptionEdit->setEnabled(true);
+ mDescriptionEdit->setEnabled(mAllowEdit);
}
}
@@ -1461,7 +1467,7 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata)
}
else if (item_name == "edit_display_name")
{
- LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2));
+ mMenuNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2));
LLFirstUse::setDisplayName(false);
}
else if (item_name == "edit_partner")
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index c207a4162a..c993ec547a 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -111,6 +111,8 @@ public:
void processProperties(void* data, EAvatarProcessorType type) override;
+ void setAllowEdit(bool allow_edit) { mAllowEdit = allow_edit; }
+
protected:
/**
* Process profile related data received from server.
@@ -207,8 +209,10 @@ private:
bool mWaitingForImageUpload;
bool mAllowPublish;
bool mHideAge;
+ bool mAllowEdit;
std::string mDescriptionText;
boost::signals2::connection mAvatarNameCacheConnection;
+ boost::signals2::connection mMenuNameCacheConnection;
};
diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h
index 2e6b7c4428..1c58fa6cfa 100644
--- a/indra/newview/llpanelprofileclassifieds.h
+++ b/indra/newview/llpanelprofileclassifieds.h
@@ -324,11 +324,8 @@ private:
S32 mPriceForListing;
-public:
static void handleSearchStatResponse(LLUUID classifiedId, LLSD result);
-private:
-
typedef std::list<LLPanelProfileClassified*> panel_list_t;
static panel_list_t sAllPanels;
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index b81b891685..7396f079b0 100644
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -110,7 +110,11 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info)
void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl)
{
- bool current_window_selected = (getChild<LLComboBox>(getImageSizeComboName())->getCurrentIndex() == 3);
+ LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName());
+ // Current window likely won't ever change position from being the penultimate item
+ // Custom window is last item
+ S32 curent_window_index = combo->getItemCount() - 2;
+ bool current_window_selected = (combo->getCurrentIndex() == curent_window_index);
getChild<LLSpinCtrl>(getWidthSpinnerName())->setVisible(!current_window_selected);
getChild<LLSpinCtrl>(getHeightSpinnerName())->setVisible(!current_window_selected);
}
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 3aedde74c6..4fcce50df1 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -466,8 +466,8 @@ void LLPanelWearing::getAttachmentLimitsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getAttachmentLimitsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 9ef9c26411..c6a88dbada 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -41,7 +41,7 @@
LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model) :
LLConversationItemSession(data_source->getSessionID(), root_view_model),
mSpeakerMgr(data_source),
- mValidateSpeakerCallback(NULL)
+ mValidateSpeakerCallback(nullptr)
{
mSpeakerAddListener = new SpeakerAddListener(*this);
mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 7cb29a6211..4b4334c6f9 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -27,8 +27,8 @@
#ifndef LL_PARTICIPANTLIST_H
#define LL_PARTICIPANTLIST_H
-#include "llviewerprecompiledheaders.h"
#include "llconversationmodel.h"
+#include "llevent.h"
class LLSpeakerMgr;
class LLUICtrl;
@@ -38,7 +38,7 @@ class LLParticipantList : public LLConversationItemSession
LOG_CLASS(LLParticipantList);
public:
- typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
+ typedef std::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model);
~LLParticipantList();
diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp
index 1366ba6c6f..8e03492381 100644
--- a/indra/newview/llpathfindingcharacterlist.cpp
+++ b/indra/newview/llpathfindingcharacterlist.cpp
@@ -65,7 +65,7 @@ void LLPathfindingCharacterList::parseCharacterListData(const LLSD& pCharacterLi
continue;
const std::string& uuid(characterDataIter->first);
const LLSD& characterData = characterDataIter->second;
- LLPathfindingObjectPtr character(new LLPathfindingCharacter(uuid, characterData));
+ LLPathfindingObjectPtr character = std::make_shared<LLPathfindingCharacter>(uuid, characterData);
objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, character));
}
}
diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp
index 2012d7a094..81efb0a6fc 100644
--- a/indra/newview/llpathfindinglinksetlist.cpp
+++ b/indra/newview/llpathfindinglinksetlist.cpp
@@ -206,7 +206,7 @@ void LLPathfindingLinksetList::parseLinksetListData(const LLSD& pLinksetListData
const LLSD& linksetData = linksetDataIter->second;
if(linksetData.size() != 0)
{
- LLPathfindingObjectPtr linksetPtr(new LLPathfindingLinkset(uuid, linksetData));
+ LLPathfindingObjectPtr linksetPtr = std::make_shared<LLPathfindingLinkset>(uuid, linksetData);
objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, linksetPtr));
}
}
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 84a62b3cbf..412e25a7b1 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -34,7 +34,6 @@
#include <map>
#include <boost/bind.hpp>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llagent.h"
@@ -451,8 +450,8 @@ void LLPathfindingManager::navMeshStatusRequestCoro(std::string url, U64 regionH
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshStatusRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavMeshStatusRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
if (!region)
@@ -541,8 +540,8 @@ void LLPathfindingManager::navAgentStateRequestCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavAgentStateRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavAgentStateRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -569,8 +568,8 @@ void LLPathfindingManager::navMeshRebakeCoro(std::string url, rebake_navmesh_cal
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshRebake", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("NavMeshRebake", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData = LLSD::emptyMap();
@@ -598,8 +597,8 @@ void LLPathfindingManager::linksetObjectsCoro(std::string url, LinksetsResponder
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetObjects", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LinksetObjects", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
@@ -634,8 +633,8 @@ void LLPathfindingManager::linksetTerrainCoro(std::string url, LinksetsResponder
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LinksetTerrain", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
@@ -669,8 +668,8 @@ void LLPathfindingManager::charactersCoro(std::string url, request_id_t requestI
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("charactersCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 663cb3cf34..d209266467 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -27,10 +27,10 @@
#ifndef LL_LLPATHFINDINGMANAGER_H
#define LL_LLPATHFINDINGMANAGER_H
+#include <functional>
#include <string>
#include <map>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindinglinkset.h"
@@ -76,21 +76,21 @@ public:
void requestGetNavMeshForRegion(LLViewerRegion *pRegion, bool pIsGetStatusOnly);
typedef U32 request_id_t;
- typedef boost::function<void (request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
+ typedef std::function<void(request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
void requestGetLinksets(request_id_t pRequestId, object_request_callback_t pLinksetsCallback) const;
void requestSetLinksets(request_id_t pRequestId, const LLPathfindingObjectListPtr &pLinksetListPtr, LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD, object_request_callback_t pLinksetsCallback) const;
void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const;
- typedef boost::function<void (bool)> agent_state_callback_t;
+ typedef std::function<void(bool)> agent_state_callback_t;
typedef boost::signals2::signal<void (bool)> agent_state_signal_t;
typedef boost::signals2::connection agent_state_slot_t;
agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback);
void requestGetAgentState();
- typedef boost::function<void (bool)> rebake_navmesh_callback_t;
+ typedef std::function<void(bool)> rebake_navmesh_callback_t;
void requestRebakeNavMesh(rebake_navmesh_callback_t pRebakeNavMeshCallback);
protected:
diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h
index d838a1a51c..44397c9118 100644
--- a/indra/newview/llpathfindingnavmesh.h
+++ b/indra/newview/llpathfindingnavmesh.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGNAVMESH_H
#define LL_LLPATHFINDINGNAVMESH_H
+#include <functional>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindingnavmeshstatus.h"
@@ -54,7 +54,7 @@ public:
kNavMeshRequestError
} ENavMeshRequestStatus;
- typedef boost::function<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_callback_t;
+ typedef std::function<void(ENavMeshRequestStatus, const LLPathfindingNavMeshStatus&, const LLSD::Binary&)> navmesh_callback_t;
typedef boost::signals2::signal<void (ENavMeshRequestStatus, const LLPathfindingNavMeshStatus &, const LLSD::Binary &)> navmesh_signal_t;
typedef boost::signals2::connection navmesh_slot_t;
diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h
index e770efa0d0..8f7750d4c5 100644
--- a/indra/newview/llpathfindingnavmeshzone.h
+++ b/indra/newview/llpathfindingnavmeshzone.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGNAVMESHZONE_H
#define LL_LLPATHFINDINGNAVMESHZONE_H
+#include <functional>
#include <vector>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llpathfindingnavmesh.h"
@@ -62,7 +62,7 @@ public:
kNavMeshZoneComplete
} ENavMeshZoneStatus;
- typedef boost::function<void (ENavMeshZoneRequestStatus)> navmesh_zone_callback_t;
+ typedef std::function<void(ENavMeshZoneRequestStatus)> navmesh_zone_callback_t;
typedef boost::signals2::signal<void (ENavMeshZoneRequestStatus)> navmesh_zone_signal_t;
typedef boost::signals2::connection navmesh_zone_slot_t;
@@ -81,7 +81,7 @@ public:
protected:
private:
- typedef boost::function<void (void)> navmesh_location_callback_t;
+ typedef std::function<void(void)> navmesh_location_callback_t;
class NavMeshLocation
{
public:
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index 79a796dd60..bf27f114f5 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -27,9 +27,9 @@
#ifndef LL_LLPATHFINDINGOBJECT_H
#define LL_LLPATHFINDINGOBJECT_H
+#include <functional>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llavatarname.h"
@@ -61,7 +61,7 @@ public:
inline bool isGroupOwned() const {return mIsGroupOwned;};
inline const LLVector3& getLocation() const {return mLocation;};
- typedef boost::function<void (const LLPathfindingObject *)> name_callback_t;
+ typedef std::function<void(const LLPathfindingObject*)> name_callback_t;
typedef boost::signals2::signal<void (const LLPathfindingObject *)> name_signal_t;
typedef boost::signals2::connection name_connection_t;
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp
index 61791492e7..57f4aefadf 100644
--- a/indra/newview/llpathfindingpathtool.cpp
+++ b/indra/newview/llpathfindingpathtool.cpp
@@ -30,7 +30,6 @@
#include "llpathfindingpathtool.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llagent.h"
diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h
index 189b9d4954..f6b4500f0f 100644
--- a/indra/newview/llpathfindingpathtool.h
+++ b/indra/newview/llpathfindingpathtool.h
@@ -27,7 +27,7 @@
#ifndef LL_LLPATHFINDINGPATHTOOL_H
#define LL_LLPATHFINDINGPATHTOOL_H
-#include <boost/function.hpp>
+#include <functional>
#include <boost/signals2.hpp>
#include "llpathinglib.h"
@@ -62,7 +62,7 @@ public:
kCharacterTypeD
} ECharacterType;
- typedef boost::function<void (void)> path_event_callback_t;
+ typedef std::function<void(void)> path_event_callback_t;
typedef boost::signals2::signal<void (void)> path_event_signal_t;
typedef boost::signals2::connection path_event_slot_t;
diff --git a/indra/newview/llpbrterrainfeatures.cpp b/indra/newview/llpbrterrainfeatures.cpp
index bb771c6963..d652e23dd5 100644
--- a/indra/newview/llpbrterrainfeatures.cpp
+++ b/indra/newview/llpbrterrainfeatures.cpp
@@ -86,9 +86,9 @@ void LLPBRTerrainFeatures::queryRegionCoro(std::string cap_url, LLUUID region_id
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("queryRegionCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("queryRegionCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
@@ -159,9 +159,9 @@ void LLPBRTerrainFeatures::modifyRegionCoro(std::string cap_url, LLSD updates, v
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyRegionCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("modifyRegionCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
httpOpts->setFollowRedirects(true);
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index e06d025f59..1cc311e1b5 100644
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -141,7 +141,7 @@ void LLPersistentNotificationStorage::loadNotifications()
++notification_it)
{
LLSD notification_params = *notification_it;
- LLNotificationPtr notification(new LLNotification(notification_params));
+ LLNotificationPtr notification = std::make_shared<LLNotification>(notification_params);
LLNotificationResponderPtr responder(createResponder(notification_params["name"], notification_params["responder"]));
notification->setResponseFunctor(responder);
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp
index cc55b3c8db..16149b7e33 100644
--- a/indra/newview/llpopupview.cpp
+++ b/indra/newview/llpopupview.cpp
@@ -94,8 +94,8 @@ void LLPopupView::draw()
LLPanel::draw();
}
-bool LLPopupView::handleMouseEvent(boost::function<bool(LLView*, S32, S32)> func,
- boost::function<bool(LLView*)> predicate,
+bool LLPopupView::handleMouseEvent(std::function<bool(LLView*, S32, S32)> func,
+ std::function<bool(LLView*)> predicate,
S32 x, S32 y,
bool close_popups)
{
diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h
index 4a88866185..8c0db623ac 100644
--- a/indra/newview/llpopupview.h
+++ b/indra/newview/llpopupview.h
@@ -55,7 +55,7 @@ public:
popup_list_t getCurrentPopups() { return mPopups; }
private:
- bool handleMouseEvent(boost::function<bool(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
+ bool handleMouseEvent(std::function<bool(LLView*, S32, S32)>, std::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
popup_list_t mPopups;
};
#endif //LL_LLROOTVIEW_H
diff --git a/indra/newview/llpostcard.h b/indra/newview/llpostcard.h
index cfe6f3951d..11178aa027 100644
--- a/indra/newview/llpostcard.h
+++ b/indra/newview/llpostcard.h
@@ -40,7 +40,7 @@ class LLPostCard
LOG_CLASS(LLPostCard);
public:
- typedef boost::function<void(bool ok)> result_callback_t;
+ typedef std::function<void(bool ok)> result_callback_t;
static void setPostResultCallback(result_callback_t cb) { mResultCallback = cb; }
static void reportPostResult(bool ok);
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index afd58af056..84455bb679 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -26,8 +26,6 @@
#include "llviewerprecompiledheaders.h"
-#include <boost/assign/list_of.hpp>
-
#include "llpresetsmanager.h"
#include "lldiriterator.h"
@@ -250,17 +248,17 @@ void LLPresetsManager::settingChanged()
void LLPresetsManager::getControlNames(std::vector<std::string>& names)
{
- const std::vector<std::string> camera_controls = boost::assign::list_of
+ const std::vector<std::string> camera_controls = {
// From panel_preferences_move.xml
- ("CameraAngle")
- ("CameraOffsetScale")
+ "CameraAngle",
+ "CameraOffsetScale",
// From llagentcamera.cpp
- ("CameraOffsetBuild")
- ("TrackFocusObject")
- ("CameraOffsetRearView")
- ("FocusOffsetRearView")
- ("AvatarSitRotation")
- ;
+ "CameraOffsetBuild",
+ "TrackFocusObject",
+ "CameraOffsetRearView",
+ "FocusOffsetRearView",
+ "AvatarSitRotation",
+ };
names = camera_controls;
}
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 0bbe540207..a56697117a 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -58,7 +58,7 @@ class LLScriptMovedObserver;
class LLLiveLSLFile : public LLLiveFile
{
public:
- typedef boost::function<bool(const std::string& filename)> change_callback_t;
+ typedef std::function<bool(const std::string& filename)> change_callback_t;
LLLiveLSLFile(std::string file_path, change_callback_t change_cb);
~LLLiveLSLFile();
diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp
index 728cb22431..d962622dfd 100644
--- a/indra/newview/llproductinforequest.cpp
+++ b/indra/newview/llproductinforequest.cpp
@@ -70,8 +70,8 @@ void LLProductInfoRequestManager::getLandDescriptionsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getLandDescriptionsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp
index d0aa1af2f3..f89afd38ab 100644
--- a/indra/newview/llremoteparcelrequest.cpp
+++ b/indra/newview/llremoteparcelrequest.cpp
@@ -201,8 +201,8 @@ void LLRemoteParcelInfoProcessor::regionParcelInfoCoro(std::string url,
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RemoteParcelRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("RemoteParcelRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD bodyData;
diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h
index 17787ca5e6..e0162bac80 100644
--- a/indra/newview/llsearchcombobox.h
+++ b/indra/newview/llsearchcombobox.h
@@ -61,11 +61,6 @@ public:
~LLSearchComboBox();
- /**
- * Sets focus to text box
- */
- void focusTextEntry();
-
protected:
LLSearchComboBox(const Params&p);
@@ -98,6 +93,11 @@ protected:
*/
void onSelectionCommit();
+ /**
+ * Sets focus to text box
+ */
+ void focusTextEntry();
+
LLButton* mSearchButton;
};
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index 5dbd579b45..2790705fd8 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -40,7 +40,7 @@ class LLSetKeyBindDialog::Updater : public LLEventTimer
{
public:
- typedef boost::function<void(MASK)> callback_t;
+ typedef std::function<void(MASK)> callback_t;
Updater(callback_t cb, F32 period, MASK mask)
:LLEventTimer(period),
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index f1731af3be..6e5d9a6c77 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -1064,11 +1064,11 @@ void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name)
LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY;
LLInventoryType::EType inv_type = outfit_snapshot ? LLInventoryType::IT_NONE : LLInventoryType::IT_SNAPSHOT;
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
tid, LLAssetType::AT_TEXTURE, res_name, res_desc, 0,
folder_type, inv_type,
PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost, LLUUID::null, !outfit_snapshot));
+ expected_upload_cost, LLUUID::null, !outfit_snapshot);
upload_new_resource(assetUploadInfo);
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 3aaa3d60e8..d8a94c8835 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -71,16 +71,8 @@ protected:
~LLDrawInfo();
public:
- LLDrawInfo(const LLDrawInfo& rhs)
- {
- *this = rhs;
- }
-
- const LLDrawInfo& operator=(const LLDrawInfo& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLDrawInfo(const LLDrawInfo& rhs) = delete;
+ const LLDrawInfo& operator=(const LLDrawInfo& rhs) = delete;
// return a hash of this LLDrawInfo as a debug color
LLColor4U getDebugColor() const;
@@ -206,16 +198,8 @@ class LLSpatialGroup : public LLOcclusionCullingGroup
friend class LLOctreeStateCheck;
public:
- LLSpatialGroup(const LLSpatialGroup& rhs) : LLOcclusionCullingGroup(rhs)
- {
- *this = rhs;
- }
-
- const LLSpatialGroup& operator=(const LLSpatialGroup& rhs)
- {
- LL_ERRS() << "Illegal operation!" << LL_ENDL;
- return *this;
- }
+ LLSpatialGroup(const LLSpatialGroup& rhs) = delete;
+ const LLSpatialGroup& operator=(const LLSpatialGroup& rhs) = delete;
static U32 sNodeCount;
static bool sNoDelete; //deletion of spatial groups and draw info not allowed if true
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index b49c0119ed..f079c70c6c 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -76,7 +76,7 @@ void LLSpeaker::lookupName()
{
if (mDisplayName.empty())
{
- LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group???
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(mID, boost::bind(&LLSpeaker::onNameCache, this, _1, _2)); // todo: can be group???
}
}
@@ -867,9 +867,9 @@ void LLIMSpeakerMgr::moderationActionCoro(std::string url, LLSD action)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("moderationActionCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("moderationActionCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index ad2461f60f..c3773d2c33 100644
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -80,6 +80,9 @@ public:
bool mIsModerator;
bool mModeratorMutedVoice;
bool mModeratorMutedText;
+
+private:
+ boost::signals2::scoped_connection mAvatarNameCacheConnection;
};
class LLSpeakerUpdateSpeakerEvent : public LLOldEvents::LLEvent
@@ -138,7 +141,7 @@ private:
class LLSpeakerActionTimer : public LLEventTimer
{
public:
- typedef boost::function<bool(const LLUUID&)> action_callback_t;
+ typedef std::function<bool(const LLUUID&)> action_callback_t;
typedef std::map<LLUUID, LLSpeakerActionTimer*> action_timers_map_t;
typedef action_timers_map_t::value_type action_value_t;
typedef action_timers_map_t::const_iterator action_timer_const_iter_t;
diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp
index 6c252ed31f..140b63c84d 100644
--- a/indra/newview/llsplitbutton.cpp
+++ b/indra/newview/llsplitbutton.cpp
@@ -118,7 +118,7 @@ void LLSplitButton::onItemSelected(LLUICtrl* ctrl)
hideButtons();
// call the callback if it exists
- if(!mSelectionCallback.empty())
+ if(mSelectionCallback != nullptr)
{
mSelectionCallback(this, ctrl->getName());
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index c3c7945763..937b680515 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -29,6 +29,11 @@
#include "llappviewer.h"
#include "llstartup.h"
+#if LL_VELOPACK && LL_WINDOWS
+#include "llvelopack.h"
+#include <shellapi.h>
+#endif
+
#if LL_WINDOWS
# include <process.h> // _spawnl()
#else
@@ -126,6 +131,7 @@
#include "llpanellogin.h"
#include "llmutelist.h"
#include "llavatarpropertiesprocessor.h"
+#include "llpaneldirbrowser.h"
#include "llpanelgrouplandmoney.h"
#include "llpanelgroupnotices.h"
#include "llparcel.h"
@@ -216,8 +222,6 @@
#include "lldxhardware.h"
#endif
-#include "fsfloatersearch.h"
-
//
// exported globals
//
@@ -272,6 +276,7 @@ std::unique_ptr<LLViewerStats::PhaseMap> LLStartUp::sPhases(new LLViewerStats::P
void login_show();
void login_callback(S32 option, void* userdata);
+void uninstall_nsis_if_required();
void show_release_notes_if_required();
void show_first_run_dialog();
bool first_run_dialog_callback(const LLSD& notification, const LLSD& response);
@@ -464,6 +469,32 @@ bool idle_startup()
LLStringOps::sAM = LLTrans::getString("dateTimeAM");
LLStringOps::sPM = LLTrans::getString("dateTimePM");
}
+ else
+ {
+ std::wstring utf16str = ll_convert<std::wstring>(val);
+ if (utf16str.size() > 4)
+ {
+ LL_DEBUGS("InitInfo") << "Current locale \"" << locale << "\" "
+ << "has impracitcally long AM/PM time format" << LL_ENDL;
+ // fallback to declarations in strings.xml
+ LLStringOps::sAM = LLTrans::getString("dateTimeAM");
+ LLStringOps::sPM = LLTrans::getString("dateTimePM");
+ }
+ }
+ }
+
+ // Some locales (as well some of our own dateTimeAM/PM) return long
+ // strings for AM/PM which aren't practical to display in the UI.
+ // Hardcode to "AM"/"PM" in those cases.
+ std::wstring utf16str = ll_convert<std::wstring>(LLStringOps::sAM);
+ if (utf16str.size() > 4)
+ {
+ LLStringOps::sAM = "AM";
+ }
+ utf16str = ll_convert<std::wstring>(LLStringOps::sPM);
+ if (utf16str.size() > 4)
+ {
+ LLStringOps::sPM = "PM";
}
}
@@ -921,6 +952,7 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "PeekMessage processed" << LL_ENDL;
#endif
do_startup_frame();
+ uninstall_nsis_if_required();
timeout.reset();
return false;
}
@@ -2588,9 +2620,9 @@ void release_notes_coro(const std::string url)
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("releaseNotesCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("releaseNotesCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setHeadersOnly(true); // only making sure it isn't 404 or something like that
@@ -2607,6 +2639,67 @@ void release_notes_coro(const std::string url)
LLWeb::loadURLInternal(url);
}
+/**
+* Check if this is a fresh velopack install and
+* if uninstallation of old viewer is needed.
+*/
+void uninstall_nsis_if_required()
+{
+#if LL_VELOPACK && LL_WINDOWS
+ bool checked_for_legacy_install = gSavedSettings.getBOOL("PreviousInstallChecked");
+ if (checked_for_legacy_install)
+ {
+ return;
+ }
+ gSavedSettings.setBOOL("PreviousInstallChecked", true);
+
+ LL_INFOS() << "Looking for previous NSIS installs" << LL_ENDL;
+
+ S32 found_major = 0;
+ S32 found_minor = 0;
+ S32 found_patch = 0;
+ U64 found_build = 0;
+
+ if (!get_nsis_version(found_major, found_minor, found_patch, found_build))
+ {
+ return;
+ }
+
+ LLVersionInfo* ver_inst = LLVersionInfo::getInstance();
+
+ if (found_major > ver_inst->getMajor())
+ {
+ LL_INFOS() << "Found installed nsis version that is newer" << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL;
+ return;
+ }
+
+ if (found_major == ver_inst->getMajor()
+ && found_minor > ver_inst->getMinor())
+ {
+ LL_INFOS() << "Found installed nsis version that is newer" << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL;
+ return;
+ }
+
+ if (found_major == ver_inst->getMajor()
+ && found_minor == ver_inst->getMinor()
+ && found_patch > ver_inst->getPatch())
+ {
+ LL_INFOS() << "Found installed nsis version that is newer" << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL;
+ return;
+ }
+
+ // Assume that nsis is going to be something like x.x.x, while velopack is x.x.(x+1),
+ // so there is no point to check build.
+ LL_INFOS() << "Found NSIS install " << found_major << "." << found_minor << "." << found_patch << "." << found_build << LL_ENDL;
+
+ clear_nsis_links();
+
+ LLSD args;
+ args["VERSION"] = llformat("%d.%d.%d", found_major, found_minor, found_patch);
+ LLNotificationsUtil::add("FoundLegacyNsisInstallation", args);
+#endif
+}
+
void validate_release_notes_coro(const std::string url)
{
LLVersionInfo& versionInfo(LLVersionInfo::instance());
@@ -2640,15 +2733,24 @@ void show_release_notes_if_required()
// below. If viewer release notes stop working, might be because that
// LLEventMailDrop got moved out of LLVersionInfo and hasn't yet been
// instantiated.
- if (!release_notes_shown && (LLVersionInfo::instance().getChannelAndVersion() != gLastRunVersion)
- && LLVersionInfo::instance().getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds
- && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")
- && !gSavedSettings.getBOOL("FirstLoginThisInstall"))
+ if (release_notes_shown
+ || LLVersionInfo::instance().getChannelAndVersion() == gLastRunVersion
+ || gSavedSettings.getBOOL("FirstLoginThisInstall")) // New users don't need to see release notes
+ {
+ return;
+ }
+ S32 mode = gSavedSettings.getS32("UpdaterShowReleaseNotes");
+ if (mode == 0)
+ {
+ return;
+ }
+ if (mode == 2 // Show even for test builds
+ || LLVersionInfo::instance().getViewerMaturity() != LLVersionInfo::TEST_VIEWER) // don't show Release Notes for the test builds
+
{
#if LL_RELEASE_FOR_DOWNLOAD
- if (!gSavedSettings.getBOOL("CmdLineSkipUpdater")
- && !LLAppViewer::instance()->isUpdaterMissing())
+ if (!gSavedSettings.getBOOL("CmdLineSkipUpdater"))
{
// Instantiate a "relnotes" listener which assumes any arriving event
// is the release notes URL string. Since "relnotes" is an
@@ -2900,13 +3002,12 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFunc("AvatarPickerReply", LLFloaterAvatarPicker::processAvatarPickerReply);
- // directory search
- msg->setHandlerFuncFast(_PREHASH_DirPeopleReply, FSPanelSearchPeople::processSearchReply);
- msg->setHandlerFuncFast(_PREHASH_DirPlacesReply, FSPanelSearchPlaces::processSearchReply);
- msg->setHandlerFuncFast(_PREHASH_DirGroupsReply, FSPanelSearchGroups::processSearchReply);
- msg->setHandlerFuncFast(_PREHASH_DirEventsReply, FSPanelSearchEvents::processSearchReply);
- msg->setHandlerFuncFast(_PREHASH_DirLandReply, FSPanelSearchLand::processSearchReply);
- msg->setHandlerFuncFast(_PREHASH_DirClassifiedReply, FSPanelSearchClassifieds::processSearchReply);
+ msg->setHandlerFunc("DirPlacesReply", LLPanelDirBrowser::processDirPlacesReply);
+ msg->setHandlerFunc("DirPeopleReply", LLPanelDirBrowser::processDirPeopleReply);
+ msg->setHandlerFunc("DirEventsReply", LLPanelDirBrowser::processDirEventsReply);
+ msg->setHandlerFunc("DirGroupsReply", LLPanelDirBrowser::processDirGroupsReply);
+ msg->setHandlerFunc("DirClassifiedReply", LLPanelDirBrowser::processDirClassifiedReply);
+ msg->setHandlerFunc("DirLandReply", LLPanelDirBrowser::processDirLandReply);
msg->setHandlerFunc("MapBlockReply", LLWorldMapMessage::processMapBlockReply);
msg->setHandlerFunc("MapItemReply", LLWorldMapMessage::processMapItemReply);
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index c456c74f77..ff7692e5e9 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -333,7 +333,9 @@ void LLStatusBar::refresh()
time_t utc_time;
utc_time = time_corrected();
- std::string timeStr = getString("time");
+ static bool use_24h = gSavedSettings.getBOOL("Use24HourClock");
+ std::string timeStr = use_24h ? getString("time") : getString("time_ampm");
+
LLSD substitution;
substitution["datetime"] = (S32) utc_time;
LLStringUtil::format (timeStr, substitution);
@@ -747,7 +749,7 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM
{
LLMenuItemGL *pMenu = aMenu->getItem( i );
- ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem );
+ ll::statusbar::SearchableItemPtr pItem = std::make_shared<ll::statusbar::SearchableItem>();
pItem->mCtrl = pMenu;
pItem->mMenu = pMenu;
pItem->mLabel = utf8str_to_wstring( pMenu->ll::ui::SearchableControl::getSearchText() );
@@ -763,8 +765,8 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM
void LLStatusBar::collectSearchableItems()
{
- mSearchData.reset( new ll::statusbar::SearchData );
- ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem );
+ mSearchData = std::make_unique<ll::statusbar::SearchData>();
+ ll::statusbar::SearchableItemPtr pItem = std::make_shared<ll::statusbar::SearchableItem>();
mSearchData->mRootMenu = pItem;
collectChildren( gMenuBarView, pItem );
}
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index 5114ee3672..f89ae00c5b 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -120,8 +120,8 @@ void LLSyntaxIdLSL::fetchKeywordsFileCoro(std::string url, std::string fileSpec)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchKeywordsFileCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::pair<std::set<std::string>::iterator, bool> insrt = mInflightFetches.insert(fileSpec);
if (!insrt.second)
diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h
index 0a4e26cb98..2ad5de816b 100644
--- a/indra/newview/llsyswellitem.h
+++ b/indra/newview/llsyswellitem.h
@@ -60,7 +60,7 @@ public:
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
//callbacks
- typedef boost::function<void (LLSysWellItem* item)> syswell_item_callback_t;
+ typedef std::function<void (LLSysWellItem* item)> syswell_item_callback_t;
typedef boost::signals2::signal<void (LLSysWellItem* item)> syswell_item_signal_t;
syswell_item_signal_t mOnItemClose;
syswell_item_signal_t mOnItemClick;
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index b534b136b0..76bd65e7a9 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -29,9 +29,9 @@
#include "llsingleton.h" // for LLSingleton
+#include <functional>
#include <vector>
#include <string>
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include "llteleporthistorystorage.h"
@@ -80,7 +80,7 @@ class LLTeleportHistory: public LLSingleton<LLTeleportHistory>
public:
typedef std::vector<LLTeleportHistoryItem> slurl_list_t;
- typedef boost::function<void()> history_callback_t;
+ typedef std::function<void()> history_callback_t;
typedef boost::signals2::signal<void()> history_signal_t;
/**
diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h
index 643c4a6bfc..07da596aab 100644
--- a/indra/newview/llteleporthistorystorage.h
+++ b/indra/newview/llteleporthistorystorage.h
@@ -77,7 +77,7 @@ public:
typedef std::vector<LLTeleportHistoryPersistentItem> slurl_list_t;
// removed_index is index of removed item, which replaced by more recent
- typedef boost::function<void(S32 removed_index)> history_callback_t;
+ typedef std::function<void(S32 removed_index)> history_callback_t;
typedef boost::signals2::signal<void(S32 removed_index)> history_signal_t;
/**
diff --git a/indra/newview/llterrainpaintmap.cpp b/indra/newview/llterrainpaintmap.cpp
index 8cb926a110..eeebab1ddb 100644
--- a/indra/newview/llterrainpaintmap.cpp
+++ b/indra/newview/llterrainpaintmap.cpp
@@ -108,7 +108,7 @@ bool LLTerrainPaintMap::bakeHeightNoiseIntoPBRPaintMapRGB(const LLViewerRegion&
const LLVector3 region_center = LLVector3(region_half_width, region_half_width, 0.0) + region.getOriginAgent();
const LLVector3 camera_origin = LLVector3(0.0f, 0.0f, region_camera_height) + region_center;
camera.lookAt(camera_origin, region_center, LLVector3::y_axis);
- camera.setAspect(F32(scratch_target.getHeight()) / F32(scratch_target.getWidth()));
+ camera.setAspect(F32(scratch_target.getWidth()) / F32(scratch_target.getHeight()));
const LLRect texture_rect(0, scratch_target.getHeight(), scratch_target.getWidth(), 0);
glViewport(texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight());
// Manually get modelview matrix from camera orientation.
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index b2f2509e80..52ec8c17c1 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -166,10 +166,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mBlankImageAssetID(blank_image_asset_id),
mAllowNoTexture(allow_no_texture),
mLabel(label),
- mTentativeLabel(NULL),
- mResolutionLabel(NULL),
+ mTentativeLabel(nullptr),
+ mResolutionLabel(nullptr),
mActive( true ),
- mFilterEdit(NULL),
+ mFilterEdit(nullptr),
mImmediateFilterPermMask(immediate_filter_perm_mask),
mDnDFilterPermMask(dnd_filter_perm_mask),
mContextConeOpacity(0.f),
@@ -180,10 +180,10 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mMaxDim(S32_MAX),
mMinDim(0),
mPreviewSettingChanged(false),
- mOnFloaterCommitCallback(NULL),
- mOnFloaterCloseCallback(NULL),
- mSetImageAssetIDCallback(NULL),
- mOnUpdateImageStatsCallback(NULL),
+ mOnFloaterCommitCallback(nullptr),
+ mOnFloaterCloseCallback(nullptr),
+ mSetImageAssetIDCallback(nullptr),
+ mOnUpdateImageStatsCallback(nullptr),
mBakeTextureEnabled(false),
mLocalTextureEnabled(false),
mNoCopyTextureSelected(false),
@@ -1090,7 +1090,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
mNoCopyTextureSelected = false;
if (itemp)
{
- if (!mTextureSelectedCallback.empty())
+ if (mTextureSelectedCallback != nullptr)
{
mTextureSelectedCallback(itemp);
}
@@ -1683,11 +1683,11 @@ static LLDefaultChildRegistry::Register<LLTextureCtrl> r("texture_picker");
LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
: LLUICtrl(p),
- mDragCallback(NULL),
- mDropCallback(NULL),
- mOnCancelCallback(NULL),
- mOnCloseCallback(NULL),
- mOnSelectCallback(NULL),
+ mDragCallback(nullptr),
+ mDropCallback(nullptr),
+ mOnCancelCallback(nullptr),
+ mOnCloseCallback(nullptr),
+ mOnSelectCallback(nullptr),
mBorderColor( p.border_color() ),
mAllowNoTexture( p.allow_no_texture ),
mAllowLocalTexture( true ),
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 467b8d1091..e0060474ce 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -50,8 +50,8 @@ class LLViewerFetchedTexture;
class LLFetchedGLTFMaterial;
// used for setting drag & drop callbacks.
-typedef boost::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
-typedef boost::function<void (LLInventoryItem*)> texture_selected_callback;
+typedef std::function<bool (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
+typedef std::function<void (LLInventoryItem*)> texture_selected_callback;
// Helper functions for UI that work with picker
bool get_is_predefined_texture(LLUUID asset_id);
@@ -299,10 +299,10 @@ private:
//////////////////////////////////////////////////////////////////////////////////////////
// LLFloaterTexturePicker
-typedef boost::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback;
-typedef boost::function<void()> floater_close_callback;
-typedef boost::function<void(const LLUUID& asset_id)> set_image_asset_id_callback;
-typedef boost::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback;
+typedef std::function<void(LLTextureCtrl::ETexturePickOp op, LLPickerSource source, const LLUUID& asset_id, const LLUUID& inventory_id, const LLUUID& tracking_id)> floater_commit_callback;
+typedef std::function<void()> floater_close_callback;
+typedef std::function<void(const LLUUID& asset_id)> set_image_asset_id_callback;
+typedef std::function<void(LLPointer<LLViewerTexture> texture)> set_on_update_image_stats_callback;
class LLFloaterTexturePicker : public LLFloater
{
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f7cb0ee7ed..51ade60827 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -743,10 +743,10 @@ public:
: LLTextureFetch::TFRequest(),
mRegionHandle(region_handle)
{}
- TFReqSetRegion & operator=(const TFReqSetRegion &); // Not defined
+ TFReqSetRegion(const TFReqSetRegion&) = delete;
+ TFReqSetRegion& operator=(const TFReqSetRegion&) = delete;
- virtual ~TFReqSetRegion()
- {}
+ virtual ~TFReqSetRegion() = default;
virtual bool doWork(LLTextureFetch * fetcher);
@@ -793,7 +793,9 @@ public:
const LLUUID & session_id,
const LLUUID & agent_id,
LLSD& stats_sd);
- TFReqSendMetrics & operator=(const TFReqSendMetrics &); // Not defined
+
+ TFReqSendMetrics(const TFReqSendMetrics&) = delete;
+ TFReqSendMetrics& operator=(const TFReqSendMetrics&) = delete;
virtual ~TFReqSendMetrics();
@@ -2462,13 +2464,13 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
mHttpRequest = new LLCore::HttpRequest;
- mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
- mHttpOptionsWithHeaders = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ mHttpOptions = std::make_shared<LLCore::HttpOptions>();
+ mHttpOptionsWithHeaders = std::make_shared<LLCore::HttpOptions>();
mHttpOptionsWithHeaders->setWantHeaders(true);
- mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_TEXTURE);
- mHttpMetricsHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
+ mHttpMetricsHeaders = std::make_shared<LLCore::HttpHeaders>();
mHttpMetricsHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpMetricsPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_REPORTING);
mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER;
@@ -3572,7 +3574,7 @@ TFReqSendMetrics::TFReqSendMetrics(const std::string & caps_url,
mSessionID(session_id),
mAgentID(agent_id),
mStatsSD(stats_sd),
- mHandler(new AssetReportHandler)
+ mHandler(std::make_shared<AssetReportHandler>())
{}
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 0f871dc1bb..3c939a88e5 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -117,7 +117,7 @@ LLToast::LLToast(const LLToast::Params& p)
mIsFading(false),
mIsHovered(false)
{
- mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
+ mTimer = std::make_unique<LLToastLifeTimer>(this, p.lifetime_secs);
buildFromFile("panel_toast.xml");
@@ -140,7 +140,7 @@ LLToast::LLToast(const LLToast::Params& p)
}
// init callbacks if present
- if(!p.on_delete_toast().empty())
+ if (p.on_delete_toast() != nullptr)
{
mOnDeleteToastSignal.connect(p.on_delete_toast());
}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index cf116bfadf..a73f7820ba 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -75,7 +75,7 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
friend class LLToastLifeTimer;
public:
- typedef boost::function<void (LLToast* toast)> toast_callback_t;
+ typedef std::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index 0f1574f2d5..6c79674d76 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -34,7 +34,6 @@
#include "lltool.h"
#include "lltextureentry.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
class LLViewerObject;
diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp
index 72e30bd765..dcd1582eb9 100644
--- a/indra/newview/lltranslate.cpp
+++ b/indra/newview/lltranslate.cpp
@@ -155,10 +155,10 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
std::string user_agent = stringize(
@@ -199,7 +199,7 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD
bOk = false;
}
- if (!fnc.empty())
+ if (fnc != nullptr)
{
fnc(service, bOk, parseResult);
}
@@ -210,10 +210,10 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getMerchantStatusCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
std::string user_agent = stringize(
@@ -275,7 +275,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
LLStringUtil::replaceString(translation, "&amp;", "&");
LLStringUtil::replaceString(translation, "&apos;", "'");
- if (!success.empty())
+ if (success != nullptr)
success(translation, detected_lang);
}
else
@@ -291,7 +291,7 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
}
LL_WARNS() << "Translation request failed: " << err_msg << LL_ENDL;
- if (!failure.empty())
+ if (failure != nullptr)
failure(status, err_msg);
}
}
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index 0ad769b27f..14372cf406 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -28,10 +28,10 @@
#define LL_LLTRANSLATE_H
#include "llbufferstream.h"
-#include <boost/function.hpp>
-
#include "llsingleton.h"
+#include <functional>
+
class LLTranslationAPIHandler;
/**
* Entry point for machine translation services.
@@ -59,9 +59,9 @@ public :
SERVICE_DEEPL,
} EService;
- typedef boost::function<void(EService, bool, S32)> KeyVerificationResult_fn;
- typedef boost::function<void(std::string , std::string )> TranslationSuccess_fn;
- typedef boost::function<void(int, std::string)> TranslationFailure_fn;
+ typedef std::function<void(EService, bool, S32)> KeyVerificationResult_fn;
+ typedef std::function<void(std::string, std::string)> TranslationSuccess_fn;
+ typedef std::function<void(int, std::string)> TranslationFailure_fn;
/**
* Translate given text.
diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp
index de0ed645eb..871bf36ed3 100644
--- a/indra/newview/llurllineeditorctrl.cpp
+++ b/indra/newview/llurllineeditorctrl.cpp
@@ -84,7 +84,9 @@ void LLURLLineEditor::copyEscapedURLToClipboard()
const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length));
LLWString text_to_copy;
// *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335).
- if (LLStringUtil::startsWith(unescaped_text, "http://") || LLStringUtil::startsWith(unescaped_text, "secondlife://")) // SLURL
+ if (LLStringUtil::startsWith(unescaped_text, "https://")
+ || LLStringUtil::startsWith(unescaped_text, "http://")
+ || LLStringUtil::startsWith(unescaped_text, "secondlife://")) // SLURL
text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text));
else // human-readable location
text_to_copy = utf8str_to_wstring(unescaped_text);
diff --git a/indra/newview/llvelopack.cpp b/indra/newview/llvelopack.cpp
new file mode 100644
index 0000000000..28e989c4ba
--- /dev/null
+++ b/indra/newview/llvelopack.cpp
@@ -0,0 +1,1201 @@
+/**
+ * @file llvelopack.cpp
+ * @brief Velopack installer and update framework integration
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#if LL_VELOPACK
+
+#include "llviewerprecompiledheaders.h"
+#include "llvelopack.h"
+#include "llstring.h"
+#include "llcorehttputil.h"
+#include "llversioninfo.h"
+
+#include <boost/json.hpp>
+#include <fstream>
+#include <unordered_map>
+#include "llnotificationsutil.h"
+#include "llviewercontrol.h"
+#include "llappviewer.h"
+#include "llcoros.h"
+
+#include "Velopack.h"
+
+#if LL_WINDOWS
+#include <windows.h>
+#include <shlobj.h>
+#include <shobjidl.h>
+#include <shlwapi.h>
+#include <objbase.h>
+#include <filesystem>
+
+#pragma comment(lib, "shlwapi.lib")
+#pragma comment(lib, "ole32.lib")
+#pragma comment(lib, "shell32.lib")
+#endif // LL_WINDOWS
+
+// Common state
+static std::string sUpdateUrl;
+static std::function<void(int)> sProgressCallback;
+static vpkc_update_manager_t* sUpdateManager = nullptr;
+static vpkc_update_info_t* sPendingUpdate = nullptr; // Downloaded, ready to apply
+static vpkc_update_info_t* sPendingCheckInfo = nullptr; // Checked, awaiting user response
+static vpkc_update_source_t* sUpdateSource = nullptr;
+static LLNotificationPtr sDownloadingNotification;
+static bool sRestartAfterUpdate = false;
+static bool sIsRequired = false; // Is the pending check a required update?
+static std::string sReleaseNotesUrl;
+static std::string sTargetVersion; // Velopack's actual target version
+
+// Forward declarations
+static void show_required_update_prompt();
+static void show_downloading_notification(const std::string& version);
+static void ensure_update_manager(bool allow_downgrade);
+static void velopack_download_pending_update();
+static std::unordered_map<std::string, std::string> sAssetUrlMap; // basename -> original absolute URL
+
+//
+// Custom update source helpers
+//
+
+static std::string extract_basename(const std::string& url)
+{
+ // Strip query params / fragment
+ std::string path = url;
+ auto qpos = path.find('?');
+ if (qpos != std::string::npos) path = path.substr(0, qpos);
+ auto fpos = path.find('#');
+ if (fpos != std::string::npos) path = path.substr(0, fpos);
+
+ auto spos = path.rfind('/');
+ if (spos != std::string::npos && spos + 1 < path.size())
+ return path.substr(spos + 1);
+ return path;
+}
+
+static void rewrite_asset_urls(boost::json::value& jv)
+{
+ if (jv.is_object())
+ {
+ auto& obj = jv.as_object();
+ auto it = obj.find("FileName");
+ if (it != obj.end() && it->value().is_string())
+ {
+ std::string filename(it->value().as_string());
+ if (filename.find("://") != std::string::npos)
+ {
+ std::string basename = extract_basename(filename);
+ sAssetUrlMap[basename] = filename;
+ it->value() = basename;
+ LL_DEBUGS("Velopack") << "Rewrote FileName: " << basename << LL_ENDL;
+ }
+ }
+ for (auto& kv : obj)
+ {
+ rewrite_asset_urls(kv.value());
+ }
+ }
+ else if (jv.is_array())
+ {
+ for (auto& elem : jv.as_array())
+ {
+ rewrite_asset_urls(elem);
+ }
+ }
+}
+
+static std::string rewrite_release_feed(const std::string& json_str)
+{
+ boost::json::value jv = boost::json::parse(json_str);
+ rewrite_asset_urls(jv);
+ return boost::json::serialize(jv);
+}
+
+static std::string download_url_raw(const std::string& url)
+{
+ LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ auto httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("VelopackSource", httpPolicy);
+ auto httpRequest = std::make_shared<LLCore::HttpRequest>();
+ auto httpOpts = std::make_shared<LLCore::HttpOptions>();
+ httpOpts->setFollowRedirects(true);
+
+ LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts);
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+ if (!status)
+ {
+ LL_WARNS("Velopack") << "HTTP request failed for " << url << ": " << status.toString() << LL_ENDL;
+ return {};
+ }
+
+ const LLSD::Binary& rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary();
+ return std::string(rawBody.begin(), rawBody.end());
+}
+
+static bool download_url_to_file(const std::string& url, const std::string& local_path)
+{
+ LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ auto httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("VelopackDownload", httpPolicy);
+ auto httpRequest = std::make_shared<LLCore::HttpRequest>();
+ auto httpOpts = std::make_shared<LLCore::HttpOptions>();
+ httpOpts->setFollowRedirects(true);
+ httpOpts->setTransferTimeout(1200);
+
+ LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts);
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+ if (!status)
+ {
+ LL_WARNS("Velopack") << "Download failed for " << url << ": " << status.toString() << LL_ENDL;
+ return false;
+ }
+
+ const LLSD::Binary& rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary();
+ llofstream outFile(local_path, std::ios::binary | std::ios::trunc);
+ if (!outFile.is_open())
+ {
+ LL_WARNS("Velopack") << "Failed to open file for writing: " << local_path << LL_ENDL;
+ return false;
+ }
+ outFile.write(reinterpret_cast<const char*>(rawBody.data()), rawBody.size());
+ outFile.close();
+ return true;
+}
+
+//
+// Custom source callbacks
+//
+
+static char* custom_get_release_feed(void* user_data, const char* releases_name)
+{
+ std::string base = sUpdateUrl;
+ if (!base.empty() && base.back() == '/')
+ base.pop_back();
+ std::string url = base + "/" + releases_name;
+ LL_INFOS("Velopack") << "Fetching release feed: " << url << LL_ENDL;
+
+ std::string json_str = download_url_raw(url);
+ if (json_str.empty())
+ {
+ return nullptr;
+ }
+
+ try
+ {
+ std::string rewritten = rewrite_release_feed(json_str);
+ char* result = static_cast<char*>(malloc(rewritten.size() + 1));
+ if (result)
+ {
+ memcpy(result, rewritten.c_str(), rewritten.size() + 1);
+ }
+ return result;
+ }
+ catch (const std::exception& e)
+ {
+ LL_WARNS("Velopack") << "Failed to parse/rewrite release feed: " << e.what() << LL_ENDL;
+ // Return original unmodified feed as fallback
+ char* result = static_cast<char*>(malloc(json_str.size() + 1));
+ if (result)
+ {
+ memcpy(result, json_str.c_str(), json_str.size() + 1);
+ }
+ return result;
+ }
+}
+
+static void custom_free_release_feed(void* user_data, char* feed)
+{
+ free(feed);
+}
+
+static std::string sPreDownloadedAssetPath;
+
+static bool custom_download_asset(void* user_data,
+ const vpkc_asset_t* asset,
+ const char* local_path,
+ size_t progress_callback_id)
+{
+ // The asset has already been downloaded at the coroutine level (before vpkc_download_updates).
+ // This callback just copies the pre-downloaded file to where Velopack expects it.
+ // We cannot use getRawAndSuspend here — coroutine context is lost through the Rust FFI boundary.
+ if (sPreDownloadedAssetPath.empty())
+ {
+ LL_WARNS("Velopack") << "No pre-downloaded asset available" << LL_ENDL;
+ return false;
+ }
+
+ std::string filename = asset->FileName ? asset->FileName : "";
+ LL_INFOS("Velopack") << "Download asset callback: filename=" << filename
+ << " local_path=" << local_path
+ << " size=" << asset->Size << LL_ENDL;
+ vpkc_source_report_progress(progress_callback_id, 0);
+
+ std::ifstream src(sPreDownloadedAssetPath, std::ios::binary);
+ llofstream dst(local_path, std::ios::binary | std::ios::trunc);
+ if (!src.is_open() || !dst.is_open())
+ {
+ LL_WARNS("Velopack") << "Failed to open files for copy" << LL_ENDL;
+ return false;
+ }
+
+ dst << src.rdbuf();
+ dst.close();
+ src.close();
+
+ vpkc_source_report_progress(progress_callback_id, 100);
+ LL_INFOS("Velopack") << "Asset copy complete" << LL_ENDL;
+ return true;
+}
+
+//
+// Platform-specific helpers and hooks
+//
+
+#if LL_WINDOWS
+
+static const wchar_t* PROTOCOL_SECONDLIFE = L"secondlife";
+static const wchar_t* PROTOCOL_GRID_INFO = L"x-grid-location-info";
+static std::wstring get_viewer_exe_name()
+{
+ return ll_convert<std::wstring>(gDirUtilp->getExecutableFilename());
+}
+
+static std::wstring get_install_dir()
+{
+ wchar_t path[MAX_PATH];
+ GetModuleFileNameW(NULL, path, MAX_PATH);
+ PathRemoveFileSpecW(path);
+ return path;
+}
+
+static std::wstring get_app_name()
+{
+ // Match viewer_manifest.py app_name() logic: release channel uses "Viewer"
+ // suffix instead of "Release" for display purposes (shortcuts, uninstall, etc.)
+ std::wstring channel = LL_TO_WSTRING(LL_VIEWER_CHANNEL);
+ std::wstring release_suffix = L" Release";
+ if (channel.size() >= release_suffix.size() &&
+ channel.compare(channel.size() - release_suffix.size(), release_suffix.size(), release_suffix) == 0)
+ {
+ channel.replace(channel.size() - release_suffix.size(), release_suffix.size(), L" Viewer");
+ }
+ return channel;
+}
+
+static std::wstring get_app_name_oneword()
+{
+ std::wstring name = get_app_name();
+ name.erase(std::remove(name.begin(), name.end(), L' '), name.end());
+ return name;
+}
+
+static std::wstring get_start_menu_path()
+{
+ wchar_t path[MAX_PATH];
+ if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PROGRAMS, NULL, 0, path)))
+ {
+ return path;
+ }
+ return L"";
+}
+
+static std::wstring get_desktop_path()
+{
+ wchar_t path[MAX_PATH];
+ if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_DESKTOPDIRECTORY, NULL, 0, path)))
+ {
+ return path;
+ }
+ return L"";
+}
+
+static bool create_shortcut(const std::wstring& shortcut_path,
+ const std::wstring& target_path,
+ const std::wstring& arguments,
+ const std::wstring& description,
+ const std::wstring& icon_path)
+{
+ HRESULT hr = CoInitialize(NULL);
+ if (FAILED(hr)) return false;
+
+ IShellLinkW* shell_link = nullptr;
+ hr = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+ IID_IShellLinkW, (void**)&shell_link);
+ if (SUCCEEDED(hr))
+ {
+ shell_link->SetPath(target_path.c_str());
+ shell_link->SetArguments(arguments.c_str());
+ shell_link->SetDescription(description.c_str());
+ shell_link->SetIconLocation(icon_path.c_str(), 0);
+
+ wchar_t work_dir[MAX_PATH];
+ wcscpy_s(work_dir, target_path.c_str());
+ PathRemoveFileSpecW(work_dir);
+ shell_link->SetWorkingDirectory(work_dir);
+
+ IPersistFile* persist_file = nullptr;
+ hr = shell_link->QueryInterface(IID_IPersistFile, (void**)&persist_file);
+ if (SUCCEEDED(hr))
+ {
+ hr = persist_file->Save(shortcut_path.c_str(), TRUE);
+ persist_file->Release();
+ }
+ shell_link->Release();
+ }
+
+ CoUninitialize();
+ return SUCCEEDED(hr);
+}
+
+static void register_protocol_handler(const std::wstring& protocol,
+ const std::wstring& description,
+ const std::wstring& exe_path)
+{
+ std::wstring key_path = L"SOFTWARE\\Classes\\" + protocol;
+ HKEY hkey;
+
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, key_path.c_str(), 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS)
+ {
+ RegSetValueExW(hkey, NULL, 0, REG_SZ,
+ (BYTE*)description.c_str(), (DWORD)((description.size() + 1) * sizeof(wchar_t)));
+ RegSetValueExW(hkey, L"URL Protocol", 0, REG_SZ, (BYTE*)L"", sizeof(wchar_t));
+ RegCloseKey(hkey);
+ }
+
+ std::wstring icon_key_path = key_path + L"\\DefaultIcon";
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, icon_key_path.c_str(), 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS)
+ {
+ std::wstring icon_value = L"\"" + exe_path + L"\"";
+ RegSetValueExW(hkey, NULL, 0, REG_SZ,
+ (BYTE*)icon_value.c_str(), (DWORD)((icon_value.size() + 1) * sizeof(wchar_t)));
+ RegCloseKey(hkey);
+ }
+
+ std::wstring cmd_key_path = key_path + L"\\shell\\open\\command";
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, cmd_key_path.c_str(), 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS)
+ {
+ std::wstring cmd_value = L"\"" + exe_path + L"\" -url \"%1\"";
+ RegSetValueExW(hkey, NULL, 0, REG_EXPAND_SZ,
+ (BYTE*)cmd_value.c_str(), (DWORD)((cmd_value.size() + 1) * sizeof(wchar_t)));
+ RegCloseKey(hkey);
+ }
+}
+
+void clear_nsis_links()
+{
+ wchar_t path[MAX_PATH];
+
+ // 1. The 'start' shortcuts set by nsis would be global, like app shortcut:
+ // C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Second Life Viewer\Second Life Viewer.lnk
+ // But it isn't just one link, it's a whole directory that needs to be removed.
+ if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_COMMON_PROGRAMS, NULL, 0, path)))
+ {
+ std::wstring start_menu_path = path;
+ std::wstring folder_path = start_menu_path + L"\\" + get_app_name();
+
+ std::error_code ec;
+ std::filesystem::path dir(folder_path);
+ if (std::filesystem::exists(dir, ec))
+ {
+ std::filesystem::remove_all(dir, ec);
+ if (ec)
+ {
+ LL_WARNS("Velopack") << "Failed to remove NSIS start menu directory: "
+ << ll_convert_wide_to_string(folder_path) << LL_ENDL;
+ }
+ }
+ }
+
+ // 2. Desktop link, also a global one.
+ // C:\Users\Public\Desktop
+ if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_COMMON_DESKTOPDIRECTORY, NULL, 0, path)))
+ {
+ std::wstring desktop_path = path;
+ std::wstring shortcut_path = desktop_path + L"\\" + get_app_name() + L".lnk";
+ if (!DeleteFileW(shortcut_path.c_str()))
+ {
+ DWORD error = GetLastError();
+ if (error != ERROR_FILE_NOT_FOUND)
+ {
+ LL_WARNS("Velopack") << "Failed to delete NSIS desktop shortcut: "
+ << ll_convert_wide_to_string(shortcut_path)
+ << " (error: " << error << ")" << LL_ENDL;
+ }
+ }
+ }
+}
+
+static void parse_version(const wchar_t* version_str, int& major, int& minor, int& patch, uint64_t& build)
+{
+ major = minor = patch = 0;
+ build = 0;
+ if (!version_str) return;
+ // Use swscanf for wide strings
+ swscanf(version_str, L"%d.%d.%d.%llu", &major, &minor, &patch, &build);
+}
+
+bool get_nsis_version(
+ int& nsis_major,
+ int& nsis_minor,
+ int& nsis_patch,
+ uint64_t& nsis_build)
+{
+ // Test for presence of NSIS viewer registration, then
+ // attempt to read uninstall info
+ std::wstring app_name_oneword = get_app_name_oneword();
+ std::wstring uninstall_key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + app_name_oneword;
+ HKEY hkey;
+ LONG result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, uninstall_key_path.c_str(), 0, KEY_READ, &hkey);
+ if (result != ERROR_SUCCESS)
+ {
+ return false;
+ }
+
+ // Read DisplayVersion
+ wchar_t version_buf[64] = { 0 };
+ DWORD version_buf_size = sizeof(version_buf);
+ DWORD type = 0;
+ LONG ver_rv = RegGetValueW(hkey, nullptr, L"DisplayVersion", RRF_RT_REG_SZ, &type, version_buf, &version_buf_size);
+
+ if (ver_rv != ERROR_SUCCESS)
+ {
+ RegCloseKey(hkey);
+ return false;
+ }
+
+ parse_version(version_buf, nsis_major, nsis_minor, nsis_patch, nsis_build);
+
+ // Make sure it actually exists and not a dead entry.
+ wchar_t path_buffer[MAX_PATH] = { 0 };
+ DWORD path_buf_size = sizeof(path_buffer);
+ LONG rv = RegGetValueW(hkey, nullptr, L"UninstallString", RRF_RT_REG_SZ, &type, path_buffer, &path_buf_size);
+ RegCloseKey(hkey);
+ if (rv != ERROR_SUCCESS)
+ {
+ return false;
+ }
+ size_t len = wcslen(path_buffer);
+ if (len > 0)
+ {
+ if (path_buffer[0] == L'\"')
+ {
+ // Likely to contain leading "
+ memmove(path_buffer, path_buffer + 1, len * sizeof(wchar_t));
+ }
+ wchar_t* pos = wcsstr(path_buffer, L"uninst.exe");
+ if (pos)
+ {
+ // Likely to contain trailing "
+ pos[wcslen(L"uninst.exe")] = L'\0';
+ }
+ }
+ std::error_code ec;
+ std::filesystem::path path(path_buffer);
+ if (!std::filesystem::exists(path, ec))
+ {
+ return false;
+ }
+
+ // Todo: check codesigning?
+
+ return true;
+}
+
+static void unregister_protocol_handler(const std::wstring& protocol)
+{
+ std::wstring key_path = L"SOFTWARE\\Classes\\" + protocol;
+ RegDeleteTreeW(HKEY_CURRENT_USER, key_path.c_str());
+}
+
+static void register_uninstall_info(const std::wstring& install_dir,
+ const std::wstring& app_name,
+ const std::wstring& version)
+{
+ std::wstring app_name_oneword = get_app_name_oneword();
+ // Clears velopack's recently created 'uninstall' registry entry.
+ // We are going to use a custom one.
+ // Note that velopack doesn't know about our custom entry.
+ std::wstring key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + app_name_oneword;
+ RegDeleteTreeW(HKEY_CURRENT_USER, key_path.c_str());
+ // Use a unique key name to avoid conflicts with any existing NSIS-based uninstall info,
+ // which can cause only one of the two entries to show up in the Add/Remove Programs list.
+ // The UI will show DisplayName, so the key name itself is not important to be user-friendly.
+ key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vlpk" + app_name_oneword;
+ HKEY hkey;
+
+ if (RegCreateKeyExW(HKEY_CURRENT_USER, key_path.c_str(), 0, NULL,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS)
+ {
+ std::wstring exe_path = install_dir + L"\\" + get_viewer_exe_name();
+ // Update.exe lives one level above the current\ directory where the viewer exe runs
+ std::filesystem::path update_exe = std::filesystem::path(install_dir).parent_path() / L"Update.exe";
+ std::wstring uninstall_cmd = L"\"" + update_exe.wstring() + L"\" --uninstall";
+
+ RegSetValueExW(hkey, L"DisplayName", 0, REG_SZ,
+ (BYTE*)app_name.c_str(), (DWORD)((app_name.size() + 1) * sizeof(wchar_t)));
+ RegSetValueExW(hkey, L"DisplayVersion", 0, REG_SZ,
+ (BYTE*)version.c_str(), (DWORD)((version.size() + 1) * sizeof(wchar_t)));
+ RegSetValueExW(hkey, L"Publisher", 0, REG_SZ,
+ (BYTE*)L"Linden Research, Inc.", 44);
+ RegSetValueExW(hkey, L"UninstallString", 0, REG_SZ,
+ (BYTE*)uninstall_cmd.c_str(), (DWORD)((uninstall_cmd.size() + 1) * sizeof(wchar_t)));
+ RegSetValueExW(hkey, L"DisplayIcon", 0, REG_SZ,
+ (BYTE*)exe_path.c_str(), (DWORD)((exe_path.size() + 1) * sizeof(wchar_t)));
+
+ std::wstring link_url = L"https://support.secondlife.com/contact-support/";
+ RegSetValueExW(hkey, L"HelpLink", 0, REG_SZ,
+ (BYTE*)link_url.c_str(), (DWORD)((link_url.size() + 1) * sizeof(wchar_t)));
+
+ link_url = L"https://secondlife.com/whatis/";
+ RegSetValueExW(hkey, L"URLInfoAbout", 0, REG_SZ,
+ (BYTE*)link_url.c_str(), (DWORD)((link_url.size() + 1) * sizeof(wchar_t)));
+
+ link_url = L"https://secondlife.com/support/downloads/";
+ RegSetValueExW(hkey, L"URLUpdateInfo", 0, REG_SZ,
+ (BYTE*)link_url.c_str(), (DWORD)((link_url.size() + 1) * sizeof(wchar_t)));
+
+ DWORD no_modify = 1;
+ RegSetValueExW(hkey, L"NoModify", 0, REG_DWORD, (BYTE*)&no_modify, sizeof(DWORD));
+ RegSetValueExW(hkey, L"NoRepair", 0, REG_DWORD, (BYTE*)&no_modify, sizeof(DWORD));
+
+ // Format YYYYMMDD
+ wchar_t dateStr[9];
+ time_t t = time(NULL);
+ struct tm tm;
+ localtime_s(&tm, &t);
+ wcsftime(dateStr, 9, L"%Y%m%d", &tm);
+ RegSetValueExW(hkey, L"InstallDate", 0, REG_SZ, (BYTE*)dateStr, (DWORD)((wcslen(dateStr) + 1) * sizeof(wchar_t))); // Let Windows fill in the install date
+
+ // 800 MB, inaccurate, but for a rough idea.
+ // We can check folder size here, but it would take time and
+ // information is of low importance.
+ DWORD estimated_size = 800000;
+ RegSetValueExW(hkey, L"EstimatedSize", 0, REG_DWORD, (BYTE*)&estimated_size, sizeof(DWORD));
+
+ RegCloseKey(hkey);
+ }
+}
+
+static void unregister_uninstall_info()
+{
+ std::wstring app_name_oneword = get_app_name_oneword();
+ std::wstring key_path = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vlpk" + app_name_oneword;
+ RegDeleteTreeW(HKEY_CURRENT_USER, key_path.c_str());
+}
+
+static void create_shortcuts(const std::wstring& install_dir, const std::wstring& app_name)
+{
+ std::wstring exe_path = install_dir + L"\\" + get_viewer_exe_name();
+ std::wstring start_menu_dir = get_start_menu_path() + L"\\" + app_name;
+ std::wstring desktop_path = get_desktop_path();
+
+ CreateDirectoryW(start_menu_dir.c_str(), NULL);
+
+ create_shortcut(start_menu_dir + L"\\" + app_name + L".lnk",
+ exe_path, L"", app_name, exe_path);
+
+ create_shortcut(desktop_path + L"\\" + app_name + L".lnk",
+ exe_path, L"", app_name, exe_path);
+}
+
+static void remove_shortcuts(const std::wstring& app_name)
+{
+ std::wstring start_menu_dir = get_start_menu_path() + L"\\" + app_name;
+ std::wstring desktop_path = get_desktop_path();
+
+ DeleteFileW((start_menu_dir + L"\\" + app_name + L".lnk").c_str());
+ RemoveDirectoryW(start_menu_dir.c_str());
+ DeleteFileW((desktop_path + L"\\" + app_name + L".lnk").c_str());
+}
+
+static void on_first_run(void* p_user_data, const char* app_version)
+{
+ // Velopack first executes 'after install' hook, then writes registry,
+ // then executes 'on first run' hook.
+ // As we need to clear velopack's 'uninstall' registry entry and use
+ // our own, clean it here instead of on_after_install.
+
+ std::wstring install_dir = get_install_dir();
+ std::wstring app_name = get_app_name();
+
+ int len = MultiByteToWideChar(CP_UTF8, 0, app_version, -1, NULL, 0);
+ std::wstring version(len, 0);
+ MultiByteToWideChar(CP_UTF8, 0, app_version, -1, &version[0], len);
+
+ register_uninstall_info(install_dir, app_name, version);
+}
+
+static void on_after_install(void* user_data, const char* app_version)
+{
+ std::wstring install_dir = get_install_dir();
+ std::wstring app_name = get_app_name();
+ std::wstring exe_path = install_dir + L"\\" + get_viewer_exe_name();
+
+ register_protocol_handler(PROTOCOL_SECONDLIFE, L"URL:Second Life", exe_path);
+ register_protocol_handler(PROTOCOL_GRID_INFO, L"URL:Second Life", exe_path);
+ create_shortcuts(install_dir, app_name);
+}
+
+static void on_before_uninstall(void* user_data, const char* app_version)
+{
+ std::wstring app_name = get_app_name();
+
+ unregister_protocol_handler(PROTOCOL_SECONDLIFE);
+ unregister_protocol_handler(PROTOCOL_GRID_INFO);
+ unregister_uninstall_info();
+ remove_shortcuts(app_name);
+}
+
+static void on_log_message(void* user_data, const char* level, const char* message)
+{
+ OutputDebugStringA("[Velopack] ");
+ OutputDebugStringA(level);
+ OutputDebugStringA(": ");
+ OutputDebugStringA(message);
+ OutputDebugStringA("\n");
+}
+
+#elif LL_DARWIN
+
+// macOS-specific hooks
+// TODO: Implement protocol handler registration via Launch Services
+// TODO: Implement app bundle management
+
+static void on_first_run(void* user_data, const char* app_version)
+{
+}
+
+static void on_after_install(void* user_data, const char* app_version)
+{
+ // macOS handles protocol registration via Info.plist CFBundleURLTypes
+ // No additional registration needed at runtime
+ LL_INFOS("Velopack") << "macOS post-install hook called for version: " << app_version << LL_ENDL;
+}
+
+static void on_before_uninstall(void* user_data, const char* app_version)
+{
+ LL_INFOS("Velopack") << "macOS pre-uninstall hook called for version: " << app_version << LL_ENDL;
+}
+
+static void on_log_message(void* user_data, const char* level, const char* message)
+{
+ LL_INFOS("Velopack") << "[" << level << "] " << message << LL_ENDL;
+}
+
+#endif // LL_WINDOWS / LL_DARWIN
+
+//
+// Common progress callback
+//
+
+static void on_progress(void* user_data, size_t progress)
+{
+ if (sProgressCallback)
+ {
+ sProgressCallback(static_cast<int>(progress));
+ }
+}
+
+static void on_vpk_log(void* p_user_data,
+ const char* psz_level,
+ const char* psz_message)
+{
+ LL_DEBUGS("Velopack") << ll_safe_string(psz_message) << LL_ENDL;
+}
+
+//
+// Version comparison helper
+//
+
+// Compare running version against a VVM version string "major.minor.patch.build".
+// Returns -1 if running < vvm, 0 if equal, 1 if running > vvm.
+static int compare_running_version(const std::string& vvm_version)
+{
+ S32 major = 0, minor = 0, patch = 0;
+ U64 build = 0;
+ sscanf(vvm_version.c_str(), "%d.%d.%d.%llu", &major, &minor, &patch, &build);
+
+ const LLVersionInfo& vi = LLVersionInfo::instance();
+ S32 cur_major = vi.getMajor();
+ S32 cur_minor = vi.getMinor();
+ S32 cur_patch = vi.getPatch();
+ U64 cur_build = vi.getBuild();
+
+ if (cur_major != major) return cur_major < major ? -1 : 1;
+ if (cur_minor != minor) return cur_minor < minor ? -1 : 1;
+ if (cur_patch != patch) return cur_patch < patch ? -1 : 1;
+ if (cur_build != build) return cur_build < build ? -1 : 1;
+ return 0;
+}
+
+//
+// Update manager lifecycle
+//
+
+static void ensure_update_manager(bool allow_downgrade)
+{
+ if (sUpdateManager)
+ return;
+
+ vpkc_update_options_t options = {};
+ options.AllowVersionDowngrade = allow_downgrade;
+ options.ExplicitChannel = nullptr;
+
+ if (!sUpdateSource)
+ {
+ sUpdateSource = vpkc_new_source_custom_callback(
+ custom_get_release_feed,
+ custom_free_release_feed,
+ custom_download_asset,
+ nullptr);
+ }
+
+ vpkc_locator_config_t* locator_ptr = nullptr;
+
+#if LL_DARWIN
+ // Try auto-detection first (works when the app bundle was packaged by vpk
+ // and has UpdateMac + sq.version already present)
+ if (!vpkc_new_update_manager_with_source(sUpdateSource, &options, nullptr, &sUpdateManager))
+ {
+ char err[512];
+ vpkc_get_last_error(err, sizeof(err));
+ LL_INFOS("Velopack") << "Auto-detect failed (" << ll_safe_string(err)
+ << "), falling back to explicit locator" << LL_ENDL;
+
+ // Auto-detection failed — construct an explicit locator.
+ // This handles legacy DMG installs that don't have Velopack's
+ // install state (UpdateMac, sq.version) in the bundle.
+ vpkc_locator_config_t locator = {};
+
+ // The executable lives at <bundle>/Contents/MacOS/<exe>
+ // The app bundle root is two levels up from the executable directory.
+ std::string exe_dir = gDirUtilp->getExecutableDir();
+ std::string bundle_root = exe_dir + "/../..";
+ char resolved[PATH_MAX];
+ if (realpath(bundle_root.c_str(), resolved))
+ {
+ bundle_root = resolved;
+ }
+
+ // Construct a version string in Velopack SemVer format: major.minor.patch-build
+ const LLVersionInfo& vi = LLVersionInfo::instance();
+ std::string current_version = llformat("%d.%d.%d-%llu",
+ vi.getMajor(), vi.getMinor(), vi.getPatch(), vi.getBuild());
+
+ // Create a minimal sq.version manifest so Velopack knows our version.
+ // Proper vpk-packaged builds have this in the bundle already.
+ std::string manifest_path = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, "sq.version");
+ {
+ std::string app_name = LLVersionInfo::instance().getChannel();
+ std::string pack_id = app_name;
+ pack_id.erase(std::remove(pack_id.begin(), pack_id.end(), ' '), pack_id.end());
+
+ std::string nuspec = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+ "<package xmlns=\"http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd\">\n"
+ " <metadata>\n"
+ " <id>" + pack_id + "</id>\n"
+ " <version>" + current_version + "</version>\n"
+ " <title>" + app_name + "</title>\n"
+ " </metadata>\n"
+ "</package>\n";
+
+ llofstream manifest_file(manifest_path, std::ios::trunc);
+ if (manifest_file.is_open())
+ {
+ manifest_file << nuspec;
+ manifest_file.close();
+ }
+ }
+
+ std::string packages_dir = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, "velopack-packages");
+ LLFile::mkdir(packages_dir);
+
+ locator.RootAppDir = const_cast<char*>(bundle_root.c_str());
+ locator.CurrentBinaryDir = const_cast<char*>(exe_dir.c_str());
+ locator.ManifestPath = const_cast<char*>(manifest_path.c_str());
+ locator.PackagesDir = const_cast<char*>(packages_dir.c_str());
+ locator.UpdateExePath = nullptr;
+ locator.IsPortable = false;
+
+ locator_ptr = &locator;
+
+ LL_INFOS("Velopack") << "Explicit locator: RootAppDir=" << bundle_root
+ << " CurrentBinaryDir=" << exe_dir
+ << " Version=" << current_version << LL_ENDL;
+
+ if (!vpkc_new_update_manager_with_source(sUpdateSource, &options, locator_ptr, &sUpdateManager))
+ {
+ char err2[512];
+ vpkc_get_last_error(err2, sizeof(err2));
+ LL_WARNS("Velopack") << "Failed to create update manager: " << ll_safe_string(err2) << LL_ENDL;
+ }
+ }
+ return;
+#endif
+
+ // Windows: Velopack auto-detection works because the viewer is installed
+ // by Velopack's Setup.exe which creates the proper install structure.
+ if (!vpkc_new_update_manager_with_source(sUpdateSource, &options, nullptr, &sUpdateManager))
+ {
+ char err[512];
+ vpkc_get_last_error(err, sizeof(err));
+ LL_WARNS("Velopack") << "Failed to create update manager: " << ll_safe_string(err) << LL_ENDL;
+ }
+}
+
+//
+// Public API - Cross-platform
+//
+
+bool velopack_initialize()
+{
+ vpkc_set_logger(on_log_message, nullptr);
+ vpkc_app_set_auto_apply_on_startup(false);
+
+#if LL_WINDOWS || LL_DARWIN
+ vpkc_app_set_hook_first_run(on_first_run);
+ vpkc_app_set_hook_after_install(on_after_install);
+ vpkc_app_set_hook_before_uninstall(on_before_uninstall);
+#endif
+
+ vpkc_app_run(nullptr);
+ return true;
+}
+
+// Downloads the update that was found during the check phase.
+// Operates on sPendingCheckInfo which was set by velopack_check_for_updates.
+static void velopack_download_pending_update()
+{
+ if (!sUpdateManager || !sPendingCheckInfo)
+ {
+ LL_WARNS("Velopack") << "No pending check info to download" << LL_ENDL;
+ return;
+ }
+
+ LL_DEBUGS("Velopack") << "Setting up detailed logging";
+ vpkc_set_logger(on_vpk_log, nullptr);
+ LL_CONT << LL_ENDL;
+ LL_INFOS("Velopack") << "Downloading update..." << LL_ENDL;
+
+ // Pre-download the nupkg at the coroutine level where getRawAndSuspend works.
+ // The download callback inside the Rust FFI cannot use coroutine HTTP.
+ std::string asset_filename = sPendingCheckInfo->TargetFullRelease->FileName
+ ? sPendingCheckInfo->TargetFullRelease->FileName : "";
+ std::string asset_url;
+ auto url_it = sAssetUrlMap.find(asset_filename);
+ if (url_it != sAssetUrlMap.end())
+ {
+ asset_url = url_it->second;
+ }
+ else
+ {
+ std::string base = sUpdateUrl;
+ if (!base.empty() && base.back() == '/')
+ base.pop_back();
+ asset_url = base + "/" + asset_filename;
+ }
+
+ sPreDownloadedAssetPath = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, asset_filename);
+ LL_INFOS("Velopack") << "Pre-downloading " << asset_url
+ << " to " << sPreDownloadedAssetPath << LL_ENDL;
+
+ if (!download_url_to_file(asset_url, sPreDownloadedAssetPath))
+ {
+ LL_WARNS("Velopack") << "Failed to pre-download update asset" << LL_ENDL;
+ sPreDownloadedAssetPath.clear();
+ return;
+ }
+
+ LL_INFOS("Velopack") << "Pre-download complete, handing to Velopack" << LL_ENDL;
+ if (vpkc_download_updates(sUpdateManager, sPendingCheckInfo, on_progress, nullptr))
+ {
+ if (sPendingUpdate)
+ {
+ vpkc_free_update_info(sPendingUpdate);
+ }
+ sPendingUpdate = sPendingCheckInfo;
+ sPendingCheckInfo = nullptr; // Ownership transferred
+ LL_INFOS("Velopack") << "Update downloaded and pending" << LL_ENDL;
+ }
+ else
+ {
+ char descr[512];
+ vpkc_get_last_error(descr, sizeof(descr));
+ LL_WARNS("Velopack") << "Failed to download update: " << ll_safe_string((const char*)descr) << LL_ENDL;
+ }
+}
+
+static void on_downloading_closed(const LLSD& notification, const LLSD& response)
+{
+ sDownloadingNotification = nullptr;
+ if (sIsRequired)
+ {
+ // User closed the downloading dialog during a required update — re-show it
+ show_downloading_notification(sTargetVersion);
+ }
+}
+
+static void show_downloading_notification(const std::string& version)
+{
+ LLSD args;
+ args["VERSION"] = version;
+ sDownloadingNotification = LLNotificationsUtil::add("DownloadingUpdate", args, LLSD(), on_downloading_closed);
+}
+
+static void dismiss_downloading_notification()
+{
+ if (sDownloadingNotification)
+ {
+ LLNotificationsUtil::cancel(sDownloadingNotification);
+ sDownloadingNotification = nullptr;
+ }
+}
+
+static void on_required_update_response(const LLSD& notification, const LLSD& response)
+{
+ LL_INFOS("Velopack") << "Required update acknowledged, starting download" << LL_ENDL;
+ show_downloading_notification(sTargetVersion);
+ LLCoros::instance().launch("VelopackRequiredUpdate", []()
+ {
+ velopack_download_pending_update();
+ dismiss_downloading_notification();
+ if (velopack_is_update_pending())
+ {
+ LL_INFOS("Velopack") << "Required update downloaded, quitting to apply" << LL_ENDL;
+ velopack_request_restart_after_update();
+ LLAppViewer::instance()->requestQuit();
+ }
+ });
+}
+
+static void on_optional_update_response(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0) // "Install"
+ {
+ LL_INFOS("Velopack") << "User accepted optional update, starting download" << LL_ENDL;
+ show_downloading_notification(sTargetVersion);
+ LLCoros::instance().launch("VelopackOptionalUpdate", []()
+ {
+ velopack_download_pending_update();
+ dismiss_downloading_notification();
+ if (velopack_is_update_pending())
+ {
+ LL_INFOS("Velopack") << "Optional update downloaded, quitting to apply" << LL_ENDL;
+ velopack_request_restart_after_update();
+ LLAppViewer::instance()->requestQuit();
+ }
+ });
+ }
+ else
+ {
+ LL_INFOS("Velopack") << "User declined optional update (option=" << option << ")" << LL_ENDL;
+ // Free the check info since user declined
+ if (sPendingCheckInfo)
+ {
+ vpkc_free_update_info(sPendingCheckInfo);
+ sPendingCheckInfo = nullptr;
+ }
+ }
+}
+
+static void show_required_update_prompt()
+{
+ LLSD args;
+ args["VERSION"] = sTargetVersion;
+ args["URL"] = sReleaseNotesUrl;
+ LLNotificationsUtil::add("PauseForUpdate", args, LLSD(), on_required_update_response);
+}
+
+void velopack_check_for_updates(const std::string& required_version, const std::string& relnotes_url)
+{
+ if (sUpdateUrl.empty())
+ {
+ LL_DEBUGS("Velopack") << "No update URL set, skipping update check" << LL_ENDL;
+ return;
+ }
+
+ // Allow downgrades only for rollbacks: VVM requires a version that's
+ // strictly lower than what we're running (e.g., a retracted build).
+ bool has_required = !required_version.empty();
+ int ver_cmp = has_required ? compare_running_version(required_version) : 0;
+ bool allow_downgrade = ver_cmp > 0; // running > required → rollback scenario
+ ensure_update_manager(allow_downgrade);
+ if (!sUpdateManager)
+ return;
+
+ // Ask Velopack to check its feed — this is the source of truth
+ vpkc_update_info_t* update_info = nullptr;
+ vpkc_update_check_t result = vpkc_check_for_updates(sUpdateManager, &update_info);
+
+ if (result != UPDATE_AVAILABLE || !update_info)
+ {
+ LL_INFOS("Velopack") << "No update available from feed (result=" << result << ")" << LL_ENDL;
+ return;
+ }
+
+ // Extract the actual target version from Velopack's feed
+ std::string target_version = update_info->TargetFullRelease->Version
+ ? update_info->TargetFullRelease->Version : "";
+ LL_INFOS("Velopack") << "Update available: " << target_version
+ << " (required_version=" << required_version << ")" << LL_ENDL;
+
+ // Store state for the prompt/download phase
+ sReleaseNotesUrl = relnotes_url;
+ sTargetVersion = target_version;
+ if (sPendingCheckInfo)
+ {
+ vpkc_free_update_info(sPendingCheckInfo);
+ }
+ sPendingCheckInfo = update_info;
+
+ // Determine if this is mandatory: running version is below VVM's required floor
+ bool is_required = ver_cmp < 0; // running < required → must update
+ sIsRequired = is_required;
+
+ if (is_required)
+ {
+ LL_INFOS("Velopack") << "Required update (running below " << required_version
+ << "), prompting user for " << target_version << LL_ENDL;
+ show_required_update_prompt();
+ return;
+ }
+
+ // Optional update — check user preference
+ U32 updater_setting = gSavedSettings.getU32("UpdaterServiceSetting");
+
+ if (updater_setting == 3)
+ {
+ // "Install each update automatically" — download silently, apply on quit
+ LL_INFOS("Velopack") << "Optional update to " << target_version
+ << ", downloading automatically (UpdaterServiceSetting=3)" << LL_ENDL;
+ velopack_download_pending_update();
+ return;
+ }
+
+ // Default / value 1: "Ask me when an optional update is ready to install"
+ LL_INFOS("Velopack") << "Optional update available (" << target_version << "), prompting user" << LL_ENDL;
+ LLSD args;
+ args["VERSION"] = target_version;
+ args["URL"] = relnotes_url;
+ LLNotificationsUtil::add("PromptOptionalUpdate", args, LLSD(), on_optional_update_response);
+}
+
+std::string velopack_get_current_version()
+{
+ if (!sUpdateManager)
+ {
+ return "";
+ }
+
+ char version[64];
+ size_t len = vpkc_get_current_version(sUpdateManager, version, sizeof(version));
+ if (len > 0)
+ {
+ return std::string(version, len);
+ }
+ return "";
+}
+
+bool velopack_is_update_pending()
+{
+ return sPendingUpdate != nullptr;
+}
+
+bool velopack_is_required_update_in_progress()
+{
+ return sIsRequired && sPendingCheckInfo != nullptr;
+}
+
+std::string velopack_get_required_update_version()
+{
+ return sTargetVersion;
+}
+
+bool velopack_should_restart_after_update()
+{
+ return sRestartAfterUpdate;
+}
+
+void velopack_request_restart_after_update()
+{
+ sRestartAfterUpdate = true;
+}
+
+void velopack_apply_pending_update(bool restart)
+{
+ if (!sUpdateManager || !sPendingUpdate || !sPendingUpdate->TargetFullRelease)
+ {
+ LL_WARNS("Velopack") << "Cannot apply update: no pending update or manager" << LL_ENDL;
+ return;
+ }
+
+ LL_INFOS("Velopack") << "Applying pending update (restart=" << restart << ")" << LL_ENDL;
+ vpkc_wait_exit_then_apply_updates(sUpdateManager,
+ sPendingUpdate->TargetFullRelease,
+ false,
+ restart,
+ nullptr, 0);
+}
+
+void velopack_cleanup()
+{
+ if (sUpdateManager)
+ {
+ vpkc_free_update_manager(sUpdateManager);
+ sUpdateManager = nullptr;
+ }
+ if (sUpdateSource)
+ {
+ vpkc_free_source(sUpdateSource);
+ sUpdateSource = nullptr;
+ }
+ if (sPendingUpdate)
+ {
+ vpkc_free_update_info(sPendingUpdate);
+ sPendingUpdate = nullptr;
+ }
+ if (sPendingCheckInfo)
+ {
+ vpkc_free_update_info(sPendingCheckInfo);
+ sPendingCheckInfo = nullptr;
+ }
+ sAssetUrlMap.clear();
+}
+
+void velopack_set_update_url(const std::string& url)
+{
+ sUpdateUrl = url;
+ LL_INFOS("Velopack") << "Update URL set to: " << url << LL_ENDL;
+}
+
+void velopack_set_progress_callback(std::function<void(int)> callback)
+{
+ sProgressCallback = callback;
+}
+
+#endif // LL_VELOPACK
diff --git a/indra/newview/llvelopack.h b/indra/newview/llvelopack.h
new file mode 100644
index 0000000000..d04d0db7dc
--- /dev/null
+++ b/indra/newview/llvelopack.h
@@ -0,0 +1,59 @@
+/**
+ * @file llvelopack.h
+ * @brief Velopack installer and update framework integration
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLVELOPACK_H
+#define LL_LLVELOPACK_H
+
+#if LL_VELOPACK
+
+#include <string>
+#include <functional>
+
+bool velopack_initialize();
+void velopack_check_for_updates(const std::string& required_version, const std::string& relnotes_url);
+std::string velopack_get_current_version();
+bool velopack_is_update_pending();
+bool velopack_is_required_update_in_progress();
+std::string velopack_get_required_update_version();
+bool velopack_should_restart_after_update();
+void velopack_request_restart_after_update();
+void velopack_apply_pending_update(bool restart = true);
+void velopack_set_update_url(const std::string& url);
+void velopack_set_progress_callback(std::function<void(int)> callback);
+void velopack_cleanup();
+
+#if LL_WINDOWS
+void clear_nsis_links();
+bool get_nsis_version(
+ int& nsis_major,
+ int& nsis_minor,
+ int& nsis_patch,
+ uint64_t& nsis_build);
+#endif
+
+#endif // LL_VELOPACK
+#endif
+// EOF
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index b7ea95c694..eb0ec14259 100644
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -54,7 +54,7 @@ LLVersionInfo::LLVersionInfo():
mWorkingChannelName(LL_TO_STRING(LL_VIEWER_CHANNEL)),
build_configuration(LLBUILD_CONFIG), // set in indra/cmake/BuildVersion.cmake
// instantiate an LLEventMailDrop with canonical name to listen for news
- // from SLVersionChecker
+ // from the Viewer Version Manager
mPump{new LLEventMailDrop("relnotes")},
// immediately listen on mPump, store arriving URL into mReleaseNotes
mStore{new LLStoreListener<std::string>(*mPump, mReleaseNotes)}
diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h
index 237b37a084..a2b93597e6 100644
--- a/indra/newview/llversioninfo.h
+++ b/indra/newview/llversioninfo.h
@@ -112,8 +112,8 @@ private:
std::string mReleaseNotes;
// Store unique_ptrs to the next couple things so we don't have to explain
// to every consumer of this header file all the details of each.
- // mPump is the LLEventMailDrop on which we listen for SLVersionChecker to
- // post the release-notes URL from the Viewer Version Manager.
+ // mPump is the LLEventMailDrop on which we listen for the
+ // release-notes URL from the Viewer Version Manager.
std::unique_ptr<LLEventMailDrop> mPump;
// mStore is an adapter that stores the release-notes URL in mReleaseNotes.
std::unique_ptr<LLStoreListener<std::string>> mStore;
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index de395da285..297d0a70ff 100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -182,7 +182,7 @@ public:
LLViewerAssetStats(const LLViewerAssetStats &);
// Default destructor is correct.
- LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined
+ LLViewerAssetStats& operator=(const LLViewerAssetStats&) = delete;
// Clear all metrics data. This leaves the currently-active region
// in place but with zero'd data for all metrics. All other regions
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 255cfc998a..fd462fb225 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -42,6 +42,7 @@
#include "llcoproceduremanager.h"
#include "lleventcoro.h"
#include "llsdutil.h"
+#include "llstartup.h"
#include "llworld.h"
///----------------------------------------------------------------------------
@@ -68,7 +69,7 @@ public:
{
}
- LLViewerAssetRequest & operator=(const LLViewerAssetRequest &); // Not defined
+ LLViewerAssetRequest& operator=(const LLViewerAssetRequest&) = delete;
// Default assignment operator valid
// virtual
@@ -460,28 +461,78 @@ void LLViewerAssetStorage::assetRequestCoro(
if (!gAgent.getRegion())
{
- LL_WARNS_ONCE("ViewerAsset") << "Asset request fails: no region set" << LL_ENDL;
- result_code = LL_ERR_ASSET_REQUEST_FAILED;
- ext_status = LLExtStat::NONE;
- removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0);
- return;
+ if (STATE_WORLD_INIT <= LLStartUp::getStartupState())
+ {
+ // Viewer isn't ready, wait for region to become available
+ LL_INFOS_ONCE("ViewerAsset") << "Waiting for agent region to be set" << LL_ENDL;
+
+ LLEventStream region_init("waitForRegion", true);
+ std::string pump_name = region_init.getName();
+
+ boost::signals2::connection region_conn =
+ gAgent.addRegionChangedCallback([pump_name]()
+ {
+ LLEventPumps::instance().obtain(pump_name).post(LLSD());
+ });
+ F32Seconds timeout_seconds(LL_ASSET_STORAGE_TIMEOUT);
+ llcoro::suspendUntilEventOnWithTimeout(region_init, timeout_seconds, LLSDMap("timeout", LLSD::Boolean(true)));
+ gAgent.removeRegionChangedCallback(region_conn);
+ region_conn.disconnect();
+
+ if (LLApp::isExiting() || !gAssetStorage)
+ {
+ return;
+ }
+
+ // recheck region whether suspend ended on timeout or not
+ if (!gAgent.getRegion())
+ {
+ LL_WARNS_ONCE("ViewerAsset") << "Asset request fails: timeout reached while waiting for region" << LL_ENDL;
+ result_code = LL_ERR_NO_CAP;
+ ext_status = LLExtStat::NONE;
+ removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0);
+ return;
+ }
+ }
+ else
+ {
+ LL_WARNS_ONCE("ViewerAsset") << "Asset request fails: no region set" << LL_ENDL;
+ result_code = LL_ERR_NO_CAP;
+ ext_status = LLExtStat::NONE;
+ removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0);
+ return;
+ }
}
- else if (!gAgent.getRegion()->capabilitiesReceived())
+
+ if (!gAgent.getRegion()->capabilitiesReceived())
{
LL_WARNS_ONCE("ViewerAsset") << "Waiting for capabilities" << LL_ENDL;
LLEventStream capsRecv("waitForCaps", true);
- gAgent.getRegion()->setCapabilitiesReceivedCallback(
- boost::bind(&LLViewerAssetStorage::capsRecvForRegion, this, _1, capsRecv.getName()));
+ boost::signals2::connection caps_conn =
+ gAgent.getRegion()->setCapabilitiesReceivedCallback(
+ boost::bind(&LLViewerAssetStorage::capsRecvForRegion, this, _1, capsRecv.getName()));
- llcoro::suspendUntilEventOn(capsRecv);
+ F32Seconds timeout_seconds(LL_ASSET_STORAGE_TIMEOUT); // from minutes to seconds, by default 5 minutes
+ LLSD result = llcoro::suspendUntilEventOnWithTimeout(capsRecv, timeout_seconds, LLSDMap("timeout", LLSD::Boolean(true)));
+ caps_conn.disconnect();
if (LLApp::isExiting() || !gAssetStorage)
{
return;
}
+ if (result.has("timeout"))
+ {
+ // Caps failed to arrive in 5 minutes
+ LL_WARNS_ONCE("ViewerAsset") << "Asset " << uuid << " request fails : capabilities took too long to arrive" << LL_ENDL;
+ result_code = LL_ERR_NO_CAP;
+ ext_status = LLExtStat::NONE;
+ removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0);
+ return;
+ }
+
LL_WARNS_ONCE("ViewerAsset") << "capsRecv got event" << LL_ENDL;
LL_WARNS_ONCE("ViewerAsset") << "region " << gAgent.getRegion() << " mViewerAssetUrl " << mViewerAssetUrl << LL_ENDL;
}
@@ -492,7 +543,7 @@ void LLViewerAssetStorage::assetRequestCoro(
if (mViewerAssetUrl.empty())
{
LL_WARNS_ONCE("ViewerAsset") << "asset request fails: caps received but no viewer asset cap found" << LL_ENDL;
- result_code = LL_ERR_ASSET_REQUEST_FAILED;
+ result_code = LL_ERR_NO_CAP;
ext_status = LLExtStat::NONE;
removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0);
return;
@@ -502,9 +553,9 @@ void LLViewerAssetStorage::assetRequestCoro(
LLCore::HttpRequest::policy_t httpPolicy(LLAppCoreHttp::AP_TEXTURE);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("assetRequestCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("assetRequestCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts);
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 7d5386110d..65a69acc88 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -300,17 +300,19 @@ void LLResourceUploadInfo::assignDefaults()
{
mDescription = "(No Description)";
}
-
- if (mAssetType == LLAssetType::AT_GLTF ||
- mAssetType == LLAssetType::AT_GLTF_BIN)
+ if (mFolderId.isNull()) // don't overwrite if destination is already specified
{
- mFolderId = LLUUID::null;
- }
- else
- {
- mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
- (mDestinationFolderType == LLFolderType::FT_NONE) ?
- (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ if (mAssetType == LLAssetType::AT_GLTF ||
+ mAssetType == LLAssetType::AT_GLTF_BIN)
+ {
+ mFolderId = LLUUID::null;
+ }
+ else
+ {
+ mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
+ (mDestinationFolderType == LLFolderType::FT_NONE) ?
+ (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ }
}
}
@@ -862,8 +864,8 @@ LLUUID LLViewerAssetUpload::EnqueueInventoryUpload(const std::string &url, const
void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter,
const LLUUID &id, std::string url, LLResourceUploadInfo::ptr_t uploadInfo)
{
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOptions = std::make_shared<LLCore::HttpOptions>();
httpOptions->setTimeout(LL_ASSET_UPLOAD_TIMEOUT_SEC);
LLSD result = uploadInfo->prepareUpload();
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index c15fa52aa4..1c6a7a3e79 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -872,6 +872,7 @@ void settings_setup_listeners()
setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged);
+ setting_setup_signal_listener(gSavedSettings, "RenderAvatarCloth", handleSetShaderChanged);
setting_setup_signal_listener(gSavedSettings, "ChatFontSize", handleChatFontSizeChanged);
setting_setup_signal_listener(gSavedSettings, "ConsoleMaxLines", handleConsoleMaxLinesChanged);
setting_setup_signal_listener(gSavedSettings, "UploadBakedTexOld", handleUploadBakedTexOldChanged);
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index 243d4dec0e..c174c495ec 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -104,9 +104,9 @@ void LLViewerDisplayName::setDisplayNameCoro(const std::string& cap_url, const L
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("SetDisplayNameCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("SetDisplayNameCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
// People API can return localized error messages. Indicate our
// language preference via header.
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index b65ad3b3ec..fca15d2e79 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -67,6 +67,7 @@
#include "llfloatercreatelandmark.h"
#include "llfloaterdeleteprefpreset.h"
#include "llfloaterdestinations.h"
+#include "llfloaterdirectory.h"
#include "llfloaterdisplayname.h"
#include "llfloatereditextdaycycle.h"
#include "llfloateremojipicker.h"
@@ -182,8 +183,6 @@
#include "llsyswellwindow.h"
#include "rlvfloaters.h"
-#include "fsfloatersearch.h"
-
// *NOTE: Please add files in alphabetical order to keep merges easy.
// handle secondlife:///app/openfloater/{NAME} URLs
@@ -235,7 +234,8 @@ public:
"upload_model",
"upload_script",
"upload_sound",
- "bulk_upload"
+ "bulk_upload",
+ "legacy_search"
};
return std::find(blacklist_clicked.begin(), blacklist_clicked.end(), fl_name) == blacklist_clicked.end();
}
@@ -287,7 +287,8 @@ public:
"upload_script",
"upload_sound",
"bulk_upload",
- "slapp_test"
+ "slapp_test",
+ "legacy_search"
};
return std::find(blacklist_untrusted.begin(), blacklist_untrusted.end(), fl_name) == blacklist_untrusted.end();
}
@@ -511,8 +512,8 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
LLFloaterReg::add("simple_snapshot", "floater_simple_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSimpleSnapshot>);
- LLFloaterReg::add("search", "floater_fs_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterSearch>);
- //LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
+ LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
+ LLFloaterReg::add("legacy_search", "floater_directory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDirectory>);
LLFloaterReg::add("profile", "floater_profile.xml",(LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterProfile>);
LLFloaterReg::add("guidebook", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>);
LLFloaterReg::add("slapp_test", "floater_test_slapp.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSLappTest>);
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index ffcbd1b4d8..3c79f0b21c 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -48,9 +48,6 @@
#include "llinitparam.h"
#include "llselectmgr.h"
-#include "llfloaterwebcontent.h"
-#include "fsfloatersearch.h"
-
//
// Constants
//
@@ -66,13 +63,13 @@ const LLKeyData agent_control_lbutton(CLICK_LEFT, KEY_NONE, MASK_NONE, true);
struct LLKeybindFunctionData
{
- LLKeybindFunctionData(boost::function<bool(EKeystate keystate)> function, bool global)
+ LLKeybindFunctionData(std::function<bool(EKeystate keystate)> function, bool global)
:
mFunction(function),
mIsGlobal(global)
{
}
- boost::function<bool(EKeystate keystate)> mFunction;
+ std::function<bool(EKeystate keystate)> mFunction;
// todo: might be good idea to make this into enum, like: global/inworld/menu
bool mIsGlobal;
};
@@ -651,12 +648,6 @@ bool start_chat( EKeystate s )
bool start_gesture( EKeystate s )
{
- LLFloater* focused_floater = gFloaterView->getFocusedFloater();
- if (focused_floater && (dynamic_cast<LLFloaterWebContent*>(focused_floater) || dynamic_cast<FSFloaterSearch*>(focused_floater)))
- {
- return true;
- }
-
LLUICtrl* focus_ctrlp = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (KEYSTATE_UP == s &&
! (focus_ctrlp && focus_ctrlp->acceptsTextInput()))
@@ -1174,8 +1165,8 @@ bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask,
bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
{
size_t index;
- typedef boost::function<bool(EKeystate)> function_t;
- function_t function = NULL;
+ typedef std::function<bool(EKeystate)> function_t;
+ function_t function = nullptr;
std::string name;
// Allow remapping of F2-F12
@@ -1264,8 +1255,8 @@ bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons
bool LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name)
{
size_t index;
- typedef boost::function<bool(EKeystate)> function_t;
- function_t function = NULL;
+ typedef std::function<bool(EKeystate)> function_t;
+ function_t function = nullptr;
if (mouse == CLICK_LEFT
&& mask == MASK_NONE
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index 50b2c4ab9f..80ba99e201 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -38,7 +38,7 @@ class LLWindow;
class LLNamedFunction
{
public:
- LLNamedFunction() : mFunction(NULL) { };
+ LLNamedFunction() : mFunction(nullptr) { };
~LLNamedFunction() { };
std::string mName;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index ec5381ddfc..efa3f5cd1e 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -491,7 +491,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const
body["items"][0]["owner_id"] = mPermissions.getOwner();
body["items"][0]["item_id"] = mUUID;
- LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body));
+ LLCore::HttpHandler::ptr_t handler = std::make_shared<LLInventoryModel::FetchItemHttpHandler>(body);
gInventory.requestPost(true, url, body, handler, "Inventory Item");
}
}
@@ -1712,7 +1712,7 @@ void create_new_item(const std::string& name,
LLAssetType::EType asset_type,
LLInventoryType::EType inv_type,
U32 next_owner_perm,
- std::function<void(const LLUUID&)> created_cb = NULL)
+ std::function<void(const LLUUID&)> created_cb = nullptr)
{
std::string desc;
LLViewerAssetType::generateDescriptionFor(asset_type, desc);
@@ -1836,7 +1836,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L
parent_id = gInventory.getRootFolderID();
}
- std::function<void(const LLUUID&)> callback_cat_created = NULL;
+ std::function<void(const LLUUID&)> callback_cat_created = nullptr;
if (panel)
{
LLHandle<LLPanel> handle = panel->getHandle();
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 0dfbf0cced..a42bdaa2b0 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -284,9 +284,9 @@ private:
LLUUID mTargetLandmarkId;
};
-typedef boost::function<void(const LLUUID&)> inventory_func_type;
-typedef boost::function<void(const LLSD&)> llsd_func_type;
-typedef boost::function<void()> nullary_func_type;
+typedef std::function<void(const LLUUID&)> inventory_func_type;
+typedef std::function<void(const LLSD&)> llsd_func_type;
+typedef std::function<void()> nullary_func_type;
void no_op_inventory_func(const LLUUID&); // A do-nothing inventory_func
void no_op_llsd_func(const LLSD&); // likewise for LLSD
@@ -470,7 +470,7 @@ void menu_create_inventory_item(LLInventoryPanel* root,
const LLSD& userdata,
const LLUUID& default_parent_uuid = LLUUID::null);
-void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = NULL);
+void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null, std::function<void(const LLUUID&)> folder_created_cb = nullptr);
void slam_inventory_folder(const LLUUID& folder_id,
const LLSD& contents,
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index 8edb21956f..c4d87d7e16 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -36,7 +36,6 @@
#include "lltoolmgr.h"
#include "llselectmgr.h"
#include "llviewermenu.h"
-#include "llviewerwindow.h"
#include "llwindow.h"
#include "llagent.h"
#include "llagentcamera.h"
@@ -1161,7 +1160,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
void LLViewerJoystick::moveFlycam(bool reset)
{
static LLQuaternion sFlycamRotation;
- static LLVector3 sFlycamPosition;
+ static LLVector3d sFlycamPosition;
static F32 sFlycamZoom;
if (!gFocusMgr.getAppHasFocus() || mDriverState != JDS_INITIALIZED
@@ -1184,7 +1183,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
bool in_build_mode = LLToolMgr::getInstance()->inBuildMode();
if (reset || mResetFlag)
{
- sFlycamPosition = LLViewerCamera::getInstance()->getOrigin();
+ sFlycamPosition = gAgentCamera.getCameraPositionGlobal();
sFlycamRotation = LLViewerCamera::getInstance()->getQuaternion();
sFlycamZoom = LLViewerCamera::getInstance()->getView();
@@ -1287,7 +1286,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
}
}
- sFlycamPosition += LLVector3(sDelta) * sFlycamRotation;
+ sFlycamPosition += LLVector3d(sDelta[VX], sDelta[VY], sDelta[VZ]) * sFlycamRotation;
LLMatrix3 rot_mat(sDelta[3], sDelta[4], sDelta[5]);
sFlycamRotation = LLQuaternion(rot_mat)*sFlycamRotation;
@@ -1322,7 +1321,8 @@ void LLViewerJoystick::moveFlycam(bool reset)
LLMatrix3 mat(sFlycamRotation);
LLViewerCamera::getInstance()->setView(sFlycamZoom);
- LLViewerCamera::getInstance()->setOrigin(sFlycamPosition);
+ LLVector3 new_camera_pos = gAgent.getPosAgentFromGlobal(sFlycamPosition);
+ LLViewerCamera::getInstance()->setOrigin(new_camera_pos);
LLViewerCamera::getInstance()->mXAxis = LLVector3(mat.mMatrix[0]);
LLViewerCamera::getInstance()->mYAxis = LLVector3(mat.mMatrix[1]);
LLViewerCamera::getInstance()->mZAxis = LLVector3(mat.mMatrix[2]);
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 77ec31fd9d..330aa7c368 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1223,7 +1223,7 @@ bool LLViewerMedia::parseRawCookie(const std::string raw_cookie, std::string& na
/////////////////////////////////////////////////////////////////////////////////////////
LLCore::HttpHeaders::ptr_t LLViewerMedia::getHttpHeaders()
{
- LLCore::HttpHeaders::ptr_t headers(new LLCore::HttpHeaders);
+ LLCore::HttpHeaders::ptr_t headers = std::make_shared<LLCore::HttpHeaders>();
headers->append(HTTP_OUT_HEADER_ACCEPT, "*/*");
headers->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_XML);
@@ -1299,10 +1299,10 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getOpenIDCookieCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("getOpenIDCookieCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpOpts->setFollowRedirects(true);
httpOpts->setWantHeaders(true);
@@ -1441,10 +1441,10 @@ void LLViewerMedia::openIDSetupCoro(std::string openidUrl, std::string openidTok
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("openIDSetupCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("openIDSetupCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpOpts->setWantHeaders(true);
@@ -2732,10 +2732,10 @@ void LLViewerMediaImpl::mimeDiscoveryCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("mimeDiscoveryCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("mimeDiscoveryCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
// Increment our refcount so that we do not go away while the coroutine is active.
this->ref();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 374a2ae075..5ea64a7824 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -77,7 +77,6 @@
#include "llfloaterpay.h"
#include "llfloaterreporter.h"
#include "llfloatersearch.h"
-#include "fsfloatersearch.h"
#include "llfloaterscriptdebug.h"
#include "llfloatersnapshot.h"
#include "llfloatertools.h"
@@ -6730,11 +6729,8 @@ class LLAvatarEnableResetSkeleton : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()))
- {
- return true;
- }
- return false;
+ LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+ return obj && obj->getAvatar();
}
};
@@ -8833,6 +8829,12 @@ LLVOAvatar* find_avatar_from_object(LLViewerObject* object)
}
else if( !object->isAvatar() )
{
+ // Check for animesh objects (animated objects with a control avatar)
+ LLVOAvatar* avatar = object->getAvatar();
+ if (avatar)
+ {
+ return avatar;
+ }
object = NULL;
}
}
@@ -9117,6 +9119,17 @@ class LLViewHighlightTransparent : public view_listener_t
}
};
+class LLViewHighlightTransparentProbe : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ gSavedSettings.setBOOL("RenderReflectionProbeShowTransparent", !gSavedSettings.getBOOL("RenderReflectionProbeShowTransparent"));
+ // invisible objects skip building their render batches unless sShowDebugAlpha is true, so rebuild batches whenever toggling this flag
+ gPipeline.rebuildDrawInfo();
+ return true;
+ }
+};
+
class LLViewCheckHighlightTransparent : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -9860,6 +9873,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter");
view_listener_t::addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips");
view_listener_t::addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent");
+ view_listener_t::addMenu(new LLViewHighlightTransparentProbe(), "View.HighlightTransparentProbe");
view_listener_t::addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType");
view_listener_t::addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments");
view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 801ff3c212..772abb0373 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -530,7 +530,7 @@ void upload_single_file(
return;
}
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID& dest)
{
for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
{
@@ -642,7 +642,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE);
fmt_file.write(formatted->getData(), formatted->getDataSize());
- LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>(
tid, LLAssetType::AT_TEXTURE,
asset_name,
asset_name, 0,
@@ -650,15 +650,16 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
- LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight())
- ));
+ LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight()),
+ dest
+ );
upload_new_resource(assetUploadInfo);
}
}
else
{
- LLNewFileResourceUploadInfo* info_p = new LLNewFileResourceUploadInfo(
+ LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLNewFileResourceUploadInfo>(
filename,
asset_name,
asset_name, 0,
@@ -666,8 +667,8 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost);
- LLResourceUploadInfo::ptr_t uploadInfo(info_p);
+ expected_upload_cost,
+ dest);
upload_new_resource(uploadInfo);
}
@@ -687,14 +688,14 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
// Todo:
// 1. Decouple bulk upload from material editor
// 2. Take into account possiblity of identical textures
- LLMaterialEditor::uploadMaterialFromModel(filename, model, i);
+ LLMaterialEditor::uploadMaterialFromModel(filename, model, i, dest);
}
}
}
}
}
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response, const LLUUID& dest)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
@@ -703,7 +704,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLS
return;
}
- do_bulk_upload(filenames, allow_2k);
+ do_bulk_upload(filenames, allow_2k, dest);
}
bool get_bulk_upload_expected_cost(
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 8f7df48a2e..e40dd84bc9 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -72,7 +72,7 @@ bool get_bulk_upload_expected_cost(
S32& bvh_count,
S32& textures_2k_count);
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k);
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID &dest_folder);
void upload_single_file(
const std::vector<std::string>& filenames,
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index c54feba06b..494a11d94f 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -164,8 +164,8 @@ void accept_friendship_coro(std::string url, LLSD notification)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("friendshipResponceErrorProcessing", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
if (url.empty())
{
LL_WARNS("Friendship") << "Empty capability!" << LL_ENDL;
@@ -214,8 +214,8 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option)
}
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("friendshipResponceErrorProcessing", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD payload = notification["payload"];
url += "?from=" + payload["from_id"].asString();
@@ -572,8 +572,8 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("responseGroupInvitation", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("responseGroupInvitation", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD payload;
payload["group"] = group_id;
@@ -1560,6 +1560,7 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol
if (mTransactionID.isNull())
{
// Not provided, message won't work
+ LL_WARNS("Messaging") << "Missing transaction id, response for " << mIM << " won't work" << LL_ENDL;
return;
}
@@ -1602,6 +1603,8 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol
msg->addU8Fast(_PREHASH_Dialog, (U8)(im + 1));
msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(destination_folder_id.mData),
sizeof(destination_folder_id.mData));
+
+ LL_DEBUGS("Messaging") << "Processing" << (U8)(im + 1) << " with transaction id " << mTransactionID << LL_ENDL;
}
else
{
@@ -2016,7 +2019,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
if (notification_ptr)
{
- LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm()));
+ LLNotificationFormPtr modified_form = std::make_shared<LLNotificationForm>(*notification_ptr->getForm());
modified_form->setElementEnabled("Teleport", false);
modified_form->setElementEnabled("Cancel", false);
notification_ptr->updateForm(modified_form);
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 52f383faa9..00743909f0 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -36,9 +36,10 @@
#include "llnotifications.h"
#include "llextendedstatus.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
//
// Forward declarations
//
@@ -216,7 +217,7 @@ class LLViewerMessage : public LLSingleton<LLViewerMessage>
{
LLSINGLETON_EMPTY_CTOR(LLViewerMessage);
public:
- typedef boost::function<void()> teleport_started_callback_t;
+ typedef std::function<void()> teleport_started_callback_t;
typedef boost::signals2::signal<void()> teleport_started_signal_t;
boost::signals2::connection setTeleportStartedCallback(teleport_started_callback_t cb);
@@ -264,7 +265,7 @@ private:
std::string getSanitizedDescription();
void sendReceiveResponse(bool accept, const LLUUID &destination_folder_id);
- typedef boost::function<bool (const LLSD&, const LLSD&)> respond_function_t;
+ typedef std::function<bool (const LLSD&, const LLSD&)> respond_function_t;
typedef std::map<std::string, respond_function_t> respond_function_map_t;
respond_function_map_t mRespondFunctions;
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index da2ca0aca4..6cb3aee20c 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -69,7 +69,7 @@ const std::string MAIN_GRID_LOGIN_URI = "https://login.agni.lindenlab.com/cgi-bi
const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update";
-const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
+const std::string MAIN_GRID_SLURL_BASE = "https://maps.secondlife.com/secondlife/";
const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app";
const std::string MAIN_GRID_WEB_PROFILE_URL = "https://my.secondlife.com/";
@@ -281,7 +281,7 @@ bool LLGridManager::addGrid(LLSD& grid_data)
// Populate to the default values
if (!grid_data.has(GRID_LOGIN_PAGE_VALUE))
{
- grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("http://") + grid + "/app/login/";
+ grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("https://") + grid + "/app/login/";
}
if (!grid_data.has(GRID_HELPER_URI_VALUE))
{
@@ -575,6 +575,7 @@ std::string LLGridManager::getGridLoginID()
std::string LLGridManager::getUpdateServiceURL()
{
+ auto env_update_service = LLStringUtil::getoptenv("SL_UPDATE_SERVICE");
std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");;
if ( !update_url_base.empty() )
{
@@ -582,6 +583,13 @@ std::string LLGridManager::getUpdateServiceURL()
<< "Update URL base overridden from command line: " << update_url_base
<< LL_ENDL;
}
+ else if (env_update_service && env_update_service->find("http") != std::string::npos)
+ {
+ update_url_base = *env_update_service;
+ LL_INFOS("UpdaterService", "GridManager")
+ << "Update URL base overridden from SL_UPDATE_SERVICE environment variable: " << update_url_base
+ << LL_ENDL;
+ }
else if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) )
{
update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString();
@@ -629,18 +637,6 @@ bool LLGridManager::isInProductionGrid()
return mIsInProductionGrid;
}
-bool LLGridManager::isInSecondlife()
-{
- //return (isInSLMain() || isInSLBeta());
- return true;
-}
-
-bool LLGridManager::isInOpenSim()
-{
- // FIX THIS TO SUPPORT OPENSIM
- return false;
-}
-
bool LLGridManager::isSystemGrid(const std::string& grid)
{
std::string grid_name = getGrid(grid);
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 7d9c70994c..2ed663e038 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -174,20 +174,6 @@ class LLGridManager : public LLSingleton<LLGridManager>
//@}
- typedef enum e_grid_platform {
- NOPLATFORM = 0,
- SLMAIN,
- SLBETA,
- OPENSIM,
- HALCYON
- } EGridPlatform;
-
- typedef enum e_add_grid {
- ADD_MANUAL = 0,
- ADD_HYPERGRID,
- ADD_LINK
- } EAddGridType;
-
/* ================================================================
* @name Selecting the current grid
* @{
@@ -212,11 +198,6 @@ class LLGridManager : public LLSingleton<LLGridManager>
/// Is the selected grid one of the hard-coded default grids (Agni or Aditi)
bool isSystemGrid() { return isSystemGrid(mGrid); }
- /// Is the selected grid Second Life?
- bool isInSecondlife();
-
- bool isInOpenSim();
-
/// Is the selected grid a production grid?
bool isInProductionGrid();
/**
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index c13e541da0..f7b1fb004f 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2989,8 +2989,8 @@ void LLViewerObject::fetchInventoryFromCapCoro(const LLUUID task_inv)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TaskInventoryRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("TaskInventoryRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
std::string url = obj->mRegionp->getCapability("RequestTaskInventory") + "?task_id=" + obj->mID.asString();
// If we already have a copy of the inventory then add it so the server won't re-send something we already have.
// We expect this case to crop up in the case of failed inventory mutations, but it might happen otherwise as well.
@@ -7236,7 +7236,7 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender
void LLStaticViewerObject::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
- if (mDrawable.notNull())
+ if (mDrawable.notNull() && mDrawable->getVObj())
{
mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 0a6197a67a..e41f5bc206 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1055,8 +1055,8 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchObjectCostsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
@@ -1179,8 +1179,8 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("fetchPhisicsFlagsCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD idList;
U32 objectIndex = 0;
diff --git a/indra/newview/llviewerparcelaskplay.h b/indra/newview/llviewerparcelaskplay.h
index 720daa2e5d..563fb13011 100644
--- a/indra/newview/llviewerparcelaskplay.h
+++ b/indra/newview/llviewerparcelaskplay.h
@@ -38,7 +38,7 @@ class LLViewerParcelAskPlay : public LLSingleton<LLViewerParcelAskPlay>
void cleanupSingleton() override;
public:
// functor expects functor(region_id, parcel_id, url, play/stop)
- typedef boost::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback;
+ typedef std::function<void(const LLUUID&, const S32&, const std::string&, const bool&)> ask_callback;
void askToPlay(const LLUUID &region_id, const S32 &parcel_id, const std::string &url, ask_callback cb);
void cancelNotification();
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 1925cd23ed..8439283eb0 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -33,9 +33,10 @@
#include "llparcelselection.h"
#include "llui.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
class LLUUID;
class LLMessageSystem;
class LLParcel;
@@ -79,9 +80,9 @@ class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr>
~LLViewerParcelMgr();
public:
- typedef boost::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
+ typedef std::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
typedef boost::signals2::signal<void (const LLVector3d&, const bool&)> teleport_finished_signal_t;
- typedef boost::function<void()> teleport_failed_callback_t;
+ typedef std::function<void()> teleport_failed_callback_t;
typedef boost::signals2::signal<void()> teleport_failed_signal_t;
static void cleanupGlobals();
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index b556aef768..6dead0cf82 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -76,12 +76,12 @@ LLViewerPart::LLViewerPart() :
mPartID(0),
mLastUpdateTime(0.f),
mSkipOffset(0.f),
- mVPCallback(NULL),
- mImagep(NULL)
+ mVPCallback(nullptr),
+ mImagep(nullptr)
{
- mPartSourcep = NULL;
- mParent = NULL;
- mChild = NULL;
+ mPartSourcep = nullptr;
+ mParent = nullptr;
+ mChild = nullptr;
++LLViewerPartSim::sParticleCount2 ;
}
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 5700d8b278..f6ee00cb25 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -125,7 +125,6 @@
#include "llpanel.h"
#include "llfloater.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
#include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp>
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index a085bc4d91..cd70f8f9b9 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -252,8 +252,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("BaseCapabilitiesRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
LLViewerRegion *regionp = NULL;
@@ -406,8 +406,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("BaseCapabilitiesRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result;
LLViewerRegion *regionp = NULL;
@@ -540,8 +540,8 @@ void LLViewerRegionImpl::requestSimulatorFeatureCoro(std::string url, U64 region
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("requestSimulatorFeatureCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLViewerRegion *regionp = NULL;
S32 attemptNumber = 0;
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index ca994c6b06..9c5a63e23a 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -296,10 +296,10 @@ public:
typedef LLCoreHttpUtil::HttpCoroutineAdapter::completionCallback_t httpCallback_t;
bool requestPostCapability(const std::string &capName,
LLSD &postData,
- httpCallback_t cbSuccess = NULL,
- httpCallback_t cbFailure = NULL);
- bool requestGetCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
- bool requestDelCapability(const std::string &capName, httpCallback_t cbSuccess = NULL, httpCallback_t cbFailure = NULL);
+ httpCallback_t cbSuccess = nullptr,
+ httpCallback_t cbFailure = nullptr);
+ bool requestGetCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
+ bool requestDelCapability(const std::string& capName, httpCallback_t cbSuccess = nullptr, httpCallback_t cbFailure = nullptr);
/// implements LLCapabilityProvider
/*virtual*/ const LLHost& getHost() const;
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 23387d8613..eea0b37c43 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -37,7 +37,6 @@
#include "llrender.h"
#include "llenvironment.h"
#include "llerrorcontrol.h"
-#include "llatmosphere.h"
#include "llworld.h"
#include "llsky.h"
@@ -588,6 +587,7 @@ void LLViewerShaderMgr::setShaders()
unloadShaders();
LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow");
+ LLPipeline::RenderAvatarCloth = gSavedSettings.getBOOL("RenderAvatarCloth");
if (gViewerWindow)
{
@@ -2414,7 +2414,9 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarProgram.mShaderFiles.push_back(make_pair("deferred/avatarF.glsl", GL_FRAGMENT_SHADER));
gDeferredAvatarProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
+ gDeferredAvatarProgram.clearPermutations();
add_common_permutations(&gDeferredAvatarProgram);
+ gDeferredAvatarProgram.addPermutation("AVATAR_CLOTH", LLPipeline::RenderAvatarCloth ? "1" : "0");
success = gDeferredAvatarProgram.createShader();
llassert(success);
@@ -3634,7 +3636,7 @@ bool LLViewerShaderMgr::loadShadersInterface()
std::string LLViewerShaderMgr::getShaderDirPrefix(void)
{
- return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders/class");
+ return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "shaders", "class");
}
void LLViewerShaderMgr::updateShaderUniforms(LLGLSLShader * shader)
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 59bb78f8f4..3b2f68bb3b 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -783,7 +783,11 @@ void send_viewer_stats(bool include_preferences)
fail["failed_resends"] = (S32) gMessageSystem->mFailedResendPackets;
fail["off_circuit"] = (S32) gMessageSystem->mOffCircuitPackets;
fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets;
- fail["missing_updater"] = (S32) LLAppViewer::instance()->isUpdaterMissing();
+#if LL_VELOPACK
+ fail["missing_updater"] = false;
+#else
+ fail["missing_updater"] = true;
+#endif
LLSD &inventory = body["inventory"];
inventory["usable"] = gInventory.isInventoryUsable();
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 5bbcd8f09f..6f62d13d51 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1121,7 +1121,6 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
imagep->postCreateTexture();
imagep->mCreatePending = false;
- mCreateTextureList.pop();
if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel() &&
(imagep->getDesiredDiscardLevel() <= MAX_DISCARD_LEVEL))
@@ -1133,6 +1132,8 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
imagep->scaleDown();
}
+ mCreateTextureList.pop();
+
if (create_timer.getElapsedTimeF32() > max_time)
{
break;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ef24bcf598..9788fc5f4d 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -86,6 +86,7 @@
#include "raytrace.h"
// newview includes
+#include "llaccordionctrl.h"
#include "llbox.h"
#include "llchicletbar.h"
#include "llconsole.h"
@@ -1883,8 +1884,9 @@ LLViewerWindow::LLViewerWindow(const Params& p)
// pass its value right now. Instead, pass it a nullary function that
// will, when we later need it, return the value of gKeyboard.
// boost::lambda::var() constructs such a functor on the fly.
- mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard)));
- mViewerWindowListener.reset(new LLViewerWindowListener(this));
+ LLWindowListener::KeyboardGetter getter = [](){ return gKeyboard; };
+ mWindowListener = std::make_unique<LLWindowListener>(this, getter);
+ mViewerWindowListener = std::make_unique<LLViewerWindowListener>(this);
mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything));
mCommunicationChannel.reset(new LLCommunicationChannel("Communication", "Visible"));
@@ -3429,6 +3431,8 @@ void LLViewerWindow::updateUI()
LLConsole::updateClass();
+ // execute postponed arrange calls
+ LLAccordionCtrl::updateClass();
// animate layout stacks so we have up to date rect for world view
LLLayoutStack::updateClass();
@@ -6136,7 +6140,7 @@ bool LLViewerWindow::getUIVisibility()
//
LLPickInfo::LLPickInfo()
: mKeyMask(MASK_NONE),
- mPickCallback(NULL),
+ mPickCallback(nullptr),
mPickType(PICK_INVALID),
mWantSurfaceInfo(false),
mObjectFace(-1),
@@ -6147,7 +6151,7 @@ LLPickInfo::LLPickInfo()
mNormal(),
mTangent(),
mBinormal(),
- mHUDIcon(NULL),
+ mHUDIcon(nullptr),
mPickTransparent(false),
mPickRigged(false),
mPickParticle(false)
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 61aa84394c..f3c7ef3289 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -48,9 +48,10 @@
#include "lltrace.h"
#include "llsnapshotmodel.h"
-#include <boost/function.hpp>
#include <boost/signals2.hpp>
+#include <functional>
+
class LLView;
class LLViewerObject;
class LLUUID;
@@ -238,7 +239,7 @@ public:
const std::map<std::string, std::string>& args);
// signal on update of WorldView rect
- typedef boost::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t;
+ typedef std::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t;
typedef boost::signals2::signal<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_signal_t;
world_rect_signal_t mOnWorldViewRectUpdated;
boost::signals2::connection setOnWorldViewRectUpdated(world_rect_callback_t cb) { return mOnWorldViewRectUpdated.connect(cb); }
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 910f711a9d..e2cafffb51 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3332,7 +3332,7 @@ void LLVOAvatar::idleUpdateLoadingEffect()
void LLVOAvatar::idleUpdateWindEffect()
{
// update wind effect
- if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) >= LLDrawPoolAvatar::SHADER_LEVEL_CLOTH))
+ if (LLPipeline::RenderAvatarCloth)
{
F32 hover_strength = 0.f;
F32 time_delta = mRippleTimer.getElapsedTimeF32() - mRippleTimeLast;
@@ -4454,10 +4454,10 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV );
- const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW = 60.0f;
- const F32 AVATAR_PELVIS_ROTATE_THRESHOLD_FAST = 2.0f;
+ static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow", 60.0);
+ static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast", 2.0);
- F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, AVATAR_PELVIS_ROTATE_THRESHOLD_SLOW, AVATAR_PELVIS_ROTATE_THRESHOLD_FAST);
+ F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, s_pelvis_rot_threshold_slow, s_pelvis_rot_threshold_fast);
if (self_in_mouselook)
{
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 653c7e82eb..e5c14a34a5 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2211,9 +2211,9 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("appearanceChangeMetrics", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("appearanceChangeMetrics", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
S32 currentSequence = mMetricSequence;
if (S32_MAX == ++mMetricSequence)
@@ -2735,7 +2735,7 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch)
// Dereferencing the previous callback will cause
// updateAppearanceFromCOF to be called, whenever all refs
// have resolved.
- gAgentAvatarp->mEndCustomizeCallback = NULL;
+ gAgentAvatarp->mEndCustomizeCallback = nullptr;
}
}
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index fdd39a0e30..86d08b8658 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -736,7 +736,7 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
void LLVOGrass::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
- if (mDrawable.notNull())
+ if (mDrawable.notNull() && mDrawable->getVObj())
{
mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index fbe896ac27..b941d356a1 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -610,8 +610,8 @@ void LLVoiceChannelGroup::voiceCallCapCoro(std::string url)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceCallCapCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("voiceCallCapCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD postData;
postData["method"] = "call";
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index bf119638d3..18e1d60987 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -57,7 +57,7 @@ public:
typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction, bool ended_by_agent, const LLUUID& session_id)> state_changed_signal_t;
// on current channel changed signal
- typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
+ typedef std::function<void(const LLUUID& session_id)> channel_changed_callback_t;
typedef boost::signals2::signal<void(const LLUUID& session_id)> channel_changed_signal_t;
static channel_changed_signal_t sCurrentVoiceChannelChangedSignal;
static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front = false);
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 40de236c90..e08bc2dfc4 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1173,9 +1173,9 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceAccountProvision", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("voiceAccountProvision", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
int retryCount(0);
LLSD result;
@@ -1585,8 +1585,8 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("parcelVoiceInfoRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("parcelVoiceInfoRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, LLSD());
@@ -4629,7 +4629,7 @@ LLVivoxVoiceClient::participantStatePtr_t LLVivoxVoiceClient::sessionState::addP
if(!result)
{
// participant isn't already in one list or the other.
- result.reset(new participantState(useAlternateURI?mSIPURI:uri));
+ result = std::make_shared<participantState>(useAlternateURI?mSIPURI:uri);
mParticipantsByURI.insert(participantMap::value_type(result->mURI, result));
mParticipantsChanged = true;
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 447f1b652a..06ccd23670 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -699,6 +699,7 @@ void LLWebRTCVoiceClient::setCaptureDevice(const std::string& name)
{
if (mWebRTCDeviceInterface)
{
+ LL_DEBUGS("Voice") << "new capture device is " << name << LL_ENDL;
mWebRTCDeviceInterface->setCaptureDevice(name);
}
}
@@ -727,6 +728,9 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi
return;
}
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
+
+ LL_DEBUGS("Voice") << "Reiniting " << LL_ENDL;
+
std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice");
@@ -789,6 +793,7 @@ void LLWebRTCVoiceClient::setRenderDevice(const std::string& name)
{
if (mWebRTCDeviceInterface)
{
+ LL_DEBUGS("Voice") << "new render device is " << name << LL_ENDL;
mWebRTCDeviceInterface->setRenderDevice(name);
}
}
@@ -1304,7 +1309,7 @@ LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::ad
if (!result)
{
// participant isn't already in one list or the other.
- result.reset(new participantState(agent_id, region));
+ result = std::make_shared<participantState>(agent_id, region);
mParticipantsByUUID.insert(participantUUIDMap::value_type(agent_id, result));
result->mAvatarID = agent_id;
}
@@ -2168,7 +2173,7 @@ bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates()
// Only connect if the region supports WebRTC voice server type
if (isRegionWebRTCEnabled(neighbor))
{
- connectionPtr_t connection(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID));
+ connectionPtr_t connection = std::make_shared<LLVoiceWebRTCSpatialConnection>(neighbor, INVALID_PARCEL_ID, mChannelID);
mWebRTCConnections.push_back(connection);
connection->setMuteMic(mMuted); // mute will be set for primary connection when that connection comes up
@@ -2445,11 +2450,11 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection)
body["viewer_session"] = connection->mViewerSession;
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -2544,10 +2549,7 @@ void LLVoiceWebRTCConnection::OnRenegotiationNeeded()
LL::WorkQueue::postMaybe(mMainQueue,
[=, this] {
LL_DEBUGS("Voice") << "Voice channel requires renegotiation." << LL_ENDL;
- if (!mShutDown)
- {
- setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
- }
+ setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
mCurrentStatus = LLVoiceClientStatusObserver::ERROR_UNKNOWN;
});
}
@@ -2659,11 +2661,11 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connectio
body["viewer_session"] = connection->mViewerSession;
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::breakVoiceConnection",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::breakVoiceConnection",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
@@ -2728,11 +2730,11 @@ void LLVoiceWebRTCSpatialConnection::requestVoiceConnection()
}
body["channel_type"] = "local";
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts);
@@ -2893,9 +2895,10 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
// this connection.
// For spatial this connection will come up as muted, but will be set to the appropriate
// value later on when we determine the regions we connect to.
- if (!isSpatial())
+ if (isSpatial())
{
- mWebRTCAudioInterface->setMute(mMuted);
+ // we'll determine primary state later and set mute accordinly
+ mPrimary = false;
}
mWebRTCAudioInterface->setReceiveVolume(mSpeakerVolume);
LLWebRTCVoiceClient::getInstance()->OnConnectionEstablished(mChannelID, mRegionID);
@@ -2919,6 +2922,10 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
LLWebRTCVoiceClient::getInstance()->updatePosition();
LLWebRTCVoiceClient::getInstance()->sendPositionUpdate(true);
}
+ else
+ {
+ mWebRTCAudioInterface->setMute(mMuted);
+ }
}
break;
}
@@ -3338,11 +3345,11 @@ void LLVoiceWebRTCAdHocConnection::requestVoiceConnection()
body["channel_type"] = "multiagent";
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
- new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
- LLCore::HttpRequest::DEFAULT_POLICY_ID));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("LLVoiceWebRTCAdHocConnection::requestVoiceConnection",
+ LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
httpOpts->setWantHeaders(true);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4f828cc0ff..4c316fce07 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2693,10 +2693,10 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
if (mep && impl)
{
std::string url = mep->getCurrentURL();
- // Look for a ":", if not there, assume "http://"
+ // Look for a ":", if not there, assume "https://"
if (!url.empty() && std::string::npos == url.find(':'))
{
- url = "http://" + url;
+ url = "https://" + url;
}
// If the url we're trying to "bounce back" to is either empty or not
// allowed by the whitelist, try the home url. If *that* doesn't work,
@@ -2704,10 +2704,10 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
if (url.empty() || !mep->checkCandidateUrl(url))
{
url = mep->getHomeURL();
- // Look for a ":", if not there, assume "http://"
+ // Look for a ":", if not there, assume "https://"
if (!url.empty() && std::string::npos == url.find(':'))
{
- url = "http://" + url;
+ url = "https://" + url;
}
}
if (url.empty() || !mep->checkCandidateUrl(url))
@@ -5910,6 +5910,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
else
{
+ static LLCachedControl<bool> render_reflection_object(gSavedSettings, "RenderReflectionProbeShowTransparent", false);
F32 alpha;
if (is_pbr)
{
@@ -5924,7 +5925,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
drawablep->setState(LLDrawable::HAS_ALPHA);
add_face(sAlphaFaces, alpha_count, facep);
}
- else if (LLDrawPoolAlpha::sShowDebugAlpha ||
+ else if ((LLDrawPoolAlpha::sShowDebugAlpha && (render_reflection_object || !vobj->isReflectionProbe())) ||
(gPipeline.sRenderHighlight && !drawablep->getParent() &&
//only root objects are highlighted with red color in this case
drawablep->getVObj() && drawablep->getVObj()->flagScripted() &&
diff --git a/indra/newview/llvvmquery.cpp b/indra/newview/llvvmquery.cpp
new file mode 100644
index 0000000000..12dcc1d04d
--- /dev/null
+++ b/indra/newview/llvvmquery.cpp
@@ -0,0 +1,189 @@
+/**
+ * @file llvvmquery.cpp
+ * @brief Query the Viewer Version Manager (VVM) for update information
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llvvmquery.h"
+
+#include "llcorehttputil.h"
+#include "llcoros.h"
+#include "llevents.h"
+#include "llviewernetwork.h"
+#include "llversioninfo.h"
+#include "llviewercontrol.h"
+#include "llhasheduniqueid.h"
+#include "lluri.h"
+#include "llsys.h"
+
+#if LL_VELOPACK
+#include "llvelopack.h"
+#endif
+
+namespace
+{
+ std::string get_platform_string()
+ {
+#if LL_WINDOWS
+ return "win64";
+#elif LL_DARWIN
+ return "mac64";
+#elif LL_LINUX
+ return "lnx64";
+#else
+ return "unknown";
+#endif
+ }
+
+ std::string get_platform_version()
+ {
+ return LLOSInfo::instance().getOSVersionString();
+ }
+
+ std::string get_machine_id()
+ {
+ unsigned char id[MD5HEX_STR_SIZE];
+ if (llHashedUniqueID(id))
+ {
+ return std::string(reinterpret_cast<char*>(id));
+ }
+ return "unknown";
+ }
+
+ void query_vvm_coro()
+ {
+ // Get base URL from grid manager
+ std::string base_url = LLGridManager::getInstance()->getUpdateServiceURL();
+
+ // We use this for dev testing when working with VVM and working on the updater. Not advisable to uncomment it.
+ //std::string base_url = "https://update.qa.secondlife.io/update";
+
+ if (base_url.empty())
+ {
+ LL_WARNS("VVM") << "No update service URL configured" << LL_ENDL;
+ return;
+ }
+
+ // Gather parameters for VVM query
+ std::string channel = LLVersionInfo::instance().getChannel();
+
+ // We use this for dev testing when working with VVM and working on the updater. Not advisable to uncomment it.
+ // std::string channel = "QA Target for Velopack";
+
+ std::string version = LLVersionInfo::instance().getVersion();
+ std::string platform = get_platform_string();
+ std::string platform_version = get_platform_version();
+ std::string test_ok = gSavedSettings.getBOOL("UpdaterWillingToTest") ? "testok" : "testno";
+ std::string machine_id = get_machine_id();
+
+ // Build URL: {base}/v1.2/{channel}/{version}/{platform}/{platform_version}/{testok}/{uuid}
+ std::string url = base_url + "/v1.2/" +
+ LLURI::escape(channel) + "/" +
+ LLURI::escape(version) + "/" +
+ platform + "/" +
+ LLURI::escape(platform_version) + "/" +
+ test_ok + "/" +
+ machine_id;
+
+ LL_INFOS("VVM") << "Querying VVM: " << url << LL_ENDL;
+
+ // Make HTTP GET request
+ LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
+ LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter =
+ std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("VVMQuery", httpPolicy);
+ LLCore::HttpRequest::ptr_t request = std::make_shared<LLCore::HttpRequest>();
+
+ LLSD result = adapter->getAndSuspend(request, url);
+
+ // Check HTTP status
+ LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
+ LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
+
+ if (!status)
+ {
+ if (status.getType() == 404)
+ {
+ LL_INFOS("VVM") << "Unmanaged channel, no updates available" << LL_ENDL;
+ return;
+ }
+ LL_WARNS("VVM") << "VVM query failed: " << status.toString() << LL_ENDL;
+ return;
+ }
+
+ // Read whether this update is required or optional
+ bool update_required = result["required"].asBoolean();
+ std::string relnotes = result["more_info"].asString();
+
+ // Extract update URL for current platform
+ LLSD platforms = result["platforms"];
+ if (platforms.has(platform))
+ {
+ std::string update_url = platforms[platform]["url"].asString();
+#if LL_VELOPACK
+ std::string velopack_url = platforms[platform]["velopack_url"].asString();
+ U32 updater_service = gSavedSettings.getU32("UpdaterServiceSetting");
+ std::string required_version = update_required ? result["version"].asString() : "";
+ // Skip network check if no required version AND user only wants mandatory updates
+ if (!velopack_url.empty() && (update_required || updater_service != 0))
+ {
+ LL_INFOS("VVM") << "Velopack feed URL: " << velopack_url
+ << " required_version: " << required_version << LL_ENDL;
+ velopack_set_update_url(velopack_url);
+
+ LLCoros::instance().launch("VelopackUpdateCheck",
+ [required_version, relnotes]()
+ {
+ velopack_check_for_updates(required_version, relnotes);
+ });
+ }
+ else if (!velopack_url.empty())
+ {
+ LL_INFOS("VVM") << "Optional update skipped (UpdaterServiceSetting=0)" << LL_ENDL;
+ }
+ else
+#endif
+ if (!update_url.empty())
+ {
+ LL_INFOS("VVM") << "Update available at: " << update_url << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_INFOS("VVM") << "No update available for platform: " << platform << LL_ENDL;
+ }
+
+ // Post release notes URL to the relnotes event pump
+ if (!relnotes.empty())
+ {
+ LL_INFOS("VVM") << "Release notes URL: " << relnotes << LL_ENDL;
+ LLEventPumps::instance().obtain("relnotes").post(relnotes);
+ }
+ }
+}
+
+void initVVMUpdateCheck()
+{
+ LL_INFOS("VVM") << "Initializing VVM update check" << LL_ENDL;
+ LLCoros::instance().launch("VVMUpdateCheck", &query_vvm_coro);
+}
diff --git a/indra/newview/llvvmquery.h b/indra/newview/llvvmquery.h
new file mode 100644
index 0000000000..977d82af64
--- /dev/null
+++ b/indra/newview/llvvmquery.h
@@ -0,0 +1,42 @@
+/**
+ * @file llvvmquery.h
+ * @brief Query the Viewer Version Manager (VVM) for update information
+ *
+ * $LicenseInfo:firstyear=2025&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2025, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLVVMQUERY_H
+#define LL_LLVVMQUERY_H
+
+/**
+ * Initialize the VVM update check.
+ *
+ * This launches a coroutine that queries the Viewer Version Manager (VVM)
+ * to check for available updates. If an update is available, it configures
+ * Velopack with the update URL and initiates the update check/download.
+ *
+ * The release notes URL from the VVM response is posted to the "relnotes"
+ * event pump for display.
+ */
+void initVVMUpdateCheck();
+
+#endif // LL_LLVVMQUERY_H
diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp
deleted file mode 100644
index bf171fe954..0000000000
--- a/indra/newview/llwatchdog.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-/**
- * @file llthreadwatchdog.cpp
- * @brief The LLThreadWatchdog class definitions
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-
-#include "llviewerprecompiledheaders.h"
-#include "llwatchdog.h"
-#include "llthread.h"
-
-constexpr U32 WATCHDOG_SLEEP_TIME_USEC = 1000000U;
-
-// This class runs the watchdog timing thread.
-class LLWatchdogTimerThread : public LLThread
-{
-public:
- LLWatchdogTimerThread() :
- LLThread("Watchdog"),
- mSleepMsecs(0),
- mStopping(false)
- {
- }
-
- ~LLWatchdogTimerThread() {}
-
- void setSleepTime(long ms) { mSleepMsecs = ms; }
- void stop()
- {
- mStopping = true;
- mSleepMsecs = 1;
- }
-
- void run() override
- {
- while(!mStopping)
- {
- LLWatchdog::getInstance()->run();
- ms_sleep(mSleepMsecs);
- }
- }
-
-private:
- long mSleepMsecs;
- bool mStopping;
-};
-
-// LLWatchdogEntry
-LLWatchdogEntry::LLWatchdogEntry()
-{
-}
-
-LLWatchdogEntry::~LLWatchdogEntry()
-{
- stop();
-}
-
-void LLWatchdogEntry::start()
-{
- LLWatchdog::getInstance()->add(this);
-}
-
-void LLWatchdogEntry::stop()
-{
- // this can happen very late in the shutdown sequence
- if (!LLWatchdog::wasDeleted())
- {
- LLWatchdog::getInstance()->remove(this);
- }
-}
-
-// LLWatchdogTimeout
-const std::string UNINIT_STRING = "uninitialized";
-
-LLWatchdogTimeout::LLWatchdogTimeout() :
- mTimeout(0.0f),
- mPingState(UNINIT_STRING)
-{
-}
-
-LLWatchdogTimeout::~LLWatchdogTimeout()
-{
-}
-
-bool LLWatchdogTimeout::isAlive() const
-{
- return (mTimer.getStarted() && !mTimer.hasExpired());
-}
-
-void LLWatchdogTimeout::reset()
-{
- mTimer.setTimerExpirySec(mTimeout);
-}
-
-void LLWatchdogTimeout::setTimeout(F32 d)
-{
- mTimeout = d;
-}
-
-void LLWatchdogTimeout::start(std::string_view state)
-{
- if (mTimeout == 0)
- {
- LL_WARNS() << "Cant' start watchdog entry - no timeout set" << LL_ENDL;
- return;
- }
- // Order of operation is very important here.
- // After LLWatchdogEntry::start() is called
- // LLWatchdogTimeout::isAlive() will be called asynchronously.
- ping(state);
- mTimer.start();
- mTimer.setTimerExpirySec(mTimeout); // timer expiration set to 0 by start()
- LLWatchdogEntry::start();
-}
-
-void LLWatchdogTimeout::stop()
-{
- LLWatchdogEntry::stop();
- mTimer.stop();
-}
-
-void LLWatchdogTimeout::ping(std::string_view state)
-{
- if (!state.empty())
- {
- mPingState = state;
- }
- reset();
-}
-
-// LLWatchdog
-LLWatchdog::LLWatchdog()
- :mSuspectsAccessMutex()
- ,mTimer(nullptr)
- ,mLastClockCount(0)
-{
-}
-
-LLWatchdog::~LLWatchdog()
-{
-}
-
-void LLWatchdog::add(LLWatchdogEntry* e)
-{
- lockThread();
- mSuspects.insert(e);
- unlockThread();
-}
-
-void LLWatchdog::remove(LLWatchdogEntry* e)
-{
- lockThread();
- mSuspects.erase(e);
- unlockThread();
-}
-
-void LLWatchdog::init()
-{
- if (!mSuspectsAccessMutex && !mTimer)
- {
- mSuspectsAccessMutex = new LLMutex();
- mTimer = new LLWatchdogTimerThread();
- mTimer->setSleepTime(WATCHDOG_SLEEP_TIME_USEC / 1000);
- mLastClockCount = LLTimer::getTotalTime();
-
- // mTimer->start() kicks off the thread, any code after
- // start needs to use the mSuspectsAccessMutex
- mTimer->start();
- }
-}
-
-void LLWatchdog::cleanup()
-{
- if (mTimer)
- {
- mTimer->stop();
- delete mTimer;
- mTimer = nullptr;
- }
-
- if (mSuspectsAccessMutex)
- {
- delete mSuspectsAccessMutex;
- mSuspectsAccessMutex = nullptr;
- }
-
- mLastClockCount = 0;
-}
-
-void LLWatchdog::run()
-{
- lockThread();
-
- // Check the time since the last call to run...
- // If the time elapsed is two times greater than the regualr sleep time
- // reset the active timeouts.
- constexpr U32 TIME_ELAPSED_MULTIPLIER = 2;
- U64 current_time = LLTimer::getTotalTime();
- U64 current_run_delta = current_time - mLastClockCount;
- mLastClockCount = current_time;
-
- if (current_run_delta > (WATCHDOG_SLEEP_TIME_USEC * TIME_ELAPSED_MULTIPLIER))
- {
- LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL;
- for (const auto& suspect : mSuspects)
- {
- suspect->reset();
- }
- }
- else
- {
- SuspectsRegistry::iterator result =
- std::find_if(mSuspects.begin(),
- mSuspects.end(),
- [](const LLWatchdogEntry* suspect){ return ! suspect->isAlive(); });
- if (result != mSuspects.end())
- {
- // error!!!
- if(mTimer)
- {
- mTimer->stop();
- }
-
- LL_ERRS() << "Watchdog timer expired; assuming viewer is hung and crashing" << LL_ENDL;
- }
- }
-
-
- unlockThread();
-}
-
-void LLWatchdog::lockThread()
-{
- if (mSuspectsAccessMutex)
- {
- mSuspectsAccessMutex->lock();
- }
-}
-
-void LLWatchdog::unlockThread()
-{
- if (mSuspectsAccessMutex)
- {
- mSuspectsAccessMutex->unlock();
- }
-}
diff --git a/indra/newview/llwatchdog.h b/indra/newview/llwatchdog.h
deleted file mode 100644
index 1931c582b0..0000000000
--- a/indra/newview/llwatchdog.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * @file llthreadwatchdog.h
- * @brief The LLThreadWatchdog class declaration
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLTHREADWATCHDOG_H
-#define LL_LLTHREADWATCHDOG_H
-
-#include <boost/function.hpp>
-
-#ifndef LL_TIMER_H
- #include "lltimer.h"
-#endif
-
-// LLWatchdogEntry is the interface used by the tasks that
-// need to be watched.
-class LLWatchdogEntry
-{
-public:
- LLWatchdogEntry();
- virtual ~LLWatchdogEntry();
-
- // isAlive is accessed by the watchdog thread.
- // This may mean that resources used by
- // isAlive and other method may need synchronization.
- virtual bool isAlive() const = 0;
- virtual void reset() = 0;
- virtual void start();
- virtual void stop();
-};
-
-class LLWatchdogTimeout : public LLWatchdogEntry
-{
-public:
- LLWatchdogTimeout();
- virtual ~LLWatchdogTimeout();
-
- bool isAlive() const override;
- void reset() override;
- void start() override { start(""); }
- void stop() override;
-
- void start(std::string_view state);
- void setTimeout(F32 d);
- void ping(std::string_view state);
- const std::string& getState() {return mPingState; }
-
-private:
- LLTimer mTimer;
- F32 mTimeout;
- std::string mPingState;
-};
-
-class LLWatchdogTimerThread; // Defined in the cpp
-class LLWatchdog : public LLSingleton<LLWatchdog>
-{
- LLSINGLETON(LLWatchdog);
- ~LLWatchdog();
-
-public:
- // Add an entry to the watchdog.
- void add(LLWatchdogEntry* e);
- void remove(LLWatchdogEntry* e);
-
- void init();
- void run();
- void cleanup();
-
-private:
- void lockThread();
- void unlockThread();
-
- typedef std::set<LLWatchdogEntry*> SuspectsRegistry;
- SuspectsRegistry mSuspects;
- LLMutex* mSuspectsAccessMutex;
- LLWatchdogTimerThread* mTimer;
- U64 mLastClockCount;
-};
-
-#endif // LL_LLTHREADWATCHDOG_H
diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp
index 4528ad012d..132cbf4fcd 100644
--- a/indra/newview/llwebprofile.cpp
+++ b/indra/newview/llwebprofile.cpp
@@ -83,7 +83,7 @@ void LLWebProfile::setAuthCookie(const std::string& cookie)
/*static*/
LLCore::HttpHeaders::ptr_t LLWebProfile::buildDefaultHeaders()
{
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
+ LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared<LLCore::HttpHeaders>();
LLSD headers = LLViewerMedia::getInstance()->getHeaders();
for (LLSD::map_iterator it = headers.beginMap(); it != headers.endMap(); ++it)
@@ -100,9 +100,9 @@ void LLWebProfile::uploadImageCoro(LLPointer<LLImageFormatted> image, std::strin
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("uploadImageCoro", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
+ LLCore::HttpOptions::ptr_t httpOpts = std::make_shared<LLCore::HttpOptions>();
LLCore::HttpHeaders::ptr_t httpHeaders;
if (dynamic_cast<LLImagePNG*>(image.get()) == 0)
diff --git a/indra/newview/llwebprofile.h b/indra/newview/llwebprofile.h
index a9cfa102c0..5b3f3f2ce1 100644
--- a/indra/newview/llwebprofile.h
+++ b/indra/newview/llwebprofile.h
@@ -51,7 +51,7 @@ class LLWebProfile
LOG_CLASS(LLWebProfile);
public:
- typedef boost::function<void(bool ok)> status_callback_t;
+ typedef std::function<void(bool ok)> status_callback_t;
static void uploadImage(LLPointer<LLImageFormatted> image, const std::string& caption, bool add_location);
static void setAuthCookie(const std::string& cookie);
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index ebcdd537a5..6d234a9a34 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -41,9 +41,9 @@
#include "llrootview.h"
#include "llsdutil.h"
#include "stringize.h"
+#include <functional>
#include <typeinfo>
#include <map>
-#include <boost/bind.hpp>
LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter)
: LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"),
@@ -54,7 +54,7 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter&
"Given [\"keysym\"], [\"keycode\"] or [\"char\"], inject the specified ";
std::string keyExplain =
"(integer keycode values, or keysym string from any addKeyName() call in\n"
- "http://bitbucket.org/lindenlab/viewer-release/src/tip/indra/llwindow/llkeyboard.cpp )\n";
+ "https://github.com/secondlife/viewer/blob/develop/indra/llwindow/llkeyboard.cpp )\n";
std::string mask =
"Specify optional [\"mask\"] as an array containing any of \"CTL\", \"ALT\",\n"
"\"SHIFT\" or \"MAC_CONTROL\"; the corresponding modifier bits will be combined\n"
@@ -69,7 +69,7 @@ LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter&
"(button values \"LEFT\", \"MIDDLE\", \"RIGHT\")\n";
std::string paramsExplain =
"[\"path\"] is as for LLUI::getInstance()->resolvePath(), described in\n"
- "http://bitbucket.org/lindenlab/viewer-release/src/tip/indra/llui/llui.h\n"
+ "https://github.com/secondlife/viewer/blob/develop/indra/llui/llui.h\n"
"If you omit [\"path\"], you must specify both [\"x\"] and [\"y\"].\n"
"If you specify [\"path\"] without both [\"x\"] and [\"y\"], will synthesize (x, y)\n"
"in the center of the LLView selected by [\"path\"].\n"
@@ -352,7 +352,7 @@ struct WhichButton: public StringLookup<Actions>
};
static WhichButton buttons;
-typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc;
+typedef std::function<bool(LLCoordGL, MASK)> MouseFunc;
// Wrap a function returning 'void' to return 'true' instead. I'm sure there's
// a more generic way to accomplish this, but generically handling the
@@ -363,7 +363,7 @@ typedef boost::function<bool(LLCoordGL, MASK)> MouseFunc;
// seem to overload comma the same way; or at least not with bind().)
class MouseFuncTrue
{
- typedef boost::function<void(LLCoordGL, MASK)> MouseFuncVoid;
+ typedef std::function<void(LLCoordGL, MASK)> MouseFuncVoid;
MouseFuncVoid mFunc;
public:
@@ -463,9 +463,9 @@ static void mouseEvent(const MouseFunc& func, const LLSD& request)
// Instantiate a TemporaryDrilldownFunc to route incoming mouse events
// to the target LLView*. But put it on the heap since "path" is
- // optional. Nonetheless, manage it with a boost::scoped_ptr so it
+ // optional. Nonetheless, manage it with a std::unique_ptr so it
// will be destroyed when we leave.
- tempfunc.reset(new LLView::TemporaryDrilldownFunc(llview::TargetEvent(target)));
+ tempfunc = std::make_unique<LLView::TemporaryDrilldownFunc>(llview::TargetEvent(target));
}
// The question of whether the requested LLView actually handled the
@@ -484,11 +484,11 @@ void LLWindowListener::mouseDown(LLSD const & request)
if (actions.valid)
{
// Normally you can pass NULL to an LLWindow* without compiler
- // complaint, but going through boost::bind() evidently
+ // complaint, but going through std::bind() evidently
// bypasses that special case: it only knows you're trying to pass an
// int to a pointer. Explicitly cast NULL to the desired pointer type.
- mouseEvent(boost::bind(actions.down, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2),
+ mouseEvent(std::bind(actions.down, mWindow,
+ static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2),
request);
}
}
@@ -498,8 +498,7 @@ void LLWindowListener::mouseUp(LLSD const & request)
Actions actions(buttons.lookup(request["button"]));
if (actions.valid)
{
- mouseEvent(boost::bind(actions.up, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2),
+ mouseEvent(std::bind(actions.up, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1, std::placeholders::_2),
request);
}
}
@@ -511,8 +510,8 @@ void LLWindowListener::mouseMove(LLSD const & request)
// void, whereas mouseEvent() accepts a function returning bool -- and
// uses that bool return. Use MouseFuncTrue to construct a callable that
// returns bool anyway.
- mouseEvent(MouseFuncTrue(boost::bind(&LLWindowCallbacks::handleMouseMove, mWindow,
- static_cast<LLWindow*>(NULL), _1, _2)),
+ mouseEvent(MouseFuncTrue(std::bind(&LLWindowCallbacks::handleMouseMove, mWindow, static_cast<LLWindow*>(NULL), std::placeholders::_1,
+ std::placeholders::_2)),
request);
}
diff --git a/indra/newview/llwindowlistener.h b/indra/newview/llwindowlistener.h
index 207f64c8c0..9908a9c451 100644
--- a/indra/newview/llwindowlistener.h
+++ b/indra/newview/llwindowlistener.h
@@ -28,7 +28,7 @@
#define LL_LLWINDOWLISTENER_H
#include "lleventapi.h"
-#include <boost/function.hpp>
+#include <functional>
class LLKeyboard;
class LLViewerWindow;
@@ -36,7 +36,7 @@ class LLViewerWindow;
class LLWindowListener : public LLEventAPI
{
public:
- typedef boost::function<LLKeyboard*()> KeyboardGetter;
+ typedef std::function<LLKeyboard*()> KeyboardGetter;
LLWindowListener(LLViewerWindow * window, const KeyboardGetter& kbgetter);
void getInfo(LLSD const & evt);
diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp
index 4e3a7a8788..aabcb2e514 100644
--- a/indra/newview/llwlhandlers.cpp
+++ b/indra/newview/llwlhandlers.cpp
@@ -101,8 +101,8 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url, LLEnvironment
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
S32 requestId = ++LLEnvironmentRequest::sLastRequest;
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentRequest", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EnvironmentRequest", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
@@ -193,8 +193,8 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content, LLE
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentApply", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
+ httpAdapter = std::make_shared<LLCoreHttpUtil::HttpCoroutineAdapter>("EnvironmentApply", httpPolicy);
+ LLCore::HttpRequest::ptr_t httpRequest = std::make_shared<LLCore::HttpRequest>();
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, content);
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index aab19a4d5f..68e7f3ee29 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -28,7 +28,6 @@
#define LL_LLWORLDMAP_H
#include "llworldmipmap.h"
-#include <boost/function.hpp>
#include "v3dmath.h"
#include "lluuid.h"
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index c60d075e0c..a5433133ab 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -33,7 +33,8 @@
#include "llagent.h"
#include "llfloaterworldmap.h"
-const U32 LAYER_FLAG = 2;
+constexpr U32 LAYER_FLAG = 2;
+constexpr S32 MAP_SIM_RETURN_NULL_SIMS = 0x00010000;
//---------------------------------------------------------------------------
// World Map Message Handling
@@ -43,7 +44,7 @@ LLWorldMapMessage::LLWorldMapMessage() :
mSLURLRegionName(),
mSLURLRegionHandle(0),
mSLURL(),
- mSLURLCallback(0),
+ mSLURLCallback(nullptr),
mSLURLTeleport(false)
{
}
@@ -135,7 +136,11 @@ void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
U32 flags = LAYER_FLAG;
- flags |= (return_nonexistent ? 0x10000 : 0);
+ if (return_nonexistent)
+ {
+ // overwrite LAYER_FLAG, otherwise server won't respond to missing regions
+ flags = MAP_SIM_RETURN_NULL_SIMS;
+ }
msg->addU32Fast(_PREHASH_Flags, flags);
msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim
msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim
@@ -157,15 +162,17 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
U32 agent_flags;
msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags);
- // There's only one flag that we ever use here
- if (agent_flags != LAYER_FLAG)
+ S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data);
+
+ // There's only one flag that we ever use here, unless we also want an existence check.
+ if (agent_flags != LAYER_FLAG
+ && num_blocks != 1) // we check existence for a single region
{
LL_WARNS() << "Invalid map image type returned! layer = " << agent_flags << LL_ENDL;
return;
}
- S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_Data);
- //LL_INFOS("WorldMap") << "num_blocks = " << num_blocks << LL_ENDL;
+ LL_DEBUGS("WorldMap") << "num_blocks = " << num_blocks << LL_ENDL;
bool found_null_sim = false;
@@ -191,38 +198,43 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS;
U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS;
- // name shouldn't be empty, see EXT-4568
- llassert(!name.empty());
-
- // Insert that region in the world map, if failure, flag it as a "null_sim"
- if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags)))
+ // Name shouldn't be empty unless region doesn't exist
+ if (!name.empty())
{
- found_null_sim = true;
- }
+ // Insert that region in the world map, if failure, flag it as a "null_sim"
+ if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags)))
+ {
+ found_null_sim = true;
+ }
- // If we hit a valid tracking location, do what needs to be done app level wise
- if (LLWorldMap::getInstance()->isTrackingValidLocation())
- {
- LLVector3d pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal();
- if (LLWorldMap::getInstance()->isTrackingDoubleClick())
+ // If we hit a valid tracking location, do what needs to be done app level wise
+ if (LLWorldMap::getInstance()->isTrackingValidLocation())
{
- // Teleport if the user double clicked
- gAgent.teleportViaLocation(pos_global);
+ LLVector3d pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal();
+ if (LLWorldMap::getInstance()->isTrackingDoubleClick())
+ {
+ // Teleport if the user double clicked
+ gAgent.teleportViaLocation(pos_global);
+ }
+ // Update the "real" tracker information
+ gFloaterWorldMap->trackLocation(pos_global);
}
- // Update the "real" tracker information
- gFloaterWorldMap->trackLocation(pos_global);
+ }
+ else
+ {
+ found_null_sim = true;
}
// Handle the SLURL callback if any
url_callback_t callback = LLWorldMapMessage::getInstance()->mSLURLCallback;
- if(callback != NULL)
+ if (callback != nullptr)
{
U64 handle = to_region_handle(x_world, y_world);
// Check if we reached the requested region
if ((LLStringUtil::compareInsensitive(LLWorldMapMessage::getInstance()->mSLURLRegionName, name)==0)
|| (LLWorldMapMessage::getInstance()->mSLURLRegionHandle == handle))
{
- LLWorldMapMessage::getInstance()->mSLURLCallback = NULL;
+ LLWorldMapMessage::getInstance()->mSLURLCallback = nullptr;
LLWorldMapMessage::getInstance()->mSLURLRegionName.clear();
LLWorldMapMessage::getInstance()->mSLURLRegionHandle = 0;
diff --git a/indra/newview/llworldmapmessage.h b/indra/newview/llworldmapmessage.h
index 357d31ccc1..87ae935bb9 100644
--- a/indra/newview/llworldmapmessage.h
+++ b/indra/newview/llworldmapmessage.h
@@ -27,7 +27,7 @@
#ifndef LL_LLWORLDMAPMESSAGE_H
#define LL_LLWORLDMAPMESSAGE_H
-#include "boost/function.hpp"
+#include <functional>
// Handling of messages (send and process) as well as SLURL callback if necessary
class LLMessageSystem;
@@ -38,7 +38,7 @@ class LLWorldMapMessage : public LLSingleton<LLWorldMapMessage>
~LLWorldMapMessage();
public:
- typedef boost::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
+ typedef std::function<void(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)>
url_callback_t;
// Process incoming answers to map stuff requests
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index 92e6c88752..758615a730 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -241,7 +241,7 @@ public:
}
LLSD http_params = command.get("http_params");
- mTransaction.reset(new LLXMLRPCTransaction(mUri, mMethod, request_params, http_params));
+ mTransaction = std::make_unique<LLXMLRPCTransaction>(mUri, mMethod, request_params, http_params);
mPreviousStatus = mTransaction->status(NULL);
// Now ensure that we get regular callbacks to poll for completion.
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 7fbcb5fc04..7b0bf6f251 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -50,13 +50,6 @@
#include "llappviewer.h"
#include "lltrans.h"
-#include "boost/move/unique_ptr.hpp"
-
-namespace boost
-{
- using ::boost::movelib::unique_ptr; // move unique_ptr into the boost namespace.
-}
-
// Static instance of LLXMLRPCListener declared here so that every time we
// bring in this code, we instantiate a listener. If we put the static
// instance of LLXMLRPCListener into llxmlrpclistener.cpp, the linker would
@@ -194,11 +187,11 @@ LLXMLRPCTransaction::Impl::Impl
if (!mHttpRequest)
{
- mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest);
+ mHttpRequest = std::make_shared<LLCore::HttpRequest>();
}
// LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
- httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
+ httpOpts = std::make_shared<LLCore::HttpOptions>();
// Delay between repeats will start from 5 sec and grow to 20 sec with each repeat
httpOpts->setMinBackoff((LLCore::HttpTime)5E6L);
@@ -221,7 +214,7 @@ LLXMLRPCTransaction::Impl::Impl
httpOpts->setSSLVerifyHost(vefifySSLCert ? 2 : 0);
// LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
- httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
+ httpHeaders = std::make_shared<LLCore::HttpHeaders>();
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
@@ -244,7 +237,7 @@ LLXMLRPCTransaction::Impl::Impl
body->append(request.c_str(), request.size());
- mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler(mHttpRequest, this));
+ mHandler = std::make_shared<Handler>(mHttpRequest, this);
mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID,
mURI, body.get(), httpOpts, httpHeaders, mHandler);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 1415e40ed8..a844e29cbb 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -218,6 +218,7 @@ S32 LLPipeline::RenderBufferVisualization;
bool LLPipeline::RenderMirrors;
S32 LLPipeline::RenderHeroProbeUpdateRate;
S32 LLPipeline::RenderHeroProbeConservativeUpdateMultiplier;
+bool LLPipeline::RenderAvatarCloth;
LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
const U32 LLPipeline::MAX_PREVIEW_WIDTH = 512;
@@ -615,6 +616,7 @@ void LLPipeline::init()
connectRefreshCachedSettingsSafe("RenderMirrors");
connectRefreshCachedSettingsSafe("RenderHeroProbeUpdateRate");
connectRefreshCachedSettingsSafe("RenderHeroProbeConservativeUpdateMultiplier");
+ connectRefreshCachedSettingsSafe("RenderAvatarCloth");
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl("CollectFontVertexBuffers");
if (cntrl_ptr.notNull())
@@ -1192,6 +1194,7 @@ void LLPipeline::refreshCachedSettings()
RenderMirrors = gSavedSettings.getBOOL("RenderMirrors");
RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate");
RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier");
+ RenderAvatarCloth = gSavedSettings.getBOOL("RenderAvatarCloth");
sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled");
RenderSpotLight = nullptr;
@@ -3030,7 +3033,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion)
void LLPipeline::markShift(LLDrawable *drawablep)
{
- if (!drawablep || drawablep->isDead())
+ if (!drawablep || drawablep->isDead() || !drawablep->getVObj())
{
return;
}
@@ -3064,7 +3067,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
iter != mShiftList.end(); iter++)
{
LLDrawable *drawablep = *iter;
- if (drawablep->isDead())
+ if (drawablep->isDead() || !drawablep->getVObj())
{
continue;
}
@@ -8757,34 +8760,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
bindReflectionProbes(shader);
- if (gAtmosphere)
- {
- // bind precomputed textures necessary for calculating sun and sky luminance
- channel = shader.enableTexture(LLShaderMgr::TRANSMITTANCE_TEX, LLTexUnit::TT_TEXTURE);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::TRANSMITTANCE_TEX, gAtmosphere->getTransmittance());
- }
-
- channel = shader.enableTexture(LLShaderMgr::SCATTER_TEX, LLTexUnit::TT_TEXTURE_3D);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::SCATTER_TEX, gAtmosphere->getScattering());
- }
-
- channel = shader.enableTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, LLTexUnit::TT_TEXTURE_3D);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::SINGLE_MIE_SCATTER_TEX, gAtmosphere->getMieScattering());
- }
-
- channel = shader.enableTexture(LLShaderMgr::ILLUMINANCE_TEX, LLTexUnit::TT_TEXTURE);
- if (channel > -1)
- {
- shader.bindTexture(LLShaderMgr::ILLUMINANCE_TEX, gAtmosphere->getIlluminance());
- }
- }
-
/*if (gCubeSnapshot)
{ // we only really care about the first two values, but the shader needs increasing separation between clip planes
shader.uniform4f(LLShaderMgr::DEFERRED_SHADOW_CLIP, 1.f, 64.f, 128.f, 256.f);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 41e428fce9..60804eee9e 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -1105,6 +1105,7 @@ public:
static bool RenderMirrors;
static S32 RenderHeroProbeUpdateRate;
static S32 RenderHeroProbeConservativeUpdateMultiplier;
+ static bool RenderAvatarCloth;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
diff --git a/indra/newview/skins/default/textures/icon_auction.tga b/indra/newview/skins/default/textures/icon_auction.tga
index baf7d0d000..d121833b47 100644
--- a/indra/newview/skins/default/textures/icon_auction.tga
+++ b/indra/newview/skins/default/textures/icon_auction.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_legacy_event.tga b/indra/newview/skins/default/textures/icon_event.tga
index 7805dbce60..7805dbce60 100644
--- a/indra/newview/skins/default/textures/icon_legacy_event.tga
+++ b/indra/newview/skins/default/textures/icon_event.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_legacy_event_adult.tga b/indra/newview/skins/default/textures/icon_event_adult.tga
index c344fb1e78..c344fb1e78 100644
--- a/indra/newview/skins/default/textures/icon_legacy_event_adult.tga
+++ b/indra/newview/skins/default/textures/icon_event_adult.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_legacy_event_mature.tga b/indra/newview/skins/default/textures/icon_event_mature.tga
index 61c879bc92..61c879bc92 100644
--- a/indra/newview/skins/default/textures/icon_legacy_event_mature.tga
+++ b/indra/newview/skins/default/textures/icon_event_mature.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_group.tga b/indra/newview/skins/default/textures/icon_group.tga
deleted file mode 100644
index 79cd71689d..0000000000
--- a/indra/newview/skins/default/textures/icon_group.tga
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icon_place.tga b/indra/newview/skins/default/textures/icon_place.tga
index e10655c6ec..2170c98499 100644
--- a/indra/newview/skins/default/textures/icon_place.tga
+++ b/indra/newview/skins/default/textures/icon_place.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_1.png b/indra/newview/skins/default/textures/icons/ProgressLarge_1.png
deleted file mode 100644
index ff277fc431..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_1.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_10.png b/indra/newview/skins/default/textures/icons/ProgressLarge_10.png
deleted file mode 100644
index 1c94e21d89..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_10.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_11.png b/indra/newview/skins/default/textures/icons/ProgressLarge_11.png
deleted file mode 100644
index 89bea9b474..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_11.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_12.png b/indra/newview/skins/default/textures/icons/ProgressLarge_12.png
deleted file mode 100644
index da38475ba4..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_12.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_2.png b/indra/newview/skins/default/textures/icons/ProgressLarge_2.png
deleted file mode 100644
index c024275ebe..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_2.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_3.png b/indra/newview/skins/default/textures/icons/ProgressLarge_3.png
deleted file mode 100644
index 87b931e72e..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_3.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_4.png b/indra/newview/skins/default/textures/icons/ProgressLarge_4.png
deleted file mode 100644
index 6dbef74361..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_4.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_5.png b/indra/newview/skins/default/textures/icons/ProgressLarge_5.png
deleted file mode 100644
index daccf9b375..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_5.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_6.png b/indra/newview/skins/default/textures/icons/ProgressLarge_6.png
deleted file mode 100644
index cafddcb88d..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_6.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_7.png b/indra/newview/skins/default/textures/icons/ProgressLarge_7.png
deleted file mode 100644
index 8acf6472d4..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_7.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_8.png b/indra/newview/skins/default/textures/icons/ProgressLarge_8.png
deleted file mode 100644
index df0e825cef..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_8.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ProgressLarge_9.png b/indra/newview/skins/default/textures/icons/ProgressLarge_9.png
deleted file mode 100644
index 293a7b8f5c..0000000000
--- a/indra/newview/skins/default/textures/icons/ProgressLarge_9.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/megapahit/icon_group.png b/indra/newview/skins/default/textures/megapahit/icon_group.png
deleted file mode 100644
index f3872dea3f..0000000000
--- a/indra/newview/skins/default/textures/megapahit/icon_group.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/megapahit/icon_land_auction.png b/indra/newview/skins/default/textures/megapahit/icon_land_auction.png
deleted file mode 100644
index 550703968f..0000000000
--- a/indra/newview/skins/default/textures/megapahit/icon_land_auction.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/megapahit/icon_land_forsale.png b/indra/newview/skins/default/textures/megapahit/icon_land_forsale.png
deleted file mode 100644
index 209bb868ea..0000000000
--- a/indra/newview/skins/default/textures/megapahit/icon_land_forsale.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/megapahit/icon_place.png b/indra/newview/skins/default/textures/megapahit/icon_place.png
deleted file mode 100644
index 60cf42424a..0000000000
--- a/indra/newview/skins/default/textures/megapahit/icon_place.png
+++ /dev/null
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 40ee205090..a8fc8faa44 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -839,8 +839,14 @@ with the same filename but different name
<texture name="icon_avatar_online.tga" />
<texture name="icon_diurnal.tga" />
<texture name="icon_for_sale.tga" file_name="icons/Icon_For_Sale.png" />
+ <texture name="icon_auction.tga"/>
+ <texture name="icon_place.tga"/>
<texture name="icon_top_pick.tga" />
+ <texture name="icon_event.tga"/>
+ <texture name="icon_event_adult.tga"/>
+ <texture name="icon_event_mature.tga" />
+
<texture name="lag_status_critical.tga" />
<texture name="lag_status_good.tga" />
<texture name="lag_status_warning.tga" />
@@ -911,28 +917,6 @@ with the same filename but different name
<texture name="Single_Folder_Up" file_name="icons/single_folder_up.png" preload="true"/>
<texture name="Icon_Color_Palette" file_name="icons/Icon_Color_Palette.png" preload="false"/>
<texture name="Icon_Font_Size" file_name="icons/Icon_Font_Size.png" preload="false"/>
-
- <texture name="Icon_Place" file_name="megapahit/icon_place.png" preload="false" />
- <texture name="Icon_Auction" file_name="megapahit/icon_land_auction.png" preload="false" />
- <texture name="Icon_For_Sale" file_name="megapahit/icon_land_forsale.png" preload="false" />
- <texture name="Icon_Group" file_name="megapahit/icon_group.png" preload="false" />
- <texture name="Icon_Legacy_Event_PG" file_name="icons/Parcel_PG_Dark.png" preload="false" />
- <texture name="Icon_Legacy_Event_Mature" file_name="icons/Parcel_M_Dark.png" preload="false" />
- <texture name="Icon_Legacy_Event_Adult" file_name="icons/Parcel_R_Dark.png" preload="false" />
-
- <texture name="ProgressLarge_1" file_name="icons/ProgressLarge_1.png" preload="true" />
- <texture name="ProgressLarge_2" file_name="icons/ProgressLarge_2.png" preload="true" />
- <texture name="ProgressLarge_3" file_name="icons/ProgressLarge_3.png" preload="true" />
- <texture name="ProgressLarge_4" file_name="icons/ProgressLarge_4.png" preload="true" />
- <texture name="ProgressLarge_5" file_name="icons/ProgressLarge_5.png" preload="true" />
- <texture name="ProgressLarge_6" file_name="icons/ProgressLarge_6.png" preload="true" />
- <texture name="ProgressLarge_7" file_name="icons/ProgressLarge_7.png" preload="true" />
- <texture name="ProgressLarge_8" file_name="icons/ProgressLarge_8.png" preload="true" />
- <texture name="ProgressLarge_9" file_name="icons/ProgressLarge_9.png" preload="true" />
- <texture name="ProgressLarge_10" file_name="icons/ProgressLarge_10.png" preload="true" />
- <texture name="ProgressLarge_11" file_name="icons/ProgressLarge_11.png" preload="true" />
- <texture name="ProgressLarge_12" file_name="icons/ProgressLarge_12.png" preload="true" />
-
<texture name="Icon_Pointer" file_name="icons/Icon_Pointer.png" preload="false"/>
<texture name="mp_fpsButton" file_name="megapahit/fps_button.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/da/panel_status_bar.xml b/indra/newview/skins/default/xui/da/panel_status_bar.xml
index 6e7bdfc188..a976c3f17a 100644
--- a/indra/newview/skins/default/xui/da/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/da/panel_status_bar.xml
@@ -12,7 +12,7 @@
<panel.string name="bandwidth_tooltip">
Båndbredde
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/de/panel_status_bar.xml b/indra/newview/skins/default/xui/de/panel_status_bar.xml
index 0829814220..7e305fb16b 100644
--- a/indra/newview/skins/default/xui/de/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/de/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Bandbreite
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/en/floater_directory.xml b/indra/newview/skins/default/xui/en/floater_directory.xml
new file mode 100644
index 0000000000..3274474337
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_directory.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ can_close="true"
+ can_drag_on_left="false"
+ single_instance="true"
+ can_resize="true"
+ height="570"
+ min_height="570"
+ width="780"
+ min_width="780"
+ name="directory"
+ title="Search">
+ <tab_container
+ top="0"
+ left="0"
+ follows="left|top|right|bottom"
+ height="550"
+ width="780"
+ mouse_opaque="false"
+ name="Directory Tabs"
+ tab_position="top">
+ <panel
+ border="false"
+ label="People"
+ filename="panel_dir_people.xml"
+ class="panel_dir_people"
+ name="panel_dir_people"
+ follows="left|top|right"
+ layout="topleft"
+ left="0"
+ top="0"
+ bottom="-1" />
+ <panel
+ border="false"
+ label="Groups"
+ filename="panel_dir_groups.xml"
+ class="panel_dir_groups"
+ name="panel_dir_groups"
+ follows="left|top|right"
+ layout="topleft"
+ left="0"
+ top="0"
+ bottom="-1" />
+ <panel
+ border="false"
+ label="Places"
+ filename="panel_dir_places.xml"
+ class="panel_dir_places"
+ name="panel_dir_places"
+ follows="left|top|right"
+ layout="topleft"
+ left="0"
+ top="0"
+ bottom="-1" />
+ <panel
+ border="false"
+ label="Land Sales"
+ filename="panel_dir_land.xml"
+ class="panel_dir_land"
+ name="panel_dir_land"
+ follows="left|top|right"
+ layout="topleft"
+ left="0"
+ top="0"
+ bottom="-1" />
+ <panel
+ border="false"
+ label="Events"
+ filename="panel_dir_events.xml"
+ class="panel_dir_events"
+ name="panel_dir_events"
+ follows="left|top|right"
+ layout="topleft"
+ left="0"
+ top="0"
+ bottom="-1" />
+ <panel
+ border="false"
+ label="Classifieds"
+ filename="panel_dir_classified.xml"
+ class="panel_dir_classified"
+ name="panel_dir_classified"
+ follows="left|top|right"
+ layout="topleft"
+ left="0"
+ top="0"
+ bottom="-1" />
+ <panel
+ border="false"
+ label="Web"
+ filename="panel_dir_web.xml"
+ class="panel_dir_web"
+ name="panel_dir_web"
+ follows="left|top|right"
+ layout="topleft"
+ left="0"
+ top="0"
+ bottom="-1" />
+</tab_container>
+ <panel
+ top="65"
+ follows="right|top"
+ height="486"
+ left="345"
+ visible="false"
+ name="panel_profile_secondlife"
+ class="panel_profile_secondlife"
+ filename="panel_profile_secondlife.xml"
+ width="425" />
+ <panel
+ top="70"
+ follows="bottom|right|top"
+ height="482"
+ left="345"
+ visible="false"
+ name="panel_group_info_sidetray"
+ class="panel_group_info_sidetray"
+ filename="panel_group_info_sidetray.xml"
+ width="425" />
+ <panel
+ top="70"
+ follows="bottom|right|top"
+ height="484"
+ left="345"
+ visible="false"
+ name="panel_places"
+ class="panel_places"
+ filename="panel_places.xml"
+ width="425" />
+ <panel
+ top="70"
+ follows="bottom|right|top"
+ height="481"
+ left="345"
+ visible="false"
+ name="panel_classified_info"
+ class="panel_classified_info"
+ filename="panel_classified_info.xml"
+ width="425" />
+ <panel
+ top="70"
+ follows="bottom|right|top"
+ height="480"
+ left="345"
+ visible="false"
+ name="panel_event_info"
+ class="panel_event_info"
+ filename="panel_event_info.xml"
+ width="425" />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_fs_search.xml b/indra/newview/skins/default/xui/en/floater_fs_search.xml
deleted file mode 100644
index 2372bc03ba..0000000000
--- a/indra/newview/skins/default/xui/en/floater_fs_search.xml
+++ /dev/null
@@ -1,337 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- can_resize="true"
- default_tab_group="1"
- height="590"
- help_topic="search"
- layout="topleft"
- legacy_header_height="0"
- min_height="590"
- min_width="660"
- name="floater_search"
- positioning="centered"
- save_rect="true"
- single_instance="true"
- title="SEARCH"
- width="780">
- <!-- Strings -->
- <floater.string name="string.location">
- Location: [LOCATION]
- </floater.string>
- <floater.string name="string.traffic">
- Traffic: [DWELL]
- </floater.string>
- <floater.string name="string.area">
- Area: [AREA]
- </floater.string>
- <floater.string name="string.members">
- Members: [MEMBER_COUNT]
- </floater.string>
- <floater.string name="string.founder">
- Founder: [FOUNDER]
- </floater.string>
- <floater.string name="string.age">
- Age: [AGE]
- </floater.string>
- <floater.string name="string.partner">
- Partner: [PARTNER]
- </floater.string>
- <floater.string name="string.listing_price">
- Listing Price: [LISTING_PRICE]
- </floater.string>
- <floater.string name="string.slurl">
- [SLURL]
- </floater.string>
- <floater.string name="string.duration">
- Duration: [DURATION]
- </floater.string>
- <floater.string name="string.covercharge">
- Cover: [COVERCHARGE]
- </floater.string>
- <!-- Tab time -->
- <tab_container
- layout="topleft"
- follows="all"
- top="1"
- left="0"
- name="ls_tabs"
- tab_min_width="90"
- tab_position="top"
- width="780"
- height="585">
- <panel
- class="panel_ls_web"
- filename="panel_fs_search_legacy_web.xml"
- label="Websearch"
- layout="topleft"
- name="panel_ls_web" />
- <panel
- class="panel_ls_people"
- filename="panel_fs_search_legacy_people.xml"
- label="People"
- layout="topleft"
- name="panel_ls_people" />
- <panel
- class="panel_ls_groups"
- filename="panel_fs_search_legacy_groups.xml"
- label="Groups"
- layout="topleft"
- name="panel_ls_groups" />
- <panel
- class="panel_ls_places"
- filename="panel_fs_search_legacy_places.xml"
- label="Places"
- layout="topleft"
- name="panel_ls_places" />
- <panel
- class="panel_ls_land"
- filename="panel_fs_search_legacy_land.xml"
- label="Land Sales"
- layout="topleft"
- name="panel_ls_land" />
- <panel
- class="panel_ls_events"
- filename="panel_fs_search_legacy_events.xml"
- label="Events"
- layout="topleft"
- name="panel_ls_events" />
- <panel
- class="panel_ls_classifieds"
- filename="panel_fs_search_legacy_classifieds.xml"
- label="Classifieds"
- layout="topleft"
- name="panel_ls_classifieds" />
- </tab_container>
- <!-- Details/Action Panes -->
- <panel
- border="true"
- follows="top|right|bottom"
- height="508"
- layout="topleft"
- left="412"
- top="80"
- width="366"
- name="panel_ls_details">
- <text_editor
- left="12"
- top="5"
- height="24"
- width="340"
- layout="topleft"
- follows="left|top|right"
- name="title"
- bg_visible="false"
- border_visible="false"
- allow_scroll="false"
- h_pad="0"
- v_pad="0"
- halign="center"
- enabled="false"
- use_ellipses="true"
- font="SansSerifHugeBold"
- value="Undefined name" />
- <texture_picker
- enabled="false"
- fallback_image="Generic_Person_Large"
- follows="left|top|right"
- height="210"
- layout="topleft"
- left="78"
- name="snapshot"
- top_pad="4"
- width="210"/>
- <texture_picker
- enabled="false"
- fallback_image="default_land_picture.j2c"
- follows="left|top|right"
- height="210"
- layout="topleft"
- left_delta="0"
- name="snapshot_parcel"
- top_delta="0"
- visible="false"
- width="210"/>
- <text_editor
- left="20"
- top_pad="2"
- height="16"
- width="180"
- layout="topleft"
- follows="left|top|right"
- name="aux1"
- bg_visible="false"
- border_visible="false"
- h_pad="0"
- v_pad="0"
- word_wrap="true"
- enabled="false"
- max_length="117"
- allow_scroll="false"
- parse_urls="true"
- value="Auxilary info field 1"/>
- <text_editor
- left_pad="4"
- top_delta="0"
- height="16"
- width="140"
- layout="topleft"
- follows="left|top|right"
- name="aux2"
- bg_visible="false"
- border_visible="false"
- h_pad="0"
- v_pad="0"
- word_wrap="true"
- enabled="false"
- max_length="117"
- allow_scroll="false"
- parse_urls="true"
- value="Auxilary info field 2"/>
- <icon
- follows="top|right"
- height="16"
- image_name="Unknown_Icon"
- layout="topleft"
- left="20"
- top_pad="2"
- name="maturity_icon"
- width="18" />
- <text_editor
- left_pad="4"
- top_delta="0"
- height="28"
- width="302"
- layout="topleft"
- follows="left|top|right"
- name="location"
- bg_visible="false"
- border_visible="false"
- h_pad="0"
- v_pad="0"
- word_wrap="true"
- enabled="false"
- max_length="117"
- allow_scroll="false"
- parse_urls="true"
- value="Location info field"/>
- <text_editor
- left="20"
- top_pad="12"
- height="154"
- width="324"
- layout="topleft"
- follows="left|top|right"
- name="desc"
- bg_visible="false"
- border_visible="false"
- h_pad="0"
- v_pad="0"
- word_wrap="true"
- parse_urls="true"
- enabled="false"
- max_length="1000"
- trusted_content="false"
- value="You unlock this door with the key of imagination. Beyond it is another dimension: a dimension of sound, a dimension of sight, a dimension of mind. You're moving into a land of both shadow and substance, of things and ideas; you've just crossed over into the Twilight Zone. What you are about to see is real; the litigants on the screen are not actors. They are genuine citizens who, having filed their claims in a real small claims court, have been persuaded to drop their suits there and have them settled here, in this forum... the People's Court."/>
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Open Profile"
- name="people_profile_btn"
- top="484"
- left="3"
- width="120" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Send Message"
- name="people_message_btn"
- width="120"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Add Friend"
- name="people_friend_btn"
- width="120"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Open Profile"
- name="group_profile_btn"
- top="484"
- left="3"
- width="120" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Join Chat"
- name="group_message_btn"
- width="120"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Join Group"
- name="group_join_btn"
- width="120"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Teleport"
- name="teleport_btn"
- top="484"
- left="3"
- width="120" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Show on Map"
- name="map_btn"
- width="120"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Remind me"
- name="event_reminder_btn"
- width="120"
- left_pad="1" />
- <loading_indicator
- left="134"
- top="320"
- follows="left|top|right"
- mouse_opaque="false"
- name="loading"
- images_per_sec="1.0"
- tab_stop="false"
- height="100"
- width="100"
- visible="false" >
- <images>
- <image name="ProgressLarge_1"/>
- <image name="ProgressLarge_2"/>
- <image name="ProgressLarge_3"/>
- <image name="ProgressLarge_4"/>
- <image name="ProgressLarge_5"/>
- <image name="ProgressLarge_6"/>
- <image name="ProgressLarge_7"/>
- <image name="ProgressLarge_8"/>
- <image name="ProgressLarge_9"/>
- <image name="ProgressLarge_10"/>
- <image name="ProgressLarge_11"/>
- <image name="ProgressLarge_12"/>
- </images>
- </loading_indicator>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml
index 7fce91a2c3..4054e540c3 100644
--- a/indra/newview/skins/default/xui/en/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_gesture.xml
@@ -35,9 +35,13 @@
top="20"
name="gesture_list">
<scroll_list.columns
+ label=""
+ name="active"
+ width="10" />
+ <scroll_list.columns
label="Name"
name="name"
- width="153" />
+ width="143" />
<scroll_list.columns
label="Chat"
name="trigger"
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 7d094ec613..fb93d32ee4 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -89,7 +89,7 @@
height="22"
width="238"
follows="right|top"
- top="6"
+ top="6"
background_visible="false"
bg_alpha_color="DkGray2">
<text
@@ -612,7 +612,7 @@
Location:
</text>
<spinner
- control_name="teleport_coordinate_x"
+ control_name="Teleport_Coordinate_X"
decimal_digits="0"
follows="right|bottom"
height="23"
@@ -624,11 +624,11 @@
min_val="0"
name="teleport_coordinate_x"
width="44" >
- <spinner.commit_callback
+ <spinner.commit_callback
function="WMap.Coordinates" />
</spinner>
<spinner
- control_name="teleport_coordinate_y"
+ control_name="Teleport_Coordinate_Y"
decimal_digits="0"
follows="right|bottom"
height="23"
@@ -644,7 +644,7 @@
function="WMap.Coordinates" />
</spinner>
<spinner
- control_name="teleport_coordinate_z"
+ control_name="Teleport_Coordinate_Z"
decimal_digits="0"
follows="right|bottom"
height="23"
diff --git a/indra/newview/skins/default/xui/en/menu_favorites.xml b/indra/newview/skins/default/xui/en/menu_favorites.xml
index 6345394b46..f82f705fb7 100644
--- a/indra/newview/skins/default/xui/en/menu_favorites.xml
+++ b/indra/newview/skins/default/xui/en/menu_favorites.xml
@@ -35,6 +35,9 @@
<menu_item_call.on_click
function="Favorites.DoToSelected"
parameter="show_on_map" />
+ <menu_item_call.on_enable
+ function="Favorites.EnableSelected"
+ parameter="show_on_map" />
</menu_item_call>
<menu_item_call
label="Copy SLurl"
@@ -43,6 +46,9 @@
<menu_item_call.on_click
function="Favorites.DoToSelected"
parameter="copy_slurl" />
+ <menu_item_call.on_enable
+ function="Favorites.EnableSelected"
+ parameter="copy_slurl" />
</menu_item_call>
<menu_item_call
label="Create Pick"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 36f9ae070f..f444275878 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -132,7 +132,6 @@
</menu_item_call>
<menu_item_separator/>
-
<menu_item_call
label="Preferences..."
name="Preferences"
@@ -710,6 +709,13 @@
<menu_item_check.on_click
function="Avatar.ToggleSearch"/>
</menu_item_check>
+ <menu_item_call
+ label="Legacy Search..."
+ name="LegacySearch">
+ <menu_item_call.on_click
+ function="Floater.Toggle"
+ parameter="legacy_search" />
+ </menu_item_call>
<menu_item_separator/>
<menu_item_call
label="Teleport home"
@@ -740,8 +746,7 @@
<menu_item_call
label="360 snapshot"
- name="Capture 360"
- shortcut="control|alt|shift|s">
+ name="Capture 360">
<menu_item_call.on_click
function="Floater.Show"
parameter="360capture" />
@@ -1574,6 +1579,18 @@ function="World.EnvPreset"
<menu_item_check.on_click
function="View.HighlightTransparent" />
</menu_item_check>
+ <menu_item_check
+ label="Highlight Transparent Probes"
+ name="Highlight Transparent Probes"
+ shortcut="alt|shift|T">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="RenderReflectionProbeShowTransparent" />
+ <menu_item_check.on_click
+ function="View.HighlightTransparentProbe" />
+ <menu_item_check.on_enable
+ function="View.CheckHighlightTransparent"/>
+ </menu_item_check>
<menu_item_separator/>
<menu_item_check
@@ -2362,6 +2379,7 @@ function="World.EnvPreset"
</menu_item_check>
<menu_item_check
label="PBR"
+ shortcut="control|alt|shift|]"
name="Rendering Type PBR">
<menu_item_check.on_check
function="Advanced.CheckRenderType"
@@ -3452,8 +3470,7 @@ function="World.EnvPreset"
</menu_item_check>
<menu_item_check
label="Object-Object Occlusion"
- name="Object-Object Occlusion"
- shortcut="control|shift|O">
+ name="Object-Object Occlusion">
<menu_item_check.on_check
function="CheckControl"
parameter="UseOcclusion" />
@@ -3580,6 +3597,16 @@ function="World.EnvPreset"
parameter="RenderAttachedParticles" />
</menu_item_check>
<menu_item_check
+ label="Render Avatar Cloth"
+ name="Render Avatar Cloth">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="RenderAvatarCloth" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="RenderAvatarCloth" />
+ </menu_item_check>
+ <menu_item_check
label="Collect Font Vertex Buffers"
name="Collect Font Vertex Buffers">
<menu_item_check.on_check
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 5b9144e535..dc556d4529 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -202,6 +202,16 @@ No tutorial is currently available.
<notification
icon="alertmodal.tga"
+ name="FoundLegacyNsisInstallation"
+ type="alertmodal">
+ [APP_NAME] found an installation of an older version [VERSION]. To uninstall the older version, please follow [https://community.secondlife.com/knowledgebase/english/how-to-uninstall-and-reinstall-second-life-r524 this manual].
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="LoginFailedNoNetwork"
type="alertmodal">
<tag>fail</tag>
@@ -2466,6 +2476,17 @@ You already have a landmark for this location.
</notification>
<notification
+ icon="alert.tga"
+ name="LandmarkLocationUnknown"
+ type="alert">
+Viewer wasn't able to get region's location. Region might be temporarily unavailable, was removed or landmark failed to load.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ <tag>fail</tag>
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="CannotCreateLandmarkNotOwner"
type="alertmodal">
@@ -4412,6 +4433,14 @@ Click OK to download and install.
<notification
icon="alertmodal.tga"
+ name="DownloadingUpdate"
+ type="alertmodal">
+Downloading update [VERSION]...
+The viewer will restart once the download is complete.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="OptionalUpdateReady"
type="alertmodal">
Version [VERSION] has been downloaded and is ready to install.
diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml
index afd3f9410b..b05904cd28 100644
--- a/indra/newview/skins/default/xui/en/panel_classified_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml
@@ -344,7 +344,6 @@
width="290"
height="215">
<text
- auto_resize="false"
follows="left|top"
font.style="BOLD"
height="10"
diff --git a/indra/newview/skins/default/xui/en/panel_dir_classified.xml b/indra/newview/skins/default/xui/en/panel_dir_classified.xml
new file mode 100644
index 0000000000..f4d3ccf748
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dir_classified.xml
@@ -0,0 +1,215 @@
+<panel
+ border="true"
+ top="30"
+ follows="left|top|right|bottom"
+ height="533"
+ label="Classifieds"
+ left="1"
+ left_delta="68"
+ mouse_opaque="false"
+ name="panel_dir_classified"
+ width="778">
+ <string name="searching_text">
+ Searching...
+ </string>
+ <string name="not_found_text">
+ None Found.
+ </string>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ top="8"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="5"
+ mouse_opaque="true"
+ name="find"
+ v_pad="0"
+ width="150">
+ Enter search terms:
+ </text>
+ <combo_box
+ allow_text_entry="false"
+ top_delta="0"
+ left="525"
+ layout="topleft"
+ follows="right|top"
+ height="18"
+ max_chars="20"
+ mouse_opaque="true"
+ name="Category"
+ width="128">
+ <combo_item name="AnyCategory" value="0" label="Any Category"/>
+ <combo_item name="Shopping" value="1" label="Shopping"/>
+ <combo_item name="LandRental" value="2" label="Land Rental"/>
+ <combo_item name="PropertyRental" value="3" label="Property Rental"/>
+ <combo_item name="SpecialAttraction" value="4" label="Special Attraction"/>
+ <combo_item name="NewProducts" value="5" label="New Products"/>
+ <combo_item name="Employment" value="6" label="Employment"/>
+ <combo_item name="Wanted" value="7" label="Wanted"/>
+ <combo_item name="Service" value="8" label="Service"/>
+ <combo_item name="Personal" value="9" label="Personal"/>
+ </combo_box>
+ <check_box
+ left_pad="5"
+ control_name="ShowPGClassifieds"
+ follows="right|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incpg"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_PG_Dark"
+ tool_tip="General"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_general"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowMatureClassifieds"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incmature"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_M_Dark"
+ tool_tip="Moderate"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_moderate"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowAdultClassifieds"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="false"
+ label=""
+ mouse_opaque="true"
+ name="incadult"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_R_Dark"
+ tool_tip="Adult"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_adult"
+ width="16"/>
+ <line_editor
+ bevel_style="in"
+ border_style="line"
+ border_thickness="1"
+ top_pad="3"
+ follows="left|right|top"
+ layout="topleft"
+ font="SansSerif"
+ height="18"
+ left="5"
+ max_length="63"
+ mouse_opaque="true"
+ name="name"
+ width="650" />
+ <button
+ follows="right|top"
+ layout="topleft"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Search"
+ top_delta="0"
+ left_pad="5"
+ mouse_opaque="true"
+ name="Search"
+ width="105" />
+ <scroll_list
+ background_visible="true"
+ layout="topleft"
+ top_pad="3"
+ column_padding="0"
+ draw_border="true"
+ draw_heading="true"
+ follows="left|top|right|bottom"
+ height="450"
+ left="5"
+ mouse_opaque="true"
+ multi_select="false"
+ name="results"
+ search_column="2"
+ width="336">
+ <column label="" name="icon" width="24" />
+ <column label="" name="type" width="-1" />
+ <column label="Name" name="name" width="225" />
+ <column label="Price" name="price" width="55" />
+ </scroll_list>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ bottom_delta="-20"
+ follows="left|bottom"
+ font="SansSerifSmall"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="4"
+ mouse_opaque="true"
+ name="result_text"
+ v_pad="0"
+ width="80" />
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ hover_glow_amount="0.15"
+ tool_tip="Previous page"
+ follows="right|bottom"
+ height="22"
+ right="305"
+ bottom="-533"
+ name="prev_btn"
+ width="32" />
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="Next page"
+ follows="right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="next_btn"
+ top_delta="0"
+ width="32"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dir_events.xml b/indra/newview/skins/default/xui/en/panel_dir_events.xml
new file mode 100644
index 0000000000..b194ce5646
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dir_events.xml
@@ -0,0 +1,300 @@
+<panel
+ border="true"
+ top="30"
+ default_tab_group="1"
+ follows="left|top|right|bottom"
+ height="533"
+ label="Events"
+ left="1"
+ mouse_opaque="false"
+ name="panel_dir_events"
+ width="778">
+ <string name="searching_text">
+ Searching...
+ </string>
+ <string name="not_found_text">
+ None Found.
+ </string>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ top="8"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="5"
+ mouse_opaque="true"
+ name="find"
+ width="150">
+ Enter search terms:
+ </text>
+ <combo_box
+ allow_text_entry="false"
+ top_delta="0"
+ left="525"
+ layout="topleft"
+ follows="right|top"
+ height="18"
+ max_chars="20"
+ mouse_opaque="true"
+ name="category_combo"
+ width="128">
+ <combo_item name="All" value="0" label="Any Category"/>
+ <combo_item name="Discussion" value="18" label="Discussion"/>
+ <combo_item name="Sports" value="19" label="Sports"/>
+ <combo_item name="LiveMusic" value="20" label="Live Music"/>
+ <combo_item name="LiveDJ" value="30" label="Live DJ"/>
+ <combo_item name="Commercial" value="22" label="Commercial"/>
+ <combo_item name="Nightlife/Entertainment" value="23" label="Nightlife/Entertainment"/>
+ <combo_item name="Games/Contests" value="24" label="Games/Contests"/>
+ <combo_item name="Pageants" value="25" label="Pageants"/>
+ <combo_item name="Education" value="26" label="Education"/>
+ <combo_item name="ArtsandCulture" value="27" label="Arts and Culture"/>
+ <combo_item name="Charity/SupportGroups" value="28" label="Charity/Support Groups"/>
+ <combo_item name="Miscellaneous" value="29" label="Miscellaneous"/>
+ </combo_box>
+ <check_box
+ left_pad="5"
+ control_name="ShowPGEvents"
+ follows="right|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incpg"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_PG_Dark"
+ tool_tip="General"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_general"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowMatureEvents"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incmature"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_M_Dark"
+ tool_tip="Moderate"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_moderate"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowAdultEvents"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="false"
+ label=""
+ mouse_opaque="true"
+ name="incadult"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_R_Dark"
+ tool_tip="Adult"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_adult"
+ width="16"/>
+ <line_editor
+ bevel_style="in"
+ border_style="line"
+ border_thickness="1"
+ top_pad="3"
+ follows="left|right|top"
+ layout="topleft"
+ font="SansSerif"
+ height="18"
+ left="5"
+ max_length="63"
+ mouse_opaque="true"
+ name="event_search_text"
+ width="650" />
+ <button
+ follows="right|top"
+ layout="topleft"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Search"
+ top_delta="0"
+ left_pad="5"
+ mouse_opaque="true"
+ name="Search"
+ width="105" />
+ <scroll_list
+ background_visible="true"
+ layout="topleft"
+ top_pad="3"
+ column_padding="0"
+ draw_border="true"
+ draw_heading="true"
+ follows="left|top|right|bottom"
+ height="450"
+ left="5"
+ mouse_opaque="true"
+ multi_select="false"
+ name="results"
+ search_column="2"
+ width="336">
+ <column label="" name="icon" width="24" />
+ <column label="" name="type" width="-1" />
+ <column dynamicwidth="true" label="Name" name="name" />
+ <column label="Time (PT)" name="date" sort="time" width="106" />
+ <column label="" name="event_id" width="-1" />
+ <column label="Time" name="time" width="-1" />
+ </scroll_list>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ bottom_delta="-20"
+ drop_shadow_visible="true"
+ follows="left|bottom"
+ font="SansSerifSmall"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="4"
+ mouse_opaque="true"
+ name="result_text"
+ v_pad="0"
+ width="80" />
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ hover_glow_amount="0.15"
+ tool_tip="Previous page"
+ follows="right|bottom"
+ height="22"
+ right="305"
+ bottom="-533"
+ name="prev_btn"
+ width="32" />
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="Next page"
+ follows="right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="next_btn"
+ top_delta="0"
+ width="32"/>
+ <radio_group
+ top="5"
+ draw_border="false"
+ follows="top|left"
+ layout="topleft"
+ height="16"
+ left="160"
+ mouse_opaque="true"
+ name="date_mode"
+ initial_value="current"
+ width="200">
+ <radio_item
+ layout="topleft"
+ left="3"
+ top="0"
+ follows="left|top"
+ height="20"
+ mouse_opaque="true"
+ name="current"
+ width="170"
+ label="In-Progress &amp; Upcoming"/>
+ <radio_item
+ layout="topleft"
+ follows="left|top"
+ height="20"
+ top_delta="0"
+ left_delta="151"
+ mouse_opaque="true"
+ name="date"
+ width="56"
+ label="Date"/>
+ </radio_group>
+ <button
+ top="6"
+ left_pad="15"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="&lt;&lt;"
+ label_selected="&lt;&lt;"
+ left_delta="54"
+ mouse_opaque="true"
+ name="back_btn"
+ tool_tip="Go back a day"
+ width="20" />
+ <text
+ top="8"
+ bg_visible="false"
+ border_visible="false"
+ left_pad="1"
+ layout="topleft"
+ drop_shadow_visible="true"
+ follows="left|top"
+ font="SansSerif"
+ h_pad="0"
+ halign="center"
+ height="14"
+ mouse_opaque="true"
+ name="date_text"
+ v_pad="0"
+ width="48">
+ 6/6
+ </text>
+ <button
+ top="6"
+ left_pad="1"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="&gt;&gt;"
+ label_selected="&gt;&gt;"
+ left_delta="50"
+ mouse_opaque="true"
+ name="forward_btn"
+ tool_tip="Go forward a day"
+ width="20" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dir_groups.xml b/indra/newview/skins/default/xui/en/panel_dir_groups.xml
new file mode 100644
index 0000000000..ed3f709005
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dir_groups.xml
@@ -0,0 +1,129 @@
+<panel
+ border="true"
+ top="30"
+ follows="left|top|right|bottom"
+ height="533"
+ label="Groups"
+ left="1"
+ mouse_opaque="false"
+ name="panel_dir_groups"
+ width="778">
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ hover_glow_amount="0.15"
+ tool_tip="Previous page"
+ follows="right|bottom"
+ height="22"
+ right="305"
+ bottom="-533"
+ name="prev_btn"
+ width="32" />
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="Next page"
+ follows="right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="next_btn"
+ top_delta="0"
+ width="32"/>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ top="8"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="5"
+ mouse_opaque="true"
+ name="find"
+ v_pad="0"
+ width="150">
+ Enter search terms:
+ </text>
+ <check_box
+ top_delta="0"
+ control_name="ShowMatureGroups"
+ follows="right|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="false"
+ label="Include Mature groups"
+ left="510"
+ mouse_opaque="true"
+ name="incmature"
+ width="100" />
+ <line_editor
+ bevel_style="in"
+ border_style="line"
+ border_thickness="1"
+ top_pad="5"
+ follows="left|right|top"
+ font="SansSerif"
+ height="18"
+ left="5"
+ max_length="63"
+ mouse_opaque="true"
+ name="name"
+ width="650" />
+ <button
+ follows="right|top"
+ layout="topleft"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Search"
+ top_delta="0"
+ left_pad="5"
+ mouse_opaque="true"
+ name="Search"
+ width="105" />
+ <scroll_list
+ background_visible="true"
+ layout="topleft"
+ top_pad="3"
+ column_padding="0"
+ draw_border="true"
+ draw_heading="true"
+ follows="left|top|right|bottom"
+ height="450"
+ left="5"
+ mouse_opaque="true"
+ multi_select="false"
+ name="results"
+ search_column="2"
+ width="336">
+ <column label="" name="icon" width="24" sort="score" sort_ascending="false" />
+ <column label="" name="type" width="-1" />
+ <column label="Name" name="name" dynamicwidth="true" />
+ <column label="Members" name="members" width="100" halign="left" sort_ascending="false" />
+ <column label="" name="score" width="-1"/>
+ </scroll_list>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ bottom_delta="-20"
+ follows="left|bottom"
+ font="SansSerifSmall"
+ h_pad="0" halign="left"
+ height="16" left="4"
+ mouse_opaque="true"
+ name="result_text"
+ v_pad="0"
+ width="328" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dir_land.xml b/indra/newview/skins/default/xui/en/panel_dir_land.xml
new file mode 100644
index 0000000000..61629f3033
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dir_land.xml
@@ -0,0 +1,268 @@
+<panel border="true" top="30" follows="left|top|right|bottom" height="533"
+ label="Land Sales" left="1" mouse_opaque="false" name="panel_dir_land"
+ width="778">
+ <string name="searching_text">
+ Searching...
+ </string>
+ <string name="not_found_text">
+ None Found.
+ </string>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ top="8"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="5"
+ mouse_opaque="true"
+ name="find"
+ width="150">
+ Enter search terms:
+ </text>
+ <combo_box
+ allow_text_entry="false"
+ follows="top|right"
+ layout="topleft"
+ height="18"
+ top_delta="0"
+ left="525"
+ max_chars="20"
+ mouse_opaque="true"
+ name="type"
+ width="128">
+ <combo_item name="AllTypes" value="All Types" label="All Types"/>
+ <combo_item name="Auction" value="Auction" label="Auction"/>
+ <combo_item name="MainlandSales" value="Mainland Sales" label="For Sale - Mainland"/>
+ <combo_item name="EstateSales" value="Estate Sales" label="For Sale - Estate"/>
+ </combo_box>
+ <check_box
+ left_pad="5"
+ control_name="ShowPGLand"
+ follows="right|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incpg"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_PG_Dark"
+ tool_tip="General"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_general"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowMatureLand"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incmature"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_M_Dark"
+ tool_tip="Moderate"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_moderate"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowAdultLand"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="false"
+ label=""
+ mouse_opaque="true"
+ name="incadult"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_R_Dark"
+ tool_tip="Adult"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_adult"
+ width="16"/>
+ <check_box
+ top_pad="3"
+ layout="topleft"
+ control_name="FindLandPrice"
+ follows="left|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label="Price &#8804; "
+ left="5"
+ mouse_opaque="true"
+ name="pricecheck"
+ width="60" />
+ <line_editor
+ bevel_style="in"
+ border_style="line"
+ border_thickness="1"
+ follows="left|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ left_pad="1"
+ max_length="10"
+ mouse_opaque="true"
+ name="priceedit"
+ width="50" />
+ <text
+ bg_visible="false"
+ border_visible="false"
+ follows="left|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ halign="left"
+ height="16"
+ left_pad="3"
+ mouse_opaque="true"
+ name="pricecheck_symbol"
+ width="15">
+ L$
+ </text>
+ <check_box
+ control_name="FindLandArea"
+ follows="left|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label="Area &#8805; "
+ left_pad="10"
+ mouse_opaque="true"
+ name="areacheck"
+ width="60" />
+ <line_editor
+ bevel_style="in"
+ border_style="line"
+ border_thickness="1"
+ follows="left|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ left_pad="1"
+ max_length="10"
+ mouse_opaque="true"
+ name="areaedit"
+ width="50" />
+ <text
+ bg_visible="false"
+ border_visible="false"
+ follows="left|top"
+ layout="topleft"
+ left_pad="3"
+ font="SansSerifSmall"
+ halign="left"
+ height="16"
+ mouse_opaque="true"
+ name="areacheck_symbol"
+ width="15">
+ m²
+ </text>
+ <button
+ follows="right|top"
+ layout="topleft"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Search"
+ top_delta="0"
+ left="660"
+ mouse_opaque="true"
+ name="Search"
+ width="105" />
+ <scroll_list
+ background_visible="true"
+ layout="topleft"
+ top_pad="3"
+ column_padding="0"
+ draw_border="true"
+ draw_heading="true"
+ follows="left|top|right|bottom"
+ height="450"
+ left="5"
+ mouse_opaque="true"
+ multi_select="false"
+ name="results"
+ search_column="2"
+ width="336">
+ <column label="" name="icon" width="24" />
+ <column dynamicwidth="true" label="Name" name="name" />
+ <column label="Type" name="landtype" width="50" />
+ <column label="L$ Price" name="price" width="65" />
+ <column label="Area" name="area" width="50" />
+ <column label="L$/m²" name="per_meter" width="65" />
+ </scroll_list>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ bottom_delta="-20"
+ drop_shadow_visible="true"
+ follows="left|bottom"
+ font="SansSerifSmall"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="4"
+ mouse_opaque="true"
+ name="result_text"
+ v_pad="0"
+ width="328" />
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ hover_glow_amount="0.15"
+ tool_tip="Previous page"
+ follows="right|bottom"
+ height="22"
+ right="305"
+ bottom="-533"
+ name="prev_btn"
+ width="32" />
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="Next page"
+ follows="right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="next_btn"
+ top_delta="0"
+ width="32"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dir_people.xml b/indra/newview/skins/default/xui/en/panel_dir_people.xml
new file mode 100644
index 0000000000..fe1a7e9d94
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dir_people.xml
@@ -0,0 +1,120 @@
+<panel
+ border="true"
+ top="30"
+ follows="left|top|right|bottom"
+ height="533"
+ label="People"
+ left="1"
+ mouse_opaque="false"
+ name="panel_dir_people"
+ width="778">
+ <string name="searching_text">
+ Searching...
+ </string>
+ <string name="not_found_text">
+ None Found.
+ </string>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ top="8"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="5"
+ mouse_opaque="true"
+ name="find"
+ width="150">
+ Enter search terms:
+ </text>
+ <line_editor
+ bevel_style="in"
+ border_style="line"
+ border_thickness="1"
+ top_pad="5"
+ follows="left|right|top"
+ font="SansSerif"
+ height="18"
+ left="5"
+ max_length="63"
+ mouse_opaque="true"
+ name="name"
+ width="650" />
+ <button
+ follows="right|top"
+ layout="topleft"
+ font="SansSerif"
+ top_delta="0"
+ left_pad="5"
+ height="20"
+ label="Search"
+ mouse_opaque="true"
+ name="Search"
+ width="105" />
+ <scroll_list
+ background_visible="true"
+ layout="topleft"
+ top_pad="3"
+ column_padding="0"
+ draw_border="true"
+ draw_heading="true"
+ follows="left|top|right|bottom"
+ height="450"
+ left="5"
+ mouse_opaque="true"
+ multi_select="false"
+ name="results"
+ search_column="2"
+ width="336">
+ <column label="" name="icon" width="24" />
+ <column label="" name="type" width="-1" />
+ <column label="Name" name="name" width="274" />
+ </scroll_list>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ bottom_delta="-20"
+ follows="left|bottom"
+ font="SansSerifSmall"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="4"
+ mouse_opaque="true"
+ name="result_text"
+ v_pad="0"
+ width="328" />
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ hover_glow_amount="0.15"
+ tool_tip="Previous page"
+ follows="right|bottom"
+ height="22"
+ right="305"
+ bottom="-533"
+ name="prev_btn"
+ width="32" />
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="Next page"
+ follows="right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="next_btn"
+ top_delta="0"
+ width="32"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dir_places.xml b/indra/newview/skins/default/xui/en/panel_dir_places.xml
new file mode 100644
index 0000000000..d337f3addf
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dir_places.xml
@@ -0,0 +1,215 @@
+<panel
+ border="true"
+ top="30"
+ follows="left|top|right|bottom"
+ height="533"
+ label="Places"
+ left="1"
+ mouse_opaque="false"
+ name="panel_dir_places"
+ width="778">
+ <string name="searching_text">
+ Searching...
+ </string>
+ <string name="not_found_text">
+ None Found.
+ </string>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ top="8"
+ layout="topleft"
+ follows="left|top"
+ font="SansSerif"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="5"
+ mouse_opaque="true"
+ name="find"
+ width="150">
+ Enter search terms:
+ </text>
+ <combo_box
+ allow_text_entry="false"
+ follows="right|top"
+ layout="topleft"
+ height="18"
+ top_delta="0"
+ left="525"
+ max_chars="20"
+ mouse_opaque="true"
+ name="Category"
+ width="128">
+ <combo_item name="AnyCategory" value="any" label="Any Category"/>
+ <combo_item name="LindenLocation" value="linden" label="Linden Location"/>
+ <combo_item name="Arts&amp;Culture" value="arts" label="Arts &amp; Culture"/>
+ <combo_item name="Business" value="store" label="Business"/>
+ <combo_item name="Educational" value="educational" label="Educational"/>
+ <combo_item name="Gaming" value="game" label="Gaming"/>
+ <combo_item name="Hangout" value="gather" label="Hangout"/>
+ <combo_item name="NewcomerFriendly" value="newcomer" label="Newcomer Friendly"/>
+ <combo_item name="Parks&amp;Nature" value="park" label="Parks &amp; Nature"/>
+ <combo_item name="Residential" value="home" label="Residential"/>
+ <combo_item name="Shopping" value="shopping" label="Shopping"/>
+ <combo_item name="Adult" value="adult" label="Adult"/>
+ <combo_item name="Other" value="other" label="Other"/>
+ </combo_box>
+ <check_box
+ left_pad="5"
+ control_name="ShowPGSims"
+ follows="right|top"
+ layout="topleft"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incpg"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_PG_Dark"
+ tool_tip="General"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_general"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowMatureSims"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="true"
+ label=""
+ mouse_opaque="true"
+ name="incmature"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_M_Dark"
+ tool_tip="Moderate"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_moderate"
+ width="16"/>
+ <check_box
+ left_pad="4"
+ top_delta="1"
+ layout="topleft"
+ control_name="ShowAdultSims"
+ follows="right|top"
+ font="SansSerifSmall"
+ height="16"
+ initial_value="false"
+ label=""
+ mouse_opaque="true"
+ name="incadult"
+ width="15" />
+ <icon
+ follows="right|top"
+ height="16"
+ top_delta="-1"
+ image_name="Parcel_R_Dark"
+ tool_tip="Adult"
+ layout="topleft"
+ left_pad="2"
+ name="rating_icon_adult"
+ width="16"/>
+ <line_editor
+ bevel_style="in"
+ border_style="line"
+ border_thickness="1"
+ top_pad="3"
+ follows="left|right|top"
+ layout="topleft"
+ font="SansSerif"
+ height="18"
+ left="5"
+ max_length="63"
+ mouse_opaque="true"
+ name="name"
+ width="650" />
+ <button
+ follows="right|top"
+ layout="topleft"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Search"
+ top_delta="0"
+ left_pad="5"
+ mouse_opaque="true"
+ name="Search"
+ width="105" />
+ <scroll_list
+ background_visible="true"
+ layout="topleft"
+ top_pad="3"
+ column_padding="0"
+ draw_border="true"
+ draw_heading="true"
+ follows="left|top|right|bottom"
+ height="450"
+ left="5"
+ mouse_opaque="true"
+ multi_select="false"
+ name="results"
+ search_column="2"
+ width="336">
+ <column label="" name="icon" width="24" />
+ <column dynamicwidth="true" label="Name" name="name" />
+ <column label="Traffic" name="dwell" width="75" />
+ </scroll_list>
+ <text
+ bg_visible="false"
+ border_visible="false"
+ bottom_delta="-20"
+ follows="left|bottom"
+ font="SansSerifSmall"
+ h_pad="0"
+ halign="left"
+ height="16"
+ left="4"
+ mouse_opaque="true"
+ name="result_text"
+ v_pad="0"
+ width="328" />
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ hover_glow_amount="0.15"
+ tool_tip="Previous page"
+ follows="right|bottom"
+ height="22"
+ right="305"
+ bottom="-533"
+ name="prev_btn"
+ width="32" />
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="Next page"
+ follows="right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="next_btn"
+ top_delta="0"
+ width="32"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dir_web.xml b/indra/newview/skins/default/xui/en/panel_dir_web.xml
new file mode 100644
index 0000000000..0dde67681a
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dir_web.xml
@@ -0,0 +1,76 @@
+<panel
+ border="true"
+ top="30"
+ follows="all"
+ height="543"
+ label="Web"
+ left="1"
+ mouse_opaque="false"
+ name="panel_dir_web"
+ width="778">
+ <web_browser
+ top="0"
+ left="0"
+ height="515"
+ width="778"
+ follows="all"
+ layout="topleft"
+ name="web_search"
+ trusted_content="true"/>
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ hover_glow_amount="0.15"
+ tool_tip="Navigate back"
+ follows="left|bottom"
+ height="22"
+ layout="topleft"
+ left="5"
+ name="back_btn"
+ top_pad="7"
+ width="22" />
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ chrome="true"
+ tool_tip="Navigate forward"
+ follows="left|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="forward_btn"
+ top_delta="0"
+ width="22"/>
+ <button
+ name="home_btn"
+ follows="left|bottom"
+ image_overlay="Home_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ layout="topleft"
+ tool_tip="Search page"
+ left_pad="5"
+ height="22"
+ width="22"/>
+ <text
+ type="string"
+ length="200"
+ follows="bottom|left"
+ height="20"
+ layout="topleft"
+ left_pad="20"
+ top_delta="5"
+ name="statusbartext"
+ parse_urls="false"
+ text_color="0.4 0.4 0.4 1"
+ width="495"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_event_info.xml b/indra/newview/skins/default/xui/en/panel_event_info.xml
new file mode 100644
index 0000000000..b31918b919
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_event_info.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ border="false"
+ follows="all"
+ height="570"
+ left="0"
+ top="0"
+ name="panel_event_info"
+ title="Event"
+ width="330">
+ <string name="none">
+ none
+ </string>
+ <string name="notify">
+ Notify
+ </string>
+ <string name="dont_notify">
+ Don&apos;t Notify
+ </string>
+ <text
+ top="4"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerifBig"
+ left="5"
+ width="417"
+ height="18"
+ use_ellipses="true"
+ name="event_name">
+ (none)
+ </text>
+ <text
+ top_pad="10"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_category_label">
+ Type:
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="120"
+ name="event_category">
+ (none)
+ </text>
+ <text
+ top_pad="10"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_mature_label">
+ Mature Content:
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="120"
+ name="event_mature_yes"
+ visible="false">
+ Yes
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="120"
+ name="event_mature_no"
+ visible="false">
+ No
+ </text>
+ <text
+ top_pad="10"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_date_label">
+ Date:
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="120"
+ name="event_date">
+ (none)
+ </text>
+ <text
+ top_pad="10"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_duration_label">
+ Event Duration:
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="120"
+ name="event_duration">
+ (none)
+ </text>
+ <text
+ top_pad="10"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_runby_label">
+ Run By:
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="116"
+ name="event_runby">
+ (none)
+ </text>
+ <text
+ top_pad="10"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_location_label">
+ Location:
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="120"
+ name="event_location">
+ (none)
+ </text>
+ <text
+ top_pad="10"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_cover_label">
+ Cover Charge:
+ </text>
+ <text
+ top_delta="0"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="120"
+ name="event_cover">
+ (none)
+ </text>
+ <text
+ top_pad="20"
+ follows="top|left"
+ layout="topleft"
+ font="SansSerif"
+ left="20"
+ name="event_desc_label">
+ Description:
+ </text>
+ <text_editor
+ top_pad="10"
+ follows="left|top"
+ layout="topleft"
+ height="220"
+ left="20"
+ enabled="false"
+ max_length="1024"
+ name="event_desc"
+ width="400" />
+ <button
+ bottom_delta="-24"
+ follows="left|top"
+ height="20"
+ label="Teleport"
+ left="20"
+ name="teleport_btn"
+ width="130" />
+ <button
+ bottom_delta="0"
+ follows="left|top"
+ height="20"
+ label="Show on Map"
+ left="155"
+ name="map_btn"
+ width="130" />
+ <button
+ bottom_delta="0"
+ follows="left|top"
+ height="20"
+ label="Notify"
+ left="290"
+ name="notify_btn"
+ width="130" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml
deleted file mode 100644
index cdbfd4ac56..0000000000
--- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_classifieds.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="false"
- follows="all"
- height="566"
- layout="topleft"
- left="1"
- width="780"
- label="Classifieds"
- name="panel_ls_classifieds">
- <panel
- border="false"
- follows="top|left|right"
- height="53"
- layout="topleft"
- left="0"
- width="780"
- name="panel_ls_input">
- <text
- type="string"
- length="1"
- follows="left|top"
- top_pad="5"
- layout="topleft"
- left="6"
- name="search_text"
- top="12"
- height="16"
- width="156">
- Enter search terms:
- </text>
- <search_combo_box
- layout="topleft"
- follows="left|top|right"
- height="23"
- left_delta="0"
- name="classifieds_edit"
- top="29"
- width="650" />
- <combo_box
- follows="right|top"
- layout="topleft"
- height="23"
- allow_text_entry="false"
- top_delta="0"
- left_pad="1"
- name="classifieds_category"
- width="120">
- <combo_box.commit_callback
- function="CommitSearch" />
- </combo_box>
- <check_box
- control_name="ShowPGClassifieds"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left="660"
- name="pg_all"
- top="12"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_PG_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_general"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowMatureClassifieds"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="mature_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_M_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_moderate"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowAdultClassifieds"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="adult_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_R_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_adult"
- top_delta="-1"
- width="18"/>
- </panel>
- <!-- Search Pane -->
- <panel
- border="true"
- follows="all"
- height="510"
- layout="topleft"
- left="1"
- width="410"
- top_pad="1"
- name="panel_ls_scrolllist">
- <scroll_list
- draw_heading="true"
- follows="all"
- height="485"
- layout="topleft"
- left="0"
- name="search_results_classifieds"
- top="0"
- width="410">
- <columns
- label=""
- name="icon"
- width="20" />
- <columns
- label="Name"
- name="classified_name"
- relwidth="0.70" />
- <columns
- label="Listing Price"
- name="price"
- relwidth="0.3"/>
- </scroll_list>
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Back"
- name="classifieds_back"
- top_pad="2"
- left="3"
- width="100" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Next"
- name="classifieds_next"
- width="100"
- left_pad="1" />
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml
deleted file mode 100644
index 00f5de5ed4..0000000000
--- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_events.xml
+++ /dev/null
@@ -1,258 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="false"
- follows="all"
- height="566"
- layout="topleft"
- left="1"
- width="780"
- label="Events"
- name="panel_ls_events">
- <panel
- border="false"
- follows="top|left|right"
- height="53"
- layout="topleft"
- left="0"
- width="780"
- name="panel_ls_input">
- <text
- type="string"
- length="1"
- follows="left|top"
- top_pad="5"
- layout="topleft"
- left="6"
- name="search_text"
- top="12"
- height="16"
- width="156">
- Enter search terms:
- </text>
- <radio_group
- left_pad="20"
- height="16"
- width="300"
- layout="topleft"
- name="events_search_mode">
- <radio_item
- height="16"
- label="Ongoing and Upcoming"
- layout="topleft"
- name="current"
- value="current"
- top_pad="0"
- width="120" />
- <radio_item
- height="16"
- label="By Date"
- layout="topleft"
- name="date"
- value="date"
- left_pad="70"
- width="120" />
- <radio_group.commit_callback
- function="CommitSearch" />
- </radio_group>
- <text
- type="string"
- length="1"
- follows="left|top"
- top_delta="0"
- layout="topleft"
- left_pad="5"
- name="events_date"
- font.style="BOLD"
- height="16"
- width="80">
- 4/20
- </text>
- <search_combo_box
- layout="topleft"
- follows="left|top|right"
- height="23"
- left="6"
- name="events_edit"
- top="29"
- width="650" />
- <combo_box
- follows="right|top"
- layout="topleft"
- height="23"
- top_delta="0"
- left_pad="1"
- name="events_category"
- width="120">
- <combo_box.item label="Any Category" name="any" value="0" />
- <combo_box.item label="" value="filter_separator" enabled="false" />
- <combo_box.item label="Discussion" name="discussion" value="18" />
- <combo_box.item label="Sports" name="sports" value="19" />
- <combo_box.item label="Live DJ" name="dj" value="30" />
- <combo_box.item label="Live Music" name="music" value="20" />
- <!-- <combo_box.item label="???" name="mystery_category" value="21" /> -->
- <combo_box.item label="Commercial" name="commercial" value="22" />
- <combo_box.item label="Nightlife/Entertainment" name="nightlife" value="23" />
- <combo_box.item label="Games/Contests" name="games" value="24" />
- <combo_box.item label="Pageants" name="pageants" value="25" />
- <combo_box.item label="Education" name="education" value="26" />
- <combo_box.item label="Arts and Culture" name="arts" value="27" />
- <combo_box.item label="Charity/Support Groups" name="charity" value="28" />
- <combo_box.item label="Miscellaneous" name="misc" value="29" />
- <combo_box.commit_callback
- function="CommitSearch" />
- </combo_box>
- <check_box
- control_name="ShowPGEvents"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left="660"
- name="pg_all"
- top="12"
- width="15" >
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_PG_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_general"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowMatureEvents"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="mature_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_M_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_moderate"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowAdultEvents"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="adult_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_R_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_adult"
- top_delta="-1"
- width="18"/>
- </panel>
- <!-- Search Pane -->
- <panel
- border="true"
- follows="all"
- height="510"
- layout="topleft"
- left="1"
- width="410"
- top_pad="1"
- name="panel_ls_scrolllist">
- <scroll_list
- draw_heading="true"
- follows="all"
- height="485"
- layout="topleft"
- left="0"
- name="search_results_events"
- sort_ascending="true"
- sort_column="3"
- top="0"
- width="410">
- <columns
- label=""
- name="icon"
- width="20" />
- <columns
- label="Event Name"
- name="name"
- relwidth="0.72" />
- <columns
- label="Date/Time"
- name="date"
- sort_column="time"
- relwidth="0.28" />
- <columns
- label="Time"
- name="time"
- width="0"/>
- </scroll_list>
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Yesterday"
- name="events_yesterday"
- top_pad="2"
- left="3"
- width="100" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Today"
- name="events_today"
- width="100"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Tomorrow"
- name="events_tomorrow"
- width="100"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- image_bottom_pad="2"
- image_overlay="Arrow_Left_Off"
- image_overlay_alignment="left"
- label="Back"
- name="events_back"
- width="25"
- left_pad="1" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- image_bottom_pad="2"
- image_overlay="Arrow_Right_Off"
- image_overlay_alignment="left"
- label="Next"
- name="events_next"
- width="25"
- left_pad="1" />
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_groups.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_groups.xml
deleted file mode 100644
index 90001952f7..0000000000
--- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_groups.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="false"
- follows="all"
- height="566"
- layout="topleft"
- left="1"
- width="780"
- label="Groups"
- name="panel_ls_groups">
- <panel
- border="false"
- follows="top|left|right"
- height="53"
- layout="topleft"
- left="0"
- width="780"
- name="panel_ls_input">
- <text
- type="string"
- length="1"
- follows="left|top"
- top_pad="5"
- layout="topleft"
- left="6"
- name="search_text"
- top="12"
- height="16"
- width="156">
- Enter search terms:
- </text>
- <search_combo_box
- layout="topleft"
- follows="left|top|right"
- height="23"
- left_delta="0"
- name="groups_edit"
- top="29"
- width="770">
- </search_combo_box>
- <check_box
- control_name="ShowPGGroups"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left="660"
- name="pg_all"
- top="12"
- width="15"
- visible="false"/>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_PG_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_general"
- top_delta="-1"
- width="18"
- visible="false"/>
- <check_box
- control_name="ShowMatureGroups"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="mature_all"
- top_delta="1"
- width="15"
- visible="false"/>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_M_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_moderate"
- top_delta="-1"
- width="18"
- visible="false"/>
- <check_box
- control_name="ShowAdultGroups"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="adult_all"
- top_delta="1"
- width="15"
- visible="false"/>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_R_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_adult"
- top_delta="-1"
- width="18"
- visible="false"/>
- </panel>
- <!-- Search Pane -->
- <panel
- border="true"
- follows="all"
- height="510"
- layout="topleft"
- left="1"
- width="410"
- top_pad="1"
- name="panel_ls_scrolllist">
- <scroll_list
- draw_heading="true"
- follows="all"
- height="485"
- layout="topleft"
- left="0"
- name="search_results_groups"
- top="0"
- width="410">
- <columns
- label=""
- name="icon"
- width="20" />
- <columns
- label="Group Name"
- name="group_name"
- relwidth="0.72" />
- <columns
- label="Members"
- name="members"
- relwidth="0.25" />
- <columns
- label="Score"
- name="score"
- width="0" />
- </scroll_list>
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Back"
- name="groups_back"
- top_pad="2"
- left="3"
- width="100" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Next"
- name="groups_next"
- width="100"
- left_pad="1" />
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_land.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_land.xml
deleted file mode 100644
index bb03a1e999..0000000000
--- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_land.xml
+++ /dev/null
@@ -1,281 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="false"
- follows="all"
- height="566"
- layout="topleft"
- left="1"
- width="780"
- label="Land Sales"
- name="panel_ls_land">
- <panel
- border="false"
- follows="top|left|right"
- height="53"
- layout="topleft"
- left="0"
- width="780"
- name="panel_ls_input">
- <check_box
- control_name="ShowPGLand"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left="660"
- name="pg_all"
- top="12"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_PG_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_general"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowMatureLand"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="mature_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_M_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_moderate"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowAdultLand"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="adult_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_R_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_adult"
- top_delta="-1"
- width="18"/>
- <text
- type="string"
- length="1"
- follows="left|top"
- layout="topleft"
- left="6"
- name="search_text"
- top="12"
- height="16"
- width="256">
- Enter search terms:
- </text>
- <combo_box
- control_name="FindLandType"
- follows="left|top"
- layout="topleft"
- height="23"
- allow_text_entry="false"
- top_pad="2"
- left="6"
- name="land_category"
- width="122">
- <combo_box.item label="All Categories" name="All" value="All"/>
- <combo_box.item label="Auction" name="Auction" value="Auction"/>
- <combo_box.item label="Mainland Sales" name="Mainland" value="Mainland"/>
- <combo_box.item label="Estate Sales" name="Estate" value="Estate"/>
- <combo_box.commit_callback
- function="CommitSearch" />
- </combo_box>
- <check_box
- control_name="FindLandPrice"
- follows="left|top"
- height="16"
- label="Price &lt;"
- layout="topleft"
- left_pad="3"
- name="price_check"
- top_delta="3"
- width="40" >
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <line_editor
- enabled_control="FindLandPrice"
- bevel_style="none"
- border_style="line"
- border.border_thickness="0"
- commit_on_focus_lost="false"
- follows="left|top"
- height="18"
- left_pad="20"
- name="edit_price"
- top_delta="-1"
- width="40" >
- <line_editor.commit_callback
- function="CommitSearch" />
- </line_editor>
- <check_box
- control_name="FindLandArea"
- follows="left|top"
- height="16"
- label="Area &gt;"
- layout="topleft"
- left_pad="3"
- name="area_check"
- top_delta="1"
- width="40" >
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <line_editor
- enabled_control="FindLandArea"
- bevel_style="none"
- border_style="line"
- border.border_thickness="0"
- commit_on_focus_lost="false"
- follows="left|top"
- height="18"
- left_pad="20"
- name="edit_area"
- top_delta="-1"
- width="40" >
- <line_editor.commit_callback
- function="CommitSearch" />
- </line_editor>
- <text
- type="string"
- length="1"
- follows="left|top"
- layout="topleft"
- left="365"
- name="sort_text"
- top="12"
- height="16"
- width="98">
- Sort results by:
- </text>
- <check_box
- follows="left|top"
- height="16"
- label="Ascending"
- layout="topleft"
- left_pad="3"
- name="ascending_check"
- width="100" >
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <combo_box
- follows="left|top"
- layout="topleft"
- height="23"
- allow_text_entry="false"
- left_delta="-102"
- top_pad="1"
- name="land_sort_combo"
- width="118">
- <combo_box.item label="Name" name="Name_item" value="Name"/>
- <combo_box.item label="Price" name="Price_item" value="Price"/>
- <combo_box.item label="Price per meter" name="PPM_item" value="PPM"/>
- <combo_box.item label="Area" name="Area_item" value="Area"/>
- <combo_box.commit_callback
- function="CommitSearch" />
- </combo_box>
- <button
- follows="top|right"
- height="23"
- label="Search"
- layout="topleft"
- left="678"
- top_delta="0"
- name="land_find"
- width="100" />
- </panel>
- <!-- Search Pane -->
- <panel
- border="true"
- follows="all"
- height="510"
- layout="topleft"
- left="1"
- width="410"
- top_pad="1"
- name="panel_ls_scrolllist">
- <scroll_list
- draw_heading="true"
- follows="all"
- height="485"
- layout="topleft"
- left="0"
- name="search_results_land"
- top="0"
- width="410">
- <columns
- label=""
- name="icon"
- width="20" />
- <columns
- label="Name"
- name="land_name"
- relwidth="0.45" />
- <columns
- label="Price"
- name="price"
- relwidth="0.1" />
- <columns
- label="Area"
- name="area"
- relwidth="0.1" />
- <columns
- label="L$/m"
- name="ppm"
- relwidth="0.1" />
- <columns
- label="Type"
- name="land_type"
- relwidth="0.2" />
- </scroll_list>
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Back"
- name="land_back"
- top_pad="2"
- left="3"
- width="100" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Next"
- name="land_next"
- width="100"
- left_pad="1" />
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_people.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_people.xml
deleted file mode 100644
index 28df02a7e3..0000000000
--- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_people.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="false"
- follows="all"
- height="566"
- layout="topleft"
- left="1"
- width="780"
- label="People"
- name="panel_ls_people">
- <panel
- border="false"
- follows="top|left|right"
- height="53"
- layout="topleft"
- left="0"
- width="780"
- name="panel_ls_input">
- <text
- type="string"
- length="1"
- follows="left|top"
- top_pad="5"
- layout="topleft"
- left="6"
- name="search_text"
- top="12"
- height="16"
- width="156">
- Enter search terms:
- </text>
- <search_combo_box
- layout="topleft"
- follows="left|top|right"
- height="23"
- left_delta="0"
- name="people_edit"
- top="29"
- width="770">
- </search_combo_box>
- </panel>
- <!-- Search Pane -->
- <panel
- border="true"
- follows="all"
- height="510"
- layout="topleft"
- left="1"
- width="410"
- top_pad="1"
- name="panel_ls_scrolllist">
- <scroll_list
- content_type="Agents"
- draw_heading="true"
- follows="all"
- height="485"
- layout="topleft"
- left="0"
- name="search_results_people"
- top="0"
- width="410">
- <columns
- label=""
- name="icon"
- width="20" />
- <columns
- label="Name"
- name="username"
- relwidth="1" />
- </scroll_list>
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Back"
- name="people_back"
- top_pad="2"
- left="3"
- width="100" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Next"
- name="people_next"
- width="100"
- left_pad="1" />
- </panel>
-</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml
deleted file mode 100644
index c63818f8e3..0000000000
--- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_places.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- border="false"
- follows="all"
- height="566"
- layout="topleft"
- left="1"
- width="780"
- label="Places"
- name="panel_ls_places">
- <panel
- border="false"
- follows="top|left|right"
- height="53"
- layout="topleft"
- left="0"
- width="780"
- name="panel_ls_input">
- <text
- type="string"
- length="1"
- follows="left|top"
- top_pad="5"
- layout="topleft"
- left="6"
- name="search_text"
- top="12"
- height="16"
- width="156">
- Enter search terms:
- </text>
- <search_combo_box
- layout="topleft"
- follows="left|top|right"
- height="23"
- left_delta="0"
- name="places_edit"
- top="29"
- width="650" />
- <combo_box
- follows="right|top"
- layout="topleft"
- height="23"
- allow_text_entry="false"
- top_delta="0"
- left_pad="1"
- name="places_category"
- width="120">
- <combo_box.commit_callback
- function="CommitSearch" />
- </combo_box>
- <check_box
- control_name="ShowPGSims"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left="660"
- name="pg_all"
- top="12"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_PG_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_general"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowMatureSims"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="mature_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_M_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_moderate"
- top_delta="-1"
- width="18"/>
- <check_box
- control_name="ShowAdultSims"
- follows="right|top"
- height="16"
- label=""
- layout="topleft"
- left_pad="2"
- name="adult_all"
- top_delta="1"
- width="15">
- <check_box.commit_callback
- function="CommitSearch" />
- </check_box>
- <icon
- follows="right|top"
- height="16"
- image_name="Parcel_R_Dark"
- layout="topleft"
- left_pad="2"
- name="rating_icon_adult"
- top_delta="-1"
- width="18"/>
- </panel>
- <!-- Search Pane -->
- <panel
- border="true"
- follows="all"
- height="510"
- layout="topleft"
- left="1"
- width="410"
- top_pad="1"
- name="panel_ls_scrolllist">
- <scroll_list
- draw_heading="true"
- follows="all"
- height="485"
- layout="topleft"
- left="0"
- name="search_results_places"
- top="0"
- width="410">
- <columns
- label=""
- name="icon"
- width="20" />
- <columns
- label="Name"
- name="place_name"
- relwidth="0.81" />
- <columns
- label="Traffic"
- name="dwell"
- relwidth="0.16" />
- </scroll_list>
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Back"
- name="places_back"
- top_pad="2"
- left="3"
- width="100" />
- <button
- layout="topleft"
- follows="left|bottom"
- height="23"
- label="Next"
- name="places_next"
- width="100"
- left_pad="1" />
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_web.xml b/indra/newview/skins/default/xui/en/panel_fs_search_legacy_web.xml
deleted file mode 100644
index 382a5e8945..0000000000
--- a/indra/newview/skins/default/xui/en/panel_fs_search_legacy_web.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
-border="false"
-follows="all"
-height="566"
-layout="topleft"
-left="1"
-width="780"
-label="Websearch"
-name="panel_ls_web">
- <web_browser
- top="5"
- bottom="-1"
- left="5"
- right="-5"
- layout="topleft"
- follows="all"
- name="search_browser"
- trusted_content="true"
- start_url="about:blank" />
-</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index ad9ce8f37e..ed6f98fb2b 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -67,23 +67,23 @@
<scroll_list.columns
label="Parcel"
name="name"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Region"
name="location"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Type"
name="type"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Area"
name="area"
- relative_width="0.2" />
+ relative_width="0.25" />
<scroll_list.columns
label="Hidden"
name="hidden"
- relative_width="0.2" />
+ width="-1" />
</scroll_list>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
index 0cac1b410f..90bdea93fa 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_inventory.xml
@@ -60,6 +60,10 @@
name="Large(512x512)"
value="[i512,i512]" />
<combo_box.item
+ label="Huge (1024x1024)"
+ name="Huge(1024x1024)"
+ value="[i1024,i1024]" />
+ <combo_box.item
label="Current Window"
name="CurrentWindow"
value="[i0,i0]" />
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index ef77698e0d..c58cf97f3e 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -21,10 +21,14 @@
Bandwidth
</panel.string>
<panel.string
- name="time">
+ name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string
+ name="time">
+ [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
+ </panel.string>
+ <panel.string
name="timeTooltip">
[weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt]
</panel.string>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 25827fa236..b4b4ac4a86 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -328,6 +328,7 @@ are allowed.
<!-- searching - generic -->
<string name="Searching">Searching...</string>
<string name="NoneFound">None found.</string>
+ <string name="ServerUnavailable">Service not available.</string>
<!-- Indicates that an avatar name or other similar datum is being retrieved. General usage. -->
<string name="RetrievingData">Retrieving...</string>
@@ -2943,13 +2944,13 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .anim
<string name="None">None</string>
<string name="Linden Location">Linden Location</string>
<string name="Adult">Adult</string>
- <string name="Arts and Culture">Arts and Culture</string>
+ <string name="Arts&amp;Culture">Arts &amp; Culture</string>
<string name="Business">Business</string>
<string name="Educational">Educational</string>
<string name="Gaming">Gaming</string>
<string name="Hangout">Hangout</string>
<string name="Newcomer Friendly">Newcomer Friendly</string>
- <string name="Parks and Nature">Parks and Nature</string>
+ <string name="Parks&amp;Nature">Parks &amp; Nature</string>
<string name="Residential">Residential</string>
<!--<string name="Shopping">Shopping</string> -->
<string name="Stage">Stage</string>
@@ -4389,21 +4390,6 @@ and report the problem.
[https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3 Knowledge Base]
</string>
- <!-- megapahit strings -->
- <string name="not_found">&apos;[TEXT]&apos; not found</string>
- <string name="no_results">No results</string>
- <string name="searching">Searching...</string>
- <string name="all_categories">All Categories</string>
- <string name="search_banned">Some terms in your search query were excluded due to content restrictions as clarified in the Community Standards.</string>
- <string name="search_short">Your search terms were too short so no search was performed.</string>
- <string name="search_disabled">Legacy Search has been disabled in this region.</string>
- <string name="NotifyIncomingMessage">Incoming message from [NAME]...</string>
- <string name="NearbyChatTitleChannel">Nearby chat (on channel [CHANNEL])</string>
- <string name="AvatarTyping">Typing</string>
- <string name="UnknownAvatar">Unknown Avatar</string>
- <string name="NotAvailableOnPlatform">Not available on this platform</string>
- <string name="NowPlaying">Now Playing</string>
- <string name="GridInfoTitle">GRID INFO</string>
<!-- RLVa -->
<string name="RlvConsoleDisable">RLVa is disabled</string>
<string name="RlvConsoleInvalidCmd">Invalid command</string>
@@ -4430,5 +4416,4 @@ and report the problem.
<string name="RlvReturnCodeBlocked">blocked object</string>
<string name="RlvReturnCodeThrottled">throttled</string>
<string name="RlvReturnCodeNoProcessor">no command processor found</string>
-
</strings>
diff --git a/indra/newview/skins/default/xui/es/panel_status_bar.xml b/indra/newview/skins/default/xui/es/panel_status_bar.xml
index bdedd04cc8..1e304e9c05 100644
--- a/indra/newview/skins/default/xui/es/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Ancho de banda
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/fr/panel_status_bar.xml b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
index 84c6dda4b4..227525a608 100644
--- a/indra/newview/skins/default/xui/fr/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Bande passante
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/it/panel_status_bar.xml b/indra/newview/skins/default/xui/it/panel_status_bar.xml
index 160fd4e180..04d61c2973 100644
--- a/indra/newview/skins/default/xui/it/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/it/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Larghezza di banda
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/ja/panel_status_bar.xml b/indra/newview/skins/default/xui/ja/panel_status_bar.xml
index 2497b15548..bbb9d7daf1 100644
--- a/indra/newview/skins/default/xui/ja/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/ja/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
帯域幅
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[ampm, datetime, slt] [hour12, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/pl/panel_status_bar.xml b/indra/newview/skins/default/xui/pl/panel_status_bar.xml
index d50ed3387c..12091225f7 100644
--- a/indra/newview/skins/default/xui/pl/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/pl/panel_status_bar.xml
@@ -6,9 +6,6 @@
<panel.string name="bandwidth_tooltip">
Przepustowość
</panel.string>
- <panel.string name="time">
- [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
- </panel.string>
<panel.string name="buycurrencylabel">
[AMT] L$
</panel.string>
diff --git a/indra/newview/skins/default/xui/pt/panel_status_bar.xml b/indra/newview/skins/default/xui/pt/panel_status_bar.xml
index 9e15f9a02c..47712ad28b 100644
--- a/indra/newview/skins/default/xui/pt/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/pt/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Banda
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/ru/panel_status_bar.xml b/indra/newview/skins/default/xui/ru/panel_status_bar.xml
index 124b8f2cff..1fd9b94406 100644
--- a/indra/newview/skins/default/xui/ru/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/ru/panel_status_bar.xml
@@ -6,9 +6,6 @@
<panel.string name="bandwidth_tooltip">
Ширина канала
</panel.string>
- <panel.string name="time">
- [hour, datetime, slt]:[min, datetime, slt] [timezone,datetime, slt]
- </panel.string>
<panel.string name="timeTooltip">
[weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt]
</panel.string>
diff --git a/indra/newview/skins/default/xui/tr/panel_status_bar.xml b/indra/newview/skins/default/xui/tr/panel_status_bar.xml
index 616960ffb4..9ae5a251ec 100644
--- a/indra/newview/skins/default/xui/tr/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/tr/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
Bant genişliği
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/skins/default/xui/zh/panel_status_bar.xml b/indra/newview/skins/default/xui/zh/panel_status_bar.xml
index 0d6fcea451..90155fea86 100644
--- a/indra/newview/skins/default/xui/zh/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/zh/panel_status_bar.xml
@@ -6,7 +6,7 @@
<panel.string name="bandwidth_tooltip">
頻寬
</panel.string>
- <panel.string name="time">
+ <panel.string name="time_ampm">
[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]
</panel.string>
<panel.string name="timeTooltip">
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 29ca903256..b00b89b9fd 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -123,7 +123,7 @@ void LLCredential::authenticatorType(std::string &idType)
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
- boost::function<void (const LLSD&, const LLSD&)> functor)
+ std::function<void (const LLSD&, const LLSD&)> functor)
{
return LLNotificationPtr((LLNotification*)NULL);
}
@@ -223,8 +223,6 @@ bool llHashedUniqueID(unsigned char* id)
//-----------------------------------------------------------------------------
#include "../llappviewer.h"
void LLAppViewer::forceQuit(void) {}
-bool LLAppViewer::isUpdaterMissing() { return true; }
-bool LLAppViewer::waitForUpdater() { return false; }
LLAppViewer * LLAppViewer::sInstance = 0;
//-----------------------------------------------------------------------------
@@ -253,7 +251,7 @@ void LLProgressView::setMessage(std::string const &){}
// LLNotifications
class MockNotifications : public LLNotificationsInterface
{
- boost::function<void (const LLSD&, const LLSD&)> mResponder;
+ std::function<void (const LLSD&, const LLSD&)> mResponder;
int mAddedCount;
public:
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index fc9f5b707a..3ff38ea372 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -177,15 +177,15 @@ namespace tut
LLSLURL slurl = LLSLURL("");
ensure_equals("null slurl", (int)slurl.getType(), LLSLURL::LAST_LOCATION);
- slurl = LLSLURL("http://slurl.com/secondlife/myregion");
+ slurl = LLSLURL("https://slurl.com/secondlife/myregion");
ensure_equals("slurl.com slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("slurl.com slurl, region only", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
- slurl = LLSLURL("http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ slurl = LLSLURL("https://maps.secondlife.com/secondlife/myregion/1/2/3");
ensure_equals("maps.secondlife.com slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("maps.secondlife.com slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("secondlife://");
ensure_equals("secondlife: slurl, empty - type", slurl.getType(), LLSLURL::EMPTY);
@@ -196,27 +196,27 @@ namespace tut
slurl = LLSLURL("secondlife://myregion");
ensure_equals("secondlife: slurl, region only - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("secondlife: slurl, region only", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
slurl = LLSLURL("secondlife://myregion/1/2/3");
ensure_equals("secondlife: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("secondlife slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("/myregion");
ensure_equals("/region slurl, region- type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("/region slurl, region ", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/128/128/0");
+ "https://maps.secondlife.com/secondlife/myregion/128/128/0");
slurl = LLSLURL("/myregion/1/2/3");
ensure_equals("/: slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals("/ slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/myregion/1/2/3");
+ "https://maps.secondlife.com/secondlife/myregion/1/2/3");
slurl = LLSLURL("my region/1/2/3");
ensure_equals(" slurl, region + coords - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals(" slurl, region + coords", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/my%20region/1/2/3");
+ "https://maps.secondlife.com/secondlife/my%20region/1/2/3");
LLGridManager::getInstance()->setGridChoice("my.grid.com");
slurl = LLSLURL("https://my.grid.com/region/my%20region/1/2/3");
@@ -309,7 +309,7 @@ namespace tut
slurl = LLSLURL("my region", LLVector3(1,2,3));
ensure_equals("default grid/region/vector - type", slurl.getType(), LLSLURL::LOCATION);
ensure_equals(" default grid/region/vector", slurl.getSLURLString(),
- "http://maps.secondlife.com/secondlife/my%20region/1/2/3");
+ "https://maps.secondlife.com/secondlife/my%20region/1/2/3");
LLGridManager::getInstance()->setGridChoice("MyGrid");
slurl = LLSLURL("my region", LLVector3(1,2,3));
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index d9cb9e7538..94cf0fcf10 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -391,7 +391,7 @@ namespace tut
std::string("https://minimal.long.name/helpers/"));
ensure_equals("minimal grid login page",
LLGridManager::getInstance()->getLoginPage("minimal.long.name"),
- std::string("http://minimal.long.name/app/login/"));
+ std::string("https://minimal.long.name/app/login/"));
}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 0ce89df914..3a0df626f1 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -542,18 +542,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
'*.bat',
'*.tar.xz')))
- with self.prefix(src=os.path.join(pkgdir, "VMP")):
- # include the compiled launcher scripts so that it gets included in the file_list
- self.path('SLVersionChecker.exe')
-
- with self.prefix(dst="vmp_icons"):
- with self.prefix(src=self.icon_path()):
- self.path("secondlife.ico")
- #VMP Tkinter icons
- with self.prefix(src="vmp_icons"):
- self.path("*.png")
- self.path("*.gif")
-
# Plugin host application
self.path2basename(os.path.join(os.pardir,
'llplugin', 'slplugin', self.args['configuration']),
@@ -767,6 +755,126 @@ class Windows_x86_64_Manifest(ViewerManifest):
return '\n'.join(result)
def package_finish(self):
+ # Check if we should use Velopack instead of NSIS
+ # Note: as of 2026.01's release, we will be building with Velopack's one click install.
+ # We maintain the legacy NSIS packaging mainly for TPVs at this point.
+ if self.args.get('velopack', 'OFF') == 'ON':
+ self.velopack_package_finish()
+ return
+
+ # NSIS packaging (legacy)
+ self.nsis_package_finish()
+
+ def velopack_package_finish(self):
+ # packId determines install folder: %LocalAppData%\{packId}
+ # Uses same naming as NSIS INSTNAME for channel separation
+ pack_id = self.app_name_oneword() # "SecondLife", "SecondLifeBeta", etc.
+ # Velopack requires SemVer2. Use major.minor.patch-buildnumber so that
+ # Velopack can distinguish builds and order them correctly.
+ pack_version = '.'.join(self.args['version'][:3])
+ if len(self.args['version']) > 3 and self.args['version'][3]:
+ pack_version += '-' + self.args['version'][3]
+ pack_title = self.app_name() # Display name with spaces
+ pack_dir = self.get_dst_prefix()
+ main_exe = self.final_exe()
+ installer_base = self.installer_base_name()
+ exclude_pattern = r'.*\.pdb|.*\.map|.*\.bat|.*\.exp|.*\.lib|.*\.nsi|.*\.tar\.xz|secondlife-bin\..*|.*_Setup\.exe|.*-Setup\.exe'
+
+ # Channel-specific icon for the Velopack installer.
+ # CMake copies icons/{channel}/secondlife.ico to res/ll_icon.ico at configure time.
+ # Try the CMake-generated copy first, fall back to the source icon.
+ icon_path = os.path.join(self.get_src_prefix(), 'res', 'll_icon.ico')
+ if not os.path.exists(icon_path):
+ icon_path = os.path.join(self.get_src_prefix(), self.icon_path(), 'secondlife.ico')
+
+ # In CI, defer Velopack packaging to the sign step where Azure credentials
+ # are available. Emit metadata as GitHub outputs so the sign step can run
+ # vpk pack with --signTemplate, producing a package with signed executables.
+ if os.getenv('GITHUB_ACTIONS'):
+ # Copy the icon into pack_dir so it's included in the Windows-app artifact
+ icon_filename = ''
+ if os.path.exists(icon_path):
+ icon_filename = os.path.basename(icon_path)
+ icon_dest = os.path.join(pack_dir, icon_filename)
+ shutil.copy2(icon_path, icon_dest)
+ print("Copied icon %s to %s" % (icon_path, icon_dest))
+ else:
+ print("WARNING: Icon not found at %s" % icon_path)
+
+ # Emit metadata for the sign step
+ self.set_github_output('velopack_pack_id', pack_id)
+ self.set_github_output('velopack_pack_version', pack_version)
+ self.set_github_output('velopack_pack_title', pack_title)
+ self.set_github_output('velopack_main_exe', main_exe)
+ self.set_github_output('velopack_icon', icon_filename)
+ self.set_github_output('velopack_installer_base', installer_base)
+ self.set_github_output('velopack_exclude', exclude_pattern)
+ # Set package_file so llmanifest's touched.bat logic doesn't crash
+ self.package_file = installer_base + '_Setup.exe'
+ print("CI mode: Velopack packaging deferred to sign step")
+ return
+
+ # Local builds: run vpk pack directly (unsigned)
+ vpk_args = [
+ 'vpk', 'pack',
+ '--packId', pack_id,
+ '--packVersion', pack_version,
+ '--packDir', pack_dir,
+ '--mainExe', main_exe,
+ '--packTitle', pack_title,
+ '--exclude', exclude_pattern,
+ # Suppress Velopack's built-in shortcut creation; we create our own
+ # shortcuts in llvelopack.cpp on_after_install hook instead.
+ '--shortcuts', '',
+ ]
+
+ # Add icon — CMake copies the channel-appropriate secondlife.ico to res/ll_icon.ico
+ if os.path.exists(icon_path):
+ print("Using icon: %s" % icon_path)
+ vpk_args.extend(['--icon', icon_path])
+ else:
+ print("WARNING: Icon not found at %s — Setup.exe will have no icon" % icon_path)
+
+ print("Running Velopack packaging: %s" % ' '.join(vpk_args))
+
+ # Run vpk command
+ import subprocess
+ result = subprocess.run(vpk_args, cwd=os.path.dirname(pack_dir), capture_output=True, text=True)
+ if result.stdout:
+ print("vpk stdout: %s" % result.stdout)
+ if result.stderr:
+ print("vpk stderr: %s" % result.stderr)
+ if result.returncode != 0:
+ raise ManifestError("Velopack packaging failed with code %d" % result.returncode)
+
+ # Velopack outputs to a Releases directory
+ releases_dir = os.path.join(os.path.dirname(pack_dir), 'Releases')
+
+ # Move the setup exe INTO pack_dir so it's included in the Windows-app artifact
+ # IMPORTANT: Use hyphen format (-Setup.exe) to avoid the *_Setup.exe exclusion pattern
+ # in viewer_app output (line ~538). The underscore pattern excludes NSIS installers
+ # which are rebuilt during signing, but Velopack installers are created here.
+ # Velopack creates: {packId}-win-Setup.exe
+ velopack_setup = os.path.join(releases_dir, '%s-win-Setup.exe' % pack_id)
+ self.package_file = installer_base + '_Setup.exe'
+ our_setup = os.path.join(pack_dir, self.package_file)
+ if os.path.exists(velopack_setup):
+ shutil.move(velopack_setup, our_setup)
+ print("Moved %s to %s" % (velopack_setup, our_setup))
+
+ # Rename the portable zip to include the version number
+ # Velopack creates: {packId}-win-Portable.zip
+ velopack_portable = os.path.join(releases_dir, '%s-win-Portable.zip' % pack_id)
+ if os.path.exists(velopack_portable):
+ our_portable = os.path.join(releases_dir, installer_base + '_Portable.zip')
+ shutil.move(velopack_portable, our_portable)
+ print("Moved %s to %s" % (velopack_portable, our_portable))
+
+ # Output the Releases directory path for artifact upload (contains nupkg, RELEASES for updates)
+ self.set_github_output('velopack_releases', releases_dir)
+
+ def nsis_package_finish(self):
+ """Package the viewer using NSIS installer (legacy)"""
# a standard map of strings for replacing in the templates
substitution_strings = {
'version' : '.'.join(self.args['version']),
@@ -783,7 +891,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
substitution_strings['installer_file'] = installer_file
version_vars = """
- !define INSTEXE "SLVersionChecker.exe"
+ !define INSTEXE "%(final_exe)s"
!define VERSION "%(version_short)s"
!define VERSION_LONG "%(version)s"
!define VERSION_DASHES "%(version_dashes)s"
@@ -863,13 +971,12 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src="", dst="Contents"): # everything goes in Contents
bugsplat_db = self.args.get('bugsplat')
if bugsplat_db:
- # Inject BugsplatServerURL into Info.plist if provided.
+ # Inject Bugsplat's db into Info.plist if provided.
Info_plist = self.dst_path_of("Info.plist")
with open(Info_plist, 'rb') as f:
Info = plistlib.load(f)
# https://www.bugsplat.com/docs/platforms/os-x#configuration
- Info["BugsplatServerURL"] = \
- "https://{}.bugsplat.com/".format(bugsplat_db)
+ Info["BugSplatDatabase"] = bugsplat_db
self.put_in_file(
plistlib.dumps(Info),
os.path.basename(Info_plist),
@@ -883,6 +990,8 @@ class Darwin_x86_64_Manifest(ViewerManifest):
if self.args.get('bugsplat'):
self.path2basename(relpkgdir, "BugsplatMac.framework")
+ self.path2basename(relpkgdir, "CrashReporter.framework")
+ self.path2basename(relpkgdir, "HockeySDK.framework")
# OpenAL dylibs
if self.args['openal'] == 'ON':
@@ -922,6 +1031,24 @@ class Darwin_x86_64_Manifest(ViewerManifest):
# work, we need the build to noisily fail!
oldpath = subprocess.check_output(
['objdump', '--macho', '--dylib-id', '--non-verbose',
+ os.path.join(relpkgdir, "HockeySDK.framework", "HockeySDK")],
+ text=True
+ ).splitlines()[-1] # take the last line of output
+ self.run_command(
+ ['install_name_tool', '-change', oldpath,
+ '@executable_path/../Frameworks/HockeySDK.framework/HockeySDK',
+ executable])
+ oldpath = subprocess.check_output(
+ ['objdump', '--macho', '--dylib-id', '--non-verbose',
+ os.path.join(relpkgdir, "CrashReporter.framework", "CrashReporter")],
+ text=True
+ ).splitlines()[-1] # take the last line of output
+ self.run_command(
+ ['install_name_tool', '-change', oldpath,
+ '@executable_path/../Frameworks/CrashReporter.framework/CrashReporter',
+ executable])
+ oldpath = subprocess.check_output(
+ ['objdump', '--macho', '--dylib-id', '--non-verbose',
os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")],
text=True
).splitlines()[-1] # take the last line of output
@@ -950,15 +1077,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src=self.icon_path(), dst="") :
self.path("secondlife.icns")
- # Copy in the updater script and helper modules
- self.path(src=os.path.join(pkgdir, 'VMP'), dst="updater")
-
- with self.prefix(src="", dst=os.path.join("updater", "icons")):
- self.path2basename(self.icon_path(), "secondlife.ico")
- with self.prefix(src="vmp_icons", dst=""):
- self.path("*.png")
- self.path("*.gif")
-
with self.prefix(src_dst="cursors_mac"):
self.path("*.tif")
@@ -1110,6 +1228,123 @@ class Darwin_x86_64_Manifest(ViewerManifest):
arcname=self.app_name() + ".app")
self.set_github_output_path('viewer_app', tarpath)
+ # Generate Velopack update packages if enabled
+ # This creates the nupkg and RELEASES files needed for auto-updates
+ # Distribution is still via DMG, but updates use Velopack
+ if self.args.get('velopack', 'OFF') == 'ON':
+ self.velopack_package_finish()
+
+ def velopack_package_finish(self):
+ """Generate Velopack update packages for macOS.
+
+ This creates the nupkg and releases.json files needed for auto-updates.
+ Distribution is still via DMG - Velopack only handles the update infrastructure.
+ """
+ # packId determines install identification - same as Windows for consistency
+ pack_id = self.app_name_oneword() # "SecondLife", "SecondLifeBeta", etc.
+ # Velopack requires SemVer2. Use major.minor.patch-buildnumber so that
+ # Velopack can distinguish builds and order them correctly.
+ pack_version = '.'.join(self.args['version'][:3])
+ if len(self.args['version']) > 3 and self.args['version'][3]:
+ pack_version += '-' + self.args['version'][3]
+ pack_title = self.app_name() # Display name with spaces
+
+ # The .app bundle path (e.g., "/path/to/Second Life Release.app")
+ app_bundle = self.get_dst_prefix()
+ # Bundle ID from args (e.g., "com.secondlife.viewer")
+ bundle_id = self.args.get('bundleid', 'com.secondlife.indra.viewer')
+
+ # Icon path for macOS
+ icon_path = os.path.join(self.get_src_prefix(), self.icon_path(), 'secondlife.icns')
+
+ # The main executable inside Contents/MacOS/ is named after the channel
+ main_exe = self.channel()
+
+ # In CI, defer Velopack packaging to the sign step where code signing
+ # credentials are available. Emit metadata as GitHub outputs so the
+ # sign step can run vpk pack after signing the app bundle.
+ if os.getenv('GITHUB_ACTIONS'):
+ self.set_github_output('velopack_mac_pack_id', pack_id)
+ self.set_github_output('velopack_mac_pack_version', pack_version)
+ self.set_github_output('velopack_mac_pack_title', pack_title)
+ self.set_github_output('velopack_mac_main_exe', main_exe)
+ self.set_github_output('velopack_mac_bundle_id', bundle_id)
+ print("CI mode: macOS Velopack packaging deferred to sign step")
+ return
+
+ # Local builds: run vpk pack directly (unsigned)
+
+ # Parent directory containing the .app bundle - this is where we run vpk from
+ # and where the Releases directory will be created
+ work_dir = os.path.dirname(app_bundle)
+
+ # Output directory for releases - clean it first to avoid version conflicts
+ releases_dir = os.path.join(work_dir, 'Releases')
+ if os.path.exists(releases_dir):
+ print("Cleaning existing Releases directory: %s" % releases_dir)
+ shutil.rmtree(releases_dir)
+
+ # Build vpk command for macOS
+ # See: https://docs.velopack.io/reference/cli/content/vpk-osx
+ vpk_args = [
+ 'vpk', 'pack',
+ '--packId', pack_id,
+ '--packVersion', pack_version,
+ '--packDir', app_bundle,
+ '--packTitle', pack_title,
+ '--mainExe', main_exe, # Executable name inside Contents/MacOS/
+ '--bundleId', bundle_id,
+ '--outputDir', releases_dir,
+ '--noInst', # Don't generate .pkg installer - we use DMG for distribution
+ '--verbose', # Show detailed output
+ ]
+
+ # Add icon if exists
+ if os.path.exists(icon_path):
+ vpk_args.extend(['--icon', icon_path])
+
+ print("Running Velopack packaging for macOS:")
+ print(" Command: %s" % ' '.join(vpk_args))
+ print(" Working directory: %s" % work_dir)
+ print(" App bundle: %s" % app_bundle)
+ print(" Main executable: %s" % main_exe)
+
+ # Run vpk command
+ result = subprocess.run(vpk_args, cwd=work_dir, capture_output=True, text=True)
+
+ # Always print output for debugging
+ if result.stdout:
+ print("vpk stdout:\n%s" % result.stdout)
+ if result.stderr:
+ print("vpk stderr:\n%s" % result.stderr)
+
+ if result.returncode != 0:
+ raise ManifestError("Velopack packaging failed with code %d" % result.returncode)
+
+ # Verify the Releases directory was created and contains expected files
+ if not os.path.exists(releases_dir):
+ raise ManifestError("Velopack releases directory not found: %s" % releases_dir)
+
+ # List what was created
+ releases_contents = os.listdir(releases_dir)
+ print("Velopack releases directory contents: %s" % releases_contents)
+
+ # Verify we have the expected files (nupkg and releases JSON)
+ nupkg_files = [f for f in releases_contents if f.endswith('.nupkg')]
+ json_files = [f for f in releases_contents if f.endswith('.json')]
+
+ if not nupkg_files:
+ raise ManifestError("No .nupkg files found in releases directory")
+ if not json_files:
+ raise ManifestError("No releases JSON files found in releases directory")
+
+ print("Generated %d nupkg file(s): %s" % (len(nupkg_files), nupkg_files))
+ print("Generated %d JSON file(s): %s" % (len(json_files), json_files))
+
+ # Output the Releases directory path for artifact upload
+ self.set_github_output('velopack_releases', releases_dir)
+ print("Velopack releases directory: %s" % releases_dir)
+
class Darwin_arm64_Manifest(ViewerManifest):
build_data_json_platform = 'mac'
@@ -1745,6 +1980,7 @@ if __name__ == "__main__":
dict(name='discord', description="""Indication discord social sdk libraries are needed""", default='OFF'),
dict(name='openal', description="""Indication openal libraries are needed""", default='OFF'),
dict(name='tracy', description="""Indication tracy profiler is enabled""", default='OFF'),
+ dict(name='velopack', description="""Use Velopack installer instead of NSIS""", default='OFF'),
]
try:
main(extra=extra_arguments)