From d725e5b24075b2171f8a5b263969991e9b475078 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 29 Sep 2008 19:14:50 +0000 Subject: QAR-872 Viewer 1.21 RC 3 merge viewer_1-21 96116-97380 -> release --- indra/newview/app_settings/settings.xml | 8 +- indra/newview/featuretable.txt | 6 + indra/newview/gpu_table.txt | 2 + .../installers/windows/installer_template.nsi | 256 ++++++------- indra/newview/llappviewer.cpp | 52 ++- indra/newview/llappviewer.h | 3 +- indra/newview/llchatbar.cpp | 22 +- indra/newview/lldrawpoolavatar.cpp | 2 +- indra/newview/lldynamictexture.cpp | 1 + indra/newview/llface.cpp | 6 +- indra/newview/llfloaterabout.cpp | 2 +- indra/newview/llfloaterbump.cpp | 2 +- indra/newview/llfloaterjoystick.cpp | 6 +- indra/newview/llfloaterland.cpp | 2 +- indra/newview/llfloaterlandholdings.cpp | 2 +- indra/newview/llfloaterreporter.cpp | 5 +- indra/newview/llfolderview.cpp | 106 +++--- indra/newview/llfolderview.h | 8 +- indra/newview/llgesturemgr.cpp | 12 +- indra/newview/llimpanel.cpp | 19 +- indra/newview/llimview.cpp | 16 +- indra/newview/lllogchat.cpp | 2 +- indra/newview/llpanelgroupgeneral.cpp | 2 +- indra/newview/llpanelgrouplandmoney.cpp | 2 +- indra/newview/llpanelplace.cpp | 8 +- indra/newview/llselectmgr.cpp | 2 +- indra/newview/llstartup.cpp | 15 +- indra/newview/llstylemap.cpp | 5 +- indra/newview/lltexturecache.cpp | 71 ++-- indra/newview/lltexturectrl.cpp | 2 +- indra/newview/lltexturefetch.cpp | 32 +- indra/newview/lltoolbar.cpp | 2 +- indra/newview/lltoolmgr.cpp | 1 + indra/newview/lltoolpie.cpp | 51 +-- indra/newview/lltoolpie.h | 16 +- indra/newview/llviewermenu.cpp | 62 +-- indra/newview/llviewermessage.cpp | 4 +- indra/newview/llviewerwindow.cpp | 39 +- indra/newview/llviewerwindow.h | 6 +- indra/newview/llvoavatar.cpp | 128 +++++-- indra/newview/llvoavatar.h | 1 + indra/newview/llvovolume.cpp | 1 + indra/newview/llwindebug.cpp | 2 +- indra/newview/skins/default/xui/de/floater_im.xml | 52 ++- .../default/xui/de/floater_preview_gesture.xml | 65 ++-- .../skins/default/xui/de/floater_report_abuse.xml | 6 +- indra/newview/skins/default/xui/de/panel_login.xml | 15 +- .../default/xui/de/panel_preferences_chat.xml | 69 ++-- .../skins/default/xui/de/panel_region_estate.xml | 2 +- .../skins/default/xui/es/floater_report_abuse.xml | 2 +- .../newview/skins/default/xui/fr/floater_about.xml | 30 ++ .../skins/default/xui/fr/floater_about_land.xml | 182 ++++++++- .../default/xui/fr/floater_animation_preview.xml | 13 + .../skins/default/xui/fr/floater_avatar_picker.xml | 6 + .../default/xui/fr/floater_avatar_textures.xml | 6 + .../skins/default/xui/fr/floater_build_options.xml | 1 + .../skins/default/xui/fr/floater_buy_contents.xml | 9 + .../skins/default/xui/fr/floater_buy_currency.xml | 48 +-- .../skins/default/xui/fr/floater_buy_land.xml | 6 + .../skins/default/xui/fr/floater_buy_object.xml | 15 + .../skins/default/xui/fr/floater_camera.xml | 12 + .../skins/default/xui/fr/floater_critical.xml | 2 +- .../skins/default/xui/fr/floater_customize.xml | 359 ++++++++---------- .../default/xui/fr/floater_day_cycle_options.xml | 97 +++++ .../default/xui/fr/floater_device_settings.xml | 3 + .../skins/default/xui/fr/floater_env_settings.xml | 23 ++ .../default/xui/fr/floater_hardware_settings.xml | 40 ++ indra/newview/skins/default/xui/fr/floater_hud.xml | 2 + indra/newview/skins/default/xui/fr/floater_im.xml | 36 ++ .../skins/default/xui/fr/floater_image_preview.xml | 4 + .../skins/default/xui/fr/floater_inspect.xml | 14 + .../skins/default/xui/fr/floater_inventory.xml | 3 + .../xui/fr/floater_inventory_item_properties.xml | 12 + .../skins/default/xui/fr/floater_joystick.xml | 83 +++++ .../skins/default/xui/fr/floater_lagmeter.xml | 152 ++++++++ .../skins/default/xui/fr/floater_land_holdings.xml | 3 + .../default/xui/fr/floater_live_lsleditor.xml | 7 + .../skins/default/xui/fr/floater_lsl_guide.xml | 7 + .../skins/default/xui/fr/floater_media_browser.xml | 19 + .../skins/default/xui/fr/floater_mem_leaking.xml | 18 + .../skins/default/xui/fr/floater_mute_object.xml | 12 + .../skins/default/xui/fr/floater_my_friends.xml | 7 + .../skins/default/xui/fr/floater_post_process.xml | 54 +++ .../skins/default/xui/fr/floater_postcard.xml | 27 +- .../skins/default/xui/fr/floater_preferences.xml | 3 +- .../default/xui/fr/floater_preview_classified.xml | 2 + .../skins/default/xui/fr/floater_preview_event.xml | 2 + .../default/xui/fr/floater_preview_notecard.xml | 6 + .../skins/default/xui/fr/floater_region_info.xml | 2 + .../skins/default/xui/fr/floater_report_abuse.xml | 172 +++++++-- .../skins/default/xui/fr/floater_select_key.xml | 7 + .../default/xui/fr/floater_settings_debug.xml | 2 + .../skins/default/xui/fr/floater_snapshot.xml | 93 +++-- .../skins/default/xui/fr/floater_texture_ctrl.xml | 7 + .../newview/skins/default/xui/fr/floater_tools.xml | 140 ++++++- .../skins/default/xui/fr/floater_top_objects.xml | 1 + indra/newview/skins/default/xui/fr/floater_tos.xml | 4 +- .../skins/default/xui/fr/floater_url_entry.xml | 12 + .../newview/skins/default/xui/fr/floater_water.xml | 88 +++++ .../default/xui/fr/floater_wearable_save_as.xml | 2 +- .../default/xui/fr/floater_windlight_options.xml | 190 ++++++++++ .../skins/default/xui/fr/floater_world_map.xml | 57 +-- .../skins/default/xui/fr/menu_inventory.xml | 3 + indra/newview/skins/default/xui/fr/menu_login.xml | 13 + indra/newview/skins/default/xui/fr/menu_slurl.xml | 6 + indra/newview/skins/default/xui/fr/menu_viewer.xml | 165 +++++--- indra/newview/skins/default/xui/fr/mime_types.xml | 230 ++++++++++++ .../skins/default/xui/fr/panel_audio_device.xml | 26 ++ .../newview/skins/default/xui/fr/panel_friends.xml | 28 ++ .../skins/default/xui/fr/panel_group_general.xml | 28 +- .../skins/default/xui/fr/panel_group_invite.xml | 14 + .../default/xui/fr/panel_group_land_money.xml | 6 + .../skins/default/xui/fr/panel_group_notices.xml | 2 + .../skins/default/xui/fr/panel_group_roles.xml | 3 + .../newview/skins/default/xui/fr/panel_groups.xml | 16 + indra/newview/skins/default/xui/fr/panel_login.xml | 32 +- .../default/xui/fr/panel_preferences_chat.xml | 40 +- .../default/xui/fr/panel_preferences_general.xml | 86 ++++- .../default/xui/fr/panel_preferences_graphics1.xml | 166 ++++++++- .../skins/default/xui/fr/panel_region_debug.xml | 12 + .../skins/default/xui/fr/panel_region_estate.xml | 16 + .../skins/default/xui/fr/panel_region_general.xml | 10 + .../skins/default/xui/fr/panel_status_bar.xml | 12 + .../newview/skins/default/xui/fr/role_actions.xml | 391 +++++++++---------- indra/newview/skins/default/xui/fr/strings.xml | 414 +++++++++++++++++++++ .../skins/default/xui/fr/teleport_strings.xml | 90 +++++ indra/newview/skins/default/xui/ja/floater_im.xml | 15 - .../skins/default/xui/ja/floater_mem_leaking.xml | 6 +- .../skins/default/xui/ja/floater_report_abuse.xml | 2 +- .../skins/default/xui/ja/floater_snapshot.xml | 6 +- .../newview/skins/default/xui/ja/floater_tools.xml | 4 +- indra/newview/skins/default/xui/ja/panel_login.xml | 2 +- indra/newview/skins/default/xui/pt/floater_im.xml | 9 - .../skins/default/xui/pt/floater_report_abuse.xml | 2 +- indra/newview/viewer_manifest.py | 1 + 135 files changed, 3962 insertions(+), 1199 deletions(-) create mode 100644 indra/newview/skins/default/xui/fr/floater_camera.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_device_settings.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_env_settings.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_hardware_settings.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_hud.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_inspect.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_joystick.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_lagmeter.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_lsl_guide.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_media_browser.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_mem_leaking.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_mute_object.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_my_friends.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_post_process.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_preview_classified.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_preview_event.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_region_info.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_select_key.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_url_entry.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_water.xml create mode 100644 indra/newview/skins/default/xui/fr/floater_windlight_options.xml create mode 100644 indra/newview/skins/default/xui/fr/menu_login.xml create mode 100644 indra/newview/skins/default/xui/fr/menu_slurl.xml create mode 100644 indra/newview/skins/default/xui/fr/mime_types.xml create mode 100644 indra/newview/skins/default/xui/fr/panel_audio_device.xml create mode 100644 indra/newview/skins/default/xui/fr/panel_friends.xml create mode 100644 indra/newview/skins/default/xui/fr/panel_groups.xml create mode 100644 indra/newview/skins/default/xui/fr/strings.xml create mode 100644 indra/newview/skins/default/xui/fr/teleport_strings.xml (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1f34bae9b5..49202f206c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5052,10 +5052,10 @@ Color4 Value - 1 - 0.5 - 0.0 - 1 + 0.699999988079 + 0.899999976158 + 0.699999988079 + 1 OpenDebugStatAdvanced diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 0a1295874d..b227043413 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -303,6 +303,9 @@ list Intel_G33 RenderTerrainDetail 1 0 RenderVBOEnable 1 0 +list Intel_G45 +WindLightUseAtmosShaders 0 0 + list Intel_Bear_Lake RenderTerrainDetail 1 0 RenderVBOEnable 1 0 @@ -315,6 +318,9 @@ list Intel_Brookdale RenderTerrainDetail 1 0 RenderVBOEnable 1 0 +list Intel_Eaglelake +WindLightUseAtmosShaders 0 0 + list Intel_Montara RenderTerrainDetail 1 0 RenderVBOEnable 1 0 diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 77b75e178f..48af543aa4 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -139,9 +139,11 @@ Intel 945G .*Intel.*945G 0 1 Intel 950 .*Intel.*950.* 0 1 Intel 965 .*Intel.*965.* 0 1 Intel G33 .*Intel.*G33.* 0 0 +Intel G45 .*Intel.*G45.* 0 1 Intel Bear Lake .*Intel.*Bear Lake.* 0 0 Intel Broadwater .*Intel.*Broadwater.* 0 0 Intel Brookdale .*Intel.*Brookdale.* 0 0 +Intel Eaglelake .*Intel.*Eaglelake.* 0 1 Intel Montara .*Intel.*Montara.* 0 0 Intel Springdale .*Intel.*Springdale.* 0 0 Matrox .*Matrox.* 0 0 diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index ec4fd85861..c79550774c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -69,6 +69,7 @@ DirText $(DirectoryChooseTitle) $(DirectoryChooseUpdate) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) !endif + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -78,131 +79,9 @@ Var INSTFLAGS Var LANGFLAGS Var INSTSHORTCUT -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Sections -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -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 $INSTFLAGS "${INSTFLAGS}" -StrCpy $INSTPROG "${INSTNAME}" -StrCpy $INSTEXE "${INSTEXE}" -StrCpy $INSTSHORTCUT "${SHORTCUT}" - -IfSilent +2 -Goto NOT_SILENT - Call CheckStartupParams ; Figure out where, what and how to install. -NOT_SILENT: -Call CheckWindowsVersion ; warn if on Windows 98/ME -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 RemoveNSIS ; Check for old NSIS install to remove - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; 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%% - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; If this is a silent update, we don't need to re-create these shortcuts or registry entries. -IfSilent POST_INSTALL - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Shortcuts in start menu -CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" -SetOutPath "$INSTDIR" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$INSTFLAGS" - -!ifdef MUSEUM -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum.lnk" \ - - "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum Spanish.lnk" \ - - "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" -!endif - -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Trial Account.url" \ - "InternetShortcut" "URL" \ - "http://www.secondlife.com/registration/" -WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ - "InternetShortcut" "URL" \ - "http://www.secondlife.com/account/" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.lnk" \ - "$INSTDIR\lsl_guide.html" -CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ - '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Other shortcuts -SetOutPath "$INSTDIR" -CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" -CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" -CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ - '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' - -!ifdef MUSEUM -CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" - -CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" - -CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" - -CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" - -!endif - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; 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" "Flags" "$INSTFLAGS" -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" /P="$INSTPROG"' - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; 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"' -WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' - -Goto WRITE_UNINST - -POST_INSTALL: -; Run a post-executable script if necessary. -Call PostInstallExe - -WRITE_UNINST: -; write out uninstaller -WriteUninstaller "$INSTDIR\uninst.exe" - -; end of default section -SectionEnd +;;; Function definitions should go before file includes, because the NSIS package +;;; is a single stream of bytecodes + file data. So if your function definitions are at +;;; the end of the file it has to decompress the whole thing before it can call a function. JC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; PostInstallExe @@ -981,4 +860,131 @@ Function un.onInit FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Sections +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +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 $INSTFLAGS "${INSTFLAGS}" +StrCpy $INSTPROG "${INSTNAME}" +StrCpy $INSTEXE "${INSTEXE}" +StrCpy $INSTSHORTCUT "${SHORTCUT}" + +IfSilent +2 +Goto NOT_SILENT + Call CheckStartupParams ; Figure out where, what and how to install. +NOT_SILENT: +Call CheckWindowsVersion ; warn if on Windows 98/ME +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 RemoveNSIS ; Check for old NSIS install to remove + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; 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%% + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; If this is a silent update, we don't need to re-create these shortcuts or registry entries. +IfSilent POST_INSTALL + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Shortcuts in start menu +CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" +SetOutPath "$INSTDIR" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ + "$INSTDIR\$INSTEXE" "$INSTFLAGS" + +!ifdef MUSEUM +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum.lnk" \ + + "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum Spanish.lnk" \ + + "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" +!endif + +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Trial Account.url" \ + "InternetShortcut" "URL" \ + "http://www.secondlife.com/registration/" +WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ + "InternetShortcut" "URL" \ + "http://www.secondlife.com/account/" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.lnk" \ + "$INSTDIR\lsl_guide.html" +CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ + '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Other shortcuts +SetOutPath "$INSTDIR" +CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" +CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" +CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ + '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' + +!ifdef MUSEUM +CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" + +CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" + +CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" + +CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" + +!endif + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; 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" "Flags" "$INSTFLAGS" +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" /P="$INSTPROG"' + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; 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"' +WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' + +Goto WRITE_UNINST + +POST_INSTALL: +; Run a post-executable script if necessary. +Call PostInstallExe + +WRITE_UNINST: +; write out uninstaller +WriteUninstaller "$INSTDIR\uninst.exe" + +; end of default section +SectionEnd + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 87467e6afa..770fa0ad56 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -665,12 +665,11 @@ bool LLAppViewer::init() LLUIImageList::getInstance(), ui_audio_callback, &LLUI::sGLScaleFactor); - LLWeb::initClass(); // do this after LLUI LLTextEditor::setURLCallbacks(&LLWeb::loadURL, &LLURLDispatcher::dispatchFromTextEditor, &LLURLDispatcher::dispatchFromTextEditor); - + LLUICtrlFactory::getInstance()->setupPaths(); // update paths with correct language set ///////////////////////////////////////////////// @@ -753,6 +752,8 @@ bool LLAppViewer::init() CreateLCDDebugWindows(); #endif + LLFolderViewItem::initClass(); // SJB: Needs to happen after initWindow(), not sure why but related to fonts + gGLManager.getGLInfo(gDebugInfo); gGLManager.printGLInfoString(); @@ -934,6 +935,7 @@ bool LLAppViewer::mainLoop() LLFastTimer t3(LLFastTimer::FTM_IDLE); idle(); + if (gAres != NULL && gAres->isInitialized()) { pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(LLFastTimer::FTM_PUMP); @@ -1070,14 +1072,17 @@ bool LLAppViewer::mainLoop() } catch(std::bad_alloc) - { - llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; - + { //stop memory leaking simulation if(LLFloaterMemLeak::getInstance()) { LLFloaterMemLeak::getInstance()->stop() ; - } + llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; + } + else + { + llerrs << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; + } } } @@ -1272,6 +1277,7 @@ bool LLAppViewer::cleanup() //LLVolumeMgr::cleanupClass(); LLPrimitive::cleanupVolumeManager(); LLWorldMapView::cleanupClass(); + LLFolderViewItem::cleanupClass(); LLUI::cleanupClass(); // @@ -1471,7 +1477,7 @@ bool LLAppViewer::initLogging() return true; } -void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_defaults) +bool LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_defaults) { for(LLSD::map_iterator itr = mSettingsFileList.beginMap(); itr != mSettingsFileList.endMap(); ++itr) { @@ -1506,13 +1512,24 @@ void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_default } if(!gSettings[settings_name]->loadFromFile(full_settings_path, set_defaults)) { - llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl; + // If attempting to load the default global settings (app_settings/settings.xml) + // fails, the app should error and quit. + if(path_index == LL_PATH_APP_SETTINGS && settings_name == sGlobalSettingsName) + { + llwarns << "Error: Cannot load default settings from: " << full_settings_path << llendl; + return false; + } + else + { + llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl; + } } else { llinfos << "Loaded settings file " << full_settings_path << llendl; } } + return true; } std::string LLAppViewer::getSettingsFileName(const std::string& file) @@ -1554,7 +1571,19 @@ bool LLAppViewer::initConfiguration() // - load defaults bool set_defaults = true; - loadSettingsFromDirectory(LL_PATH_APP_SETTINGS, set_defaults); + if(!loadSettingsFromDirectory(LL_PATH_APP_SETTINGS, set_defaults)) + { + std::ostringstream msg; + msg << "Second Life could not load its default settings file. \n" + << "The installation may be corrupted. \n"; + + OSMessageBox( + msg.str(), + LLStringUtil::null, + OSMB_OK); + + return false; + } // - set procedural settings gSavedSettings.setString("ClientSettingsFile", @@ -2322,6 +2351,11 @@ void LLAppViewer::handleViewerCrash() { gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName(); gDebugInfo["CurrentRegion"] = gAgent.getRegion()->getName(); + + const LLVector3& loc = gAgent.getPositionAgent(); + gDebugInfo["CurrentLocationX"] = loc.mV[0]; + gDebugInfo["CurrentLocationY"] = loc.mV[1]; + gDebugInfo["CurrentLocationZ"] = loc.mV[2]; } if(LLAppViewer::instance()->mMainloopTimeout) diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index a43fc56e51..d1359daad4 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -122,7 +122,8 @@ public: static const std::string sPerAccountSettingsName; static const std::string sCrashSettingsName; - void loadSettingsFromDirectory(ELLPath path_index, bool set_defaults = false); + // returns false if loading a *required* settings file fails. + bool loadSettingsFromDirectory(ELLPath path_index, bool set_defaults = false); std::string getSettingsFileName(const std::string& file); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 2e542995d4..d6b2a9e28e 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -216,15 +216,14 @@ void LLChatBar::refresh() void LLChatBar::refreshGestures() { - LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL; - if (mGestureCombo && gestures) + if (mGestureCombo) { //store current selection so we can maintain it std::string cur_gesture = mGestureCombo->getValue().asString(); - gestures->selectFirstItem(); + mGestureCombo->selectFirstItem(); std::string label = mGestureCombo->getValue().asString();; // clear - gestures->clearRows(); + mGestureCombo->clearRows(); // collect list of unique gestures std::map unique; @@ -245,20 +244,21 @@ void LLChatBar::refreshGestures() std::map ::iterator it2; for (it2 = unique.begin(); it2 != unique.end(); ++it2) { - gestures->addSimpleElement((*it2).first); + mGestureCombo->addSimpleElement((*it2).first); } - gestures->sortByColumn(LLStringUtil::null, TRUE); - // Insert label after sorting - gestures->addSimpleElement(label, ADD_TOP); + mGestureCombo->sortByName(); + // Insert label after sorting, at top, with separator below it + mGestureCombo->addSeparator(ADD_TOP); + mGestureCombo->addSimpleElement(getString("gesture_label"), ADD_TOP); if (!cur_gesture.empty()) - { - gestures->selectByValue(LLSD(cur_gesture)); + { + mGestureCombo->selectByValue(LLSD(cur_gesture)); } else { - gestures->selectFirstItem(); + mGestureCombo->selectFirstItem(); } } } diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index e068d90caf..bb4af2268d 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -664,7 +664,7 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const LLVertexBufferAvatar::LLVertexBufferAvatar() : LLVertexBuffer(sDataMask, LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) > 0 ? - GL_STATIC_DRAW_ARB : + GL_DYNAMIC_DRAW_ARB : GL_STREAM_DRAW_ARB) { diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 039ed2862f..d29ac9b43a 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -141,6 +141,7 @@ void LLDynamicTexture::preRender(BOOL clear_depth) if (window_pos.mY < 0) { mOrigin.mY += window_pos.mY; + mOrigin.mY = llmax(mOrigin.mY, 0) ; } LLImageGL::unbindTexture(0, GL_TEXTURE_2D); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 294f13c338..05b873eae4 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -419,8 +419,6 @@ void LLFace::renderSelected(LLImageGL *imagep, const LLColor4& color) if (mGeomCount > 0 && mIndicesCount > 0) { - gGL.color4fv(color.mV); - LLViewerImage::bindTexture(imagep); gGL.pushMatrix(); @@ -433,12 +431,16 @@ void LLFace::renderSelected(LLImageGL *imagep, const LLColor4& color) glMultMatrixf((GLfloat*)mDrawablep->getRegion()->mRenderMatrix.mMatrix); } + setFaceColor(color); + renderSetColor(); + mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD); #if !LL_RELEASE_FOR_DOWNLOAD LLGLState::checkClientArrays("", LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD); #endif mVertexBuffer->draw(LLVertexBuffer::TRIANGLES, mIndicesCount, mIndicesIndex); + unsetFaceColor(); gGL.popMatrix(); } } diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index cd1b24e892..9d3a108baa 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -131,7 +131,7 @@ LLFloaterAbout::LLFloaterAbout() server_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); const LLVector3d &pos = gAgent.getPositionGlobal(); - LLUIString pos_text = getUIString("you_are_at"); + LLUIString pos_text = getString("you_are_at"); pos_text.setArg("[POSITION]", llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ])); support.append(pos_text); diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 98540f3c5e..3782039c25 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -149,7 +149,7 @@ void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd) } // All above action strings are in XML file - LLUIString text = sInstance->getUIString(action); + LLUIString text = sInstance->getString(action); text.setArg("[TIME]", time); text.setArg("[FIRST]", mcd->mFirstName); text.setArg("[LAST]", mcd->mLastName); diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index de88b490d9..e912431323 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -58,7 +58,7 @@ void LLFloaterJoystick::draw() childSetEnabled("enable_joystick", joystick_inited); childSetEnabled("joystick_type", joystick_inited); std::string desc = LLViewerJoystick::getInstance()->getDescription(); - if (desc.empty()) desc = getUIString("NoDevice"); + if (desc.empty()) desc = getString("NoDevice"); childSetText("joystick_type", desc); LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); @@ -83,8 +83,8 @@ void LLFloaterJoystick::draw() BOOL LLFloaterJoystick::postBuild() { F32 range = gSavedSettings.getBOOL("Cursor3D") ? 1024.f : 2.f; - LLUIString axis = getUIString("Axis"); - LLUIString joystick = getUIString("JoystickMonitor"); + LLUIString axis = getString("Axis"); + LLUIString joystick = getString("JoystickMonitor"); // use this child to get relative positioning info; we'll place the // joystick monitor on its right, vertically aligned to it. diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 5dfbee73a4..6ba78285ba 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2399,7 +2399,7 @@ void LLPanelLandAccess::refresh_ui() } if (override) { - childSetToolTip("Only Allow", getUIString("estate_override")); + childSetToolTip("Only Allow", getString("estate_override")); } else { diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index dfc3896a6a..cb1c91a676 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -116,7 +116,7 @@ BOOL LLFloaterLandHoldings::postBuild() element["columns"][0]["value"] = gAgent.mGroups.get(i).mName; element["columns"][0]["font"] = "SANSSERIF"; - LLUIString areastr = getUIString("area_string"); + LLUIString areastr = getString("area_string"); areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.get(i).mContribution)); element["columns"][1]["column"] = "area"; element["columns"][1]["value"] = areastr; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index d00157da76..aac453b13e 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -937,11 +937,12 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, if(result < 0) { LLStringUtil::format_map_t args; - args["[REASON]"] = std::string(LLAssetStorage::getErrorString(result)); + std::string reason = std::string(LLAssetStorage::getErrorString(result)); + args["[REASON]"] = reason; gViewerWindow->alertXml("ErrorUploadingReportScreenshot", args); std::string err_msg("There was a problem uploading a report screenshot"); - err_msg += " due to the following reason: " + args["[REASON]"]; + err_msg += " due to the following reason: " + reason; llwarns << err_msg << llendl; return; } diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 016909cf7f..4a55e0b860 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -116,8 +116,34 @@ LLColor4 LLFolderViewItem::sFilterBGColor; LLColor4 LLFolderViewItem::sFilterTextColor; LLColor4 LLFolderViewItem::sSuffixColor; LLColor4 LLFolderViewItem::sSearchStatusColor; +LLUIImagePtr LLFolderViewItem::sArrowImage; +LLUIImagePtr LLFolderViewItem::sBoxImage; + +//static +void LLFolderViewItem::initClass() +{ + sFont = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); + sSmallFont = LLResMgr::getInstance()->getRes( LLFONT_SMALL ); + sFgColor = gColors.getColor( "MenuItemEnabledColor" ); + sHighlightBgColor = gColors.getColor( "MenuItemHighlightBgColor" ); + sHighlightFgColor = gColors.getColor( "MenuItemHighlightFgColor" ); + sFilterBGColor = gColors.getColor( "FilterBackgroundColor" ); + sFilterTextColor = gColors.getColor( "FilterTextColor" ); + sSuffixColor = gColors.getColor( "InventoryItemSuffixColor" ); + sSearchStatusColor = gColors.getColor( "InventorySearchStatusColor" ); + sArrowImage = LLUI::getUIImage("folder_arrow.tga"); + sBoxImage = LLUI::getUIImage("rounded_square.tga"); +} + +//static +void LLFolderViewItem::cleanupClass() +{ + sArrowImage = NULL; + sBoxImage = NULL; +} // Default constructor +// NOTE: Optimize this, we call it a *lot* when opening a large inventory LLFolderViewItem::LLFolderViewItem( const std::string& name, LLUIImagePtr icon, S32 creation_date, LLFolderView* root, @@ -132,6 +158,7 @@ LLFolderViewItem::LLFolderViewItem( const std::string& name, LLUIImagePtr icon, mIsCurSelection( FALSE ), mSelectPending(FALSE), mLabelStyle( LLFontGL::NORMAL ), + mIcon(icon), mHasVisibleChildren(FALSE), mIndentation(0), mNumDescendantsSelected(0), @@ -143,31 +170,7 @@ LLFolderViewItem::LLFolderViewItem( const std::string& name, LLUIImagePtr icon, mDragAndDropTarget(FALSE), mIsLoading(FALSE) { - setIcon(icon); - if( !LLFolderViewItem::sFont ) - { - LLFolderViewItem::sFont = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); - } - - if (!LLFolderViewItem::sSmallFont) - { - LLFolderViewItem::sSmallFont = LLResMgr::getInstance()->getRes( LLFONT_SMALL ); - } - - // HACK: Can't be set above because gSavedSettings might not be constructed. - LLFolderViewItem::sFgColor = gColors.getColor( "MenuItemEnabledColor" ); - LLFolderViewItem::sHighlightBgColor = gColors.getColor( "MenuItemHighlightBgColor" ); - LLFolderViewItem::sHighlightFgColor = gColors.getColor( "MenuItemHighlightFgColor" ); - LLFolderViewItem::sFilterBGColor = gColors.getColor( "FilterBackgroundColor" ); - LLFolderViewItem::sFilterTextColor = gColors.getColor( "FilterTextColor" ); - LLFolderViewItem::sSuffixColor = gColors.getColor( "InventoryItemSuffixColor" ); - LLFolderViewItem::sSearchStatusColor = gColors.getColor( "InventorySearchStatusColor" ); - - - mArrowImage = LLUI::getUIImage("folder_arrow.tga"); - mBoxImage = LLUI::getUIImage("rounded_square.tga"); - - refresh(); + refresh(); // possible opt: only call refreshFromListener() setTabStop(FALSE); } @@ -176,8 +179,6 @@ LLFolderViewItem::~LLFolderViewItem( void ) { delete mListener; mListener = NULL; - mArrowImage = NULL; - mBoxImage = NULL; } LLFolderView* LLFolderViewItem::getRoot() @@ -276,7 +277,7 @@ void LLFolderViewItem::setIcon(LLUIImagePtr icon) } // refresh information from the listener -void LLFolderViewItem::refresh() +void LLFolderViewItem::refreshFromListener() { if(mListener) { @@ -290,30 +291,35 @@ void LLFolderViewItem::refresh() } mLabelStyle = mListener->getLabelStyle(); mLabelSuffix = mListener->getLabelSuffix(); + } +} - std::string searchable_label(mLabel); - searchable_label.append(mLabelSuffix); - LLStringUtil::toUpper(searchable_label); +void LLFolderViewItem::refresh() +{ + refreshFromListener(); + + std::string searchable_label(mLabel); + searchable_label.append(mLabelSuffix); + LLStringUtil::toUpper(searchable_label); - if (mSearchableLabel.compare(searchable_label)) + if (mSearchableLabel.compare(searchable_label)) + { + mSearchableLabel.assign(searchable_label); + dirtyFilter(); + // some part of label has changed, so overall width has potentially changed + if (mParentFolder) { - mSearchableLabel.assign(searchable_label); - dirtyFilter(); - // some part of label has changed, so overall width has potentially changed - if (mParentFolder) - { - mParentFolder->requestArrange(); - } + mParentFolder->requestArrange(); } + } - S32 label_width = sFont->getWidth(mLabel); - if( mLabelSuffix.size() ) - { - label_width += sFont->getWidth( mLabelSuffix ); - } + S32 label_width = sFont->getWidth(mLabel); + if( mLabelSuffix.size() ) + { + label_width += sFont->getWidth( mLabelSuffix ); + } - mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + label_width; - } + mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + label_width; } void LLFolderViewItem::applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor) @@ -798,10 +804,10 @@ void LLFolderViewItem::draw() } if(/*mControlLabel[0] != '\0' && */possibly_has_children) { - if (mArrowImage) + if (sArrowImage) { gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD, - ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, mArrowImage->getImage(), sFgColor); + ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, sArrowImage->getImage(), sFgColor); } } @@ -937,7 +943,7 @@ void LLFolderViewItem::draw() S32_MAX, S32_MAX, &right_x, FALSE ); } - if (mBoxImage.notNull() && mStringMatchOffset != std::string::npos) + if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos) { // don't draw backgrounds for zero-length strings S32 filter_string_length = mRoot->getFilterSubString().size(); @@ -950,7 +956,7 @@ void LLFolderViewItem::draw() S32 top = getRect().getHeight(); LLRect box_rect(left, top, right, bottom); - mBoxImage->draw(box_rect, sFilterBGColor); + sBoxImage->draw(box_rect, sFilterBGColor); F32 match_string_left = text_left + sFont->getWidthF32(combined_string, 0, mStringMatchOffset); F32 y = (F32)getRect().getHeight() - sFont->getLineHeight() - (F32)TEXT_PAD; sFont->renderUTF8( combined_string, mStringMatchOffset, match_string_left, y, diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 841146db5a..938580ebe7 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -327,6 +327,8 @@ protected: static LLColor4 sFilterTextColor; static LLColor4 sSuffixColor; static LLColor4 sSearchStatusColor; + static LLUIImagePtr sArrowImage; + static LLUIImagePtr sBoxImage; std::string mLabel; std::string mSearchableLabel; @@ -351,8 +353,6 @@ protected: F32 mControlLabelRotation; LLFolderView* mRoot; BOOL mDragAndDropTarget; - LLUIImagePtr mArrowImage; - LLUIImagePtr mBoxImage; BOOL mIsLoading; LLTimer mTimeSinceRequestStart; @@ -375,6 +375,9 @@ protected: virtual BOOL addFolder(LLFolderViewFolder*) { return FALSE; } public: + static void initClass(); + static void cleanupClass(); + // This function is called when the folder view is dirty. It's // implemented here but called by derived classes when folding the // views. @@ -500,6 +503,7 @@ public: void setIcon(LLUIImagePtr icon); // refresh information from the object being viewed. + void refreshFromListener(); virtual void refresh(); virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor); diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 9af4bbd532..a25b1daebf 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -507,9 +507,6 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s // Only pay attention to the first gesture in the string. if( !found_gestures ) { - std::string cur_token_lower = cur_token; - LLStringUtil::toLower(cur_token_lower); - // collect gestures that match std::vector matching; item_map_t::iterator it; @@ -520,7 +517,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s // Gesture asset data might not have arrived yet if (!gesture) continue; - if (gesture->mTrigger == cur_token_lower) + if (LLStringUtil::compareInsensitive(gesture->mTrigger, cur_token) == 0) { matching.push_back(gesture); } @@ -548,10 +545,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s } // Don't muck with the user's capitalization if we don't have to. - std::string output = gesture->mReplaceText; - std::string output_lower = output; - LLStringUtil::toLower(output_lower); - if( cur_token_lower == output_lower ) + if( LLStringUtil::compareInsensitive(cur_token, gesture->mReplaceText) == 0) { if (revised_string) revised_string->append( cur_token ); @@ -559,7 +553,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s else { if (revised_string) - revised_string->append( output ); + revised_string->append( gesture->mReplaceText ); } } found_gestures = TRUE; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index ca5dd7be36..9538efdc37 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -2172,7 +2172,7 @@ void LLFloaterIMPanel::removeTypingIndicator(const LLIMInfo* im_info) void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata) { LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata; - LLUIString message = line; + std::string message = line; switch (type) { @@ -2180,14 +2180,14 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string // add warning log enabled message if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) { - message = LLFloaterChat::getInstance()->getUIString("IM_logging_string"); + message = LLFloaterChat::getInstance()->getString("IM_logging_string"); } break; case LLLogChat::LOG_END: // add log end message if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) { - message = LLFloaterChat::getInstance()->getUIString("IM_logging_string"); + message = LLFloaterChat::getInstance()->getString("IM_logging_string"); } break; case LLLogChat::LOG_LINE: @@ -2232,11 +2232,16 @@ void LLFloaterIMPanel::showSessionEventError( const std::string& error_string) { LLStringUtil::format_map_t args; - args["[REASON]"] = - LLFloaterIM::sErrorStringsMap[error_string]; - args["[EVENT]"] = - LLFloaterIM::sEventStringsMap[event_string]; + std::string event; + + event = LLFloaterIM::sEventStringsMap[event_string]; args["[RECIPIENT]"] = getTitle(); + LLStringUtil::format(event, args); + + + args = LLStringUtil::format_map_t(); + args["[REASON]"] = LLFloaterIM::sErrorStringsMap[error_string]; + args["[EVENT]"] = event; gViewerWindow->alertXml( "ChatterBoxSessionEventError", diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index f1b3182cac..c33de4c457 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -157,10 +157,10 @@ BOOL LLFloaterIM::postBuild() { // IM session initiation warnings sOnlyUserMessage = getString("only_user_message"); - sOfflineMessage = getUIString("offline_message"); - sMutedMessage = getUIString("muted_message"); + sOfflineMessage = getString("offline_message"); + sMutedMessage = getString("muted_message"); - sInviteMessage = getUIString("invite_message"); + sInviteMessage = getString("invite_message"); if ( sErrorStringsMap.find("generic") == sErrorStringsMap.end() ) { @@ -216,12 +216,6 @@ BOOL LLFloaterIM::postBuild() } - if ( sEventStringsMap.end() == sEventStringsMap.find("mute") ) - { - sEventStringsMap["mute"] = - getString("mute_agent_event"); - } - if ( sForceCloseSessionMap.end() == sForceCloseSessionMap.find("removed") ) { @@ -525,7 +519,7 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess { LLFloaterChat* floaterp = LLFloaterChat::getInstance(); - message = floaterp->getUIString(message_name); + message = floaterp->getString(message_name); message.setArgList(args); LLChat chat(message); @@ -537,7 +531,7 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess LLFloaterIMPanel* floaterp = findFloaterBySession(session_id); if (floaterp) { - message = floaterp->getUIString(message_name); + message = floaterp->getString(message_name); message.setArgList(args); gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString()); diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index d129687a11..85b374b618 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -112,7 +112,7 @@ void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/ if (!fptr) { - //LLUIString message = LLFloaterChat::getInstance()->getUIString("IM_logging_string"); + //LLUIString message = LLFloaterChat::getInstance()->getString("IM_logging_string"); //callback(LOG_EMPTY,"IM_logging_string",userdata); callback(LOG_EMPTY,LLStringUtil::null,userdata); return; //No previous conversation with this name. diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index c4c7749b8a..044ad280fa 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -396,7 +396,7 @@ void LLPanelGroupGeneral::openProfile(void* data) bool LLPanelGroupGeneral::needsApply(std::string& mesg) { - mesg = getUIString("group_info_unchanged"); + mesg = getString("group_info_unchanged"); return mChanged || mGroupID.isNull(); } diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 84ba2dd807..a1c8bc92d9 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -571,7 +571,7 @@ bool LLPanelGroupLandMoney::apply(std::string& mesg) { if (!mImplementationp->applyContribution() ) { - mesg.assign(getUIString("land_contrib_error")); + mesg = getString("land_contrib_error"); return false; } diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp index 963394b749..f40c101a4d 100644 --- a/indra/newview/llpanelplace.cpp +++ b/indra/newview/llpanelplace.cpp @@ -270,21 +270,21 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **) } std::string info_text; - LLUIString traffic = self->getUIString("traffic_text"); + LLUIString traffic = self->getString("traffic_text"); traffic.setArg("[TRAFFIC]", llformat("%d ", (int)dwell)); info_text = traffic; - LLUIString area = self->getUIString("area_text"); + LLUIString area = self->getString("area_text"); area.setArg("[AREA]", llformat("%d", actual_area)); info_text += area; if (flags & DFQ_FOR_SALE) { - LLUIString forsale = self->getUIString("forsale_text"); + LLUIString forsale = self->getString("forsale_text"); forsale.setArg("[PRICE]", llformat("%d", sale_price)); info_text += forsale; } if (auction_id != 0) { - LLUIString auction = self->getUIString("auction_text"); + LLUIString auction = self->getString("auction_text"); auction.setArg("[ID]", llformat("%010d ", auction_id)); info_text += auction; } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index cf11336377..87bf1c212d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1102,7 +1102,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & switch (mSelectedObjects->mSelectType) { case SELECT_TYPE_ATTACHMENT: - if (first_object) + if (first_object && first_object->getRootEdit()->mDrawable.notNull()) { // this means this object *has* to be an attachment LLXform* attachment_point_xform = first_object->getRootEdit()->mDrawable->mXform.getParent(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 500dcfecbf..ad1902fa9b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -431,9 +431,11 @@ bool idle_startup() // Load the throttle settings gViewerThrottle.load(); - if (ll_init_ares() == NULL) + if (ll_init_ares() == NULL || !gAres->isInitialized()) { - LL_ERRS("AppInit") << "Could not start address resolution system" << LL_ENDL; + LL_WARNS("AppInit") << "Could not start address resolution system" << LL_ENDL; + std::string msg = LLTrans::getString("LoginFailedNoNetwork"); + LLAppViewer::instance()->earlyExit(msg); } // @@ -479,7 +481,8 @@ bool idle_startup() FALSE, std::string())) { - std::string msg = llformat("Unable to start networking, error %d", gMessageSystem->getErrorCode()); + std::string msg = LLTrans::getString("LoginFailedNoNetwork"); + msg.append(llformat(" Error: %d", gMessageSystem->getErrorCode())); LLAppViewer::instance()->earlyExit(msg); } @@ -567,6 +570,8 @@ bool idle_startup() } } + LL_INFOS("AppInit") << "Message System Initialized." << LL_ENDL; + //------------------------------------------------- // Init audio, which may be needed for prefs dialog // or audio cues in connection UI. @@ -597,7 +602,9 @@ bool idle_startup() gAudiop->setMuted(TRUE); } } - + + LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL; + if (LLTimer::knownBadTimer()) { LL_WARNS("AppInit") << "Unreliable timers detected (may be bad PCI chipset)!!" << LL_ENDL; diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp index 3190726be1..2d3fb566e0 100644 --- a/indra/newview/llstylemap.cpp +++ b/indra/newview/llstylemap.cpp @@ -61,14 +61,17 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID &source) LLStyleSP style(new LLStyle); style->setVisible(true); style->setFontName(LLStringUtil::null); - if (source != LLUUID::null) + if (source != LLUUID::null && source != gAgent.getID() ) { style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); std::string link = llformat("secondlife:///app/agent/%s/about",source.asString().c_str()); style->setLinkHREF(link); } else + { + // Make the resident's own name white and don't make the name clickable. style->setColor(LLColor4::white); + } (*this)[source] = style; } return (*this)[source]; diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 3d53eaa631..1e3c64226f 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -186,7 +186,7 @@ bool LLTextureCacheLocalFileWorker::doRead() if (mImageFormat == IMG_CODEC_INVALID) { - llwarns << "Unrecognized file extension " << extension << " for local texture " << mFileName << llendl; +// llwarns << "Unrecognized file extension " << extension << " for local texture " << mFileName << llendl; mDataSize = 0; // no data return true; } @@ -227,9 +227,9 @@ bool LLTextureCacheLocalFileWorker::doRead() { if (mBytesRead != mBytesToRead) { - llwarns << "Error reading file from local cache: " << local_filename - << " Bytes: " << mDataSize << " Offset: " << mOffset - << " / " << mDataSize << llendl; +// llwarns << "Error reading file from local cache: " << local_filename +// << " Bytes: " << mDataSize << " Offset: " << mOffset +// << " / " << mDataSize << llendl; mDataSize = 0; // failed delete[] mReadData; mReadData = NULL; @@ -251,9 +251,9 @@ bool LLTextureCacheLocalFileWorker::doRead() mReadData, mOffset, mDataSize); if (bytes_read != mDataSize) { - llwarns << "Error reading file from local cache: " << mFileName - << " Bytes: " << mDataSize << " Offset: " << mOffset - << " / " << mDataSize << llendl; +// llwarns << "Error reading file from local cache: " << mFileName +// << " Bytes: " << mDataSize << " Offset: " << mOffset +// << " / " << mDataSize << llendl; mDataSize = 0; delete[] mReadData; mReadData = NULL; @@ -368,9 +368,9 @@ bool LLTextureCacheRemoteWorker::doRead() { if (mBytesRead != mBytesToRead) { - llwarns << "Error reading file from local cache: " << local_filename - << " Bytes: " << mDataSize << " Offset: " << mOffset - << " / " << mDataSize << llendl; +// llwarns << "Error reading file from local cache: " << local_filename +// << " Bytes: " << mDataSize << " Offset: " << mOffset +// << " / " << mDataSize << llendl; mDataSize = 0; // failed delete[] mReadData; mReadData = NULL; @@ -392,9 +392,9 @@ bool LLTextureCacheRemoteWorker::doRead() mReadData, mOffset, mDataSize); if (bytes_read != mDataSize) { - llwarns << "Error reading file from local cache: " << local_filename - << " Bytes: " << mDataSize << " Offset: " << mOffset - << " / " << mDataSize << llendl; +// llwarns << "Error reading file from local cache: " << local_filename +// << " Bytes: " << mDataSize << " Offset: " << mOffset +// << " / " << mDataSize << llendl; mDataSize = 0; delete[] mReadData; mReadData = NULL; @@ -455,9 +455,9 @@ bool LLTextureCacheRemoteWorker::doRead() { if (mBytesRead != mBytesToRead) { - llwarns << "LLTextureCacheWorker: " << mID - << " incorrect number of bytes read from header: " << mBytesRead - << " != " << mBytesToRead << llendl; +// llwarns << "LLTextureCacheWorker: " << mID +// << " incorrect number of bytes read from header: " << mBytesRead +// << " != " << mBytesToRead << llendl; mDataSize = -1; // failed return true; } @@ -486,9 +486,9 @@ bool LLTextureCacheRemoteWorker::doRead() mReadData, offset, size); if (bytes_read != size) { - llwarns << "LLTextureCacheWorker: " << mID - << " incorrect number of bytes read from header: " << bytes_read - << " / " << size << llendl; +// llwarns << "LLTextureCacheWorker: " << mID +// << " incorrect number of bytes read from header: " << bytes_read +// << " / " << size << llendl; mDataSize = -1; // failed return true; } @@ -554,9 +554,9 @@ bool LLTextureCacheRemoteWorker::doRead() { if (mBytesRead != mBytesToRead) { - llwarns << "LLTextureCacheWorker: " << mID - << " incorrect number of bytes read from body: " << mBytesRead - << " != " << mBytesToRead << llendl; +// llwarns << "LLTextureCacheWorker: " << mID +// << " incorrect number of bytes read from body: " << mBytesRead +// << " != " << mBytesToRead << llendl; mDataSize = -1; // failed } return true; @@ -593,9 +593,9 @@ bool LLTextureCacheRemoteWorker::doRead() file_offset, file_size); if (bytes_read != file_size) { - llwarns << "LLTextureCacheWorker: " << mID - << " incorrect number of bytes read from body: " << bytes_read - << " / " << file_size << llendl; +// llwarns << "LLTextureCacheWorker: " << mID +// << " incorrect number of bytes read from body: " << bytes_read +// << " / " << file_size << llendl; mDataSize = -1; // failed return true; } @@ -632,7 +632,7 @@ bool LLTextureCacheRemoteWorker::doWrite() { if(cur_imagesize > 0 && mImageSize != cur_imagesize) { - llwarns << "Header cache entry size: " << cur_imagesize << " != mImageSize: " << mImageSize << llendl; +// llwarns << "Header cache entry size: " << cur_imagesize << " != mImageSize: " << mImageSize << llendl; offset = 0; // re-write header } mState = offset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY; @@ -667,9 +667,9 @@ bool LLTextureCacheRemoteWorker::doWrite() { if (mBytesRead != mBytesToRead) { - llwarns << "LLTextureCacheWorker: " << mID - << " incorrect number of bytes written to header: " << mBytesRead - << " != " << mBytesToRead << llendl; +// llwarns << "LLTextureCacheWorker: " << mID +// << " incorrect number of bytes written to header: " << mBytesRead +// << " != " << mBytesToRead << llendl; mDataSize = -1; // failed return true; } @@ -698,7 +698,7 @@ bool LLTextureCacheRemoteWorker::doWrite() if (bytes_written <= 0) { - llwarns << "LLTextureCacheWorker: missing entry: " << mID << llendl; +// llwarns << "LLTextureCacheWorker: missing entry: " << mID << llendl; mDataSize = -1; // failed return true; } @@ -747,9 +747,9 @@ bool LLTextureCacheRemoteWorker::doWrite() { if (mBytesRead != mBytesToRead) { - llwarns << "LLTextureCacheWorker: " << mID - << " incorrect number of bytes written to body: " << mBytesRead - << " != " << mBytesToRead << llendl; +// llwarns << "LLTextureCacheWorker: " << mID +// << " incorrect number of bytes written to body: " << mBytesRead +// << " != " << mBytesToRead << llendl; mDataSize = -1; // failed } return true; @@ -839,7 +839,10 @@ void LLTextureCacheWorker::finishWork(S32 param, bool completed) { delete[] mReadData; mReadData = NULL; - + if (mDataSize != 0) + { + llinfos << "Read Failed. mDataSize = " << mDataSize << llendl; + } } } else diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 83b5cdbb66..4f9d9f7763 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1047,7 +1047,7 @@ void LLTextureCtrl::setEnabled( BOOL enabled ) if( enabled ) { std::string tooltip; - if (floaterp) tooltip = floaterp->getUIString("choose_picture"); + if (floaterp) tooltip = floaterp->getString("choose_picture"); setToolTip( tooltip ); } else diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 9a043b8d15..54d733cd58 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -71,7 +71,7 @@ private: LLTextureFetchWorker* worker = mFetcher->getWorker(mID); if (worker) { - llinfos << "LLTextureFetchWorker::URLResponder::error " << status << ": " << reason << llendl; +// llwarns << "LLTextureFetchWorker::URLResponder::error " << status << ": " << reason << llendl; worker->callbackURLReceived(LLSD(), false); } mFetcher->unlockQueue(); @@ -121,7 +121,7 @@ private: } else { - llinfos << "LLTextureFetchWorker::HTTPGetResponder::error " << status << ": " << cstr << llendl; +// llinfos << "LLTextureFetchWorker::HTTPGetResponder::error " << status << ": " << cstr << llendl; worker->callbackHttpGet(NULL, -1, true); } } @@ -679,7 +679,7 @@ bool LLTextureFetchWorker::doWork(S32 param) mFirstPacket = (data_size - FIRST_PACKET_SIZE) / MAX_IMG_PACKET_SIZE + 1; if (FIRST_PACKET_SIZE + (mFirstPacket-1) * MAX_IMG_PACKET_SIZE != data_size) { - llwarns << "Bad CACHED TEXTURE size: " << data_size << " removing." << llendl; +// llwarns << "Bad CACHED TEXTURE size: " << data_size << " removing." << llendl; removeFromCache(); resetFormattedData(); clearPackets(); @@ -711,7 +711,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (!mFormattedImage->getDataSize()) { // processSimulatorPackets() failed - llwarns << "processSimulatorPackets() failed to load buffer" << llendl; +// llwarns << "processSimulatorPackets() failed to load buffer" << llendl; return true; // failed } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); @@ -747,7 +747,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { - llwarns << mID << ": HTTP get url failed, requesting from simulator" << llendl; +// llwarns << mID << ": HTTP get url failed, requesting from simulator" << llendl; mSentRequest = FALSE; mState = LOAD_FROM_SIMULATOR; return false; @@ -765,7 +765,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { - llwarns << mID << ": HTTP get url is empty, requesting from simulator" << llendl; +// llwarns << mID << ": HTTP get url is empty, requesting from simulator" << llendl; mSentRequest = FALSE; mState = LOAD_FROM_SIMULATOR; return false; @@ -816,7 +816,7 @@ bool LLTextureFetchWorker::doWork(S32 param) S32 cur_size = mFormattedImage->getDataSize(); if (mRequestedSize < 0) { - llwarns << "http get failed for: " << mID << llendl; +// llwarns << "http get failed for: " << mID << llendl; if (cur_size == 0) { resetFormattedData(); @@ -882,7 +882,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mCachedSize > 0 && !mInLocalCache && mRetryAttempt == 0) { // Cache file should be deleted, try again - llwarns << mID << ": Decode of cached file failed (removed), retrying" << llendl; +// llwarns << mID << ": Decode of cached file failed (removed), retrying" << llendl; mFormattedImage = NULL; ++mRetryAttempt; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); @@ -891,7 +891,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { - llwarns << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << llendl; +// llwarns << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << llendl; mState = DONE; // failed } } @@ -1148,7 +1148,7 @@ void LLTextureFetchWorker::callbackHttpGet(U8* data, S32 data_size, bool last_bl else if (data_size > mRequestedSize) { // *TODO: This will happen until we fix LLCurl::getByteRange() - llinfos << "HUH?" << llendl; +// llinfos << "HUH?" << llendl; mHaveAllData = TRUE; mFormattedImage->deleteData(); mBufferSize = data_size; @@ -1179,7 +1179,7 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima LLMutexLock lock(&mWorkMutex); if (mState != LOAD_FROM_TEXTURE_CACHE) { - llwarns << "Read callback for " << mID << " with state = " << mState << llendl; +// llwarns << "Read callback for " << mID << " with state = " << mState << llendl; return; } if (success) @@ -1203,7 +1203,7 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success) LLMutexLock lock(&mWorkMutex); if (mState != WAIT_ON_WRITE) { - llwarns << "Write callback for " << mID << " with state = " << mState << llendl; +// llwarns << "Write callback for " << mID << " with state = " << mState << llendl; return; } mWritten = TRUE; @@ -1216,7 +1216,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success) { if (mState != DECODE_IMAGE_UPDATE) { - llwarns << "Decode callback for " << mID << " with state = " << mState << llendl; +// llwarns << "Decode callback for " << mID << " with state = " << mState << llendl; return; } // llinfos << mID << " : DECODE COMPLETE " << llendl; @@ -1259,7 +1259,7 @@ bool LLTextureFetchWorker::decodeImage() } else { - llwarns << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << llendl; +// llwarns << "DECODE FAILED: " << mID << " Discard: " << (S32)mFormattedImage->getDiscardLevel() << llendl; removeFromCache(); } mImageWorker->scheduleDelete(); @@ -1780,7 +1780,7 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 } else if (!data_size) { - llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl; +// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl; res = false; } if (!res) @@ -1825,7 +1825,7 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 } else if (!data_size) { - llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl; +// llwarns << "Img: " << id << ":" << " Empty Image Header" << llendl; res = false; } if (!res) diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 39dc0362b3..d7db0f85d9 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -340,7 +340,7 @@ void LLToolBar::updateCommunicateList() } } communicate_button->addSeparator(ADD_TOP); - communicate_button->add(getUIString("Redock Windows"), LLSD("redock"), ADD_TOP); + communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP); communicate_button->addSeparator(ADD_TOP); communicate_button->add(LLFloaterMute::getInstance()->getShortTitle(), LLSD("mute list"), ADD_TOP); diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index ac2f20895c..70d1a0e66a 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -36,6 +36,7 @@ #include "lltool.h" // tools and manipulators #include "llmanipscale.h" +#include "llselectmgr.h" #include "lltoolbrush.h" #include "lltoolcomp.h" #include "lltooldraganddrop.h" diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index cc6af1043d..6bdc7e9656 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -67,10 +67,6 @@ #include "llui.h" #include "llweb.h" -LLPointer LLToolPie::sClickActionObject; -LLSafeHandle LLToolPie::sLeftClickSelection = NULL; -U8 LLToolPie::sClickAction = 0; - extern void handle_buy(void*); extern BOOL gDebugClicks; @@ -84,7 +80,8 @@ LLToolPie::LLToolPie() : LLTool(std::string("Select")), mPieMouseButtonDown( FALSE ), mGrabMouseButtonDown( FALSE ), - mMouseOutsideSlop( FALSE ) + mMouseOutsideSlop( FALSE ), + mClickAction(0) { } @@ -168,17 +165,17 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) // If it's a left-click, and we have a special action, do it. if (useClickAction(always_show, mask, object, parent)) { - sClickAction = 0; + mClickAction = 0; if (object && object->getClickAction()) { - sClickAction = object->getClickAction(); + mClickAction = object->getClickAction(); } else if (parent && parent->getClickAction()) { - sClickAction = parent->getClickAction(); + mClickAction = parent->getClickAction(); } - switch(sClickAction) + switch(mClickAction) { case CLICK_ACTION_TOUCH: default: @@ -196,27 +193,27 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) || parent && parent->flagTakesMoney()) { // pay event goes to object actually clicked on - sClickActionObject = object; - sLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); + mClickActionObject = object; + mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); return TRUE; } break; case CLICK_ACTION_BUY: - sClickActionObject = parent; - sLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); + mClickActionObject = parent; + mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); return TRUE; case CLICK_ACTION_OPEN: if (parent && parent->allowOpen()) { - sClickActionObject = parent; - sLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); + mClickActionObject = parent; + mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); } return TRUE; case CLICK_ACTION_PLAY: handle_click_action_play(); return TRUE; case CLICK_ACTION_OPEN_MEDIA: - // sClickActionObject = object; + // mClickActionObject = object; handle_click_action_open_media(object); return TRUE; } @@ -471,8 +468,16 @@ ECursorType cursor_from_object(LLViewerObject* object) return cursor; } +void LLToolPie::resetSelection() +{ + mLeftClickSelection = NULL; + mClickActionObject = NULL; + mClickAction = 0; +} + // When we get object properties after left-clicking on an object // with left-click = buy, if it's the same object, do the buy. + // static void LLToolPie::selectionPropertiesReceived() { @@ -483,14 +488,16 @@ void LLToolPie::selectionPropertiesReceived() return; } - if (!sLeftClickSelection->isEmpty()) + LLObjectSelection* selection = LLToolPie::getInstance()->getLeftClickSelection(); + if (selection) { - LLViewerObject* selected_object = sLeftClickSelection->getPrimaryObject(); + LLViewerObject* selected_object = selection->getPrimaryObject(); // since we don't currently have a way to lock a selection, it could have changed // after we initially clicked on the object - if (selected_object == sClickActionObject) + if (selected_object == LLToolPie::getInstance()->getClickActionObject()) { - switch (sClickAction) + U8 click_action = LLToolPie::getInstance()->getClickAction(); + switch (click_action) { case CLICK_ACTION_BUY: handle_buy(NULL); @@ -506,9 +513,7 @@ void LLToolPie::selectionPropertiesReceived() } } } - sLeftClickSelection = NULL; - sClickActionObject = NULL; - sClickAction = 0; + LLToolPie::getInstance()->resetSelection(); } BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index a8103f23a0..b282f3538d 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -60,27 +60,31 @@ public: virtual LLTool* getOverrideTool(MASK mask); LLPickInfo& getPick() { return mPick; } - + U8 getClickAction() { return mClickAction; } + LLViewerObject* getClickActionObject() { return mClickActionObject; } + LLObjectSelection* getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; } + void resetSelection(); + static void leftMouseCallback(const LLPickInfo& pick_info); static void rightMouseCallback(const LLPickInfo& pick_info); static void selectionPropertiesReceived(); -protected: +private: BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y); BOOL pickAndShowMenu(BOOL edit_menu); BOOL useClickAction(BOOL always_show, MASK mask, LLViewerObject* object, LLViewerObject* parent); -protected: +private: BOOL mPieMouseButtonDown; BOOL mGrabMouseButtonDown; BOOL mMouseOutsideSlop; // for this drag, has mouse moved outside slop region LLPickInfo mPick; - static LLPointer sClickActionObject; - static U8 sClickAction; - static LLSafeHandle sLeftClickSelection; + LLPointer mClickActionObject; + U8 mClickAction; + LLSafeHandle mLeftClickSelection; }; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index dfe4bd58bd..d11598100e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1506,7 +1506,7 @@ class LLObjectReportAbuse : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (objectp) { LLFloaterReporter::showFromObject(objectp->getID()); @@ -1530,7 +1530,7 @@ class LLObjectTouch : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) return true; LLPickInfo pick = LLToolPie::getInstance()->getPick(); @@ -1581,7 +1581,7 @@ class LLObjectEnableTouch : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = obj && obj->flagHandleTouch(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -1615,7 +1615,7 @@ void label_touch(std::string& label, void*) bool handle_object_open() { - LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(!obj) return true; LLFloaterOpenObject::show(); @@ -1636,7 +1636,7 @@ class LLObjectEnableOpen : public view_listener_t { // Look for contents in root object, which is all the LLFloaterOpenObject // understands. - LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = (obj != NULL); if (new_value) { @@ -1677,7 +1677,7 @@ bool toggle_build_mode() gViewerWindow->showCursor(); } // avoid spurious avatar movements pulling out of edit mode - LLViewerJoystick::getInstance()->moveAvatar(true); + LLViewerJoystick::getInstance()->setNeedsReset(); } else { @@ -1716,7 +1716,7 @@ bool toggle_build_mode() gAgent.resetView(false); // avoid spurious avatar movements - LLViewerJoystick::getInstance()->moveAvatar(true); + LLViewerJoystick::getInstance()->setNeedsReset(); } return true; @@ -2007,7 +2007,7 @@ BOOL enable_has_attachments(void*) void handle_follow(void *userdata) { // follow a given avatar by ID - LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (objectp) { gAgent.startFollowPilot(objectp->getID()); @@ -2018,7 +2018,7 @@ class LLObjectEnableMute : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = (object != NULL); if (new_value) { @@ -2041,7 +2041,7 @@ class LLObjectMute : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) return true; LLUUID id; @@ -2171,7 +2171,7 @@ class LLAvatarFreeze : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getFirstObject() ); + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if( avatar ) { LLUUID* avatar_id = new LLUUID( avatar->getID() ); @@ -2221,7 +2221,7 @@ class LLAvatarDebug : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getFirstObject() ); + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if( avatar ) { avatar->dumpLocalTextures(); @@ -2307,7 +2307,7 @@ class LLAvatarEject : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getFirstObject() ); + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if( avatar ) { MenuCallbackData *data = new MenuCallbackData; @@ -2364,7 +2364,7 @@ class LLAvatarEnableFreezeEject : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getFirstObject() ); + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); bool new_value = (avatar != NULL); if (new_value) @@ -2395,7 +2395,7 @@ class LLAvatarGiveCard : public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { llinfos << "handle_give_card()" << llendl; - LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(dest && dest->isAvatar()) { bool found_name = false; @@ -2852,7 +2852,7 @@ class LLAvatarEnableAddFriend : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getFirstObject()); + LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); bool new_value = avatar && !is_agent_friend(avatar->getID()); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); return true; @@ -3320,7 +3320,7 @@ class LLEditEnableDuplicate : public view_listener_t void disabled_duplicate(void*) { - if (LLSelectMgr::getInstance()->getSelection()->getFirstObject()) + if (LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()) { LLNotifyBox::showXml("CopyFailed"); } @@ -4936,11 +4936,11 @@ class LLToolsLookAtSelection : public view_listener_t if (zoom) { - gAgent.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), LLSelectMgr::getInstance()->getSelectionCenterGlobal(), LLSelectMgr::getInstance()->getSelection()->getFirstObject()->mID ); + gAgent.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), LLSelectMgr::getInstance()->getSelectionCenterGlobal(), LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->mID ); } else { - gAgent.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), LLSelectMgr::getInstance()->getSelection()->getFirstObject()->mID ); + gAgent.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->mID ); } } return true; @@ -4975,7 +4975,7 @@ class LLAvatarInviteToGroup : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getFirstObject() ); + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) { invite_to_group(avatar->getID()); @@ -4988,7 +4988,7 @@ class LLAvatarAddFriend : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getFirstObject() ); + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar && !is_agent_friend(avatar->getID())) { request_friendship(avatar->getID()); @@ -5061,11 +5061,11 @@ class LLEnablePayObject : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getFirstObject()); + LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); bool new_value = (avatar != NULL); if (!new_value) { - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if( object ) { LLViewerObject *parent = (LLViewerObject *)object->getParent(); @@ -5085,7 +5085,7 @@ class LLObjectEnableSitOrStand : public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { bool new_value = false; - LLViewerObject* dest_object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* dest_object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(dest_object) { @@ -5450,7 +5450,7 @@ class LLShowAgentProfile : public view_listener_t } else if (userdata.asString() == "hit object") { - LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (objectp) { agent_id = objectp->getID(); @@ -5671,7 +5671,7 @@ class LLAttachmentDrop : public view_listener_t { // Called when the user clicked on an object attached to them // and selected "Drop". - LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) { llwarns << "handle_drop_attachment() - no object to drop" << llendl; @@ -5771,7 +5771,7 @@ class LLAttachmentDetach : public view_listener_t { // Called when the user clicked on an object attached to them // and selected "Detach". - LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) { llwarns << "handle_detach() - no object to detach" << llendl; @@ -5851,7 +5851,7 @@ class LLAttachmentEnableDrop : public view_listener_t // in your inventory. Therefore, we disable the drop option until the // item is in your inventory - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); LLViewerJointAttachment* attachment_pt = NULL; LLInventoryItem* item = NULL; @@ -5893,7 +5893,7 @@ class LLAttachmentEnableDrop : public view_listener_t BOOL enable_detach(void*) { - LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) return FALSE; if (!object->isAttachment()) return FALSE; @@ -6000,7 +6000,7 @@ class LLAvatarSendIM : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getFirstObject() ); + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) { std::string name("IM"); @@ -6812,7 +6812,7 @@ void handle_dump_avatar_local_textures(void*) void handle_debug_avatar_textures(void*) { - LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (objectp) { LLFloaterAvatarTextures::show(objectp->getID()); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e47ffe2d7f..b6c524065c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -539,9 +539,9 @@ void process_places_reply(LLMessageSystem* msg, void** data) void send_sound_trigger(const LLUUID& sound_id, F32 gain) { - if (sound_id.isNull()) + if (sound_id.isNull() || gAgent.getRegion() == NULL) { - // zero guids don't get sent (no sound) + // disconnected agent or zero guids don't get sent (no sound) return; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8ff257ee77..0bb2cb8194 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -237,8 +237,6 @@ const F32 FAST_FRAME_INCREMENT = 0.1f; const F32 MIN_DISPLAY_SCALE = 0.75f; -const S32 CONSOLE_BOTTOM_PAD = 40; - std::string LLViewerWindow::sSnapshotBaseName; std::string LLViewerWindow::sSnapshotDir; @@ -1376,6 +1374,18 @@ void LLViewerWindow::handlePingWatchdog(LLWindow *window, const char * msg) LLAppViewer::instance()->pingMainloopTimeout(msg); } + +void LLViewerWindow::handleResumeWatchdog(LLWindow *window) +{ + LLAppViewer::instance()->resumeMainloopTimeout(); +} + +void LLViewerWindow::handlePauseWatchdog(LLWindow *window) +{ + LLAppViewer::instance()->pauseMainloopTimeout(); +} + + // // Classes // @@ -1584,6 +1594,8 @@ void LLViewerWindow::initBase() LLRect floater_view_rect = full_window; // make space for menu bar if we have one floater_view_rect.mTop -= MENU_BAR_HEIGHT; + + // TODO: Eliminate magic constants - please used named constants if changing this floater_view_rect.mBottom += STATUS_BAR_HEIGHT + 12 + 16 + 2; // Check for non-first startup @@ -1602,7 +1614,10 @@ void LLViewerWindow::initBase() llassert( !gConsole ); LLRect console_rect = full_window; console_rect.mTop -= 24; - console_rect.mBottom += STATUS_BAR_HEIGHT + 12 + 16 + 12; + + console_rect.mBottom += getChatConsoleBottomPad(); + + // TODO: Eliminate magic constants - please used named constants if changing this - don't be a programmer hater console_rect.mLeft += 24; //gSavedSettings.getS32("StatusBarButtonWidth") + gSavedSettings.getS32("StatusBarPad"); if (gSavedSettings.getBOOL("ChatFullWidth")) @@ -2968,7 +2983,7 @@ BOOL LLViewerWindow::handlePerFrameHover() // Always update console LLRect console_rect = gConsole->getRect(); - console_rect.mBottom = gHUDView->getRect().mBottom + CONSOLE_BOTTOM_PAD; + console_rect.mBottom = gHUDView->getRect().mBottom + getChatConsoleBottomPad(); gConsole->reshape(console_rect.getWidth(), console_rect.getHeight()); gConsole->setRect(console_rect); } @@ -4233,6 +4248,13 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei - output_buffer_offset_x // ...minus buffer padding x... - (output_buffer_offset_y * (raw->getWidth())) // ...minus buffer padding y... ) * raw->getComponents(); + + // Ping the wathdog thread every 100 lines to keep us alive (arbitrary number, feel free to change) + if (out_y % 100 == 0) + { + LLAppViewer::instance()->pingMainloopTimeout("LLViewerWindow::rawSnapshot"); + } + if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR) { glReadPixels( @@ -4874,6 +4896,15 @@ void LLViewerWindow::calcDisplayScale() } } +S32 LLViewerWindow::getChatConsoleBottomPad() +{ + S32 offset = 0; + if( gToolBar && gToolBar->getVisible() ) + offset += TOOL_BAR_HEIGHT; + + return offset; +} + //---------------------------------------------------------------------------- // static diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 821e306145..11c4126beb 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -174,7 +174,10 @@ public: /*virtual*/ void handleDataCopy(LLWindow *window, S32 data_type, void *data); /*virtual*/ BOOL handleTimerEvent(LLWindow *window); /*virtual*/ BOOL handleDeviceChange(LLWindow *window); + /*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg); + /*virtual*/ void handlePauseWatchdog(LLWindow *window); + /*virtual*/ void handleResumeWatchdog(LLWindow *window); // @@ -368,7 +371,8 @@ private: void restoreGL(const std::string& progress_message = LLStringUtil::null); void initFonts(F32 zoom_factor = 1.f); void schedulePick(LLPickInfo& pick_info); - + S32 getChatConsoleBottomPad(); // Vertical padding for child console rect, varied by bottom clutter + public: LLWindow* mWindow; // graphical window object diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e67bdfe01f..391bb915fa 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2155,6 +2155,12 @@ void LLVOAvatar::releaseMeshData() { LLFace* facep = mDrawable->getFace(0); facep->setSize(0, 0); + + for(S32 i = mNumInitFaces ; i < mDrawable->getNumFaces(); i++) + { + facep = mDrawable->getFace(i); + facep->setSize(0, 0); + } } for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); @@ -2211,50 +2217,97 @@ void LLVOAvatar::updateMeshData() if (mDrawable.notNull()) { stop_glerror(); - LLFace* facep = mDrawable->getFace(0); - U32 num_vertices = 0; - U32 num_indices = 0; + LLViewerJoint* av_parts[8] ; + av_parts[0] = &mEyeBallLeftLOD ; + av_parts[1] = &mEyeBallRightLOD ; + av_parts[2] = &mEyeLashLOD ; + av_parts[3] = &mHeadLOD ; + av_parts[4] = &mLowerBodyLOD ; + av_parts[5] = &mSkirtLOD ; + av_parts[6] = &mUpperBodyLOD ; + av_parts[7] = &mHairLOD ; + + S32 f_num = 0 ; + const U32 VERTEX_NUMBER_THRESHOLD = 128 ;//small number of this means each part of an avatar has its own vertex buffer. // this order is determined by number of LODS // if a mesh earlier in this list changed LODs while a later mesh doesn't, // the later mesh's index offset will be inaccurate - mEyeBallLeftLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - mEyeBallRightLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - mEyeLashLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - mHeadLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - mLowerBodyLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - mSkirtLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - mUpperBodyLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - mHairLOD.updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); - - // resize immediately - facep->setSize(num_vertices, num_indices); - - facep->mVertexBuffer = new LLVertexBufferAvatar(); - facep->mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE); - - facep->setGeomIndex(0); - facep->setIndicesIndex(0); - - // This is a hack! Avatars have their own pool, so we are detecting - // the case of more than one avatar in the pool (thus > 0 instead of >= 0) - if (facep->getGeomIndex() > 0) + for(S32 part_index = 0 ; part_index < 8 ;) { - llerrs << "non-zero geom index: " << facep->getGeomIndex() << " in LLVOAvatar::restoreMeshData" << llendl; - } + S32 j = part_index ; + U32 last_v_num = 0, num_vertices = 0 ; + U32 last_i_num = 0, num_indices = 0 ; - mEyeBallLeftLOD.updateFaceData(facep, mAdjustedPixelArea); - mEyeBallRightLOD.updateFaceData(facep, mAdjustedPixelArea); - mEyeLashLOD.updateFaceData(facep, mAdjustedPixelArea); - mHeadLOD.updateFaceData(facep, mAdjustedPixelArea); - mLowerBodyLOD.updateFaceData(facep, mAdjustedPixelArea); - mSkirtLOD.updateFaceData(facep, mAdjustedPixelArea); - mUpperBodyLOD.updateFaceData(facep, mAdjustedPixelArea); - mHairLOD.updateFaceData(facep, mAdjustedPixelArea, TRUE); + while(part_index < 8 && num_vertices < VERTEX_NUMBER_THRESHOLD) + { + last_v_num = num_vertices ; + last_i_num = num_indices ; - stop_glerror(); - facep->mVertexBuffer->setBuffer(0); + av_parts[part_index++]->updateFaceSizes(num_vertices, num_indices, mAdjustedPixelArea); + } + if(num_vertices < 1)//skip empty meshes + { + break ; + } + if(last_v_num > 0)//put the last inserted part into next vertex buffer. + { + num_vertices = last_v_num ; + num_indices = last_i_num ; + part_index-- ; + } + + LLFace* facep ; + if(f_num < mDrawable->getNumFaces()) + { + facep = mDrawable->getFace(f_num); + } + else + { + facep = mDrawable->addFace(mDrawable->getFace(0)->getPool(), mDrawable->getFace(0)->getTexture()) ; + } + + // resize immediately + facep->setSize(num_vertices, num_indices); + + if(facep->mVertexBuffer.isNull()) + { + facep->mVertexBuffer = new LLVertexBufferAvatar(); + facep->mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE); + } + else + { + facep->mVertexBuffer->resizeBuffer(num_vertices, num_indices) ; + } + + facep->setGeomIndex(0); + facep->setIndicesIndex(0); + + // This is a hack! Avatars have their own pool, so we are detecting + // the case of more than one avatar in the pool (thus > 0 instead of >= 0) + if (facep->getGeomIndex() > 0) + { + llerrs << "non-zero geom index: " << facep->getGeomIndex() << " in LLVOAvatar::restoreMeshData" << llendl; + } + + for(S32 k = j ; k < part_index ; k++) + { + av_parts[k]->updateFaceData(facep, mAdjustedPixelArea, (k == 7)); + } + + stop_glerror(); + facep->mVertexBuffer->setBuffer(0); + + if(!f_num) + { + f_num += mNumInitFaces ; + } + else + { + f_num++ ; + } + } } } @@ -5847,6 +5900,7 @@ LLDrawable *LLVOAvatar::createDrawable(LLPipeline *pipeline) LLDrawPoolAvatar *poolp = (LLDrawPoolAvatar*) gPipeline.getPool(LLDrawPool::POOL_AVATAR); // Only a single face (one per avatar) + //this face will be splitted into several if its vertex buffer is too long. mDrawable->setState(LLDrawable::ACTIVE); mDrawable->addFace(poolp, NULL); mDrawable->setRenderType(LLPipeline::RENDER_TYPE_AVATAR); @@ -5860,6 +5914,8 @@ LLDrawable *LLVOAvatar::createDrawable(LLPipeline *pipeline) facep = mDrawable->addFace((LLFacePool*) NULL, mShadowImagep); mShadow1Facep = facep; + mNumInitFaces = mDrawable->getNumFaces() ; + dirtyMesh(); return mDrawable; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 917dd0faee..de117a5bb9 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -693,6 +693,7 @@ public: typedef std::multimap mesh_map_t; mesh_map_t mMeshes; + S32 mNumInitFaces ; //number of faces generated when creating the avatar drawable, does not inculde splitted faces due to long vertex buffer. //-------------------------------------------------------------------- // true if this avatar is for this viewers agent //-------------------------------------------------------------------- diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 74af22dbc9..8b147dc7cd 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2236,6 +2236,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } LLVOVolume* vobj = drawablep->getVOVolume(); + llassert_always(vobj); vobj->updateTextures(); vobj->preRebuild(); diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index c375cf0d52..a1a3b1cf1a 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -696,7 +696,7 @@ void LLWinDebug::generateCrashStacks(struct _EXCEPTION_POINTERS *exception_infop // Since there is exception info... Release the hounds. gEmergencyMemoryReserve.release(); - if(gSavedSettings.getControl("SaveMinidump").isNull() && gSavedSettings.getBOOL("SaveMinidump")) + if(gSavedSettings.getControl("SaveMinidump").notNull() && gSavedSettings.getBOOL("SaveMinidump")) { _MINIDUMP_EXCEPTION_INFORMATION ExInfo; diff --git a/indra/newview/skins/default/xui/de/floater_im.xml b/indra/newview/skins/default/xui/de/floater_im.xml index e62ff2ae21..3d2b7452e1 100644 --- a/indra/newview/skins/default/xui/de/floater_im.xml +++ b/indra/newview/skins/default/xui/de/floater_im.xml @@ -1,23 +1,23 @@ - + Sie sind der einzige Benutzer in dieser Sitzung. - - + + [FIRST] [LAST] ist offline. - + + + Klicken Sie auf [BUTTON NAME], um eine Verbindung zu diesem Voice-Chat herzustellen. + Sie haben diesen Einwohner stummgeschaltet.Wenn Sie ihm eine Nachricht senden, wird die Stummschaltung automatisch aufgehoben. - + Fehler bei Anfrage, bitte versuchen Sie es später. - - + + Sie sind dazu nicht berechtigt. - - - Der angeforderte Benutzer hat die Hilfe-Sitzung verlassen. - + Die Sitzung ist abgelaufen @@ -28,27 +28,19 @@ Sie sind kein Sitzungsmoderator. - Sie wurden stummgeschaltet. - - - Füge Avatare zur Chat-Sitzung hinzu mit - - - Messaging-Chat-Sitzung mit - - - teleportiert zum Ersteller von - - - Agent wird stummgeschaltet in - - + Ein Gruppenmoderator hat Ihren Text-Chat deaktiviert. + + + + Es konnten keine Benutzer zur Chat-Sitzung mit [RECIPIENT] hinzugefügt werden. + + + Ihre Nachricht konnte nicht an die Chat-Sitzung mit [RECIPIENT] gesendet werden. + + Sie wurden von der Gruppe ausgeschlossen. - - - Klicken Sie auf [BUTTON NAME], um eine Verbindung zu diesem Voice-Chat herzustellen. - Die Chat-Sitzung kann nicht fortgesetzt werden + Sie haben nicht mehr die Berechtigung an der Chat-Sitzung teilzunehmen diff --git a/indra/newview/skins/default/xui/de/floater_preview_gesture.xml b/indra/newview/skins/default/xui/de/floater_preview_gesture.xml index 0596cabdc5..72b8bd881b 100644 --- a/indra/newview/skins/default/xui/de/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/de/floater_preview_gesture.xml @@ -1,50 +1,51 @@ + + Stopp + + + Vorschau + + + – Keine – + Beschreibung: Auslöser: - + Ersetzen mit: - + Tastenkürzel: - - - - Bibliothek: - - - Schritte: - + + Bibliothek: Schritte: -