summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt100
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rwxr-xr-xindra/newview/app_settings/keywords_lsl_default.xml2
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml1
-rwxr-xr-xindra/newview/app_settings/settings.xml63
-rwxr-xr-xindra/newview/app_settings/settings_per_account.xml13
-rwxr-xr-xindra/newview/generate_breakpad_symbols.py3
-rwxr-xr-xindra/newview/installers/windows/installer_template.nsi1117
-rwxr-xr-xindra/newview/installers/windows/lang_da.nsibin8026 -> 7816 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_de.nsibin9346 -> 8420 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_en-us.nsibin8120 -> 8510 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_es.nsibin8764 -> 8458 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_fr.nsibin9030 -> 8748 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_it.nsibin8372 -> 8102 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_ja.nsibin7288 -> 6514 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_pl.nsibin8426 -> 8136 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_pt-br.nsibin8788 -> 8522 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_ru.nsibin8144 -> 7898 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_tr.nsibin8266 -> 8006 bytes
-rwxr-xr-xindra/newview/installers/windows/lang_zh.nsibin6798 -> 6576 bytes
-rwxr-xr-xindra/newview/llagent.cpp8
-rwxr-xr-xindra/newview/llagent.h7
-rwxr-xr-xindra/newview/llagentcamera.cpp8
-rwxr-xr-xindra/newview/llagentpilot.cpp8
-rwxr-xr-xindra/newview/llappearancemgr.cpp2
-rwxr-xr-xindra/newview/llappviewer.cpp117
-rwxr-xr-xindra/newview/llappviewer.h3
-rwxr-xr-xindra/newview/llappviewermacosx.cpp11
-rwxr-xr-xindra/newview/llassetuploadresponders.cpp49
-rwxr-xr-xindra/newview/llavataractions.cpp14
-rwxr-xr-xindra/newview/llavataractions.h2
-rwxr-xr-xindra/newview/llavatariconctrl.cpp4
-rwxr-xr-xindra/newview/llblocklist.cpp1
-rwxr-xr-xindra/newview/llblocklist.h1
-rwxr-xr-xindra/newview/llcallingcard.cpp8
-rwxr-xr-xindra/newview/llcallingcard.h6
-rwxr-xr-xindra/newview/llchathistory.cpp10
-rwxr-xr-xindra/newview/llchiclet.cpp8
-rwxr-xr-xindra/newview/llchiclet.h2
-rwxr-xr-xindra/newview/llchicletbar.cpp10
-rwxr-xr-xindra/newview/llcommandlineparser.cpp2
-rwxr-xr-xindra/newview/llcommunicationchannel.cpp6
-rw-r--r--indra/newview/llconversationmodel.h1
-rw-r--r--indra/newview/llconversationview.cpp2
-rwxr-xr-xindra/newview/lldaycyclemanager.cpp2
-rwxr-xr-xindra/newview/lldrawable.cpp12
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp2
-rwxr-xr-xindra/newview/lldrawpoolbump.cpp4
-rwxr-xr-xindra/newview/llenvmanager.cpp3
-rwxr-xr-xindra/newview/llface.cpp62
-rwxr-xr-xindra/newview/llface.h7
-rwxr-xr-xindra/newview/llfasttimerview.cpp13
-rwxr-xr-xindra/newview/llfavoritesbar.cpp285
-rwxr-xr-xindra/newview/llfavoritesbar.h18
-rwxr-xr-xindra/newview/llfeaturemanager.cpp4
-rwxr-xr-xindra/newview/llfilepicker.h2
-rwxr-xr-xindra/newview/llflexibleobject.cpp2
-rwxr-xr-xindra/newview/llfloaterabout.cpp58
-rwxr-xr-xindra/newview/llfloateravatarpicker.cpp4
-rwxr-xr-xindra/newview/llfloaterbump.cpp133
-rwxr-xr-xindra/newview/llfloaterbump.h23
-rwxr-xr-xindra/newview/llfloaterbuyland.cpp7
-rwxr-xr-xindra/newview/llfloatercamera.cpp7
-rwxr-xr-xindra/newview/llfloatercolorpicker.cpp50
-rwxr-xr-xindra/newview/llfloatercolorpicker.h3
-rw-r--r--indra/newview/llfloaterfacebook.cpp1
-rw-r--r--indra/newview/llfloaterflickr.cpp10
-rwxr-xr-xindra/newview/llfloatergodtools.cpp8
-rwxr-xr-xindra/newview/llfloaterhoverheight.cpp157
-rwxr-xr-xindra/newview/llfloaterhoverheight.h52
-rwxr-xr-xindra/newview/llfloaterimsession.cpp4
-rwxr-xr-xindra/newview/llfloaterimsessiontab.cpp1
-rwxr-xr-xindra/newview/llfloaterinspect.cpp53
-rwxr-xr-xindra/newview/llfloaterland.cpp13
-rwxr-xr-xindra/newview/llfloaterlandholdings.cpp4
-rwxr-xr-xindra/newview/llfloatermap.cpp9
-rwxr-xr-xindra/newview/llfloatermediasettings.cpp1
-rwxr-xr-xindra/newview/llfloatermediasettings.h1
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp86
-rwxr-xr-xindra/newview/llfloatermodelpreview.h7
-rwxr-xr-xindra/newview/llfloaternamedesc.cpp5
-rw-r--r--indra/newview/llfloaternotificationstabbed.cpp2
-rwxr-xr-xindra/newview/llfloaterpathfindingcharacters.cpp2
-rwxr-xr-xindra/newview/llfloaterpathfindingobjects.cpp2
-rwxr-xr-xindra/newview/llfloaterpay.cpp24
-rwxr-xr-xindra/newview/llfloaterperms.cpp25
-rwxr-xr-xindra/newview/llfloaterpreference.cpp30
-rwxr-xr-xindra/newview/llfloaterproperties.cpp49
-rwxr-xr-xindra/newview/llfloaterreporter.cpp2
-rwxr-xr-xindra/newview/llfloaterscriptlimits.h26
-rwxr-xr-xindra/newview/llfloatersnapshot.cpp56
-rwxr-xr-xindra/newview/llfloaterspellchecksettings.cpp5
-rwxr-xr-xindra/newview/llfloatertos.cpp1
-rwxr-xr-xindra/newview/llfloatertos.h1
-rw-r--r--indra/newview/llfloatertwitter.cpp1
-rwxr-xr-xindra/newview/llfloateruipreview.cpp1
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp16
-rwxr-xr-xindra/newview/llfloaterworldmap.h2
-rwxr-xr-xindra/newview/llglsandbox.cpp8
-rwxr-xr-xindra/newview/llgrouplist.cpp2
-rwxr-xr-xindra/newview/llhudeffectlookat.cpp2
-rwxr-xr-xindra/newview/llhudeffecttrail.cpp7
-rwxr-xr-xindra/newview/llhudnametag.cpp7
-rwxr-xr-xindra/newview/llhudtext.cpp12
-rwxr-xr-xindra/newview/llhudview.cpp4
-rwxr-xr-xindra/newview/llimview.cpp18
-rwxr-xr-xindra/newview/llinspectobject.cpp2
-rwxr-xr-xindra/newview/llinspecttoast.cpp5
-rwxr-xr-xindra/newview/llinventorybridge.cpp4
-rwxr-xr-xindra/newview/llinventorybridge.h2
-rwxr-xr-xindra/newview/llinventoryfilter.cpp10
-rwxr-xr-xindra/newview/llinventorymodelbackgroundfetch.cpp166
-rwxr-xr-xindra/newview/llinventorymodelbackgroundfetch.h3
-rwxr-xr-xindra/newview/lljoystickbutton.cpp6
-rwxr-xr-xindra/newview/lljoystickbutton.h1
-rwxr-xr-xindra/newview/lllandmarkactions.cpp10
-rwxr-xr-xindra/newview/lllocalbitmaps.cpp3
-rwxr-xr-xindra/newview/lllocationhistory.cpp4
-rwxr-xr-xindra/newview/lllogchat.cpp2
-rwxr-xr-xindra/newview/lllogininstance.cpp24
-rwxr-xr-xindra/newview/lllogininstance.h1
-rwxr-xr-xindra/newview/llmachineid.cpp14
-rwxr-xr-xindra/newview/llmanip.cpp4
-rwxr-xr-xindra/newview/llmaniprotate.cpp8
-rwxr-xr-xindra/newview/llmanipscale.cpp82
-rwxr-xr-xindra/newview/llmanipscale.h4
-rwxr-xr-xindra/newview/llmaniptranslate.cpp9
-rwxr-xr-xindra/newview/llmediactrl.cpp18
-rwxr-xr-xindra/newview/llmediadataclient.cpp22
-rwxr-xr-xindra/newview/llmediadataclient.h7
-rwxr-xr-xindra/newview/llmorphview.cpp9
-rwxr-xr-xindra/newview/llnetmap.cpp29
-rw-r--r--indra/newview/llnotificationlistitem.cpp55
-rw-r--r--indra/newview/llnotificationlistitem.h52
-rwxr-xr-xindra/newview/llnotificationstorage.cpp10
-rwxr-xr-xindra/newview/llpanelclassified.cpp6
-rwxr-xr-xindra/newview/llpanelcontents.cpp3
-rwxr-xr-xindra/newview/llpanelface.cpp69
-rwxr-xr-xindra/newview/llpanelface.h2
-rwxr-xr-xindra/newview/llpanelgrouplandmoney.cpp49
-rwxr-xr-xindra/newview/llpanellandaudio.h1
-rwxr-xr-xindra/newview/llpanellandmarkinfo.cpp6
-rwxr-xr-xindra/newview/llpanellandmarks.cpp3
-rwxr-xr-xindra/newview/llpanellandmedia.h2
-rwxr-xr-xindra/newview/llpanellogin.cpp143
-rwxr-xr-xindra/newview/llpanellogin.h7
-rwxr-xr-xindra/newview/llpanelmaininventory.cpp16
-rwxr-xr-xindra/newview/llpanelobject.cpp18
-rwxr-xr-xindra/newview/llpanelobject.h1
-rwxr-xr-xindra/newview/llpanelobjectinventory.cpp12
-rwxr-xr-xindra/newview/llpanelpeople.h1
-rwxr-xr-xindra/newview/llpanelpermissions.cpp8
-rwxr-xr-xindra/newview/llpanelpick.cpp6
-rwxr-xr-xindra/newview/llpanelplaceinfo.cpp12
-rwxr-xr-xindra/newview/llpanelplaceprofile.cpp2
-rwxr-xr-xindra/newview/llpanelplaces.cpp1
-rwxr-xr-xindra/newview/llpanelprimmediacontrols.cpp8
-rwxr-xr-xindra/newview/llpanelsnapshot.cpp35
-rwxr-xr-xindra/newview/llplacesinventorybridge.h2
-rwxr-xr-xindra/newview/llpostcard.cpp6
-rwxr-xr-xindra/newview/llpreview.cpp18
-rwxr-xr-xindra/newview/llpreviewnotecard.cpp66
-rwxr-xr-xindra/newview/llpreviewnotecard.h1
-rwxr-xr-xindra/newview/llpreviewscript.cpp27
-rwxr-xr-xindra/newview/llpreviewtexture.cpp25
-rwxr-xr-xindra/newview/llpreviewtexture.h1
-rw-r--r--indra/newview/llscripteditor.cpp1
-rwxr-xr-xindra/newview/llscriptfloater.cpp1
-rwxr-xr-xindra/newview/llsearchhistory.cpp4
-rwxr-xr-xindra/newview/llsechandler_basic.cpp38
-rwxr-xr-xindra/newview/llselectmgr.cpp114
-rwxr-xr-xindra/newview/llselectmgr.h8
-rwxr-xr-xindra/newview/llsidepanelappearance.h3
-rwxr-xr-xindra/newview/llsidepanelinventory.cpp3
-rwxr-xr-xindra/newview/llsidepaneliteminfo.cpp42
-rwxr-xr-xindra/newview/llsidepaneltaskinfo.cpp15
-rwxr-xr-xindra/newview/llslurl.cpp24
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp29
-rw-r--r--indra/newview/llsnapshotlivepreview.h1
-rwxr-xr-xindra/newview/llspeakers.cpp24
-rwxr-xr-xindra/newview/llspeakers.h2
-rwxr-xr-xindra/newview/llstartup.cpp8
-rwxr-xr-xindra/newview/llstatusbar.cpp5
-rwxr-xr-xindra/newview/llsurface.cpp12
-rw-r--r--indra/newview/llsyntaxid.cpp4
-rwxr-xr-xindra/newview/llteleporthistorystorage.cpp4
-rwxr-xr-xindra/newview/lltexturectrl.cpp16
-rwxr-xr-xindra/newview/lltexturefetch.cpp3
-rwxr-xr-xindra/newview/lltoastalertpanel.cpp1
-rwxr-xr-xindra/newview/lltoastgroupnotifypanel.h2
-rwxr-xr-xindra/newview/lltoolbrush.cpp3
-rwxr-xr-xindra/newview/lltoolcomp.cpp6
-rwxr-xr-xindra/newview/lltooldraganddrop.cpp13
-rwxr-xr-xindra/newview/lltoolfocus.cpp3
-rwxr-xr-xindra/newview/lltoolselectland.cpp4
-rwxr-xr-xindra/newview/llurlhistory.cpp51
-rwxr-xr-xindra/newview/llurlwhitelist.cpp4
-rwxr-xr-xindra/newview/llversioninfo.cpp2
-rwxr-xr-xindra/newview/llviewerdisplay.cpp12
-rwxr-xr-xindra/newview/llviewerfloaterreg.cpp4
-rwxr-xr-xindra/newview/llviewerkeyboard.cpp33
-rwxr-xr-xindra/newview/llviewermedia.cpp12
-rwxr-xr-xindra/newview/llviewermenu.cpp50
-rwxr-xr-xindra/newview/llviewermenufile.cpp2
-rwxr-xr-xindra/newview/llviewermessage.cpp12
-rwxr-xr-xindra/newview/llviewerobject.cpp16
-rwxr-xr-xindra/newview/llviewerparcelmgr.cpp26
-rwxr-xr-xindra/newview/llviewerpartsim.cpp5
-rwxr-xr-xindra/newview/llviewerpartsource.cpp2
-rwxr-xr-xindra/newview/llviewerregion.cpp66
-rwxr-xr-xindra/newview/llviewerregion.h14
-rwxr-xr-xindra/newview/llviewertexlayer.cpp3
-rwxr-xr-xindra/newview/llviewertexteditor.cpp5
-rwxr-xr-xindra/newview/llviewertexture.cpp38
-rwxr-xr-xindra/newview/llviewertexture.h11
-rwxr-xr-xindra/newview/llviewertextureanim.cpp2
-rwxr-xr-xindra/newview/llviewertexturelist.cpp33
-rwxr-xr-xindra/newview/llviewertexturelist.h3
-rwxr-xr-xindra/newview/llviewerwearable.cpp13
-rwxr-xr-xindra/newview/llviewerwindow.cpp116
-rwxr-xr-xindra/newview/llviewerwindow.h11
-rwxr-xr-xindra/newview/llvlcomposition.cpp12
-rwxr-xr-xindra/newview/llvoavatar.cpp193
-rwxr-xr-xindra/newview/llvoavatar.h11
-rwxr-xr-xindra/newview/llvoavatarself.cpp110
-rwxr-xr-xindra/newview/llvoavatarself.h13
-rwxr-xr-xindra/newview/llvograss.cpp1
-rwxr-xr-xindra/newview/llvoiceclient.cpp11
-rwxr-xr-xindra/newview/llvoicevisualizer.cpp1
-rwxr-xr-xindra/newview/llvoicevivox.cpp2
-rwxr-xr-xindra/newview/llvopartgroup.cpp4
-rwxr-xr-xindra/newview/llvosky.cpp17
-rwxr-xr-xindra/newview/llvotree.cpp3
-rwxr-xr-xindra/newview/llvovolume.cpp251
-rwxr-xr-xindra/newview/llvovolume.h26
-rwxr-xr-xindra/newview/llvowater.cpp9
-rwxr-xr-xindra/newview/llwaterparammanager.cpp2
-rwxr-xr-xindra/newview/llwearableitemslist.h4
-rwxr-xr-xindra/newview/llweb.cpp11
-rwxr-xr-xindra/newview/llwindowlistener.cpp49
-rwxr-xr-xindra/newview/llwlanimator.cpp2
-rwxr-xr-xindra/newview/llwldaycycle.cpp4
-rwxr-xr-xindra/newview/llwlparammanager.cpp2
-rwxr-xr-xindra/newview/llworld.cpp12
-rwxr-xr-xindra/newview/llworldmapview.cpp45
-rwxr-xr-xindra/newview/pipeline.cpp16
-rw-r--r--indra/newview/skins/default/textures/icons/hand.pngbin0 -> 957 bytes
-rwxr-xr-xindra/newview/skins/default/textures/textures.xml2
-rwxr-xr-xindra/newview/skins/default/xui/da/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/de/floater_stats.xml6
-rwxr-xr-xindra/newview/skins/default/xui/de/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_about.xml57
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_edit_hover_height.xml38
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_inventory_item_properties.xml46
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_preview_gesture.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_stats.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_attachment_self.xml8
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_avatar_other.xml7
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_avatar_self.xml8
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_object.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_viewer.xml29
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml37
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_login.xml141
-rw-r--r--indra/newview/skins/default/xui/en/panel_login_first.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_notification_list_item.xml196
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_general.xml14
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_sound.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_status_bar.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_teleport_history_item.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/sidepanel_item_info.xml22
-rwxr-xr-xindra/newview/skins/default/xui/en/sidepanel_task_info.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml1
-rwxr-xr-xindra/newview/skins/default/xui/es/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/es/panel_region_debug.xml10
-rwxr-xr-xindra/newview/skins/default/xui/fr/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/fr/panel_region_debug.xml10
-rwxr-xr-xindra/newview/skins/default/xui/it/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/it/panel_region_debug.xml10
-rwxr-xr-xindra/newview/skins/default/xui/ja/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/pl/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/pt/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/pt/panel_region_debug.xml10
-rwxr-xr-xindra/newview/skins/default/xui/ru/menu_viewer.xml16
-rwxr-xr-xindra/newview/skins/default/xui/ru/panel_region_debug.xml10
-rwxr-xr-xindra/newview/skins/default/xui/tr/menu_viewer.xml4
-rwxr-xr-xindra/newview/skins/default/xui/tr/panel_region_debug.xml10
-rwxr-xr-xindra/newview/skins/default/xui/zh/menu_viewer.xml4
-rwxr-xr-xindra/newview/tests/lllogininstance_test.cpp12
-rwxr-xr-xindra/newview/viewer_manifest.py326
289 files changed, 3929 insertions, 3041 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 4bf92f0f4e..45d5f0681c 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -4,17 +4,19 @@ project(viewer)
include(00-Common)
include(Boost)
+include(BuildPackagesInfo)
include(BuildVersion)
+include(CMakeCopyIfDifferent)
include(DBusGlib)
include(DirectX)
-include(OpenSSL)
include(DragDrop)
include(EXPAT)
include(FMODEX)
-include(OPENAL)
-include(OpenGL)
+include(GLOD)
+include(GooglePerfTools)
include(Hunspell)
include(JsonCpp)
+include(LLAppearance)
include(LLAudio)
include(LLCharacter)
include(LLCommon)
@@ -22,6 +24,8 @@ include(LLCoreHttp)
include(LLImage)
include(LLImageJ2COJ)
include(LLInventory)
+include(LLKDU)
+include(LLLogin)
include(LLMath)
include(LLMessage)
include(LLPhysicsExtensions)
@@ -36,19 +40,18 @@ include(LScript)
include(Linking)
include(NDOF)
include(NVAPI)
-include(GooglePerfTools)
+include(OPENAL)
+include(OpenGL)
+include(OpenSSL)
+include(PNG)
+include(Prebuilt)
include(TemplateCheck)
include(UI)
include(UnixInstall)
-include(LLKDU)
include(ViewerMiscLibs)
-include(LLLogin)
include(VisualLeakDetector)
-include(GLOD)
-include(CMakeCopyIfDifferent)
-include(LLAppearance)
-include(PNG)
include(ZLIB)
+include(URIPARSER)
if (NOT HAVOK_TPV)
# When using HAVOK_TPV, the library is precompiled, so no need for this
@@ -59,6 +62,9 @@ if(FMODEX)
include_directories(${FMODEX_INCLUDE_DIR})
endif(FMODEX)
+# install SLPlugin host executable and its dynamic-library plugins
+use_prebuilt_binary(slplugins)
+
include_directories(
${DBUSGLIB_INCLUDE_DIRS}
${JSONCPP_INCLUDE_DIR}
@@ -244,6 +250,7 @@ set(viewer_SOURCE_FILES
llfloaterhandler.cpp
llfloaterhardwaresettings.cpp
llfloaterhelpbrowser.cpp
+ llfloaterhoverheight.cpp
llfloaterhud.cpp
llfloaterimagepreview.cpp
llfloaterimsessiontab.cpp
@@ -852,6 +859,7 @@ set(viewer_HEADER_FILES
llfloaterhandler.h
llfloaterhardwaresettings.h
llfloaterhelpbrowser.h
+ llfloaterhoverheight.h
llfloaterhud.h
llfloaterimagepreview.h
llfloaterimnearbychat.h
@@ -1304,7 +1312,7 @@ set(viewer_HEADER_FILES
source_group("CMake Rules" FILES ViewerInstall.cmake)
-# the viewer_version.txt file created here is for passing to viewer_manifest
+# the viewer_version.txt file created here is for passing to viewer_manifest and autobuild
# the summary.json file is created for the benefit of the TeamCity builds, where
# it is used to provide descriptive information to the build results page
add_custom_target(generate_viewer_version ALL
@@ -1375,6 +1383,9 @@ if (LINUX)
set(viewer_LIBRARIES
Xinerama
)
+ if (OPENAL)
+ LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
+ endif (OPENAL)
endif (LINUX)
if (WINDOWS)
@@ -1589,6 +1600,7 @@ set(viewer_APPSETTINGS_FILES
app_settings/viewerart.xml
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
+ packages-info.txt
)
source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES})
@@ -1669,6 +1681,9 @@ if (WINDOWS)
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE"
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE"
)
+
+ add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version)
+
if(USE_PRECOMPILED_HEADERS)
set_target_properties(
${VIEWER_BINARY_NAME}
@@ -1804,7 +1819,6 @@ if (WINDOWS)
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- generate_viewer_version
stage_third_party_libs
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
@@ -1818,10 +1832,10 @@ if (WINDOWS)
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
- add_dependencies(${VIEWER_BINARY_NAME}
- SLPlugin
- windows-crash-logger
- )
+## add_dependencies(${VIEWER_BINARY_NAME}
+## SLPlugin
+## windows-crash-logger
+## )
# sets the 'working directory' for debugging from visual studio.
if (NOT UNATTENDED)
@@ -1876,10 +1890,9 @@ if (WINDOWS)
${COPY_INPUT_DEPENDENCIES}
)
- add_custom_target(package ALL DEPENDS
+ add_custom_target(llpackage ALL DEPENDS
${CMAKE_CFG_INTDIR}/touched.bat
windows-setup-build-all
- generate_viewer_version
)
# temporarily disable packaging of event_host until hg subrepos get
# sorted out on the parabuild cluster...
@@ -1930,6 +1943,7 @@ endif (WINDOWS)
target_link_libraries(${VIEWER_BINARY_NAME}
${PNG_PRELOAD_ARCHIVES}
${ZLIB_PRELOAD_ARCHIVES}
+ ${URIPARSER_PRELOAD_ARCHIVES}
${UPDATER_LIBRARIES}
${GOOGLE_PERFTOOLS_LIBRARIES}
${LLAUDIO_LIBRARIES}
@@ -1988,12 +2002,14 @@ if (LINUX)
set(COPY_INPUT_DEPENDENCIES
${VIEWER_BINARY_NAME}
linux-crash-logger
- SLPlugin
- media_plugin_webkit
- media_plugin_gstreamer010
+## SLPlugin
+## media_plugin_webkit
+## media_plugin_gstreamer010
llcommon
)
+ add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version)
+
add_custom_command(
OUTPUT ${product}.tar.bz2
COMMAND ${PYTHON_EXECUTABLE}
@@ -2012,7 +2028,6 @@ if (LINUX)
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- generate_viewer_version
${COPY_INPUT_DEPENDENCIES}
)
@@ -2037,7 +2052,6 @@ if (LINUX)
--source=${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- generate_viewer_version
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
)
@@ -2045,10 +2059,10 @@ if (LINUX)
add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
if (PACKAGE)
- add_custom_target(package ALL DEPENDS ${product}.tar.bz2)
+ add_custom_target(llpackage ALL DEPENDS ${product}.tar.bz2)
# Make sure we don't run two instances of viewer_manifest.py at the same time.
- add_dependencies(package copy_l_viewer_manifest)
- check_message_template(package)
+ add_dependencies(llpackage copy_l_viewer_manifest)
+ check_message_template(llpackage)
endif (PACKAGE)
endif (LINUX)
@@ -2079,6 +2093,8 @@ if (DARWIN)
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Info.plist"
)
+ add_dependencies(${VIEWER_BINARY_NAME} generate_viewer_version)
+
add_custom_command(
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
COMMAND ${PYTHON_EXECUTABLE}
@@ -2098,10 +2114,10 @@ if (DARWIN)
DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- generate_viewer_version
)
- add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger)
+##add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger)
+ add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger)
if (ENABLE_SIGNING)
set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")
@@ -2110,11 +2126,11 @@ if (DARWIN)
endif (ENABLE_SIGNING)
if (PACKAGE)
- add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
- add_dependencies(package generate_viewer_version)
+ add_custom_target(llpackage ALL DEPENDS ${VIEWER_BINARY_NAME})
+ add_dependencies(llpackage generate_viewer_version)
add_custom_command(
- TARGET package POST_BUILD
+ TARGET llpackage POST_BUILD
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
@@ -2133,7 +2149,6 @@ if (DARWIN)
${SIGNING_SETTING}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- generate_viewer_version
)
endif (PACKAGE)
endif (DARWIN)
@@ -2156,19 +2171,21 @@ if (PACKAGE)
if (DARWIN)
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
# *TODO: Generate these search dirs in the cmake files related to each binary.
- list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}")
+## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}")
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}")
- list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}")
- list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}")
- list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}")
+## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}")
+## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}")
+## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}")
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2")
- set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger")
+## set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger")
+ set(VIEWER_EXE_GLOBS "'Second Life' mac-crash-logger")
set(VIEWER_LIB_GLOB "*.dylib")
endif (DARWIN)
if (LINUX)
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged")
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2")
- set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin")
+## set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin")
+ set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin")
set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*")
set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest)
endif (LINUX)
@@ -2196,7 +2213,7 @@ if (PACKAGE)
add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}")
- add_dependencies(package generate_breakpad_symbols)
+ add_dependencies(llpackage generate_breakpad_symbols)
endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
endif (PACKAGE)
@@ -2374,11 +2391,6 @@ include(LLAddBuildTest)
SET(viewer_TEST_SOURCE_FILES
llagentaccess.cpp
llwlparammanager.cpp
- # Not *actually* a unit test, it's an integration test.
- # Because it won't work in the new unit test iface, i've commented out
- # and notified Nat. Delete this when it's replaced!
- # + poppy & brad 2009-06-05
- # llcapabilitylistener.cpp
)
set_source_files_properties(
${viewer_TEST_SOURCE_FILES}
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index f36181278b..1523336b0d 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.7.24
+3.7.29
diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml
index 37dd2db93f..cea7a58949 100755
--- a/indra/newview/app_settings/keywords_lsl_default.xml
+++ b/indra/newview/app_settings/keywords_lsl_default.xml
@@ -10980,7 +10980,7 @@
</map>
</array>
<key>tooltip</key>
- <string>Rez directly off of a UUID if owner has dog-bit set.</string>
+ <string>Rez directly off of a UUID if owner has god-bit set.</string>
</map>
<key>llGround</key>
<map>
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 15cb5bc0eb..de3732f339 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -43,6 +43,7 @@
<key>tags</key>
<array>
<!-- sample entry for debugging specific items
+ <string>Avatar</string>
<string>Inventory</string>
<string>SceneLoadTiming</string>
<string>Avatar</string>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 94d3c8a59f..845cb5ae96 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -49,6 +49,17 @@
<key>Value</key>
<real>300</real>
</map>
+ <key>AckCollectTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Ack messages collection and grouping time</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.1</real>
+ </map>
<key>AdminMenu</key>
<map>
<key>Comment</key>
@@ -654,6 +665,21 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>AvatarPosFinalOffset</key>
+ <map>
+ <key>Comment</key>
+ <string>After-everything-else fixup for avatar position.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ </map>
<key>AvatarPickerURL</key>
<map>
<key>Comment</key>
@@ -5004,6 +5030,7 @@
<key>Type</key>
<string>LLSD</string>
<key>Value</key>
+ <array/>
</map>
<key>LSLFindCaseInsensitivity</key>
<map>
@@ -11759,7 +11786,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>0.0</integer>
+ <real>0.0</real>
</map>
<key>TextureFetchSource</key>
<map>
@@ -13202,6 +13229,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>EnvironmentPersistAcrossLogin</key>
+ <map>
+ <key>Comment</key>
+ <string>Keep Environment settings consistent across sessions</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>UseDayCycle</key>
<map>
<key>Comment</key>
@@ -14093,17 +14131,6 @@
<key>Value</key>
<integer>-1</integer>
</map>
- <key>MaxFPS</key>
- <map>
- <key>Comment</key>
- <string>Yield some time to the local host if we reach a threshold framerate.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>-1.0</real>
- </map>
<key>ForcePeriodicRenderingTime</key>
<map>
<key>Comment</key>
@@ -14676,17 +14703,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>UseHTTPInventory</key>
- <map>
- <key>Comment</key>
- <string>Allow use of http inventory transfers instead of UDP</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ClickToWalk</key>
<map>
<key>Comment</key>
@@ -15595,7 +15611,6 @@
<key>Value</key>
<integer>0</integer>
</map>
-
</map>
</llsd>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index fc6f1f6395..c62b45ed81 100755
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -1,5 +1,16 @@
<llsd>
<map>
+ <key>AvatarHoverOffsetZ</key>
+ <map>
+ <key>Comment</key>
+ <string>After-everything-else fixup for avatar Z position.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.0</real>
+ </map>
<key>DoNotDisturbResponseChanged</key>
<map>
<key>Comment</key>
@@ -86,7 +97,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>true</integer>
+ <integer>1</integer>
</map>
<key>InstantMessageLogPath</key>
<map>
diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py
index 4181e4ebb3..d351c406bc 100755
--- a/indra/newview/generate_breakpad_symbols.py
+++ b/indra/newview/generate_breakpad_symbols.py
@@ -31,7 +31,6 @@ $/LicenseInfo$
import collections
import fnmatch
import itertools
-import operator
import os
import re
import sys
@@ -149,7 +148,7 @@ def main(configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, v
== os.path.splitext(os.path.basename(m))[0].lower()
# there must be at least one .sym file in tarfile_members that matches
# each required module (ignoring file extensions)
- if not reduce(operator.or_, itertools.imap(match_module_basename, tarfile_members)):
+ if not any(itertools.imap(match_module_basename, tarfile_members)):
print >> sys.stderr, "failed to find required %s in generated %s" \
% (required_module, viewer_symbol_file)
os.remove(viewer_symbol_file)
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 65581a6781..8c8b4971cf 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; secondlife setup.nsi
-;; Copyright 2004-2011, Linden Research, Inc.
+;; Second Life setup.nsi
+;; Copyright 2004-2015, 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
@@ -18,26 +18,27 @@
;;
;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
;;
-;; NSIS Unicode 2.38.1 or higher required
+;; NSIS Unicode 2.46.5 or higher required
;; http://www.scratchpaper.com/
;;
-;; Author: James Cook, Don Kjer, Callum Prentice
+;; Author: James Cook, TankMaster Finesmith, Don Kjer, Callum Prentice
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Compiler flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-SetOverwrite on ; overwrite files
-SetCompress auto ; compress iff saves space
-SetCompressor /solid lzma ; compress whole installer as one block
-SetDatablockOptimize off ; only saves us 0.1%, not worth it
-XPStyle on ; add an XP manifest to the installer
-RequestExecutionLevel admin ; on Vista we must be admin because we write to Program Files
+SetOverwrite on # Overwrite files
+SetCompress auto # Compress if saves space
+SetCompressor /solid lzma # Compress whole installer as one block
+SetDatablockOptimize off # Only saves us 0.1%, not worth it
+XPStyle on # Add an XP manifest to the installer
+RequestExecutionLevel admin # For when we write to Program Files
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Project flags
+;; Project flags
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+# This placeholder is replaced by viewer_manifest.py
%%VERSION%%
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -72,140 +73,317 @@ LangString LanguageCode ${LANG_RUSSIAN} "ru"
LangString LanguageCode ${LANG_TURKISH} "tr"
LangString LanguageCode ${LANG_TRADCHINESE} "zh"
-;; this placeholder is replaced by viewer_manifest.py
+# This placeholder is replaced by viewer_manifest.py
%%INST_VARS%%
Name ${INSTNAME}
-SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text
+SubCaption 0 $(LicenseSubTitleSetup) # Override "license agreement" text
-BrandingText " " ; bottom of window text
+BrandingText " " # Bottom of window text
Icon %%SOURCE%%\installers\windows\install_icon.ico
UninstallIcon %%SOURCE%%\installers\windows\uninstall_icon.ico
-WindowIcon on ; show our icon in left corner
-BGGradient off ; no big background window
-CRCCheck on ; make sure CRC is OK
-InstProgressFlags smooth colored ; new colored smooth look
-ShowInstDetails nevershow ; no details, no "show" button
-SetOverwrite on ; stomp files by default
-AutoCloseWindow true ; after all files install, close window
+WindowIcon on # Show our icon in left corner
+BGGradient off # No big background window
+CRCCheck on # Make sure CRC is OK
+InstProgressFlags smooth colored # New colored smooth look
+SetOverwrite on # Overwrite files by default
+AutoCloseWindow true # After all files install, close window
InstallDir "$PROGRAMFILES\${INSTNAME}"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" ""
+UninstallText $(UninstallTextMsg)
DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
Page directory dirPre
Page instfiles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Variables
+;; Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Var INSTPROG
Var INSTEXE
Var INSTSHORTCUT
-Var COMMANDLINE ; command line passed to this installer, set in .onInit
-Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer
-Var SKIP_DIALOGS ; set from command line in .onInit. autoinstall
- ; GUI and the defaults.
-Var SKIP_AUTORUN ; skip automatic launch of viewer after install
-Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation that will be uninstalled.
-
-;;; Function definitions should go before file includes, because calls to
-;;; DLLs like LangDLL trigger an implicit file include, so if that call is at
-;;; the end of this script NSIS has to decompress the whole installer before
-;;; it can call the DLL function. JC
-
-!include "FileFunc.nsh" ; For GetParameters, GetOptions
+Var COMMANDLINE # Command line passed to this installer, set in .onInit
+Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer
+Var SKIP_DIALOGS # Set from command line in .onInit. autoinstall GUI and the defaults.
+Var SKIP_AUTORUN # Skip automatic launch of the viewer after install
+Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation that will be uninstalled.
+
+# Function definitions should go before file includes, because calls to
+# DLLs like LangDLL trigger an implicit file include, so if that call is at
+# the end of this script NSIS has to decompress the whole installer before
+# it can call the DLL function. JC
+
+!include "FileFunc.nsh" # For GetParameters, GetOptions
!insertmacro GetParameters
!insertmacro GetOptions
-!include WinVer.nsh ; For OS and SP detection
-!include x64.nsh ; For 64bit OS detection
+!include WinVer.nsh # For OS and SP detection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; After install completes, launch app
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function .onInstSuccess
-Call CheckWindowsServPack ; Warn if not on the latest SP before asking to launch.
- Push $R0 # Option value, unused
- StrCmp $SKIP_AUTORUN "true" +2;
- # Assumes SetOutPath $INSTDIR
- Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM'
- Pop $R0
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Pre-directory page callback
+;; Pre-directory page callback
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function dirPre
StrCmp $SKIP_DIALOGS "true" 0 +2
Abort
+
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Make sure this computer meets the minimum system requirements.
-; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2
+;; Prep Installer Section
+;;
+;; Note: to add new languages, add a language file include to the list
+;; at the top of this file, add an entry to the menu and then add an
+;; entry to the language ID selector below
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function CheckWindowsVersion
- ${If} ${AtMostWin2000}
- MessageBox MB_OK $(CheckWindowsVersionMB)
+Function .onInit
+Call CheckCPUFlags # Make sure we have SSE2 support
+Call CheckWindowsVersion # Don't install On unsupported systems
+ Push $0
+ ${GetParameters} $COMMANDLINE # Get our command line
+
+ ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0
+ IfErrors +2 0 # If error jump past setting SKIP_DIALOGS
+ StrCpy $SKIP_DIALOGS "true"
+
+ ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0
+ IfErrors +2 0 ; If error jump past setting SKIP_AUTORUN
+ StrCpy $SKIP_AUTORUN "true"
+
+ ${GetOptions} $COMMANDLINE "/LANGID=" $0 # /LANGID=1033 implies US English
+
+# If no language (error), then proceed
+ IfErrors lbl_configure_default_lang
+# No error means we got a language, so use it
+ StrCpy $LANGUAGE $0
+ Goto lbl_return
+
+lbl_configure_default_lang:
+# If we currently have a version of SL installed, default to the language of that install
+# Otherwise don't change $LANGUAGE and it will default to the OS UI language.
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
+ IfErrors +2 0 # If error skip the copy instruction
+ StrCpy $LANGUAGE $0
+
+# For silent installs, no language prompt, use default
+ IfSilent lbl_return
+ StrCmp $SKIP_DIALOGS "true" lbl_return
+
+lbl_build_menu:
+ Push ""
+# Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC
+ !include "%%SOURCE%%\installers\windows\language_menu.nsi"
+
+ Push A # A means auto count languages for the auto count to work the first empty push (Push "") must remain
+ LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage)
+ Pop $0
+ StrCmp $0 "cancel" 0 +2
+ Abort
+ StrCpy $LANGUAGE $0
+
+# Save language in registry
+ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE
+lbl_return:
+ Pop $0
+ Return
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Prep Uninstaller Section
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function un.onInit
+# Read language from registry and set for uninstaller. Key will be removed on successful uninstall
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
+ IfErrors lbl_end
+ StrCpy $LANGUAGE $0
+lbl_end:
+ Return
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Checks for CPU valid (must have SSE2 support)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function CheckCPUFlags
+ Push $1
+ System::Call 'kernel32::IsProcessorFeaturePresent(i) i(10) .r1'
+ IntCmp $1 1 OK_SSE2
+ MessageBox MB_OKCANCEL $(MissingSSE2) /SD IDOK IDOK OK_SSE2
Quit
- ${EndIf}
- ${If} ${IsWinXP}
- ${AndIfNot} ${RunningX64}
- ${AndIfNot} ${IsServicePack} 3
+ OK_SSE2:
+ Pop $1
+ Return
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Make sure this computer meets the minimum system requirements.
+;; Currently: Windows Vista SP2
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function CheckWindowsVersion
+ ${If} ${AtMostWin2003}
MessageBox MB_OK $(CheckWindowsVersionMB)
Quit
${EndIf}
- ${If} ${IsWinXP}
- ${AndIf} ${RunningX64}
+ ${If} ${IsWinVista}
${AndIfNot} ${IsServicePack} 2
MessageBox MB_OK $(CheckWindowsVersionMB)
Quit
${EndIf}
- ${If} ${IsWin2003}
+ ${If} ${IsWin2008}
${AndIfNot} ${IsServicePack} 2
MessageBox MB_OK $(CheckWindowsVersionMB)
Quit
${EndIf}
+
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;Recommend Upgrading Service Pack
+;; Install Section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function CheckWindowsServPack
- ${If} ${IsWinVista}
- ${AndIfNot} ${IsServicePack} 2
- MessageBox MB_OK $(CheckWindowsServPackMB)
- DetailPrint $(UseLatestServPackDP)
- Return
- ${EndIf}
+Section ""
- ${If} ${IsWin2008}
- ${AndIfNot} ${IsServicePack} 2
- MessageBox MB_OK $(CheckWindowsServPackMB)
- DetailPrint $(UseLatestServPackDP)
- Return
- ${EndIf}
+SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well)
- ${If} ${IsWin7}
- ${AndIfNot} ${IsServicePack} 1
- MessageBox MB_OK $(CheckWindowsServPackMB)
- DetailPrint $(UseLatestServPackDP)
- Return
- ${EndIf}
+# Start with some default values.
+StrCpy $INSTPROG "${INSTNAME}"
+StrCpy $INSTEXE "${INSTEXE}"
+StrCpy $INSTSHORTCUT "${SHORTCUT}"
- ${If} ${IsWin2008R2}
- ${AndIfNot} ${IsServicePack} 1
- MessageBox MB_OK $(CheckWindowsServPackMB)
- DetailPrint $(UseLatestServPackDP)
- Return
- ${EndIf}
-FunctionEnd
+Call CheckIfAdministrator # Make sure the user can install/uninstall
+Call CheckIfAlreadyCurrent # Make sure this version is not already installed
+Call CloseSecondLife # Make sure Second Life not currently running
+Call CheckNetworkConnection # Ping secondlife.com
+Call CheckWillUninstallV2 # Check if Second Life is already installed
+
+StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE
+PRESERVE_DONE:
+
+Call RemoveProgFilesOnInst # Remove existing files to prevent certain errors when running the new version of the viewer
+
+# This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py
+%%INSTALL_FILES%%
+
+# Pass the installer's language to the client to use as a default
+StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)"
+
+# Shortcuts in start menu
+CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT"
+SetOutPath "$INSTDIR"
+CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
+
+
+WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \
+ "InternetShortcut" "URL" \
+ "http://join.secondlife.com/"
+WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \
+ "InternetShortcut" "URL" \
+ "http://www.secondlife.com/account/"
+WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \
+ "InternetShortcut" "URL" \
+ "http://wiki.secondlife.com/wiki/LSL_Portal"
+CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \
+ '"$INSTDIR\uninst.exe"' ''
+
+# Other shortcuts
+SetOutPath "$INSTDIR"
+CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
+CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
+CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
+ '"$INSTDIR\uninst.exe"' ''
+
+# Write registry
+WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR"
+WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}"
+WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT"
+WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE"
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc."
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/"
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/"
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/"
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG"
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"'
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}"
+WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB
+# BUG-2707 Disable SEHOP for installed viewer.
+WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1
+
+# Write URL registry info
+WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life"
+WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" ""
+WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
+
+# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks.
+WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
+WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life"
+WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" ""
+WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
+
+# URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks.
+WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
+
+# Write out uninstaller
+WriteUninstaller "$INSTDIR\uninst.exe"
+
+# Uninstall existing "Second Life Viewer 2" install if needed.
+StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE
+ ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2'
+ Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # With _? option above, uninst.exe will be left behind.
+ RMDir "$PROGRAMFILES\SecondLifeViewer2" # Will remove only if empty.
+
+REMOVE_SLV2_DONE:
+
+SectionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Uninstall Section
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Section Uninstall
+
+# Start with some default values.
+StrCpy $INSTPROG "${INSTNAME}"
+StrCpy $INSTEXE "${INSTEXE}"
+StrCpy $INSTSHORTCUT "${SHORTCUT}"
+
+# Make sure the user can install/uninstall
+Call un.CheckIfAdministrator
+
+# Uninstall for all users (if you change this, change it in the install as well)
+SetShellVarContext all
+
+# Make sure we're not running
+Call un.CloseSecondLife
+
+# Clean up registry keys and subkeys (these should all be !defines somewhere)
+DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG"
+DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG"
+# BUG-2707 Remove entry that disabled SEHOP
+DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE"
+
+# Clean up shortcuts
+Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*"
+RMDir "$SMPROGRAMS\$INSTSHORTCUT"
+
+Delete "$DESKTOP\$INSTSHORTCUT.lnk"
+Delete "$INSTDIR\$INSTSHORTCUT.lnk"
+Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk"
+
+# Remove the main installation directory
+Call un.ProgramFiles
+
+# Clean up cache and log files, but leave them in-place for non AGNI installs.
+Call un.UserSettingsFiles
+
+SectionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Make sure the user can install/uninstall
+;; Make sure the user can install
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckIfAdministrator
DetailPrint $(CheckAdministratorInstDP)
@@ -216,10 +394,11 @@ Function CheckIfAdministrator
Quit
lbl_is_admin:
Return
+
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
+;; Make sure the user can uninstall
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.CheckIfAdministrator
DetailPrint $(CheckAdministratorUnInstDP)
@@ -230,11 +409,12 @@ Function un.CheckIfAdministrator
Quit
lbl_is_admin:
Return
+
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Checks to see if the current version has already been installed (according to the registry).
-; If it has, allow user to bail out of install process.
+;; Checks to see if the current version has already been installed (according to the registry).
+;; If it has, allow user to bail out of install process.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckIfAlreadyCurrent
Push $0
@@ -246,26 +426,34 @@ Function CheckIfAlreadyCurrent
continue_install:
Pop $0
Return
+
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Checks for CPU valid (must have SSE2 support)
+;; Function CheckWillUninstallV2
+;;
+;; If called through auto-update, need to uninstall any existing V2 installation.
+;; Don't want to end up with SecondLifeViewer2 and SecondLifeViewer installations
+;; existing side by side with no indication on which to use.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function CheckCPUFlags
- Push $1
- System::Call 'kernel32::IsProcessorFeaturePresent(i) i(10) .r1'
- IntCmp $1 1 OK_SSE2
- MessageBox MB_OKCANCEL $(MissingSSE2) /SD IDOK IDOK OK_SSE2
- Quit
+Function CheckWillUninstallV2
+
+ StrCpy $DO_UNINSTALL_V2 ""
+
+ StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE
+ StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE # Don't uninstall our own install dir.
+ IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE
+
+CHECKV2_FOUND:
+ StrCpy $DO_UNINSTALL_V2 "true"
+
+CHECKV2_DONE:
- OK_SSE2:
- Pop $1
- Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Close the program, if running. Modifies no variables.
-; Allows user to bail out of install process.
+;; Close the program, if running. Modifies no variables.
+;; Allows user to bail out of install process.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CloseSecondLife
Push $0
@@ -291,334 +479,134 @@ Function CloseSecondLife
DONE:
Pop $0
Return
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Close the program, if running. Modifies no variables.
+;; Allows user to bail out of uninstall process.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function un.CloseSecondLife
+ Push $0
+ FindWindow $0 "Second Life" ""
+ IntCmp $0 0 DONE
+ MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL
+
+ CANCEL_UNINSTALL:
+ Quit
+
+ CLOSE:
+ DetailPrint $(CloseSecondLifeUnInstDP)
+ SendMessage $0 16 0 0
+
+ LOOP:
+ FindWindow $0 "Second Life" ""
+ IntCmp $0 0 DONE
+ Sleep 500
+ Goto LOOP
+
+ DONE:
+ Pop $0
+ Return
+
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Test our connection to secondlife.com
-; Also allows us to count attempted installs by examining web logs.
-; *TODO: Return current SL version info and have installer check
-; if it is up to date.
+;; Test our connection to secondlife.com
+;; Also allows us to count attempted installs by examining web logs.
+;; *TODO: Return current SL version info and have installer check
+;; if it is up to date.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckNetworkConnection
Push $0
Push $1
Push $2 # Option value for GetOptions
DetailPrint $(CheckNetworkConnectionDP)
- ; Look for a tag value from the stub installer, used for statistics
- ; to correlate installs. Default to "" if not found on command line.
+# Look for a tag value from the stub installer, used for statistics to correlate installs.
+# Default to "" if not found on command line.
StrCpy $2 ""
${GetOptions} $COMMANDLINE "/STUBTAG=" $2
GetTempFileName $0
- !define HTTP_TIMEOUT 5000 ; milliseconds
- ; Don't show secondary progress bar, this will be quick.
+ !define HTTP_TIMEOUT 5000 # Milliseconds
+# Don't show secondary progress bar, this will be quick.
NSISdl::download_quiet \
/TIMEOUT=${HTTP_TIMEOUT} \
"http://install.secondlife.com/check/?stubtag=$2&version=${VERSION_LONG}" \
$0
- Pop $1 ; Return value, either "success", "cancel" or an error message
+ Pop $1 # Return value, either "success", "cancel" or an error message
; MessageBox MB_OK "Download result: $1"
; Result ignored for now
; StrCmp $1 "success" +2
; DetailPrint "Connection failed: $1"
- Delete $0 ; temporary file
+ Delete $0 # Temporary file
Pop $2
Pop $1
Pop $0
Return
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Function CheckOldExeName
-; Viewer versions < 3.6.12 used the name 'SecondLife.exe'
-; If that name is found in the install folder, delete it to invalidate any
-; old shortcuts to it that may be in non-standard locations, so that the user
-; does not end up running the old version (potentially getting caught in an
-; infinite update loop). See MAINT-3575
-; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-Function CheckOldExeName
- IfFileExists "$INSTDIR\SecondLife.exe" CHECKOLDEXE_FOUND CHECKOLDEXE_DONE
-
-CHECKOLDEXE_FOUND:
- Delete "$INSTDIR\SecondLife.exe"
-CHECKOLDEXE_DONE:
-FunctionEnd
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Function CheckWillUninstallV2
-;
-; If we are being called through auto-update, we need to uninstall any
-; existing V2 installation. Otherwise, we wind up with
-; SecondLifeViewer2 and SecondLifeViewer installations existing side
-; by side no indication which to use.
-; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function CheckWillUninstallV2
-
- StrCpy $DO_UNINSTALL_V2 ""
-
- StrCmp $SKIP_DIALOGS "true" 0 CHECKV2_DONE
- StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" CHECKV2_DONE ; don't uninstall our own install dir.
- IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" CHECKV2_FOUND CHECKV2_DONE
-
-CHECKV2_FOUND:
- StrCpy $DO_UNINSTALL_V2 "true"
-
-CHECKV2_DONE:
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Save user files to temp location
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function PreserveUserFiles
-
-Push $0
-Push $1
-Push $2
-
- RMDir /r "$TEMP\SecondLifeSettingsBackup"
- CreateDirectory "$TEMP\SecondLifeSettingsBackup"
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
- CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-; Copy files in Documents and Settings\All Users\SecondLife
-Push $0
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
- StrCmp $0 "" +2
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
- CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Restore user files from temp location
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RestoreUserFiles
-
-Push $0
-Push $1
-Push $2
-
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- CreateDirectory "$2\Application Data\SecondLife\"
- CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-; Copy files in Documents and Settings\All Users\SecondLife
-Push $0
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
- StrCmp $0 "" +2
- CreateDirectory "$2\Application Data\SecondLife\"
- CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\"
-Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Remove temp dirs
+;; Delete files on install if previous install exists to prevent undesired behavior
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RemoveTempUserFiles
-
-Push $0
-Push $1
-Push $2
+Function RemoveProgFilesOnInst
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-; Copy files in Documents and Settings\All Users\SecondLife
-Push $0
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
- StrCmp $0 "" +2
- RMDir /r "$TEMP\SecondLifeSettingsBackup\AllUsers\*"
-Pop $0
-
-FunctionEnd
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Clobber user files - TEST ONLY
-; This is here for testing, generally not desirable to call it.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;Function ClobberUserFilesTESTONLY
-
-;Push $0
-;Push $1
-;Push $2
-;
-; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-;
-; LOOP:
-; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
-; StrCmp $1 "" DONE ; no more users
-;
-; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
-; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-;
-; ; Required since ProfileImagePath is of type REG_EXPAND_SZ
-; ExpandEnvStrings $2 $2
-;
-; RMDir /r "$2\Application Data\SecondLife\"
-;
-; CONTINUE:
-; IntOp $0 $0 + 1
-; Goto LOOP
-; DONE:
-;
-;Pop $2
-;Pop $1
-;Pop $0
-;
-;; Copy files in Documents and Settings\All Users\SecondLife
-;Push $0
-; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
-; StrCmp $0 "" +2
-; RMDir /r "$2\Application Data\SecondLife\"
-;Pop $0
-;
-;FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Delete the installed shader files
-;;; Since shaders are in active development, we'll likely need to shuffle them
-;;; around a bit from build to build. This ensures that shaders that we move
-;;; or rename in the dev tree don't get left behind in the install.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RemoveOldShaders
-
-;; Remove old shader files first so fallbacks will work. see DEV-5663
-RMDir /r "$INSTDIR\app_settings\shaders\*"
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Delete the installed XUI files
-;;; We've changed the directory hierarchy for skins, putting all XUI and texture
-;;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed
-;;; to skins/xui/en-us. Need to clean up the old path when upgrading
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RemoveOldXUI
+# Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575
+Delete "$INSTDIR\SecondLife.exe"
-;; remove old XUI and texture files
-RmDir /r "$INSTDIR\skins\html"
-RmDir /r "$INSTDIR\skins\xui"
-RmDir /r "$INSTDIR\skins\textures"
-Delete "$INSTDIR\skins\*.txt"
+# Remove old shader files first so fallbacks will work. See DEV-5663
+RMDir /r "$INSTDIR\app_settings\shaders"
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Remove any releasenotes files.
-;;; We are no longer including release notes with the viewer. This will delete
-;;; any that were left behind by an older installer. Delete will not fail if
-;;; the files do not exist
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RemoveOldReleaseNotes
+# Remove skins folder to clean up files removed during development
+RMDir /r "$INSTDIR\skins"
-;; remove releasenotes.txt file from application directory, and the shortcut
-;; from the start menu.
+# We are no longer including release notes with the viewer, so remove them.
Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk"
Delete "$INSTDIR\releasenotes.txt"
FunctionEnd
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Delete files in Documents and Settings\<user>\SecondLife
-; Delete files in Documents and Settings\All Users\SecondLife
+;; Delete files in \Users\<User>\AppData\
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function un.DocumentsAndSettingsFolder
+Function un.UserSettingsFiles
+
+StrCmp $DO_UNINSTALL_V2 "true" Keep # Don't remove user's settings files on auto upgrade
-; Delete files in Documents and Settings\<user>\SecondLife
+# Ask if user wants to keep data files or not
+MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep
+
+Remove:
Push $0
Push $1
Push $2
- DetailPrint "Deleting files in Documents and Settings folder"
+ DetailPrint "Deleting Second Life data files"
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+ StrCpy $0 0 # Index number used to iterate via EnumRegKey
LOOP:
EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
+ StrCmp $1 "" DONE # No more users
ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+ StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+# Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- ; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
-; RMDir /r "$2\Application Data\SecondLife\logs"
- RMDir /r "$2\Application Data\SecondLife\browser_profile"
- RMDir /r "$2\Application Data\SecondLife\user_settings"
- Delete "$2\Application Data\SecondLife\*.xml"
- Delete "$2\Application Data\SecondLife\*.bmp"
- Delete "$2\Application Data\SecondLife\search_history.txt"
- Delete "$2\Application Data\SecondLife\plugin_cookies.txt"
- Delete "$2\Application Data\SecondLife\typed_locations.txt"
+# Delete files in \Users\<User>\AppData\Roaming\SecondLife
+# Remove all settings files but leave any other .txt files to preserve the chat logs
+; RMDir /r "$2\AppData\Roaming\SecondLife\logs"
+ RMDir /r "$2\AppData\Roaming\SecondLife\browser_profile"
+ RMDir /r "$2\AppData\Roaming\SecondLife\user_settings"
+ Delete "$2\AppData\Roaming\SecondLife\*.xml"
+ Delete "$2\AppData\Roaming\SecondLife\*.bmp"
+ Delete "$2\AppData\Roaming\SecondLife\search_history.txt"
+ Delete "$2\AppData\Roaming\SecondLife\plugin_cookies.txt"
+ Delete "$2\AppData\Roaming\SecondLife\typed_locations.txt"
+# Delete files in \Users\<User>\AppData\Local\SecondLife
+ RmDir /r "$2\AppData\Local\SecondLife" #Delete the cache folder
CONTINUE:
IntOp $0 $0 + 1
@@ -629,82 +617,30 @@ Pop $2
Pop $1
Pop $0
-; Delete files in Documents and Settings\All Users\SecondLife
+# Delete files in ProgramData\Secondlife
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
StrCmp $0 "" +2
RMDir /r "$0\SecondLife"
Pop $0
-; Delete files in C:\Windows\Application Data\SecondLife
-; If the user is running on a pre-NT system, Application Data lives here instead of
-; in Documents and Settings.
-RMDir /r "$WINDIR\Application Data\SecondLife"
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Close the program, if running. Modifies no variables.
-; Allows user to bail out of uninstall process.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function un.CloseSecondLife
- Push $0
- FindWindow $0 "Second Life" ""
- IntCmp $0 0 DONE
- MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL
-
- CANCEL_UNINSTALL:
- Quit
-
- CLOSE:
- DetailPrint $(CloseSecondLifeUnInstDP)
- SendMessage $0 16 0 0
-
- LOOP:
- FindWindow $0 "Second Life" ""
- IntCmp $0 0 DONE
- Sleep 500
- Goto LOOP
-
- DONE:
- Pop $0
- Return
-FunctionEnd
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-; Delete the stored password for the current Windows user
-; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled
-;
-Function un.RemovePassword
-
-DetailPrint "Removing Second Life password"
-
-SetShellVarContext current
-Delete "$APPDATA\SecondLife\user_settings\password.dat"
-SetShellVarContext all
+Keep:
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Delete the installed files
-;;; This deletes the uninstall executable, but it works
-;;; because it is copied to temp directory before running
-;;;
-;;; Note: You must list all files here, because we only
-;;; want to delete our files, not things users left in the
-;;; application directories.
+;; Delete the installed files
+;; This deletes the uninstall executable, but it works because it is copied to temp directory before running
+;;
+;; Note: You must list all files here, because we only want to delete our files,
+;; not things users left in the program directory.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.ProgramFiles
-;; Remove mozilla file first so recursive directory deletion doesn't get hung up
-Delete "$INSTDIR\app_settings\mozilla\components"
-
-;; This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py
+# This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py
%%DELETE_FILES%%
-;; Optional/obsolete files. Delete won't fail if they don't exist.
+# Optional/obsolete files. Delete won't fail if they don't exist.
Delete "$INSTDIR\dronesettings.ini"
Delete "$INSTDIR\message_template.msg"
Delete "$INSTDIR\newview.pdb"
@@ -717,19 +653,12 @@ Delete "$INSTDIR\motions\*.lla"
Delete "$INSTDIR\trial\*.html"
Delete "$INSTDIR\newview.exe"
Delete "$INSTDIR\SecondLife.exe"
-;; MAINT-3099 workaround - prevent these log files, if present, from causing a user alert
+
+# MAINT-3099 workaround - prevent these log files, if present, from causing a user alert
Delete "$INSTDIR\VivoxVoiceService-*.log"
-;; Remove entire help directory
-Delete "$INSTDIR\help\Advanced\*"
-RMDir "$INSTDIR\help\Advanced"
-Delete "$INSTDIR\help\basics\*"
-RMDir "$INSTDIR\help\basics"
-Delete "$INSTDIR\help\Concepts\*"
-RMDir "$INSTDIR\help\Concepts"
-Delete "$INSTDIR\help\welcome\*"
-RMDir "$INSTDIR\help\welcome"
-Delete "$INSTDIR\help\*"
-RMDir "$INSTDIR\help"
+
+# Remove entire help directory
+RMDir /r "$INSTDIR\help"
Delete "$INSTDIR\uninst.exe"
RMDir "$INSTDIR"
@@ -737,7 +666,7 @@ RMDir "$INSTDIR"
IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER
FOLDERFOUND:
- ; Silent uninstall always removes all files (/SD IDYES)
+# Silent uninstall always removes all files (/SD IDYES)
MessageBox MB_YESNO $(DeleteProgramFilesMB) /SD IDYES IDNO NOFOLDER
RMDir /r "$INSTDIR"
@@ -746,240 +675,78 @@ NOFOLDER:
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Uninstall settings
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-UninstallText $(UninstallTextMsg)
-ShowUninstDetails show
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Uninstall section
+;; After install completes, launch app
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Section Uninstall
-
-; Start with some default values.
-StrCpy $INSTPROG "${INSTNAME}"
-StrCpy $INSTEXE "${INSTEXE}"
-StrCpy $INSTSHORTCUT "${SHORTCUT}"
-Call un.CheckIfAdministrator ; Make sure the user can install/uninstall
-
-; uninstall for all users (if you change this, change it in the install as well)
-SetShellVarContext all
-
-; Make sure we're not running
-Call un.CloseSecondLife
-
-; Clean up registry keys and subkeys (these should all be !defines somewhere)
-DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG"
-DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG"
-
-; Clean up shortcuts
-Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*"
-RMDir "$SMPROGRAMS\$INSTSHORTCUT"
-
-Delete "$DESKTOP\$INSTSHORTCUT.lnk"
-Delete "$INSTDIR\$INSTSHORTCUT.lnk"
-Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk"
-
-; Clean up cache and log files.
-; Leave them in-place for non AGNI installs.
-
-!ifdef UNINSTALL_SETTINGS
-Call un.DocumentsAndSettingsFolder
-!endif
-
-; remove stored password on uninstall
-Call un.RemovePassword
-
-Call un.ProgramFiles
+Function .onInstSuccess
+Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch.
+ Push $R0 # Option value, unused
+ StrCmp $SKIP_AUTORUN "true" +2;
+# Assumes SetOutPath $INSTDIR
+ Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTEXE"'
+ Pop $R0
-SectionEnd ; end of uninstall section
+FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Note: to add new languages, add a language file include to the list
-;; at the top of this file, add an entry to the menu and then add an
-;; entry to the language ID selector below
+;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function .onInit
-Call CheckWindowsVersion ; Don't install On unsupported systems
- Push $0
- ${GetParameters} $COMMANDLINE ; get our command line
-
- ${GetOptions} $COMMANDLINE "/SKIP_DIALOGS" $0
- IfErrors +2 0 ; If error jump past setting SKIP_DIALOGS
- StrCpy $SKIP_DIALOGS "true"
-
- ${GetOptions} $COMMANDLINE "/SKIP_AUTORUN" $0
- IfErrors +2 0 ; If error jump past setting SKIP_AUTORUN
- StrCpy $SKIP_AUTORUN "true"
-
- ${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English
-
- ; If no language (error), then proceed
- IfErrors lbl_configure_default_lang
- ; No error means we got a language, so use it
- StrCpy $LANGUAGE $0
- Goto lbl_return
-
-lbl_configure_default_lang:
- ; If we currently have a version of SL installed, default to the language of that install
- ; Otherwise don't change $LANGUAGE and it will default to the OS UI language.
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
- IfErrors +2 0 ; If error skip the copy instruction
- StrCpy $LANGUAGE $0
-
- ; For silent installs, no language prompt, use default
- IfSilent lbl_return
- StrCmp $SKIP_DIALOGS "true" lbl_return
-
-lbl_build_menu:
- Push ""
- # Use separate file so labels can be UTF-16 but we can still merge changes
- # into this ASCII file. JC
- !include "%%SOURCE%%\installers\windows\language_menu.nsi"
-
- Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain
- LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage)
- Pop $0
- StrCmp $0 "cancel" 0 +2
- Abort
- StrCpy $LANGUAGE $0
-
- ; save language in registry
- WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE
-lbl_return:
- Pop $0
+Function CheckWindowsServPack
+ ${If} ${IsWin7}
+ ${AndIfNot} ${IsServicePack} 1
+ MessageBox MB_OK $(CheckWindowsServPackMB)
+ DetailPrint $(UseLatestServPackDP)
Return
-FunctionEnd
+ ${EndIf}
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function un.onInit
- ; read language from registry and set for uninstaller
- ; Key will be removed on successful uninstall
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
- IfErrors lbl_end
- StrCpy $LANGUAGE $0
-lbl_end:
+ ${If} ${IsWin2008R2}
+ ${AndIfNot} ${IsServicePack} 1
+ MessageBox MB_OK $(CheckWindowsServPackMB)
+ DetailPrint $(UseLatestServPackDP)
Return
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; MAIN SECTION
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Section "" ; (default section)
-
-SetShellVarContext all ; install for all users (if you change this, change it in the uninstall as well)
-
-; Start with some default values.
-StrCpy $INSTPROG "${INSTNAME}"
-StrCpy $INSTEXE "${INSTEXE}"
-StrCpy $INSTSHORTCUT "${SHORTCUT}"
-
-Call CheckCPUFlags ; Make sure we have SSE2 support
-Call CheckIfAdministrator ; Make sure the user can install/uninstall
-Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version
-Call CloseSecondLife ; Make sure we're not running
-Call CheckNetworkConnection ; ping secondlife.com
-Call CheckWillUninstallV2 ; See if a V2 install exists and will be removed.
-Call CheckOldExeName ; Clean up a previous version of the exe
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE
- Call PreserveUserFiles
-PRESERVE_DONE:
-
-;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
-;Call RemoveCacheFiles ; Installing over removes potentially corrupted
- ; VFS and cache files.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Need to clean out shader files from previous installs to fix DEV-5663
-Call RemoveOldShaders
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Need to clean out old XUI files that predate skinning
-Call RemoveOldXUI
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Clear out old releasenotes.txt files. These are now on the public wiki.
-Call RemoveOldReleaseNotes
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Files
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py
-%%INSTALL_FILES%%
-
-# Pass the installer's language to the client to use as a default
-StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)"
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Shortcuts in start menu
-CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT"
-SetOutPath "$INSTDIR"
-CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
-
-
-WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \
- "InternetShortcut" "URL" \
- "http://join.secondlife.com/"
-WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \
- "InternetShortcut" "URL" \
- "http://www.secondlife.com/account/"
-WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \
- "InternetShortcut" "URL" \
- "http://wiki.secondlife.com/wiki/LSL_Portal"
-CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \
- '"$INSTDIR\uninst.exe"' ''
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Other shortcuts
-SetOutPath "$INSTDIR"
-CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
-CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
-CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
- '"$INSTDIR\uninst.exe"' ''
+ ${EndIf}
+FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Write registry
-WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR"
-WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}"
-WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT"
-WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE"
-WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)"
-WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"'
-
+;; Clobber user files - TEST ONLY
+;; This is here for testing, DO NOT USE UNLESS YOU KNOW WHAT YOU ARE TESTING FOR!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Write URL registry info
-WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life"
-WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" ""
-WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
-;; URL param must be last item passed to viewer, it ignores subsequent params
-;; to avoid parameter injection attacks.
-WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
-WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life"
-WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" ""
-WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
-;; URL param must be last item passed to viewer, it ignores subsequent params
-;; to avoid parameter injection attacks.
-WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
-
-; write out uninstaller
-WriteUninstaller "$INSTDIR\uninst.exe"
-
-; Uninstall existing "Second Life Viewer 2" install if needed.
-StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE
- ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2'
- Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" ; with _? option above, uninst.exe will be left behind.
- RMDir "$PROGRAMFILES\SecondLifeViewer2" ; will remove only if empty.
-
- Call RestoreUserFiles
- Call RemoveTempUserFiles
-REMOVE_SLV2_DONE:
+;Function ClobberUserFilesTESTONLY
-; end of default section
-SectionEnd
+;Push $0
+;Push $1
+;Push $2
+;
+; StrCpy $0 0 # Index number used to iterate via EnumRegKey
+;
+; LOOP:
+; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+; StrCmp $1 "" DONE # no more users
+;
+; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+; StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing
+;
+;# Required since ProfileImagePath is of type REG_EXPAND_SZ
+; ExpandEnvStrings $2 $2
+;
+; RMDir /r "$2\Application Data\SecondLife\"
+;
+; CONTINUE:
+; IntOp $0 $0 + 1
+; Goto LOOP
+; DONE:
+;
+;Pop $2
+;Pop $1
+;Pop $0
+;
+;# Copy files in Documents and Settings\All Users\SecondLife
+;Push $0
+; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+; StrCmp $0 "" +2
+; RMDir /r "$2\Application Data\SecondLife\"
+;Pop $0
+;
+;FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi
index 2352649b4b..83e1a3ea94 100755
--- a/indra/newview/installers/windows/lang_da.nsi
+++ b/indra/newview/installers/windows/lang_da.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi
index 397262afe1..866accae99 100755
--- a/indra/newview/installers/windows/lang_de.nsi
+++ b/indra/newview/installers/windows/lang_de.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi
index df0d55d9e0..343c312ddc 100755
--- a/indra/newview/installers/windows/lang_en-us.nsi
+++ b/indra/newview/installers/windows/lang_en-us.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi
index 32967a0dfa..f4f0786332 100755
--- a/indra/newview/installers/windows/lang_es.nsi
+++ b/indra/newview/installers/windows/lang_es.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi
index 7c75e25360..1b5dbfc975 100755
--- a/indra/newview/installers/windows/lang_fr.nsi
+++ b/indra/newview/installers/windows/lang_fr.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi
index ce66b61f9f..a456e6e417 100755
--- a/indra/newview/installers/windows/lang_it.nsi
+++ b/indra/newview/installers/windows/lang_it.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi
index e68830123a..5b1c5f4ce9 100755
--- a/indra/newview/installers/windows/lang_ja.nsi
+++ b/indra/newview/installers/windows/lang_ja.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi
index 7883819190..a172f0cdeb 100755
--- a/indra/newview/installers/windows/lang_pl.nsi
+++ b/indra/newview/installers/windows/lang_pl.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi
index eb3fb2386c..9ef252d232 100755
--- a/indra/newview/installers/windows/lang_pt-br.nsi
+++ b/indra/newview/installers/windows/lang_pt-br.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi
index 3b0042fbf5..d7c728d3e2 100755
--- a/indra/newview/installers/windows/lang_ru.nsi
+++ b/indra/newview/installers/windows/lang_ru.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi
index b9be1eab08..97c602f4fc 100755
--- a/indra/newview/installers/windows/lang_tr.nsi
+++ b/indra/newview/installers/windows/lang_tr.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi
index 3c6f6fd289..39c005a683 100755
--- a/indra/newview/installers/windows/lang_zh.nsi
+++ b/indra/newview/installers/windows/lang_zh.nsi
Binary files differ
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 5cb03cd2ae..359171c5bd 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -398,6 +398,8 @@ LLAgent::LLAgent() :
mAutoPilotFinishedCallback(NULL),
mAutoPilotCallbackData(NULL),
+ mMovementKeysLocked(FALSE),
+
mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))),
mHaveHomePosition(FALSE),
@@ -408,10 +410,8 @@ LLAgent::LLAgent() :
mCurrentFidget(0),
mFirstLogin(FALSE),
mOutfitChosen(FALSE),
-
- mVoiceConnected(false),
- mAppearanceSerialNum(0),
+ mVoiceConnected(false),
mMouselookModeInSignal(NULL),
mMouselookModeOutSignal(NULL)
@@ -2260,8 +2260,6 @@ void LLAgent::heardChat(const LLUUID& id)
mChatTimer.reset();
}
-const F32 SIT_POINT_EXTENTS = 0.2f;
-
LLSD ll_sdmap_from_vector3(const LLVector3& vec)
{
LLSD ret;
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index a2e9cedd88..4830cb754b 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -515,6 +515,9 @@ public:
void moveYaw(F32 mag, bool reset_view = true);
void movePitch(F32 mag);
+ BOOL isMovementLocked() const { return mMovementKeysLocked; }
+ void setMovementLocked(BOOL set_locked) { mMovementKeysLocked = set_locked; }
+
//--------------------------------------------------------------------
// Move the avatar's frame
//--------------------------------------------------------------------
@@ -569,6 +572,7 @@ private:
void (*mAutoPilotFinishedCallback)(BOOL, void *);
void* mAutoPilotCallbackData;
LLUUID mLeaderID;
+ BOOL mMovementKeysLocked;
/** Movement
** **
@@ -787,8 +791,7 @@ public:
private:
BOOL mShowAvatar; // Should we render the avatar?
- U32 mAppearanceSerialNum;
-
+
//--------------------------------------------------------------------
// Rendering state bitmap helpers
//--------------------------------------------------------------------
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 2356a84688..7f0330ee99 100755
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -35,6 +35,7 @@
#include "llfloaterreg.h"
#include "llhudmanager.h"
#include "lljoystickbutton.h"
+#include "llmorphview.h"
#include "llmoveview.h"
#include "llselectmgr.h"
#include "llsmoothstep.h"
@@ -885,7 +886,6 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
}
- LLVector3d camera_offset(mCameraFocusOffsetTarget);
LLVector3d camera_offset_unit(mCameraFocusOffsetTarget);
F32 min_zoom = LAND_MIN_ZOOM;
F32 current_distance = (F32)camera_offset_unit.normalize();
@@ -957,7 +957,6 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
}
else
{
- LLVector3d camera_offset(mCameraFocusOffsetTarget);
LLVector3d camera_offset_unit(mCameraFocusOffsetTarget);
F32 current_distance = (F32)camera_offset_unit.normalize();
F32 new_distance = current_distance - meters;
@@ -2269,7 +2268,10 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
gFocusMgr.setKeyboardFocus( NULL );
gFocusMgr.setMouseCapture( NULL );
-
+ if( gMorphView )
+ {
+ gMorphView->setVisible( TRUE );
+ }
// Remove any pitch or rotation from the avatar
LLVector3 at = gAgent.getAtAxis();
at.mV[VZ] = 0.f;
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index 44589f0d57..cfc445f998 100755
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -84,7 +84,7 @@ void LLAgentPilot::loadTxt(const std::string& filename)
return;
}
- llifstream file(filename);
+ llifstream file(filename.c_str());
if (!file)
{
@@ -125,7 +125,7 @@ void LLAgentPilot::loadXML(const std::string& filename)
return;
}
- llifstream file(filename);
+ llifstream file(filename.c_str());
if (!file)
{
@@ -168,7 +168,7 @@ void LLAgentPilot::save()
void LLAgentPilot::saveTxt(const std::string& filename)
{
llofstream file;
- file.open(filename);
+ file.open(filename.c_str());
if (!file)
{
@@ -191,7 +191,7 @@ void LLAgentPilot::saveTxt(const std::string& filename)
void LLAgentPilot::saveXML(const std::string& filename)
{
llofstream file;
- file.open(filename);
+ file.open(filename.c_str());
if (!file)
{
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index d7ef5fcba7..a64d5b50b3 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -3790,7 +3790,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b
//to cause appearance of the agent to be updated
bool result = false;
- if (result = gAgentWearables.moveWearable(item, closer_to_body))
+ if ((result = gAgentWearables.moveWearable(item, closer_to_body)))
{
gAgentAvatarp->wearableUpdated(item->getWearableType());
}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f6b6c71cfc..6dc71bc94e 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -685,6 +685,8 @@ LLAppViewer::LLAppViewer()
mQuitRequested(false),
mLogoutRequestSent(false),
mYieldTime(-1),
+ mLastAgentControlFlags(0),
+ mLastAgentForceUpdate(0),
mMainloopTimeout(NULL),
mAgentRegionLastAlive(false),
mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
@@ -745,6 +747,15 @@ public:
}
};
+namespace {
+// With Xcode 6, _exit() is too magical to use with boost::bind(), so provide
+// this little helper function.
+void fast_exit(int rc)
+{
+ _exit(rc);
+}
+}
+
bool LLAppViewer::init()
{
setupErrorHandling(mSecondInstance);
@@ -801,10 +812,10 @@ bool LLAppViewer::init()
S32 rc(gSavedSettings.getS32("QAModeTermCode"));
if (rc >= 0)
{
- // QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit()
- // rather than exit() because normal cleanup depends too much on
- // successful startup!
- LLError::setFatalFunction(boost::bind(_exit, rc));
+ // QAModeTermCode set, terminate with that rc on LL_ERRS. Use
+ // fast_exit() rather than exit() because normal cleanup depends too
+ // much on successful startup!
+ LLError::setFatalFunction(boost::bind(fast_exit, rc));
}
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
@@ -1679,19 +1690,12 @@ bool LLAppViewer::cleanup()
//dump scene loading monitor results
LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv"));
- if (LLFastTimerView::sAnalyzePerformance)
- {
- LL_INFOS() << "Analyzing performance" << LL_ENDL;
- std::string baseline_name = LLTrace::BlockTimer::sLogName + "_baseline.slp";
- std::string current_name = LLTrace::BlockTimer::sLogName + ".slp";
- std::string report_name = LLTrace::BlockTimer::sLogName + "_report.csv";
-
- LLFastTimerView::doAnalysis(
- gDirUtilp->getExpandedFilename(LL_PATH_LOGS, baseline_name),
- gDirUtilp->getExpandedFilename(LL_PATH_LOGS, current_name),
- gDirUtilp->getExpandedFilename(LL_PATH_LOGS, report_name));
- }
- LLMetricPerformanceTesterBasic::cleanClass();
+ // There used to be an 'if (LLFastTimerView::sAnalyzePerformance)' block
+ // here, completely redundant with the one that occurs later in this same
+ // function. Presumably the duplication was due to an automated merge gone
+ // bad. Not knowing which instance to prefer, we chose to retain the later
+ // one because it happens just after mFastTimerLogThread is deleted. This
+ // comment is in case we guessed wrong, so we can move it here instead.
// remove any old breakpad minidump files from the log directory
if (! isError())
@@ -2036,7 +2040,7 @@ bool LLAppViewer::cleanup()
sImageDecodeThread = NULL;
delete mFastTimerLogThread;
mFastTimerLogThread = NULL;
-
+
if (LLFastTimerView::sAnalyzePerformance)
{
LL_INFOS() << "Analyzing performance" << LL_ENDL;
@@ -3271,7 +3275,7 @@ void LLAppViewer::writeDebugInfo(bool isStatic)
: getDynamicDebugFile() );
LL_INFOS() << "Opening debug file " << *debug_filename << LL_ENDL;
- llofstream out_file(*debug_filename);
+ llofstream out_file(debug_filename->c_str());
isStatic ? LLSDSerialize::toPrettyXML(gDebugInfo, out_file)
: LLSDSerialize::toPrettyXML(gDebugInfo["Dynamic"], out_file);
@@ -3760,7 +3764,7 @@ void LLAppViewer::handleViewerCrash()
{
std::string filename;
filename = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "stats.log");
- llofstream file(filename, llofstream::binary);
+ llofstream file(filename.c_str(), std::ios_base::binary);
if(file.good())
{
LL_INFOS() << "Handle viewer crash generating stats log." << LL_ENDL;
@@ -4648,17 +4652,22 @@ void LLAppViewer::loadNameCache()
std::string filename =
gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml");
LL_INFOS("AvNameCache") << filename << LL_ENDL;
- llifstream name_cache_stream(filename);
+ llifstream name_cache_stream(filename.c_str());
if(name_cache_stream.is_open())
{
- LLAvatarNameCache::importFile(name_cache_stream);
+ if ( ! LLAvatarNameCache::importFile(name_cache_stream))
+ {
+ LL_WARNS("AppInit") << "removing invalid '" << filename << "'" << LL_ENDL;
+ name_cache_stream.close();
+ LLFile::remove(filename);
+ }
}
if (!gCacheName) return;
std::string name_cache;
name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache");
- llifstream cache_file(name_cache);
+ llifstream cache_file(name_cache.c_str());
if(cache_file.is_open())
{
if(gCacheName->importFile(cache_file)) return;
@@ -4666,24 +4675,26 @@ void LLAppViewer::loadNameCache()
}
void LLAppViewer::saveNameCache()
- {
+{
// display names cache
std::string filename =
gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml");
- llofstream name_cache_stream(filename);
+ llofstream name_cache_stream(filename.c_str());
if(name_cache_stream.is_open())
{
LLAvatarNameCache::exportFile(name_cache_stream);
-}
-
- if (!gCacheName) return;
-
- std::string name_cache;
- name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache");
- llofstream cache_file(name_cache);
- if(cache_file.is_open())
- {
- gCacheName->exportFile(cache_file);
+ }
+
+ // real names cache
+ if (gCacheName)
+ {
+ std::string name_cache;
+ name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache");
+ llofstream cache_file(name_cache.c_str());
+ if(cache_file.is_open())
+ {
+ gCacheName->exportFile(cache_file);
+ }
}
}
@@ -4811,22 +4822,24 @@ void LLAppViewer::idle()
gAgentPilot.updateTarget();
gAgent.autoPilot(&yaw);
}
-
- static LLFrameTimer agent_update_timer;
- static U32 last_control_flags;
-
- // When appropriate, update agent location to the simulator.
- F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
- BOOL flags_changed = gAgent.controlFlagsDirty() || (last_control_flags != gAgent.getControlFlags());
-
- if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
- {
- LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
- // Send avatar and camera info
- last_control_flags = gAgent.getControlFlags();
- send_agent_update(TRUE);
- agent_update_timer.reset();
- }
+
+ static LLFrameTimer agent_update_timer;
+
+ // When appropriate, update agent location to the simulator.
+ F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
+ F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
+ BOOL force_update = gAgent.controlFlagsDirty()
+ || (mLastAgentControlFlags != gAgent.getControlFlags())
+ || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
+ if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
+ {
+ LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
+ // Send avatar and camera info
+ mLastAgentControlFlags = gAgent.getControlFlags();
+ mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
+ send_agent_update(force_update);
+ agent_update_timer.reset();
+ }
}
//////////////////////////////////////
@@ -5374,7 +5387,7 @@ void LLAppViewer::idleNetwork()
}
// Handle per-frame message system processing.
- gMessageSystem->processAcks();
+ gMessageSystem->processAcks(gSavedSettings.getF32("AckCollectTime"));
#ifdef TIME_THROTTLE_MESSAGES
if (total_time >= CheckMessagesMaxTime)
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index e0f3f326c7..e8a1ca036b 100755
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -275,6 +275,8 @@ private:
bool mQuitRequested; // User wants to quit, may have modified documents open.
bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim.
S32 mYieldTime;
+ U32 mLastAgentControlFlags;
+ F32 mLastAgentForceUpdate;
struct SettingsFiles* mSettingsLocationList;
LLWatchdogTimeout* mMainloopTimeout;
@@ -314,6 +316,7 @@ public:
// consts from viewer.h
const S32 AGENT_UPDATES_PER_SECOND = 10;
+const S32 AGENT_FORCE_UPDATES_PER_SECOND = 1;
// Globals with external linkage. From viewer.h
// *NOTE:Mani - These will be removed as the Viewer App Cleanup project continues.
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index c792eb8813..56154a2de3 100755
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -63,16 +63,7 @@ namespace
int gArgC;
char** gArgV;
LLAppViewerMacOSX* gViewerAppPtr;
-#ifdef LL_CARBON_CRASH_HANDLER
- OSErr AEQuitHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn)
- {
- OSErr result = noErr;
-
- LLAppViewer::instance()->userQuit();
-
- return(result);
- }
-#endif
+
void (*gOldTerminateHandler)() = NULL;
}
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index a98ff64d0a..d2b1dcbf35 100755
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -63,9 +63,6 @@
#include "llsdutil.h"
#include "llvfs.h"
-// When uploading multiple files, don't display any of them when uploading more than this number.
-static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5;
-
void dialog_refresh_all();
void on_new_single_inventory_upload_complete(
@@ -229,21 +226,34 @@ void LLAssetUploadResponder::httpFailure()
{
// *TODO: Add adaptive retry policy?
LL_WARNS() << dumpResponse() << LL_ENDL;
- LLSD args;
+ std::string reason;
if (isHttpClientErrorStatus(getStatus()))
{
- args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
- args["REASON"] = "Error in upload request. Please visit "
+ reason = "Error in upload request. Please visit "
"http://secondlife.com/support for help fixing this problem.";
- LLNotificationsUtil::add("CannotUploadReason", args);
}
else
{
- args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
- args["REASON"] = "The server is experiencing unexpected "
+ reason = "The server is experiencing unexpected "
"difficulties.";
- LLNotificationsUtil::add("CannotUploadReason", args);
}
+ LLSD args;
+ args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
+ args["REASON"] = reason;
+ LLNotificationsUtil::add("CannotUploadReason", args);
+
+ // unfreeze script preview
+ if(mAssetType == LLAssetType::AT_LSL_TEXT)
+ {
+ LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]);
+ if (preview)
+ {
+ LLSD errors;
+ errors.append(LLTrans::getString("UploadFailed") + reason);
+ preview->callbackLSLCompileFailed(errors);
+ }
+ }
+
LLUploadDialog::modalUploadFinished();
LLFilePicker::instance().reset(); // unlock file picker when bulk upload fails
}
@@ -298,8 +308,22 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content)
void LLAssetUploadResponder::uploadFailure(const LLSD& content)
{
LL_WARNS() << dumpResponse() << LL_ENDL;
+
+ // unfreeze script preview
+ if(mAssetType == LLAssetType::AT_LSL_TEXT)
+ {
+ LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]);
+ if (preview)
+ {
+ LLSD errors;
+ errors.append(LLTrans::getString("UploadFailed") + content["message"].asString());
+ preview->callbackLSLCompileFailed(errors);
+ }
+ }
+
// remove the "Uploading..." message
LLUploadDialog::modalUploadFinished();
+
LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot");
if (floater_snapshot)
{
@@ -625,7 +649,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
}
else
{
- LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(item_id));
+ LLSD floater_key;
+ floater_key["taskid"] = task_id;
+ floater_key["itemid"] = item_id;
+ LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if (preview)
{
// Bytecode save completed
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 8235b13118..8dc8a2ff20 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -745,7 +745,7 @@ namespace action_give_inventory
}
std::string residents;
- LLAvatarActions::buildResidentsString(avatar_names, residents);
+ LLAvatarActions::buildResidentsString(avatar_names, residents, true);
std::string items;
build_items_string(inventory_selected_uuids, items);
@@ -777,7 +777,7 @@ namespace action_give_inventory
}
// static
-void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string)
+void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name)
{
llassert(avatar_names.size() > 0);
@@ -785,7 +785,15 @@ void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_name
const std::string& separator = LLTrans::getString("words_separator");
for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; )
{
- residents_string.append((*it).getDisplayName());
+ if(complete_name)
+ {
+ residents_string.append((*it).getCompleteName());
+ }
+ else
+ {
+ residents_string.append((*it).getDisplayName());
+ }
+
if (++it == avatar_names.end())
{
break;
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 85813f2152..bd0ac24e93 100755
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -221,7 +221,7 @@ public:
* @param avatar_names - a vector of given avatar names from which resulting string is built
* @param residents_string - the resulting string
*/
- static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string);
+ static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name = false);
/**
* Builds a string of residents' display names separated by "words_separator" string.
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index d7c959ccd6..25a5df9781 100755
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -76,7 +76,7 @@ void LLAvatarIconIDCache::load ()
// build filename for each user
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename);
- llifstream file(resolved_filename);
+ llifstream file(resolved_filename.c_str());
if (!file.is_open())
return;
@@ -114,7 +114,7 @@ void LLAvatarIconIDCache::save ()
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename);
// open a file for writing
- llofstream file (resolved_filename);
+ llofstream file (resolved_filename.c_str());
if (!file.is_open())
{
LL_WARNS() << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << LL_ENDL;
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 1c68fabf8b..272a68bdf7 100755
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -40,7 +40,6 @@ static const LLBlockListNameTypeComparator NAME_TYPE_COMPARATOR;
LLBlockList::LLBlockList(const Params& p)
: LLFlatListViewEx(p),
- mSelectedItem(NULL),
mDirty(true),
mShouldAddAll(true),
mActionType(NONE),
diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h
index bac79f869e..0f7fa41c32 100755
--- a/indra/newview/llblocklist.h
+++ b/indra/newview/llblocklist.h
@@ -83,7 +83,6 @@ private:
LLHandle<LLToggleableMenu> mContextMenu;
- LLBlockedListItem* mSelectedItem;
std::string mNameFilter;
bool mDirty;
bool mShouldAddAll;
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index afbb73ee08..b6c5496c17 100755
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -860,7 +860,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
{
LLAvatarName av_name;
LLAvatarNameCache::get( buddy_id, &av_name);
- buddy_map_t::value_type value(av_name.getDisplayName(), buddy_id);
+ buddy_map_t::value_type value(buddy_id, av_name.getDisplayName());
if(buddy->isOnline() && buddy->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION))
{
mMappable.insert(value);
@@ -871,7 +871,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy)
{
gCacheName->getFullName(buddy_id, mFullName);
- buddy_map_t::value_type value(mFullName, buddy_id);
+ buddy_map_t::value_type value(buddy_id, mFullName);
if(buddy->isOnline())
{
mOnline.insert(value);
@@ -883,8 +883,8 @@ bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* bud
{
LLAvatarName av_name;
LLAvatarNameCache::get(buddy_id, &av_name);
- mFullName = av_name.getDisplayName();
- buddy_map_t::value_type value(mFullName, buddy_id);
+ mFullName = av_name.getCompleteName();
+ buddy_map_t::value_type value(buddy_id, mFullName);
if(buddy->isOnline())
{
mOnline.insert(value);
diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h
index 8803cce59d..6e5fc01cd8 100755
--- a/indra/newview/llcallingcard.h
+++ b/indra/newview/llcallingcard.h
@@ -233,7 +233,7 @@ public:
LLCollectMappableBuddies() {}
virtual ~LLCollectMappableBuddies() {}
virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
- typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
+ typedef std::map<LLUUID, std::string> buddy_map_t;
buddy_map_t mMappable;
std::string mFullName;
};
@@ -245,7 +245,7 @@ public:
LLCollectOnlineBuddies() {}
virtual ~LLCollectOnlineBuddies() {}
virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
- typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
+ typedef std::map<LLUUID, std::string> buddy_map_t;
buddy_map_t mOnline;
std::string mFullName;
};
@@ -258,7 +258,7 @@ public:
LLCollectAllBuddies() {}
virtual ~LLCollectAllBuddies() {}
virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
- typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
+ typedef std::map<LLUUID, std::string> buddy_map_t;
buddy_map_t mOnline;
buddy_map_t mOffline;
std::string mFullName;
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 84b9ac756a..f0bd63ba46 100755
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -1113,7 +1113,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
if (irc_me && !use_plain_text_chat_history)
{
- message = chat.mFromName + message;
+ std::string from_name = chat.mFromName;
+ LLAvatarName av_name;
+ if (!chat.mFromID.isNull() &&
+ LLAvatarNameCache::get(chat.mFromID, &av_name) &&
+ !av_name.isDisplayNameDefault())
+ {
+ from_name = av_name.getCompleteName();
+ }
+ message = from_name + message;
}
if (square_brackets)
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index ce8878b849..dedb06c945 100755
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -378,6 +378,14 @@ BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
return TRUE;
}
+void LLIMChiclet::hidePopupMenu()
+{
+ if (mPopupMenu)
+ {
+ mPopupMenu->setVisible(FALSE);
+ }
+}
+
bool LLIMChiclet::canCreateMenu()
{
if(mPopupMenu)
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index d5e3a55fdf..9201c6bc00 100755
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -305,6 +305,8 @@ public:
*/
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ void hidePopupMenu();
+
protected:
LLIMChiclet(const LLIMChiclet::Params& p);
diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp
index 8d1a8c58f3..254e3f61a8 100755
--- a/indra/newview/llchicletbar.cpp
+++ b/indra/newview/llchicletbar.cpp
@@ -36,16 +36,6 @@
namespace
{
const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel";
-
- S32 get_curr_width(LLUICtrl* ctrl)
- {
- S32 cur_width = 0;
- if ( ctrl && ctrl->getVisible() )
- {
- cur_width = ctrl->getRect().getWidth();
- }
- return cur_width;
- }
}
LLChicletBar::LLChicletBar(const LLSD&)
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 06164e9597..1819fc74ee 100755
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -622,7 +622,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
LLSD clpConfigLLSD;
llifstream input_stream;
- input_stream.open(config_filename, std::ios::in | std::ios::binary);
+ input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary);
if(input_stream.is_open())
{
diff --git a/indra/newview/llcommunicationchannel.cpp b/indra/newview/llcommunicationchannel.cpp
index 0821510645..cf98b56b4c 100755
--- a/indra/newview/llcommunicationchannel.cpp
+++ b/indra/newview/llcommunicationchannel.cpp
@@ -103,11 +103,11 @@ void LLCommunicationChannel::onDelete(LLNotificationPtr p)
void LLCommunicationChannel::onFilterFail(LLNotificationPtr pNotificationPtr)
{
std::string notificationType = pNotificationPtr->getType();
- if ((notificationType == "groupnotify")
+ if (((notificationType == "groupnotify")
|| (notificationType == "offer")
- || (notificationType == "notifytoast")
+ || (notificationType == "notifytoast"))
&& !pNotificationPtr->isCancelled())
{
- mHistory.insert(std::make_pair<LLDate, LLNotificationPtr>(pNotificationPtr->getDate(), pNotificationPtr));
+ mHistory.insert(history_list_t::value_type(pNotificationPtr->getDate(), pNotificationPtr));
}
}
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 56e1a26709..deff94ea16 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -213,7 +213,6 @@ private:
void onAvatarNameCache(const LLAvatarName& av_name); // callback used by fetchAvatarName
void updateName(const LLAvatarName& av_name);
- bool mIsMuted; // default is false
bool mIsModerator; // default is false
bool mDisplayModeratorLabel; // default is false
std::string mDisplayName;
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 4250aeacd6..b18e543f0a 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -296,7 +296,7 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
LLFloater* volume_floater = LLFloaterReg::findInstance("floater_voice_volume");
LLFloater* chat_volume_floater = LLFloaterReg::findInstance("chat_voice");
if (result
- && getRoot()
+ && getRoot() && (getRoot()->getCurSelectedItem() == this)
&& !(volume_floater && volume_floater->isShown() && volume_floater->hasFocus())
&& !(chat_volume_floater && chat_volume_floater->isShown() && chat_volume_floater->hasFocus()))
{
diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp
index 131675310e..803e2b2fb2 100755
--- a/indra/newview/lldaycyclemanager.cpp
+++ b/indra/newview/lldaycyclemanager.cpp
@@ -207,7 +207,7 @@ bool LLDayCycleManager::addPreset(const std::string& name, const LLSD& data)
{
if (name.empty())
{
- llassert(name.empty());
+ //llassert(name.empty());
return false;
}
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index c56006d9a3..f956023358 100755
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -54,7 +54,6 @@
const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f;
const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f;
const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f;
-const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f;
static LLTrace::BlockTimerStatHandle FTM_CULL_REBOUND("Cull Rebound");
@@ -874,7 +873,7 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
}
pos -= camera.getOrigin();
- mDistanceWRTCamera = llround(pos.magVec(), 0.01f);
+ mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f);
mVObjp->updateLOD();
}
}
@@ -1117,7 +1116,14 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
retval = gPipeline.getSpatialPartition((LLViewerObject*) mVObjp);
}
else if (isRoot())
- { //must be an active volume
+ {
+ if (mSpatialBridge && (mSpatialBridge->asPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) != mVObjp->isHUDAttachment())
+ {
+ // remove obsolete bridge
+ mSpatialBridge->markDead();
+ setSpatialBridge(NULL);
+ }
+ //must be an active volume
if (!mSpatialBridge)
{
if (mVObjp->isHUDAttachment())
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index ab96201a63..e1d3d1a905 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -71,8 +71,6 @@ extern BOOL gUseGLPick;
F32 CLOTHING_GRAVITY_EFFECT = 0.7f;
F32 CLOTHING_ACCEL_FORCE_FACTOR = 0.2f;
-const S32 NUM_TEST_AVATARS = 30;
-const S32 MIN_PIXEL_AREA_2_PASS_SKINNING = 500000000;
// Format for gAGPVertices
// vertex format for bumpmapping:
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 67d1642639..33f7bc305c 100755
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1329,7 +1329,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
for( i = minimum; i <= maximum; i++ )
{
F32 minus_one_to_one = F32(maximum - i) * twice_one_over_range - 1.f;
- bias_and_scale_lut[i] = llclampb(llround(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
+ bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
}
}
else
@@ -1337,7 +1337,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
for( i = minimum; i <= maximum; i++ )
{
F32 minus_one_to_one = F32(i - minimum) * twice_one_over_range - 1.f;
- bias_and_scale_lut[i] = llclampb(llround(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
+ bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
}
}
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index 41d378fea1..a626ad1bff 100755
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -303,7 +303,8 @@ void LLEnvManagerNew::loadUserPrefs()
mUserPrefs.mSkyPresetName = gSavedSettings.getString("SkyPresetName");
mUserPrefs.mDayCycleName = gSavedSettings.getString("DayCycleName");
- mUserPrefs.mUseRegionSettings = gSavedSettings.getBOOL("UseEnvironmentFromRegion");
+ bool use_region_settings = gSavedSettings.getBOOL("EnvironmentPersistAcrossLogin") ? gSavedSettings.getBOOL("UseEnvironmentFromRegion") : true;
+ mUserPrefs.mUseRegionSettings = use_region_settings;
mUserPrefs.mUseDayCycle = gSavedSettings.getBOOL("UseDayCycle");
if (mUserPrefs.mUseRegionSettings)
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 32b510b21a..de349a03d4 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -330,24 +330,52 @@ void LLFace::dirtyTexture()
{
vobj->mLODChanged = TRUE;
- LLVOAvatar* avatar = vobj->getAvatar();
- if (avatar)
- { //avatar render cost may have changed
- avatar->updateVisualComplexity();
- }
+ LLVOAvatar* avatar = vobj->getAvatar();
+ if (avatar)
+ { //avatar render cost may have changed
+ avatar->updateVisualComplexity();
+ }
}
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE);
}
}
}
-
+
gPipeline.markTextured(drawablep);
}
+void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture)
+{
+ LLDrawable* drawablep = getDrawable();
+ if(mVObjp.notNull() && mVObjp->getVolume())
+ {
+ LLVOVolume *vobj = drawablep->getVOVolume();
+ if(vobj && vobj->notifyAboutCreatingTexture(texture))
+ {
+ gPipeline.markTextured(drawablep);
+ gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
+ }
+ }
+}
+
+void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture)
+{
+ LLDrawable* drawablep = getDrawable();
+ if(mVObjp.notNull() && mVObjp->getVolume())
+ {
+ LLVOVolume *vobj = drawablep->getVOVolume();
+ if(vobj && vobj->notifyAboutMissingAsset(texture))
+ {
+ gPipeline.markTextured(drawablep);
+ gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
+ }
+ }
+}
+
void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
{
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
-
+
if(mTexture[ch] == new_texture)
{
return ;
@@ -956,6 +984,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po
const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset);
const LLVector4a& normal4a = vf.mNormals[0];
const LLVector4a& tangent = vf.mTangents[0];
+ if (!&tangent)
+ {
+ return;
+ }
LLVector4a binormal4a;
binormal4a.setCross3(normal4a, tangent);
@@ -1299,15 +1331,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
if (shiny_in_alpha)
- {
-
- GLfloat alpha[4] =
{
- 0.00f,
- 0.25f,
- 0.5f,
- 0.75f
- };
+
+ static const GLfloat alpha[4] =
+ {
+ 0.00f,
+ 0.25f,
+ 0.5f,
+ 0.75f
+ };
llassert(tep->getShiny() <= 3);
color.mV[3] = U8 (alpha[tep->getShiny()] * 255);
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index d3a561facc..ee545acb94 100755
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -218,7 +218,7 @@ public:
void setHasMedia(bool has_media) { mHasMedia = has_media ;}
BOOL hasMedia() const ;
- BOOL switchTexture() ;
+ BOOL switchTexture() ;
//vertex buffer tracking
void setVertexBuffer(LLVertexBuffer* buffer);
@@ -230,10 +230,13 @@ public:
static U32 getRiggedDataMask(U32 type);
+ void notifyAboutCreatingTexture(LLViewerTexture *texture);
+ void notifyAboutMissingAsset(LLViewerTexture *texture);
+
public: //aligned members
LLVector4a mExtents[2];
-private:
+private:
F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius );
BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
public:
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 76c37439ab..4a059fdc67 100755
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -219,7 +219,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
F32 lerp = llclamp(1.f - (F32) (x - mGraphRect.mLeft) / (F32) mGraphRect.getWidth(), 0.f, 1.f);
- mScrollIndex = llround( lerp * (F32)(mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY));
+ mScrollIndex = ll_round( lerp * (F32)(mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY));
mScrollIndex = llclamp( mScrollIndex, 0, (S32)mRecording.getNumRecordedPeriods());
return TRUE;
}
@@ -361,7 +361,6 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
static BlockTimerStatHandle FTM_RENDER_TIMER("Timers");
static const S32 MARGIN = 10;
-static const S32 LEGEND_WIDTH = 220;
static std::vector<LLColor4> sTimerColors;
@@ -1136,7 +1135,7 @@ void LLFastTimerView::drawLineGraph()
max_time = llmax(F32Microseconds(1.f), F32Microseconds(cur_max));
}
- max_calls = llround(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f)));
+ max_calls = ll_round(lerp((F32)max_calls, (F32) cur_max_calls, LLSmoothInterpolation::getInterpolant(0.1f)));
if (llabs((S32)(max_calls - cur_max_calls)) <= 1)
{
max_calls = cur_max_calls;
@@ -1472,7 +1471,7 @@ void LLFastTimerView::drawBars()
LLRect frame_bar_rect;
frame_bar_rect.setLeftTopAndSize(mBarRect.mLeft,
bars_top,
- llround((mAverageTimerRow.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()),
+ ll_round((mAverageTimerRow.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth()),
bar_height);
mAverageTimerRow.mTop = frame_bar_rect.mTop;
mAverageTimerRow.mBottom = frame_bar_rect.mBottom;
@@ -1486,7 +1485,7 @@ void LLFastTimerView::drawBars()
row.mTop = frame_bar_rect.mTop;
row.mBottom = frame_bar_rect.mBottom;
frame_bar_rect.mRight = frame_bar_rect.mLeft
- + llround((row.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth());
+ + ll_round((row.mBars[0].mTotalTime / mTotalTimeDisplay) * mBarRect.getWidth());
drawBar(frame_bar_rect, row, image_width, image_height);
frame_bar_rect.translate(0, -(bar_height + vpad));
@@ -1617,8 +1616,8 @@ S32 LLFastTimerView::drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width,
}
LLRect children_rect;
- children_rect.mLeft = llround(timer_bar.mChildrenStart / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
- children_rect.mRight = llround(timer_bar.mChildrenEnd / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
+ children_rect.mLeft = ll_round(timer_bar.mChildrenStart / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
+ children_rect.mRight = ll_round(timer_bar.mChildrenEnd / mTotalTimeDisplay * (F32)mBarRect.getWidth()) + mBarRect.mLeft;
if (bar_rect.getHeight() > MIN_BAR_HEIGHT)
{
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 6c5b5be720..fc9e85caf8 100755
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -480,7 +480,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
if (item->getParentUUID() == favorites_id)
{
- LL_WARNS() << "Attemt to copy a favorite item into the same folder." << LL_ENDL;
+ LL_WARNS("FavoritesBar") << "Attemt to copy a favorite item into the same folder." << LL_ENDL;
break;
}
@@ -632,7 +632,7 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con
// landmarks to an empty favorites bar.
updateButtons();
- LL_INFOS() << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL;
+ LL_INFOS("FavoritesBar") << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL;
}
//virtual
@@ -871,7 +871,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem
fav_btn = LLUICtrlFactory::create<LLFavoriteLandmarkButton>(fav_btn_params);
if (NULL == fav_btn)
{
- LL_WARNS() << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL;
+ LL_WARNS("FavoritesBar") << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL;
return NULL;
}
@@ -1160,7 +1160,7 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata)
void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
{
std::string action = userdata.asString();
- LL_INFOS() << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL;
+ LL_INFOS("FavoritesBar") << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL;
LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID);
if (!item)
@@ -1444,11 +1444,25 @@ void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id)
boost::bind(&LLFavoritesOrderStorage::onLandmarkLoaded, this, asset_id, _1));
if (lm)
{
+ LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " already loaded" << LL_ENDL;
onLandmarkLoaded(asset_id, lm);
}
}
// static
+std::string LLFavoritesOrderStorage::getStoredFavoritesFilename()
+{
+ std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "");
+
+ return (user_dir.empty() ? ""
+ : gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,
+ "stored_favorites_"
+ + LLGridManager::getInstance()->getGrid()
+ + ".xml")
+ );
+}
+
+// static
void LLFavoritesOrderStorage::destroyClass()
{
LLFavoritesOrderStorage::instance().cleanup();
@@ -1456,10 +1470,14 @@ void LLFavoritesOrderStorage::destroyClass()
std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
llifstream file;
- file.open(old_filename);
+ file.open(old_filename.c_str());
if (file.is_open())
{
- std::string new_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
+ file.close();
+ std::string new_filename = getStoredFavoritesFilename();
+ LL_INFOS("FavoritesBar") << "moving favorites from old name '" << old_filename
+ << "' to new name '" << new_filename << "'"
+ << LL_ENDL;
LLFile::copy(old_filename,new_filename);
LLFile::remove(old_filename);
}
@@ -1474,18 +1492,35 @@ void LLFavoritesOrderStorage::destroyClass()
}
}
+std::string LLFavoritesOrderStorage::getSavedOrderFileName()
+{
+ // If we quit from the login screen we will not have an SL account
+ // name. Don't try to save, otherwise we'll dump a file in
+ // C:\Program Files\SecondLife\ or similar. JC
+ std::string user_dir = gDirUtilp->getLindenUserDir();
+ return (user_dir.empty() ? "" : gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME));
+}
+
void LLFavoritesOrderStorage::load()
{
// load per-resident sorting information
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME);
+ std::string filename = getSavedOrderFileName();
LLSD settings_llsd;
llifstream file;
- file.open(filename);
+ file.open(filename.c_str());
if (file.is_open())
{
LLSDSerialize::fromXML(settings_llsd, file);
+ LL_INFOS("FavoritesBar") << "loaded favorites order from '" << filename << "' "
+ << (settings_llsd.isMap() ? "" : "un") << "successfully"
+ << LL_ENDL;
+ file.close();
}
+ else
+ {
+ LL_WARNS("FavoritesBar") << "unable to open favorites order file at '" << filename << "'" << LL_ENDL;
+ }
for (LLSD::map_const_iterator iter = settings_llsd.beginMap();
iter != settings_llsd.endMap(); ++iter)
@@ -1499,92 +1534,120 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
// Do not change the file if we are not logged in yet.
if (!LLLoginInstance::getInstance()->authSuccess())
{
- LL_WARNS() << "Cannot save favorites: not logged in" << LL_ENDL;
+ LL_WARNS("FavoritesBar") << "Cannot save favorites: not logged in" << LL_ENDL;
return;
}
- std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "");
- if (user_dir.empty())
- {
- LL_WARNS() << "Cannot save favorites: empty user dir name" << LL_ENDL;
- return;
- }
-
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
- llifstream in_file;
- in_file.open(filename);
- LLSD fav_llsd;
- if (in_file.is_open())
- {
- LLSDSerialize::fromXML(fav_llsd, in_file);
- }
-
- const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH);
-
- LLSD user_llsd;
- for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
- {
- LLSD value;
- value["name"] = (*it)->getName();
- value["asset_id"] = (*it)->getAssetUUID();
-
- slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]);
- if (slurl_iter != mSLURLs.end())
- {
- LL_DEBUGS() << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL;
- value["slurl"] = slurl_iter->second;
- user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value;
- }
- else
- {
- LL_WARNS() << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL;
- }
- }
-
- LLAvatarName av_name;
- LLAvatarNameCache::get( gAgentID, &av_name );
- // Note : use the "John Doe" and not the "john.doe" version of the name
- // as we'll compare it with the stored credentials in the login panel.
- LL_DEBUGS() << "Saved favorites for " << av_name.getUserName() << LL_ENDL;
- fav_llsd[av_name.getUserName()] = user_llsd;
-
- llofstream file;
- file.open(filename);
- LLSDSerialize::toPrettyXML(fav_llsd, file);
+ std::string filename = getStoredFavoritesFilename();
+ if (!filename.empty())
+ {
+ llifstream in_file;
+ in_file.open(filename.c_str());
+ LLSD fav_llsd;
+ if (in_file.is_open())
+ {
+ LLSDSerialize::fromXML(fav_llsd, in_file);
+ LL_INFOS("FavoritesBar") << "loaded favorites from '" << filename << "' "
+ << (fav_llsd.isMap() ? "" : "un") << "successfully"
+ << LL_ENDL;
+ in_file.close();
+ }
+ else
+ {
+ LL_WARNS("FavoritesBar") << "unable to open favorites from '" << filename << "'" << LL_ENDL;
+ }
+
+ const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH);
+
+ LLSD user_llsd;
+ for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
+ {
+ LLSD value;
+ value["name"] = (*it)->getName();
+ value["asset_id"] = (*it)->getAssetUUID();
+
+ slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]);
+ if (slurl_iter != mSLURLs.end())
+ {
+ LL_DEBUGS("FavoritesBar") << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL;
+ value["slurl"] = slurl_iter->second;
+ user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value;
+ }
+ else
+ {
+ LL_WARNS("FavoritesBar") << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL;
+ }
+ }
+
+ LLAvatarName av_name;
+ LLAvatarNameCache::get( gAgentID, &av_name );
+ // Note : use the "John Doe" and not the "john.doe" version of the name
+ // as we'll compare it with the stored credentials in the login panel.
+ fav_llsd[av_name.getUserName()] = user_llsd;
+
+ llofstream file;
+ file.open(filename.c_str());
+ if ( file.is_open() )
+ {
+ LLSDSerialize::toPrettyXML(fav_llsd, file);
+ LL_INFOS("FavoritesBar") << "saved favorites for '" << av_name.getUserName()
+ << "' to '" << filename << "' "
+ << LL_ENDL;
+ file.close();
+ }
+ else
+ {
+ LL_WARNS("FavoritesBar") << "unable to open favorites storage for '" << av_name.getUserName()
+ << "' at '" << filename << "' "
+ << LL_ENDL;
+ }
+ }
}
void LLFavoritesOrderStorage::removeFavoritesRecordOfUser()
{
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
- LLSD fav_llsd;
- llifstream file;
- file.open(filename);
- if (!file.is_open()) return;
- LLSDSerialize::fromXML(fav_llsd, file);
-
- LLAvatarName av_name;
- LLAvatarNameCache::get( gAgentID, &av_name );
- // Note : use the "John Doe" and not the "john.doe" version of the name.
- // See saveFavoritesSLURLs() here above for the reason why.
- LL_DEBUGS() << "Removed favorites for " << av_name.getUserName() << LL_ENDL;
- if (fav_llsd.has(av_name.getUserName()))
- {
- fav_llsd.erase(av_name.getUserName());
- }
-
- llofstream out_file;
- out_file.open(filename);
- LLSDSerialize::toPrettyXML(fav_llsd, out_file);
-
+ std::string filename = getStoredFavoritesFilename();
+ if (!filename.empty())
+ {
+ LLSD fav_llsd;
+ llifstream file;
+ file.open(filename.c_str());
+ if (file.is_open())
+ {
+ LLSDSerialize::fromXML(fav_llsd, file);
+ file.close();
+
+ LLAvatarName av_name;
+ LLAvatarNameCache::get( gAgentID, &av_name );
+ // Note : use the "John Doe" and not the "john.doe" version of the name.
+ // See saveFavoritesSLURLs() here above for the reason why.
+ if (fav_llsd.has(av_name.getUserName()))
+ {
+ LL_INFOS("FavoritesBar") << "Removed favorites for " << av_name.getUserName() << LL_ENDL;
+ fav_llsd.erase(av_name.getUserName());
+ }
+
+ llofstream out_file;
+ out_file.open(filename.c_str());
+ if ( out_file.is_open() )
+ {
+ LLSDSerialize::toPrettyXML(fav_llsd, out_file);
+ LL_INFOS("FavoritesBar") << "saved favorites to '" << filename << "' "
+ << LL_ENDL;
+ out_file.close();
+ }
+ }
+ }
}
void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark)
{
- if (!landmark) return;
-
+ if (landmark)
+ {
+ LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " loaded" << LL_ENDL;
LLVector3d pos_global;
if (!landmark->getGlobalPos(pos_global))
{
@@ -1595,42 +1658,54 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar
if (!pos_global.isExactlyZero())
{
+ LL_DEBUGS("FavoritesBar") << "requesting slurl for landmark " << asset_id << LL_ENDL;
LLLandmarkActions::getSLURLfromPosGlobal(pos_global,
boost::bind(&LLFavoritesOrderStorage::storeFavoriteSLURL, this, asset_id, _1));
}
+ }
}
void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl)
{
- LL_DEBUGS() << "Saving landmark SLURL: " << slurl << LL_ENDL;
+ LL_DEBUGS("FavoritesBar") << "Saving landmark SLURL '" << slurl << "' for " << asset_id << LL_ENDL;
mSLURLs[asset_id] = slurl;
}
void LLFavoritesOrderStorage::save()
{
- // nothing to save if clean
- if (!mIsDirty) return;
-
- // If we quit from the login screen we will not have an SL account
- // name. Don't try to save, otherwise we'll dump a file in
- // C:\Program Files\SecondLife\ or similar. JC
- std::string user_dir = gDirUtilp->getLindenUserDir();
- if (!user_dir.empty())
- {
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME);
- LLSD settings_llsd;
-
- for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter)
- {
- settings_llsd[iter->first.asString()] = iter->second;
- }
-
- llofstream file;
- file.open(filename);
- LLSDSerialize::toPrettyXML(settings_llsd, file);
- }
+ if (mIsDirty)
+ {
+ // something changed, so save it
+ std::string filename = LLFavoritesOrderStorage::getInstance()->getSavedOrderFileName();
+ if (!filename.empty())
+ {
+ LLSD settings_llsd;
+
+ for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter)
+ {
+ settings_llsd[iter->first.asString()] = iter->second;
+ }
+
+ llofstream file;
+ file.open(filename.c_str());
+ if ( file.is_open() )
+ {
+ LLSDSerialize::toPrettyXML(settings_llsd, file);
+ LL_INFOS("FavoritesBar") << "saved favorites order to '" << filename << "' " << LL_ENDL;
+ }
+ else
+ {
+ LL_WARNS("FavoritesBar") << "failed to open favorites order file '" << filename << "' " << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_DEBUGS("FavoritesBar") << "no user directory available to store favorites order file" << LL_ENDL;
+ }
+ }
}
+
void LLFavoritesOrderStorage::cleanup()
{
// nothing to clean
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 5ca1d3e8ed..a370724947 100755
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -162,19 +162,7 @@ private:
boost::signals2::connection mEndDragConnection;
};
-/*
-class AddFavoriteLandmarkCallback : public LLInventoryCallback
-{
-public:
- AddFavoriteLandmarkCallback() : mTargetLandmarkId(LLUUID::null) {}
- void setTargetLandmarkId(const LLUUID& target_uuid) { mTargetLandmarkId = target_uuid; }
-
-private:
- void fire(const LLUUID& inv_item);
- LLUUID mTargetLandmarkId;
-};
-*/
/**
* Class to store sorting order of favorites landmarks in a local file. EXT-3985.
* It replaced previously implemented solution to store sort index in landmark's name as a "<N>@" prefix.
@@ -222,14 +210,16 @@ private:
friend class LLSingleton<LLFavoritesOrderStorage>;
LLFavoritesOrderStorage() : mIsDirty(false) { load(); }
~LLFavoritesOrderStorage() { save(); }
-
+
/**
* Removes sort indexes for items which are not in Favorites bar for now.
*/
void cleanup();
const static std::string SORTING_DATA_FILE_NAME;
-
+ std::string getSavedOrderFileName();
+ static std::string getStoredFavoritesFilename();
+
void load();
void save();
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index d89599cb45..ea39f812fd 100755
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -76,6 +76,8 @@ const char FEATURE_TABLE_FILENAME[] = "featuretable%s.txt";
const char FEATURE_TABLE_VER_FILENAME[] = "featuretable%s.%s.txt";
#endif
+#if 0 // consuming code in #if 0 below
+#endif
LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level)
: mValid(TRUE), mName(name), mAvailable(available), mRecommendedLevel(level)
{
@@ -329,7 +331,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename)
U32 version;
cleanupFeatureTables(); // in case an earlier attempt left partial results
- file.open(filename); /*Flawfinder: ignore*/
+ file.open(filename.c_str()); /*Flawfinder: ignore*/
if (!file)
{
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 0e0cec3943..b6e67375cd 100755
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -164,11 +164,9 @@ private:
#if LL_DARWIN
S32 mPickOptions;
std::vector<std::string> mFileVector;
- UInt32 mFileIndex;
bool doNavChooseDialog(ELoadFilter filter);
bool doNavSaveDialog(ESaveFilter filter, const std::string& filename);
- //static Boolean navOpenFilterProc(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode);
std::vector<std::string>* navOpenFilterProc(ELoadFilter filter);
#endif
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index b64034b945..b6e61f83b1 100755
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -308,7 +308,7 @@ void LLVolumeImplFlexible::updateRenderRes()
mRenderRes = (S32) (12.f*app_angle);
#else //legacy behavior
//number of segments only cares about z axis
- F32 app_angle = llround((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
+ F32 app_angle = ll_round((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
// Rendering sections increases with visible angle on the screen
mRenderRes = (S32)(FLEXIBLE_OBJECT_MAX_SECTIONS*4*app_angle*DEG_TO_RAD/LLViewerCamera::getInstance()->getView());
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 66149a4367..b342d8fdf3 100755
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -123,18 +123,17 @@ BOOL LLFloaterAbout::postBuild()
LLViewerTextEditor *support_widget =
getChild<LLViewerTextEditor>("support_editor", true);
- LLViewerTextEditor *linden_names_widget =
- getChild<LLViewerTextEditor>("linden_names", true);
-
LLViewerTextEditor *contrib_names_widget =
getChild<LLViewerTextEditor>("contrib_names", true);
- LLViewerTextEditor *trans_names_widget =
- getChild<LLViewerTextEditor>("trans_names", true);
+ LLViewerTextEditor *licenses_widget =
+ getChild<LLViewerTextEditor>("licenses_editor", true);
getChild<LLUICtrl>("copy_btn")->setCommitCallback(
boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this));
+ static const LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor");
+
if (gAgent.getRegion())
{
// start fetching server release notes URL
@@ -153,29 +152,11 @@ BOOL LLFloaterAbout::postBuild()
support_widget->setEnabled(FALSE);
support_widget->startOfDoc();
- // Get the names of Lindens, added by viewer_manifest.py at build time
- std::string lindens_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"lindens.txt");
- llifstream linden_file;
- std::string lindens;
- linden_file.open(lindens_path); /* Flawfinder: ignore */
- if (linden_file.is_open())
- {
- std::getline(linden_file, lindens); // all names are on a single line
- linden_file.close();
- linden_names_widget->setText(lindens);
- }
- else
- {
- LL_INFOS("AboutInit") << "Could not read lindens file at " << lindens_path << LL_ENDL;
- }
- linden_names_widget->setEnabled(FALSE);
- linden_names_widget->startOfDoc();
-
// Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time
std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt");
llifstream contrib_file;
std::string contributors;
- contrib_file.open(contributors_path); /* Flawfinder: ignore */
+ contrib_file.open(contributors_path.c_str()); /* Flawfinder: ignore */
if (contrib_file.is_open())
{
std::getline(contrib_file, contributors); // all names are on a single line
@@ -189,23 +170,28 @@ BOOL LLFloaterAbout::postBuild()
contrib_names_widget->setEnabled(FALSE);
contrib_names_widget->startOfDoc();
- // Get the names of translators, extracted from .../doc/tranlations.txt by viewer_manifest.py at build time
- std::string translators_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"translators.txt");
- llifstream trans_file;
- std::string translators;
- trans_file.open(translators_path); /* Flawfinder: ignore */
- if (trans_file.is_open())
+ // Get the Versions and Copyrights, created at build time
+ std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"packages-info.txt");
+ llifstream licenses_file;
+ licenses_file.open(licenses_path.c_str()); /* Flawfinder: ignore */
+ if (licenses_file.is_open())
{
- std::getline(trans_file, translators); // all names are on a single line
- trans_file.close();
+ std::string license_line;
+ licenses_widget->clear();
+ while ( std::getline(licenses_file, license_line) )
+ {
+ licenses_widget->appendText(license_line+"\n", FALSE,
+ LLStyle::Params() .color(about_color));
+ }
+ licenses_file.close();
}
else
{
- LL_WARNS("AboutInit") << "Could not read translators file at " << translators_path << LL_ENDL;
+ // this case will use the (out of date) hard coded value from the XUI
+ LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL;
}
- trans_names_widget->setText(translators);
- trans_names_widget->setEnabled(FALSE);
- trans_names_widget->startOfDoc();
+ licenses_widget->setEnabled(FALSE);
+ licenses_widget->startOfDoc();
return TRUE;
}
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 513c33e60d..566a3c9cd3 100755
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -348,11 +348,11 @@ void LLFloaterAvatarPicker::populateFriend()
for(it = collector.mOnline.begin(); it!=collector.mOnline.end(); it++)
{
- friends_scroller->addStringUUIDItem(it->first, it->second);
+ friends_scroller->addStringUUIDItem(it->second, it->first);
}
for(it = collector.mOffline.begin(); it!=collector.mOffline.end(); it++)
{
- friends_scroller->addStringUUIDItem(it->first, it->second);
+ friends_scroller->addStringUUIDItem(it->second, it->first);
}
friends_scroller->sortByColumnIndex(0, TRUE);
}
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index ad44c509d9..34904cf7ed 100755
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -30,10 +30,17 @@
#include "llsd.h"
#include "mean_collision_data.h"
+#include "llavataractions.h"
#include "llfloaterbump.h"
+#include "llfloaterreporter.h"
+#include "llmutelist.h"
+#include "llpanelblockedlist.h"
#include "llscrolllistctrl.h"
+#include "lltrans.h"
#include "lluictrlfactory.h"
#include "llviewermessage.h"
+#include "llviewermenu.h"
+#include "llviewerobjectlist.h"
///----------------------------------------------------------------------------
/// Class LLFloaterBump
@@ -43,6 +50,18 @@
LLFloaterBump::LLFloaterBump(const LLSD& key)
: LLFloater(key)
{
+ mCommitCallbackRegistrar.add("Avatar.SendIM", boost::bind(&LLFloaterBump::startIM, this));
+ mCommitCallbackRegistrar.add("Avatar.ReportAbuse", boost::bind(&LLFloaterBump::reportAbuse, this));
+ mCommitCallbackRegistrar.add("ShowAgentProfile", boost::bind(&LLFloaterBump::showProfile, this));
+ mCommitCallbackRegistrar.add("Avatar.InviteToGroup", boost::bind(&LLFloaterBump::inviteToGroup, this));
+ mCommitCallbackRegistrar.add("Avatar.Call", boost::bind(&LLFloaterBump::startCall, this));
+ mEnableCallbackRegistrar.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
+ mCommitCallbackRegistrar.add("Avatar.AddFriend", boost::bind(&LLFloaterBump::addFriend, this));
+ mEnableCallbackRegistrar.add("Avatar.EnableAddFriend", boost::bind(&LLFloaterBump::enableAddFriend, this));
+ mCommitCallbackRegistrar.add("Avatar.Mute", boost::bind(&LLFloaterBump::muteAvatar, this));
+ mEnableCallbackRegistrar.add("Avatar.EnableMute", boost::bind(&LLFloaterBump::enableMute, this));
+ mCommitCallbackRegistrar.add("PayObject", boost::bind(&LLFloaterBump::payAvatar, this));
+ mCommitCallbackRegistrar.add("Tools.LookAtSelection", boost::bind(&LLFloaterBump::zoomInAvatar, this));
}
@@ -51,13 +70,25 @@ LLFloaterBump::~LLFloaterBump()
{
}
+BOOL LLFloaterBump::postBuild()
+{
+ mList = getChild<LLScrollListCtrl>("bump_list");
+ mList->setAllowMultipleSelection(false);
+ mList->setRightMouseDownCallback(boost::bind(&LLFloaterBump::onScrollListRightClicked, this, _1, _2, _3));
+
+ mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_avatar_other.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mPopupMenu->setItemVisible(std::string("Normal"), false);
+ mPopupMenu->setItemVisible(std::string("Always use impostor"), false);
+ mPopupMenu->setItemVisible(std::string("Never use impostor"), false);
+ mPopupMenu->setItemVisible(std::string("Impostor seperator"), false);
+
+ return TRUE;
+}
// virtual
void LLFloaterBump::onOpen(const LLSD& key)
{
- LLScrollListCtrl* list = getChild<LLScrollListCtrl>("bump_list");
- if (!list)
- return;
- list->deleteAllItems();
+ mNames.clear();
+ mList->deleteAllItems();
if (gMeanCollisionList.empty())
{
@@ -65,7 +96,7 @@ void LLFloaterBump::onOpen(const LLSD& key)
LLSD row;
row["columns"][0]["value"] = none_detected;
row["columns"][0]["font"] = "SansSerifBold";
- list->addElement(row);
+ mList->addElement(row);
}
else
{
@@ -73,7 +104,7 @@ void LLFloaterBump::onOpen(const LLSD& key)
iter != gMeanCollisionList.end(); ++iter)
{
LLMeanCollisionData *mcd = *iter;
- add(list, mcd);
+ add(mList, mcd);
}
}
}
@@ -125,4 +156,94 @@ void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
row["columns"][0]["value"] = text;
row["columns"][0]["font"] = "SansSerifBold";
list->addElement(row);
+
+
+ mNames[mcd->mPerp] = mcd->mFullName;
+}
+
+
+void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y)
+{
+ if (!gMeanCollisionList.empty())
+ {
+ LLScrollListItem* item = mList->hitItem(x, y);
+ if (item && mPopupMenu)
+ {
+ mItemUUID = item->getUUID();
+ mPopupMenu->buildDrawLabels();
+ mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
+
+ std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar";
+ mPopupMenu->getChild<LLUICtrl>("Avatar Mute")->setValue(LLTrans::getString(mute_msg));
+ mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID));
+
+ ((LLContextMenu*)mPopupMenu)->show(x, y);
+ LLMenuGL::showPopup(ctrl, mPopupMenu, x, y);
+ }
+ }
+}
+
+
+void LLFloaterBump::startIM()
+{
+ LLAvatarActions::startIM(mItemUUID);
+}
+
+void LLFloaterBump::startCall()
+{
+ LLAvatarActions::startCall(mItemUUID);
+}
+
+void LLFloaterBump::reportAbuse()
+{
+ LLFloaterReporter::showFromAvatar(mItemUUID, "av_name");
+}
+
+void LLFloaterBump::showProfile()
+{
+ LLAvatarActions::showProfile(mItemUUID);
+}
+
+void LLFloaterBump::addFriend()
+{
+ LLAvatarActions::requestFriendshipDialog(mItemUUID);
+}
+
+bool LLFloaterBump::enableAddFriend()
+{
+ return !LLAvatarActions::isFriend(mItemUUID);
+}
+
+void LLFloaterBump::muteAvatar()
+{
+ LLMute mute(mItemUUID, mNames[mItemUUID], LLMute::AGENT);
+ if (LLMuteList::getInstance()->isMuted(mute.mID))
+ {
+ LLMuteList::getInstance()->remove(mute);
+ }
+ else
+ {
+ LLMuteList::getInstance()->add(mute);
+ LLPanelBlockedList::showPanelAndSelect(mute.mID);
+ }
+}
+
+void LLFloaterBump::payAvatar()
+{
+ LLAvatarActions::pay(mItemUUID);
+}
+
+void LLFloaterBump::zoomInAvatar()
+{
+ handle_zoom_to_object(mItemUUID);
+}
+
+bool LLFloaterBump::enableMute()
+{
+ return LLAvatarActions::canBlock(mItemUUID);
+}
+
+void LLFloaterBump::inviteToGroup()
+{
+ LLAvatarActions::inviteToGroup(mItemUUID);
}
diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h
index 5acab6da8c..11b7db9fee 100755
--- a/indra/newview/llfloaterbump.h
+++ b/indra/newview/llfloaterbump.h
@@ -29,6 +29,7 @@
#define LL_LLFLOATERBUMP_H
#include "llfloater.h"
+#include "llmenugl.h"
class LLMeanCollisionData;
class LLScrollListCtrl;
@@ -39,14 +40,36 @@ class LLFloaterBump
friend class LLFloaterReg;
protected:
void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
+ void onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y);
public:
+ /*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
+ void startIM();
+ void startCall();
+ void reportAbuse();
+ void showProfile();
+ void addFriend();
+ void inviteToGroup();
+ bool enableAddFriend();
+ void muteAvatar();
+ void payAvatar();
+ void zoomInAvatar();
+ bool enableMute();
+
private:
LLFloaterBump(const LLSD& key);
virtual ~LLFloaterBump();
+
+ LLScrollListCtrl* mList;
+ LLMenuGL* mPopupMenu;
+ LLUUID mItemUUID;
+
+ typedef std::map<LLUUID, std::string> uuid_map_t;
+ uuid_map_t mNames;
+
};
#endif
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 060c091737..0a0e5ffc06 100755
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -65,9 +65,6 @@
// NOTE: This is duplicated in lldatamoney.cpp ...
const F32 GROUP_LAND_BONUS_FACTOR = 1.1f;
-const F64 CURRENCY_ESTIMATE_FREQUENCY = 0.5;
- // how long of a pause in typing a currency buy amount before an
- // estimate is fetched from the server
class LLFloaterBuyLandUI
: public LLFloater
@@ -392,9 +389,9 @@ void LLFloaterBuyLandUI::updateParcelInfo()
}
mParcelBillableArea =
- llround(mRegion->getBillableFactor() * mParcelActualArea);
+ ll_round(mRegion->getBillableFactor() * mParcelActualArea);
- mParcelSupportedObjects = llround(
+ mParcelSupportedObjects = ll_round(
parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus());
// Can't have more than region max tasks, regardless of parcel
// object bonus factor.
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index d0939b3eee..20d650fa37 100755
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -32,6 +32,7 @@
#include "llfloaterreg.h"
// Viewer includes
+#include "llagent.h"
#include "llagentcamera.h"
#include "lljoystickbutton.h"
#include "llviewercontrol.h"
@@ -47,9 +48,7 @@ static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item"
const F32 NUDGE_TIME = 0.25f; // in seconds
const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
-// Constants
-const F32 CAMERA_BUTTON_DELAY = 0.0f;
-
+// constants
#define ORBIT "cam_rotate_stick"
#define PAN "cam_track_stick"
#define ZOOM "zoom"
@@ -342,6 +341,8 @@ void LLFloaterCamera::onClose(bool app_quitting)
switchMode(CAMERA_CTRL_MODE_PAN);
mClosed = TRUE;
+
+ gAgent.setMovementLocked(FALSE);
}
LLFloaterCamera::LLFloaterCamera(const LLSD& val)
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 0c59ba9a6d..535cb368bd 100755
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -342,11 +342,6 @@ void LLFloaterColorPicker::setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
curG = curGIn;
curB = curBIn;
- if (mApplyImmediateCheck->get())
- {
- LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
- }
-
// update corresponding HSL values and
LLColor3(curRIn, curGIn, curBIn).calcHSL(&curH, &curS, &curL);
@@ -374,11 +369,6 @@ void LLFloaterColorPicker::setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
// update corresponding RGB values and
hslToRgb ( curH, curS, curL, curR, curG, curB );
-
- if (mApplyImmediateCheck->get())
- {
- LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
- }
}
//////////////////////////////////////////////////////////////////////////////
@@ -467,7 +457,8 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data)
void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te )
{
- setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
+ // Pipete
+ selectCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
}
void LLFloaterColorPicker::onMouseCaptureLost()
@@ -643,6 +634,28 @@ const LLColor4& LLFloaterColorPicker::getComplimentaryColor ( const LLColor4& ba
}
//////////////////////////////////////////////////////////////////////////////
+// set current RGB and rise change event if needed.
+void LLFloaterColorPicker::selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
+{
+ setCurRgb(curRIn, curGIn, curBIn);
+ if (mApplyImmediateCheck->get())
+ {
+ LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// set current HSL and rise change event if needed.
+void LLFloaterColorPicker::selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
+{
+ setCurHsl(curHIn, curSIn, curLIn);
+ if (mApplyImmediateCheck->get())
+ {
+ LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
// draw color palette
void LLFloaterColorPicker::drawPalette ()
{
@@ -736,7 +749,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
}
// update current RGB (and implicitly HSL)
- setCurRgb ( rVal, gVal, bVal );
+ selectCurRgb ( rVal, gVal, bVal );
updateTextEntry ();
}
@@ -759,15 +772,10 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
lVal = (F32)ctrl->getValue().asReal() / 100.0f;
// update current HSL (and implicitly RGB)
- setCurHsl ( hVal, sVal, lVal );
+ selectCurHsl ( hVal, sVal, lVal );
updateTextEntry ();
}
-
- if (mApplyImmediateCheck->get())
- {
- LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
- }
}
//////////////////////////////////////////////////////////////////////////////
@@ -780,7 +788,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
yPosIn >= mRGBViewerImageTop - mRGBViewerImageHeight )
{
// update HSL (and therefore RGB) based on new H & S and current L
- setCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth,
+ selectCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth,
( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight,
getCurL () );
@@ -795,7 +803,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
{
// update HSL (and therefore RGB) based on current HS and new L
- setCurHsl ( getCurH (),
+ selectCurHsl ( getCurH (),
getCurS (),
( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight );
@@ -887,7 +895,7 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
{
LLColor4 selected = *mPalette [ index ];
- setCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] );
+ selectCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] );
if (mApplyImmediateCheck->get())
{
diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h
index d4d22b643a..8c16ebdf03 100755
--- a/indra/newview/llfloatercolorpicker.h
+++ b/indra/newview/llfloatercolorpicker.h
@@ -122,6 +122,9 @@ class LLFloaterColorPicker
static void onImmediateCheck ( LLUICtrl* ctrl, void* data );
void onColorSelect( const class LLTextureEntry& te );
private:
+ // mutators for color values, can raise event to preview changes at object
+ void selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn );
+ void selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn );
// draws color selection palette
void drawPalette ();
diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp
index 6888e076aa..3a2047cfef 100644
--- a/indra/newview/llfloaterfacebook.cpp
+++ b/indra/newview/llfloaterfacebook.cpp
@@ -59,7 +59,6 @@ static LLPanelInjector<LLFacebookPhotoPanel> t_panel_photo("llfacebookphotopanel
static LLPanelInjector<LLFacebookCheckinPanel> t_panel_checkin("llfacebookcheckinpanel");
static LLPanelInjector<LLFacebookFriendsPanel> t_panel_friends("llfacebookfriendspanel");
-const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const std::string DEFAULT_CHECKIN_LOCATION_URL = "http://maps.secondlife.com/";
const std::string DEFAULT_CHECKIN_ICON_URL = "http://map.secondlife.com.s3.amazonaws.com/map_placeholder.png";
const std::string DEFAULT_CHECKIN_QUERY_PARAMETERS = "?sourceid=slshare_checkin&utm_source=facebook&utm_medium=checkin&utm_campaign=slshare";
diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp
index 36afab86b7..cd132b843d 100644
--- a/indra/newview/llfloaterflickr.cpp
+++ b/indra/newview/llfloaterflickr.cpp
@@ -51,11 +51,10 @@
#include "lltabcontainer.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
-
+#include <boost/regex.hpp>
static LLPanelInjector<LLFlickrPhotoPanel> t_panel_photo("llflickrphotopanel");
static LLPanelInjector<LLFlickrAccountPanel> t_panel_account("llflickraccountpanel");
-const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare";
const std::string DEFAULT_TAG_TEXT = "secondlife ";
const std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife";
@@ -345,7 +344,12 @@ void LLFlickrPhotoPanel::sendPhoto()
std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
if (!parcel_name.empty())
{
- photo_link_text += " at " + parcel_name;
+ boost::regex pattern = boost::regex("\\S\\.[a-zA-Z]{2,}");
+ boost::match_results<std::string::const_iterator> matches;
+ if(!boost::regex_search(parcel_name, matches, pattern))
+ {
+ photo_link_text += " at " + parcel_name;
+ }
}
photo_link_text += " in Second Life";
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 6966ca5639..37774fbc5c 100755
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -401,14 +401,9 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo()
// Floats because spinners only support floats. JC
const F32 BILLABLE_FACTOR_DEFAULT = 1;
-const F32 BILLABLE_FACTOR_MIN = 0.0f;
-const F32 BILLABLE_FACTOR_MAX = 4.f;
// floats because spinners only understand floats. JC
const F32 PRICE_PER_METER_DEFAULT = 1.f;
-const F32 PRICE_PER_METER_MIN = 0.f;
-const F32 PRICE_PER_METER_MAX = 100.f;
-
LLPanelRegionTools::LLPanelRegionTools()
: LLPanel()
@@ -833,9 +828,6 @@ void LLPanelRegionTools::onSelectRegion()
// ^ ^ ^
// LEFT R2 RIGHT
-const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f;
-
-
LLPanelGridTools::LLPanelGridTools() :
LLPanel()
{
diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp
new file mode 100755
index 0000000000..8908626de6
--- /dev/null
+++ b/indra/newview/llfloaterhoverheight.cpp
@@ -0,0 +1,157 @@
+/**
+* @file llfloaterhoverheight.cpp
+* @brief Controller for self avatar hover height
+* @author vir@lindenlab.com
+*
+* $LicenseInfo:firstyear=2014&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2014, 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 "llfloaterhoverheight.h"
+#include "llsliderctrl.h"
+#include "llviewercontrol.h"
+#include "llsdserialize.h"
+#include "llhttpclient.h"
+#include "llagent.h"
+#include "llviewerregion.h"
+#include "llvoavatarself.h"
+
+LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key)
+{
+}
+
+void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data)
+{
+ F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
+
+ LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data);
+ LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider");
+ sldrCtrl->setValue(value,FALSE);
+
+ if (isAgentAvatarValid())
+ {
+ LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+ LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL;
+ gAgentAvatarp->setHoverOffset(offset);
+ //gAgentAvatarp->sendHoverHeight();
+ }
+}
+
+BOOL LLFloaterHoverHeight::postBuild()
+{
+ LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
+ sldrCtrl->setMinValue(MIN_HOVER_Z);
+ sldrCtrl->setMaxValue(MAX_HOVER_Z);
+ sldrCtrl->setSliderMouseUpCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
+ sldrCtrl->setSliderEditorCommitCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
+ childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL);
+
+ // Initialize slider from pref setting.
+ syncFromPreferenceSetting(this);
+ // Update slider on future pref changes.
+ if (gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ"))
+ {
+ gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this));
+ }
+ else
+ {
+ LL_WARNS() << "Control not found for AvatarHoverOffsetZ" << LL_ENDL;
+ }
+
+ updateEditEnabled();
+
+ if (!mRegionChangedSlot.connected())
+ {
+ mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterHoverHeight::onRegionChanged,this));
+ }
+ // Set up based on initial region.
+ onRegionChanged();
+
+ return TRUE;
+}
+
+void LLFloaterHoverHeight::onClose(bool app_quitting)
+{
+ if (mRegionChangedSlot.connected())
+ {
+ mRegionChangedSlot.disconnect();
+ }
+}
+
+// static
+void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData)
+{
+ LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
+ F32 value = sldrCtrl->getValueF32();
+ LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+ LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL;
+ gAgentAvatarp->setHoverOffset(offset, false);
+}
+
+// Do send-to-the-server work when slider drag completes, or new
+// value entered as text.
+void LLFloaterHoverHeight::onFinalCommit()
+{
+ LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
+ F32 value = sldrCtrl->getValueF32();
+ gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value);
+
+ LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+ LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL;
+ gAgentAvatarp->setHoverOffset(offset, true); // will send update this time.
+}
+
+void LLFloaterHoverHeight::onRegionChanged()
+{
+ LLViewerRegion *region = gAgent.getRegion();
+ if (region && region->simulatorFeaturesReceived())
+ {
+ updateEditEnabled();
+ }
+ else if (region)
+ {
+ region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLFloaterHoverHeight::onSimulatorFeaturesReceived,this,_1));
+ }
+}
+
+void LLFloaterHoverHeight::onSimulatorFeaturesReceived(const LLUUID &region_id)
+{
+ LLViewerRegion *region = gAgent.getRegion();
+ if (region && (region->getRegionID()==region_id))
+ {
+ updateEditEnabled();
+ }
+}
+
+void LLFloaterHoverHeight::updateEditEnabled()
+{
+ bool enabled = gAgent.getRegion() && gAgent.getRegion()->avatarHoverHeightEnabled();
+ LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
+ sldrCtrl->setEnabled(enabled);
+ if (enabled)
+ {
+ syncFromPreferenceSetting(this);
+ }
+}
+
+
diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h
new file mode 100755
index 0000000000..ee065bc184
--- /dev/null
+++ b/indra/newview/llfloaterhoverheight.h
@@ -0,0 +1,52 @@
+/**
+* @file llfloaterhoverheight.h
+* @brief Controller for self avatar hover height.
+* @author vir@lindenlab.com
+*
+* $LicenseInfo:firstyear=2014&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2014, 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_LLFLOATERHOVERHEIGHT_H
+#define LL_LLFLOATERHOVERHEIGHT_H
+
+#include "llfloater.h"
+
+class LLFloaterHoverHeight: public LLFloater
+{
+public:
+ LLFloaterHoverHeight(const LLSD& key);
+ BOOL postBuild();
+
+ static void onSliderMoved(LLUICtrl* ctrl, void* userData);
+
+ void onFinalCommit();
+
+ static void syncFromPreferenceSetting(void *user_data);
+
+ void onRegionChanged();
+ void onSimulatorFeaturesReceived(const LLUUID &region_id);
+ void updateEditEnabled();
+
+ /*virtual*/ void onClose(bool app_quitting);
+ boost::signals2::connection mRegionChangedSlot;
+};
+
+#endif
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 9def253ba5..fc7fcf3ab9 100755
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -396,7 +396,7 @@ bool LLFloaterIMSession::canAddSelectedToChat(const uuid_vec_t& uuids)
{
if (!mSession
|| mDialog == IM_SESSION_GROUP_START
- || mDialog == IM_SESSION_INVITE && gAgent.isInGroup(mSessionID))
+ || (mDialog == IM_SESSION_INVITE && gAgent.isInGroup(mSessionID)))
{
return false;
}
@@ -779,7 +779,7 @@ bool LLFloaterIMSession::toggle(const LLUUID& session_id)
floater->setVisible(false);
return false;
}
- else if(floater && (!floater->isDocked() || floater->getVisible() && !floater->hasFocus()))
+ else if(floater && ((!floater->isDocked() || floater->getVisible()) && !floater->hasFocus()))
{
floater->setVisible(TRUE);
floater->setFocus(TRUE);
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 2864f018b2..357b635594 100755
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -118,6 +118,7 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid
else
{
conv = LLFloaterReg::getTypedInstance<LLFloaterIMSessionTab>("impanel", LLSD(uuid));
+ conv->setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE);
}
return conv;
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 5a1dfc99ab..10088d20c2 100755
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -32,6 +32,7 @@
#include "llfloatertools.h"
#include "llavataractions.h"
#include "llavatarnamecache.h"
+#include "llgroupactions.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llselectmgr.h"
@@ -147,8 +148,17 @@ void LLFloaterInspect::onClickOwnerProfile()
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
if(node)
{
- const LLUUID& owner_id = node->mPermissions->getOwner();
- LLAvatarActions::showProfile(owner_id);
+ if(node->mPermissions->isGroupOwned())
+ {
+ const LLUUID& idGroup = node->mPermissions->getGroup();
+ LLGroupActions::show(idGroup);
+ }
+ else
+ {
+ const LLUUID& owner_id = node->mPermissions->getOwner();
+ LLAvatarActions::showProfile(owner_id);
+ }
+
}
}
}
@@ -219,21 +229,42 @@ void LLFloaterInspect::refresh()
const LLUUID& idCreator = obj->mPermissions->getCreator();
LLAvatarName av_name;
- // Only work with the names if we actually get a result
- // from the name cache. If not, defer setting the
- // actual name and set a placeholder.
- if (LLAvatarNameCache::get(idOwner, &av_name))
+ if(obj->mPermissions->isGroupOwned())
{
- owner_name = av_name.getCompleteName();
+ std::string group_name;
+ const LLUUID& idGroup = obj->mPermissions->getGroup();
+ if(gCacheName->getGroupName(idGroup, group_name))
+ {
+ owner_name = "[" + group_name + "] (group)";
+ }
+ else
+ {
+ owner_name = LLTrans::getString("RetrievingData");
+ if (mOwnerNameCacheConnection.connected())
+ {
+ mOwnerNameCacheConnection.disconnect();
+ }
+ mOwnerNameCacheConnection = gCacheName->getGroup(idGroup, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
+ }
}
else
{
- owner_name = LLTrans::getString("RetrievingData");
- if (mOwnerNameCacheConnection.connected())
+ // Only work with the names if we actually get a result
+ // from the name cache. If not, defer setting the
+ // actual name and set a placeholder.
+ if (LLAvatarNameCache::get(idOwner, &av_name))
+ {
+ owner_name = av_name.getCompleteName();
+ }
+ else
{
- mOwnerNameCacheConnection.disconnect();
+ owner_name = LLTrans::getString("RetrievingData");
+ if (mOwnerNameCacheConnection.connected())
+ {
+ mOwnerNameCacheConnection.disconnect();
+ }
+ mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
}
- mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
}
if (LLAvatarNameCache::get(idCreator, &av_name))
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 7621c35ed2..5ebd25d228 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1224,7 +1224,7 @@ void LLPanelLandObjects::refresh()
{
S32 sw_max = parcel->getSimWideMaxPrimCapacity();
S32 sw_total = parcel->getSimWidePrimCount();
- S32 max = llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus());
+ S32 max = ll_round(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus());
S32 total = parcel->getPrimCount();
S32 owned = parcel->getOwnerPrimCount();
S32 group = parcel->getGroupPrimCount();
@@ -1983,6 +1983,7 @@ void LLPanelLandOptions::refresh()
else
{
// something selected, hooray!
+ LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
// Display options
BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS);
@@ -1998,8 +1999,9 @@ void LLPanelLandOptions::refresh()
mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry());
mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() );
+ BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE;
mCheckSafe ->set( !parcel->getAllowDamage() );
- mCheckSafe ->setEnabled( can_change_options );
+ mCheckSafe ->setEnabled( can_change_options && region_damage );
mCheckFly ->set( parcel->getAllowFly() );
mCheckFly ->setEnabled( can_change_options );
@@ -2049,9 +2051,9 @@ void LLPanelLandOptions::refresh()
else
{
mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d (%d\xC2\xB0)",
- llround(pos.mV[VX]),
- llround(pos.mV[VY]),
- llround(pos.mV[VZ]),
+ ll_round(pos.mV[VX]),
+ ll_round(pos.mV[VY]),
+ ll_round(pos.mV[VZ]),
user_look_at_angle));
}
@@ -2079,7 +2081,6 @@ void LLPanelLandOptions::refresh()
// they can see the checkbox, but its disposition depends on the
// state of the region
- LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if (regionp)
{
if (regionp->getSimAccess() == SIM_ACCESS_PG)
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index cf03087afb..f34760a6bf 100755
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -208,8 +208,8 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
self->mActualArea += actual_area;
self->mBillableArea += billable_area;
- S32 region_x = llround(global_x) % REGION_WIDTH_UNITS;
- S32 region_y = llround(global_y) % REGION_WIDTH_UNITS;
+ S32 region_x = ll_round(global_x) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round(global_y) % REGION_WIDTH_UNITS;
std::string location;
location = llformat("%s (%d, %d)", sim_name.c_str(), region_x, region_y);
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 473e2938be..333ff863e5 100755
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -52,10 +52,7 @@
// The minor cardinal direction labels are hidden if their height is more
// than this proportion of the map.
const F32 MAP_MINOR_DIR_THRESHOLD = 0.07f;
-const S32 MAP_PADDING_LEFT = 0;
-const S32 MAP_PADDING_TOP = 2;
-const S32 MAP_PADDING_RIGHT = 2;
-const S32 MAP_PADDING_BOTTOM = 0;
+
//
// Member functions
//
@@ -156,8 +153,8 @@ void LLFloaterMap::setDirectionPos( LLTextBox* text_box, F32 rotation )
radius -= 8.f;
text_box->setOrigin(
- llround(map_half_width - text_half_width + radius * cos( rotation )),
- llround(map_half_height - text_half_height + radius * sin( rotation )) );
+ ll_round(map_half_width - text_half_width + radius * cos( rotation )),
+ ll_round(map_half_height - text_half_height + radius * sin( rotation )) );
}
void LLFloaterMap::updateMinorDirections()
diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index 4f2a6ec1b7..4fd5c0587a 100755
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -47,7 +47,6 @@ LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key)
mPanelMediaSettingsGeneral(NULL),
mPanelMediaSettingsSecurity(NULL),
mPanelMediaSettingsPermissions(NULL),
- mWaitingToClose( false ),
mIdenticalHasMediaInfo( true ),
mMultipleMedia(false),
mMultipleValidMedia(false)
diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h
index 1d25530986..f93512eb3a 100755
--- a/indra/newview/llfloatermediasettings.h
+++ b/indra/newview/llfloatermediasettings.h
@@ -83,7 +83,6 @@ private:
bool haveValuesChanged() const;
LLSD mInitialValues;
- bool mWaitingToClose;
};
#endif // LL_LLFLOATERMEDIASETTINGS_H
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 0c81ab7e79..72c9170b06 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -121,12 +121,6 @@ S32 LLFloaterModelPreview::sUploadAmount = 10;
LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL;
std::list<LLModelLoader*> LLModelLoader::sActiveLoaderList;
-const S32 PREVIEW_BORDER_WIDTH = 2;
-const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
-const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
-const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
-const S32 PREVIEW_TEXTURE_HEIGHT = 300;
-
// "Retain%" decomp parameter has values from 0.0 to 1.0 by 0.01
// But according to the UI spec for upload model floater, this parameter
// should be represented by Retain spinner with values from 1 to 100 by 1.
@@ -738,6 +732,11 @@ void LLFloaterModelPreview::toggleGenarateNormals()
{
bool enabled = childGetValue("gen_normals").asBoolean();
childSetEnabled("crease_angle", enabled);
+ if(enabled) {
+ mModelPreview->generateNormals();
+ } else {
+ mModelPreview->restoreNormals();
+ }
}
//static
@@ -2161,7 +2160,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
S32 file_size = (S32) stat.st_size;
- llifstream ifstream(filename, std::ifstream::in | std::ifstream::binary);
+ llifstream ifstream(filename.c_str(), std::ifstream::in | std::ifstream::binary);
LLSD data;
LLSDSerialize::fromBinary(data, ifstream, file_size);
ifstream.close();
@@ -3519,7 +3518,7 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw
data["instance"][i] = instance.asLLSD();
}
- llofstream out(filename, std::ios_base::out | std::ios_base::binary);
+ llofstream out(filename.c_str(), std::ios_base::out | std::ios_base::binary);
LLSDSerialize::toBinary(data, out);
out.flush();
out.close();
@@ -3840,7 +3839,6 @@ void LLModelPreview::generateNormals()
S32 which_lod = mPreviewLOD;
-
if (which_lod > 4 || which_lod < 0 ||
mModel[which_lod].empty())
{
@@ -3855,17 +3853,40 @@ void LLModelPreview::generateNormals()
if (which_lod == 3 && !mBaseModel.empty())
{
- for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
+ if(mBaseModelFacesCopy.empty())
{
- (*iter)->generateNormals(angle_cutoff);
+ mBaseModelFacesCopy.reserve(mBaseModel.size());
+ for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it)
+ {
+ v_LLVolumeFace_t faces;
+ (*it)->copyFacesTo(faces);
+ mBaseModelFacesCopy.push_back(faces);
+ }
+ }
+
+ for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it)
+ {
+ (*it)->generateNormals(angle_cutoff);
}
mVertexBuffer[5].clear();
}
- for (LLModelLoader::model_list::iterator iter = mModel[which_lod].begin(); iter != mModel[which_lod].end(); ++iter)
+ bool perform_copy = mModelFacesCopy[which_lod].empty();
+ if(perform_copy) {
+ mModelFacesCopy[which_lod].reserve(mModel[which_lod].size());
+ }
+
+ for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it)
{
- (*iter)->generateNormals(angle_cutoff);
+ if(perform_copy)
+ {
+ v_LLVolumeFace_t faces;
+ (*it)->copyFacesTo(faces);
+ mModelFacesCopy[which_lod].push_back(faces);
+ }
+
+ (*it)->generateNormals(angle_cutoff);
}
mVertexBuffer[which_lod].clear();
@@ -3873,6 +3894,45 @@ void LLModelPreview::generateNormals()
updateStatusMessages();
}
+void LLModelPreview::restoreNormals()
+{
+ S32 which_lod = mPreviewLOD;
+
+ if (which_lod > 4 || which_lod < 0 ||
+ mModel[which_lod].empty())
+ {
+ return;
+ }
+
+ if(!mBaseModelFacesCopy.empty())
+ {
+ llassert(mBaseModelFacesCopy.size() == mBaseModel.size());
+
+ vv_LLVolumeFace_t::const_iterator itF = mBaseModelFacesCopy.begin();
+ for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it, ++itF)
+ {
+ (*it)->copyFacesFrom((*itF));
+ }
+
+ mBaseModelFacesCopy.clear();
+ }
+
+ if(!mModelFacesCopy[which_lod].empty())
+ {
+ vv_LLVolumeFace_t::const_iterator itF = mModelFacesCopy[which_lod].begin();
+ for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it, ++itF)
+ {
+ (*it)->copyFacesFrom((*itF));
+ }
+
+ mModelFacesCopy[which_lod].clear();
+ }
+
+ mVertexBuffer[which_lod].clear();
+ refresh();
+ updateStatusMessages();
+}
+
void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_limit)
{
// Allow LoD from -1 to LLModel::LOD_PHYSICS
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 6c0c60b87f..618748bd4e 100755
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -343,6 +343,7 @@ public:
void loadModelCallback(S32 lod);
void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
void generateNormals();
+ void restoreNormals();
U32 calcResourceCost();
void rebuildUploadData();
void saveUploadData(bool save_skinweights, bool save_joint_poisitions);
@@ -447,6 +448,12 @@ private:
LLModelLoader::model_list mModel[LLModel::NUM_LODS];
LLModelLoader::model_list mBaseModel;
+ typedef std::vector<LLVolumeFace> v_LLVolumeFace_t;
+ typedef std::vector<v_LLVolumeFace_t> vv_LLVolumeFace_t;
+
+ vv_LLVolumeFace_t mModelFacesCopy[LLModel::NUM_LODS];
+ vv_LLVolumeFace_t mBaseModelFacesCopy;
+
U32 mGroup;
std::map<LLPointer<LLModel>, U32> mObject;
U32 mMaxTriangleLimit;
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index ee7f413a59..0cca715fe2 100755
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -52,14 +52,9 @@
#include "llinventorytype.h"
const S32 PREVIEW_LINE_HEIGHT = 19;
-const S32 PREVIEW_CLOSE_BOX_SIZE = 16;
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
-const S32 PREVIEW_VPAD = 2;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
-const S32 PREVIEW_HEADER_SIZE = 3 * PREVIEW_LINE_HEIGHT + PREVIEW_VPAD;
-const S32 PREF_BUTTON_WIDTH = 64;
-const S32 PREF_BUTTON_HEIGHT = 16;
//-----------------------------------------------------------------------------
// LLFloaterNameDesc()
diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp
index fd5f1486d9..70213680f3 100644
--- a/indra/newview/llfloaternotificationstabbed.cpp
+++ b/indra/newview/llfloaternotificationstabbed.cpp
@@ -402,7 +402,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id)
void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item)
{
LLUUID id = item->getID();
- LLFloaterReg::showInstance("inspect_toast", id);
+ //LLFloaterReg::showInstance("inspect_toast", id);
}
//---------------------------------------------------------------------------------
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index 69c9d94dfa..87f927ff65 100755
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -224,7 +224,7 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListItemData(const LLPa
columns[2]["column"] = "owner";
columns[2]["value"] = getOwnerName(pCharacterPtr);
- S32 cpuTime = llround(pCharacterPtr->getCPUTime());
+ S32 cpuTime = ll_round(pCharacterPtr->getCPUTime());
std::string cpuTimeString = llformat("%d", cpuTime);
LLStringUtil::format_map_t string_args;
string_args["[CPU_TIME]"] = cpuTimeString;
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index d72ee073e1..f6ff83eaf4 100755
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -406,7 +406,7 @@ void LLFloaterPathfindingObjects::addObjectToScrollList(const LLPathfindingObjec
if (pObjectPtr->hasOwner() && !pObjectPtr->hasOwnerName())
{
- mMissingNameObjectsScrollListItems.insert(std::make_pair<std::string, LLScrollListItem *>(pObjectPtr->getUUID().asString(), scrollListItem));
+ mMissingNameObjectsScrollListItems.insert(scroll_list_item_map::value_type(pObjectPtr->getUUID().asString(), scrollListItem));
pObjectPtr->registerOwnerNameListener(boost::bind(&LLFloaterPathfindingObjects::handleObjectNameResponse, this, _1));
}
}
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index a4d13ce1d5..31245db344 100755
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -119,7 +119,6 @@ protected:
};
-const S32 MAX_AMOUNT_LENGTH = 10;
const S32 FASTPAY_BUTTON_WIDTH = 80;
const S32 PAY_AMOUNT_NOTIFICATION = 200;
@@ -368,7 +367,8 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle<LLObjectSe
LLSelectNode* node = selection->getFirstRootNode();
if (!node)
{
- //FIXME: notify user object no longer exists
+ // object no longer exists
+ LLNotificationsUtil::add("PayObjectFailed");
floater->closeFloater();
return;
}
@@ -492,12 +492,22 @@ void LLFloaterPay::onGive(void* data)
}
if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount)
{
- LLUUID payee_id;
- BOOL is_group;
+ LLUUID payee_id = LLUUID::null;
+ BOOL is_group = false;
if (floater->mObjectSelection.notNull())
{
LLSelectNode* node = floater->mObjectSelection->getFirstRootNode();
- node->mPermissions->getOwnership(payee_id, is_group);
+ if (node)
+ {
+ node->mPermissions->getOwnership(payee_id, is_group);
+ }
+ else
+ {
+ // object no longer exists
+ LLNotificationsUtil::add("PayObjectFailed");
+ floater->closeFloater();
+ return;
+ }
}
else
{
@@ -563,6 +573,10 @@ void LLFloaterPay::give(S32 amount)
msg->sendReliable( region->getHost() );
}
}
+ else
+ {
+ LLNotificationsUtil::add("PayObjectFailed");
+ }
}
else
{
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 0880a5f35a..042cf47070 100755
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -35,6 +35,8 @@
#include "llagent.h"
#include "llviewerregion.h"
#include "llnotificationsutil.h"
+#include "llsdserialize.h"
+#include "llvoavatar.h"
LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
: LLFloater(seed)
@@ -171,8 +173,9 @@ public:
private:
static std::string sPreviousReason;
- void error(U32 status, const std::string& reason)
+ void httpFailure()
{
+ const std::string& reason = getReason();
// Do not display the same error more than once in a row
if (reason != sPreviousReason)
{
@@ -182,13 +185,17 @@ private:
LLNotificationsUtil::add("DefaultObjectPermissions", args);
}
}
- void result(const LLSD& content)
+
+ void httpSuccess()
{
+ //const LLSD& content = getContent();
+ //dump_sequential_xml("perms_responder_result.xml", content);
+
// Since we have had a successful POST call be sure to display the next error message
// even if it is the same as a previous one.
sPreviousReason = "";
LLFloaterPermsDefault::setCapSent(true);
- LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL;
+ LL_INFOS("ObjectPermissionsFloater") << "Default permissions successfully sent to simulator" << LL_ENDL;
}
};
@@ -216,8 +223,20 @@ void LLFloaterPermsDefault::updateCap()
report["default_object_perm_masks"]["NextOwner"] =
(LLSD::Integer)LLFloaterPerms::getNextOwnerPerms(sCategoryNames[CAT_OBJECTS]);
+ {
+ LL_DEBUGS("ObjectPermissionsFloater") << "Sending default permissions to '"
+ << object_url << "'\n";
+ std::ostringstream sent_perms_log;
+ LLSDSerialize::toPrettyXML(report, sent_perms_log);
+ LL_CONT << sent_perms_log.str() << LL_ENDL;
+ }
+
LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder());
}
+ else
+ {
+ LL_DEBUGS("ObjectPermissionsFloater") << "AgentPreferences cap not available." << LL_ENDL;
+ }
}
void LLFloaterPermsDefault::setCapSent(bool cap_sent)
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d3773767d0..ee4396758e 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -37,6 +37,7 @@
#include "message.h"
#include "llfloaterautoreplacesettings.h"
#include "llagent.h"
+#include "llagentcamera.h"
#include "llcheckboxctrl.h"
#include "llcolorswatch.h"
#include "llcombobox.h"
@@ -74,6 +75,7 @@
#include "llviewermessage.h"
#include "llviewershadermgr.h"
#include "llviewerthrottle.h"
+#include "llvoavatarself.h"
#include "llvotree.h"
#include "llvosky.h"
#include "llfloaterpathfindingconsole.h"
@@ -109,13 +111,9 @@
#include "lllogininstance.h" // to check if logged in yet
#include "llsdserialize.h"
-const F32 MAX_USER_FAR_CLIP = 512.f;
-const F32 MIN_USER_FAR_CLIP = 64.f;
const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f;
char const* const VISIBILITY_DEFAULT = "default";
char const* const VISIBILITY_HIDDEN = "hidden";
-char const* const VISIBILITY_VISIBLE = "visible";
-char const* const VISIBILITY_INVISIBLE = "invisible";
//control value for middle mouse as talk2push button
const static std::string MIDDLE_MOUSE_CV = "MiddleMouse";
@@ -251,6 +249,14 @@ void handleDisplayNamesOptionChanged(const LLSD& newvalue)
LLVOAvatar::invalidateNameTags();
}
+void handleAppearanceCameraMovementChanged(const LLSD& newvalue)
+{
+ if(!newvalue.asBoolean() && gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
+ {
+ gAgentCamera.changeCameraToDefault();
+ gAgentCamera.resetView();
+ }
+}
/*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater)
{
@@ -291,8 +297,8 @@ void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator)
{
if (fmodf((decimal_val * test_denominator) + 0.01f, 1.f) < 0.02f)
{
- numerator = llround(decimal_val * test_denominator);
- denominator = llround(test_denominator);
+ numerator = ll_round(decimal_val * test_denominator);
+ denominator = ll_round(test_denominator);
break;
}
}
@@ -361,6 +367,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
+ gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2));
+
LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
mCommitCallbackRegistrar.add("Pref.ClearLog", boost::bind(&LLConversationLog::onClearLog, &LLConversationLog::instance()));
@@ -701,13 +709,13 @@ void LLFloaterPreference::onOpen(const LLSD& key)
maturity_list->deleteItems(LLSD(SIM_ACCESS_ADULT));
}
}
- getChildView("maturity_desired_combobox")->setVisible( true);
+ getChildView("maturity_desired_combobox")->setEnabled( true);
getChildView("maturity_desired_textbox")->setVisible( false);
}
else
{
getChild<LLUICtrl>("maturity_desired_textbox")->setValue(maturity_combo->getSelectedItemLabel());
- getChildView("maturity_desired_combobox")->setVisible( false);
+ getChildView("maturity_desired_combobox")->setEnabled( false);
}
// Forget previous language changes.
@@ -2011,6 +2019,12 @@ void LLPanelPreference::cancel()
{
LLControlVariable* control = iter->first;
LLSD ctrl_value = iter->second;
+
+ if((control->getName() == "InstantMessageLogPath") && (ctrl_value.asString() == ""))
+ {
+ continue;
+ }
+
control->set(ctrl_value);
}
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index a3bf99f054..6bfc780722 100755
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -36,6 +36,7 @@
#include "llagent.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
+#include "llcombobox.h"
#include "llavataractions.h"
#include "llinventorydefines.h"
#include "llinventoryobserver.h"
@@ -143,7 +144,7 @@ BOOL LLFloaterProperties::postBuild()
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitPermissions, this));
// Mark for sale or not, and sale info
getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this));
- getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this));
+ getChild<LLUICtrl>("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this));
// "Price" label for edit
getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this));
// The UI has been built, now fill in all the values
@@ -188,7 +189,7 @@ void LLFloaterProperties::refresh()
"CheckNextOwnerCopy",
"CheckNextOwnerTransfer",
"CheckPurchase",
- "RadioSaleType",
+ "ComboBoxSaleType",
"Edit Cost"
};
for(size_t t=0; t<LL_ARRAY_SIZE(enableNames); ++t)
@@ -479,6 +480,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
const LLSaleInfo& sale_info = item->getSaleInfo();
BOOL is_for_sale = sale_info.isForSale();
+ LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+ LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
+
// Check for ability to change values.
if (is_obj_modify && can_agent_sell
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
@@ -491,9 +495,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions);
getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
- getChildView("RadioSaleType")->setEnabled(is_complete && is_for_sale);
getChildView("TextPrice")->setEnabled(is_complete && is_for_sale);
- getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale);
+ combo_sale_type->setEnabled(is_complete && is_for_sale);
+ edit_cost->setEnabled(is_complete && is_for_sale);
}
else
{
@@ -505,31 +509,28 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
getChildView("CheckNextOwnerCopy")->setEnabled(FALSE);
getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
- getChildView("RadioSaleType")->setEnabled(FALSE);
getChildView("TextPrice")->setEnabled(FALSE);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ combo_sale_type->setEnabled(FALSE);
+ edit_cost->setEnabled(FALSE);
}
// Set values.
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
- getChildView("combobox sale copy")->setEnabled(is_for_sale);
- getChildView("Edit Cost")->setEnabled(is_for_sale);
getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
- LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
if (is_for_sale)
{
- radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
S32 numerical_price;
numerical_price = sale_info.getSalePrice();
- getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price));
+ edit_cost->setValue(llformat("%d",numerical_price));
+ combo_sale_type->setValue(sale_info.getSaleType());
}
else
{
- radioSaleType->setSelectedIndex(-1);
- getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",0));
+ edit_cost->setValue(llformat("%d",0));
+ combo_sale_type->setValue(LLSaleInfo::FS_COPY);
}
}
@@ -757,25 +758,11 @@ void LLFloaterProperties::updateSaleInfo()
{
// turn on sale info
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
-
- LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("RadioSaleType");
- if(RadioSaleType)
+
+ LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+ if (combo_sale_type)
{
- switch (RadioSaleType->getSelectedIndex())
- {
- case 0:
- sale_type = LLSaleInfo::FS_ORIGINAL;
- break;
- case 1:
- sale_type = LLSaleInfo::FS_COPY;
- break;
- case 2:
- sale_type = LLSaleInfo::FS_CONTENTS;
- break;
- default:
- sale_type = LLSaleInfo::FS_COPY;
- break;
- }
+ sale_type = static_cast<LLSaleInfo::EForSale>(combo_sale_type->getValue().asInteger());
}
if (sale_type == LLSaleInfo::FS_COPY
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index a3b9713e3e..ae330211db 100755
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -82,8 +82,6 @@
#include "lltrans.h"
-const U32 INCLUDE_SCREENSHOT = 0x01 << 0;
-
//-----------------------------------------------------------------------------
// Globals
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h
index a5cb1b6184..5ba0185d32 100755
--- a/indra/newview/llfloaterscriptlimits.h
+++ b/indra/newview/llfloaterscriptlimits.h
@@ -170,21 +170,17 @@ private:
LLSD mContent;
LLUUID mParcelId;
bool mGotParcelMemoryUsed;
- bool mGotParcelMemoryUsedDetails;
bool mGotParcelMemoryMax;
S32 mParcelMemoryMax;
S32 mParcelMemoryUsed;
- S32 mParcelMemoryUsedDetails;
-
+
bool mGotParcelURLsUsed;
- bool mGotParcelURLsUsedDetails;
bool mGotParcelURLsMax;
S32 mParcelURLsMax;
S32 mParcelURLsUsed;
- S32 mParcelURLsUsedDetails;
-
+
std::vector<LLSD> mObjectListItems;
-
+
protected:
// LLRemoteParcelInfoObserver interface:
@@ -208,17 +204,11 @@ public:
LLPanelScriptLimitsAttachment()
: LLPanelScriptLimitsInfo(),
mGotAttachmentMemoryUsed(false),
- mGotAttachmentMemoryUsedDetails(false),
- mGotAttachmentMemoryMax(false),
mAttachmentMemoryMax(0),
mAttachmentMemoryUsed(0),
- mAttachmentMemoryUsedDetails(0),
mGotAttachmentURLsUsed(false),
- mGotAttachmentURLsUsedDetails(false),
- mGotAttachmentURLsMax(false),
mAttachmentURLsMax(0),
- mAttachmentURLsUsed(0),
- mAttachmentURLsUsedDetails(0)
+ mAttachmentURLsUsed(0)
{};
~LLPanelScriptLimitsAttachment()
@@ -237,18 +227,12 @@ public:
private:
bool mGotAttachmentMemoryUsed;
- bool mGotAttachmentMemoryUsedDetails;
- bool mGotAttachmentMemoryMax;
S32 mAttachmentMemoryMax;
S32 mAttachmentMemoryUsed;
- S32 mAttachmentMemoryUsedDetails;
-
+
bool mGotAttachmentURLsUsed;
- bool mGotAttachmentURLsUsedDetails;
- bool mGotAttachmentURLsMax;
S32 mAttachmentURLsMax;
S32 mAttachmentURLsUsed;
- S32 mAttachmentURLsUsedDetails;
protected:
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 8677028942..b27a42cb8e 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -367,8 +367,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
LLViewerWindow::ESnapshotType layer_type = getLayerType(floater);
floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
- enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
- setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
LLPanelSnapshot* active_panel = getActivePanel(floater);
@@ -383,12 +381,20 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
S32 w = gViewerWindow->getWindowWidthRaw();
LL_DEBUGS() << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << LL_ENDL;
width_ctrl->setValue(w);
+ if(getActiveSnapshotType(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ {
+ width_ctrl->setIncrement(w >> 1);
+ }
}
if (height_ctrl->getValue().asInteger() == 0)
{
S32 h = gViewerWindow->getWindowHeightRaw();
LL_DEBUGS() << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << LL_ENDL;
height_ctrl->setValue(h);
+ if(getActiveSnapshotType(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ {
+ height_ctrl->setIncrement(h >> 1);
+ }
}
// Clamp snapshot resolution to window size when showing UI or HUD in snapshot.
@@ -470,8 +476,9 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
default:
break;
}
-
- if (previewp)
+ setAspectRatioCheckboxValue(floater, !floater->impl.mAspectRatioCheckOff && gSavedSettings.getBOOL("KeepAspectForSnapshot"));
+
+ if (previewp)
{
previewp->setSnapshotType(shot_type);
previewp->setSnapshotFormat(shot_format);
@@ -546,7 +553,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
{
view->impl.setStatus(Impl::STATUS_READY);
LL_DEBUGS() << "updating snapshot" << LL_ENDL;
- previewp->updateSnapshot(TRUE);
+ previewp->mForceUpdateSnapshot = TRUE;
}
}
@@ -619,6 +626,13 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL
if (view)
{
+ LLPanelSnapshot* active_panel = getActivePanel(view);
+ if (checked && active_panel)
+ {
+ LLComboBox* combo = view->getChild<LLComboBox>(active_panel->getImageSizeComboName());
+ combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index
+ }
+
LLSnapshotLivePreview* previewp = getPreviewView(view) ;
if(previewp)
{
@@ -683,7 +697,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
}
view->impl.mAspectRatioCheckOff = !enable_cb;
- enableAspectRatioCheckbox(view, enable_cb);
+
if (previewp)
{
previewp->mKeepAspectRatio = keep_aspect;
@@ -823,6 +837,11 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
{
getWidthSpinner(view)->setValue(width);
getHeightSpinner(view)->setValue(height);
+ if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ {
+ getWidthSpinner(view)->setIncrement(width >> 1);
+ getHeightSpinner(view)->setIncrement(height >> 1);
+ }
}
if(original_width != width || original_height != height)
@@ -911,11 +930,11 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3
//change another value proportionally
if(isWidthChanged)
{
- height = llround(width / aspect_ratio) ;
+ height = ll_round(width / aspect_ratio) ;
}
else
{
- width = llround(height * aspect_ratio) ;
+ width = ll_round(height * aspect_ratio) ;
}
//bound w/h by the max_value
@@ -942,6 +961,11 @@ void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshot *view
{
getWidthSpinner(view)->forceSetValue(width);
getHeightSpinner(view)->forceSetValue(height);
+ if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ {
+ getWidthSpinner(view)->setIncrement(width >> 1);
+ getHeightSpinner(view)->setIncrement(height >> 1);
+ }
}
// static
@@ -1175,6 +1199,22 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
void LLFloaterSnapshot::onClose(bool app_quitting)
{
getParent()->setMouseOpaque(FALSE);
+
+ //unfreeze everything, hide fullscreen preview
+ LLSnapshotLivePreview* previewp = LLFloaterSnapshot::Impl::getPreviewView(this);
+ if (previewp)
+ {
+ previewp->setVisible(FALSE);
+ previewp->setEnabled(FALSE);
+ }
+
+ gSavedSettings.setBOOL("FreezeTime", FALSE);
+ impl.mAvatarPauseHandles.clear();
+
+ if (impl.mLastToolset)
+ {
+ LLToolMgr::getInstance()->setCurrentToolset(impl.mLastToolset);
+ }
}
// virtual
diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp
index 54c7b4c37d..5124dae147 100755
--- a/indra/newview/llfloaterspellchecksettings.cpp
+++ b/indra/newview/llfloaterspellchecksettings.cpp
@@ -350,7 +350,8 @@ void LLFloaterSpellCheckerImport::onBtnOK()
custom_dict_info["language"] = dict_language;
LLSD custom_dict_map;
- llifstream custom_file_in(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml");
+ std::string custom_filename(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml");
+ llifstream custom_file_in(custom_filename.c_str());
if (custom_file_in.is_open())
{
LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file_in);
@@ -372,7 +373,7 @@ void LLFloaterSpellCheckerImport::onBtnOK()
custom_dict_map.append(custom_dict_info);
}
- llofstream custom_file_out(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml", std::ios::trunc);
+ llofstream custom_file_out(custom_filename.c_str(), std::ios::trunc);
if (custom_file_out.is_open())
{
LLSDSerialize::toPrettyXML(custom_dict_map, custom_file_out);
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 0613ffc94d..c1c21c593e 100755
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -50,7 +50,6 @@
LLFloaterTOS::LLFloaterTOS(const LLSD& data)
: LLModalDialog( data["message"].asString() ),
mMessage(data["message"].asString()),
- mWebBrowserWindowId( 0 ),
mLoadingScreenLoaded(false),
mSiteAlive(false),
mRealNavigateBegun(false),
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index 8921d11489..47126d06a6 100755
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -62,7 +62,6 @@ public:
private:
std::string mMessage;
- int mWebBrowserWindowId;
bool mLoadingScreenLoaded;
bool mSiteAlive;
bool mRealNavigateBegun;
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index 868d623d57..c48b1a3325 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -54,7 +54,6 @@
static LLPanelInjector<LLTwitterPhotoPanel> t_panel_photo("lltwitterphotopanel");
static LLPanelInjector<LLTwitterAccountPanel> t_panel_account("lltwitteraccountpanel");
-const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const std::string DEFAULT_PHOTO_LOCATION_URL = "http://maps.secondlife.com/";
const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=twitter&utm_medium=photo&utm_campaign=slshare";
const std::string DEFAULT_STATUS_TEXT = " #SecondLife";
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index bfc36a6bfb..76ad2146f1 100755
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -180,7 +180,6 @@ private:
LLButton* mToggleOverlapButton; // button to togle overlap panel/highlighting
LLComboBox* mLanguageSelection; // combo box for primary language selection
LLComboBox* mLanguageSelection_2; // combo box for secondary language selection
- LLScrollContainer* mOverlapScrollView; // overlapping elements scroll container
S32 mLastDisplayedX, mLastDisplayedY; // stored position of last floater so the new one opens up in the same place
std::string mDelim; // the OS-specific delimiter character (/ or \) (*TODO: this shouldn't be needed, right?)
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index ff66bdedb0..1b1c24b19a 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -63,6 +63,7 @@
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewertexture.h"
+#include "llviewerwindow.h"
#include "llworldmap.h"
#include "llworldmapmessage.h"
#include "llworldmapview.h"
@@ -659,9 +660,9 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
std::string full_name = llformat("%s (%d, %d, %d)",
sim_name.c_str(),
- llround(region_x),
- llround(region_y),
- llround((F32)pos_global.mdV[VZ]));
+ ll_round(region_x),
+ ll_round(region_y),
+ ll_round((F32)pos_global.mdV[VZ]));
std::string tooltip("");
mTrackedStatus = LLTracker::TRACKING_LOCATION;
@@ -890,7 +891,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
end = collector.mMappable.end();
for( ; it != end; ++it)
{
- list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
+ list->addSimpleElement((*it).second, ADD_BOTTOM, (*it).first);
}
list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
@@ -1634,3 +1635,10 @@ void LLFloaterWorldMap::onChangeMaturity()
gSavedSettings.setBOOL("ShowAdultEvents", FALSE);
}
}
+
+void LLFloaterWorldMap::onFocusLost()
+{
+ gViewerWindow->showCursor();
+ LLWorldMapView* map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
+ map_panel->mPanning = FALSE;
+}
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 84ca5a7a71..7ce8dae9a9 100755
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -68,6 +68,8 @@ public:
/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
/*virtual*/ void draw();
+ /*virtual*/ void onFocusLost();
+
// methods for dealing with inventory. The observe() method is
// called during program startup. inventoryUpdated() will be
// called by a helper object when an interesting change has
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 64f796e1fd..c80dec0e75 100755
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -80,10 +80,10 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
S32 top = llmax(y, mDragStartY);
S32 bottom =llmin(y, mDragStartY);
- left = llround((F32) left * LLUI::getScaleFactor().mV[VX]);
- right = llround((F32) right * LLUI::getScaleFactor().mV[VX]);
- top = llround((F32) top * LLUI::getScaleFactor().mV[VY]);
- bottom = llround((F32) bottom * LLUI::getScaleFactor().mV[VY]);
+ left = ll_round((F32) left * LLUI::getScaleFactor().mV[VX]);
+ right = ll_round((F32) right * LLUI::getScaleFactor().mV[VX]);
+ top = ll_round((F32) top * LLUI::getScaleFactor().mV[VY]);
+ bottom = ll_round((F32) bottom * LLUI::getScaleFactor().mV[VY]);
F32 old_far_plane = LLViewerCamera::getInstance()->getFar();
F32 old_near_plane = LLViewerCamera::getInstance()->getNear();
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index b1b7a87ae8..ef238cefe3 100755
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -50,6 +50,8 @@ S32 LLGroupListItem::sIconWidth = 0;
class LLGroupComparator : public LLFlatListView::ItemComparator
{
public:
+ LLGroupComparator() {};
+
/** Returns true if item1 < item2, false otherwise */
/*virtual*/ bool compare(const LLPanel* item1, const LLPanel* item2) const
{
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index f3a48625a4..73120a0242 100755
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -39,8 +39,6 @@
#include "llrendersphere.h"
#include "llselectmgr.h"
#include "llglheaders.h"
-
-
#include "llxmltree.h"
diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp
index 8771219034..fc6efdb840 100755
--- a/indra/newview/llhudeffecttrail.cpp
+++ b/indra/newview/llhudeffecttrail.cpp
@@ -42,13 +42,6 @@
#include "llvoavatar.h"
#include "llworld.h"
-
-const F32 PARTICLE_SPACING = 0.01f;
-const F32 MAX_SIZE = 0.025f;
-const F32 START_POS_MAG = 1.f;
-const F32 END_POS_MAG = 1.2f;
-
-
LLHUDEffectSpiral::LLHUDEffectSpiral(const U8 type) : LLHUDEffect(type), mbInit(FALSE)
{
mKillTime = 10.f;
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 31d832e524..c7d108b6de 100755
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -52,17 +52,12 @@
const F32 SPRING_STRENGTH = 0.7f;
-const F32 RESTORATION_SPRING_TIME_CONSTANT = 0.1f;
const F32 HORIZONTAL_PADDING = 16.f;
const F32 VERTICAL_PADDING = 12.f;
const F32 LINE_PADDING = 3.f; // aka "leading"
const F32 BUFFER_SIZE = 2.f;
-const F32 MIN_EDGE_OVERLAP = 3.f;
const F32 HUD_TEXT_MAX_WIDTH = 190.f;
-const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f;
-const F32 RESIZE_TIME = 0.f;
const S32 NUM_OVERLAP_ITERATIONS = 10;
-const F32 NEIGHBOR_FORCE_FRACTION = 1.f;
const F32 POSITION_DAMPING_TC = 0.2f;
const F32 MAX_STABLE_CAMERA_VELOCITY = 0.1f;
const F32 LOD_0_SCREEN_COVERAGE = 0.15f;
@@ -315,7 +310,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
{
LLUIImagePtr rect_top_image = LLUI::getUIImage("Rounded_Rect_Top");
LLRect label_top_rect = screen_rect;
- const S32 label_height = llround((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f)));
+ const S32 label_height = ll_round((mFontp->getLineHeight() * (F32)mLabelSegments.size() + (VERTICAL_PADDING / 3.f)));
label_top_rect.mBottom = label_top_rect.mTop - label_height;
LLColor4 label_top_color = text_color;
label_top_color.mV[VALPHA] = gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor;
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index f648d7baae..2c204170f2 100755
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -48,23 +48,11 @@
#include "pipeline.h"
#include <boost/tokenizer.hpp>
-
-const F32 SPRING_STRENGTH = 0.7f;
-const F32 RESTORATION_SPRING_TIME_CONSTANT = 0.1f;
const F32 HORIZONTAL_PADDING = 15.f;
const F32 VERTICAL_PADDING = 12.f;
const F32 BUFFER_SIZE = 2.f;
-const F32 MIN_EDGE_OVERLAP = 3.f;
const F32 HUD_TEXT_MAX_WIDTH = 190.f;
const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f;
-const F32 RESIZE_TIME = 0.f;
-const S32 NUM_OVERLAP_ITERATIONS = 10;
-const F32 NEIGHBOR_FORCE_FRACTION = 1.f;
-const F32 POSITION_DAMPING_TC = 0.2f;
-const F32 MAX_STABLE_CAMERA_VELOCITY = 0.1f;
-//const F32 LOD_0_SCREEN_COVERAGE = 0.15f;
-//const F32 LOD_1_SCREEN_COVERAGE = 0.30f;
-//const F32 LOD_2_SCREEN_COVERAGE = 0.40f;
std::set<LLPointer<LLHUDText> > LLHUDText::sTextObjects;
std::vector<LLPointer<LLHUDText> > LLHUDText::sVisibleTextObjects;
diff --git a/indra/newview/llhudview.cpp b/indra/newview/llhudview.cpp
index 9a63e99357..cead4dbce6 100755
--- a/indra/newview/llhudview.cpp
+++ b/indra/newview/llhudview.cpp
@@ -44,10 +44,6 @@
LLHUDView *gHUDView = NULL;
-const S32 HUD_ARROW_SIZE = 32;
-
-
-
LLHUDView::LLHUDView(const LLRect& r)
{
buildFromFile( "panel_hud.xml");
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 8d8239611c..5d3a11e245 100755
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3061,6 +3061,24 @@ void LLIMMgr::inviteToSession(
{
if (gAgent.isDoNotDisturb() && !isRejectGroupCall && !isRejectNonFriendCall)
{
+ if (!hasSession(session_id) && (type == IM_SESSION_P2P_INVITE))
+ {
+ std::string fixed_session_name = caller_name;
+ if(!session_name.empty() && session_name.size()>1)
+ {
+ fixed_session_name = session_name;
+ }
+ else
+ {
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(caller_id, &av_name))
+ {
+ fixed_session_name = av_name.getDisplayName();
+ }
+ }
+ LLIMModel::getInstance()->newSession(session_id, fixed_session_name, IM_NOTHING_SPECIAL, caller_id, false, false);
+ }
+
LLSD args;
addSystemMessage(session_id, "you_auto_rejected_call", args);
send_do_not_disturb_message(gMessageSystem, caller_id, session_id);
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index a7b93b8030..46019557f8 100755
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -219,7 +219,7 @@ void LLInspectObject::onOpen(const LLSD& data)
LLViewerMediaFocus::getInstance()->clearFocus();
LLSelectMgr::instance().deselectAll();
- mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj);
+ mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE);
// Mark this as a transient selection
struct SetTransient : public LLSelectedNodeFunctor
diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp
index 0bc7bd188d..d04378daaf 100755
--- a/indra/newview/llinspecttoast.cpp
+++ b/indra/newview/llinspecttoast.cpp
@@ -89,6 +89,11 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1));
LLPanel * panel = toast->getPanel();
+ if (panel == NULL)
+ {
+ LL_WARNS() << "Could not get toast's panel." << LL_ENDL;
+ return;
+ }
panel->setVisible(TRUE);
panel->setMouseOpaque(FALSE);
if(mPanel != NULL && mPanel->getParent() == this)
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1910656066..1dc5558555 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4462,11 +4462,11 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action)
{
if ("save_as" == action)
{
- LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
- LLPreviewTexture* preview_texture = LLFloaterReg::findTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
+ LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
if (preview_texture)
{
preview_texture->openToSave();
+ preview_texture->saveAs();
}
}
else LLItemBridge::performAction(model, action);
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index e8d5db4437..f8ef15991d 100755
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -199,6 +199,7 @@ protected:
class LLInventoryFolderViewModelBuilder
{
public:
+ LLInventoryFolderViewModelBuilder() {}
virtual ~LLInventoryFolderViewModelBuilder() {}
virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
LLAssetType::EType actual_asset_type,
@@ -654,6 +655,7 @@ public:
class LLRecentInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder
{
public:
+ LLRecentInventoryBridgeBuilder() {}
// Overrides FolderBridge for Recent Inventory Panel.
// It use base functionality for bridges other than FolderBridge.
virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index dc8b15a5bf..c66e9da4a9 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -550,7 +550,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
if (mFilterOps.mFilterTypes == FILTERTYPE_UUID)
{
mFilterOps.mFilterTypes &= ~FILTERTYPE_UUID;
- mFilterOps.mFilterUUID == LLUUID::null;
+ mFilterOps.mFilterUUID = LLUUID::null;
setModified(FILTER_RESTART);
}
@@ -663,13 +663,13 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
BOOL more_restrictive;
if (FILTERDATEDIRECTION_NEWER == mFilterOps.mDateSearchDirection)
{
- less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours);
- more_restrictive = (are_date_limits_valid && (!is_increasing && hours) || is_increasing_from_zero);
+ less_restrictive = ((are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo))) || !hours);
+ more_restrictive = ((are_date_limits_valid && (!is_increasing && hours)) || is_increasing_from_zero);
}
else
{
- less_restrictive = (are_date_limits_valid && ((is_decreasing && mFilterOps.mHoursAgo)) || !hours);
- more_restrictive = (are_date_limits_valid && (!is_decreasing && hours) || is_increasing_from_zero);
+ less_restrictive = ((are_date_limits_valid && ((is_decreasing && mFilterOps.mHoursAgo))) || !hours);
+ more_restrictive = ((are_date_limits_valid && (!is_decreasing && hours)) || is_increasing_from_zero);
}
mFilterOps.mHoursAgo = hours;
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index f18832fe95..40edb13a80 100755
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -181,8 +181,6 @@ private:
};
-const S32 MAX_FETCH_RETRIES = 10;
-
const char * const LOG_INV("Inventory");
} // end of namespace anonymous
@@ -199,10 +197,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch():
mAllFoldersFetched(FALSE),
mRecursiveInventoryFetchStarted(FALSE),
mRecursiveLibraryFetchStarted(FALSE),
- mNumFetchRetries(0),
- mMinTimeBetweenFetches(0.3f),
- mMaxTimeBetweenFetches(10.f),
- mTimelyFetchPending(FALSE)
+ mMinTimeBetweenFetches(0.3f)
{}
LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch()
@@ -351,164 +346,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
if (mBackgroundFetchActive && gAgent.getRegion() && gAgent.getRegion()->capabilitiesReceived())
{
// If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
- if (gSavedSettings.getBOOL("UseHTTPInventory"))
- {
- bulkFetch();
- return;
- }
-
-#if 1
- //--------------------------------------------------------------------------------
- // DEPRECATED OLD CODE
- //
-
- // No more categories to fetch, stop fetch process.
- if (mFetchQueue.empty())
- {
- setAllFoldersFetched();
- return;
- }
-
- F32 fast_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.1f);
- F32 slow_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.5f);
- if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() > slow_fetch_time)
- {
- // Double timeouts on failure.
- mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f);
- mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f);
- LL_DEBUGS(LOG_INV) << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL;
- // fetch is no longer considered "timely" although we will wait for full time-out.
- mTimelyFetchPending = FALSE;
- }
-
- while(1)
- {
- if (mFetchQueue.empty())
- {
- break;
- }
-
- if (gDisconnected)
- {
- // Just bail if we are disconnected.
- break;
- }
-
- const FetchQueueInfo info = mFetchQueue.front();
-
- if (info.mIsCategory)
- {
-
- LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID);
-
- // Category has been deleted, remove from queue.
- if (!cat)
- {
- mFetchQueue.pop_front();
- continue;
- }
-
- if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches &&
- LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion())
- {
- // Category exists but has no children yet, fetch the descendants
- // for now, just request every time and rely on retry timer to throttle.
- if (cat->fetch())
- {
- mFetchTimer.reset();
- mTimelyFetchPending = TRUE;
- }
- else
- {
- // The catagory also tracks if it has expired and here it says it hasn't
- // yet. Get out of here because nothing is going to happen until we
- // update the timers.
- break;
- }
- }
- // Do I have all my children?
- else if (gInventory.isCategoryComplete(info.mUUID))
- {
- // Finished with this category, remove from queue.
- mFetchQueue.pop_front();
-
- // Add all children to queue.
- LLInventoryModel::cat_array_t* categories;
- LLInventoryModel::item_array_t* items;
- gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items);
- for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin();
- it != categories->end();
- ++it)
- {
- mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive));
- }
-
- // We received a response in less than the fast time.
- if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time)
- {
- // Shrink timeouts based on success.
- mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f);
- mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f);
- LL_DEBUGS(LOG_INV) << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL;
- }
-
- mTimelyFetchPending = FALSE;
- continue;
- }
- else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches)
- {
- // Received first packet, but our num descendants does not match db's num descendants
- // so try again later.
- mFetchQueue.pop_front();
-
- if (mNumFetchRetries++ < MAX_FETCH_RETRIES)
- {
- // push on back of queue
- mFetchQueue.push_back(info);
- }
- mTimelyFetchPending = FALSE;
- mFetchTimer.reset();
- break;
- }
-
- // Not enough time has elapsed to do a new fetch
- break;
- }
- else
- {
- LLViewerInventoryItem* itemp = gInventory.getItem(info.mUUID);
-
- mFetchQueue.pop_front();
- if (!itemp)
- {
- continue;
- }
-
- if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches)
- {
- itemp->fetchFromServer();
- mFetchTimer.reset();
- mTimelyFetchPending = TRUE;
- }
- else if (itemp->mIsComplete)
- {
- mTimelyFetchPending = FALSE;
- }
- else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches)
- {
- mFetchQueue.push_back(info);
- mFetchTimer.reset();
- mTimelyFetchPending = FALSE;
- }
- // Not enough time has elapsed to do a new fetch
- break;
- }
- }
-
- //
- // DEPRECATED OLD CODE
- //--------------------------------------------------------------------------------
-#endif
+ bulkFetch();
}
}
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index 2139f85519..19fbfc2ed3 100755
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -87,12 +87,9 @@ private:
BOOL mBackgroundFetchActive;
bool mFolderFetchActive;
S32 mFetchCount;
- BOOL mTimelyFetchPending;
- S32 mNumFetchRetries;
LLFrameTimer mFetchTimer;
F32 mMinTimeBetweenFetches;
- F32 mMaxTimeBetweenFetches;
struct FetchQueueInfo
{
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index d38f90015e..59e14e6cc0 100755
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -424,6 +424,7 @@ void LLJoystickCameraRotate::updateSlop()
BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
{
+ gAgent.setMovementLocked(TRUE);
updateSlop();
// Set initial offset based on initial click location
@@ -465,6 +466,11 @@ BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
return LLJoystick::handleMouseDown(x, y, mask);
}
+BOOL LLJoystickCameraRotate::handleMouseUp(S32 x, S32 y, MASK mask)
+{
+ gAgent.setMovementLocked(FALSE);
+ return LLJoystick::handleMouseUp(x, y, mask);
+}
void LLJoystickCameraRotate::onHeldDown()
{
diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h
index 8d76aa9531..4e6c774cad 100755
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -146,6 +146,7 @@ public:
virtual void setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom );
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual void onHeldDown();
virtual void draw();
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index f893daaeb2..9c00243f44 100755
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -74,9 +74,9 @@ public:
if (!landmark->getGlobalPos(landmark_global_pos))
return false;
//we have to round off each coordinates to compare positions properly
- return llround(mPos.mdV[VX]) == llround(landmark_global_pos.mdV[VX])
- && llround(mPos.mdV[VY]) == llround(landmark_global_pos.mdV[VY])
- && llround(mPos.mdV[VZ]) == llround(landmark_global_pos.mdV[VZ]);
+ return 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]);
}
};
@@ -320,7 +320,7 @@ void LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(const LLVector3d& gl
{
LLVector3 pos = sim_infop->getLocalPos(global_pos);
std::string name = sim_infop->getName() ;
- cb(name, llround(pos.mV[VX]), llround(pos.mV[VY]),llround(pos.mV[VZ]));
+ cb(name, ll_round(pos.mV[VX]), ll_round(pos.mV[VY]),ll_round(pos.mV[VZ]));
}
else
{
@@ -364,7 +364,7 @@ void LLLandmarkActions::onRegionResponseNameAndCoords(region_name_and_coords_cal
{
LLVector3 local_pos = sim_infop->getLocalPos(global_pos);
std::string name = sim_infop->getName() ;
- cb(name, llround(local_pos.mV[VX]), llround(local_pos.mV[VY]), llround(local_pos.mV[VZ]));
+ cb(name, ll_round(local_pos.mV[VX]), ll_round(local_pos.mV[VY]), ll_round(local_pos.mV[VZ]));
}
}
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 897ee8429a..8fb7550169 100755
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -64,6 +64,8 @@
#include "llimagedimensionsinfo.h"
#include "llviewercontrol.h"
#include "lltrans.h"
+#include "llviewerdisplay.h"
+
/*=======================================*/
/* Formal declarations, constants, etc. */
/*=======================================*/
@@ -74,7 +76,6 @@ bool LLLocalBitmapMgr::sNeedsRebake;
static const F32 LL_LOCAL_TIMER_HEARTBEAT = 3.0;
static const BOOL LL_LOCAL_USE_MIPMAPS = true;
static const S32 LL_LOCAL_DISCARD_LEVEL = 0;
-static const U32 LL_LOCAL_TEXLAYER_FOR_IDX = 0;
static const bool LL_LOCAL_SLAM_FOR_DEBUG = true;
static const bool LL_LOCAL_REPLACE_ON_DEL = true;
static const S32 LL_LOCAL_UPDATE_RETRIES = 5;
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
index 680b35b550..162d6e003e 100755
--- a/indra/newview/lllocationhistory.cpp
+++ b/indra/newview/lllocationhistory.cpp
@@ -127,7 +127,7 @@ void LLLocationHistory::save() const
}
// open a file for writing
- llofstream file (resolved_filename);
+ llofstream file(resolved_filename.c_str());
if (!file.is_open())
{
LL_WARNS() << "can't open location history file \"" << mFilename << "\" for writing" << LL_ENDL;
@@ -148,7 +148,7 @@ void LLLocationHistory::load()
// build filename for each user
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
- llifstream file(resolved_filename);
+ llifstream file(resolved_filename.c_str());
if (!file.is_open())
{
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index cadbc16f1e..7ddacf3033 100755
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -302,7 +302,7 @@ void LLLogChat::saveHistory(const std::string& filename,
return;
}
- llofstream file (LLLogChat::makeLogFileName(filename), std::ios_base::app);
+ llofstream file(LLLogChat::makeLogFileName(filename).c_str(), std::ios_base::app);
if (!file.is_open())
{
LL_WARNS() << "Couldn't open chat history log! - " + filename << LL_ENDL;
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index df59283bc4..b4d0bb6823 100755
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -58,7 +58,6 @@
#include "llmachineid.h"
#include "llupdaterservice.h"
#include "llevents.h"
-#include "llnotificationsutil.h"
#include "llappviewer.h"
#include <boost/scoped_ptr.hpp>
@@ -75,9 +74,14 @@ namespace {
{
public:
MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService);
-
+
void start(void);
-
+
+ LLNotificationsInterface& getNotificationsInterface() const
+ {
+ return mLoginInstance.getNotificationsInterface();
+ }
+
private:
class State;
class CheckingForUpdate;
@@ -85,9 +89,9 @@ namespace {
class ReadyToInstall;
class StartingUpdaterService;
class WaitingForDownload;
-
- LLLoginInstance & mLoginInstance;
+
boost::scoped_ptr<State> mState;
+ LLLoginInstance & mLoginInstance;
LLUpdaterService & mUpdaterService;
void setCurrentState(State * newState);
@@ -145,7 +149,7 @@ namespace {
virtual void exit(void);
private:
- MandatoryUpdateMachine & mMachine;
+ //MandatoryUpdateMachine & mMachine;
};
@@ -328,7 +332,7 @@ MandatoryUpdateMachine::Error::Error(MandatoryUpdateMachine & machine):
void MandatoryUpdateMachine::Error::enter(void)
{
LL_INFOS() << "entering error" << LL_ENDL;
- LLNotificationsUtil::add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2));
+ mMachine.getNotificationsInterface().add("FailedRequiredUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2));
}
@@ -349,8 +353,8 @@ void MandatoryUpdateMachine::Error::onButtonClicked(const LLSD &, const LLSD &)
//-----------------------------------------------------------------------------
-MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine & machine):
- mMachine(machine)
+MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine & machine) //:
+ //mMachine(machine)
{
; // No op.
}
@@ -384,7 +388,7 @@ MandatoryUpdateMachine::StartingUpdaterService::StartingUpdaterService(Mandatory
void MandatoryUpdateMachine::StartingUpdaterService::enter(void)
{
LL_INFOS() << "entering start update service" << LL_ENDL;
- LLNotificationsUtil::add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2));
+ mMachine.getNotificationsInterface().add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2));
}
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index b0247da7c8..c6773bbf68 100755
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -70,6 +70,7 @@ public:
void setPlatformInfo(const std::string platform, const std::string platform_version);
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
+ LLNotificationsInterface& getNotificationsInterface() const { return *mNotifications; }
typedef boost::function<void()> UpdaterLauncherCallback;
void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; }
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index cd6473921d..b5fd3df0f3 100755
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -88,7 +88,7 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
- LL_DEBUGS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL;
+ LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL;
CoUninitialize();
return 1; // Program has failed.
}
@@ -106,7 +106,7 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
- LL_DEBUGS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL;
+ LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL;
CoUninitialize();
return 1; // Program has failed.
}
@@ -132,7 +132,7 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
- LL_DEBUGS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL;
+ LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL;
pLoc->Release();
CoUninitialize();
return 1; // Program has failed.
@@ -157,7 +157,7 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
- LL_DEBUGS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL;
+ LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
CoUninitialize();
@@ -178,7 +178,7 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
- LL_DEBUGS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
+ LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
CoUninitialize();
@@ -205,7 +205,7 @@ S32 LLMachineID::init()
// Get the value of the Name property
hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0);
- LL_DEBUGS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL;
+ LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL;
// use characters in the returned Serial Number to create a byte array of size len
BSTR serialNumber ( vtProp.bstrVal);
unsigned int j = 0;
@@ -252,7 +252,7 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
if (has_static_unique_id)
{
memcpy ( unique_id, &static_unique_id, len);
- LL_DEBUGS("AppInit") << "UniqueID: 0x";
+ LL_INFOS_ONCE("AppInit") << "UniqueID: 0x";
// Code between here and LL_ENDL is not executed unless the LL_DEBUGS
// actually produces output
for (size_t i = 0; i < len; ++i)
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 0935691ebc..8567180dd6 100755
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -521,8 +521,8 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
std::string val_string;
std::string fraction_string;
- F32 val_to_print = llround(value, 0.001f);
- S32 fractional_portion = llround(fmodf(llabs(val_to_print), 1.f) * 100.f);
+ F32 val_to_print = ll_round(value, 0.001f);
+ S32 fractional_portion = ll_round(fmodf(llabs(val_to_print), 1.f) * 100.f);
if (val_to_print < 0.f)
{
if (fractional_portion == 0)
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index b2350e5a75..f172aa0955 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -368,9 +368,9 @@ void LLManipRotate::render()
LLQuaternion object_rot = first_object->getRotationEdit();
object_rot.getEulerAngles(&(euler_angles.mV[VX]), &(euler_angles.mV[VY]), &(euler_angles.mV[VZ]));
euler_angles *= RAD_TO_DEG;
- euler_angles.mV[VX] = llround(fmodf(euler_angles.mV[VX] + 360.f, 360.f), 0.05f);
- euler_angles.mV[VY] = llround(fmodf(euler_angles.mV[VY] + 360.f, 360.f), 0.05f);
- euler_angles.mV[VZ] = llround(fmodf(euler_angles.mV[VZ] + 360.f, 360.f), 0.05f);
+ euler_angles.mV[VX] = ll_round(fmodf(euler_angles.mV[VX] + 360.f, 360.f), 0.05f);
+ euler_angles.mV[VY] = ll_round(fmodf(euler_angles.mV[VY] + 360.f, 360.f), 0.05f);
+ euler_angles.mV[VZ] = ll_round(fmodf(euler_angles.mV[VZ] + 360.f, 360.f), 0.05f);
renderXYZ(euler_angles);
}
@@ -1524,7 +1524,6 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
- //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
LLVector3 object_axis;
getObjectAxisClosestToMouse(object_axis);
@@ -1608,7 +1607,6 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
- //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
LLVector3 object_axis;
getObjectAxisClosestToMouse(object_axis);
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 2810941d83..407613d32c 100755
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -85,7 +85,6 @@ const LLManip::EManipPart MANIPULATOR_IDS[LLManipScale::NUM_MANIPULATORS] =
LLManip::LL_FACE_NEGZ
};
-
F32 get_default_max_prim_scale(bool is_flora)
{
// a bit of a hack, but if it's foilage, we don't want to use the
@@ -229,8 +228,6 @@ void LLManipScale::render()
const F32 BOX_HANDLE_BASE_SIZE = 50.0f; // box size in pixels = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR
const F32 BOX_HANDLE_BASE_FACTOR = 0.2f;
- LLVector3 center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal());
-
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
for (S32 i = 0; i < NUM_MANIPULATORS; i++)
@@ -292,10 +289,6 @@ void LLManipScale::render()
LLGLEnable poly_offset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset( -2.f, -2.f);
- // JC - Band-aid until edge stretch working similar to side stretch
- // in non-uniform.
- // renderEdges( bbox );
-
renderCorners( bbox );
renderFaces( bbox );
@@ -352,6 +345,10 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
updateSnapGuides(bbox);
+ mFirstClickX = x;
+ mFirstClickY = y;
+ mIsFirstClick = true;
+
mDragStartPointGlobal = gAgent.getPosGlobalFromAgent(box_corner_agent);
mDragStartCenterGlobal = gAgent.getPosGlobalFromAgent(box_center_agent);
LLVector3 far_corner_agent = bbox.localToAgent( unitVectorToLocalBBoxExtent( -1.f * partToUnitVector( mManipPart ), bbox ) );
@@ -415,7 +412,15 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
}
else
{
- drag( x, y );
+ if((mFirstClickX != x) || (mFirstClickY != y))
+ {
+ mIsFirstClick = false;
+ }
+
+ if(!mIsFirstClick)
+ {
+ drag( x, y );
+ }
}
LL_DEBUGS("UserInput") << "hover handled by LLManipScale (active)" << LL_ENDL;
}
@@ -681,63 +686,38 @@ void LLManipScale::renderFaces( const LLBBox& bbox )
{
case 0:
conditionalHighlight( LL_FACE_POSZ, &z_highlight_color, &z_normal_color );
- renderAxisHandle( LL_FACE_POSZ, ctr, LLVector3( ctr.mV[VX], ctr.mV[VY], max.mV[VZ] ) );
+ renderAxisHandle( 8, ctr, LLVector3( ctr.mV[VX], ctr.mV[VY], max.mV[VZ] ) );
break;
case 1:
conditionalHighlight( LL_FACE_POSX, &x_highlight_color, &x_normal_color );
- renderAxisHandle( LL_FACE_POSX, ctr, LLVector3( max.mV[VX], ctr.mV[VY], ctr.mV[VZ] ) );
+ renderAxisHandle( 9, ctr, LLVector3( max.mV[VX], ctr.mV[VY], ctr.mV[VZ] ) );
break;
case 2:
conditionalHighlight( LL_FACE_POSY, &y_highlight_color, &y_normal_color );
- renderAxisHandle( LL_FACE_POSY, ctr, LLVector3( ctr.mV[VX], max.mV[VY], ctr.mV[VZ] ) );
+ renderAxisHandle( 10, ctr, LLVector3( ctr.mV[VX], max.mV[VY], ctr.mV[VZ] ) );
break;
case 3:
conditionalHighlight( LL_FACE_NEGX, &x_highlight_color, &x_normal_color );
- renderAxisHandle( LL_FACE_NEGX, ctr, LLVector3( min.mV[VX], ctr.mV[VY], ctr.mV[VZ] ) );
+ renderAxisHandle( 11, ctr, LLVector3( min.mV[VX], ctr.mV[VY], ctr.mV[VZ] ) );
break;
case 4:
conditionalHighlight( LL_FACE_NEGY, &y_highlight_color, &y_normal_color );
- renderAxisHandle( LL_FACE_NEGY, ctr, LLVector3( ctr.mV[VX], min.mV[VY], ctr.mV[VZ] ) );
+ renderAxisHandle( 12, ctr, LLVector3( ctr.mV[VX], min.mV[VY], ctr.mV[VZ] ) );
break;
case 5:
conditionalHighlight( LL_FACE_NEGZ, &z_highlight_color, &z_normal_color );
- renderAxisHandle( LL_FACE_NEGZ, ctr, LLVector3( ctr.mV[VX], ctr.mV[VY], min.mV[VZ] ) );
+ renderAxisHandle( 13, ctr, LLVector3( ctr.mV[VX], ctr.mV[VY], min.mV[VZ] ) );
break;
}
}
}
}
-void LLManipScale::renderEdges( const LLBBox& bbox )
-{
- LLVector3 extent = bbox.getExtentLocal();
-
- for( U32 part = LL_EDGE_MIN; part <= LL_EDGE_MAX; part++ )
- {
- F32 edge_width = mBoxHandleSize[part] * .6f;
- LLVector3 direction = edgeToUnitVector( part );
- LLVector3 center_to_edge = unitVectorToLocalBBoxExtent( direction, bbox );
-
- gGL.pushMatrix();
- {
- gGL.translatef( center_to_edge.mV[0], center_to_edge.mV[1], center_to_edge.mV[2] );
- conditionalHighlight( part );
- gGL.scalef(
- direction.mV[0] ? edge_width : extent.mV[VX],
- direction.mV[1] ? edge_width : extent.mV[VY],
- direction.mV[2] ? edge_width : extent.mV[VZ] );
- gBox.render();
- }
- gGL.popMatrix();
- }
-}
-
-
void LLManipScale::renderCorners( const LLBBox& bbox )
{
U32 part = LL_CORNER_NNN;
@@ -780,14 +760,14 @@ void LLManipScale::renderBoxHandle( F32 x, F32 y, F32 z )
}
-void LLManipScale::renderAxisHandle( U32 part, const LLVector3& start, const LLVector3& end )
+void LLManipScale::renderAxisHandle( U32 handle_index, const LLVector3& start, const LLVector3& end )
{
if( getShowAxes() )
{
// Draws a single "jacks" style handle: a long, retangular box from start to end.
LLVector3 offset_start = end - start;
offset_start.normalize();
- offset_start = start + mBoxHandleSize[part] * offset_start;
+ offset_start = start + mBoxHandleSize[handle_index] * offset_start;
LLVector3 delta = end - offset_start;
LLVector3 pos = offset_start + 0.5f * delta;
@@ -796,9 +776,9 @@ void LLManipScale::renderAxisHandle( U32 part, const LLVector3& start, const LLV
{
gGL.translatef( pos.mV[VX], pos.mV[VY], pos.mV[VZ] );
gGL.scalef(
- mBoxHandleSize[part] + llabs(delta.mV[VX]),
- mBoxHandleSize[part] + llabs(delta.mV[VY]),
- mBoxHandleSize[part] + llabs(delta.mV[VZ]));
+ mBoxHandleSize[handle_index] + llabs(delta.mV[VX]),
+ mBoxHandleSize[handle_index] + llabs(delta.mV[VY]),
+ mBoxHandleSize[handle_index] + llabs(delta.mV[VZ]));
gBox.render();
}
gGL.popMatrix();
@@ -1554,8 +1534,8 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir);
mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir);
- mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length());
- mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length());
+ mTickPixelSpacing1 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length());
+ mTickPixelSpacing2 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length());
if (uniform)
{
@@ -1626,8 +1606,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2);
// how many smallest grid units are we away from largest grid scale?
- S32 sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / smallest_subdivision1);
- S32 sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / smallest_subdivision2);
+ S32 sub_div_offset_1 = ll_round(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / smallest_subdivision1);
+ S32 sub_div_offset_2 = ll_round(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / smallest_subdivision2);
S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision1));
S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision2));
@@ -1681,7 +1661,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
LLVector2 screen_translate_axis(llabs(mScaleDir * LLViewerCamera::getInstance()->getLeftAxis()), llabs(mScaleDir * LLViewerCamera::getInstance()->getUpAxis()));
screen_translate_axis.normalize();
- S32 tick_label_spacing = llround(screen_translate_axis * sTickLabelSpacing);
+ S32 tick_label_spacing = ll_round(screen_translate_axis * sTickLabelSpacing);
for (pass = 0; pass < 3; pass++)
{
@@ -1761,8 +1741,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
stop_tick = llmin(max_ticks1, num_ticks_per_side1);
F32 grid_resolution = mObjectSelection->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f);
- S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / smallest_subdivision1);
- S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / smallest_subdivision2);
+ S32 label_sub_div_offset_1 = ll_round(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / smallest_subdivision1);
+ S32 label_sub_div_offset_2 = ll_round(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / smallest_subdivision2);
for (S32 i = start_tick; i <= stop_tick; i++)
{
diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h
index 7cc3c99810..11ade9b7d0 100755
--- a/indra/newview/llmanipscale.h
+++ b/indra/newview/llmanipscale.h
@@ -96,7 +96,6 @@ public:
private:
void renderCorners( const LLBBox& local_bbox );
void renderFaces( const LLBBox& local_bbox );
- void renderEdges( const LLBBox& local_bbox );
void renderBoxHandle( F32 x, F32 y, F32 z );
void renderAxisHandle( U32 part, const LLVector3& start, const LLVector3& end );
void renderGuidelinesPart( const LLBBox& local_bbox );
@@ -172,6 +171,9 @@ private:
ESnapRegimes mSnapRegime; //<! Which, if any, snap regime the cursor is currently residing in.
F32 mManipulatorScales[NUM_MANIPULATORS];
F32 mBoxHandleSize[NUM_MANIPULATORS]; // The size of the handles at the corners of the bounding box
+ S32 mFirstClickX;
+ S32 mFirstClickY;
+ bool mIsFirstClick;
};
#endif // LL_MANIPSCALE_H
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index d22672bc16..394db71fb9 100755
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -65,7 +65,6 @@
const S32 NUM_AXES = 3;
const S32 MOUSE_DRAG_SLOP = 2; // pixels
-const F32 HANDLE_HIDE_ANGLE = 0.15f; // radians
const F32 SELECTED_ARROW_SCALE = 1.3f;
const F32 MANIPULATOR_HOTSPOT_START = 0.2f;
const F32 MANIPULATOR_HOTSPOT_END = 1.2f;
@@ -1246,7 +1245,7 @@ void LLManipTranslate::renderSnapGuides()
// find distance to nearest smallest grid unit
F32 offset_nearest_grid_unit = fmodf(dist_grid_axis, smallest_grid_unit_scale);
// how many smallest grid units are we away from largest grid scale?
- S32 sub_div_offset = llround(fmodf(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() / sGridMinSubdivisionLevel) / smallest_grid_unit_scale);
+ S32 sub_div_offset = ll_round(fmodf(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() / sGridMinSubdivisionLevel) / smallest_grid_unit_scale);
S32 num_ticks_per_side = llmax(1, llfloor(0.5f * guide_size_meters / smallest_grid_unit_scale));
LLGLDepthTest gls_depth(GL_FALSE);
@@ -1361,12 +1360,12 @@ void LLManipTranslate::renderSnapGuides()
}
}
- sub_div_offset = llround(fmod(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() * 32.f) / smallest_grid_unit_scale);
+ sub_div_offset = ll_round(fmod(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() * 32.f) / smallest_grid_unit_scale);
LLVector2 screen_translate_axis(llabs(translate_axis * LLViewerCamera::getInstance()->getLeftAxis()), llabs(translate_axis * LLViewerCamera::getInstance()->getUpAxis()));
screen_translate_axis.normVec();
- S32 tick_label_spacing = llround(screen_translate_axis * sTickLabelSpacing);
+ S32 tick_label_spacing = ll_round(screen_translate_axis * sTickLabelSpacing);
// render tickmark values
for (S32 i = -num_ticks_per_side; i <= num_ticks_per_side; i++)
@@ -1404,7 +1403,7 @@ void LLManipTranslate::renderSnapGuides()
F32 offset_val = 0.5f * tick_offset.mV[ARROW_TO_AXIS[mManipPart]] / getMinGridScale();
EGridMode grid_mode = LLSelectMgr::getInstance()->getGridMode();
F32 text_highlight = 0.8f;
- if(i - llround(offset_nearest_grid_unit / smallest_grid_unit_scale) == 0 && mInSnapRegime)
+ if(i - ll_round(offset_nearest_grid_unit / smallest_grid_unit_scale) == 0 && mInSnapRegime)
{
text_highlight = 1.f;
}
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index f4e08dc790..b96bdd73ff 100755
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -120,8 +120,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
if(!getDecoupleTextureSize())
{
- S32 screen_width = llround((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]);
- S32 screen_height = llround((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);
+ S32 screen_width = ll_round((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]);
+ S32 screen_height = ll_round((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);
setTextureSize(screen_width, screen_height);
}
@@ -474,8 +474,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
{
if(!getDecoupleTextureSize())
{
- S32 screen_width = llround((F32)width * LLUI::getScaleFactor().mV[VX]);
- S32 screen_height = llround((F32)height * LLUI::getScaleFactor().mV[VY]);
+ S32 screen_width = ll_round((F32)width * LLUI::getScaleFactor().mV[VX]);
+ S32 screen_height = ll_round((F32)height * LLUI::getScaleFactor().mV[VY]);
// when floater is minimized, these sizes are negative
if ( screen_height > 0 && screen_width > 0 )
@@ -789,13 +789,13 @@ void LLMediaCtrl::draw()
{
// max width, adjusted height
width = r.getWidth();
- height = llmin(llmax(llround(width / media_aspect), 0), r.getHeight());
+ height = llmin(llmax(ll_round(width / media_aspect), 0), r.getHeight());
}
else
{
// max height, adjusted width
height = r.getHeight();
- width = llmin(llmax(llround(height * media_aspect), 0), r.getWidth());
+ width = llmin(llmax(ll_round(height * media_aspect), 0), r.getWidth());
}
}
else
@@ -879,14 +879,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
}
- x = llround((F32)x * LLUI::getScaleFactor().mV[VX]);
+ x = ll_round((F32)x * LLUI::getScaleFactor().mV[VX]);
if ( ! coords_opengl )
{
- y = llround((F32)(y) * LLUI::getScaleFactor().mV[VY]);
+ y = ll_round((F32)(y) * LLUI::getScaleFactor().mV[VY]);
}
else
{
- y = llround((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);
+ y = ll_round((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);
};
}
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 691be13610..2fb9e60b29 100755
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -92,7 +92,7 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::request_queue
std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::Request &q);
template <typename T>
-static typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type)
+typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type)
{
for(typename T::iterator iter = c.begin(); iter != c.end(); ++iter)
{
@@ -106,7 +106,7 @@ static typename T::iterator find_matching_request(T &c, const LLMediaDataClient:
}
template <typename T>
-static typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
+typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
{
for(typename T::iterator iter = c.begin(); iter != c.end(); ++iter)
{
@@ -123,7 +123,7 @@ static typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMedi
// to other elements in the container (such as std::vector).
// If the implementation is changed to use a container with this property, this will need to be revisited.
template <typename T>
-static void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
+void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type)
{
for(typename T::iterator iter = c.begin(); iter != c.end();)
{
@@ -171,10 +171,10 @@ bool LLMediaDataClient::isEmpty() const
bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object)
{
- if(find_matching_request(mQueue, object->getID()) != mQueue.end())
+ if(find_matching_request(mQueue, object->getID(), LLMediaDataClient::Request::ANY) != mQueue.end())
return true;
- if(find_matching_request(mUnQueuedRequests, object->getID()) != mUnQueuedRequests.end())
+ if(find_matching_request(mUnQueuedRequests, object->getID(), LLMediaDataClient::Request::ANY) != mUnQueuedRequests.end())
return true;
return false;
@@ -183,8 +183,8 @@ bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object)
void LLMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr_t &object)
{
LL_DEBUGS("LLMediaDataClient") << "removing requests matching ID " << object->getID() << LL_ENDL;
- remove_matching_requests(mQueue, object->getID());
- remove_matching_requests(mUnQueuedRequests, object->getID());
+ remove_matching_requests(mQueue, object->getID(), LLMediaDataClient::Request::ANY);
+ remove_matching_requests(mUnQueuedRequests, object->getID(), LLMediaDataClient::Request::ANY);
}
void LLMediaDataClient::startQueueTimer()
@@ -785,7 +785,7 @@ bool LLObjectMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &ob
if(LLMediaDataClient::isInQueue(object))
return true;
- if(find_matching_request(mRoundRobinQueue, object->getID()) != mRoundRobinQueue.end())
+ if(find_matching_request(mRoundRobinQueue, object->getID(), LLMediaDataClient::Request::ANY) != mRoundRobinQueue.end())
return true;
return false;
@@ -796,7 +796,7 @@ void LLObjectMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr
// First, call parent impl.
LLMediaDataClient::removeFromQueue(object);
- remove_matching_requests(mRoundRobinQueue, object->getID());
+ remove_matching_requests(mRoundRobinQueue, object->getID(), LLMediaDataClient::Request::ANY);
}
bool LLObjectMediaDataClient::processQueueTimer()
@@ -952,7 +952,7 @@ void LLObjectMediaNavigateClient::enqueue(Request *request)
}
// If there's already a matching request in the queue, remove it.
- request_queue_t::iterator iter = find_matching_request(mQueue, request);
+ request_queue_t::iterator iter = find_matching_request(mQueue, request, LLMediaDataClient::Request::ANY);
if(iter != mQueue.end())
{
LL_DEBUGS("LLMediaDataClient") << "removing matching queued request " << (**iter) << LL_ENDL;
@@ -960,7 +960,7 @@ void LLObjectMediaNavigateClient::enqueue(Request *request)
}
else
{
- request_set_t::iterator set_iter = find_matching_request(mUnQueuedRequests, request);
+ request_set_t::iterator set_iter = find_matching_request(mUnQueuedRequests, request, LLMediaDataClient::Request::ANY);
if(set_iter != mUnQueuedRequests.end())
{
LL_DEBUGS("LLMediaDataClient") << "removing matching unqueued request " << (**set_iter) << LL_ENDL;
diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h
index 231b883c32..80dd519812 100755
--- a/indra/newview/llmediadataclient.h
+++ b/indra/newview/llmediadataclient.h
@@ -281,10 +281,9 @@ private:
bool mQueueTimerIsRunning;
- template <typename T> friend typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY);
- template <typename T> friend typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY);
- template <typename T> friend void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type = LLMediaDataClient::Request::ANY);
-
+ template <typename T> friend typename T::iterator find_matching_request(T &c, const LLMediaDataClient::Request *request, LLMediaDataClient::Request::Type match_type);
+ template <typename T> friend typename T::iterator find_matching_request(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type);
+ template <typename T> friend void remove_matching_requests(T &c, const LLUUID &id, LLMediaDataClient::Request::Type match_type);
};
// MediaDataClient specific for the ObjectMedia cap
diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp
index 252d1b78ea..ff86400a56 100755
--- a/indra/newview/llmorphview.cpp
+++ b/indra/newview/llmorphview.cpp
@@ -47,17 +47,8 @@
LLMorphView *gMorphView = NULL;
-
-const F32 EDIT_AVATAR_ORBIT_SPEED = 0.1f;
-const F32 EDIT_AVATAR_MAX_CAMERA_PITCH = 0.5f;
-
-const F32 CAMERA_MOVE_TIME = 0.5f;
const F32 MORPH_NEAR_CLIP = 0.1f;
-const F32 CAMERA_DIST_MIN = 0.4f;
-const F32 CAMERA_DIST_MAX = 4.0f;
-const F32 CAMERA_DIST_STEP = 1.5f;
-
//-----------------------------------------------------------------------------
// LLMorphView()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 1685a18e26..d7e7f13e87 100755
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -67,7 +67,6 @@ const F32 LLNetMap::MAP_SCALE_MIN = 32;
const F32 LLNetMap::MAP_SCALE_MID = 1024;
const F32 LLNetMap::MAP_SCALE_MAX = 4096;
-const F32 MAP_SCALE_INCREMENT = 16;
const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%)
const F32 MIN_DOT_RADIUS = 3.5f;
const F32 DOT_SCALE = 0.75f;
@@ -210,7 +209,7 @@ void LLNetMap::draw()
}
// figure out where agent is
- S32 region_width = llround(LLWorld::getInstance()->getRegionWidthInMeters());
+ S32 region_width = ll_round(LLWorld::getInstance()->getRegionWidthInMeters());
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -381,8 +380,8 @@ void LLNetMap::draw()
(pos_map.mV[VX] >= getRect().getWidth()) ||
(pos_map.mV[VY] >= getRect().getHeight()) )
{
- S32 x = llround( pos_map.mV[VX] );
- S32 y = llround( pos_map.mV[VY] );
+ S32 x = ll_round( pos_map.mV[VX] );
+ S32 y = ll_round( pos_map.mV[VY] );
LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
} else
{
@@ -422,12 +421,12 @@ void LLNetMap::draw()
// Draw dot for self avatar position
LLVector3d pos_global = gAgent.getPositionGlobal();
pos_map = globalPosToView(pos_global);
- S32 dot_width = llround(mDotRadius * 2.f);
+ S32 dot_width = ll_round(mDotRadius * 2.f);
LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
if (you)
{
- you->draw(llround(pos_map.mV[VX] - mDotRadius),
- llround(pos_map.mV[VY] - mDotRadius),
+ you->draw(ll_round(pos_map.mV[VX] - mDotRadius),
+ ll_round(pos_map.mV[VY] - mDotRadius),
dot_width,
dot_width);
@@ -531,8 +530,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
{
if (draw_arrow)
{
- S32 x = llround( pos_local.mV[VX] );
- S32 y = llround( pos_local.mV[VY] );
+ S32 x = ll_round( pos_local.mV[VX] );
+ S32 y = ll_round( pos_local.mV[VY] );
LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10 );
LLWorldMapView::drawTrackingArrow( getRect(), x, y, color );
}
@@ -548,8 +547,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
{
- x -= llround(getRect().getWidth() / 2 + mCurPan.mV[VX]);
- y -= llround(getRect().getHeight() / 2 + mCurPan.mV[VY]);
+ x -= ll_round(getRect().getWidth() / 2 + mCurPan.mV[VX]);
+ y -= ll_round(getRect().getHeight() / 2 + mCurPan.mV[VY]);
LLVector3 pos_local( (F32)x, (F32)y, 0 );
@@ -685,7 +684,7 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &
LLVector3 local_pos;
local_pos.setVec( pos - mObjectImageCenterGlobal );
- S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM);
+ S32 diameter_pixels = ll_round(2 * radius_meters * mObjectMapTPM);
renderPoint( local_pos, color, diameter_pixels );
}
@@ -701,8 +700,8 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color,
const S32 image_width = (S32)mObjectImagep->getWidth();
const S32 image_height = (S32)mObjectImagep->getHeight();
- S32 x_offset = llround(pos_local.mV[VX] * mObjectMapTPM + image_width / 2);
- S32 y_offset = llround(pos_local.mV[VY] * mObjectMapTPM + image_height / 2);
+ S32 x_offset = ll_round(pos_local.mV[VX] * mObjectMapTPM + image_width / 2);
+ S32 y_offset = ll_round(pos_local.mV[VY] * mObjectMapTPM + image_height / 2);
if ((x_offset < 0) || (x_offset >= image_width))
{
@@ -781,7 +780,7 @@ void LLNetMap::createObjectImage()
// ... which is, the diagonal of the rect.
F32 width = (F32)getRect().getWidth();
F32 height = (F32)getRect().getHeight();
- S32 square_size = llround( sqrt(width*width + height*height) );
+ S32 square_size = ll_round( sqrt(width*width + height*height) );
// Find the least power of two >= the minimum size.
const S32 MIN_SIZE = 64;
diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp
index 6b674fcc7d..8e7671897d 100644
--- a/indra/newview/llnotificationlistitem.cpp
+++ b/indra/newview/llnotificationlistitem.cpp
@@ -57,7 +57,7 @@ BOOL LLNotificationListItem::postBuild()
BOOL rv = LLPanel::postBuild();
mTitleBox = getChild<LLTextBox>("notification_title");
mTitleBoxExp = getChild<LLTextBox>("notification_title_exp");
- mNoticeTextExp = getChild<LLTextBox>("notification_text_exp");
+ mNoticeTextExp = getChild<LLViewerTextEditor>("notification_text_exp");
mTimeBox = getChild<LLTextBox>("notification_time");
mTimeBoxExp = getChild<LLTextBox>("notification_time_exp");
@@ -115,6 +115,7 @@ std::string LLNotificationListItem::buildNotificationDate(const LLDate& time_sta
void LLNotificationListItem::onClickCloseBtn()
{
mOnItemClose(this);
+ close();
}
BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask)
@@ -278,14 +279,17 @@ BOOL LLGroupNoticeNotificationListItem::postBuild()
if (mInventoryOffer != NULL)
{
mAttachmentTextBox->setValue(mInventoryOffer->mDesc);
+ mAttachmentTextBox->setVisible(TRUE);
mAttachmentIcon->setVisible(TRUE);
std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType,
LLInventoryType::IT_TEXTURE);
-
mAttachmentIconExp->setValue(icon_name);
mAttachmentIconExp->setVisible(TRUE);
+ mAttachmentTextBox->setClickedCallback(boost::bind(
+ &LLGroupNoticeNotificationListItem::onClickAttachment, this));
+
std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment");
mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str());
@@ -388,6 +392,53 @@ void LLGroupNoticeNotificationListItem::setSender(std::string sender)
mSenderOrFeeBoxExp->setVisible(FALSE);
}
}
+void LLGroupNoticeNotificationListItem::close()
+{
+ // The group notice dialog may be an inventory offer.
+ // If it has an inventory save button and that button is still enabled
+ // Then we need to send the inventory declined message
+ if (mInventoryOffer != NULL)
+ {
+ mInventoryOffer->forceResponse(IOR_DECLINE);
+ mInventoryOffer = NULL;
+ }
+}
+
+void LLGroupNoticeNotificationListItem::onClickAttachment()
+{
+ if (mInventoryOffer != NULL) {
+ mInventoryOffer->forceResponse(IOR_ACCEPT);
+
+ static const LLUIColor textColor = LLUIColorTable::instance().getColor(
+ "GroupNotifyDimmedTextColor");
+ mAttachmentTextBox->setColor(textColor);
+ mAttachmentIconExp->setEnabled(FALSE);
+
+ //if attachment isn't openable - notify about saving
+ if (!isAttachmentOpenable(mInventoryOffer->mType)) {
+ LLNotifications::instance().add("AttachmentSaved", LLSD(), LLSD());
+ }
+
+ mInventoryOffer = NULL;
+ }
+}
+
+//static
+bool LLGroupNoticeNotificationListItem::isAttachmentOpenable(LLAssetType::EType type)
+{
+ switch (type)
+ {
+ case LLAssetType::AT_LANDMARK:
+ case LLAssetType::AT_NOTECARD:
+ case LLAssetType::AT_IMAGE_JPEG:
+ case LLAssetType::AT_IMAGE_TGA:
+ case LLAssetType::AT_TEXTURE:
+ case LLAssetType::AT_TEXTURE_TGA:
+ return true;
+ default:
+ return false;
+ }
+}
LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p)
: LLNotificationListItem(p),
diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h
index bd76d17fe8..f8d9fc0330 100644
--- a/indra/newview/llnotificationlistitem.h
+++ b/indra/newview/llnotificationlistitem.h
@@ -30,6 +30,7 @@
#include "llpanel.h"
#include "lllayoutstack.h"
#include "lltextbox.h"
+#include "llviewertexteditor.h"
#include "llbutton.h"
#include "llgroupiconctrl.h"
#include "llavatariconctrl.h"
@@ -95,24 +96,25 @@ protected:
void onClickExpandBtn();
void onClickCondenseBtn();
void onClickCloseBtn();
-
- Params mParams;
- LLTextBox* mTitleBox;
- LLTextBox* mTitleBoxExp;
- LLTextBox* mNoticeTextExp;
- LLTextBox* mTimeBox;
- LLTextBox* mTimeBoxExp;
- LLButton* mExpandBtn;
- LLButton* mCondenseBtn;
- LLButton* mCloseBtn;
- LLButton* mCloseBtnExp;
- LLPanel* mCondensedViewPanel;
- LLPanel* mExpandedViewPanel;
- std::string mTitle;
- std::string mNotificationName;
- S32 mCondensedHeight;
- S32 mExpandedHeight;
- S32 mExpandedHeightResize;
+ virtual void close() {};
+
+ Params mParams;
+ LLTextBox* mTitleBox;
+ LLTextBox* mTitleBoxExp;
+ LLViewerTextEditor* mNoticeTextExp;
+ LLTextBox* mTimeBox;
+ LLTextBox* mTimeBoxExp;
+ LLButton* mExpandBtn;
+ LLButton* mCondenseBtn;
+ LLButton* mCloseBtn;
+ LLButton* mCloseBtnExp;
+ LLPanel* mCondensedViewPanel;
+ LLPanel* mExpandedViewPanel;
+ std::string mTitle;
+ std::string mNotificationName;
+ S32 mCondensedHeight;
+ S32 mExpandedHeight;
+ S32 mExpandedHeightResize;
};
class LLGroupNotificationListItem
@@ -174,12 +176,16 @@ private:
LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &);
void setSender(std::string sender);
+ void onClickAttachment();
+ /*virtual*/ void close();
+
+ static bool isAttachmentOpenable(LLAssetType::EType);
- LLPanel* mAttachmentPanel;
- LLTextBox* mAttachmentTextBox;
- LLIconCtrl* mAttachmentIcon;
- LLIconCtrl* mAttachmentIconExp;
- LLOfferInfo* mInventoryOffer;
+ LLPanel* mAttachmentPanel;
+ LLTextBox* mAttachmentTextBox;
+ LLIconCtrl* mAttachmentIcon;
+ LLIconCtrl* mAttachmentIconExp;
+ LLOfferInfo* mInventoryOffer;
};
class LLTransactionNotificationListItem : public LLNotificationListItem
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index e9970de58c..3418b33d37 100755
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -123,14 +123,18 @@ bool LLNotificationStorage::readNotifications(LLSD& pNotificationData, bool is_n
{
LLPointer<LLSDParser> parser = new LLSDXMLParser();
didFileRead = (parser->parse(notifyFile, pNotificationData, LLSDSerialize::SIZE_UNLIMITED) >= 0);
+ notifyFile.close();
+
if (!didFileRead)
{
LL_WARNS("LLNotificationStorage") << "Failed to parse open notifications from file '" << mFileName
- << "'" << LL_ENDL;
+ << "'" << LL_ENDL;
+ LLFile::remove(filename);
+ LL_WARNS("LLNotificationStorage") << "Removed invalid open notifications file '" << mFileName
+ << "'" << LL_ENDL;
}
}
-
- LL_INFOS("LLNotificationStorage") << "ending read '" << filename << "'" << LL_ENDL;
+
if (!didFileRead)
{
if(is_new_filename)
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 3cd39d7c7e..878f1af9ef 100755
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -462,9 +462,9 @@ std::string LLPanelClassifiedInfo::createLocationText(
if (!pos_global.isNull())
{
- S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llround((F32)pos_global.mdV[VZ]);
+ S32 region_x = ll_round((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)pos_global.mdV[VZ]);
location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
}
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 407cbfc47b..451f41cd3b 100755
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -197,9 +197,6 @@ void LLPanelContents::onClickNewScript(void *userdata)
// *TODO: The script creation should round-trip back to the
// viewer so the viewer can auto-open the script and start
// editing ASAP.
-#if 0
- LLFloaterReg::showInstance("preview_scriptedit", LLSD(inv_item->getUUID()), TAKE_FOCUS_YES);
-#endif
}
}
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 02e05d3d9a..afc1a789c4 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -77,8 +77,6 @@ const S32 MATMEDIA_MEDIA = 1; // Media
const S32 MATTYPE_DIFFUSE = 0; // Diffuse material texture
const S32 MATTYPE_NORMAL = 1; // Normal map
const S32 MATTYPE_SPECULAR = 2; // Specular map
-const S32 ALPHAMODE_NONE = 0; // No alpha mask applied
-const S32 ALPHAMODE_BLEND = 1; // Alpha blending mode
const S32 ALPHAMODE_MASK = 2; // Alpha masking mode
const S32 BUMPY_TEXTURE = 18; // use supplied normal map
const S32 SHINY_TEXTURE = 4; // use supplied specular map
@@ -242,6 +240,8 @@ BOOL LLPanelFace::postBuild()
if(mShinyColorSwatch)
{
mShinyColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitShinyColor, this, _2));
+ mShinyColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelShinyColor, this, _2));
+ mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2));
mShinyColorSwatch->setFollowsTop();
mShinyColorSwatch->setFollowsLeft();
mShinyColorSwatch->setCanApplyImmediately(TRUE);
@@ -900,52 +900,22 @@ void LLPanelFace::updateUI()
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
}
}
-
- if (shinytexture_ctrl)
- {
- if (identical_spec && (shiny == SHINY_TEXTURE))
- {
- shinytexture_ctrl->setTentative( FALSE );
- shinytexture_ctrl->setEnabled( editable );
- shinytexture_ctrl->setImageAssetID( specmap_id );
- }
- else if (specmap_id.isNull())
- {
- shinytexture_ctrl->setTentative( FALSE );
- shinytexture_ctrl->setEnabled( editable );
- shinytexture_ctrl->setImageAssetID( LLUUID::null );
- }
- else
- {
- shinytexture_ctrl->setTentative( TRUE );
- shinytexture_ctrl->setEnabled( editable );
- shinytexture_ctrl->setImageAssetID( specmap_id );
+
+ if (shinytexture_ctrl)
+ {
+ shinytexture_ctrl->setTentative( !identical_spec );
+ shinytexture_ctrl->setEnabled( editable );
+ shinytexture_ctrl->setImageAssetID( specmap_id );
}
- }
- if (bumpytexture_ctrl)
- {
- if (identical_norm && (bumpy == BUMPY_TEXTURE))
- {
- bumpytexture_ctrl->setTentative( FALSE );
- bumpytexture_ctrl->setEnabled( editable );
- bumpytexture_ctrl->setImageAssetID( normmap_id );
- }
- else if (normmap_id.isNull())
- {
- bumpytexture_ctrl->setTentative( FALSE );
- bumpytexture_ctrl->setEnabled( editable );
- bumpytexture_ctrl->setImageAssetID( LLUUID::null );
- }
- else
- {
- bumpytexture_ctrl->setTentative( TRUE );
- bumpytexture_ctrl->setEnabled( editable );
- bumpytexture_ctrl->setImageAssetID( normmap_id );
- }
+ if (bumpytexture_ctrl)
+ {
+ bumpytexture_ctrl->setTentative( !identical_norm );
+ bumpytexture_ctrl->setEnabled( editable );
+ bumpytexture_ctrl->setImageAssetID( normmap_id );
}
}
-
+
// planar align
bool align_planar = false;
bool identical_planar_aligned = false;
@@ -1463,12 +1433,23 @@ void LLPanelFace::onCancelColor(const LLSD& data)
LLSelectMgr::getInstance()->selectionRevertColors();
}
+void LLPanelFace::onCancelShinyColor(const LLSD& data)
+{
+ LLSelectMgr::getInstance()->selectionRevertShinyColors();
+}
+
void LLPanelFace::onSelectColor(const LLSD& data)
{
LLSelectMgr::getInstance()->saveSelectedObjectColors();
sendColor();
}
+void LLPanelFace::onSelectShinyColor(const LLSD& data)
+{
+ LLSelectedTEMaterial::setSpecularLightColor(this, getChild<LLColorSwatchCtrl>("shinycolorswatch")->get());
+ LLSelectMgr::getInstance()->saveSelectedShinyColors();
+}
+
// static
void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
{
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index e32f039921..9823e84cd9 100755
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -143,7 +143,9 @@ protected:
void onCommitShinyColor(const LLSD& data);
void onCommitAlpha(const LLSD& data);
void onCancelColor(const LLSD& data);
+ void onCancelShinyColor(const LLSD& data);
void onSelectColor(const LLSD& data);
+ void onSelectShinyColor(const LLSD& data);
void onCloseTexturePicker(const LLSD& data);
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 375c54479d..a2e136bd5a 100755
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -421,20 +421,51 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
msg->getUUID("QueryData", "OwnerID", owner_id, 0);
msg->getUUID("TransactionData", "TransactionID", trans_id);
- S32 total_contribution = 0;
if(owner_id.isNull())
{
// special block which has total contribution
++first_block;
+ S32 committed = 0;
+ S32 billable_area = 0;
+
+ if(count == 1)
+ {
+ msg->getS32("QueryData", "BillableArea", committed, 0);
+ }
+ else
+ {
+ for(S32 i = first_block; i < count; ++i)
+ {
+ msg->getS32("QueryData", "BillableArea", billable_area, i);
+ committed+=billable_area;
+ }
+ }
+
+ S32 total_contribution;
msg->getS32("QueryData", "ActualArea", total_contribution, 0);
mPanel.getChild<LLUICtrl>("total_contributed_land_value")->setTextArg("[AREA]", llformat("%d", total_contribution));
+
+ mPanel.getChild<LLUICtrl>("total_land_in_use_value")->setTextArg("[AREA]", llformat("%d", committed));
+ S32 available = total_contribution - committed;
+ mPanel.getChild<LLUICtrl>("land_available_value")->setTextArg("[AREA]", llformat("%d", available));
+
+
+ if ( mGroupOverLimitTextp && mGroupOverLimitIconp )
+
+ {
+ mGroupOverLimitIconp->setVisible(available < 0);
+ mGroupOverLimitTextp->setVisible(available < 0);
+ }
+
}
if ( trans_id != mTransID ) return;
+
// This power was removed to make group roles simpler
//if ( !gAgent.hasPowerInGroup(mGroupID, GP_LAND_VIEW_OWNED) ) return;
if (!gAgent.isInGroup(mPanel.mGroupID)) return;
+
mGroupParcelsp->setCommentText(mEmptyParcelsText);
std::string name;
@@ -447,7 +478,6 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
std::string sim_name;
std::string land_sku;
std::string land_type;
- S32 committed = 0;
for(S32 i = first_block; i < count; ++i)
{
@@ -473,11 +503,10 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
land_type = LLTrans::getString("land_type_unknown");
}
- S32 region_x = llround(global_x) % REGION_WIDTH_UNITS;
- S32 region_y = llround(global_y) % REGION_WIDTH_UNITS;
+ S32 region_x = ll_round(global_x) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round(global_y) % REGION_WIDTH_UNITS;
std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y);
std::string area;
- committed+=billable_area;
if(billable_area == actual_area)
@@ -516,16 +545,6 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
mGroupParcelsp->addElement(row);
}
-
- mPanel.getChild<LLUICtrl>("total_land_in_use_value")->setTextArg("[AREA]", llformat("%d", committed));
-
- S32 available = total_contribution - committed;
- mPanel.getChild<LLUICtrl>("land_available_value")->setTextArg("[AREA]", llformat("%d", available));
- if ( mGroupOverLimitTextp && mGroupOverLimitIconp )
- {
- mGroupOverLimitIconp->setVisible(available < 0);
- mGroupOverLimitTextp->setVisible(available < 0);
- }
}
}
diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h
index 32a45100f4..7e4fce80e4 100755
--- a/indra/newview/llpanellandaudio.h
+++ b/indra/newview/llpanellandaudio.h
@@ -51,7 +51,6 @@ private:
LLCheckBoxCtrl* mCheckEstateDisabledVoice;
LLCheckBoxCtrl* mCheckParcelVoiceLocal;
LLLineEditor* mMusicURLEdit;
- LLCheckBoxCtrl* mMusicUrlCheck;
LLCheckBoxCtrl* mCheckAVSoundAny;
LLCheckBoxCtrl* mCheckAVSoundGroup;
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 63ddc05037..a660cb3b21 100755
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -131,9 +131,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
if (name.empty())
{
- S32 region_x = llround(agent_pos.mV[VX]);
- S32 region_y = llround(agent_pos.mV[VY]);
- S32 region_z = llround(agent_pos.mV[VZ]);
+ S32 region_x = ll_round(agent_pos.mV[VX]);
+ S32 region_y = ll_round(agent_pos.mV[VY]);
+ S32 region_z = ll_round(agent_pos.mV[VZ]);
std::string region_name;
LLViewerRegion* region = parcel_mgr->getSelectionRegion();
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 75a3584a1e..1d73d4bd6e 100755
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -1173,7 +1173,8 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold
if ("copy" == command_name)
{
- return root_folder->canCopy();
+ // we shouldn't be able to copy folders from My Inventory Panel
+ return can_be_modified && root_folder->canCopy();
}
else if ("collapse" == command_name)
{
diff --git a/indra/newview/llpanellandmedia.h b/indra/newview/llpanellandmedia.h
index 0e6292a25e..63cfa01470 100755
--- a/indra/newview/llpanellandmedia.h
+++ b/indra/newview/llpanellandmedia.h
@@ -59,12 +59,10 @@ private:
LLButton* mSetURLButton;
LLSpinCtrl* mMediaHeightCtrl;
LLSpinCtrl* mMediaWidthCtrl;
- LLTextBox* mMediaResetCtrlLabel;
LLTextBox* mMediaSizeCtrlLabel;
LLTextureCtrl* mMediaTextureCtrl;
LLCheckBoxCtrl* mMediaAutoScaleCheck;
LLCheckBoxCtrl* mMediaLoopCheck;
- LLCheckBoxCtrl* mMediaUrlCheck;
LLHandle<LLFloater> mURLEntryFloater;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index bbc3b85bf0..cc8c3edd51 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -75,9 +75,6 @@
#include "llsdserialize.h"
-const S32 BLACK_BORDER_HEIGHT = 160;
-const S32 MAX_PASSWORD = 16;
-
LLPanelLogin *LLPanelLogin::sInstance = NULL;
BOOL LLPanelLogin::sCapslockDidNotification = FALSE;
@@ -175,7 +172,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
mUsernameLength(0),
mPasswordLength(0),
mLocationLength(0),
- mFavoriteSelected(false),
mShowFavorites(false)
{
setBackgroundVisible(FALSE);
@@ -196,7 +192,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
}
else
{
- buildFromFile( "panel_login.xml");
+ buildFromFile( "panel_login.xml");
}
reshape(rect.getWidth(), rect.getHeight());
@@ -204,22 +200,18 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLLineEditor* password_edit(getChild<LLLineEditor>("password_edit"));
password_edit->setKeystrokeCallback(onPassKey, this);
// STEAM-14: When user presses Enter with this field in focus, initiate login
- password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnectLast, this));
+ password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
// change z sort of clickable text to be behind buttons
sendChildToBack(getChildView("forgot_password_text"));
LLComboBox* favorites_combo = getChild<LLComboBox>("start_location_combo");
updateLocationSelectorsVisibility(); // separate so that it can be called from preferences
+ favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
favorites_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLocationSLURL, this));
- favorites_combo->setCommitCallback(boost::bind(&LLPanelLogin::onSelectFavorite, this));
LLComboBox* server_choice_combo = getChild<LLComboBox>("server_combo");
server_choice_combo->setCommitCallback(boost::bind(&LLPanelLogin::onSelectServer, this));
-
- LLLineEditor* location_edit = sInstance->getChild<LLLineEditor>("location_edit");
- location_edit->setKeystrokeCallback(boost::bind(&LLPanelLogin::onLocationEditChanged, this, _1), NULL);
- location_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnectLocation, this));
// Load all of the grids, sorted, and then add a bar and the current grid at the top
server_choice_combo->removeall();
@@ -267,9 +259,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLPanelLogin::onUpdateStartSLURL(start_slurl); // updates grid if needed
}
- childSetAction("connect_btn", onClickConnectLast, this);
- childSetAction("connect_favorite_btn", onClickConnectFavorite, this);
- childSetAction("connect_location_btn", onClickConnectLocation, this);
+ childSetAction("connect_btn", onClickConnect, this);
LLButton* def_btn = getChild<LLButton>("connect_btn");
setDefaultBtn(def_btn);
@@ -291,45 +281,19 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
loadLoginPage();
- // Show last logged in user favorites in "Start at" combo.
- addUsersWithFavoritesToUsername();
LLComboBox* username_combo(getChild<LLComboBox>("username_combo"));
username_combo->setTextChangedCallback(boost::bind(&LLPanelLogin::addFavoritesToStartLocation, this));
// STEAM-14: When user presses Enter with this field in focus, initiate login
username_combo->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this));
}
-void LLPanelLogin::addUsersWithFavoritesToUsername()
-{
- LLComboBox* combo = getChild<LLComboBox>("username_combo");
- if (!combo) return;
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml");
- std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
- LLSD fav_llsd;
- llifstream file;
- file.open(filename);
- if (!file.is_open())
- {
- file.open(old_filename);
- if (!file.is_open()) return;
- }
- LLSDSerialize::fromXML(fav_llsd, file);
- for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
- iter != fav_llsd.endMap(); ++iter)
- {
- combo->add(iter->first);
- mUsernameLength = iter->first.length();
- updateLoginButtons();
- }
-}
-
void LLPanelLogin::addFavoritesToStartLocation()
{
// Clear the combo.
LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
if (!combo) return;
int num_items = combo->getItemCount();
- for (int i = num_items - 1; i > 0; i--)
+ for (int i = num_items - 1; i > 1; i--)
{
combo->remove(i);
}
@@ -344,10 +308,10 @@ void LLPanelLogin::addFavoritesToStartLocation()
LLSD fav_llsd;
llifstream file;
- file.open(filename);
+ file.open(filename.c_str());
if (!file.is_open())
{
- file.open(old_filename);
+ file.open(old_filename.c_str());
if (!file.is_open()) return;
}
LLSDSerialize::fromXML(fav_llsd, file);
@@ -377,6 +341,10 @@ void LLPanelLogin::addFavoritesToStartLocation()
{
mShowFavorites = true;
combo->add(label, value);
+ if ( LLStartUp::getStartSLURL().getSLURLString() == value)
+ {
+ combo->selectByValue(value);
+ }
}
}
break;
@@ -691,7 +659,6 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl)
LL_DEBUGS("AppInit")<<new_start_slurl.asString()<<LL_ENDL;
LLComboBox* location_combo = sInstance->getChild<LLComboBox>("start_location_combo");
- LLLineEditor* location_edit = sInstance->getChild<LLLineEditor>("location_edit");
/*
* Determine whether or not the new_start_slurl modifies the grid.
*
@@ -723,7 +690,10 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl)
}
if ( new_start_slurl.getLocationString().length() )
{
- location_edit->setValue(new_start_slurl.getLocationString());
+ if (location_combo->getCurrentIndex() == -1)
+ {
+ location_combo->setLabel(new_start_slurl.getLocationString());
+ }
sInstance->mLocationLength = new_start_slurl.getLocationString().length();
sInstance->updateLoginButtons();
}
@@ -862,33 +832,6 @@ void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
// Protected methods
//---------------------------------------------------------------------------
// static
-void LLPanelLogin::onClickConnectLast(void *)
-{
- std::string location = LLSLURL::SIM_LOCATION_LAST;
- LLStartUp::setStartSLURL(location);
-
- void* unused_parameter = 0;
- LLPanelLogin::sInstance->onClickConnect(unused_parameter);
-}
-
-void LLPanelLogin::onClickConnectFavorite(void *)
-{
- LLPanelLogin::sInstance->onLocationSLURL();
-
- void* unused_parameter = 0;
- LLPanelLogin::sInstance->onClickConnect(unused_parameter);
-}
-
-void LLPanelLogin::onClickConnectLocation(void *)
-{
- std::string location = sInstance->getChild<LLUICtrl>("location_edit")->getValue().asString();
- LLStartUp::setStartSLURL(location);
-
- void* unused_parameter = 0;
- LLPanelLogin::sInstance->onClickConnect(unused_parameter);
-}
-
-// static
void LLPanelLogin::onClickConnect(void *)
{
if (sInstance && sInstance->mCallback)
@@ -1036,60 +979,9 @@ void LLPanelLogin::updateServer()
void LLPanelLogin::updateLoginButtons()
{
- LLButton* last_login_btn = getChild<LLButton>("connect_btn");
- LLButton* loc_btn = getChild<LLButton>("connect_location_btn");
- LLButton* fav_btn = getChild<LLButton>("connect_favorite_btn");
-
- // no username or no password - turn all buttons off
- if ( mUsernameLength == 0 || mPasswordLength == 0 )
- {
- last_login_btn->setEnabled(false);
- loc_btn->setEnabled(false);
- fav_btn->setEnabled(false);
- };
-
- // we have a username and a password
- if ( mUsernameLength != 0 && mPasswordLength != 0 )
- {
- // last login button always enabled for this case
- last_login_btn->setEnabled(true);
-
- // double check status of favorites combo (must be items there and one must be selected to enable button)
- LLComboBox* favorites_combo = getChild<LLComboBox>("start_location_combo");
- int num_items = favorites_combo->getItemCount();
- int selected_index = favorites_combo->getCurrentIndex();
- if ( num_items > 0 && selected_index >=0 )
- mFavoriteSelected = true;
- else
- mFavoriteSelected = false;
+ LLButton* login_btn = getChild<LLButton>("connect_btn");
- // only turn on favorites login button if one is selected
- fav_btn->setEnabled( mFavoriteSelected );
-
- // only enable location login if there is content there
- if ( mLocationLength > 0 )
- loc_btn->setEnabled(true);
- else
- loc_btn->setEnabled(false);
- }
-}
-
-void LLPanelLogin::onLocationEditChanged(LLUICtrl* ctrl)
-{
- LLLineEditor* self = (LLLineEditor*)ctrl;
- if (self )
- {
- mLocationLength = self->getText().length();
- updateLoginButtons();
- }
-}
-
-void LLPanelLogin::onSelectFavorite()
-{
- // no way to unselect a favorite once it's selected (i think)
- mFavoriteSelected = true;
-
- updateLoginButtons();
+ login_btn->setEnabled(mUsernameLength != 0 && mPasswordLength != 0);
}
void LLPanelLogin::onSelectServer()
@@ -1134,7 +1026,6 @@ void LLPanelLogin::onSelectServer()
// the grid specified by the location is not this one, so clear the combo
location_combo->setCurrentByIndex(0); // last location on the new grid
location_combo->setTextEntry(LLStringUtil::null);
- mFavoriteSelected = true;
}
}
break;
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index aa63ffabfc..869f2f8d39 100755
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -90,14 +90,9 @@ private:
friend class LLPanelLoginListener;
void addFavoritesToStartLocation();
void addUsersWithFavoritesToUsername();
- void onLocationEditChanged(LLUICtrl* ctrl);
- void onSelectFavorite();
void onSelectServer();
void onLocationSLURL();
- static void onClickConnectLast(void*);
- static void onClickConnectFavorite(void*);
- static void onClickConnectLocation(void*);
static void onClickConnect(void*);
static void onClickNewAccount(void*);
static void onClickVersion(void*);
@@ -120,7 +115,7 @@ private:
static LLPanelLogin* sInstance;
static BOOL sCapslockDidNotification;
bool mFirstLoginThisInstall;
- bool mFavoriteSelected;
+
unsigned int mUsernameLength;
unsigned int mPasswordLength;
unsigned int mLocationLength;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index eb037577be..17c0b226d0 100755
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -160,10 +160,9 @@ BOOL LLPanelMainInventory::postBuild()
}
// Now load the stored settings from disk, if available.
- std::ostringstream filterSaveName;
- filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME);
- LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << LL_ENDL;
- llifstream file(filterSaveName.str());
+ std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME));
+ LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName << LL_ENDL;
+ llifstream file(filterSaveName.c_str());
LLSD savedFilterState;
if (file.is_open())
{
@@ -243,16 +242,17 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
}
}
- std::ostringstream filterSaveName;
- filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME);
- llofstream filtersFile(filterSaveName.str());
+ std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME));
+ llofstream filtersFile(filterSaveName.c_str());
if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile))
{
LL_WARNS() << "Could not write to filters save file " << filterSaveName << LL_ENDL;
}
else
+ {
filtersFile.close();
-
+ }
+
gInventory.removeObserver(this);
delete mSavedFolderState;
}
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 9123252f4c..dcd0aab3ab 100755
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -285,7 +285,8 @@ LLPanelObject::LLPanelObject()
mIsPhantom(FALSE),
mSelectedType(MI_BOX),
mSculptTextureRevert(LLUUID::null),
- mSculptTypeRevert(0)
+ mSculptTypeRevert(0),
+ mSizeChanged(FALSE)
{
}
@@ -411,9 +412,9 @@ void LLPanelObject::getState( )
LLQuaternion object_rot = objectp->getRotationEdit();
object_rot.getEulerAngles(&(mCurEulerDegrees.mV[VX]), &(mCurEulerDegrees.mV[VY]), &(mCurEulerDegrees.mV[VZ]));
mCurEulerDegrees *= RAD_TO_DEG;
- mCurEulerDegrees.mV[VX] = fmod(llround(mCurEulerDegrees.mV[VX], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
- mCurEulerDegrees.mV[VY] = fmod(llround(mCurEulerDegrees.mV[VY], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
- mCurEulerDegrees.mV[VZ] = fmod(llround(mCurEulerDegrees.mV[VZ], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+ mCurEulerDegrees.mV[VX] = fmod(ll_round(mCurEulerDegrees.mV[VX], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+ mCurEulerDegrees.mV[VY] = fmod(ll_round(mCurEulerDegrees.mV[VY], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+ mCurEulerDegrees.mV[VZ] = fmod(ll_round(mCurEulerDegrees.mV[VZ], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
if (enable_rotate)
{
@@ -1567,9 +1568,9 @@ void LLPanelObject::sendRotation(BOOL btn_down)
if (mObject.isNull()) return;
LLVector3 new_rot(mCtrlRotX->get(), mCtrlRotY->get(), mCtrlRotZ->get());
- new_rot.mV[VX] = llround(new_rot.mV[VX], OBJECT_ROTATION_PRECISION);
- new_rot.mV[VY] = llround(new_rot.mV[VY], OBJECT_ROTATION_PRECISION);
- new_rot.mV[VZ] = llround(new_rot.mV[VZ], OBJECT_ROTATION_PRECISION);
+ new_rot.mV[VX] = ll_round(new_rot.mV[VX], OBJECT_ROTATION_PRECISION);
+ new_rot.mV[VY] = ll_round(new_rot.mV[VY], OBJECT_ROTATION_PRECISION);
+ new_rot.mV[VZ] = ll_round(new_rot.mV[VZ], OBJECT_ROTATION_PRECISION);
// Note: must compare before conversion to radians
LLVector3 delta = new_rot - mCurEulerDegrees;
@@ -1620,9 +1621,10 @@ void LLPanelObject::sendScale(BOOL btn_down)
LLVector3 newscale(mCtrlScaleX->get(), mCtrlScaleY->get(), mCtrlScaleZ->get());
LLVector3 delta = newscale - mObject->getScale();
- if (delta.magVec() >= 0.0005f)
+ if (delta.magVec() >= 0.0005f || (mSizeChanged && !btn_down))
{
// scale changed by more than 1/2 millimeter
+ mSizeChanged = btn_down;
// check to see if we aren't scaling the textures
// (in which case the tex coord's need to be recomputed)
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index c4cf27ab1a..8829f493fa 100755
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -140,6 +140,7 @@ protected:
LLSpinCtrl* mCtrlScaleX;
LLSpinCtrl* mCtrlScaleY;
LLSpinCtrl* mCtrlScaleZ;
+ BOOL mSizeChanged;
LLTextBox* mLabelRotation;
LLSpinCtrl* mCtrlRotX;
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 6354b5a02b..bf15f56b44 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -654,7 +654,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
return;
}
- if(gAgent.allowOperation(PERM_OWNER, item->getPermissions(),
+ if(!gAgent.allowOperation(PERM_OWNER, item->getPermissions(),
GP_OBJECT_MANIPULATE)
&& item->getSaleInfo().isForSale())
{
@@ -689,10 +689,6 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
else if (canOpenItem())
{
items.push_back(std::string("Task Open"));
- if (!isItemCopyable())
- {
- disabled_items.push_back(std::string("Task Open"));
- }
}
items.push_back(std::string("Task Properties"));
if(isItemRenameable())
@@ -909,6 +905,7 @@ void LLTaskTextureBridge::openItem()
LLPreviewTexture* preview = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
if(preview)
{
+ preview->setAuxItem(findItem());
preview->setObjectID(mPanel->getTaskUUID());
}
}
@@ -1107,7 +1104,10 @@ void LLTaskLSLBridge::openItem()
}
if (object->permModify() || gAgent.isGodlike())
{
- LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES);
+ LLSD floater_key;
+ floater_key["taskid"] = mPanel->getTaskUUID();
+ floater_key["itemid"] = mUUID;
+ LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key, TAKE_FOCUS_YES);
if (preview)
{
preview->setObjectID(mPanel->getTaskUUID());
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 55eaf74f74..c1d7a134fa 100755
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -149,7 +149,6 @@ private:
Updater* mFriendListUpdater;
Updater* mNearbyListUpdater;
Updater* mRecentListUpdater;
- Updater* mFacebookListUpdater;
Updater* mButtonsUpdater;
LLHandle< LLFloater > mPicker;
};
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 58055d98c6..ce9231d6f2 100755
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -851,6 +851,14 @@ void LLPanelPermissions::refresh()
combo_click_action->setValue(LLSD(combo_value));
}
}
+
+ if(LLSelectMgr::getInstance()->getSelection()->isAttachment())
+ {
+ getChildView("checkbox for sale")->setEnabled(FALSE);
+ getChildView("Edit Cost")->setEnabled(FALSE);
+ getChild<LLComboBox>("sale type")->setEnabled(FALSE);
+ }
+
getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume);
}
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index 44cca21a76..8fa9aac024 100755
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -284,9 +284,9 @@ std::string LLPanelPickInfo::createLocationText(const std::string& owner_name, c
if (!pos_global.isNull())
{
- S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llround((F32)pos_global.mdV[VZ]);
+ S32 region_x = ll_round((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)pos_global.mdV[VZ]);
location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
}
return location_text;
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 4e7c5f6ed2..e62b5a4f1d 100755
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -231,15 +231,15 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
// If the region position is zero, grab position from the global
if(mPosRegion.isExactlyZero())
{
- region_x = llround(parcel_data.global_x) % REGION_WIDTH_UNITS;
- region_y = llround(parcel_data.global_y) % REGION_WIDTH_UNITS;
- region_z = llround(parcel_data.global_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);
}
else
{
- region_x = llround(mPosRegion.mV[VX]);
- region_y = llround(mPosRegion.mV[VY]);
- region_z = llround(mPosRegion.mV[VZ]);
+ region_x = ll_round(mPosRegion.mV[VX]);
+ region_y = ll_round(mPosRegion.mV[VY]);
+ region_z = ll_round(mPosRegion.mV[VZ]);
}
if (!parcel_data.name.empty())
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index ed91d277dd..e853b2d050 100755
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -551,7 +551,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
// Can't have more than region max tasks, regardless of parcel
// object bonus factor.
- S32 primitives = llmin(llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()),
+ S32 primitives = llmin(ll_round(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus()),
(S32)region->getMaxTasks());
const U8* available = (U8*)getString("available").c_str();
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 2be96b9b78..4bcd932d4b 100755
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -75,7 +75,6 @@
#include "llviewerwindow.h"
// Constants
-static const S32 LANDMARK_FOLDERS_MENU_WIDTH = 250;
static const F32 PLACE_INFO_UPDATE_INTERVAL = 3.0;
static const std::string AGENT_INFO_TYPE = "agent";
static const std::string CREATE_LANDMARK_INFO_TYPE = "create_landmark";
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 7c0e448a99..f42df221e4 100755
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -630,12 +630,12 @@ void LLPanelPrimMediaControls::updateShape()
// convert screenspace bbox to pixels (in screen coords)
LLRect window_rect = gViewerWindow->getWorldViewRectScaled();
LLCoordGL screen_min;
- screen_min.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f);
- screen_min.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f);
+ screen_min.mX = ll_round((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f);
+ screen_min.mY = ll_round((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f);
LLCoordGL screen_max;
- screen_max.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f);
- screen_max.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f);
+ screen_max.mX = ll_round((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f);
+ screen_max.mY = ll_round((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f);
// grow panel so that screenspace bounding box fits inside "media_region" element of panel
LLRect media_panel_rect;
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 56569e3207..106fb4997e 100755
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -37,6 +37,19 @@
#include "llsidetraypanelcontainer.h"
#include "llviewercontrol.h" // gSavedSettings
+const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
+
+S32 power_of_two(S32 sz, S32 upper)
+{
+ S32 res = upper;
+ while( upper >= sz)
+ {
+ res = upper;
+ upper >>= 1;
+ }
+ return res;
+}
+
// virtual
BOOL LLPanelSnapshot::postBuild()
{
@@ -164,8 +177,26 @@ void LLPanelSnapshot::cancel()
void LLPanelSnapshot::onCustomResolutionCommit()
{
LLSD info;
- info["w"] = getChild<LLUICtrl>(getWidthSpinnerName())->getValue().asInteger();
- info["h"] = getChild<LLUICtrl>(getHeightSpinnerName())->getValue().asInteger();
+ LLSpinCtrl *widthSpinner = getChild<LLSpinCtrl>(getWidthSpinnerName());
+ LLSpinCtrl *heightSpinner = getChild<LLSpinCtrl>(getHeightSpinnerName());
+ if (getName() == "panel_snapshot_inventory")
+ {
+ S32 width = widthSpinner->getValue().asInteger();
+ width = power_of_two(width, MAX_TEXTURE_SIZE);
+ info["w"] = width;
+ widthSpinner->setIncrement(width >> 1);
+ widthSpinner->forceSetValue(width);
+ S32 height = heightSpinner->getValue().asInteger();
+ height = power_of_two(height, MAX_TEXTURE_SIZE);
+ heightSpinner->setIncrement(height >> 1);
+ heightSpinner->forceSetValue(height);
+ info["h"] = height;
+ }
+ else
+ {
+ info["w"] = widthSpinner->getValue().asInteger();
+ info["h"] = heightSpinner->getValue().asInteger();
+ }
LLFloaterSnapshot::getInstance()->notify(LLSD().with("custom-res-change", info));
}
diff --git a/indra/newview/llplacesinventorybridge.h b/indra/newview/llplacesinventorybridge.h
index 07d18d03c5..108991210f 100755
--- a/indra/newview/llplacesinventorybridge.h
+++ b/indra/newview/llplacesinventorybridge.h
@@ -85,6 +85,8 @@ protected:
class LLPlacesInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder
{
public:
+ LLPlacesInventoryBridgeBuilder() {}
+
/*virtual*/ LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
LLAssetType::EType actual_asset_type,
LLInventoryType::EType inv_type,
diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp
index 649bb2fb2c..5987044bff 100755
--- a/indra/newview/llpostcard.cpp
+++ b/indra/newview/llpostcard.cpp
@@ -95,6 +95,12 @@ public:
{
}
+ /*virtual*/ void httpFailure()
+ {
+ LL_WARNS() << "Sending postcard failed, status: " << getStatus() << LL_ENDL;
+ LLPostCard::reportPostResult(false);
+ }
+
/*virtual*/ void uploadComplete(const LLSD& content)
{
LL_INFOS() << "Postcard sent" << LL_ENDL;
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 398f4e6e42..bf2652cb49 100755
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -39,6 +39,7 @@
#include "llradiogroup.h"
#include "llassetstorage.h"
#include "llviewerassettype.h"
+#include "llviewermessage.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "lldbstrings.h"
@@ -53,7 +54,7 @@
LLPreview::LLPreview(const LLSD& key)
: LLFloater(key),
- mItemUUID(key.asUUID()),
+ mItemUUID(key.has("itemid") ? key.get("itemid").asUUID() : key.asUUID()),
mObjectUUID(), // set later by setObjectID()
mCopyToInvBtn( NULL ),
mForceClose(FALSE),
@@ -369,6 +370,20 @@ void LLPreview::onBtnCopyToInv(void* userdata)
self->mNotecardInventoryID,
item);
}
+ else if (self->mObjectUUID.notNull())
+ {
+ // item is in in-world inventory
+ LLViewerObject* object = gObjectList.findObject(self->mObjectUUID);
+ LLPermissions perm(item->getPermissions());
+ if(object
+ &&(perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
+ && perm.allowTransferTo(gAgent.getID())))
+ {
+ // copy to default folder
+ set_dad_inventory_item(item, LLUUID::null);
+ object->moveInventory(LLUUID::null, item->getUUID());
+ }
+ }
else
{
LLPointer<LLInventoryCallback> cb = NULL;
@@ -453,7 +468,6 @@ LLMultiPreview::LLMultiPreview()
setTitle(LLTrans::getString("MultiPreviewTitle"));
buildTabContainer();
setCanResize(TRUE);
- mAutoResize = FALSE;
}
void LLMultiPreview::onOpen(const LLSD& key)
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 337a63e627..1308d1e9a7 100755
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -215,9 +215,12 @@ void LLPreviewNotecard::loadAsset()
if(item)
{
- if (gAgent.allowOperation(PERM_COPY, item->getPermissions(),
- GP_OBJECT_MANIPULATE)
- || gAgent.isGodlike())
+ LLPermissions perm(item->getPermissions());
+ BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE);
+ BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
+ BOOL allow_modify = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE);
+
+ if (allow_copy || gAgent.isGodlike())
{
mAssetID = item->getAssetUUID();
if(mAssetID.isNull())
@@ -271,12 +274,17 @@ void LLPreviewNotecard::loadAsset()
editor->setEnabled(FALSE);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
- if(!gAgent.allowOperation(PERM_MODIFY, item->getPermissions(),
- GP_OBJECT_MANIPULATE))
+
+ if(!allow_modify)
{
editor->setEnabled(FALSE);
getChildView("lock")->setVisible( TRUE);
}
+
+ if(allow_modify || is_owner)
+ {
+ getChildView("Delete")->setEnabled(TRUE);
+ }
}
else
{
@@ -492,14 +500,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
void LLPreviewNotecard::deleteNotecard()
{
- LLViewerInventoryItem* item = gInventory.getItem(mItemUUID);
- if (item != NULL)
- {
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- gInventory.changeItemParent(item, trash_id, FALSE);
- }
-
- closeFloater();
+ LLNotificationsUtil::add("DeleteNotecard", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleConfirmDeleteDialog,this, _1, _2));
}
// static
@@ -605,4 +606,43 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const
return false;
}
+bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0)
+ {
+ // canceled
+ return false;
+ }
+
+ if (mObjectUUID.isNull())
+ {
+ // move item from agent's inventory into trash
+ LLViewerInventoryItem* item = gInventory.getItem(mItemUUID);
+ if (item != NULL)
+ {
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ gInventory.changeItemParent(item, trash_id, FALSE);
+ }
+ }
+ else
+ {
+ // delete item from inventory of in-world object
+ LLViewerObject* object = gObjectList.findObject(mObjectUUID);
+ if(object)
+ {
+ LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(object->getInventoryObject(mItemUUID));
+ if (item != NULL)
+ {
+ object->removeInventory(mItemUUID);
+ }
+ }
+ }
+
+ // close floater, ignore unsaved changes
+ mForceClose = TRUE;
+ closeFloater();
+ return false;
+}
+
// EOF
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index b53c0da6be..1cf08dedd6 100755
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -93,6 +93,7 @@ protected:
S32 status, LLExtStat ext_status);
bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response);
+ bool handleConfirmDeleteDialog(const LLSD& notification, const LLSD& response);
protected:
LLViewerTextEditor* mEditor;
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index a41986373e..7feb20332b 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -106,9 +106,6 @@ const std::string DEFAULT_SCRIPT_NAME = "New Script"; // *TODO:Translate?
const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate?
// Description and header information
-
-const S32 MAX_EXPORT_SIZE = 1000;
-
const S32 MAX_HISTORY_COUNT = 10;
const F32 LIVE_HELP_REFRESH_TIME = 1.f;
@@ -1840,7 +1837,8 @@ void LLLiveLSLEditor::loadAsset()
else if(item && mItem.notNull())
{
// request the text from the object
- LLUUID* user_data = new LLUUID(mItemUUID); // ^ mObjectUUID
+ LLSD* user_data = new LLSD();
+ user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID);
gAssetStorage->getInvItemAsset(object->getRegion()->getHost(),
gAgent.getID(),
gAgent.getSessionID(),
@@ -1917,9 +1915,9 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
{
LL_DEBUGS() << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
<< LL_ENDL;
- LLUUID* xored_id = (LLUUID*)user_data;
+ LLSD* floater_key = (LLSD*)user_data;
- LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *xored_id);
+ LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *floater_key);
if(instance )
{
@@ -1948,7 +1946,7 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
}
}
- delete xored_id;
+ delete floater_key;
}
void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type)
@@ -2307,7 +2305,10 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
}
else
{
- LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID
+ LLSD floater_key;
+ floater_key["taskid"] = data->mSaveObjectID;
+ floater_key["itemid"] = data->mItem->getUUID();
+ LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if (self)
{
self->getWindow()->decBusyCount();
@@ -2332,7 +2333,10 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
if(0 ==status)
{
LL_INFOS() << "LSL Bytecode saved" << LL_ENDL;
- LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID
+ LLSD floater_key;
+ floater_key["taskid"] = data->mSaveObjectID;
+ floater_key["itemid"] = data->mItem->getUUID();
+ LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if (self)
{
// Tell the user that the compile worked.
@@ -2410,7 +2414,10 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_Script, _PREHASH_ObjectID, object_id);
msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id);
- LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", item_id); // ^ object_id
+ LLSD floater_key;
+ floater_key["taskid"] = object_id;
+ floater_key["itemid"] = item_id;
+ LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if(instance)
{
instance->mHaveRunningInfo = TRUE;
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 5c41c5ad97..f91a18d8d3 100755
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -65,6 +65,7 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key)
mShowKeepDiscard(FALSE),
mCopyToInv(FALSE),
mIsCopyable(FALSE),
+ mIsFullPerm(FALSE),
mUpdateDimensions(TRUE),
mLastHeight(0),
mLastWidth(0),
@@ -182,12 +183,6 @@ void LLPreviewTexture::draw()
if ( mImage.notNull() )
{
- // Automatically bring up SaveAs dialog if we opened this to save the texture.
- if (mPreviewToSave)
- {
- mPreviewToSave = FALSE;
- saveAs();
- }
// Draw the texture
gGL.diffuseColor3f( 1.f, 1.f, 1.f );
gl_draw_scaled_image(interior.mLeft,
@@ -269,7 +264,7 @@ void LLPreviewTexture::draw()
// virtual
BOOL LLPreviewTexture::canSaveAs() const
{
- return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
+ return mIsFullPerm && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
}
@@ -286,6 +281,12 @@ void LLPreviewTexture::saveAs()
// User canceled or we failed to acquire save file.
return;
}
+ if(mPreviewToSave)
+ {
+ mPreviewToSave = FALSE;
+ LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", item->getUUID());
+ }
+
// remember the user-approved/edited file name.
mSaveFileName = file_picker.getFirstFile();
mLoadingFullImage = TRUE;
@@ -516,6 +517,11 @@ void LLPreviewTexture::loadAsset()
mUpdateDimensions = TRUE;
updateDimensions();
getChildView("save_tex_btn")->setEnabled(canSaveAs());
+ if (mObjectUUID.notNull())
+ {
+ // check that we can copy inworld items into inventory
+ getChildView("Keep")->setEnabled(mIsCopyable);
+ }
}
LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus()
@@ -580,7 +586,9 @@ void LLPreviewTexture::updateImageID()
mShowKeepDiscard = TRUE;
mCopyToInv = FALSE;
- mIsCopyable = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED);
+ LLPermissions perm(item->getPermissions());
+ mIsCopyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID());
+ mIsFullPerm = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED);
}
else // not an item, assume it's an asset id
{
@@ -588,6 +596,7 @@ void LLPreviewTexture::updateImageID()
mShowKeepDiscard = FALSE;
mCopyToInv = TRUE;
mIsCopyable = TRUE;
+ mIsFullPerm = TRUE;
}
}
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index 97e74706cc..b104a91c75 100755
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -90,6 +90,7 @@ private:
// This is stored off in a member variable, because the save-as
// button and drag and drop functionality need to know.
BOOL mIsCopyable;
+ BOOL mIsFullPerm;
BOOL mUpdateDimensions;
S32 mLastHeight;
S32 mLastWidth;
diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp
index 81920562a7..cd3a4dfd11 100644
--- a/indra/newview/llscripteditor.cpp
+++ b/indra/newview/llscripteditor.cpp
@@ -32,7 +32,6 @@
#include "lllocalcliprect.h"
const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32;
-const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4;
static LLDefaultChildRegistry::Register<LLScriptEditor> r("script_editor");
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 590a1c2647..1d021ec28f 100755
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -378,6 +378,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
{
// Pass the new_message icon state further.
set_new_message = chicletp->getShowNewMessagesIcon();
+ chicletp->hidePopupMenu();
}
}
diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp
index 7b4bf63740..0ea05a03d6 100755
--- a/indra/newview/llsearchhistory.cpp
+++ b/indra/newview/llsearchhistory.cpp
@@ -43,7 +43,7 @@ bool LLSearchHistory::load()
{
// build filename for each user
std::string resolved_filename = getHistoryFilePath();
- llifstream file(resolved_filename);
+ llifstream file(resolved_filename.c_str());
if (!file.is_open())
{
return false;
@@ -76,7 +76,7 @@ bool LLSearchHistory::save()
// build filename for each user
std::string resolved_filename = getHistoryFilePath();
// open a file for writing
- llofstream file (resolved_filename);
+ llofstream file(resolved_filename.c_str());
if (!file.is_open())
{
return false;
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index fc9d9f0842..40516f9bbb 100755
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -640,7 +640,7 @@ LLBasicCertificateStore::~LLBasicCertificateStore()
// persist the store
void LLBasicCertificateStore::save()
{
- llofstream file_store(mFilename, llofstream::binary);
+ llofstream file_store(mFilename.c_str(), std::ios_base::binary);
if(!file_store.fail())
{
for(iterator cert = begin();
@@ -1331,7 +1331,7 @@ void LLSecAPIBasicHandler::_writeProtectedData()
std::string tmp_filename = mProtectedDataFilename + ".tmp";
llofstream protected_data_stream(tmp_filename.c_str(),
- llofstream::binary);
+ std::ios_base::binary);
try
{
@@ -1364,6 +1364,7 @@ void LLSecAPIBasicHandler::_writeProtectedData()
}
catch (...)
{
+ LL_WARNS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL;
// it's good practice to clean up any secure information on error
// (even though this file isn't really secure. Perhaps in the future
// it may be, however.
@@ -1372,20 +1373,35 @@ void LLSecAPIBasicHandler::_writeProtectedData()
// EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
// Decided throwing an exception here was overkill until we figure out why this happens
//throw LLProtectedDataException("Error writing Protected Data Store");
- LL_INFOS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL;
}
- // move the temporary file to the specified file location.
- if((((LLFile::isfile(mProtectedDataFilename) != 0) &&
- (LLFile::remove(mProtectedDataFilename) != 0))) ||
- (LLFile::rename(tmp_filename, mProtectedDataFilename)))
+ try
+ {
+ // move the temporary file to the specified file location.
+ if((( (LLFile::isfile(mProtectedDataFilename) != 0)
+ && (LLFile::remove(mProtectedDataFilename) != 0)))
+ || (LLFile::rename(tmp_filename, mProtectedDataFilename)))
+ {
+ LL_WARNS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL;
+ LLFile::remove(tmp_filename);
+
+ // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
+ // Decided throwing an exception here was overkill until we figure out why this happens
+ //throw LLProtectedDataException("Could not overwrite protected data store");
+ }
+ }
+ catch (...)
{
+ LL_WARNS() << "LLProtectedDataException(Error renaming '" << tmp_filename
+ << "' to '" << mProtectedDataFilename << "')" << LL_ENDL;
+ // it's good practice to clean up any secure information on error
+ // (even though this file isn't really secure. Perhaps in the future
+ // it may be, however.
LLFile::remove(tmp_filename);
- // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
+ //crash in LLSecAPIBasicHandler::_writeProtectedData()
// Decided throwing an exception here was overkill until we figure out why this happens
- //throw LLProtectedDataException("Could not overwrite protected data store");
- LL_INFOS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL;
+ //throw LLProtectedDataException("Error writing Protected Data Store");
}
}
@@ -1552,7 +1568,7 @@ std::string LLSecAPIBasicHandler::_legacyLoadPassword()
{
const S32 HASHED_LENGTH = 32;
std::vector<U8> buffer(HASHED_LENGTH);
- llifstream password_file(mLegacyPasswordPath, llifstream::binary);
+ llifstream password_file(mLegacyPasswordPath.c_str(), llifstream::binary);
if(password_file.fail())
{
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index eb3a4c37d9..fdc95c7784 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -99,14 +99,11 @@ LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
// Consts
//
-const S32 NUM_SELECTION_UNDO_ENTRIES = 200;
const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f;
-const S32 MAX_ACTION_QUEUE_SIZE = 20;
const S32 MAX_SILS_PER_FRAME = 50;
const S32 MAX_OBJECTS_PER_PACKET = 254;
// For linked sets
const S32 MAX_CHILDREN_PER_TASK = 255;
-const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32;
//
// Globals
@@ -368,7 +365,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
//-----------------------------------------------------------------------------
// Select the object, parents and children.
//-----------------------------------------------------------------------------
-LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end)
+LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end, BOOL ignore_select_owned)
{
llassert( obj );
@@ -385,7 +382,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
return NULL;
}
- if (!canSelectObject(obj))
+ if (!canSelectObject(obj,ignore_select_owned))
{
//make_ui_sound("UISndInvalidOp");
return NULL;
@@ -1766,6 +1763,40 @@ void LLSelectMgr::selectionRevertColors()
getSelection()->applyToObjects(&sendfunc);
}
+void LLSelectMgr::selectionRevertShinyColors()
+{
+ struct f : public LLSelectedTEFunctor
+ {
+ LLObjectSelectionHandle mSelectedObjects;
+ f(LLObjectSelectionHandle sel) : mSelectedObjects(sel) {}
+ bool apply(LLViewerObject* object, S32 te)
+ {
+ if (object->permModify())
+ {
+ LLSelectNode* nodep = mSelectedObjects->findNode(object);
+ if (nodep && te < (S32)nodep->mSavedShinyColors.size())
+ {
+ LLColor4 color = nodep->mSavedShinyColors[te];
+ // update viewer side color in anticipation of update from simulator
+ LLMaterialPtr old_mat = object->getTE(te)->getMaterialParams();
+ if (!old_mat.isNull())
+ {
+ LLMaterialPtr new_mat = gFloaterTools->getPanelFace()->createDefaultMaterial(old_mat);
+ new_mat->setSpecularLightColor(color);
+ object->getTE(te)->setMaterialParams(new_mat);
+ LLMaterialMgr::getInstance()->put(object->getID(), te, *new_mat);
+ }
+ }
+ }
+ return true;
+ }
+ } setfunc(mSelectedObjects);
+ getSelection()->applyToTEs(&setfunc);
+
+ LLSelectMgrSendFunctor sendfunc;
+ getSelection()->applyToObjects(&sendfunc);
+}
+
BOOL LLSelectMgr::selectionRevertTextures()
{
struct f : public LLSelectedTEFunctor
@@ -1941,7 +1972,7 @@ void LLSelectMgr::selectionSetMedia(U8 media_type, const LLSD &media_data)
llassert(mMediaData.isMap());
const LLTextureEntry *texture_entry = object->getTE(te);
if (!mMediaData.isMap() ||
- (NULL != texture_entry) && !texture_entry->hasMedia() && !mMediaData.has(LLMediaEntry::HOME_URL_KEY))
+ ((NULL != texture_entry) && !texture_entry->hasMedia() && !mMediaData.has(LLMediaEntry::HOME_URL_KEY)))
{
// skip adding/updating media
}
@@ -4501,6 +4532,19 @@ void LLSelectMgr::saveSelectedObjectColors()
getSelection()->applyToNodes(&func);
}
+void LLSelectMgr::saveSelectedShinyColors()
+{
+ struct f : public LLSelectedNodeFunctor
+ {
+ virtual bool apply(LLSelectNode* node)
+ {
+ node->saveShinyColors();
+ return true;
+ }
+ } func;
+ getSelection()->applyToNodes(&func);
+}
+
void LLSelectMgr::saveSelectedObjectTextures()
{
// invalidate current selection so we update saved textures
@@ -4596,11 +4640,18 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor
BOOL mState;
virtual bool apply(LLViewerObject* object)
{
- if ( object->permModify() && // preemptive permissions check
- object->isRoot()) // don't send for child objects
+ if ( object->permModify())
{
- object->setFlags( mFlags, mState);
- }
+ if (object->isRoot()) // don't send for child objects
+ {
+ object->setFlags( mFlags, mState);
+ }
+ else if (FLAGS_WORLD & mFlags && ((LLViewerObject*)object->getRoot())->isSelected())
+ {
+ // FLAGS_WORLD are shared by all items in linkset
+ object->setFlagsWithoutUpdate(FLAGS_WORLD & mFlags, mState);
+ }
+ };
return true;
}
};
@@ -5752,6 +5803,7 @@ LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow)
mCreationDate(0)
{
saveColors();
+ saveShinyColors();
}
LLSelectNode::LLSelectNode(const LLSelectNode& nodep)
@@ -5797,6 +5849,11 @@ LLSelectNode::LLSelectNode(const LLSelectNode& nodep)
{
mSavedColors.push_back(*color_iter);
}
+ mSavedShinyColors.clear();
+ for (color_iter = nodep.mSavedShinyColors.begin(); color_iter != nodep.mSavedShinyColors.end(); ++color_iter)
+ {
+ mSavedShinyColors.push_back(*color_iter);
+ }
saveTextures(nodep.mSavedTextures);
}
@@ -5880,6 +5937,26 @@ void LLSelectNode::saveColors()
}
}
+void LLSelectNode::saveShinyColors()
+{
+ if (mObject.notNull())
+ {
+ mSavedShinyColors.clear();
+ for (S32 i = 0; i < mObject->getNumTEs(); i++)
+ {
+ const LLMaterialPtr mat = mObject->getTE(i)->getMaterialParams();
+ if (!mat.isNull())
+ {
+ mSavedShinyColors.push_back(mat->getSpecularLightColor());
+ }
+ else
+ {
+ mSavedShinyColors.push_back(LLColor4::white);
+ }
+ }
+ }
+}
+
void LLSelectNode::saveTextures(const uuid_vec_t& textures)
{
if (mObject.notNull())
@@ -6698,29 +6775,32 @@ void LLSelectMgr::validateSelection()
getSelection()->applyToObjects(&func);
}
-BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
+BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_owned)
{
// Never select dead objects
if (!object || object->isDead())
{
return FALSE;
}
-
+
if (mForceSelection)
{
return TRUE;
}
- if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
- (gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced())))
+ if(!ignore_select_owned)
{
- // only select my own objects
- return FALSE;
+ if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
+ (gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced())))
+ {
+ // only select my own objects
+ return FALSE;
+ }
}
// Can't select orphans
if (object->isOrphaned()) return FALSE;
-
+
// Can't select avatars
if (object->isAvatar()) return FALSE;
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index a68328167a..23c41e4cc1 100755
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -179,6 +179,7 @@ public:
void setObject(LLViewerObject* object);
// *NOTE: invalidate stored textures and colors when # faces change
void saveColors();
+ void saveShinyColors();
void saveTextures(const uuid_vec_t& textures);
void saveTextureScaleRatios(LLRender::eTexIndex index_to_query);
@@ -215,6 +216,7 @@ public:
std::string mSitName;
U64 mCreationDate;
std::vector<LLColor4> mSavedColors;
+ std::vector<LLColor4> mSavedShinyColors;
uuid_vec_t mSavedTextures;
std::vector<LLVector3> mTextureScaleRatios;
std::vector<LLVector3> mSilhouetteVertices; // array of vertices to render silhouette of object
@@ -452,7 +454,7 @@ public:
//
// *NOTE: You must hold on to the object selection handle, otherwise
// the objects will be automatically deselected in 1 frame.
- LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE);
+ LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE, BOOL ignore_select_owned = FALSE);
// For when you want just a child object.
LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES);
@@ -545,6 +547,7 @@ public:
////////////////////////////////////////////////////////////////
void saveSelectedObjectTransform(EActionType action_type);
void saveSelectedObjectColors();
+ void saveSelectedShinyColors();
void saveSelectedObjectTextures();
// Sets which texture channel to query for scale and rot of display
@@ -573,6 +576,7 @@ public:
void selectionSetColorOnly(const LLColor4 &color); // Set only the RGB channels
void selectionSetAlphaOnly(const F32 alpha); // Set only the alpha channel
void selectionRevertColors();
+ void selectionRevertShinyColors();
BOOL selectionRevertTextures();
void selectionSetBumpmap( U8 bumpmap );
void selectionSetTexGen( U8 texgen );
@@ -605,7 +609,7 @@ public:
void validateSelection();
// returns TRUE if it is possible to select this object
- BOOL canSelectObject(LLViewerObject* object);
+ BOOL canSelectObject(LLViewerObject* object, BOOL ignore_select_owned = FALSE);
// Returns TRUE if the viewer has information on all selected objects
BOOL selectGetAllRootsValid();
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index cde05a8d9b..440fce07bb 100755
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -90,9 +90,6 @@ private:
LLTextBox* mCurrentLookName;
LLTextBox* mOutfitStatus;
- // Used to make sure the user's inventory is in memory.
- LLCurrentlyWornFetchObserver* mFetchWorn;
-
// Search string for filtering landmarks and teleport
// history locations
std::string mFilterSubString;
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 4970eec636..0e23e2ad10 100755
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -70,10 +70,7 @@ static LLPanelInjector<LLSidepanelInventory> t_inventory("sidepanel_inventory");
static const char * const INBOX_BUTTON_NAME = "inbox_btn";
static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel";
-static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel";
-
static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack";
-
static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox";
//
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 1d20b7bed5..126f1fb9de 100755
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -32,6 +32,7 @@
#include "llagent.h"
#include "llavataractions.h"
#include "llbutton.h"
+#include "llcombobox.h"
#include "llfloaterreg.h"
#include "llgroupactions.h"
#include "llinventorydefines.h"
@@ -173,6 +174,8 @@ BOOL LLSidepanelItemInfo::postBuild()
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this));
// Mark for sale or not, and sale info
getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
+ // Change sale type, and sale info
+ getChild<LLUICtrl>("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
// "Price" label for edit
getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this));
refresh();
@@ -435,7 +438,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
"CheckNextOwnerTransfer",
"CheckPurchase",
"SaleLabel",
- "combobox sale copy",
+ "ComboBoxSaleType",
"Edit Cost",
"TextPrice"
};
@@ -617,6 +620,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
const LLSaleInfo& sale_info = item->getSaleInfo();
BOOL is_for_sale = sale_info.isForSale();
+ LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+ LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
+
// Check for ability to change values.
if (is_obj_modify && can_agent_sell
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
@@ -630,7 +636,8 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
getChildView("TextPrice")->setEnabled(is_complete && is_for_sale);
- getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale);
+ combo_sale_type->setEnabled(is_complete && is_for_sale);
+ edit_cost->setEnabled(is_complete && is_for_sale);
}
else
{
@@ -643,13 +650,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
getChildView("TextPrice")->setEnabled(FALSE);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ combo_sale_type->setEnabled(FALSE);
+ edit_cost->setEnabled(FALSE);
}
// Set values.
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
- getChildView("combobox sale copy")->setEnabled(is_for_sale);
- getChildView("Edit Cost")->setEnabled(is_for_sale);
getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
@@ -658,11 +664,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
{
S32 numerical_price;
numerical_price = sale_info.getSalePrice();
- getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price));
+ edit_cost->setValue(llformat("%d",numerical_price));
+ combo_sale_type->setValue(sale_info.getSaleType());
}
else
{
- getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",0));
+ edit_cost->setValue(llformat("%d",0));
+ combo_sale_type->setValue(LLSaleInfo::FS_COPY);
}
}
@@ -918,24 +926,10 @@ void LLSidepanelItemInfo::updateSaleInfo()
// turn on sale info
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
- LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("RadioSaleType");
- if(RadioSaleType)
+ LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
+ if (combo_sale_type)
{
- switch (RadioSaleType->getSelectedIndex())
- {
- case 0:
- sale_type = LLSaleInfo::FS_ORIGINAL;
- break;
- case 1:
- sale_type = LLSaleInfo::FS_COPY;
- break;
- case 2:
- sale_type = LLSaleInfo::FS_CONTENTS;
- break;
- default:
- sale_type = LLSaleInfo::FS_COPY;
- break;
- }
+ sale_type = static_cast<LLSaleInfo::EForSale>(combo_sale_type->getValue().asInteger());
}
if (sale_type == LLSaleInfo::FS_COPY
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 636654ad23..17ecfab4fb 100755
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -499,17 +499,19 @@ void LLSidepanelTaskInfo::refresh()
// You own these objects.
else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE)))
{
+ LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
+
// If there are multiple items for sale then set text to PRICE PER UNIT.
if (num_for_sale > 1)
{
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Per Unit"));
+ std::string label_text = is_sale_price_mixed? "Cost Mixed" :"Cost Per Unit";
+ edit_price->setLabel(getString(label_text));
}
else
{
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
+ edit_price->setLabel(getString("Cost Default"));
}
- LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
if (!edit_price->hasFocus())
{
// If the sale price is mixed then set the cost to MIXED, otherwise
@@ -547,16 +549,15 @@ void LLSidepanelTaskInfo::refresh()
// If multiple items are for sale, set text to TOTAL PRICE.
if (num_for_sale > 1)
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Total"));
+ getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Total"));
else
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
+ getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default"));
}
// This is a public object.
else
{
getChildView("Cost")->setEnabled(FALSE);
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
-
+ getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default"));
getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
getChildView("Edit Cost")->setEnabled(FALSE);
}
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index 3a82233320..728fc69723 100755
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -323,9 +323,9 @@ LLSLURL::LLSLURL(const std::string& grid,
{
mGrid = grid;
mRegion = region;
- S32 x = llround( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
- S32 y = llround( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
- S32 z = llround( (F32)position[VZ] );
+ S32 x = ll_round( (F32)fmod( position[VX], (F32)REGION_WIDTH_METERS ) );
+ S32 y = ll_round( (F32)fmod( position[VY], (F32)REGION_WIDTH_METERS ) );
+ S32 z = ll_round( (F32)position[VZ] );
mType = LOCATION;
mPosition = LLVector3(x, y, z);
}
@@ -379,9 +379,9 @@ std::string LLSLURL::getSLURLString() const
case LOCATION:
{
// lookup the grid
- S32 x = llround( (F32)mPosition[VX] );
- S32 y = llround( (F32)mPosition[VY] );
- S32 z = llround( (F32)mPosition[VZ] );
+ S32 x = ll_round( (F32)mPosition[VX] );
+ S32 y = ll_round( (F32)mPosition[VY] );
+ S32 z = ll_round( (F32)mPosition[VZ] );
return LLGridManager::getInstance()->getSLURLBase(mGrid) +
LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z);
}
@@ -416,9 +416,9 @@ std::string LLSLURL::getLoginString() const
case LOCATION:
unescaped_start << "uri:"
<< mRegion << "&"
- << llround(mPosition[0]) << "&"
- << llround(mPosition[1]) << "&"
- << llround(mPosition[2]);
+ << ll_round(mPosition[0]) << "&"
+ << ll_round(mPosition[1]) << "&"
+ << ll_round(mPosition[2]);
break;
case HOME_LOCATION:
unescaped_start << "home";
@@ -462,9 +462,9 @@ std::string LLSLURL::getLocationString() const
{
return llformat("%s/%d/%d/%d",
mRegion.c_str(),
- (int)llround(mPosition[0]),
- (int)llround(mPosition[1]),
- (int)llround(mPosition[2]));
+ (int)ll_round(mPosition[0]),
+ (int)ll_round(mPosition[1]),
+ (int)ll_round(mPosition[2]));
}
// static
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 600ebf5914..0ae8a338e0 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -116,6 +116,8 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param
mThumbnailUpdateLock = FALSE ;
mThumbnailUpToDate = FALSE ;
mBigThumbnailUpToDate = FALSE ;
+
+ mForceUpdateSnapshot = FALSE;
}
LLSnapshotLivePreview::~LLSnapshotLivePreview()
@@ -177,14 +179,14 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
if (image_aspect_ratio > window_aspect_ratio)
{
// trim off top and bottom
- S32 new_height = llround((F32)getRect().getWidth() / image_aspect_ratio);
+ S32 new_height = ll_round((F32)getRect().getWidth() / image_aspect_ratio);
rect.mBottom += (getRect().getHeight() - new_height) / 2;
rect.mTop -= (getRect().getHeight() - new_height) / 2;
}
else if (image_aspect_ratio < window_aspect_ratio)
{
// trim off left and right
- S32 new_width = llround((F32)getRect().getHeight() * image_aspect_ratio);
+ S32 new_width = ll_round((F32)getRect().getHeight() * image_aspect_ratio);
rect.mLeft += (getRect().getWidth() - new_width) / 2;
rect.mRight -= (getRect().getWidth() - new_width) / 2;
}
@@ -345,9 +347,9 @@ void LLSnapshotLivePreview::draw()
LLLocalClipRect clip(getLocalRect());
{
// draw diagonal stripe with gradient that passes over screen
- S32 x1 = gViewerWindow->getWindowWidthScaled() * llround((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f)));
- S32 x2 = x1 + llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
- S32 x3 = x2 + llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
+ S32 x1 = gViewerWindow->getWindowWidthScaled() * ll_round((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f)));
+ S32 x2 = x1 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
+ S32 x3 = x2 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
S32 y1 = 0;
S32 y2 = gViewerWindow->getWindowHeightScaled();
@@ -429,7 +431,7 @@ void LLSnapshotLivePreview::draw()
gGL.pushMatrix();
{
LLRect& rect = mImageRect[old_image_index];
- gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - llround(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f);
+ gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - ll_round(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f);
gGL.rotatef(-45.f * fall_interp, 0.f, 0.f, 1.f);
gGL.begin(LLRender::QUADS);
{
@@ -483,13 +485,13 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
{
// image too wide, shrink to width
mThumbnailWidth = max_width;
- mThumbnailHeight = llround((F32)max_width / aspect_ratio);
+ mThumbnailHeight = ll_round((F32)max_width / aspect_ratio);
}
else
{
// image too tall, shrink to height
mThumbnailHeight = max_height;
- mThumbnailWidth = llround((F32)max_height * aspect_ratio);
+ mThumbnailWidth = ll_round((F32)max_height * aspect_ratio);
}
if (mThumbnailWidth > width || mThumbnailHeight > height)
@@ -671,18 +673,19 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
// If we're in freeze-frame mode and camera has moved, update snapshot.
LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
- if (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview &&
- (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))
+ if (previewp->mForceUpdateSnapshot || (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview &&
+ (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)))
{
previewp->mCameraPos = new_camera_pos;
previewp->mCameraRot = new_camera_rot;
// request a new snapshot whenever the camera moves, with a time delay
- BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
+ BOOL new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot;
LL_DEBUGS() << "camera moved, updating thumbnail" << LL_ENDL;
previewp->updateSnapshot(
- autosnap, // whether a new snapshot is needed or merely invalidate the existing one
+ new_snapshot, // whether a new snapshot is needed or merely invalidate the existing one
FALSE, // or if 1st arg is false, whether to produce a new thumbnail image.
- autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true.
+ new_snapshot ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true.
+ previewp->mForceUpdateSnapshot = FALSE;
}
// see if it's time yet to snap the shot and bomb out otherwise.
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h
index e1937187a3..fed33bf37c 100644
--- a/indra/newview/llsnapshotlivepreview.h
+++ b/indra/newview/llsnapshotlivepreview.h
@@ -182,6 +182,7 @@ private:
public:
static std::set<LLSnapshotLivePreview*> sList;
BOOL mKeepAspectRatio ;
+ BOOL mForceUpdateSnapshot;
};
#endif // LL_LLSNAPSHOTLIVEPREVIEW_H
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index e80756e4de..7867e1573c 100755
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -611,11 +611,14 @@ void LLSpeakerMgr::updateSpeakerList()
setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
}
-void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp)
+void LLSpeakerMgr::setSpeakerNotInChannel(LLPointer<LLSpeaker> speakerp)
{
- speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL;
- speakerp->mDotColor = INACTIVE_COLOR;
- mSpeakerDelayRemover->setActionTimer(speakerp->mID);
+ if (speakerp.notNull())
+ {
+ speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL;
+ speakerp->mDotColor = INACTIVE_COLOR;
+ mSpeakerDelayRemover->setActionTimer(speakerp->mID);
+ }
}
bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
@@ -795,7 +798,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
if (agent_data.isMap() && agent_data.has("transition"))
{
- if (agent_data["transition"].asString() == "LEAVE" && speakerp.notNull())
+ if (agent_data["transition"].asString() == "LEAVE")
{
setSpeakerNotInChannel(speakerp);
}
@@ -806,7 +809,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
}
else
{
- LL_WARNS() << "bad membership list update " << ll_print_sd(agent_data["transition"]) << LL_ENDL;
+ LL_WARNS() << "bad membership list update from 'agent_updates' for agent " << agent_id << ", transition " << ll_print_sd(agent_data["transition"]) << LL_ENDL;
}
}
@@ -848,7 +851,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
LLPointer<LLSpeaker> speakerp = findSpeaker(agent_id);
std::string agent_transition = update_it->second.asString();
- if (agent_transition == "LEAVE" && speakerp.notNull())
+ if (agent_transition == "LEAVE")
{
setSpeakerNotInChannel(speakerp);
}
@@ -859,8 +862,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
}
else
{
- LL_WARNS() << "bad membership list update "
- << agent_transition << LL_ENDL;
+ LL_WARNS() << "bad membership list update from 'updates' for agent " << agent_id << ", transition " << agent_transition << LL_ENDL;
}
}
}
@@ -1041,8 +1043,8 @@ void LLLocalSpeakerMgr::updateSpeakerList()
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
{
LLUUID speaker_id = speaker_it->first;
- LLSpeaker* speakerp = speaker_it->second;
- if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
+ LLPointer<LLSpeaker> speakerp = speaker_it->second;
+ if (speakerp.notNull() && speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
{
LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id);
if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS)
diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h
index e953dd0e1a..0e69184125 100755
--- a/indra/newview/llspeakers.h
+++ b/indra/newview/llspeakers.h
@@ -258,7 +258,7 @@ public:
protected:
virtual void updateSpeakerList();
- void setSpeakerNotInChannel(LLSpeaker* speackerp);
+ void setSpeakerNotInChannel(LLPointer<LLSpeaker> speackerp);
bool removeSpeaker(const LLUUID& speaker_id);
typedef std::map<LLUUID, LLPointer<LLSpeaker> > speaker_map_t;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 9da7717b74..42fc300187 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1352,11 +1352,11 @@ bool idle_startup()
{
LLStringUtil::format_map_t args;
args["[NUMBER]"] = llformat("%d", num_retries + 1);
- set_startup_status(0.4f, LLTrans::getString("LoginRetrySeedCapGrant", args), gAgent.mMOTD);
+ set_startup_status(0.4f, LLTrans::getString("LoginRetrySeedCapGrant", args), gAgent.mMOTD.c_str());
}
else
{
- set_startup_status(0.4f, LLTrans::getString("LoginRequestSeedCapGrant"), gAgent.mMOTD);
+ set_startup_status(0.4f, LLTrans::getString("LoginRequestSeedCapGrant"), gAgent.mMOTD.c_str());
}
}
display_startup();
@@ -2070,7 +2070,7 @@ bool idle_startup()
update_texture_fetch();
set_startup_status(0.60f + 0.30f * timeout_frac,
LLTrans::getString("LoginPrecaching"),
- gAgent.mMOTD);
+ gAgent.mMOTD.c_str());
display_startup();
}
@@ -2210,6 +2210,8 @@ bool idle_startup()
llassert(LLPathfindingManager::getInstance() != NULL);
LLPathfindingManager::getInstance()->initSystem();
+ gAgentAvatarp->sendHoverHeight();
+
return TRUE;
}
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index eedb829b48..2d4b23d892 100755
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -94,16 +94,11 @@ extern S32 MENU_BAR_HEIGHT;
// TODO: these values ought to be in the XML too
-const S32 MENU_PARCEL_SPACING = 1; // Distance from right of menu item to parcel information
const S32 SIM_STAT_WIDTH = 8;
-const F32 SIM_WARN_FRACTION = 0.75f;
-const F32 SIM_FULL_FRACTION = 0.98f;
const LLColor4 SIM_OK_COLOR(0.f, 1.f, 0.f, 1.f);
const LLColor4 SIM_WARN_COLOR(1.f, 1.f, 0.f, 1.f);
const LLColor4 SIM_FULL_COLOR(1.f, 0.f, 0.f, 1.f);
const F32 ICON_TIMER_EXPIRY = 3.f; // How long the balance and health icons should flash after a change.
-const F32 ICON_FLASH_FREQUENCY = 2.f;
-const S32 TEXT_HEIGHT = 18;
static void onClickVolume(void*);
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index e75af8db53..503dd6747d 100755
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -1232,10 +1232,10 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
S32 x_begin, y_begin, x_end, y_end;
- x_begin = llround(x * scale_inv);
- y_begin = llround(y * scale_inv);
- x_end = llround((x + width) * scale_inv);
- y_end = llround((y + width) * scale_inv);
+ x_begin = ll_round(x * scale_inv);
+ y_begin = ll_round(y * scale_inv);
+ x_end = ll_round((x + width) * scale_inv);
+ y_end = ll_round((y + width) * scale_inv);
if (x_end > tex_width)
{
@@ -1283,9 +1283,9 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
// Want non-linear curve for transparency gradient
coloru = MAX_WATER_COLOR;
const F32 frac = 1.f - 2.f/(2.f - (height - WATER_HEIGHT));
- S32 alpha = 64 + llround((255-64)*frac);
+ S32 alpha = 64 + ll_round((255-64)*frac);
- alpha = llmin(llround((F32)MAX_WATER_COLOR.mV[3]), alpha);
+ alpha = llmin(ll_round((F32)MAX_WATER_COLOR.mV[3]), alpha);
alpha = llmax(64, alpha);
coloru.mV[3] = alpha;
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index a763d42a8d..802dff1ead 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -83,7 +83,7 @@ public:
const std::string xml = str.str();
// save the str to disk, usually to the cache.
- llofstream file(mFileSpec, std::ios_base::out);
+ llofstream file(mFileSpec.c_str(), std::ios_base::out);
file.write(xml.c_str(), str.str().size());
file.close();
@@ -269,7 +269,7 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD()
{
LLSD content;
llifstream file;
- file.open(mFullFileSpec);
+ file.open(mFullFileSpec.c_str());
if (file.is_open())
{
if (LLSDSerialize::fromXML(content, file) != LLSDParser::PARSE_FAILURE)
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index f88f88a4fa..8a5704939a 100755
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -164,7 +164,7 @@ void LLTeleportHistoryStorage::save()
std::string resolvedFilename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
// open the history file for writing
- llofstream file (resolvedFilename);
+ llofstream file(resolvedFilename.c_str());
if (!file.is_open())
{
LL_WARNS() << "can't open teleport history file \"" << mFilename << "\" for writing" << LL_ENDL;
@@ -186,7 +186,7 @@ void LLTeleportHistoryStorage::load()
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename);
// open the history file for reading
- llifstream file(resolved_filename);
+ llifstream file(resolved_filename.c_str());
if (!file.is_open())
{
LL_WARNS() << "can't load teleport history from file \"" << mFilename << "\"" << LL_ENDL;
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index a426669b5e..717807f513 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -72,12 +72,6 @@
#include "llfloaterreg.h"
#include "lllocalbitmaps.h"
-static const S32 HPAD = 4;
-static const S32 VPAD = 4;
-static const S32 LINE = 16;
-static const S32 FOOTER_HEIGHT = 100;
-static const S32 BORDER_PAD = HPAD;
-static const S32 TEXTURE_INVENTORY_PADDING = 30;
static const F32 CONTEXT_CONE_IN_ALPHA = 0.0f;
static const F32 CONTEXT_CONE_OUT_ALPHA = 1.f;
static const F32 CONTEXT_FADE_TIME = 0.08f;
@@ -586,9 +580,9 @@ void LLFloaterTexturePicker::draw()
mTentativeLabel->setVisible( FALSE );
}
- getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID());
- getChildView("Blank")->setEnabled(mImageAssetID != mOwner->getBlankImageAssetID());
- getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && !mImageAssetID.isNull() );
+ getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID() || mOwner->getTentative());
+ getChildView("Blank")->setEnabled(mImageAssetID != mOwner->getBlankImageAssetID() || mOwner->getTentative());
+ getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && (!mImageAssetID.isNull() || mOwner->getTentative()));
LLFloater::draw();
@@ -1511,8 +1505,8 @@ void LLTextureCtrl::draw()
gl_draw_x( interior, LLColor4::black );
}
- mTentativeLabel->setVisible( !mTexturep.isNull() && getTentative() );
-
+ mTentativeLabel->setVisible( getTentative() );
+
// Show "Loading..." string on the top left corner while this texture is loading.
// Using the discard level, do not show the string if the texture is almost but not
// fully loaded.
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index acd4cf2d8d..fab4203ec3 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -340,7 +340,7 @@ private:
// Threads: Ttf
DecodeResponder(LLTextureFetch* fetcher, const LLUUID& id, LLTextureFetchWorker* worker)
- : mFetcher(fetcher), mID(id), mWorker(worker)
+ : mFetcher(fetcher), mID(id)
{
}
@@ -356,7 +356,6 @@ private:
private:
LLTextureFetch* mFetcher;
LLUUID mID;
- LLTextureFetchWorker* mWorker; // debug only (may get deleted from under us, use mFetcher/mID)
};
struct Compare
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index c82894a5cc..0a9453534b 100755
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -48,7 +48,6 @@
const S32 MAX_ALLOWED_MSG_WIDTH = 400;
const F32 DEFAULT_BUTTON_DELAY = 0.5f;
-const S32 MSG_PAD = 8;
/*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL;
/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader;
diff --git a/indra/newview/lltoastgroupnotifypanel.h b/indra/newview/lltoastgroupnotifypanel.h
index 431fd32da2..269c23798c 100755
--- a/indra/newview/lltoastgroupnotifypanel.h
+++ b/indra/newview/lltoastgroupnotifypanel.h
@@ -60,8 +60,6 @@ private:
static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT;
- LLButton* mSaveInventoryBtn;
-
LLUUID mGroupID;
LLOfferInfo* mInventoryOffer;
};
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index e3eb8ba7af..0a0bfaf58b 100755
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -65,8 +65,7 @@ const std::string REGION_BLOCKS_TERRAFORM_MSG = "This region does not allow terr
const S32 LAND_BRUSH_SIZE_COUNT = 3;
const F32 LAND_BRUSH_SIZE[LAND_BRUSH_SIZE_COUNT] = {1.0f, 2.0f, 4.0f};
-const S32 LAND_STEPS = 3;
-const F32 LAND_METERS_PER_SECOND = 1.0f;
+
enum
{
E_LAND_LEVEL = 0,
diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp
index 4bda9072d0..5a63f6e286 100755
--- a/indra/newview/lltoolcomp.cpp
+++ b/indra/newview/lltoolcomp.cpp
@@ -52,14 +52,8 @@
#include "llfloatertools.h"
#include "llviewercontrol.h"
-const S32 BUTTON_HEIGHT = 16;
-const S32 BUTTON_WIDTH_SMALL = 32;
-const S32 BUTTON_WIDTH_BIG = 48;
-const S32 HPAD = 4;
-
extern LLControlGroup gSavedSettings;
-
// we use this in various places instead of NULL
static LLPointer<LLTool> sNullTool(new LLTool(std::string("null"), NULL));
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 8561d265de..526f8d1cd8 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -34,6 +34,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llavatarnamecache.h"
#include "lldictionary.h"
#include "llfloaterreg.h"
#include "llfloatertools.h"
@@ -947,8 +948,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
const S32 item_index = mCurItemIndex;
const EDragAndDropType dad_type = mCargoTypes[item_index];
// Call the right implementation function
- (U32)callMemberFunction(*this,
- LLDragAndDropDictionary::instance().get(dad_type, target))
+ callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target))
(hit_obj, hit_face, pick_info.mKeyMask, TRUE);
}
}
@@ -1705,9 +1705,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
return true;
}
-
+ std::string dest_name = session->mName;
+ LLAvatarName av_name;
+ if(LLAvatarNameCache::get(dest_agent, &av_name))
+ {
+ dest_name = av_name.getCompleteName();
+ }
// If an IM session with destination agent is found item offer will be logged in this session.
- show_object_sharing_confirmation(session->mName, inv_obj, dest, dest_agent, session_id);
+ show_object_sharing_confirmation(dest_name, inv_obj, dest, dest_agent, session_id);
}
}
else
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 58073d1186..15f3c36674 100755
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -61,7 +61,6 @@ BOOL gCameraBtnOrbit = FALSE;
BOOL gCameraBtnPan = FALSE;
const S32 SLOP_RANGE = 4;
-const F32 FOCUS_OFFSET_FACTOR = 1.f;
//
// Camera - shared functionality
@@ -136,7 +135,7 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
- gViewerWindow->pickAsync(x, y, mask, pickCallback);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
return TRUE;
}
diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp
index 44c0cb3124..ff991dc9fd 100755
--- a/indra/newview/lltoolselectland.cpp
+++ b/indra/newview/lltoolselectland.cpp
@@ -219,8 +219,8 @@ void LLToolSelectLand::handleDeselect()
void LLToolSelectLand::roundXY(LLVector3d &vec)
{
- vec.mdV[VX] = llround( vec.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
- vec.mdV[VY] = llround( vec.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
+ vec.mdV[VX] = ll_round( vec.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
+ vec.mdV[VY] = ll_round( vec.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
}
diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp
index 8eea2b242a..f7064e152a 100755
--- a/indra/newview/llurlhistory.cpp
+++ b/indra/newview/llurlhistory.cpp
@@ -40,29 +40,32 @@ const int MAX_URL_COUNT = 10;
// static
bool LLURLHistory::loadFile(const std::string& filename)
{
+ bool dataloaded = false;
+ sHistorySD = LLSD();
LLSD data;
- {
- std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter();
-
- llifstream file((temp_str + filename));
-
- if (file.is_open())
- {
- LL_INFOS() << "Loading history.xml file at " << filename << LL_ENDL;
- LLSDSerialize::fromXML(data, file);
- }
-
- if (data.isUndefined())
- {
- LL_INFOS() << "file missing, ill-formed, "
- "or simply undefined; not changing the"
- " file" << LL_ENDL;
- sHistorySD = LLSD();
- return false;
- }
- }
- sHistorySD = data;
- return true;
+
+ std::string user_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename);
+
+ llifstream file(user_filename.c_str());
+ if (file.is_open())
+ {
+ LLSDSerialize::fromXML(data, file);
+ if (data.isUndefined())
+ {
+ LL_WARNS() << "error loading " << user_filename << LL_ENDL;
+ }
+ else
+ {
+ LL_INFOS() << "Loaded history file at " << user_filename << LL_ENDL;
+ sHistorySD = data;
+ dataloaded = true;
+ }
+ }
+ else
+ {
+ LL_INFOS() << "Unable to open history file at " << user_filename << LL_ENDL;
+ }
+ return dataloaded;
}
// static
@@ -76,10 +79,10 @@ bool LLURLHistory::saveFile(const std::string& filename)
}
temp_str += gDirUtilp->getDirDelimiter() + filename;
- llofstream out(temp_str);
+ llofstream out(temp_str.c_str());
if (!out.good())
{
- LL_WARNS() << "Unable to open " << filename << " for output." << LL_ENDL;
+ LL_WARNS() << "Unable to open " << temp_str << " for output." << LL_ENDL;
return false;
}
diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp
index 8211ce12f6..3a7285974e 100755
--- a/indra/newview/llurlwhitelist.cpp
+++ b/indra/newview/llurlwhitelist.cpp
@@ -87,7 +87,7 @@ bool LLUrlWhiteList::load ()
std::string resolvedFilename = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, mFilename );
// open a file for reading
- llifstream file ( resolvedFilename );
+ llifstream file(resolvedFilename.c_str());
if ( file.is_open () )
{
// add each line in the file to the list
@@ -122,7 +122,7 @@ bool LLUrlWhiteList::save ()
}
// open a file for writing
- llofstream file ( resolvedFilename );
+ llofstream file(resolvedFilename.c_str());
if ( file.is_open () )
{
// for each entry we have
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index 6a8fad0134..5cc7d7bed3 100755
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -38,8 +38,6 @@
#error "Channel or Version information is undefined"
#endif
-const char * const LL_CHANNEL = LL_VIEWER_CHANNEL;
-
//
// Set the version numbers in indra/VIEWER_VERSION
//
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 981e4c40aa..afa00e3e6e 100755
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -930,8 +930,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction)
{
gGL.setColorMask(false, false);
-
- U32 types[] = {
+
+ static const U32 types[] = {
LLRenderPass::PASS_SIMPLE,
LLRenderPass::PASS_FULLBRIGHT,
LLRenderPass::PASS_SHINY
@@ -1176,8 +1176,8 @@ LLRect get_whole_screen_region()
if (zoom_factor > 1.f)
{
S32 num_horizontal_tiles = llceil(zoom_factor);
- S32 tile_width = llround((F32)gViewerWindow->getWorldViewWidthScaled() / zoom_factor);
- S32 tile_height = llround((F32)gViewerWindow->getWorldViewHeightScaled() / zoom_factor);
+ S32 tile_width = ll_round((F32)gViewerWindow->getWorldViewWidthScaled() / zoom_factor);
+ S32 tile_height = ll_round((F32)gViewerWindow->getWorldViewHeightScaled() / zoom_factor);
int tile_y = sub_region / num_horizontal_tiles;
int tile_x = sub_region - (tile_y * num_horizontal_tiles);
@@ -1471,8 +1471,8 @@ void render_ui_2d()
int pos_y = sub_region / llceil(zoom_factor);
int pos_x = sub_region - (pos_y*llceil(zoom_factor));
// offset for this tile
- LLFontGL::sCurOrigin.mX -= llround((F32)gViewerWindow->getWindowWidthScaled() * (F32)pos_x / zoom_factor);
- LLFontGL::sCurOrigin.mY -= llround((F32)gViewerWindow->getWindowHeightScaled() * (F32)pos_y / zoom_factor);
+ LLFontGL::sCurOrigin.mX -= ll_round((F32)gViewerWindow->getWindowWidthScaled() * (F32)pos_x / zoom_factor);
+ LLFontGL::sCurOrigin.mY -= ll_round((F32)gViewerWindow->getWindowHeightScaled() * (F32)pos_y / zoom_factor);
}
stop_glerror();
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index a197c1fe1a..af04122f8b 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -70,6 +70,7 @@
#include "llfloatergroups.h"
#include "llfloaterhardwaresettings.h"
#include "llfloaterhelpbrowser.h"
+#include "llfloaterhoverheight.h"
#include "llfloaterhud.h"
#include "llfloaterimagepreview.h"
#include "llfloaterimsession.h"
@@ -222,7 +223,8 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGodTools>);
LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGroupPicker>);
- LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>);
+ LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>);
+ LLFloaterReg::add("edit_hover_height", "floater_edit_hover_height.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHoverHeight>);
LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);
LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMSession>);
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index a4a05587d3..ada829eb4b 100755
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -53,7 +53,6 @@ const F32 FLY_FRAMES = 4;
const F32 NUDGE_TIME = 0.25f; // in seconds
const S32 NUDGE_FRAMES = 2;
const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
-const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed
struct LLKeyboardActionRegistry
: public LLRegistrySingleton<std::string, boost::function<void (EKeystate keystate)>, LLKeyboardActionRegistry>
@@ -66,7 +65,7 @@ void agent_jump( EKeystate s )
{
if( KEYSTATE_UP == s ) return;
F32 time = gKeyboard->getCurKeyElapsedTime();
- S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount());
+ S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount());
if( time < FLY_TIME
|| frame_count <= FLY_FRAMES
@@ -133,7 +132,7 @@ static void agent_push_forwardbackward( EKeystate s, S32 direction, LLAgent::EDo
if (KEYSTATE_UP == s) return;
F32 time = gKeyboard->getCurKeyElapsedTime();
- S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount());
+ S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount());
if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES)
{
@@ -149,6 +148,8 @@ void camera_move_forward( EKeystate s );
void agent_push_forward( EKeystate s )
{
+ if(gAgent.isMovementLocked()) return;
+
//in free camera control mode we need to intercept keyboard events for avatar movements
if (LLFloaterCamera::inFreeCameraMode())
{
@@ -164,6 +165,8 @@ void camera_move_backward( EKeystate s );
void agent_push_backward( EKeystate s )
{
+ if(gAgent.isMovementLocked()) return;
+
//in free camera control mode we need to intercept keyboard events for avatar movements
if (LLFloaterCamera::inFreeCameraMode())
{
@@ -184,7 +187,7 @@ static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleT
agent_handle_doubletap_run(s, mode);
if( KEYSTATE_UP == s ) return;
F32 time = gKeyboard->getCurKeyElapsedTime();
- S32 frame_count = llround(gKeyboard->getCurKeyElapsedFrameCount());
+ S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount());
if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES)
{
@@ -199,12 +202,14 @@ static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleT
void agent_slide_left( EKeystate s )
{
+ if(gAgent.isMovementLocked()) return;
agent_slide_leftright(s, 1, LLAgent::DOUBLETAP_SLIDELEFT);
}
void agent_slide_right( EKeystate s )
{
+ if(gAgent.isMovementLocked()) return;
agent_slide_leftright(s, -1, LLAgent::DOUBLETAP_SLIDERIGHT);
}
@@ -219,6 +224,8 @@ void agent_turn_left( EKeystate s )
return;
}
+ if(gAgent.isMovementLocked()) return;
+
if (LLToolCamera::getInstance()->mouseSteerMode())
{
agent_slide_left(s);
@@ -247,6 +254,8 @@ void agent_turn_right( EKeystate s )
return;
}
+ if(gAgent.isMovementLocked()) return;
+
if (LLToolCamera::getInstance()->mouseSteerMode())
{
agent_slide_right(s);
@@ -320,8 +329,8 @@ void camera_spin_around_cw( EKeystate s )
void camera_spin_around_ccw_sitting( EKeystate s )
{
- if( KEYSTATE_UP == s ) return;
- if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled())
+ if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDERIGHT ) return;
+ if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
{
//send keystrokes, but do not change camera
agent_turn_right(s);
@@ -336,8 +345,8 @@ void camera_spin_around_ccw_sitting( EKeystate s )
void camera_spin_around_cw_sitting( EKeystate s )
{
- if( KEYSTATE_UP == s ) return;
- if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled())
+ if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDELEFT ) return;
+ if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
{
//send keystrokes, but do not change camera
agent_turn_left(s);
@@ -413,8 +422,8 @@ void camera_move_backward( EKeystate s )
void camera_move_forward_sitting( EKeystate s )
{
- if( KEYSTATE_UP == s ) return;
- if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled())
+ if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_FORWARD ) return;
+ if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
{
agent_push_forward(s);
}
@@ -427,9 +436,9 @@ void camera_move_forward_sitting( EKeystate s )
void camera_move_backward_sitting( EKeystate s )
{
- if( KEYSTATE_UP == s ) return;
+ if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_BACKWARD ) return;
- if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled())
+ if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning())
{
agent_push_backward(s);
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 8499012cfc..509227c683 100755
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -924,7 +924,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
{
F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest());
- pimpl->setLowPrioritySizeLimit(llround(approximate_interest_dimension));
+ pimpl->setLowPrioritySizeLimit(ll_round(approximate_interest_dimension));
}
}
else
@@ -1278,7 +1278,7 @@ void LLViewerMedia::loadCookieFile()
}
// open the file for reading
- llifstream file(resolved_filename);
+ llifstream file(resolved_filename.c_str());
if (!file.is_open())
{
LL_WARNS() << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << LL_ENDL;
@@ -1320,7 +1320,7 @@ void LLViewerMedia::saveCookieFile()
}
// open a file for writing
- llofstream file (resolved_filename);
+ llofstream file(resolved_filename.c_str());
if (!file.is_open())
{
LL_WARNS() << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << LL_ENDL;
@@ -2330,8 +2330,8 @@ void LLViewerMediaImpl::scaleTextureCoords(const LLVector2& texture_coords, S32
texture_y = 1.0 + texture_y;
// scale x and y to texel units.
- *x = llround(texture_x * mMediaSource->getTextureWidth());
- *y = llround((1.0f - texture_y) * mMediaSource->getTextureHeight());
+ *x = ll_round(texture_x * mMediaSource->getTextureWidth());
+ *y = ll_round((1.0f - texture_y) * mMediaSource->getTextureHeight());
// Adjust for the difference between the actual texture height and the amount of the texture in use.
*y -= (mMediaSource->getTextureHeight() - mMediaSource->getHeight());
@@ -2703,7 +2703,7 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask)
{
// FIXME: THIS IS SO WRONG.
// Menu keys should be handled by the menu system and not passed to UI elements, but this is how LLTextEditor and LLLineEditor do it...
- if( MASK_CONTROL & mask )
+ if( MASK_CONTROL & mask && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END)
{
result = true;
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3abeba4b43..3b0adcf7f4 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2580,9 +2580,13 @@ static LLStringExplicit get_default_item_label(const std::string& item_name)
bool enable_object_touch(LLUICtrl* ctrl)
{
+ bool new_value = false;
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
-
- bool new_value = obj && obj->flagHandleTouch();
+ if (obj)
+ {
+ LLViewerObject* parent = (LLViewerObject*)obj->getParent();
+ new_value = obj->flagHandleTouch() || (parent && parent->flagHandleTouch());
+ }
std::string item_name = ctrl->getName();
init_default_item_label(item_name);
@@ -2867,6 +2871,11 @@ bool enable_object_select_in_pathfinding_linksets()
return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets();
}
+bool visible_object_select_in_pathfinding_linksets()
+{
+ return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion();
+}
+
bool enable_object_select_in_pathfinding_characters()
{
return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetViewableCharacters();
@@ -3590,7 +3599,7 @@ class LLSelfSitDown : public view_listener_t
bool enable_sitdown_self()
{
- return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying();
+ return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgentAvatarp->isEditingAppearance() && !gAgent.getFlying();
}
class LLCheckPanelPeopleTab : public view_listener_t
@@ -3881,6 +3890,14 @@ class LLEnableEditShape : public view_listener_t
}
};
+class LLEnableHoverHeight : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ return gAgent.getRegion() && gAgent.getRegion()->avatarHoverHeightEnabled();
+ }
+};
+
class LLEnableEditPhysics : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -4354,7 +4371,10 @@ static bool get_derezzable_objects(
break;
case DRD_RETURN_TO_OWNER:
- can_derez_current = TRUE;
+ if(!object->isAttachment())
+ {
+ can_derez_current = TRUE;
+ }
break;
default:
@@ -4762,7 +4782,7 @@ BOOL enable_take()
&& object->permModify())
|| (node->mPermissions->getOwner() == gAgent.getID())))
{
- return TRUE;
+ return !object->isAttachment();
}
#endif
}
@@ -6075,6 +6095,11 @@ void handle_edit_shape()
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_shape"));
}
+void handle_hover_height()
+{
+ LLFloaterReg::showInstance("edit_hover_height");
+}
+
void handle_edit_physics()
{
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_physics"));
@@ -7021,10 +7046,6 @@ void handle_selected_texture_info(void*)
std::string msg;
msg.assign("Texture info for: ");
msg.append(node->mName);
-
- LLSD args;
- args["MESSAGE"] = msg;
- LLNotificationsUtil::add("SystemMessage", args);
U8 te_count = node->getObject()->getNumTEs();
// map from texture ID to list of faces using it
@@ -7048,10 +7069,10 @@ void handle_selected_texture_info(void*)
S32 height = img->getHeight();
S32 width = img->getWidth();
S32 components = img->getComponents();
- msg = llformat("%dx%d %s on face ",
+ msg.append(llformat("\n%dx%d %s on face ",
width,
height,
- (components == 4 ? "alpha" : "opaque"));
+ (components == 4 ? "alpha" : "opaque")));
for (U8 i = 0; i < it->second.size(); ++i)
{
msg.append( llformat("%d ", (S32)(it->second[i])));
@@ -8285,6 +8306,10 @@ class LLWorldEnableEnvSettings : public view_listener_t
{
result = (LLEnvManagerNew::instance().getSkyPresetName() == "Midnight");
}
+ else if (tod == "region")
+ {
+ return false;
+ }
else
{
LL_WARNS() << "Unknown time-of-day item: " << tod << LL_ENDL;
@@ -8571,10 +8596,12 @@ void initialize_menus()
view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
view_listener_t::addMenu(new LLEnableEditShape(), "Edit.EnableEditShape");
+ view_listener_t::addMenu(new LLEnableHoverHeight(), "Edit.EnableHoverHeight");
view_listener_t::addMenu(new LLEnableEditPhysics(), "Edit.EnableEditPhysics");
commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar));
commit.add("EditOutfit", boost::bind(&handle_edit_outfit));
commit.add("EditShape", boost::bind(&handle_edit_shape));
+ commit.add("HoverHeight", boost::bind(&handle_hover_height));
commit.add("EditPhysics", boost::bind(&handle_edit_physics));
// View menu
@@ -8983,6 +9010,7 @@ void initialize_menus()
enable.add("VisibleBuild", boost::bind(&enable_object_build));
commit.add("Pathfinding.Linksets.Select", boost::bind(&LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects));
enable.add("EnableSelectInPathfindingLinksets", boost::bind(&enable_object_select_in_pathfinding_linksets));
+ enable.add("VisibleSelectInPathfindingLinksets", boost::bind(&visible_object_select_in_pathfinding_linksets));
commit.add("Pathfinding.Characters.Select", boost::bind(&LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects));
enable.add("EnableSelectInPathfindingCharacters", boost::bind(&enable_object_select_in_pathfinding_characters));
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index b2a37694fe..f8e50ba463 100755
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -503,6 +503,7 @@ class LLFileCloseWindow : public view_listener_t
{
LLFloater::closeFrontmostFloater();
}
+ if (gMenuHolder) gMenuHolder->hideMenus();
return true;
}
};
@@ -525,6 +526,7 @@ class LLFileCloseAllWindows : public view_listener_t
bool app_quitting = false;
gFloaterView->closeAllChildren(app_quitting);
LLFloaterSnapshot::getInstance()->closeFloater(app_quitting);
+ if (gMenuHolder) gMenuHolder->hideMenus();
return true;
}
};
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 99db3ff093..d4330cedd0 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -128,10 +128,7 @@ extern void on_new_message(const LLSD& msg);
//
// Constants
//
-const F32 BIRD_AUDIBLE_RADIUS = 32.0f;
-const F32 SIT_DISTANCE_FROM_TARGET = 0.25f;
const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f;
-static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting.
// Determine how quickly residents' scripts can issue question dialogs
// Allow bursts of up to 5 dialogs in 10 seconds. 10*2=20 seconds recovery if throttle kicks in
@@ -2411,7 +2408,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
BOOL is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)
// object IMs contain sender object id in session_id (STORM-1209)
- || dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id);
+ || (dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id));
BOOL is_owned_by_me = FALSE;
BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("VoiceCallsFriendsOnly");
@@ -2690,7 +2687,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLSD args;
args["SUBJECT"] = subj;
args["MESSAGE"] = mes;
- LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(LLDate(timestamp)));
+ LLDate notice_date = LLDate(timestamp).notNull() ? LLDate(timestamp) : LLDate::now();
+ LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(notice_date));
}
// Also send down the old path for now.
@@ -5117,7 +5115,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
if (object)
{
LLVector3 sit_spot = object->getPositionAgent() + (sitPosition * object->getRotation());
- if (!use_autopilot || isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot())
+ if (!use_autopilot || (isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot()))
{
//we're already sitting on this object, so don't autopilot
}
@@ -7119,8 +7117,6 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
//---------------------------------------------------------------------------
const S32 SCRIPT_DIALOG_MAX_BUTTONS = 12;
-const S32 SCRIPT_DIALOG_BUTTON_STR_SIZE = 24;
-const S32 SCRIPT_DIALOG_MAX_MESSAGE_SIZE = 512;
const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n";
bool callback_script_dialog(const LLSD& notification, const LLSD& response)
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 820249e181..a2c0a91ea6 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3001,7 +3001,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
{
std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename);
- llifstream ifs(filename_and_local_path);
+ llifstream ifs(filename_and_local_path.c_str());
if(ifs.good())
{
char buffer[MAX_STRING]; /* Flawfinder: ignore */
@@ -3374,8 +3374,17 @@ void LLViewerObject::setLinksetCost(F32 cost)
{
mLinksetCost = cost;
mCostStale = false;
-
- if (isSelected())
+
+ BOOL needs_refresh = isSelected();
+ child_list_t::iterator iter = mChildList.begin();
+ while(iter != mChildList.end() && !needs_refresh)
+ {
+ LLViewerObject* child = *iter;
+ needs_refresh = child->isSelected();
+ iter++;
+ }
+
+ if (needs_refresh)
{
gFloaterTools->dirty();
}
@@ -5205,7 +5214,6 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
{
if (!gAudiop)
{
- LL_WARNS("AudioEngine") << "LLAudioEngine instance doesn't exist!" << LL_ENDL;
return;
}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 7c94442f09..d9d4c34fb0 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -281,7 +281,7 @@ S32 LLViewerParcelMgr::getSelectedArea() const
F64 width = mEastNorth.mdV[VX] - mWestSouth.mdV[VX];
F64 height = mEastNorth.mdV[VY] - mWestSouth.mdV[VY];
F32 area = (F32)(width * height);
- rv = llround(area);
+ rv = ll_round(area);
}
return rv;
}
@@ -301,10 +301,10 @@ void LLViewerParcelMgr::writeHighlightSegments(F32 west, F32 south, F32 east,
F32 north)
{
S32 x, y;
- S32 min_x = llround( west / PARCEL_GRID_STEP_METERS );
- S32 max_x = llround( east / PARCEL_GRID_STEP_METERS );
- S32 min_y = llround( south / PARCEL_GRID_STEP_METERS );
- S32 max_y = llround( north / PARCEL_GRID_STEP_METERS );
+ S32 min_x = ll_round( west / PARCEL_GRID_STEP_METERS );
+ S32 max_x = ll_round( east / PARCEL_GRID_STEP_METERS );
+ S32 min_y = ll_round( south / PARCEL_GRID_STEP_METERS );
+ S32 max_y = ll_round( north / PARCEL_GRID_STEP_METERS );
const S32 STRIDE = mParcelsPerEdge+1;
@@ -416,12 +416,12 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelAt(const LLVector3d& pos_
LLVector3d northeast = pos_global;
southwest -= LLVector3d( PARCEL_GRID_STEP_METERS/2, PARCEL_GRID_STEP_METERS/2, 0 );
- southwest.mdV[VX] = llround( southwest.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
- southwest.mdV[VY] = llround( southwest.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
+ southwest.mdV[VX] = ll_round( southwest.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
+ southwest.mdV[VY] = ll_round( southwest.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
northeast += LLVector3d( PARCEL_GRID_STEP_METERS/2, PARCEL_GRID_STEP_METERS/2, 0 );
- northeast.mdV[VX] = llround( northeast.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
- northeast.mdV[VY] = llround( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
+ northeast.mdV[VX] = ll_round( northeast.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
+ northeast.mdV[VY] = ll_round( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
// Snap to parcel
return selectLand( southwest, northeast, TRUE );
@@ -705,7 +705,7 @@ bool LLViewerParcelMgr::allowAgentScripts(const LLViewerRegion* region, const LL
bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLParcel* parcel) const
{
return (region && region->getAllowDamage())
- || (parcel && parcel->getAllowDamage());
+ && (parcel && parcel->getAllowDamage());
}
BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const
@@ -1562,6 +1562,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (parcel == parcel_mgr.mAgentParcel)
{
+ // new agent parcel
S32 bitmap_size = parcel_mgr.mParcelsPerEdge
* parcel_mgr.mParcelsPerEdge
/ 8;
@@ -1591,6 +1592,11 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
}
}
+ else if (local_id == parcel_mgr.mAgentParcel->getLocalID())
+ {
+ // updated agent parcel
+ parcel_mgr.mAgentParcel->unpackMessage(msg);
+ }
}
// Handle updating selections, if necessary.
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 76418ad6a6..230bdca4ef 100755
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -42,8 +42,6 @@
#include "llvovolume.h"
const F32 PART_SIM_BOX_SIDE = 16.f;
-const F32 PART_SIM_BOX_OFFSET = 0.5f*PART_SIM_BOX_SIDE;
-const F32 PART_SIM_BOX_RAD = 0.5f*F_SQRT3*PART_SIM_BOX_SIDE;
//static
S32 LLViewerPartSim::sMaxParticleCount = 0;
@@ -311,7 +309,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
if (part->mFlags & LLPartData::LL_PART_WIND_MASK)
{
- LLVector3 tempVel(part->mVelocity);
part->mVelocity *= 1.f - 0.1f*dt;
part->mVelocity += 0.1f*dt*regionp->mWind.getVelocity(regionp->getPosRegionFromAgent(part->mPosAgent));
}
@@ -391,7 +388,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
}
// Do glow interpolation
- part->mGlow.mV[3] = (U8) llround(lerp(part->mStartGlow, part->mEndGlow, frac)*255.f);
+ part->mGlow.mV[3] = (U8) ll_round(lerp(part->mStartGlow, part->mEndGlow, frac)*255.f);
// Set the last update time to now.
part->mLastUpdateTime = cur_time;
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index a7fd2e0fe4..7efa821bbf 100755
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -313,7 +313,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
part->mStartGlow = mPartSysData.mPartData.mStartGlow;
part->mEndGlow = mPartSysData.mPartData.mEndGlow;
- part->mGlow = LLColor4U(0, 0, 0, (U8) llround(part->mStartGlow*255.f));
+ part->mGlow = LLColor4U(0, 0, 0, (U8) ll_round(part->mStartGlow*255.f));
if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_DROP)
{
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 11cbf3fc24..92e07c52a5 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -66,6 +66,7 @@
#include "llviewerstatsrecorder.h"
#include "llvlmanager.h"
#include "llvlcomposition.h"
+#include "llvoavatarself.h"
#include "llvocache.h"
#include "llworld.h"
#include "llspatialpartition.h"
@@ -87,8 +88,6 @@
// out the two lists of capabilities for analysis.
//#define DEBUG_CAPS_GRANTS
-const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region
-const S16 MAX_MAP_DIST = 10;
// The server only keeps our pending agent info for 60 seconds.
// We want to allow for seed cap retry, but its not useful after that 60 seconds.
// Give it 3 chances, each at 18 seconds to give ourselves a few seconds to connect anyways if we give up.
@@ -424,6 +423,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mCacheDirty(FALSE),
mReleaseNotesRequested(FALSE),
mCapabilitiesReceived(false),
+ mSimulatorFeaturesReceived(false),
mBitsReceived(0.f),
mPacketsReceived(0.f),
mDead(FALSE),
@@ -1485,16 +1485,27 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>&
if(drawablep && !drawablep->getParent())
{
- LLViewerObject::const_child_list_t& child_list = drawablep->getVObj()->getChildren();
+ LLViewerObject* v_obj = drawablep->getVObj();
+ if (v_obj->isSelected()
+ || (v_obj->flagAnimSource() && isAgentAvatarValid() && gAgentAvatarp->hasMotionFromSource(v_obj->getID())))
+ {
+ // do not remove objects user is interacting with
+ ((LLViewerOctreeEntryData*)drawablep)->setVisible();
+ return;
+ }
+ LLViewerObject::const_child_list_t& child_list = v_obj->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
{
LLViewerObject* child = *iter;
if(child->mDrawable)
{
- if(!child->mDrawable->getEntry() || !child->mDrawable->getEntry()->hasVOCacheEntry())
+ if( !child->mDrawable->getEntry()
+ || !child->mDrawable->getEntry()->hasVOCacheEntry()
+ || child->isSelected()
+ || (child->flagAnimSource() && isAgentAvatarValid() && gAgentAvatarp->hasMotionFromSource(child->getID())))
{
- //do not remove parent if any of its children non-cacheable
+ //do not remove parent if any of its children non-cacheable, animating or selected
//especially for the case that an avatar sits on a cache-able object
((LLViewerOctreeEntryData*)drawablep)->setVisible();
return;
@@ -1924,7 +1935,6 @@ public:
}
else if( i != you_index)
{
- U32 loc = x << 16 | y << 8 | z; loc = loc;
U32 pos = 0x0;
pos |= x;
pos <<= 8;
@@ -2027,6 +2037,26 @@ void LLViewerRegion::getInfo(LLSD& info)
info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
}
+boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb)
+{
+ return mSimulatorFeaturesReceivedSignal.connect(cb);
+}
+
+void LLViewerRegion::setSimulatorFeaturesReceived(bool received)
+{
+ mSimulatorFeaturesReceived = received;
+ if (received)
+ {
+ mSimulatorFeaturesReceivedSignal(getRegionID());
+ mSimulatorFeaturesReceivedSignal.disconnect_all_slots();
+ }
+}
+
+bool LLViewerRegion::simulatorFeaturesReceived() const
+{
+ return mSimulatorFeaturesReceived;
+}
+
void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) const
{
sim_features = mSimulatorFeatures;
@@ -2040,6 +2070,9 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
LLSDSerialize::toPrettyXML(sim_features, str);
LL_INFOS() << str.str() << LL_ENDL;
mSimulatorFeatures = sim_features;
+
+ setSimulatorFeaturesReceived(true);
+
}
//this is called when the parent is not cacheable.
@@ -2692,15 +2725,12 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("FlickrConnect");
capabilityNames.append("TwitterConnect");
- if (gSavedSettings.getBOOL("UseHTTPInventory"))
- {
- capabilityNames.append("FetchLib2");
- capabilityNames.append("FetchLibDescendents2");
- capabilityNames.append("FetchInventory2");
- capabilityNames.append("FetchInventoryDescendents2");
- capabilityNames.append("IncrementCOFVersion");
- AISCommand::getCapabilityNames(capabilityNames);
- }
+ capabilityNames.append("FetchLib2");
+ capabilityNames.append("FetchLibDescendents2");
+ capabilityNames.append("FetchInventory2");
+ capabilityNames.append("FetchInventoryDescendents2");
+ capabilityNames.append("IncrementCOFVersion");
+ AISCommand::getCapabilityNames(capabilityNames);
capabilityNames.append("GetDisplayNames");
capabilityNames.append("GetMesh");
@@ -3088,6 +3118,12 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const
return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") &&
mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean());
}
+
+bool LLViewerRegion::avatarHoverHeightEnabled() const
+{
+ return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") &&
+ mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean());
+}
/* Static Functions */
void log_capabilities(const CapabilityMap &capmap)
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 1e225553b8..c14fa5aee8 100755
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -309,12 +309,19 @@ public:
bool meshRezEnabled() const;
bool meshUploadEnabled() const;
+ // has region received its simulator features list? Requires an additional query after caps received.
+ void setSimulatorFeaturesReceived(bool);
+ bool simulatorFeaturesReceived() const;
+ boost::signals2::connection setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb);
+
void getSimulatorFeatures(LLSD& info) const;
void setSimulatorFeatures(const LLSD& info);
bool dynamicPathfindingEnabled() const;
+ bool avatarHoverHeightEnabled() const;
+
typedef enum
{
CACHE_MISS_TYPE_FULL = 0,
@@ -385,7 +392,7 @@ public:
private:
void addToVOCacheTree(LLVOCacheEntry* entry);
LLViewerObject* addNewObject(LLVOCacheEntry* entry);
- void killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list);
+ void killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list); //adds entry into list if it is safe to move into cache
void removeFromVOCacheTree(LLVOCacheEntry* entry);
void killCacheEntry(LLVOCacheEntry* entry, bool for_rendering = false); //physically delete the cache entry
void killInvisibleObjects(F32 max_time);
@@ -512,6 +519,7 @@ private:
BOOL mCacheDirty;
BOOL mAlive; // can become false if circuit disconnects
BOOL mCapabilitiesReceived;
+ BOOL mSimulatorFeaturesReceived;
BOOL mReleaseNotesRequested;
BOOL mDead; //if true, this region is in the process of deleting.
BOOL mPaused; //pause processing the objects in the region
@@ -532,11 +540,13 @@ private:
CacheMissItem::cache_miss_list_t mCacheMissList;
caps_received_signal_t mCapabilitiesReceivedSignal;
+ caps_received_signal_t mSimulatorFeaturesReceivedSignal;
+
LLSD mSimulatorFeatures;
// the materials capability throttle
LLFrameTimer mMaterialsCapThrottleTimer;
-LLFrameTimer mRenderInfoRequestTimer;
+ LLFrameTimer mRenderInfoRequestTimer;
};
inline BOOL LLViewerRegion::getRegionProtocol(U64 protocol) const
diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp
index 65ba3fb6e5..66e5742911 100755
--- a/indra/newview/llviewertexlayer.cpp
+++ b/indra/newview/llviewertexlayer.cpp
@@ -39,9 +39,6 @@
#include "pipeline.h"
#include "llviewercontrol.h"
-static const S32 BAKE_UPLOAD_ATTEMPTS = 7;
-static const F32 BAKE_UPLOAD_RETRY_DELAY = 2.f; // actual delay grows by power of 2 each attempt
-
// runway consolidate
extern std::string self_av_string();
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 0c4f55d704..85ae64aeff 100755
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -169,8 +169,7 @@ public:
mImage(image),
mLabel(utf8str_to_wstring(inv_item->getName())),
mItem(inv_item),
- mEditor(editor),
- mHasMouseHover(false)
+ mEditor(editor)
{
mStyle = new LLStyle(LLStyle::Params().font(LLFontGL::getFontSansSerif()));
@@ -262,8 +261,6 @@ private:
std::string mToolTip;
LLPointer<LLInventoryItem> mItem;
LLTextEditor& mEditor;
- bool mHasMouseHover;
-
};
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 4e2eef39d6..a957367f61 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -452,7 +452,6 @@ void LLViewerTexture::initClass()
// tuning params
const F32 discard_bias_delta = .25f;
const F32 discard_delta_time = 0.5f;
-const S32 min_non_tex_system_mem = (128<<20); // 128 MB
// non-const (used externally
F32 texmem_lower_bound_scale = 0.85f;
F32 texmem_middle_bound_scale = 0.925f;
@@ -655,12 +654,36 @@ S8 LLViewerTexture::getType() const
void LLViewerTexture::cleanup()
{
+ notifyAboutMissingAsset();
+
mFaceList[LLRender::DIFFUSE_MAP].clear();
mFaceList[LLRender::NORMAL_MAP].clear();
mFaceList[LLRender::SPECULAR_MAP].clear();
mVolumeList.clear();
}
+void LLViewerTexture::notifyAboutCreatingTexture()
+{
+ for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
+ {
+ for(U32 f = 0; f < mNumFaces[ch]; f++)
+ {
+ mFaceList[ch][f]->notifyAboutCreatingTexture(this);
+ }
+ }
+}
+
+void LLViewerTexture::notifyAboutMissingAsset()
+{
+ for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
+ {
+ for(U32 f = 0; f < mNumFaces[ch]; f++)
+ {
+ mFaceList[ch][f]->notifyAboutMissingAsset(this);
+ }
+ }
+}
+
// virtual
void LLViewerTexture::dump()
{
@@ -1281,7 +1304,7 @@ void LLViewerFetchedTexture::addToCreateTexture()
llassert(mNumFaces[j] <= mFaceList[j].size());
for(U32 i = 0; i < mNumFaces[j]; i++)
- {
+ {
mFaceList[j][i]->dirtyTexture();
}
}
@@ -1431,9 +1454,11 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
destroyRawImage();
return FALSE;
}
-
- res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
-
+
+ res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
+
+ notifyAboutCreatingTexture();
+
setActive();
if (!needsToSaveRawImage())
@@ -1441,6 +1466,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
mNeedsAux = FALSE;
destroyRawImage();
}
+
return res;
}
@@ -2132,6 +2158,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing)
}
if (is_missing)
{
+ notifyAboutMissingAsset();
+
if (mUrl.empty())
{
LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 05912404e4..aed7e94945 100755
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -169,9 +169,13 @@ public:
/*virtual*/ void updateBindStatsForTester() ;
protected:
void cleanup() ;
- void init(bool firstinit) ;
+ void init(bool firstinit) ;
void reorganizeFaceList() ;
void reorganizeVolumeList() ;
+
+ void notifyAboutMissingAsset();
+ void notifyAboutCreatingTexture();
+
private:
friend class LLBumpImageList;
friend class LLUIImageList;
@@ -307,10 +311,11 @@ public:
void addToCreateTexture();
+
// ONLY call from LLViewerTextureList
BOOL createTexture(S32 usename = 0);
- void destroyTexture() ;
-
+ void destroyTexture() ;
+
virtual void processTextureStats() ;
F32 calcDecodePriority() ;
diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp
index 2b364851a7..9af92d7377 100755
--- a/indra/newview/llviewertextureanim.cpp
+++ b/indra/newview/llviewertextureanim.cpp
@@ -179,7 +179,7 @@ S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t,
if (!(mMode & SMOOTH))
{
- frame_counter = (F32)llround(frame_counter);
+ frame_counter = (F32)ll_round(frame_counter);
}
//
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index b98726900f..926c40307b 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -165,7 +165,7 @@ void LLViewerTextureList::doPreloadImages()
static std::string get_texture_list_name()
{
- return std::string("texture_list_") + gSavedSettings.getString("LoginLocation") + ".xml";
+ return gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "texture_list_" + gSavedSettings.getString("LoginLocation") + ".xml");
}
void LLViewerTextureList::doPrefetchImages()
@@ -178,13 +178,22 @@ void LLViewerTextureList::doPrefetchImages()
// Pre-fetch textures from last logout
LLSD imagelist;
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name());
+ std::string filename = get_texture_list_name();
llifstream file;
- file.open(filename);
+ file.open(filename.c_str());
if (file.is_open())
{
- LLSDSerialize::fromXML(imagelist, file);
- }
+ if ( ! LLSDSerialize::fromXML(imagelist, file) )
+ {
+ file.close();
+ LL_WARNS() << "XML parse error reading texture list '" << filename << "'" << LL_ENDL;
+ LL_WARNS() << "Removing invalid texture list '" << filename << "'" << LL_ENDL;
+ LLFile::remove(filename);
+ return;
+ }
+ file.close();
+ }
+ S32 texture_count = 0;
for (LLSD::array_iterator iter = imagelist.beginArray();
iter != imagelist.endArray(); ++iter)
{
@@ -198,10 +207,12 @@ void LLViewerTextureList::doPrefetchImages()
LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, texture_type);
if (image)
{
+ texture_count += 1;
image->addTextureStats((F32)pixel_area);
}
}
}
+ LL_DEBUGS() << "fetched " << texture_count << " images from " << filename << LL_ENDL;
}
///////////////////////////////////////////////////////////////////////////////
@@ -261,9 +272,10 @@ void LLViewerTextureList::shutdown()
if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty())
{
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name());
+ std::string filename = get_texture_list_name();
llofstream file;
- file.open(filename);
+ file.open(filename.c_str());
+ LL_DEBUGS() << "saving " << imagelist.size() << " image list entries" << LL_ENDL;
LLSDSerialize::toPrettyXML(imagelist, file);
}
@@ -447,7 +459,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
// If the image is not found, creates new image and
// enqueues a request for transmission
- if ((&image_id == NULL) || image_id.isNull())
+ if (image_id.isNull())
{
return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI));
}
@@ -622,7 +634,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
{
return;
}
- llassert(new_image);
+ //llassert(new_image);
LLUUID image_id = new_image->getID();
LLViewerFetchedTexture *image = findImage(image_id);
@@ -1258,9 +1270,6 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
return compressedImage;
}
-const S32 MIN_VIDEO_RAM = 32;
-const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons.
-
// Returns min setting for TextureMemory (in MB)
S32Megabytes LLViewerTextureList::getMinVideoRamSetting()
{
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 2f84d0947a..fbbfe9a7d4 100755
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -61,8 +61,6 @@ typedef void (*LLImageCallback)(BOOL success,
class LLViewerTextureList
{
- LOG_CLASS(LLViewerTextureList);
-
friend class LLTextureView;
friend class LLViewerTextureManager;
friend class LLLocalBitmap;
@@ -206,6 +204,7 @@ private:
private:
static S32 sNumImages;
static void (*sUUIDCallback)(void**, const LLUUID &);
+ LOG_CLASS(LLViewerTextureList);
};
class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIImageList>
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index 7de82a4710..0f73515b5d 100755
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -509,18 +509,7 @@ void LLViewerWearable::saveNewAsset() const
//LL_INFOS() << *this << LL_ENDL;
const std::string filename = asset_id_to_filename(mAssetID);
- LLFILE* fp = LLFile::fopen(filename, "wb"); /* Flawfinder: ignore */
- BOOL successful_save = FALSE;
- if(fp && exportFile(fp))
- {
- successful_save = TRUE;
- }
- if(fp)
- {
- fclose(fp);
- fp = NULL;
- }
- if(!successful_save)
+ if(! exportFile(filename))
{
std::string buffer = llformat("Unable to save '%s' to wearable file.", mName.c_str());
LL_WARNS() << buffer << LL_ENDL;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9dcd0b81e0..e317989f04 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -898,8 +898,8 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
const char* buttonstatestr = "";
S32 x = pos.mX;
S32 y = pos.mY;
- x = llround((F32)x / mDisplayScale.mV[VX]);
- y = llround((F32)y / mDisplayScale.mV[VY]);
+ x = ll_round((F32)x / mDisplayScale.mV[VX]);
+ y = ll_round((F32)y / mDisplayScale.mV[VY]);
// only send mouse clicks to UI if UI is visible
if(gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
@@ -1065,8 +1065,8 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
{
S32 x = pos.mX;
S32 y = pos.mY;
- x = llround((F32)x / mDisplayScale.mV[VX]);
- y = llround((F32)y / mDisplayScale.mV[VY]);
+ x = ll_round((F32)x / mDisplayScale.mV[VX]);
+ y = ll_round((F32)y / mDisplayScale.mV[VY]);
BOOL down = TRUE;
BOOL handle = handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down);
@@ -1263,8 +1263,8 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
S32 x = pos.mX;
S32 y = pos.mY;
- x = llround((F32)x / mDisplayScale.mV[VX]);
- y = llround((F32)y / mDisplayScale.mV[VY]);
+ x = ll_round((F32)x / mDisplayScale.mV[VX]);
+ y = ll_round((F32)y / mDisplayScale.mV[VY]);
mMouseInWindow = TRUE;
@@ -1722,7 +1722,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
LLCoordWindow size;
mWindow->getSize(&size);
mWindowRectRaw.set(0, size.mY, size.mX, 0);
- mWindowRectScaled.set(0, llround((F32)size.mY / mDisplayScale.mV[VY]), llround((F32)size.mX / mDisplayScale.mV[VX]), 0);
+ mWindowRectScaled.set(0, ll_round((F32)size.mY / mDisplayScale.mV[VY]), ll_round((F32)size.mX / mDisplayScale.mV[VX]), 0);
}
LLFontManager::initClass();
@@ -2250,8 +2250,8 @@ void LLViewerWindow::reshape(S32 width, S32 height)
LLUI::setScaleFactor(mDisplayScale);
// update our window rectangle
- mWindowRectScaled.mRight = mWindowRectScaled.mLeft + llround((F32)width / mDisplayScale.mV[VX]);
- mWindowRectScaled.mTop = mWindowRectScaled.mBottom + llround((F32)height / mDisplayScale.mV[VY]);
+ mWindowRectScaled.mRight = mWindowRectScaled.mLeft + ll_round((F32)width / mDisplayScale.mV[VX]);
+ mWindowRectScaled.mTop = mWindowRectScaled.mBottom + ll_round((F32)height / mDisplayScale.mV[VY]);
setup2DViewport();
@@ -2444,8 +2444,8 @@ void LLViewerWindow::draw()
microsecondsToTimecodeString(gFrameTime,text);
const LLFontGL* font = LLFontGL::getFontSansSerif();
font->renderUTF8(text, 0,
- llround((getWindowWidthScaled()/2)-100.f),
- llround((getWindowHeightScaled()-60.f)),
+ ll_round((getWindowWidthScaled()/2)-100.f),
+ ll_round((getWindowHeightScaled()-60.f)),
LLColor4( 1.f, 1.f, 1.f, 1.f ),
LLFontGL::LEFT, LLFontGL::TOP);
}
@@ -2521,7 +2521,7 @@ void LLViewerWindow::draw()
const S32 DIST_FROM_TOP = 20;
LLFontGL::getFontSansSerifBig()->renderUTF8(
mOverlayTitle, 0,
- llround( getWindowWidthScaled() * 0.5f),
+ ll_round( getWindowWidthScaled() * 0.5f),
getWindowHeightScaled() - DIST_FROM_TOP,
LLColor4(1, 1, 1, 0.4f),
LLFontGL::HCENTER, LLFontGL::TOP);
@@ -3373,7 +3373,7 @@ void LLViewerWindow::updateMouseDelta()
fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds.value()*amount,1.f);
- mCurrentMouseDelta.set(llround(fdx), llround(fdy));
+ mCurrentMouseDelta.set(ll_round(fdx), ll_round(fdy));
mouse_vel.setVec(fdx,fdy);
}
else
@@ -3488,10 +3488,10 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
new_world_rect.mTop = llmax(new_world_rect.mTop, new_world_rect.mBottom + 1);
new_world_rect.mRight = llmax(new_world_rect.mRight, new_world_rect.mLeft + 1);
- new_world_rect.mLeft = llround((F32)new_world_rect.mLeft * mDisplayScale.mV[VX]);
- new_world_rect.mRight = llround((F32)new_world_rect.mRight * mDisplayScale.mV[VX]);
- new_world_rect.mBottom = llround((F32)new_world_rect.mBottom * mDisplayScale.mV[VY]);
- new_world_rect.mTop = llround((F32)new_world_rect.mTop * mDisplayScale.mV[VY]);
+ new_world_rect.mLeft = ll_round((F32)new_world_rect.mLeft * mDisplayScale.mV[VX]);
+ new_world_rect.mRight = ll_round((F32)new_world_rect.mRight * mDisplayScale.mV[VX]);
+ new_world_rect.mBottom = ll_round((F32)new_world_rect.mBottom * mDisplayScale.mV[VY]);
+ new_world_rect.mTop = ll_round((F32)new_world_rect.mTop * mDisplayScale.mV[VY]);
}
if (mWorldViewRectRaw != new_world_rect)
@@ -3757,7 +3757,12 @@ BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewe
return intersect;
}
-void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent)
+void LLViewerWindow::pickAsync( S32 x,
+ S32 y_from_bot,
+ MASK mask,
+ void (*callback)(const LLPickInfo& info),
+ BOOL pick_transparent,
+ BOOL pick_unselectable)
{
BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
@@ -3767,7 +3772,7 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback
pick_transparent = TRUE;
}
- LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, callback);
+ LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, pick_unselectable, callback);
schedulePick(pick_info);
}
@@ -3835,7 +3840,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans
// shortcut queueing in mPicks and just update mLastPick in place
MASK key_mask = gKeyboard->currentMask(TRUE);
- mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, NULL);
+ mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, FALSE, NULL);
mLastPick.fetchResults();
return mLastPick;
@@ -4084,7 +4089,7 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con
// Returns global position
-BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global)
+BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, BOOL ignore_distance)
{
LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y);
F32 mouse_dir_scale;
@@ -4093,6 +4098,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
F32 land_z;
const F32 FIRST_PASS_STEP = 1.0f; // meters
const F32 SECOND_PASS_STEP = 0.1f; // meters
+ const F32 draw_distance = ignore_distance ? MAX_FAR_CLIP : gAgentCamera.mDrawDistance;
LLVector3d camera_pos_global;
camera_pos_global = gAgentCamera.getCameraPositionGlobal();
@@ -4100,7 +4106,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
LLVector3 probe_point_region;
// walk forwards to find the point
- for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < gAgentCamera.mDrawDistance; mouse_dir_scale += FIRST_PASS_STEP)
+ for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < draw_distance; mouse_dir_scale += FIRST_PASS_STEP)
{
LLVector3d mouse_direction_global_d;
mouse_direction_global_d.setVec(mouse_direction_global * mouse_dir_scale);
@@ -5140,10 +5146,10 @@ void LLViewerWindow::calcDisplayScale()
LLRect LLViewerWindow::calcScaledRect(const LLRect & rect, const LLVector2& display_scale)
{
LLRect res = rect;
- res.mLeft = llround((F32)res.mLeft / display_scale.mV[VX]);
- res.mRight = llround((F32)res.mRight / display_scale.mV[VX]);
- res.mBottom = llround((F32)res.mBottom / display_scale.mV[VY]);
- res.mTop = llround((F32)res.mTop / display_scale.mV[VY]);
+ res.mLeft = ll_round((F32)res.mLeft / display_scale.mV[VX]);
+ res.mRight = ll_round((F32)res.mRight / display_scale.mV[VX]);
+ res.mBottom = ll_round((F32)res.mBottom / display_scale.mV[VY]);
+ res.mTop = ll_round((F32)res.mTop / display_scale.mV[VY]);
return res;
}
@@ -5247,6 +5253,7 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
BOOL pick_transparent,
BOOL pick_particle,
BOOL pick_uv_coords,
+ BOOL pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info))
: mMousePt(mouse_pos),
mKeyMask(keyboard_mask),
@@ -5262,7 +5269,8 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
mBinormal(),
mHUDIcon(NULL),
mPickTransparent(pick_transparent),
- mPickParticle(pick_particle)
+ mPickParticle(pick_particle),
+ mPickUnselectable(pick_unselectable)
{
}
@@ -5337,7 +5345,7 @@ void LLPickInfo::fetchResults()
// put global position into land_pos
LLVector3d land_pos;
- if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos))
+ if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos, mPickUnselectable))
{
// The selected point is beyond the draw distance or is otherwise
// not selectable. Return before calling mPickCallback().
@@ -5406,8 +5414,8 @@ void LLPickInfo::updateXYCoords()
LLPointer<LLViewerTexture> imagep = LLViewerTextureManager::getFetchedTexture(tep->getID());
if(mUVCoords.mV[VX] >= 0.f && mUVCoords.mV[VY] >= 0.f && imagep.notNull())
{
- mXYCoords.mX = llround(mUVCoords.mV[VX] * (F32)imagep->getWidth());
- mXYCoords.mY = llround((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight());
+ mXYCoords.mX = ll_round(mUVCoords.mV[VX] * (F32)imagep->getWidth());
+ mXYCoords.mY = ll_round((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight());
}
}
}
@@ -5436,7 +5444,7 @@ void LLPickInfo::getSurfaceInfo()
if (objectp)
{
- if (gViewerWindow->cursorIntersect(llround((F32)mMousePt.mX), llround((F32)mMousePt.mY), 1024.f,
+ if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
objectp, -1, mPickTransparent,
&mObjectFace,
&intersection,
@@ -5478,52 +5486,6 @@ void LLPickInfo::getSurfaceInfo()
}
}
-
-/* code to get UV via a special UV render - removed in lieu of raycast method
-LLVector2 LLPickInfo::pickUV()
-{
- LLVector2 result(-1.f, -1.f);
-
- LLViewerObject* objectp = getObject();
- if (!objectp)
- {
- return result;
- }
-
- if (mObjectFace > -1 &&
- objectp->mDrawable.notNull() && objectp->getPCode() == LL_PCODE_VOLUME &&
- mObjectFace < objectp->mDrawable->getNumFaces())
- {
- S32 scaled_x = llround((F32)mPickPt.mX * gViewerWindow->getDisplayScale().mV[VX]);
- S32 scaled_y = llround((F32)mPickPt.mY * gViewerWindow->getDisplayScale().mV[VY]);
- const S32 UV_PICK_WIDTH = 5;
- const S32 UV_PICK_HALF_WIDTH = (UV_PICK_WIDTH - 1) / 2;
- U8 uv_pick_buffer[UV_PICK_WIDTH * UV_PICK_WIDTH * 4];
- LLFace* facep = objectp->mDrawable->getFace(mObjectFace);
- if (facep)
- {
- LLGLState scissor_state(GL_SCISSOR_TEST);
- scissor_state.enable();
- LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION, scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH, FALSE);
- //glViewport(scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH);
- glScissor(scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH);
-
- glClear(GL_DEPTH_BUFFER_BIT);
-
- facep->renderSelectedUV();
-
- glReadPixels(scaled_x - UV_PICK_HALF_WIDTH, scaled_y - UV_PICK_HALF_WIDTH, UV_PICK_WIDTH, UV_PICK_WIDTH, GL_RGBA, GL_UNSIGNED_BYTE, uv_pick_buffer);
- U8* center_pixel = &uv_pick_buffer[4 * ((UV_PICK_WIDTH * UV_PICK_HALF_WIDTH) + UV_PICK_HALF_WIDTH + 1)];
-
- result.mV[VX] = (F32)((center_pixel[VGREEN] & 0xf) + (16.f * center_pixel[VRED])) / 4095.f;
- result.mV[VY] = (F32)((center_pixel[VGREEN] >> 4) + (16.f * center_pixel[VBLUE])) / 4095.f;
- }
- }
-
- return result;
-} */
-
-
//static
bool LLPickInfo::isFlora(LLViewerObject* object)
{
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 5d2df2dfd7..7fde52d4e1 100755
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -91,6 +91,7 @@ public:
BOOL pick_transparent,
BOOL pick_particle,
BOOL pick_surface_info,
+ BOOL pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info));
void fetchResults();
@@ -123,6 +124,7 @@ public:
LLVector3 mBinormal;
BOOL mPickTransparent;
BOOL mPickParticle;
+ BOOL mPickUnselectable;
void getSurfaceInfo();
private:
@@ -360,7 +362,12 @@ public:
void performPick();
void returnEmptyPicks();
- void pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE);
+ void pickAsync( S32 x,
+ S32 y_from_bot,
+ MASK mask,
+ void (*callback)(const LLPickInfo& pick_info),
+ BOOL pick_transparent = FALSE,
+ BOOL pick_unselectable = FALSE);
LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE);
LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth,
LLVector4a* intersection);
@@ -386,7 +393,7 @@ public:
//const LLVector3d& lastNonFloraObjectHitOffset();
// mousePointOnLand() returns true if found point
- BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global);
+ BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, BOOL ignore_distance = FALSE);
BOOL mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal);
LLVector3d clickPointInWorldGlobal(const S32 x, const S32 y_from_bot, LLViewerObject* clicked_object) const;
BOOL clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const;
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index 4e9400872a..c4430f4308 100755
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -123,10 +123,10 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
S32 x_begin, y_begin, x_end, y_end;
- x_begin = llround( x * mScaleInv );
- y_begin = llround( y * mScaleInv );
- x_end = llround( (x + width) * mScaleInv );
- y_end = llround( (y + width) * mScaleInv );
+ x_begin = ll_round( x * mScaleInv );
+ y_begin = ll_round( y * mScaleInv );
+ x_end = ll_round( (x + width) * mScaleInv );
+ y_end = ll_round( (y + width) * mScaleInv );
if (x_end > mWidth)
{
@@ -318,8 +318,8 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
S32 x_begin, y_begin, x_end, y_end;
x_begin = (S32)(x * mScaleInv);
y_begin = (S32)(y * mScaleInv);
- x_end = llround( (x + width) * mScaleInv );
- y_end = llround( (y + width) * mScaleInv );
+ x_end = ll_round( (x + width) * mScaleInv );
+ y_end = ll_round( (y + width) * mScaleInv );
if (x_end > mWidth)
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b54f341c31..6e0d77b10a 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -111,6 +111,9 @@ extern F32 ANIM_SPEED_MAX;
extern F32 ANIM_SPEED_MIN;
extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG;
+const F32 MAX_HOVER_Z = 2.0;
+const F32 MIN_HOVER_Z = -2.0;
+
// #define OUTPUT_BREAST_DATA
using namespace LLAvatarAppearanceDefines;
@@ -134,10 +137,6 @@ const LLUUID ANIM_AGENT_PHYSICS_MOTION = LLUUID("7360e029-3cb8-ebc4-863e-212df44
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
-
-const S32 MIN_PIXEL_AREA_FOR_COMPOSITE = 1024;
-const F32 SHADOW_OFFSET_AMT = 0.03f;
-
const F32 DELTA_TIME_MIN = 0.01f; // we clamp measured deltaTime to this
const F32 DELTA_TIME_MAX = 0.2f; // range to insure stability of computations.
@@ -145,22 +144,15 @@ const F32 PELVIS_LAG_FLYING = 0.22f;// pelvis follow half life while flying
const F32 PELVIS_LAG_WALKING = 0.4f; // ...while walking
const F32 PELVIS_LAG_MOUSELOOK = 0.15f;
const F32 MOUSELOOK_PELVIS_FOLLOW_FACTOR = 0.5f;
-const F32 PELVIS_LAG_WHEN_FOLLOW_CAM_IS_ON = 0.0001f; // not zero! - something gets divided by this!
const F32 TORSO_NOISE_AMOUNT = 1.0f; // Amount of deviation from up-axis, in degrees
const F32 TORSO_NOISE_SPEED = 0.2f; // Time scale factor on torso noise.
const F32 BREATHE_ROT_MOTION_STRENGTH = 0.05f;
-const F32 BREATHE_SCALE_MOTION_STRENGTH = 0.005f;
-
-const F32 MIN_SHADOW_HEIGHT = 0.f;
-const F32 MAX_SHADOW_HEIGHT = 0.3f;
const S32 MIN_REQUIRED_PIXEL_AREA_BODY_NOISE = 10000;
const S32 MIN_REQUIRED_PIXEL_AREA_BREATHE = 10000;
const S32 MIN_REQUIRED_PIXEL_AREA_PELVIS_FIX = 40;
-const S32 TEX_IMAGE_SIZE_SELF = 512;
-const S32 TEX_IMAGE_AREA_SELF = TEX_IMAGE_SIZE_SELF * TEX_IMAGE_SIZE_SELF;
const S32 TEX_IMAGE_SIZE_OTHER = 512 / 4; // The size of local textures for other (!isSelf()) avatars
const F32 HEAD_MOVEMENT_AVG_TIME = 0.9f;
@@ -252,6 +244,8 @@ struct LLAppearanceMessageContents
//U32 appearance_flags = 0;
std::vector<F32> mParamWeights;
std::vector<LLVisualParam*> mParams;
+ LLVector3 mHoverOffset;
+ bool mHoverOffsetWasSet;
};
struct LLVOAvatarChildJoint : public LLInitParam::ChoiceBlock<LLVOAvatarChildJoint>
@@ -716,10 +710,13 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
mLastUpdateRequestCOFVersion(-1),
- mLastUpdateReceivedCOFVersion(-1)
+ mLastUpdateReceivedCOFVersion(-1),
+ mCachedMuteListUpdateTime(0),
+ mCachedInMuteList(false)
{
//VTResume(); // VTune
-
+ setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );
@@ -772,6 +769,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mRuthTimer.reset();
mRuthDebugTimer.reset();
mDebugExistenceTimer.reset();
+ mLastAppearanceMessageTimer.reset();
if(LLSceneMonitor::getInstance()->isEnabled())
{
@@ -1955,6 +1953,11 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
// Do base class updates...
U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp);
+ //LLTEContents tec;
+ //S32 te_retval = parseTEMessage(mesgsys, _PREHASH_ObjectData, block_num, tec);
+
+ LL_DEBUGS("Avatar") << avString() << update_type << LL_ENDL;
+
// Print out arrival information once we have name of avatar.
if (has_name && getNVPair("FirstName"))
{
@@ -3121,10 +3124,9 @@ bool LLVOAvatar::isVisuallyMuted()
U32 max_cost = (U32) (max_render_cost*(LLVOAvatar::sLODFactor+0.5));
- muted = LLMuteList::getInstance()->isMuted(getID()) ||
- (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
- (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
- (mVisualComplexity > max_cost && max_render_cost > 0);
+ muted = (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) ||
+ (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) ||
+ (mVisualComplexity > max_cost && max_render_cost > 0);
// Could be part of the grand || collection above, but yanked out to make the logic visible
if (!muted)
@@ -3156,7 +3158,7 @@ bool LLVOAvatar::isVisuallyMuted()
}
}
- return muted;
+ return muted || isInMuteList();
}
void LLVOAvatar::forceUpdateVisualMuteSettings()
@@ -3165,13 +3167,27 @@ void LLVOAvatar::forceUpdateVisualMuteSettings()
mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() - 1.0;
}
+bool LLVOAvatar::isInMuteList()
+{
+ bool muted = false;
+ F64 now = LLFrameTimer::getTotalSeconds();
+ if (now < mCachedMuteListUpdateTime)
+ {
+ muted = mCachedInMuteList;
+ }
+ else
+ {
+ muted = LLMuteList::getInstance()->isMuted(getID());
-//------------------------------------------------------------------------
-// updateCharacter()
-// called on both your avatar and other avatars
-//------------------------------------------------------------------------
-BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
-{
+ const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1;
+ mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES;
+ mCachedInMuteList = muted;
+ }
+ return muted;
+}
+
+void LLVOAvatar::updateDebugText()
+{
// clear debug text
mDebugText.clear();
@@ -3208,6 +3224,22 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
}
debug_line += llformat(" bsz-z: %f avofs-z: %f", mBodySize[2], mAvatarOffset[2]);
+ bool hover_enabled = getRegion() && getRegion()->avatarHoverHeightEnabled();
+ debug_line += hover_enabled ? " H" : " h";
+ const LLVector3& hover_offset = getHoverOffset();
+ if (hover_offset[2] != 0.0)
+ {
+ debug_line += llformat(" hov_z: %f", hover_offset[2]);
+ debug_line += llformat(" %s", (mIsSitting ? "S" : "T"));
+ debug_line += llformat("%s", (isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED) ? "G" : "-"));
+ }
+ F32 elapsed = mLastAppearanceMessageTimer.getElapsedTimeF32();
+ static const char *elapsed_chars = "Xx*...";
+ U32 bucket = U32(elapsed*2);
+ if (bucket < strlen(elapsed_chars))
+ {
+ debug_line += llformat(" %c", elapsed_chars[bucket]);
+ }
addDebugText(debug_line);
}
if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
@@ -3215,7 +3247,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
if (!mBakedTextureDebugText.empty())
addDebugText(mBakedTextureDebugText);
}
-
+
if (LLVOAvatar::sShowAnimationDebug)
{
for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin();
@@ -3244,6 +3276,27 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
}
}
+ if (!mDebugText.size() && mText.notNull())
+ {
+ mText->markDead();
+ mText = NULL;
+ }
+ else if (mDebugText.size())
+ {
+ setDebugText(mDebugText);
+ }
+ mDebugText.clear();
+
+}
+
+//------------------------------------------------------------------------
+// updateCharacter()
+// called on both your avatar and other avatars
+//------------------------------------------------------------------------
+BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
+{
+ updateDebugText();
+
if (!mIsBuilt)
{
return FALSE;
@@ -3352,9 +3405,15 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
LLVector3 xyVel = getVelocity();
xyVel.mV[VZ] = 0.0f;
speed = xyVel.length();
-
+ // remembering the value here prevents a display glitch if the
+ // animation gets toggled during this update.
+ bool was_sit_ground_constrained = isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED);
+
if (!(mIsSitting && getParent()))
{
+ // This case includes all configurations except sitting on an
+ // object, so does include ground sit.
+
//--------------------------------------------------------------------
// get timing info
// handle initial condition case
@@ -3408,9 +3467,14 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// correct for the fact that the pelvis is not necessarily the center
// of the agent's physical representation
root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot;
+ if (!mIsSitting && !was_sit_ground_constrained)
+ {
+ root_pos += LLVector3d(getHoverOffset());
+ }
LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos);
+
if (newPosition != mRoot->getXform()->getWorldPosition())
{
mRoot->touch();
@@ -3575,7 +3639,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
}
else if (mDrawable.notNull())
{
- mRoot->setPosition(mDrawable->getPosition());
+ LLVector3 pos = mDrawable->getPosition();
+ pos += getHoverOffset() * mDrawable->getRotation();
+ mRoot->setPosition(pos);
mRoot->setRotation(mDrawable->getRotation());
}
@@ -3594,7 +3660,21 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
{
updateMotions(LLCharacter::NORMAL_UPDATE);
}
-
+
+ // Special handling for sitting on ground.
+ if (!getParent() && (mIsSitting || was_sit_ground_constrained))
+ {
+
+ F32 off_z = LLVector3d(getHoverOffset()).mdV[VZ];
+ if (off_z != 0.0)
+ {
+ LLVector3 pos = mRoot->getWorldPosition();
+ pos.mV[VZ] += off_z;
+ mRoot->touch();
+ mRoot->setWorldPosition(pos);
+ }
+ }
+
// update head position
updateHeadOffset();
@@ -3678,17 +3758,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
mRoot->updateWorldMatrixChildren();
- if (!mDebugText.size() && mText.notNull())
- {
- mText->markDead();
- mText = NULL;
- }
- else if (mDebugText.size())
- {
- setDebugText(mDebugText);
- }
- mDebugText.clear();
-
//mesh vertices need to be reskinned
mNeedsSkin = TRUE;
return TRUE;
@@ -4127,8 +4196,8 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
}
// Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair)
// TODO: 1.25 will be able to switch this logic back to calling isTextureVisible();
- if ( getImage(TEX_HAIR_BAKED, 0) &&
- getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha)
+ if ( ( getImage(TEX_HAIR_BAKED, 0) &&
+ getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE ) || LLDrawPoolAlpha::sShowDebugAlpha)
{
LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR);
if (hair_mesh)
@@ -4988,6 +5057,15 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
}
//-----------------------------------------------------------------------------
+// hasMotionFromSource()
+//-----------------------------------------------------------------------------
+// virtual
+bool LLVOAvatar::hasMotionFromSource(const LLUUID& source_id)
+{
+ return false;
+}
+
+//-----------------------------------------------------------------------------
// stopMotionFromSource()
//-----------------------------------------------------------------------------
// virtual
@@ -7117,6 +7195,17 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
// For future use:
//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0);
}
+
+ // Parse the AppearanceData field, if any.
+ contents.mHoverOffsetWasSet = false;
+ if (mesgsys->has(_PREHASH_AppearanceHover))
+ {
+ LLVector3 hover;
+ mesgsys->getVector3Fast(_PREHASH_AppearanceHover, _PREHASH_HoverHeight, hover);
+ LL_DEBUGS("Avatar") << avString() << " hover received " << hover.mV[ VX ] << "," << hover.mV[ VY ] << "," << hover.mV[ VZ ] << LL_ENDL;
+ contents.mHoverOffset = hover;
+ contents.mHoverOffsetWasSet = true;
+ }
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
@@ -7183,7 +7272,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
if (it != contents.mParams.end())
{
S32 index = it - contents.mParams.begin();
- contents.mParamAppearanceVersion = llround(contents.mParamWeights[index]);
+ contents.mParamAppearanceVersion = ll_round(contents.mParamWeights[index]);
LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << LL_ENDL;
}
}
@@ -7234,6 +7323,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
return;
}
+ mLastAppearanceMessageTimer.reset();
+
ESex old_sex = getSex();
LLAppearanceMessageContents contents;
@@ -7418,6 +7509,22 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
}
+ if (contents.mHoverOffsetWasSet && !isSelf())
+ {
+ // Got an update for some other avatar
+ // Ignore updates for self, because we have a more authoritative value in the preferences.
+ setHoverOffset(contents.mHoverOffset);
+ LL_INFOS("Avatar") << avString() << "setting hover from message" << contents.mHoverOffset[2] << LL_ENDL;
+ }
+
+ if (!contents.mHoverOffsetWasSet && !isSelf())
+ {
+ // If we don't get a value at all, we are presumably in a
+ // region that does not support hover height.
+ LL_WARNS() << avString() << "zeroing hover because not defined in appearance message" << LL_ENDL;
+ setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+ }
+
setCompositeUpdatesEnabled( TRUE );
// If all of the avatars are completely baked, release the global image caches to conserve memory.
@@ -8040,7 +8147,7 @@ void LLVOAvatar::updateImpostors()
BOOL LLVOAvatar::isImpostor()
{
- return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE;
+ return (sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD))) || isInMuteList() ? TRUE : FALSE;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 9a2aaf8aa3..1c3f4f2aa7 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -191,6 +191,7 @@ public:
/*virtual*/ LLUUID remapMotionID(const LLUUID& id);
/*virtual*/ BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f);
/*virtual*/ BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE);
+ virtual bool hasMotionFromSource(const LLUUID& source_id);
virtual void stopMotionFromSource(const LLUUID& source_id);
virtual void requestStopMotion(LLMotion* motion);
LLMotion* findMotion(const LLUUID& id) const;
@@ -213,7 +214,6 @@ public:
/*virtual*/ LLVector3 getPosAgentFromGlobal(const LLVector3d &position);
virtual void updateVisualParams();
-
/** Inherited
** **
*******************************************************************************/
@@ -233,6 +233,7 @@ private: //aligned members
// Updates
//--------------------------------------------------------------------
public:
+ void updateDebugText();
virtual BOOL updateCharacter(LLAgent &agent);
void idleUpdateVoiceVisualizer(bool voice_enabled);
void idleUpdateMisc(bool detailed_update);
@@ -382,6 +383,7 @@ public:
public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
bool isVisuallyMuted();
+ bool isInMuteList();
void setCachedVisualMute(bool muted) { mCachedVisualMute = muted; };
void forceUpdateVisualMuteSettings();
@@ -421,6 +423,9 @@ private:
bool mCachedVisualMute; // cached return value for isVisuallyMuted()
F64 mCachedVisualMuteUpdateTime; // Time to update mCachedVisualMute
+ bool mCachedInMuteList;
+ F64 mCachedMuteListUpdateTime;
+
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
//--------------------------------------------------------------------
@@ -987,6 +992,7 @@ public:
protected:
LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
+ LLFrameTimer mLastAppearanceMessageTimer; // Time since last appearance message received.
//--------------------------------------------------------------------
// COF monitoring
@@ -1019,6 +1025,9 @@ protected: // Shared with LLVOAvatarSelf
extern const F32 SELF_ADDITIONAL_PRI;
extern const S32 MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL;
+extern const F32 MAX_HOVER_Z;
+extern const F32 MIN_HOVER_Z;
+
std::string get_sequential_numbered_file_name(const std::string& prefix,
const std::string& suffix);
void dump_sequential_xml(const std::string outprefix, const LLSD& content);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 0be8df349d..1e9945b514 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -127,6 +127,25 @@ struct LocalTextureData
LLTextureEntry *mTexEntry;
};
+// TODO - this class doesn't really do anything, could just use a base
+// class responder if nothing else gets added.
+class LLHoverHeightResponder: public LLHTTPClient::Responder
+{
+public:
+ LLHoverHeightResponder(): LLHTTPClient::Responder() {}
+
+private:
+ void httpFailure()
+ {
+ LL_WARNS() << dumpResponse() << LL_ENDL;
+ }
+
+ void httpSuccess()
+ {
+ LL_INFOS() << dumpResponse() << LL_ENDL;
+ }
+};
+
//-----------------------------------------------------------------------------
// Callback data
//-----------------------------------------------------------------------------
@@ -159,7 +178,9 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
mScreenp(NULL),
mLastRegionHandle(0),
mRegionCrossingCount(0),
- mInitialBakesLoaded(false)
+ // Value outside legal range, so will always be a mismatch the
+ // first time through.
+ mLastHoverOffsetSent(LLVector3(0.0f, 0.0f, -999.0f))
{
mMotionController.mIsSelf = TRUE;
@@ -220,11 +241,40 @@ void LLVOAvatarSelf::initInstance()
return;
}
+ setHoverIfRegionEnabled();
+
//doPeriodically(output_self_av_texture_diagnostics, 30.0);
doPeriodically(update_avatar_rez_metrics, 5.0);
doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0);
}
+void LLVOAvatarSelf::setHoverIfRegionEnabled()
+{
+ if (getRegion() && getRegion()->simulatorFeaturesReceived())
+ {
+ if (getRegion()->avatarHoverHeightEnabled())
+ {
+ F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
+ setHoverOffset(LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)));
+ LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << hover_z << LL_ENDL;
+ }
+ else
+ {
+ setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+ LL_INFOS("Avatar") << avString() << " zeroing hover height, region does not support" << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_INFOS("Avatar") << avString() << " region or simulator features not known, no change on hover" << LL_ENDL;
+ if (getRegion())
+ {
+ getRegion()->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
+ }
+
+ }
+}
+
bool LLVOAvatarSelf::checkStuckAppearance()
{
const F32 CONDITIONAL_UNSTICK_INTERVAL = 300.0;
@@ -755,6 +805,13 @@ void LLVOAvatarSelf::requestStopMotion(LLMotion* motion)
}
// virtual
+bool LLVOAvatarSelf::hasMotionFromSource(const LLUUID& source_id)
+{
+ AnimSourceIterator motion_it = mAnimationSources.find(source_id);
+ return motion_it != mAnimationSources.end();
+}
+
+// virtual
void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
{
for (AnimSourceIterator motion_it = mAnimationSources.find(source_id); motion_it != mAnimationSources.end(); )
@@ -763,6 +820,7 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
mAnimationSources.erase(motion_it++);
}
+
LLViewerObject* object = gObjectList.findObject(source_id);
if (object)
{
@@ -827,6 +885,12 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
}
}
+void LLVOAvatarSelf::onSimulatorFeaturesReceived(const LLUUID& region_id)
+{
+ LL_INFOS("Avatar") << "simulator features received, setting hover based on region props" << LL_ENDL;
+ setHoverIfRegionEnabled();
+}
+
//virtual
void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
{
@@ -845,6 +909,17 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
//LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region
// << " while pos_from_new_region is " << pos_from_new_region
// << LL_ENDL;
+
+ // Update hover height, or schedule callback, based on whether
+ // it's supported in this region.
+ if (regionp->simulatorFeaturesReceived())
+ {
+ setHoverIfRegionEnabled();
+ }
+ else
+ {
+ regionp->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
+ }
}
if (!regionp || (regionp->getHandle() != mLastRegionHandle))
@@ -2701,6 +2776,39 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
return success;
}
+//------------------------------------------------------------------------
+// sendHoverHeight()
+//------------------------------------------------------------------------
+void LLVOAvatarSelf::sendHoverHeight() const
+{
+ std::string url = gAgent.getRegion()->getCapability("AgentPreferences");
+
+ if (!url.empty())
+ {
+ LLSD update = LLSD::emptyMap();
+ const LLVector3& hover_offset = getHoverOffset();
+ update["hover_height"] = hover_offset[2];
+
+ LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL;
+ LLHTTPClient::post(url, update, new LLHoverHeightResponder);
+
+ mLastHoverOffsetSent = hover_offset;
+ }
+}
+
+void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_update)
+{
+ if (getHoverOffset() != hover_offset)
+ {
+ LL_INFOS("Avatar") << avString() << " setting hover due to change " << hover_offset[2] << LL_ENDL;
+ LLVOAvatar::setHoverOffset(hover_offset, send_update);
+ }
+ if (send_update && (hover_offset != mLastHoverOffsetSent))
+ {
+ LL_INFOS("Avatar") << avString() << " sending hover due to change " << hover_offset[2] << LL_ENDL;
+ sendHoverHeight();
+ }
+}
//------------------------------------------------------------------------
// needsRenderBeam()
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 13ffc057b0..dc5e64d547 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -75,6 +75,9 @@ protected:
// LLViewerObject interface and related
//--------------------------------------------------------------------
public:
+ boost::signals2::connection mRegionChangedSlot;
+
+ void onSimulatorFeaturesReceived(const LLUUID& region_id);
/*virtual*/ void updateRegion(LLViewerRegion *regionp);
/*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time);
@@ -82,6 +85,7 @@ public:
// LLCharacter interface and related
//--------------------------------------------------------------------
public:
+ /*virtual*/ bool hasMotionFromSource(const LLUUID& source_id);
/*virtual*/ void stopMotionFromSource(const LLUUID& source_id);
/*virtual*/ void requestStopMotion(LLMotion* motion);
/*virtual*/ LLJoint* getJoint(const std::string &name);
@@ -105,7 +109,6 @@ private:
private:
LLUUID mInitialBakeIDs[6];
- bool mInitialBakesLoaded;
/********************************************************************************
@@ -327,6 +330,14 @@ public:
public:
bool sendAppearanceMessage(LLMessageSystem *mesgsys) const;
+ // -- care and feeding of hover height.
+ void setHoverIfRegionEnabled();
+ void sendHoverHeight() const;
+ /*virtual*/ void setHoverOffset(const LLVector3& hover_offset, bool send_update=true);
+
+private:
+ mutable LLVector3 mLastHoverOffsetSent;
+
/** Appearance
** **
*******************************************************************************/
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index b79a48012a..8d8f33b601 100755
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -51,7 +51,6 @@
const S32 GRASS_MAX_BLADES = 32;
const F32 GRASS_BLADE_BASE = 0.25f; // Width of grass at base
-const F32 GRASS_BLADE_TOP = 0.25f; // Width of grass at top
const F32 GRASS_BLADE_HEIGHT = 0.5f; // meters
const F32 GRASS_DISTRIBUTION_SD = 0.15f; // empirically defined
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 962cdf0268..e24884fe81 100755
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -1024,10 +1024,15 @@ void LLSpeakerVolumeStorage::load()
LLSD settings_llsd;
llifstream file;
- file.open(filename);
+ file.open(filename.c_str());
if (file.is_open())
{
- LLSDSerialize::fromXML(settings_llsd, file);
+ if (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXML(settings_llsd, file))
+ {
+ LL_WARNS("Voice") << "failed to parse " << filename << LL_ENDL;
+
+ }
+
}
for (LLSD::map_const_iterator iter = settings_llsd.beginMap();
@@ -1062,7 +1067,7 @@ void LLSpeakerVolumeStorage::save()
}
llofstream file;
- file.open(filename);
+ file.open(filename.c_str());
LLSDSerialize::toPrettyXML(settings_llsd, file);
}
}
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 23a8a61b85..cb83cf8fdf 100755
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -70,7 +70,6 @@ const F32 DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE = 1.0f;
//--------------------------------------------------------------------------------------
// other constants
//--------------------------------------------------------------------------------------
-const F32 ONE_HALF = 1.0f; // to clarify intent and reduce magic numbers in the code.
const LLVector3 WORLD_UPWARD_DIRECTION = LLVector3( 0.0f, 0.0f, 1.0f ); // Z is up in SL
//------------------------------------------------------------------
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index b6aecb4aaa..a6a7a35b03 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -2519,7 +2519,7 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
if(!p->mIsSelf)
{
// scale from the range 0.0-1.0 to vivox volume in the range 0-100
- S32 volume = llround(p->mVolume / VOLUME_SCALE_VIVOX);
+ S32 volume = ll_round(p->mVolume / VOLUME_SCALE_VIVOX);
bool mute = p->mOnMuteList;
if(mute)
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index c1593fa5fc..1ba0868544 100755
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -44,8 +44,6 @@
#include "pipeline.h"
#include "llspatialpartition.h"
-const F32 MAX_PART_LIFETIME = 120.f;
-
extern U64MicrosecondsImplicit gFrameTime;
LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL;
@@ -683,7 +681,7 @@ void LLVOPartGroup::getGeometry(S32 idx,
}
else
{
- pglow = LLColor4U(0, 0, 0, (U8) llround(255.f*part.mStartGlow));
+ pglow = LLColor4U(0, 0, 0, (U8) ll_round(255.f*part.mStartGlow));
pcolor = part.mStartColor;
}
}
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 07c2f0d44d..4dab213fa0 100755
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -62,8 +62,6 @@ static const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y;
static const F32 SUN_DISK_RADIUS = 0.5f;
static const F32 MOON_DISK_RADIUS = SUN_DISK_RADIUS * 0.9f;
static const F32 SUN_INTENSITY = 1e5;
-static const F32 SUN_DISK_INTENSITY = 24.f;
-
// Texture coordinates:
static const LLVector2 TEX00 = LLVector2(0.f, 0.f);
@@ -619,21 +617,6 @@ static inline LLColor3 colorMix(LLColor3 const & left, LLColor3 const & right, F
return (left + ((right - left) * amount));
}
-static inline F32 texture2D(LLPointer<LLImageRaw> const & tex, LLVector2 const & uv)
-{
- U16 w = tex->getWidth();
- U16 h = tex->getHeight();
-
- U16 r = U16(uv[0] * w) % w;
- U16 c = U16(uv[1] * h) % h;
-
- U8 const * imageBuffer = tex->getData();
-
- U8 sample = imageBuffer[r * w + c];
-
- return sample / 255.f;
-}
-
static inline LLColor3 smear(F32 val)
{
return LLColor3(val, val, val);
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 66c0ace79d..367fa21b91 100755
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -396,9 +396,6 @@ void LLVOTree::idleUpdate(LLAgent &agent, const F64 &time)
mTrunkLOD = trunk_LOD;
}
-const F32 TREE_BLEND_MIN = 1.f;
-const F32 TREE_BLEND_RANGE = 1.f;
-
void LLVOTree::render(LLAgent &agent)
{
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 66ee386874..0432f6f27c 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -78,10 +78,8 @@
#include "llvocache.h"
#include "llmaterialmgr.h"
-const S32 MIN_QUIET_FRAMES_COALESCE = 30;
const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
const F32 FORCE_CULL_AREA = 8.f;
-const F32 MAX_LOD_DISTANCE = 24.f;
U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 20;
BOOL gAnimateTextures = TRUE;
@@ -1222,7 +1220,7 @@ S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius)
{
// We've got LOD in the profile, and in the twist. Use radius.
F32 tan_angle = (LLVOVolume::sLODFactor*radius)/distance;
- cur_detail = LLVolumeLODGroup::getDetailFromTan(llround(tan_angle, 0.01f));
+ cur_detail = LLVolumeLODGroup::getDetailFromTan(ll_round(tan_angle, 0.01f));
}
else
{
@@ -1280,8 +1278,8 @@ BOOL LLVOVolume::calcLOD()
// DON'T Compensate for field of view changing on FOV zoom.
distance *= F_PI/3.f;
- cur_detail = computeLODDetail(llround(distance, 0.01f),
- llround(radius, 0.01f));
+ cur_detail = computeLODDetail(ll_round(distance, 0.01f),
+ ll_round(radius, 0.01f));
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) &&
@@ -1294,7 +1292,7 @@ BOOL LLVOVolume::calcLOD()
if (cur_detail != mLOD)
{
- mAppAngle = llround((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
+ mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
mLOD = cur_detail;
return TRUE;
}
@@ -1742,6 +1740,8 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
}
}
}
+
+ genBBoxes(FALSE);
}
// it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local
else
@@ -2038,21 +2038,235 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
return res;
}
-S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
-{
- S32 res = 0;
-
- if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode())
+bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture)
+{ //Ok, here we have confirmation about texture creation, check our wait-list
+ //and make changes, or return false
+
+ std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
+
+ typedef std::map<U8, LLMaterialPtr> map_te_material;
+ map_te_material new_material;
+
+ for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
+ {
+ LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+
+ //here we just interesting in DIFFUSE_MAP only!
+ if(NULL != cur_material.get() && LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat())
+ { //ok let's check the diffuse mode
+ switch(cur_material->getDiffuseAlphaMode())
+ {
+ case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
+ { //uups... we have non 32 bit texture with LLMaterial::DIFFUSE_ALPHA_MODE_* => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+
+ } break;
+ } //switch
+ } //if
+ } //for
+
+ //setup new materials
+ for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
{
- LLViewerObject::setTEMaterialID(te, LLMaterialID::null);
- res = LLViewerObject::setTEMaterialParams(te, NULL);
+ LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second);
+ LLViewerObject::setTEMaterialParams(it->first, it->second);
}
- else
+
+ //clear wait-list
+ mWaitingTextureInfo.erase(range.first, range.second);
+
+ return 0 != new_material.size();
+}
+
+bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
+{ //Ok, here if we wait information about texture and it's missing
+ //then depending from the texture map (diffuse, normal, or specular)
+ //make changes in material and confirm it. If not return false.
+ std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
+ if(range.first == range.second) return false;
+
+ typedef std::map<U8, LLMaterialPtr> map_te_material;
+ map_te_material new_material;
+
+ for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
{
- res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+ LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
+
+ switch(range_it->second.map)
+ {
+ case LLRender::DIFFUSE_MAP:
+ {
+ if(LLMaterial::DIFFUSE_ALPHA_MODE_NONE != cur_material->getDiffuseAlphaMode())
+ { //missing texture + !LLMaterial::DIFFUSE_ALPHA_MODE_NONE => LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+ }
+ } break;
+ case LLRender::NORMAL_MAP:
+ { //missing texture => reset material texture id
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setNormalID(LLUUID::null);
+ } break;
+ case LLRender::SPECULAR_MAP:
+ { //missing texture => reset material texture id
+ LLMaterialPtr mat = NULL;
+ map_te_material::iterator it = new_material.find(range_it->second.te);
+ if(new_material.end() == it) {
+ mat = new LLMaterial(cur_material->asLLSD());
+ new_material.insert(map_te_material::value_type(range_it->second.te, mat));
+ } else {
+ mat = it->second;
+ }
+
+ mat->setSpecularID(LLUUID::null);
+ } break;
+ case LLRender::NUM_TEXTURE_CHANNELS:
+ //nothing to do, make compiler happy
+ break;
+ } //switch
+ } //for
+
+ //setup new materials
+ for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it)
+ {
+ LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second);
+ LLViewerObject::setTEMaterialParams(it->first, it->second);
+ }
+
+ //clear wait-list
+ mWaitingTextureInfo.erase(range.first, range.second);
+
+ return 0 != new_material.size();
+}
+
+S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
+{
+ LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams);
+
+ if(pMaterialParams)
+ { //check all of them according to material settings
+
+ LLViewerTexture *img_diffuse = getTEImage(te);
+ LLViewerTexture *img_normal = getTENormalMap(te);
+ LLViewerTexture *img_specular = getTESpecularMap(te);
+
+ llassert(NULL != img_diffuse);
+
+ LLMaterialPtr new_material = NULL;
+
+ //diffuse
+ if(NULL != img_diffuse)
+ { //guard
+ if(0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset())
+ { //ok here we don't have information about texture, let's belief and leave material settings
+ //but we remember this case
+ mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te)));
+ }
+ else
+ {
+ bool bSetDiffuseNone = false;
+ if(img_diffuse->isMissingAsset())
+ {
+ bSetDiffuseNone = true;
+ }
+ else
+ {
+ switch(pMaterialParams->getDiffuseAlphaMode())
+ {
+ case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
+ case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
+ { //all of them modes available only for 32 bit textures
+ if(GL_RGBA != img_diffuse->getPrimaryFormat())
+ {
+ bSetDiffuseNone = true;
+ }
+ } break;
+ }
+ } //else
+
+
+ if(bSetDiffuseNone)
+ { //upps... we should substitute this material with LLMaterial::DIFFUSE_ALPHA_MODE_NONE
+ new_material = new LLMaterial(pMaterialParams->asLLSD());
+ new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE);
+ }
+ }
+ }
+
+ //normal
+ if(LLUUID::null != pMaterialParams->getNormalID())
+ {
+ if(img_normal && img_normal->isMissingAsset() && img_normal->getID() == pMaterialParams->getNormalID())
+ {
+ if(!new_material) {
+ new_material = new LLMaterial(pMaterialParams->asLLSD());
+ }
+ new_material->setNormalID(LLUUID::null);
+ }
+ else if(NULL == img_normal || 0 == img_normal->getPrimaryFormat())
+ { //ok here we don't have information about texture, let's belief and leave material settings
+ //but we remember this case
+ mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getNormalID(), material_info(LLRender::NORMAL_MAP,te)));
+ }
+
+ }
+
+
+ //specular
+ if(LLUUID::null != pMaterialParams->getSpecularID())
+ {
+ if(img_specular && img_specular->isMissingAsset() && img_specular->getID() == pMaterialParams->getSpecularID())
+ {
+ if(!new_material) {
+ new_material = new LLMaterial(pMaterialParams->asLLSD());
+ }
+ new_material->setSpecularID(LLUUID::null);
+ }
+ else if(NULL == img_specular || 0 == img_specular->getPrimaryFormat())
+ { //ok here we don't have information about texture, let's belief and leave material settings
+ //but we remember this case
+ mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getSpecularID(), material_info(LLRender::SPECULAR_MAP, te)));
+ }
+ }
+
+ if(new_material) {
+ pMaterial = new_material;
+ LLMaterialMgr::getInstance()->put(getID(),te,*pMaterial);
+ }
}
- LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res
+ S32 res = LLViewerObject::setTEMaterialParams(te, pMaterial);
+
+ LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterial) ? pMaterial->asLLSD() : LLSD("null")) << " res " << res
<< ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
<< LL_ENDL;
setChanged(ALL_CHANGED);
@@ -4960,7 +5174,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
facep->clearVertexBuffer();
}
}
-
+
if (is_rigged)
{
if (!drawablep->isState(LLDrawable::RIGGED))
@@ -4976,7 +5190,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
drawablep->clearState(LLDrawable::RIGGED);
}
-
}
}
@@ -5451,8 +5664,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
flexi = flexi || facep->getViewerObject()->getVolume()->isUnique();
}
- }
}
+ }
if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW_ARB)
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 7503f8c5aa..bbaca316b0 100755
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -372,17 +372,37 @@ private:
// statics
public:
- static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
+ static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
static F32 sLODFactor; // LOD scale factor
static F32 sDistanceFactor; // LOD distance factor
-
+
static LLPointer<LLObjectMediaDataClient> sObjectMediaClient;
static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient;
protected:
static S32 sNumLODChanges;
-
+
friend class LLVolumeImplFlexible;
+
+public:
+ bool notifyAboutCreatingTexture(LLViewerTexture *texture);
+ bool notifyAboutMissingAsset(LLViewerTexture *texture);
+
+private:
+ struct material_info
+ {
+ LLRender::eTexIndex map;
+ U8 te;
+
+ material_info(LLRender::eTexIndex map_, U8 te_)
+ : map(map_)
+ , te(te_)
+ {}
+ };
+
+ typedef std::multimap<LLUUID, material_info> mmap_UUID_MAP_t;
+ mmap_UUID_MAP_t mWaitingTextureInfo;
+
};
#endif // LL_LLVOVOLUME_H
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index e3419af10d..9ce16a1674 100755
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -43,9 +43,6 @@
#include "pipeline.h"
#include "llspatialpartition.h"
-const BOOL gUseRoam = FALSE;
-
-
///////////////////////////////////
template<class T> inline T LERP(T a, T b, F32 factor)
@@ -53,12 +50,6 @@ template<class T> inline T LERP(T a, T b, F32 factor)
return a + (b - a) * factor;
}
-const U32 N_RES_HALF = (N_RES >> 1);
-
-const U32 WIDTH = (N_RES * WAVE_STEP); //128.f //64 // width of wave tile, in meters
-const F32 WAVE_STEP_INV = (1. / WAVE_STEP);
-
-
LLVOWater::LLVOWater(const LLUUID &id,
const LLPCode pcode,
LLViewerRegion *regionp) :
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index c854e1fc66..374792193c 100755
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -150,7 +150,7 @@ void LLWaterParamManager::savePreset(const std::string & name)
paramsData = mParamList[name].getAll();
// write to file
- llofstream presetsXML(pathName);
+ llofstream presetsXML(pathName.c_str());
LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY);
presetsXML.close();
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 58a00c5be0..c731a7d6cf 100755
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -382,6 +382,10 @@ class LLWearableItemCreationDateComparator : public LLWearableItemNameComparator
{
LOG_CLASS(LLWearableItemCreationDateComparator);
+public:
+ // clang demands a default ctor here
+ LLWearableItemCreationDateComparator() {}
+
protected:
/*virtual*/ bool doCompare(const LLPanelInventoryListItemBase* item1, const LLPanelInventoryListItemBase* item2) const;
};
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 0312972a22..0be6e49834 100755
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -49,6 +49,8 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llnotificationsutil.h"
+#include "lluriparser.h"
+#include "uriparser/Uri.h"
#include <boost/regex.hpp>
@@ -238,9 +240,14 @@ bool LLWeb::useExternalBrowser(const std::string &url)
}
else if (gSavedSettings.getU32("PreferredBrowserBehavior") == BROWSER_INT_LL_EXT_OTHERS)
{
- boost::regex pattern = boost::regex("\\b(lindenlab.com|secondlife.com)\\b", boost::regex::perl|boost::regex::icase);
+ LLUriParser up(url);
+ up.normalize();
+ up.extractParts();
+ std::string uri_string = up.host();
+
+ boost::regex pattern = boost::regex("\\b(lindenlab.com|secondlife.com)$", boost::regex::perl|boost::regex::icase);
boost::match_results<std::string::const_iterator> matches;
- return !(boost::regex_search(url, matches, pattern));
+ return !(boost::regex_search(uri_string, matches, pattern));
}
return false;
}
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index a8e06511d7..734018cfc2 100755
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -44,10 +44,7 @@
#include <typeinfo>
#include <map>
#include <boost/scoped_ptr.hpp>
-#include <boost/lambda/core.hpp>
-#include <boost/lambda/bind.hpp>
-
-namespace bll = boost::lambda;
+#include <boost/bind.hpp>
LLWindowListener::LLWindowListener(LLViewerWindow *window, const KeyboardGetter& kbgetter)
: LLEventAPI("LLWindow", "Inject input events into the LLWindow instance"),
@@ -358,6 +355,30 @@ static WhichButton buttons;
typedef boost::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
+// arguments seems to require variadic templates and perfect forwarding. (We
+// used to be able to write (boost::lambda::bind(...), true), counting on
+// boost::lambda's comma operator overload, until
+// https://svn.boost.org/trac/boost/ticket/10864. And boost::phoenix doesn't
+// seem to overload comma the same way; or at least not with bind().)
+class MouseFuncTrue
+{
+ typedef boost::function<void(LLCoordGL, MASK)> MouseFuncVoid;
+ MouseFuncVoid mFunc;
+
+public:
+ MouseFuncTrue(const MouseFuncVoid& func):
+ mFunc(func)
+ {}
+
+ bool operator()(LLCoordGL coords, MASK mask) const
+ {
+ mFunc(coords, mask);
+ return true;
+ }
+};
+
static void mouseEvent(const MouseFunc& func, const LLSD& request)
{
// Ensure we send response
@@ -464,11 +485,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::lambda::bind() evidently
+ // complaint, but going through boost::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(bll::bind(actions.down, mWindow,
- static_cast<LLWindow*>(NULL), bll::_1, bll::_2),
+ mouseEvent(boost::bind(actions.down, mWindow,
+ static_cast<LLWindow*>(NULL), _1, _2),
request);
}
}
@@ -478,8 +499,8 @@ void LLWindowListener::mouseUp(LLSD const & request)
Actions actions(buttons.lookup(request["button"]));
if (actions.valid)
{
- mouseEvent(bll::bind(actions.up, mWindow,
- static_cast<LLWindow*>(NULL), bll::_1, bll::_2),
+ mouseEvent(boost::bind(actions.up, mWindow,
+ static_cast<LLWindow*>(NULL), _1, _2),
request);
}
}
@@ -489,12 +510,10 @@ void LLWindowListener::mouseMove(LLSD const & request)
// We want to call the same central mouseEvent() routine for
// handleMouseMove() as for button clicks. But handleMouseMove() returns
// void, whereas mouseEvent() accepts a function returning bool -- and
- // uses that bool return. Use (void-lambda-expression, true) to construct
- // a callable that returns bool anyway. Pass 'true' because we expect that
- // our caller will usually treat 'false' as a problem.
- mouseEvent((bll::bind(&LLWindowCallbacks::handleMouseMove, mWindow,
- static_cast<LLWindow*>(NULL), bll::_1, bll::_2),
- true),
+ // 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)),
request);
}
diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp
index e568638cf6..2142885767 100755
--- a/indra/newview/llwlanimator.cpp
+++ b/indra/newview/llwlanimator.cpp
@@ -242,7 +242,7 @@ std::string LLWLAnimator::timeToString(F32 curTime)
// get hours and minutes
hours = (S32) (24.0 * curTime);
curTime -= ((F32) hours / 24.0f);
- min = llround(24.0f * 60.0f * curTime);
+ min = ll_round(24.0f * 60.0f * curTime);
// handle case where it's 60
if(min == 60)
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index e9b0baf612..88079c5d26 100755
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -109,7 +109,7 @@ LLSD LLWLDayCycle::loadDayCycleFromPath(const std::string& file_path)
{
LL_INFOS("Windlight") << "Loading DayCycle settings from " << file_path << LL_ENDL;
- llifstream day_cycle_xml(file_path);
+ llifstream day_cycle_xml(file_path.c_str());
if (day_cycle_xml.is_open())
{
// load and parse it
@@ -137,7 +137,7 @@ void LLWLDayCycle::save(const std::string& file_path)
{
LLSD day_data = asLLSD();
- llofstream day_cycle_xml(file_path);
+ llofstream day_cycle_xml(file_path.c_str());
LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
formatter->format(day_data, day_cycle_xml, LLSDFormatter::OPTIONS_PRETTY);
day_cycle_xml.close();
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 91ea10d43d..2b6d88efef 100755
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -334,7 +334,7 @@ void LLWLParamManager::savePreset(LLWLParamKey key)
paramsData = mParamList[key].getAll();
// write to file
- llofstream presetsXML(pathName);
+ llofstream presetsXML(pathName.c_str());
LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY);
presetsXML.close();
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index b4e8114a5f..5d657f7eef 100755
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -70,7 +70,6 @@ U32 gAgentPauseSerialNum = 0;
//
// Constants
//
-const S32 MAX_NUMBER_OF_CLOUDS = 750;
const S32 WORLD_PATCH_SIZE = 16;
extern LLColor4U MAX_WATER_COLOR;
@@ -796,9 +795,12 @@ void LLWorld::updateNetStats()
add(LLStatViewer::PACKETS_IN, packets_in);
add(LLStatViewer::PACKETS_OUT, packets_out);
add(LLStatViewer::PACKETS_LOST, packets_lost);
- if (packets_in)
+
+ F32 total_packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
+ if (total_packets_in > 0)
{
- sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in));
+ F32 total_packets_lost = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
+ sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)total_packets_lost/(F32)total_packets_in));
}
mLastPacketsIn = gMessageSystem->mPacketsIn;
@@ -978,8 +980,8 @@ void LLWorld::updateWaterObjects()
}
// Resize and reshape the water objects
- const S32 water_center_x = center_x + llround((wx + dim[0]) * 0.5f * gDirAxes[dir][0]);
- const S32 water_center_y = center_y + llround((wy + dim[1]) * 0.5f * gDirAxes[dir][1]);
+ const S32 water_center_x = center_x + ll_round((wx + dim[0]) * 0.5f * gDirAxes[dir][0]);
+ const S32 water_center_y = center_y + ll_round((wy + dim[1]) * 0.5f * gDirAxes[dir][1]);
LLVOWater* waterp = mEdgeWaterObjects[dir];
if (!waterp || waterp->isDead())
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 7cb53a0706..62fad32246 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -67,7 +67,6 @@ const F32 OCEAN_GREEN = (F32)(0x47)/255.f;
const F32 OCEAN_BLUE = (F32)(0x5F)/255.f;
const F32 GODLY_TELEPORT_HEIGHT = 200.f;
-const S32 SCROLL_HINT_WIDTH = 65;
const F32 BIG_DOT_RADIUS = 5.f;
BOOL LLWorldMapView::sHandledLastClick = FALSE;
@@ -420,8 +419,8 @@ void LLWorldMapView::draw()
if (overlayimage)
{
// Inform the fetch mechanism of the size we need
- S32 draw_size = llround(sMapScale);
- overlayimage->setKnownDrawSize(llround(draw_size * LLUI::getScaleFactor().mV[VX]), llround(draw_size * LLUI::getScaleFactor().mV[VY]));
+ S32 draw_size = ll_round(sMapScale);
+ overlayimage->setKnownDrawSize(ll_round(draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(draw_size * LLUI::getScaleFactor().mV[VY]));
// Draw something whenever we have enough info
if (overlayimage->hasGLTexture())
{
@@ -509,7 +508,7 @@ void LLWorldMapView::draw()
drawImage(pos_global, sAvatarYouImage);
LLVector3 pos_map = globalPosToView(pos_global);
- if (!pointInView(llround(pos_map.mV[VX]), llround(pos_map.mV[VY])))
+ if (!pointInView(ll_round(pos_map.mV[VX]), ll_round(pos_map.mV[VY])))
{
drawTracking(pos_global,
lerp(LLColor4::yellow, LLColor4::orange, 0.4f),
@@ -774,8 +773,8 @@ void LLWorldMapView::drawGenericItem(const LLItemInfo& item, LLUIImagePtr image)
void LLWorldMapView::drawImage(const LLVector3d& global_pos, LLUIImagePtr image, const LLColor4& color)
{
LLVector3 pos_map = globalPosToView( global_pos );
- image->draw(llround(pos_map.mV[VX] - image->getWidth() /2.f),
- llround(pos_map.mV[VY] - image->getHeight()/2.f),
+ image->draw(ll_round(pos_map.mV[VX] - image->getWidth() /2.f),
+ ll_round(pos_map.mV[VY] - image->getHeight()/2.f),
color);
}
@@ -784,8 +783,8 @@ void LLWorldMapView::drawImageStack(const LLVector3d& global_pos, LLUIImagePtr i
LLVector3 pos_map = globalPosToView( global_pos );
for(U32 i=0; i<count; i++)
{
- image->draw(llround(pos_map.mV[VX] - image->getWidth() /2.f),
- llround(pos_map.mV[VY] - image->getHeight()/2.f + i*offset),
+ image->draw(ll_round(pos_map.mV[VX] - image->getWidth() /2.f),
+ ll_round(pos_map.mV[VY] - image->getHeight()/2.f + i*offset),
color);
}
}
@@ -959,8 +958,8 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
const std::string& label, const std::string& tooltip, S32 vert_offset )
{
LLVector3 pos_local = globalPosToView( pos_global );
- S32 x = llround( pos_local.mV[VX] );
- S32 y = llround( pos_local.mV[VY] );
+ S32 x = ll_round( pos_local.mV[VX] );
+ S32 y = ll_round( pos_local.mV[VY] );
LLFontGL* font = LLFontGL::getFontSansSerifSmall();
S32 text_x = x;
S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight());
@@ -1111,8 +1110,8 @@ static void drawDot(F32 x_pixels, F32 y_pixels,
if(-HEIGHT_THRESHOLD <= relative_z && relative_z <= HEIGHT_THRESHOLD)
{
- dot_image->draw(llround(x_pixels) - dot_image->getWidth()/2,
- llround(y_pixels) - dot_image->getHeight()/2,
+ dot_image->draw(ll_round(x_pixels) - dot_image->getWidth()/2,
+ ll_round(y_pixels) - dot_image->getHeight()/2,
color);
}
else
@@ -1167,9 +1166,9 @@ void LLWorldMapView::drawAvatar(F32 x_pixels,
dot_image = sAvatarAboveImage;
}
}
- S32 dot_width = llround(dot_radius * 2.f);
- dot_image->draw(llround(x_pixels - dot_radius),
- llround(y_pixels - dot_radius),
+ S32 dot_width = ll_round(dot_radius * 2.f);
+ dot_image->draw(ll_round(x_pixels - dot_radius),
+ ll_round(y_pixels - dot_radius),
dot_width,
dot_width,
color);
@@ -1196,8 +1195,8 @@ void LLWorldMapView::drawIconName(F32 x_pixels,
const std::string& second_line)
{
const S32 VERT_PAD = 8;
- S32 text_x = llround(x_pixels);
- S32 text_y = llround(y_pixels
+ S32 text_x = ll_round(x_pixels);
+ S32 text_y = ll_round(y_pixels
- BIG_DOT_RADIUS
- VERT_PAD);
@@ -1385,8 +1384,8 @@ void LLWorldMapView::setDirectionPos( LLTextBox* text_box, F32 rotation )
F32 radius = llmin( map_half_height - text_half_height, map_half_width - text_half_width );
text_box->setOrigin(
- llround(map_half_width - text_half_width + radius * cos( rotation )),
- llround(map_half_height - text_half_height + radius * sin( rotation )) );
+ ll_round(map_half_width - text_half_width + radius * cos( rotation )),
+ ll_round(map_half_height - text_half_height + radius * sin( rotation )) );
}
@@ -1434,8 +1433,8 @@ void LLWorldMapView::reshape( S32 width, S32 height, BOOL called_from_parent )
bool LLWorldMapView::checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bool track)
{
LLVector3 pos_view = globalPosToView(item.getGlobalPosition());
- S32 item_x = llround(pos_view.mV[VX]);
- S32 item_y = llround(pos_view.mV[VY]);
+ S32 item_x = ll_round(pos_view.mV[VX]);
+ S32 item_y = ll_round(pos_view.mV[VY]);
if (x < item_x - BIG_DOT_RADIUS) return false;
if (x > item_x + BIG_DOT_RADIUS) return false;
@@ -1599,8 +1598,8 @@ BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask )
{
gFocusMgr.setMouseCapture( this );
- mMouseDownPanX = llround(sPanX);
- mMouseDownPanY = llround(sPanY);
+ mMouseDownPanX = ll_round(sPanX);
+ mMouseDownPanY = ll_round(sPanY);
mMouseDownX = x;
mMouseDownY = y;
sHandledLastClick = TRUE;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3dfe1e5992..03712c1065 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -207,15 +207,9 @@ F32 LLPipeline::CameraDoFResScale;
F32 LLPipeline::RenderAutoHideSurfaceAreaLimit;
LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
-const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
-const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f;
-const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10;
-const U32 REFLECTION_MAP_RES = 128;
const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1;
-// Max number of occluders to search for. JC
-const S32 MAX_OCCLUDER_COUNT = 2;
extern S32 gBoxFrame;
//extern BOOL gHideSelectedObjects;
@@ -410,16 +404,6 @@ static LLPipelineListener sPipelineListener;
static LLCullResult* sCull = NULL;
-static const U32 gl_cube_face[] =
-{
- GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,
- GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
- GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,
- GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,
-};
-
void validate_framebuffer_object();
diff --git a/indra/newview/skins/default/textures/icons/hand.png b/indra/newview/skins/default/textures/icons/hand.png
new file mode 100644
index 0000000000..41b9600da6
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/hand.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 4f8962182e..8c20fe2e4b 100755
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -229,6 +229,8 @@ with the same filename but different name
<texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" />
<texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" />
+ <texture name="Hand" file_name="icons/hand.png" preload="false" />
+
<texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" />
<texture name="Hierarchy_View_Disabled" file_name="icons/Hierarchy_View_Disabled.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml
index f2ed7c2e64..aa6bc53672 100755
--- a/indra/newview/skins/default/xui/da/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/da/menu_viewer.xml
@@ -128,6 +128,7 @@
<menu_item_check label="Aktiver tips" name="Enable Hints"/>
<menu_item_call label="Rapporter misbrug" name="Report Abuse"/>
<menu_item_call label="Rapportér fejl" name="Report Bug"/>
+ <menu_item_call label="Stød, skub &amp; slag" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="Om [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Avanceret" name="Advanced">
@@ -261,8 +262,7 @@
<menu label="Netværk" name="Network">
<menu_item_check label="Pause avatar" name="AgentPause"/>
<menu_item_call label="Mist en netværkspakke" name="Drop a Packet"/>
- </menu>
- <menu_item_call label="Stød, skub &amp; slag" name="Bumps, Pushes &amp;amp; Hits"/>
+ </menu>
<menu label="Verden" name="DevelopWorld">
<menu_item_check label="Vælg anden sol end region" name="Sim Sun Override"/>
<menu_item_check label="Fast vejr" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/de/floater_stats.xml b/indra/newview/skins/default/xui/de/floater_stats.xml
index 993316134a..4e6f56cd94 100755
--- a/indra/newview/skins/default/xui/de/floater_stats.xml
+++ b/indra/newview/skins/default/xui/de/floater_stats.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Statistics" title="STATISTIKEN" width="280">
- <scroll_container name="statistics_scroll" width="280">
- <container_view name="statistics_view" width="280">
+<floater name="Statistics" title="STATISTIKEN">
+ <scroll_container name="statistics_scroll">
+ <container_view name="statistics_view">
<stat_view label="Basic" name="basic">
<stat_bar label="FPS" name="fps"/>
<stat_bar label="Empfangene UDP-Daten" name="bandwidth"/>
diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml
index c9fad9c9d3..50a6dafa91 100755
--- a/indra/newview/skins/default/xui/de/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/de/menu_viewer.xml
@@ -176,6 +176,7 @@
<menu_item_call label="[SECOND_LIFE]-Blogs" name="Second Life Blogs"/>
<menu_item_call label="Missbrauch melden" name="Report Abuse"/>
<menu_item_call label="Fehler melden" name="Report Bug"/>
+ <menu_item_call label="Rempler, Stöße &amp; Schläge" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="INFO ÜBER [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Erweitert" name="Advanced">
@@ -352,8 +353,7 @@
<menu_item_check label="Positionen der interpolierten Objekte anfragen" name="Ping Interpolate Object Positions"/>
<menu_item_call label="Ein Paket fallenlassen" name="Drop a Packet"/>
</menu>
- <menu_item_call label="Geskriptete Kamera ausgeben" name="Dump Scripted Camera"/>
- <menu_item_call label="Rempler, Stöße &amp; Schläge" name="Bumps, Pushes &amp;amp; Hits"/>
+ <menu_item_call label="Geskriptete Kamera ausgeben" name="Dump Scripted Camera"/>
<menu label="Rekorder" name="Recorder">
<menu_item_call label="Wiedergabe starten" name="Start Playback"/>
<menu_item_call label="Wiedergabe stoppen" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index ef2f158a86..60f36770bb 100755
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -51,44 +51,20 @@
name="credits_panel">
<text
follows="top|left|right"
- height="10"
+ height="20"
layout="topleft"
left="5"
name="linden_intro"
top="10"
width="435"
wrap="true">
-Second Life is brought to you by the Lindens:
- </text>
- <text_editor
- enabled="false"
- follows="top|left"
- height="98"
- bg_readonly_color="Transparent"
- left="5"
- text_color="LtGray"
- max_length="65536"
- name="linden_names"
- top_pad="10"
- width="435"
- word_wrap="true">
-Philip, Andrew, Doug, Richard, Phoenix, Ian, Mark, Robin, Dan, Char, Ryan, Eric, Jim, Lee, Jeff, Michael, Kelly, Steve, Catherine, Bub, Ramzi, Jill, Jeska, Don, Kona, Callum, Charity, Jack, Shawn, babbage, James, Lauren, Blue, Brent, Reuben, Pathfinder, Jesse, Patsy, Torley, Bo, Cyn, Jonathan, Gia, Annette, Ginsu, Harry, Lex, Runitai, Guy, Cornelius, Beth, Swiss, Thumper, Wendy, Teeple, Seth, Dee, Mia, Sally, Liana, Aura, Beez, Milo, Red, Gulliver, Marius, Joe, Jose, Dore, Justin, Nora, Morpheus, Lexie, Amber, Chris, Xan, Leyla, Walker, Sabin, Joshua, Hiromi, Tofu, Fritz, June, Jean, Ivy, Dez, Ken, Betsy, Which, Spike, Rob, Zee, Dustin, George, Claudia, del, Matthew, jane, jay, Adrian, Yool, Rika, Yoz, siobhan, Qarl, Benjamin, Beast, Everett, madhavi, Christopher, Izzy, stephany, Jeremy, sean, adreanne, Pramod, Tobin, sejong, Iridium, maurice, kj, Meta, kari, JP, bert, kyle, Jon, Socrates, Bridie, Ivan, maria, Aric, Coco, Periapse, sandy, Storrs, Lotte, Colossus, Brad, Pastrami, Zen, BigPapi, Banzai, Sardonyx, Mani, Garry, Jaime, Neuro, Samuel, Niko, CeeLo, Austin, Soft, Poppy, emma, tessa, angelo, kurz, alexa, Sue, CG, Blake, Erica, Brett, Bevis, kristen, Q, simon, Enus, MJ, laurap, Kip, Scouse, Ron, Ram, kend, Marty, Prospero, melissa, kraft, Nat, Seraph, Hamilton, Lordan, Green, miz, Ashlei, Trinity, Ekim, Echo, Charlie, Rowan, Rome, Jt, Doris, benoc, Christy, Bao, Kate, Tj, Patch, Cheah, Johan, Brandy, Angela, Oreh, Cogsworth, Lan, Mitchell, Space, Bambers, Einstein, Bender, Malbers, Matias, Maggie, Rothman, Milton, Niall, Marin, Allison, Mango, Andrea, Katt, Yi, Ambroff, Rico, Raymond, Gail, Christa, William, Dawn, Usi, Dynamike, M, Corr, Dante, Molly, kaylee, Danica, Kelv, Lil, jacob, Nya, Rodney, elsie, Blondin, Grant, Nyx, Devin, Monty, Minerva, Keira, Katie, Jenn, Makai, Clare, Joy, Cody, Gayathri, FJ, spider, Oskar, Landon, Jarv, Noelle, Al, Doc, Gray, Vir, t, Maestro, Simone, Shannon, yang, Courtney, Scott, charlene, Quixote, Susan, Zed, Amanda, Katelin, Esbee, JoRoan, Enkidu, roxie, Scarlet, Merov, Kevin, Judy, Rand, Newell, Les, Dessie, Galen, Michon, Geo, Siz, Calyle, Pete, Praveen, Callen, Sheldon, Pink, Nelson, jenelle, Terrence, Nathan, Juan, Sascha, Huseby, Karina, Kaye, Kotler, Lis, Darv, Charrell, Dakota, Kimmora, Theeba, Taka, Mae, Perry, Ducot, dana, Esther, Dough, gisele, Doten, Viale, Fisher, jessieann, ashley, Torres, delby, rountree, kurt, Slaton, Madison, Rue, Gino, Wen, Casssandra, Brodesky, Squid, Gez, Rakesh, Gecko, Ladan, Tony, Tatem, Squire, Falcon, BK, Crimp, Tiggs, Bacon, Coyot, Carmilla, Webb, Sea, Arch, Jillian, Jason, Bernard, Vogt, Peggy, dragon, Pup, xandix, Wallace, Bewest, Inoshiro, Rhett, AG, Aimee, Ghengis, Itiaes, Eli, Steffan, Epic, Grapes, Stone, Prep, Scobu, Robert, Alain, Carla, Vicky, Tia, Alec, Taras, Lisa, Oz, Ariane, Log, House, Kazu, Kim, Drofnas, Tyler, Campbell, Michele, Madeline, Nelly, Baron, Thor, Lori, Hele, Fredrik, Teddy, Pixie, Berry, Gabrielle, Alfonso, Brooke, Wolf, Ringo, Cru, Charlar, Rodvik, Gibson, Elise, Bagman, Greger, Leonidas, Jerm, Leslie, CB, Brenda, Durian, Carlo, mm, Zeeshan, Caleb, Max, Elikak, Mercille, Steph, Chase, Baker
- </text_editor>
- <text
- follows="top|left"
- height="10"
- layout="topleft"
- left="5"
- name="contrib_intro"
- top_pad="10"
- width="435"
- wrap="true">
+Second Life is brought to you by the Lindens,
with open source contributions from:
</text>
<text_editor
enabled="false"
follows="top|left"
- height="98"
+ height="340"
bg_readonly_color="Transparent"
left="5"
text_color="LtGray"
@@ -99,31 +75,6 @@ with open source contributions from:
word_wrap="true">
Dummy Name replaced at run time
</text_editor>
- <text
- follows="top|left"
- height="10"
- layout="topleft"
- left="5"
- name="trans_intro"
- top_pad="10"
- width="435"
- wrap="true">
-and translations from:
- </text>
- <text_editor
- enabled="false"
- follows="top|left"
- height="98"
- bg_readonly_color="Transparent"
- left="5"
- text_color="LtGray"
- max_length="65536"
- name="trans_names"
- top_pad="10"
- width="435"
- word_wrap="true">
-Dummy Name replaced at run time
- </text_editor>
</panel>
<panel
border="true"
@@ -138,7 +89,7 @@ Dummy Name replaced at run time
left="5"
text_color="LtGray"
max_length="65536"
- name="credits_editor"
+ name="licenses_editor"
top="5"
width="435"
word_wrap="true">
diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
new file mode 100755
index 0000000000..8ec6735a01
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ positioning="cascading"
+ ignore_ui_scale="false"
+ legacy_header_height="225"
+ can_minimize="true"
+ can_close="true"
+ can_resize="true"
+ min_height="65"
+ min_width="515"
+ height="65"
+ layout="topleft"
+ name="HoverHeight"
+ single_instance="true"
+ help_topic="hover_height"
+ save_rect="true"
+ save_visibility="true"
+ title="SET HOVER HEIGHT"
+ width="515">
+ <slider
+ enabled="false"
+ control_name="HoverHeightSlider"
+ decimal_digits="3"
+ follows="top|left"
+ height="15"
+ increment="0.001"
+ initial_value="0.0"
+ label="Height"
+ label_width="60"
+ left="10"
+ width="501"
+ layout="topleft"
+ name="HoverHeightSlider"
+ top="35"
+ can_edit_text="true"
+ >
+ </slider>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
index adef066aef..6667238232 100755
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
@@ -304,16 +304,20 @@
left_pad="5"
layout="topleft"
follows="left|top"
- name="combobox sale copy"
+ name="ComboBoxSaleType"
width="110">
- <combo_box.item
- label="Copy"
+ <combo_box.item
name="Copy"
- value="Copy" />
- <combo_box.item
- label="Original"
+ label="Copy"
+ value="2" />
+ <combo_box.item
+ name="Contents"
+ label="Contents"
+ value="3" />
+ <combo_box.item
name="Original"
- value="Original" />
+ label="Original"
+ value="1" />
</combo_box>
<spinner
follows="left|top"
@@ -427,34 +431,6 @@
Mark Item:
</text-->
-
- <!--radio_group
- draw_border="false"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_delta="78"
- name="RadioSaleType"
- top_delta="0"
- width="252">
- <radio_item
- height="16"
- label="Original"
- layout="topleft"
- left="0"
- name="radio"
- top="0"
- width="70" />
- <radio_item
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="60"
- name="radio2"
- top_delta="0"
- width="70" />
- </radio_group-->
-
<!--text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index 8baa0a56f7..c4ac936334 100755
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -2,10 +2,12 @@
<floater
legacy_header_height="18"
height="460"
+ min_height="460"
layout="topleft"
name="gesture_preview"
help_topic="gesture_preview"
- width="280">
+ width="280"
+ min_width="280">
<floater.string
name="step_anim">
Animation to play:
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index fbf262441f..90f9591f29 100755
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -37,9 +37,11 @@
<stat_bar name="bandwidth"
label="UDP Data Received"
stat="activemessagedatareceived"
+ decimal_digits="0"
show_bar="true"/>
<stat_bar name="packet_loss"
label="Packet Loss"
+ decimal_digits="1"
stat="packetslostpercentstat"/>
<stat_bar name="ping"
label="Ping Sim"
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index bcbc8d5b86..c6ae844d67 100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -91,6 +91,14 @@ name="Edit Outfit">
<menu_item_call.on_enable
function="Edit.EnableEditShape" />
</menu_item_call>
+ <menu_item_call label="Hover Height"
+ layout="topleft"
+ name="Hover Height">
+ <menu_item_call.on_click
+ function="HoverHeight" />
+ <menu_item_call.on_enable
+ function="Edit.EnableHoverHeight" />
+ </menu_item_call>
<menu_item_call
label="My Friends"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index 8bd013f14b..cfbbe41f95 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -96,14 +96,11 @@
function="Tools.LookAtSelection"
parameter="zoom" />
</menu_item_call>
- <menu_item_call
- enabled="false"
+ <menu_item_call
label="Pay"
name="Pay...">
<menu_item_call.on_click
- function="PayObject" />
- <menu_item_call.on_enable
- function="EnablePayAvatar" />
+ function="PayObject" />
</menu_item_call>
<menu_item_separator />
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index ca0c9bd5e4..d3b0b07f70 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -229,6 +229,14 @@
<menu_item_call.on_enable
function="Edit.EnableEditShape" />
</menu_item_call>
+ <menu_item_call label="Hover Height"
+ layout="topleft"
+ name="Hover Height">
+ <menu_item_call.on_click
+ function="HoverHeight" />
+ <menu_item_call.on_enable
+ function="Edit.EnableHoverHeight" />
+ </menu_item_call>
<menu_item_call
label="My Friends"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index 5c98a98d3d..dc9622a27d 100755
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -78,7 +78,7 @@
<menu_item_call.on_enable
function="EnableSelectInPathfindingLinksets"/>
<menu_item_call.on_visible
- function="EnableSelectInPathfindingLinksets"/>
+ function="VisibleSelectInPathfindingLinksets"/>
</menu_item_call>
<menu_item_call
label="Show in characters"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 560f81a6fd..b75d614dcc 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1417,7 +1417,14 @@
</menu_item_call>
<menu_item_separator/>
-
+ <menu_item_call
+ label="Bumps, Pushes &amp; Hits"
+ name="Bumps, Pushes &amp;amp; Hits">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="bumps" />
+ </menu_item_call>
+ <menu_item_separator/>
<menu_item_call
label="About [APP_NAME]"
name="About Second Life">
@@ -3031,15 +3038,7 @@
name="Dump Scripted Camera">
<menu_item_call.on_click
function="Advanced.DumpScriptedCamera" />
- </menu_item_call>
- <menu_item_call
- label="Bumps, Pushes &amp; Hits"
- name="Bumps, Pushes &amp;amp; Hits">
- <menu_item_call.on_click
- function="Floater.Show"
- parameter="bumps" />
- </menu_item_call>
-
+ </menu_item_call>
<menu
create_jump_keys="true"
label="Recorder"
@@ -3591,16 +3590,6 @@
function="ToggleControl"
parameter="ImagePipelineUseHTTP" />
</menu_item_check>
- <menu_item_check
- label="HTTP Inventory"
- name="HTTP Inventory">
- <menu_item_check.on_check
- function="CheckControl"
- parameter="UseHTTPInventory" />
- <menu_item_check.on_click
- function="ToggleControl"
- parameter="UseHTTPInventory" />
- </menu_item_check>
<menu_item_call
label="Compress Images"
name="Compress Images">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index ea1bc66236..28565a85c6 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -34,6 +34,12 @@
</form>
</template>
+ <template name="notifyignore">
+ <form>
+ <ignore text="$ignoretext"/>
+ </form>
+ </template>
+
<template name="okcancelbuttons">
<form>
<button
@@ -1191,6 +1197,18 @@ Save Changes?
<notification
icon="alertmodal.tga"
+ name="DeleteNotecard"
+ type="alertmodal">
+Delete Notecard?
+ <tag>confirm</tag>
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="GestureSaveFailedTooManySteps"
type="alertmodal">
Gesture save failed.
@@ -5259,6 +5277,17 @@ Warning: The &apos;Pay object&apos; click action has been set, but it will only
<notification
icon="alertmodal.tga"
+ name="PayObjectFailed"
+ type="alertmodal">
+ Payment failed: object was not found.
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="OpenObjectCannotCopy"
type="alertmodal">
There are no items in this object that you are allowed to copy.
@@ -9490,6 +9519,9 @@ You have been teleported home by the object '[OBJECT_NAME]'
type="notify">
<tag>fail</tag>
You have been teleported by an attachment on [ITEM_ID]
+ <usetemplate
+ ignoretext="Teleport: You have been teleported by an attachment"
+ name="notifyignore"/>
</notification>
<notification
@@ -9498,6 +9530,9 @@ You have been teleported by an attachment on [ITEM_ID]
type="notify">
<tag>fail</tag>
You have been teleported by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]'
+ <usetemplate
+ ignoretext="Teleport: You have been teleported by an object on a parcel"
+ name="notifyignore"/>
</notification>
<notification
@@ -10386,7 +10421,7 @@ Cannot create large prims that intersect other players. Please re-try when othe
icon="alertmodal.tga"
name="DefaultObjectPermissions"
type="alert">
- There was a problem saving the default permissions due to the following reason: [REASON]. Please try setting the default permissions later.
+ There was a problem saving the default object permissions: [REASON]. Please try setting the default permissions later.
<tag>fail</tag>
<usetemplate
name="okbutton"
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index a258a874b0..183ae2e824 100755
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -19,7 +19,7 @@
left="0"
name="ui_stack"
orientation="horizontal"
- top="0"
+ top="10"
width="1024">
<layout_panel
height="172"
@@ -30,7 +30,7 @@
auto_resize="false"
follows="left|right|top"
name="ui_container"
- width="960"
+ width="1000"
left="0"
top="0"
height="172">
@@ -56,7 +56,8 @@
name="username_combo"
width="232">
<combo_box.combo_editor
- text_pad_left="8" />
+ text_pad_left="8"
+ bg_image_always_focused="true"/>
<combo_box.combo_button
visible="false" />
<combo_box.drop_down_button
@@ -65,79 +66,42 @@
<line_editor
follows="left|top"
height="32"
- left_pad="0"
+ left_pad="-11"
max_length_bytes="16"
text_pad_left="8"
name="password_edit"
label="Password"
+ bg_image_always_focused="true"
font="SansSerifLarge"
is_password="true"
select_on_focus="true"
commit_on_focus_lost="false"
bottom_delta="0"
- width="200" />
- <check_box
- control_name="RememberPassword"
- follows="left|top"
- font="SansSerifMedium"
- left_pad="20"
- bottom_delta="-14"
- height="24"
- label="Remember me"
- check_button.bottom="3"
- name="remember_check"
- width="145" />
- <text
- follows="left|top"
- font="SansSerifMedium"
- text_color="EmphasisColor"
- height="16"
- name="forgot_password_text"
- left_delta="0"
- bottom_delta="16"
- width="200">
- Forgotten password
- </text>
- <button
- follows="left|top"
- image_unselected="PushButton_Login"
- image_pressed="PushButton_Login_Pressed"
- image_hover="PushButton_Login_Over"
- label="Log In"
- label_color="White"
- font="SansSerifMedium"
- name="connect_btn"
- enabled="true"
- left="0"
- width="80"
- height="26"
- bottom_delta="44" />
- <text
- follows="left|top"
- font="SansSerifLarge"
- height="24"
- name="At_My_Last_Location_Label"
- left_pad="8"
- bottom_delta="1"
- width="120">
- at last location
- </text>
+ width="165" />
<combo_box
- control_name="NextLoginLocation"
+ allow_text_entry="true"
+ control_name="NextLoginLocation"
follows="left|top"
label="My favorite places"
- height="26"
+ height="32"
max_chars="128"
- combo_editor.font="SansSerifMedium"
- left_pad="20"
+ combo_editor.font="SansSerifLarge"
+ left_pad="15"
bottom_delta="0"
name="start_location_combo"
width="175"
combo_button.scale_image="true">
+ <combo_box.combo_editor
+ bg_image_always_focused="true"
+ text_pad_left="8"/>
+ <combo_box.item
+ label="My last location"
+ name="MyLastLocation"
+ value="last" />
<combo_box.item
label="My home"
name="MyHome"
- value="home" />
+ value="home" />
</combo_box>
<button
follows="left|top"
@@ -147,53 +111,48 @@
label="Log In"
label_color="White"
font="SansSerifMedium"
- name="connect_favorite_btn"
- left_pad="8"
- width="80"
- enabled="false"
- height="26"
- bottom_delta="0" />
- <line_editor
+ name="connect_btn"
+ enabled="true"
+ width="120"
+ height="32"
+ left_pad="15"
+ bottom_delta="0" />
+ <check_box
+ control_name="RememberPassword"
follows="left|top"
- width="170"
- height="26"
- left_pad="40"
- text_pad_left="8"
- name="location_edit"
- label="Type a location"
font="SansSerifMedium"
- select_on_focus="true"
- commit_on_focus_lost="false"
- bottom_delta="0" />
- <button
+ left="185"
+ bottom_delta="21"
+ height="24"
+ label="Remember me"
+ check_button.bottom="3"
+ name="remember_check"
+ width="145" />
+ <text
follows="left|top"
- image_unselected="PushButton_Login"
- image_pressed="PushButton_Login_Pressed"
- image_hover="PushButton_Login_Over"
- label="Log In"
- enabled="false"
- label_color="White"
font="SansSerifMedium"
- name="connect_location_btn"
- left_pad="8"
- width="80"
- height="26"
- bottom_delta="0" />
+ text_color="EmphasisColor"
+ height="16"
+ name="forgot_password_text"
+ left="408"
+ bottom_delta="0"
+ width="200">
+ Forgotten password
+ </text>
<combo_box
allow_text_entry="false"
font="SansSerifTiny"
follows="left|top"
height="26"
+ left="588"
+ bottom_delta="10"
max_chars="128"
- label="Select grid"
- left_pad="40"
- bottom_delta="0"
+ label="Select grid"
layout="topleft"
- top_pad="2"
name="server_combo"
- width="128" />
- </layout_panel>
- <layout_panel
+ width="149" />
+ </layout_panel>
+ <layout_panel
height="172"
auto_resize="true"
name="ui_elastic_pad_right"
diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml
index 84753c55a3..d1416ece82 100644
--- a/indra/newview/skins/default/xui/en/panel_login_first.xml
+++ b/indra/newview/skins/default/xui/en/panel_login_first.xml
@@ -102,7 +102,7 @@
allow_text_entry="true"
follows="left|bottom"
height="32"
- left="0"
+ left="2"
label="Username"
combo_editor.font="SansSerifLarge"
max_chars="128"
@@ -163,7 +163,7 @@
text_color="EmphasisColor"
height="16"
name="forgot_password_text"
- left="216"
+ left="219"
top="34"
width="200">
Forgotten password
diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
index 56f3c36df6..3dbe11387a 100644
--- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
@@ -11,10 +11,10 @@
height="202"
can_resize="true"
layout="topleft"
- follows="left|top|right|bottom"
- background_opaque="false"
- background_visible="true"
- bg_alpha_color="PanelNotificationListItem" >
+ follows="left|top|right|bottom" >
+ <!-- background_opaque="false" -->
+ <!-- background_visible="true"> -->
+ <!-- bg_alpha_color="PanelNotificationListItem"> -->
<panel.string
name="sender_resident_text">
Sender: "[SENDER_RESIDENT]"
@@ -41,105 +41,103 @@
</panel.string>
<panel top="0" left="0" width="331" height="196" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_total_view">
- <layout_stack top="0" left="0" width="331" height="196" orientation="vertical" follows="left|top|right|bottom" name="item_vertical_stack">
- <layout_panel top="0" left="0" height="30" follows="left|top|right|bottom" layout="topleft" name="layout_panel_condensed_view" visible="false">
- <panel border="true" top="0" left="5" height="30" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_condensed_view">
- <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack">
- <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right">
- <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/>
- <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/>
- <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification" visible="false"/>
- </layout_panel>
- <layout_panel width="260" height="50" orientation="horizontal" name="layout_panel_middle">
- <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right" layout="topleft" name="main_info_panel">
- <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="notification_title_panel">
- <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="260" height="12" layout="topleft" follows="right|left" text_color="White"
- use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_title" >
- Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle
- </text>
- <icon top="1" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="attachment_icon" tool_tip="Attachment" visible="false"/>
- </panel>
- <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel">
- <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="170" height="13" layout="topleft" follows="right|left"
- use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false">
- Sender: "Resident R e s i d e n t R e s i d e n t"
- </text>
- <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
- name="notification_time" value="2014/12/24 23:30" />
- </panel>
- </panel>
- </layout_panel>
- <layout_panel width="18" height="48" orientation="horizontal" follows="right|top|bottom" name="layout_panel_right">
- <panel top="0" left="0" width="17" height="39" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel">
- <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true"
- tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" />
- <button bottom="-16" right="15" width="17" height="17" layout="topleft" follows="bottom" name="expand_btn" mouse_opaque="true"
- tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" />
- </panel>
- </layout_panel>
- </layout_stack>
- </panel>
- </layout_panel>
- <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true">
- <panel border="true" top="0" left="5" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view">
- <layout_stack top="0" left="0" width="325" height="196" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack">
- <layout_panel width="30" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp">
- <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/>
- <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon_exp" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/>
- <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification" visible="false"/>
- <icon left="12" top="144" width="20" height="20" name="attachment_icon_exp" tool_tip="Attachment" image_name="Icon_Attachment_Large" follows="left" mouse_opaque="true" visible="false"/>
- </layout_panel>
- <layout_panel width="230" height="196" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp">
- <panel border="false" top="0" width="230" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded">
- <layout_stack top="0" left="0" width="230" height="196" orientation="vertical" follows="left|top|right|bottom" name="main_info_panel_vertical_stack">
- <layout_panel top="0" left="0" width="230" height="30" layout="topleft" follows="left|top|right|bottom" name="notification_title_layout_panel" visible="true">
- <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp">
- <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White"
- use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp">
- Notice Title Notice Title N o t i c e T i t l e N o t i c e T i t l e
- </text>
- <text allow_scroll="false" font="SansSerif" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White"
- use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" visible="false">
- Group Name Group Name Group Na m e e
- </text>
- </panel>
- <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp">
- <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="145" height="13" layout="topleft" follows="right|left"
- use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false">
- Sender: "Resident R e s i d e n t R e s i d e n t"
- </text>
- <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
- name="notification_time_exp" value="2014/12/24 23:30" />
- </panel>
- <panel border="true" left="1" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true"
- bg_visible="true">
- <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="70" layout="topleft" follows="left|top|right|bottom"
- use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="370" name="notification_text_exp" >
- Notice text goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla .
- </text>
- </panel>
- <panel border="true" left="1" bottom="-5" width="230" height="22" bevel_style="none" follows="left|right|bottom" layout="topleft" name="attachment_panel" visible="false"
- bg_visible="true">
- <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom"
- use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="96" name="attachment_text">
- Attachment goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla .
- </text>
- </panel>
- </layout_panel>
+ <layout_stack top="0" left="0" width="331" height="196" orientation="vertical" follows="left|top|right|bottom" name="item_vertical_stack">
+ <layout_panel top="0" left="0" height="30" follows="left|top|right|bottom" layout="topleft" name="layout_panel_condensed_view" visible="false">
+ <panel border="true" top="0" left="5" height="30" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_condensed_view">
+ <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack">
+ <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right">
+ <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/>
+ <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/>
+ <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification" visible="false"/>
+ </layout_panel>
+ <layout_panel width="260" height="50" orientation="horizontal" name="layout_panel_middle">
+ <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right" layout="topleft" name="main_info_panel">
+ <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="notification_title_panel">
+ <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="260" height="12" layout="topleft" follows="right|left" text_color="White"
+ use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_title" >
+ Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle
+ </text>
+ <icon top="1" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="attachment_icon" tool_tip="Attachment" visible="false"/>
+ </panel>
+ <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel">
+ <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="170" height="13" layout="topleft" follows="right|left"
+ use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false">
+ Sender: "Resident R e s i d e n t R e s i d e n t"
+ </text>
+ <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
+ name="notification_time" value="2014/12/24 23:30" />
+ </panel>
+ </panel>
+ </layout_panel>
+ <layout_panel width="18" height="48" orientation="horizontal" follows="right|top|bottom" name="layout_panel_right">
+ <panel top="0" left="0" width="17" height="39" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel">
+ <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true"
+ tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" />
+ <button bottom="-16" right="15" width="17" height="17" layout="topleft" follows="bottom" name="expand_btn" mouse_opaque="true"
+ tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" />
+ </panel>
+ </layout_panel>
</layout_stack>
</panel>
</layout_panel>
- <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp">
- <panel top="0" left="0" width="17" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel_exp">
- <button top="0" left="2" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true"
- tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" />
- <button bottom="5" left="0" width="17" height="17" layout="topleft" follows="bottom" name="condense_btn" mouse_opaque="true"
- tab_stop="false" image_unselected="Notification_Condense" image_selected="Notification_Condense" />
+ <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true">
+ <panel border="true" top="0" left="5" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view">
+ <layout_stack top="0" left="0" width="325" height="196" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack">
+ <layout_panel width="30" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp">
+ <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/>
+ <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon_exp" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/>
+ <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification" visible="false"/>
+ <icon left="12" top="144" width="20" height="20" name="attachment_icon_exp" tool_tip="Attachment" image_name="Icon_Attachment_Large" follows="left" mouse_opaque="true" visible="false"/>
+ </layout_panel>
+ <layout_panel width="230" height="196" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp">
+ <panel border="false" top="0" width="230" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded">
+ <layout_stack top="0" left="0" width="230" height="196" orientation="vertical" follows="left|top|right|bottom" name="main_info_panel_vertical_stack">
+ <layout_panel top="0" left="0" width="230" height="30" layout="topleft" follows="left|top|right|bottom" name="notification_title_layout_panel" visible="true">
+ <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp">
+ <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White"
+ use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp">
+ Notice Title Notice Title N o t i c e T i t l e N o t i c e T i t l e
+ </text>
+ <text allow_scroll="false" font="SansSerif" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White"
+ use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" visible="false">
+ Group Name Group Name Group Na m e e
+ </text>
+ </panel>
+ <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp">
+ <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="145" height="13" layout="topleft" follows="right|left"
+ use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false">
+ Sender: "Resident R e s i d e n t R e s i d e n t"
+ </text>
+ <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5"
+ name="notification_time_exp" value="2014/12/24 23:30" />
+ </panel>
+ <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true">
+ <text_editor enabled="false" top="0" left="0" width="230" height="110" layout="topleft" follows="left|top|right|bottom"
+ word_wrap="true" max_length="65536" name="notification_text_exp" >
+ Notice text goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla .
+ </text_editor>
+ </panel>
+ <panel border="false" left="1" bottom="-5" width="230" height="22" bevel_style="none" follows="left|right|bottom" layout="topleft" name="attachment_panel" visible="false">
+ <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom"
+ use_ellipses="true" word_wrap="true" max_length="96" name="attachment_text">
+ Attachment goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla .
+ </text>
+ </panel>
+ </layout_panel>
+ </layout_stack>
+ </panel>
+ </layout_panel>
+ <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp">
+ <panel top="0" left="0" width="17" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel_exp">
+ <button top="0" left="2" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true"
+ tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" />
+ <button bottom="5" left="0" width="17" height="17" layout="topleft" follows="bottom" name="condense_btn" mouse_opaque="true"
+ tab_stop="false" image_unselected="Notification_Condense" image_selected="Notification_Condense" />
+ </panel>
+ </layout_panel>
+ </layout_stack>
</panel>
</layout_panel>
- </layout_stack>
- </panel>
- </layout_panel>
- </layout_stack>
+ </layout_stack>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 9da044ab64..f6665a1d5d 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -39,12 +39,7 @@
enabled="true"
label="English"
name="English"
- value="en" />
- <combo_box.item
- enabled="true"
- label="Dansk (Danish) - Beta"
- name="Danish"
- value="da" />
+ value="en" />
<combo_box.item
enabled="true"
label="Deutsch (German) - Beta"
@@ -64,12 +59,7 @@
enabled="true"
label="Italiano (Italian) - Beta"
name="Italian"
- value="it" />
- <combo_box.item
- enabled="true"
- label="Polski (Polish) - Beta"
- name="Polish"
- value="pl" />
+ value="it" />
<combo_box.item
enabled="true"
label="Português (Portuguese) - Beta"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index b71586aab1..615abbaa89 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -398,7 +398,7 @@
follows="left|top"
layout="topleft"
left_delta="-168"
- width="221"
+ width="360"
height="20"
name="ear_location">
<radio_item
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 064ece6e4b..dbf7bc031f 100755
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -51,7 +51,7 @@
v_pad="4"
top="0"
wrap="false"
- value="L$20"
+ value="L$??"
width="40" />
<button
halign="center"
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
index 26cac06648..5c728718ef 100755
--- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml
@@ -60,7 +60,7 @@
text_color="White"
top="4"
value="..."
- width="45" />
+ width="49" />
<button
follows="right"
height="20"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index c5dfb703e5..9be01c5d4f 100755
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -395,16 +395,20 @@
left_pad="0"
layout="topleft"
follows="left|top"
- name="combobox sale copy"
+ name="ComboBoxSaleType"
width="170">
- <combo_box.item
- label="Copy"
- name="Copy"
- value="Copy" />
- <combo_box.item
- label="Original"
- name="Original"
- value="Original" />
+ <combo_box.item
+ name="Copy"
+ label="Copy"
+ value="2" />
+ <combo_box.item
+ name="Contents"
+ label="Contents"
+ value="3" />
+ <combo_box.item
+ name="Original"
+ label="Original"
+ value="1" />
</combo_box>
<spinner
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index 6ee8fc3a4c..b84dce222f 100755
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -48,7 +48,7 @@
</panel.string>
<panel.string
name="Cost Total">
- Total Price: L$
+ Sum Price: L$
</panel.string>
<panel.string
name="Cost Per Unit">
@@ -444,7 +444,7 @@
control_name="Edit Cost"
name="Edit Cost"
label="Price: L$"
- label_width="65"
+ label_width="73"
width="150"
min_val="1"
height="20"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 945a77c071..f77678e5f8 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2513,6 +2513,7 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors.
<string name="CompileSuccessful">Compile successful!</string>
<string name="CompileSuccessfulSaving">Compile successful, saving...</string>
<string name="SaveComplete">Save complete.</string>
+ <string name="UploadFailed">File upload failed: </string>
<string name="ObjectOutOfRange">Script (object out of range)</string>
<!-- god tools -->
diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml
index d2117f08b6..9596a8277e 100755
--- a/indra/newview/skins/default/xui/es/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/es/menu_viewer.xml
@@ -175,6 +175,7 @@
<menu_item_call label="Blogs de [SECOND_LIFE]" name="Second Life Blogs"/>
<menu_item_call label="Denunciar una infracción" name="Report Abuse"/>
<menu_item_call label="Informar de un fallo" name="Report Bug"/>
+ <menu_item_call label="Bumps, Pushes &amp; Hits" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Avanzado" name="Advanced">
@@ -322,8 +323,7 @@
<menu label="Red" name="Network">
<menu_item_check label="Pause Avatar" name="AgentPause"/>
<menu_item_call label="Drop a Packet" name="Drop a Packet"/>
- </menu>
- <menu_item_call label="Bumps, Pushes &amp; Hits" name="Bumps, Pushes &amp;amp; Hits"/>
+ </menu>
<menu label="Mundo virtual" name="DevelopWorld">
<menu_item_check label="Anular el sol del Sim" name="Sim Sun Override"/>
<menu_item_check label="Meteorología fija" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/es/panel_region_debug.xml b/indra/newview/skins/default/xui/es/panel_region_debug.xml
index f6676967f5..2a98fb808d 100755
--- a/indra/newview/skins/default/xui/es/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/es/panel_region_debug.xml
@@ -27,9 +27,9 @@
<check_box label="En el terreno de otros" name="return_other_land" tool_tip="Devolver sólo los objetos que están en terreno de otro"/>
<check_box label="En cada región de este estado" name="return_estate_wide" tool_tip="Devolver los objetos de todas las regiones que forman este estado"/>
<button label="Devolver" name="return_btn"/>
- <button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales" width="280"/>
- <button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región"/>
- <button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts" width="280"/>
- <button label="Cancelar reinicio" name="cancel_restart_btn" tool_tip="Cancelar el reinicio de región"/>
- <button label="Consola de depuración de región" name="region_debug_console_btn" tool_tip="Abrir consola de depuración de región"/>
+ <button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales" width="240"/>
+ <button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región" left_pad="90" width="160"/>
+ <button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts" width="240"/>
+ <button label="Cancelar reinicio" name="cancel_restart_btn" tool_tip="Cancelar el reinicio de región" left_pad="90" width="160"/>
+ <button label="Consola de depuración de región" name="region_debug_console_btn" tool_tip="Abrir consola de depuración de región" width="240"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 6e36d19ba9..2c30fe07b4 100755
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -176,6 +176,7 @@
<menu_item_call label="Blogs [SECOND_LIFE]" name="Second Life Blogs"/>
<menu_item_call label="Signaler une infraction" name="Report Abuse"/>
<menu_item_call label="Signaler un bug" name="Report Bug"/>
+ <menu_item_call label="Collisions, coups et bousculades" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="À propos de [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Avancé" name="Advanced">
@@ -352,8 +353,7 @@
<menu_item_check label="Interpolation ping des positions des objets" name="Ping Interpolate Object Positions"/>
<menu_item_call label="Abandonner un paquet" name="Drop a Packet"/>
</menu>
- <menu_item_call label="Dump caméra scriptée" name="Dump Scripted Camera"/>
- <menu_item_call label="Collisions, coups et bousculades" name="Bumps, Pushes &amp;amp; Hits"/>
+ <menu_item_call label="Dump caméra scriptée" name="Dump Scripted Camera"/>
<menu label="Enregistreur" name="Recorder">
<menu_item_call label="Commencer la lecture" name="Start Playback"/>
<menu_item_call label="Arrêter la lecture" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_region_debug.xml b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
index d21695e9aa..461ada3108 100755
--- a/indra/newview/skins/default/xui/fr/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_debug.xml
@@ -27,9 +27,9 @@
<check_box label="Sur le terrain d&apos;un autre résident" name="return_other_land" tool_tip="Ne renvoyer que les objets se trouvant sur le terrain de quelqu&apos;un d&apos;autre"/>
<check_box label="Dans toutes les régions de ce domaine" name="return_estate_wide" tool_tip="Renvoyer les objets dans toutes les régions qui constituent ce domaine"/>
<button label="Renvoyer" name="return_btn"/>
- <button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/>
- <button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" width="160"/>
- <button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="320"/>
- <button label="Annuler le redémarrage" name="cancel_restart_btn" tool_tip="Annuler le redémarrage de la région." width="160"/>
- <button label="Console de débogage de région" name="region_debug_console_btn" tool_tip="Ouvrir la console de débogage de région"/>
+ <button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="240"/>
+ <button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" left_pad="90" width="160"/>
+ <button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="240"/>
+ <button label="Annuler le redémarrage" name="cancel_restart_btn" tool_tip="Annuler le redémarrage de la région." left_pad="90" width="160"/>
+ <button label="Console de débogage de région" name="region_debug_console_btn" tool_tip="Ouvrir la console de débogage de région" width="240"/>
</panel>
diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml
index f535a53e66..d25e11e7a4 100755
--- a/indra/newview/skins/default/xui/it/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/it/menu_viewer.xml
@@ -176,6 +176,7 @@
<menu_item_call label="[SECOND_LIFE] Blog" name="Second Life Blogs"/>
<menu_item_call label="Segnala abuso" name="Report Abuse"/>
<menu_item_call label="Segnala bug" name="Report Bug"/>
+ <menu_item_call label="Urti, spinte e contatti" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Avanzate" name="Advanced">
@@ -323,8 +324,7 @@
<menu label="Rete" name="Network">
<menu_item_check label="Metti in pausa" name="AgentPause"/>
<menu_item_call label="Lascia un pacchetto" name="Drop a Packet"/>
- </menu>
- <menu_item_call label="Urti, spinte e contatti" name="Bumps, Pushes &amp;amp; Hits"/>
+ </menu>
<menu label="Mondo" name="DevelopWorld">
<menu_item_check label="Esclusione al sole della simulazione" name="Sim Sun Override"/>
<menu_item_check label="Clima fisso" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/it/panel_region_debug.xml b/indra/newview/skins/default/xui/it/panel_region_debug.xml
index 88c056bf5e..ca39cf6d05 100755
--- a/indra/newview/skins/default/xui/it/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/it/panel_region_debug.xml
@@ -27,9 +27,9 @@
<check_box label="Sul terreno di un altro residente" name="return_other_land" tool_tip="Restituisci solo gli oggetti che sono in terreni appartenenti a qualcun altro"/>
<check_box label="In tutte le regioni di questa proprietà" name="return_estate_wide" tool_tip="Restituisci tutti gli oggetti nelle varie regioni che costituiscono l&apos;insieme dei possedimenti terrieri"/>
<button label="Restituisci" name="return_btn"/>
- <button label="Visualizza l&apos;elenco dei maggiori collidenti..." name="top_colliders_btn" tool_tip="Elenco degli oggetti che stanno potenzialmente subendo le maggiori collisioni" width="280"/>
- <button label="Riavvia la regione" name="restart_btn" tool_tip="Dai 2 minuti di tempo massimo e fai riavviare la regione"/>
- <button label="Visualizza l&apos;elenco degli script più pesanti..." name="top_scripts_btn" tool_tip="Elenco degli oggetti che impiegano più tempo a far girare gli script" width="280"/>
- <button label="Annulla riavvio" name="cancel_restart_btn" tool_tip="Annulla riavvio regione"/>
- <button label="Console di debug regione" name="region_debug_console_btn" tool_tip="Apri console di debug regione"/>
+ <button label="Visualizza l&apos;elenco dei maggiori collidenti..." name="top_colliders_btn" tool_tip="Elenco degli oggetti che stanno potenzialmente subendo le maggiori collisioni" width="270"/>
+ <button label="Riavvia la regione" name="restart_btn" tool_tip="Dai 2 minuti di tempo massimo e fai riavviare la regione" left_pad="90" width="140"/>
+ <button label="Visualizza l&apos;elenco degli script più pesanti..." name="top_scripts_btn" tool_tip="Elenco degli oggetti che impiegano più tempo a far girare gli script" width="270"/>
+ <button label="Annulla riavvio" name="cancel_restart_btn" tool_tip="Annulla riavvio regione" left_pad="90" width="140"/>
+ <button label="Console di debug regione" name="region_debug_console_btn" tool_tip="Apri console di debug regione" width="270"/>
</panel>
diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml
index 4e6c6808c6..0b85c693f0 100755
--- a/indra/newview/skins/default/xui/ja/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml
@@ -176,6 +176,7 @@
<menu_item_call label="[SECOND_LIFE] ブログ" name="Second Life Blogs"/>
<menu_item_call label="嫌がらせを報告する" name="Report Abuse"/>
<menu_item_call label="バグを報告する" name="Report Bug"/>
+ <menu_item_call label="衝突・プッシュ・打撃" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="[APP_NAME] について" name="About Second Life"/>
</menu>
<menu label="アドバンス" name="Advanced">
@@ -352,8 +353,7 @@
<menu_item_check label="挿入されたオブジェクトの位置の Ping" name="Ping Interpolate Object Positions"/>
<menu_item_call label="パケットドロップ" name="Drop a Packet"/>
</menu>
- <menu_item_call label="スクリプト付きカメラをダンプ" name="Dump Scripted Camera"/>
- <menu_item_call label="衝突・プッシュ・打撃" name="Bumps, Pushes &amp;amp; Hits"/>
+ <menu_item_call label="スクリプト付きカメラをダンプ" name="Dump Scripted Camera"/>
<menu label="レコーダー" name="Recorder">
<menu_item_call label="再生開始" name="Start Playback"/>
<menu_item_call label="再生停止" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml
index e1725fc308..a354cca9ad 100755
--- a/indra/newview/skins/default/xui/pl/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml
@@ -126,6 +126,7 @@
<menu_item_check label="Włącz podpowiedzi" name="Enable Hints"/>
<menu_item_call label="Złóż Raport o Nadużyciu" name="Report Abuse"/>
<menu_item_call label="Zgłoś błędy klienta" name="Report Bug"/>
+ <menu_item_call label="Zderzenia, popchnięcia &amp; uderzenia" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="O [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Zaawansowane" name="Advanced">
@@ -252,8 +253,7 @@
<menu label="Sieć" name="Network">
<menu_item_check label="Zatrzymaj awatara" name="AgentPause"/>
<menu_item_call label="Upuść pakiet pamięci" name="Drop a Packet"/>
- </menu>
- <menu_item_call label="Zderzenia, popchnięcia &amp; uderzenia" name="Bumps, Pushes &amp;amp; Hits"/>
+ </menu>
<menu label="Świat" name="DevelopWorld">
<menu_item_check label="Domyślne ustawienia środowiska Regionu" name="Sim Sun Override"/>
<menu_item_check label="Ustalona pogoda" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml
index a761cfa177..0bbb9683a0 100755
--- a/indra/newview/skins/default/xui/pt/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml
@@ -176,6 +176,7 @@
<menu_item_call label="Blogs do [SECOND_LIFE]" name="Second Life Blogs"/>
<menu_item_call label="Denunciar abuso" name="Report Abuse"/>
<menu_item_call label="Relatar bug" name="Report Bug"/>
+ <menu_item_call label="Empurrões, trombadas e tapas" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Avançado" name="Advanced">
@@ -323,8 +324,7 @@
<menu label="Rede" name="Network">
<menu_item_check label="Pausar avatar" name="AgentPause"/>
<menu_item_call label="Drop a Packet" name="Drop a Packet"/>
- </menu>
- <menu_item_call label="Empurrões, trombadas e tapas" name="Bumps, Pushes &amp;amp; Hits"/>
+ </menu>
<menu label="Mundo" name="DevelopWorld">
<menu_item_check label="Impor sobre sol de simulação" name="Sim Sun Override"/>
<menu_item_check label="Clima fixo" name="Fixed Weather"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_region_debug.xml b/indra/newview/skins/default/xui/pt/panel_region_debug.xml
index 9070563fd0..2647c7a1e2 100755
--- a/indra/newview/skins/default/xui/pt/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/pt/panel_region_debug.xml
@@ -27,9 +27,9 @@
<check_box label="No terreno de outra pessoa" name="return_other_land" tool_tip="Devolver apenas objetos que estejam em terrenos de outra pessoa"/>
<check_box label="Em todas as regiões desta propriedade" name="return_estate_wide" tool_tip="Devolver objetos em todas as regiões que constituem esta propriedade"/>
<button label="Devolver" name="return_btn"/>
- <button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="280"/>
- <button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região"/>
- <button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="280"/>
- <button label="Cancelar reinício" name="cancel_restart_btn" tool_tip="Cancelar reinício da região"/>
- <button label="Console de depuração de região" name="region_debug_console_btn" tool_tip="Abrir console de depuração de região"/>
+ <button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="240"/>
+ <button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região" left_pad="90" width="160"/>
+ <button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="240"/>
+ <button label="Cancelar reinício" name="cancel_restart_btn" tool_tip="Cancelar reinício da região" left_pad="90" width="160"/>
+ <button label="Console de depuração de região" name="region_debug_console_btn" tool_tip="Abrir console de depuração de região" width="240"/>
</panel>
diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml
index fad1ea51e0..266a1fb877 100755
--- a/indra/newview/skins/default/xui/ru/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml
@@ -165,8 +165,15 @@
</menu>
<menu label="Справка" name="Help">
<menu_item_call label="Инструкции..." name="How To"/>
+ <menu_item_call label="База знаний" name="Knowledge Base"/>
+ <menu_item_call label="Wiki" name="Wiki"/>
+ <menu_item_call label="Форумы сообщества" name="Community Forums"/>
+ <menu_item_call label="Портал поддержки" name="Support portal"/>
+ <menu_item_call label="Новости [SECOND_LIFE]" name="Second Life News"/>
+ <menu_item_call label="Блоги [SECOND_LIFE]" name="Second Life Blogs"/>
<menu_item_call label="Жалоба" name="Report Abuse"/>
<menu_item_call label="Сообщить об ошибке" name="Report Bug"/>
+ <menu_item_call label="Столкновения, толчки и удары" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="О [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="Дополнительно" name="Advanced">
@@ -343,8 +350,7 @@
<menu_item_check label="Прикрепить объекты для интерполяции" name="Ping Interpolate Object Positions"/>
<menu_item_call label="Опустить пакет" name="Drop a Packet"/>
</menu>
- <menu_item_call label="Дамп камеры со скриптами" name="Dump Scripted Camera"/>
- <menu_item_call label="Столкновения, толчки и удары" name="Bumps, Pushes &amp;amp; Hits"/>
+ <menu_item_call label="Дамп камеры со скриптами" name="Dump Scripted Camera"/>
<menu label="Диктофон" name="Recorder">
<menu_item_call label="Начать воспроизведение" name="Start Playback"/>
<menu_item_call label="Остановить воспроизведение" name="Stop Playback"/>
@@ -396,6 +402,12 @@
<menu_item_call label="Проверка женщины" name="Test Female"/>
<menu_item_check label="Разрешить выбор аватара" name="Allow Select Avatar"/>
</menu>
+ <menu label="Скорость анимации" name="Animation Speed">
+ <menu_item_call label="Ускорить все анимации на 10%" name="All Animations 10 Faster"/>
+ <menu_item_call label="Замедлить все анимации на 10%" name="All Animations 10 Slower"/>
+ <menu_item_call label="Восстановить скорость анимаций" name="Reset All Animation Speed"/>
+ <menu_item_check label="Анимация медленных движений" name="Slow Motion Animations"/>
+ </menu>
<menu_item_call label="Скинуть параметры" name="Force Params to Default"/>
<menu_item_check label="Данные об анимации" name="Animation Info"/>
<menu_item_check label="Показать взгляд" name="Show Look At"/>
diff --git a/indra/newview/skins/default/xui/ru/panel_region_debug.xml b/indra/newview/skins/default/xui/ru/panel_region_debug.xml
index d294a9e22e..3eaa0b19e0 100755
--- a/indra/newview/skins/default/xui/ru/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/ru/panel_region_debug.xml
@@ -27,9 +27,9 @@
<check_box label="На чужой земле" name="return_other_land" tool_tip="Возвращаются только объекты, расположенные на чужой земле"/>
<check_box label="С каждого региона этого землевладения" name="return_estate_wide" tool_tip="Возвращаются объекты со всех регионов, образующих это землевладение"/>
<button label="Возврат" name="return_btn"/>
- <button label="Самые активные участники столкновений..." name="top_colliders_btn" tool_tip="Список объектов, для которых столкновения наиболее вероятны"/>
- <button label="Перезагрузить регион" name="restart_btn" tool_tip="Отсчитать 2 минуты и перезагрузить регион"/>
- <button label="Список лучших скриптов..." name="top_scripts_btn" tool_tip="Объекты, в которых скрипты выполняются дольше всего"/>
- <button label="Отменить перезапуск" name="cancel_restart_btn" tool_tip="Отменить перезапуск региона"/>
- <button label="Консоль отладки региона" name="region_debug_console_btn" tool_tip="Открыть консоль отладки региона"/>
+ <button label="Самые активные участники столкновений..." name="top_colliders_btn" tool_tip="Список объектов, для которых столкновения наиболее вероятны" width="255"/>
+ <button label="Перезагрузить регион" name="restart_btn" tool_tip="Отсчитать 2 минуты и перезагрузить регион" left_pad="85"/>
+ <button label="Список лучших скриптов..." name="top_scripts_btn" tool_tip="Объекты, в которых скрипты выполняются дольше всего" width="255"/>
+ <button label="Отменить перезапуск" name="cancel_restart_btn" tool_tip="Отменить перезапуск региона" left_pad="85"/>
+ <button label="Консоль отладки региона" name="region_debug_console_btn" tool_tip="Открыть консоль отладки региона" width="255"/>
</panel>
diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml
index 23e2903e03..a488a0916f 100755
--- a/indra/newview/skins/default/xui/tr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml
@@ -174,6 +174,7 @@
<menu_item_call label="[SECOND_LIFE] Blogları" name="Second Life Blogs"/>
<menu_item_call label="Kötüye Kullanımı Bildir" name="Report Abuse"/>
<menu_item_call label="Hata Bildir" name="Report Bug"/>
+ <menu_item_call label="Toslamalar, İtmeler ve Vurmalar" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="[APP_NAME] Hakkında" name="About Second Life"/>
</menu>
<menu label="Gelişmiş" name="Advanced">
@@ -350,8 +351,7 @@
<menu_item_check label="Nesne Konumlarını Ping İle İnterpole Edin" name="Ping Interpolate Object Positions"/>
<menu_item_call label="Paket Bırakın" name="Drop a Packet"/>
</menu>
- <menu_item_call label="Komut Dosyalı Kameranın Dökümünü Al" name="Dump Scripted Camera"/>
- <menu_item_call label="Toslamalar, İtmeler ve Vurmalar" name="Bumps, Pushes &amp;amp; Hits"/>
+ <menu_item_call label="Komut Dosyalı Kameranın Dökümünü Al" name="Dump Scripted Camera"/>
<menu label="Kaydedici" name="Recorder">
<menu_item_call label="Oynatmayı Başlat" name="Start Playback"/>
<menu_item_call label="Oynatmayı Durdur" name="Stop Playback"/>
diff --git a/indra/newview/skins/default/xui/tr/panel_region_debug.xml b/indra/newview/skins/default/xui/tr/panel_region_debug.xml
index 74a0a1569e..ec654aae82 100755
--- a/indra/newview/skins/default/xui/tr/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/tr/panel_region_debug.xml
@@ -27,9 +27,9 @@
<check_box label="Başkasına ait arazi üzerinde" name="return_other_land" tool_tip="Sadece başkasına ait arazi üzerinde olan nesneler iade edilsin"/>
<check_box label="Bu gayrimenkulu oluşturan bölgelerin tümünde" name="return_estate_wide" tool_tip="Bu gayrimenkulu oluşturan bölgelerin tümündeki nesneler iade edilsin"/>
<button label="İade Et" name="return_btn"/>
- <button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaşayan nesnelerin listesi"/>
- <button label="Bölgeyi Yeniden Başlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden başlat"/>
- <button label="En Çok Komut Dsy. Çalştr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi"/>
- <button label="Yeniden Başlatmayı İptal Et" name="cancel_restart_btn" tool_tip="Bölge yeniden başlatmasını iptal et"/>
- <button label="Bölge Hata Ayıklama Konsolu" name="region_debug_console_btn" tool_tip="Açık Bölge Hata Ayıklama Konsolu"/>
+ <button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaşayan nesnelerin listesi" width="180"/>
+ <button label="Bölgeyi Yeniden Başlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden başlat" width="160"/>
+ <button label="En Çok Komut Dsy. Çalştr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi" width="180"/>
+ <button label="Yeniden Başlatmayı İptal Et" name="cancel_restart_btn" tool_tip="Bölge yeniden başlatmasını iptal et" width="160"/>
+ <button label="Bölge Hata Ayıklama Konsolu" name="region_debug_console_btn" tool_tip="Açık Bölge Hata Ayıklama Konsolu" width="180"/>
</panel>
diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml
index 46d46e901c..adc29a3944 100755
--- a/indra/newview/skins/default/xui/zh/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml
@@ -174,6 +174,7 @@
<menu_item_call label="[SECOND_LIFE] 部落格" name="Second Life Blogs"/>
<menu_item_call label="違規舉報" name="Report Abuse"/>
<menu_item_call label="回報臭蟲" name="Report Bug"/>
+ <menu_item_call label="碰撞、推擠與打擊" name="Bumps, Pushes &amp;amp; Hits"/>
<menu_item_call label="關於 [APP_NAME]" name="About Second Life"/>
</menu>
<menu label="進階" name="Advanced">
@@ -350,8 +351,7 @@
<menu_item_check label="探詢內插物件位置" name="Ping Interpolate Object Positions"/>
<menu_item_call label="丟出一個封包" name="Drop a Packet"/>
</menu>
- <menu_item_call label="傾印腳本控制的攝影機" name="Dump Scripted Camera"/>
- <menu_item_call label="碰撞、推擠與打擊" name="Bumps, Pushes &amp;amp; Hits"/>
+ <menu_item_call label="傾印腳本控制的攝影機" name="Dump Scripted Camera"/>
<menu label="錄製器" name="Recorder">
<menu_item_call label="開始播放" name="Start Playback"/>
<menu_item_call label="停止播放" name="Stop Playback"/>
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index adeb848e03..1b0334498e 100755
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -193,14 +193,6 @@ void LLAppViewer::forceQuit(void) {}
LLAppViewer * LLAppViewer::sInstance = 0;
//-----------------------------------------------------------------------------
-#include "llnotificationsutil.h"
-LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
- const LLSD& substitutions,
- const LLSD& payload,
- boost::function<void (const LLSD&, const LLSD&)> functor) { return LLNotificationPtr((LLNotification*)0); }
-
-
-//-----------------------------------------------------------------------------
#include "llupdaterservice.h"
std::string const & LLUpdaterService::pumpName(void)
@@ -488,8 +480,6 @@ namespace tut
template<> template<>
void lllogininstance_object::test<3>()
{
- skip();
-
set_test_name("Test Mandatory Update User Accepts");
// Part 1 - Mandatory Update, with User accepts response.
@@ -517,8 +507,6 @@ namespace tut
template<> template<>
void lllogininstance_object::test<4>()
{
- skip();
-
set_test_name("Test Mandatory Update User Decline");
// Test connect with update needed.
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 7544fe1c41..32cf9d3df6 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -38,7 +38,7 @@ viewer_dir = os.path.dirname(__file__)
# Put it FIRST because some of our build hosts have an ancient install of
# indra.util.llmanifest under their system Python!
sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python"))
-from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError
+from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError
try:
from llbase import llsd
except ImportError:
@@ -55,7 +55,6 @@ class ViewerManifest(LLManifest):
def construct(self):
super(ViewerManifest, self).construct()
- self.exclude("*.svn*")
self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
self.path(src="../../etc/message.xml", dst="app_settings/message.xml")
@@ -74,26 +73,6 @@ class ViewerManifest(LLManifest):
contributions_path = "../../doc/contributions.txt"
contributor_names = self.extract_names(contributions_path)
self.put_in_file(contributor_names, "contributors.txt", src=contributions_path)
- # include the extracted list of translators
- translations_path = "../../doc/translations.txt"
- translator_names = self.extract_names(translations_path)
- self.put_in_file(translator_names, "translators.txt", src=translations_path)
- # include the list of Lindens (if any)
- # see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
- linden_names_path = os.getenv("LINDEN_CREDITS")
- if not linden_names_path :
- print "No 'LINDEN_CREDITS' specified in environment, using built-in list"
- else:
- try:
- linden_file = open(linden_names_path,'r')
- except IOError:
- print "No Linden names found at '%s', using built-in list" % linden_names_path
- else:
- # all names should be one line, but the join below also converts to a string
- linden_names = ', '.join(linden_file.readlines())
- self.put_in_file(linden_names, "lindens.txt", src=linden_names_path)
- linden_file.close()
- print "Linden names extracted from '%s'" % linden_names_path
# ... and the entire windlight directory
self.path("windlight")
@@ -107,6 +86,9 @@ class ViewerManifest(LLManifest):
self.path("dictionaries")
self.end_prefix(pkgdir)
+ # include the extracted packages information (see BuildPackagesInfo.cmake)
+ self.path(src=os.path.join(self.args['build'],"packages-info.txt"), dst="packages-info.txt")
+
# CHOP-955: If we have "sourceid" or "viewer_channel" in the
# build process environment, generate it into
# settings_install.xml.
@@ -349,14 +331,18 @@ class Windows_i686_Manifest(ViewerManifest):
def construct(self):
super(Windows_i686_Manifest, self).construct()
+ pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
+ relpkgdir = os.path.join(pkgdir, "lib", "release")
+ debpkgdir = os.path.join(pkgdir, "lib", "debug")
+
if self.is_packaging_viewer():
# Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
# Plugin host application
- self.path2basename(os.path.join(os.pardir,
- 'llplugin', 'slplugin', self.args['configuration']),
- "slplugin.exe")
+ # The current slplugin package places slplugin.exe right into the
+ # packages base directory.
+ self.path2basename(pkgdir, "slplugin.exe")
self.path2basename("../viewer_components/updater/scripts/windows", "update_install.bat")
# Get shared libs from the shared libs staging directory
@@ -376,15 +362,10 @@ class Windows_i686_Manifest(ViewerManifest):
# Mesh 3rd party libs needed for auto LOD and collada reading
try:
- if self.args['configuration'].lower() == 'debug':
- self.path("libcollada14dom22-d.dll")
- else:
- self.path("libcollada14dom22.dll")
-
self.path("glod.dll")
except RuntimeError, err:
print err.message
- print "Skipping COLLADA and GLOD libraries (assumming linked statically)"
+ print "Skipping GLOD library (assumming linked statically)"
# Get fmodex dll, continue if missing
try:
@@ -404,11 +385,11 @@ class Windows_i686_Manifest(ViewerManifest):
# These need to be installed as a SxS assembly, currently a 'private' assembly.
# See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
if self.args['configuration'].lower() == 'debug':
- self.path("msvcr100d.dll")
- self.path("msvcp100d.dll")
+ self.path("msvcr120d.dll")
+ self.path("msvcp120d.dll")
else:
- self.path("msvcr100.dll")
- self.path("msvcp100.dll")
+ self.path("msvcr120.dll")
+ self.path("msvcp120.dll")
# Vivox runtimes
self.path("SLVoice.exe")
@@ -443,82 +424,52 @@ class Windows_i686_Manifest(ViewerManifest):
self.path("featuretable_xp.txt")
# Media plugins - QuickTime
- if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
- self.path("media_plugin_quicktime.dll")
- self.end_prefix()
-
# Media plugins - WebKit/Qt
- if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"):
+ if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"):
+ self.path("media_plugin_quicktime.dll")
self.path("media_plugin_webkit.dll")
- self.end_prefix()
+ self.path("qtcore4.dll")
+ self.path("qtgui4.dll")
+ self.path("qtnetwork4.dll")
+ self.path("qtopengl4.dll")
+ self.path("qtwebkit4.dll")
+ self.path("qtxmlpatterns4.dll")
+
+ # For WebKit/Qt plugin runtimes (image format plugins)
+ if self.prefix(src="imageformats", dst="imageformats"):
+ self.path("qgif4.dll")
+ self.path("qico4.dll")
+ self.path("qjpeg4.dll")
+ self.path("qmng4.dll")
+ self.path("qsvg4.dll")
+ self.path("qtiff4.dll")
+ self.end_prefix()
+
+ # For WebKit/Qt plugin runtimes (codec/character encoding plugins)
+ if self.prefix(src="codecs", dst="codecs"):
+ self.path("qcncodecs4.dll")
+ self.path("qjpcodecs4.dll")
+ self.path("qkrcodecs4.dll")
+ self.path("qtwcodecs4.dll")
+ self.end_prefix()
+
+ self.end_prefix()
# winmm.dll shim
if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst=""):
self.path("winmm.dll")
self.end_prefix()
-
if self.args['configuration'].lower() == 'debug':
- if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'debug'),
- dst="llplugin"):
+ if self.prefix(src=debpkgdir, dst="llplugin"):
self.path("libeay32.dll")
- self.path("qtcored4.dll")
- self.path("qtguid4.dll")
- self.path("qtnetworkd4.dll")
- self.path("qtopengld4.dll")
- self.path("qtwebkitd4.dll")
- self.path("qtxmlpatternsd4.dll")
self.path("ssleay32.dll")
-
- # For WebKit/Qt plugin runtimes (image format plugins)
- if self.prefix(src="imageformats", dst="imageformats"):
- self.path("qgifd4.dll")
- self.path("qicod4.dll")
- self.path("qjpegd4.dll")
- self.path("qmngd4.dll")
- self.path("qsvgd4.dll")
- self.path("qtiffd4.dll")
- self.end_prefix()
-
- # For WebKit/Qt plugin runtimes (codec/character encoding plugins)
- if self.prefix(src="codecs", dst="codecs"):
- self.path("qcncodecsd4.dll")
- self.path("qjpcodecsd4.dll")
- self.path("qkrcodecsd4.dll")
- self.path("qtwcodecsd4.dll")
- self.end_prefix()
-
self.end_prefix()
+
else:
- if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release'),
- dst="llplugin"):
+ if self.prefix(src=relpkgdir, dst="llplugin"):
self.path("libeay32.dll")
- self.path("qtcore4.dll")
- self.path("qtgui4.dll")
- self.path("qtnetwork4.dll")
- self.path("qtopengl4.dll")
- self.path("qtwebkit4.dll")
- self.path("qtxmlpatterns4.dll")
self.path("ssleay32.dll")
-
- # For WebKit/Qt plugin runtimes (image format plugins)
- if self.prefix(src="imageformats", dst="imageformats"):
- self.path("qgif4.dll")
- self.path("qico4.dll")
- self.path("qjpeg4.dll")
- self.path("qmng4.dll")
- self.path("qsvg4.dll")
- self.path("qtiff4.dll")
- self.end_prefix()
-
- # For WebKit/Qt plugin runtimes (codec/character encoding plugins)
- if self.prefix(src="codecs", dst="codecs"):
- self.path("qcncodecs4.dll")
- self.path("qjpcodecs4.dll")
- self.path("qkrcodecs4.dll")
- self.path("qtwcodecs4.dll")
- self.end_prefix()
-
self.end_prefix()
# pull in the crash logger and updater from other projects
@@ -631,7 +582,7 @@ class Windows_i686_Manifest(ViewerManifest):
while (not installer_created) and (nsis_attempts > 0):
try:
nsis_attempts-=1;
- self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile))
+ self.run_command('"' + NSIS_path + '" ' + self.dst_path_of(tempfile))
installer_created=True # if no exception was raised, the codesign worked
except ManifestError, err:
if nsis_attempts:
@@ -668,12 +619,16 @@ class Darwin_i386_Manifest(ViewerManifest):
# copy over the build result (this is a no-op if run within the xcode script)
self.path(self.args['configuration'] + "/Second Life.app", dst="")
+ pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
+ relpkgdir = os.path.join(pkgdir, "lib", "release")
+ debpkgdir = os.path.join(pkgdir, "lib", "debug")
+
if self.prefix(src="", dst="Contents"): # everything goes in Contents
self.path("Info.plist", dst="Info.plist")
# copy additional libs in <bundle>/Contents/MacOS/
- self.path("../packages/lib/release/libndofdev.dylib", dst="Resources/libndofdev.dylib")
- self.path("../packages/lib/release/libhunspell-1.3.0.dylib", dst="Resources/libhunspell-1.3.0.dylib")
+ self.path(os.path.join(relpkgdir, "libndofdev.dylib"), dst="Resources/libndofdev.dylib")
+ self.path(os.path.join(relpkgdir, "libhunspell-1.3.0.dylib"), dst="Resources/libhunspell-1.3.0.dylib")
if self.prefix(dst="MacOS"):
self.path2basename("../viewer_components/updater/scripts/darwin", "*.py")
@@ -733,7 +688,6 @@ class Darwin_i386_Manifest(ViewerManifest):
print "Skipping %s" % dst
return []
- libdir = "../packages/lib/release"
# dylibs is a list of all the .dylib files we expect to need
# in our bundled sub-apps. For each of these we'll create a
# symlink from sub-app/Contents/Resources to the real .dylib.
@@ -743,7 +697,7 @@ class Darwin_i386_Manifest(ViewerManifest):
"llcommon",
self.args['configuration'],
libfile),
- os.path.join(libdir, libfile)),
+ os.path.join(relpkgdir, libfile)),
dst=libfile)
for libfile in (
@@ -754,7 +708,7 @@ class Darwin_i386_Manifest(ViewerManifest):
"libexception_handler.dylib",
"libGLOD.dylib",
):
- dylibs += path_optional(os.path.join(libdir, libfile), libfile)
+ dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
# SLVoice and vivox lols, no symlinks needed
for libfile in (
@@ -766,38 +720,41 @@ class Darwin_i386_Manifest(ViewerManifest):
'ca-bundle.crt',
'SLVoice',
):
- self.path2basename(libdir, libfile)
+ self.path2basename(relpkgdir, libfile)
# dylibs that vary based on configuration
if self.args['configuration'].lower() == 'debug':
for libfile in (
"libfmodexL.dylib",
):
- dylibs += path_optional(os.path.join("../packages/lib/debug",
- libfile), libfile)
+ dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile)
else:
for libfile in (
"libfmodex.dylib",
):
- dylibs += path_optional(os.path.join("../packages/lib/release",
- libfile), libfile)
+ dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
# our apps
- for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),
+ for app_bld_dir, app in ((os.path.join(os.pardir,
+ "mac_crash_logger",
+ self.args['configuration']),
+ "mac-crash-logger.app"),
# plugin launcher
- (os.path.join("llplugin", "slplugin"), "SLPlugin.app"),
+ (pkgdir, "SLPlugin.app"),
):
- self.path2basename(os.path.join(os.pardir,
- app_bld_dir, self.args['configuration']),
- app)
+ self.path2basename(app_bld_dir, app)
# our apps dependencies on shared libs
# for each app, for each dylib we collected in dylibs,
# create a symlink to the real copy of the dylib.
resource_path = self.dst_path_of(os.path.join(app, "Contents", "Resources"))
for libfile in dylibs:
- symlinkf(os.path.join(os.pardir, os.pardir, os.pardir, libfile),
- os.path.join(resource_path, libfile))
+ src = os.path.join(os.pardir, os.pardir, os.pardir, libfile)
+ dst = os.path.join(resource_path, libfile)
+ try:
+ symlinkf(src, dst)
+ except OSError as err:
+ print "Can't symlink %s -> %s: %s" % (src, dst, err)
# SLPlugin.app/Contents/Resources gets those Qt4 libraries it needs.
if self.prefix(src="", dst="SLPlugin.app/Contents/Resources"):
for libfile in ('libQtCore.4.dylib',
@@ -814,26 +771,24 @@ class Darwin_i386_Manifest(ViewerManifest):
'libQtWebKit.4.7.1.dylib',
'libQtXml.4.dylib',
'libQtXml.4.7.1.dylib'):
- self.path2basename("../packages/lib/release", libfile)
+ self.path2basename(relpkgdir, libfile)
self.end_prefix("SLPlugin.app/Contents/Resources")
# Qt4 codecs go to llplugin. Not certain why but this is the first
# location probed according to dtruss so we'll go with that.
- if self.prefix(src="../packages/plugins/codecs/", dst="llplugin/codecs"):
+ if self.prefix(src=os.path.join(pkgdir, "llplugin/codecs/"), dst="llplugin/codecs"):
self.path("libq*.dylib")
self.end_prefix("llplugin/codecs")
# Similarly for imageformats.
- if self.prefix(src="../packages/plugins/imageformats/", dst="llplugin/imageformats"):
+ if self.prefix(src=os.path.join(pkgdir, "llplugin/imageformats/"), dst="llplugin/imageformats"):
self.path("libq*.dylib")
self.end_prefix("llplugin/imageformats")
# SLPlugin plugins proper
- if self.prefix(src="", dst="llplugin"):
- self.path2basename("../media_plugins/quicktime/" + self.args['configuration'],
- "media_plugin_quicktime.dylib")
- self.path2basename("../media_plugins/webkit/" + self.args['configuration'],
- "media_plugin_webkit.dylib")
+ if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"):
+ self.path("media_plugin_quicktime.dylib")
+ self.path("media_plugin_webkit.dylib")
self.end_prefix("llplugin")
self.end_prefix("Resources")
@@ -858,48 +813,6 @@ class Darwin_i386_Manifest(ViewerManifest):
def package_finish(self):
global CHANNEL_VENDOR_BASE
- # Sign the app if requested.
- if 'signature' in self.args:
- identity = self.args['signature']
- if identity == '':
- identity = 'Developer ID Application'
-
- # Look for an environment variable set via build.sh when running in Team City.
- try:
- build_secrets_checkout = os.environ['build_secrets_checkout']
- except KeyError:
- pass
- else:
- # variable found so use it to unlock keyvchain followed by codesign
- home_path = os.environ['HOME']
- keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx','password.txt')
- keychain_pwd = open(keychain_pwd_path).read().rstrip()
-
- self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % ( keychain_pwd, home_path ) )
- signed=False
- sign_attempts=3
- sign_retry_wait=15
- while (not signed) and (sign_attempts > 0):
- try:
- sign_attempts-=1;
- self.run_command(
- 'codesign --verbose --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % {
- 'home_path' : home_path,
- 'identity': identity,
- 'bundle': self.get_dst_prefix()
- })
- signed=True # if no exception was raised, the codesign worked
- except ManifestError, err:
- if sign_attempts:
- print >> sys.stderr, "codesign failed, waiting %d seconds before retrying" % sign_retry_wait
- time.sleep(sign_retry_wait)
- sign_retry_wait*=2
- else:
- print >> sys.stderr, "Maximum codesign attempts exceeded; giving up"
- raise
-
- imagename="SecondLife_" + '_'.join(self.args['version'])
-
# MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
# If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick.
@@ -981,6 +894,56 @@ class Darwin_i386_Manifest(ViewerManifest):
# Set the disk image root's custom icon bit
self.run_command('SetFile -a C %r' % volpath)
+
+ # Sign the app if requested;
+ # do this in the copy that's in the .dmg so that the extended attributes used by
+ # the signature are preserved; moving the files using python will leave them behind
+ # and invalidate the signatures.
+ if 'signature' in self.args:
+ app_in_dmg=os.path.join(volpath,self.app_name()+".app")
+ print "Attempting to sign '%s'" % app_in_dmg
+ identity = self.args['signature']
+ if identity == '':
+ identity = 'Developer ID Application'
+
+ # Look for an environment variable set via build.sh when running in Team City.
+ try:
+ build_secrets_checkout = os.environ['build_secrets_checkout']
+ except KeyError:
+ pass
+ else:
+ # variable found so use it to unlock keychain followed by codesign
+ home_path = os.environ['HOME']
+ keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx','password.txt')
+ keychain_pwd = open(keychain_pwd_path).read().rstrip()
+
+ self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % ( keychain_pwd, home_path ) )
+ signed=False
+ sign_attempts=3
+ sign_retry_wait=15
+ while (not signed) and (sign_attempts > 0):
+ try:
+ sign_attempts-=1;
+ self.run_command(
+ 'codesign --verbose --deep --force --keychain "%(home_path)s/Library/Keychains/viewer.keychain" --sign %(identity)r %(bundle)r' % {
+ 'home_path' : home_path,
+ 'identity': identity,
+ 'bundle': app_in_dmg
+ })
+ signed=True # if no exception was raised, the codesign worked
+ except ManifestError, err:
+ if sign_attempts:
+ print >> sys.stderr, "codesign failed, waiting %d seconds before retrying" % sign_retry_wait
+ time.sleep(sign_retry_wait)
+ sign_retry_wait*=2
+ else:
+ print >> sys.stderr, "Maximum codesign attempts exceeded; giving up"
+ raise
+ self.run_command('spctl -a -texec -vv %(bundle)r' % { 'bundle': app_in_dmg })
+
+ imagename="SecondLife_" + '_'.join(self.args['version'])
+
+
finally:
# Unmount the image even if exceptions from any of the above
self.run_command('hdiutil detach -force %r' % devfile)
@@ -995,6 +958,11 @@ class Darwin_i386_Manifest(ViewerManifest):
class LinuxManifest(ViewerManifest):
def construct(self):
super(LinuxManifest, self).construct()
+
+ pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
+ relpkgdir = os.path.join(pkgdir, "lib", "release")
+ debpkgdir = os.path.join(pkgdir, "lib", "debug")
+
self.path("licenses-linux.txt","licenses.txt")
if self.prefix("linux_tools", dst=""):
self.path("client-readme.txt","README-linux.txt")
@@ -1013,7 +981,7 @@ class LinuxManifest(ViewerManifest):
if self.prefix(src="", dst="bin"):
self.path("secondlife-bin","do-not-directly-run-secondlife-bin")
self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")
- self.path2basename("../llplugin/slplugin", "SLPlugin")
+ self.path2basename(pkgdir, "SLPlugin")
self.path2basename("../viewer_components/updater/scripts/linux", "update_install")
self.end_prefix("bin")
@@ -1033,9 +1001,9 @@ class LinuxManifest(ViewerManifest):
self.end_prefix(icon_path)
# plugins
- if self.prefix(src="", dst="bin/llplugin"):
- self.path2basename("../media_plugins/webkit", "libmedia_plugin_webkit.so")
- self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
+ if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="bin/llplugin"):
+ self.path("libmedia_plugin_webkit.so")
+ self.path("libmedia_plugin_gstreamer.so")
self.end_prefix("bin/llplugin")
# llcommon
@@ -1097,7 +1065,11 @@ class Linux_i686_Manifest(LinuxManifest):
def construct(self):
super(Linux_i686_Manifest, self).construct()
- if self.prefix("../packages/lib/release", dst="lib"):
+ pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
+ relpkgdir = os.path.join(pkgdir, "lib", "release")
+ debpkgdir = os.path.join(pkgdir, "lib", "debug")
+
+ if self.prefix(relpkgdir, dst="lib"):
self.path("libapr-1.so")
self.path("libapr-1.so.0")
self.path("libapr-1.so.0.4.5")
@@ -1117,8 +1089,8 @@ class Linux_i686_Manifest(LinuxManifest):
self.path("libfusion-1.4.so.5")
self.path("libdirect-1.4.so.5*")
self.path("libhunspell-1.3.so*")
- self.path("libalut.so")
- self.path("libopenal.so", "libopenal.so.1")
+ self.path("libalut.so*")
+ self.path("libopenal.so*")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
# KLUDGE: As of 2012-04-11, the 'fontconfig' package installs
# libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1
@@ -1160,10 +1132,10 @@ class Linux_i686_Manifest(LinuxManifest):
self.end_prefix("lib")
# Vivox runtimes
- if self.prefix(src="../packages/lib/release", dst="bin"):
+ if self.prefix(src=relpkgdir, dst="bin"):
self.path("SLVoice")
self.end_prefix()
- if self.prefix(src="../packages/lib/release", dst="lib"):
+ if self.prefix(src=relpkgdir, dst="lib"):
self.path("libortp.so")
self.path("libsndfile.so.1")
#self.path("libvivoxoal.so.1") # no - we'll re-use the viewer's own OpenAL lib
@@ -1172,7 +1144,7 @@ class Linux_i686_Manifest(LinuxManifest):
self.end_prefix("lib")
# plugin runtime
- if self.prefix(src="../packages/lib/release", dst="lib"):
+ if self.prefix(src=os.path.join(pkgdir, "lib"), dst="lib"):
self.path("libQtCore.so*")
self.path("libQtGui.so*")
self.path("libQtNetwork.so*")
@@ -1183,7 +1155,8 @@ class Linux_i686_Manifest(LinuxManifest):
self.end_prefix("lib")
# For WebKit/Qt plugin runtimes (image format plugins)
- if self.prefix(src="../packages/plugins/imageformats", dst="bin/llplugin/imageformats"):
+ if self.prefix(src=os.path.join(pkgdir, "llplugin", "imageformats"),
+ dst="bin/llplugin/imageformats"):
self.path("libqgif.so")
self.path("libqico.so")
self.path("libqjpeg.so")
@@ -1193,7 +1166,8 @@ class Linux_i686_Manifest(LinuxManifest):
self.end_prefix("bin/llplugin/imageformats")
# For WebKit/Qt plugin runtimes (codec/character encoding plugins)
- if self.prefix(src="../packages/plugins/codecs", dst="bin/llplugin/codecs"):
+ if self.prefix(src=os.path.join(pkgdir, "llplugin", "codecs"),
+ dst="bin/llplugin/codecs"):
self.path("libqcncodecs.so")
self.path("libqjpcodecs.so")
self.path("libqkrcodecs.so")